diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,14 @@
 # Revision history for glean
 
+## 0.2.0.0
+
+* Added `glean-lsp`, a multi-language LSP server based on Glean
+* Added a new Haskell indexer which consumes `.hie` files directly and
+  collects much richer data than the old indexer.
+* Added a new experimental DB backend based on LMDB, which at
+  least for some benchmarks performs 30-40% faster than RocksDB. Add
+  the `--lmdb` flag to use it.
+
 ## 0.1.0.0 -- YYYY-mm-dd
 
 * First version. Released on an unsuspecting world.
diff --git a/Setup.hs b/Setup.hs
deleted file mode 100644
--- a/Setup.hs
+++ /dev/null
@@ -1,12 +0,0 @@
-{-
-  Copyright (c) Meta Platforms, Inc. and affiliates.
-  All rights reserved.
-
-  This source code is licensed under the BSD-style license found in the
-  LICENSE file in the root directory of this source tree.
--}
-
-module Setup where
-
-import Distribution.Simple
-main = defaultMain
diff --git a/glean.cabal b/glean.cabal
--- a/glean.cabal
+++ b/glean.cabal
@@ -6,7 +6,7 @@
 -- DO NO EDIT THIS FILE DIRECTLY
 
 name:                glean
-version:             0.1.0.0
+version:             0.2.0.0
 synopsis: A system for collecting, deriving and working with facts
           about source code.
 homepage:            https://github.com/facebookincubator/Glean
@@ -59,18 +59,24 @@
        ghc-options: -O2
 
 common fb-cpp
-  cxx-options: -std=c++17 -Wno-nullability-completeness
+  cxx-options: -std=c++17 -Wno-nullability-completeness -fno-omit-frame-pointer
   if !flag(clang)
      cxx-options: -fcoroutines
+  if flag(asan)
+     cxx-options: -fsanitize=address
   if arch(x86_64)
      cxx-options: -march=haswell
-  if flag(opt)
+  if flag(opt) && !flag(asan)
      cxx-options: -O3 -DNDEBUG
-     cxx-options: -O3
+  else
+     cc-options: -g
+     cxx-options: -g
   
 
 common exe
   ghc-options: -threaded -rtsopts
+  if flag(asan)
+      ghc-options: -optc-fsanitize=address -optl-fsanitize=address
 
 common haskell-indexer
   if impl(ghc >= 9.2)
@@ -81,9 +87,12 @@
 flag clang
      default: False
 
-flag opt
+flag asan
      default: False
 
+flag opt
+     default: True
+
 flag benchmarks
      default: False
 
@@ -231,8 +240,12 @@
         mangle,
         template-haskell,
         tasty,
-        tasty-hunit-adapter
+        tasty-hunit
 
+    if !flag(fbthrift)
+        other-modules: Facebook.Service.HttpFb303
+        build-depends: wai, http-types
+
 library logger
     import: fb-haskell, fb-cpp, deps
     visibility: private
@@ -256,6 +269,8 @@
         Glean.Service.Types
         Glean.ClientConfig.Types
         Glean.ServerConfig.Types
+    build-depends:
+        glean:thrift-annotation
 
 library defaultconfigs
     import: fb-haskell, fb-cpp, deps
@@ -318,18 +333,20 @@
         Glean.Index.GleanIndexingService.Client
         Glean.Index.GleanIndexingService.Service
     build-depends:
-        glean:if-glean-hs
+        glean:if-glean-hs,
+        glean:thrift-annotation
 
 library if-internal-hs
     import: fb-haskell, fb-cpp, deps
-    visibility: public
+    visibility: private
     hs-source-dirs:
         glean/if/internal/gen-hs2
     exposed-modules:
         Glean.Internal.Types
     build-depends:
         glean:config,
-        glean:if-glean-hs
+        glean:if-glean-hs,
+        glean:thrift-annotation
 
 library rts
     import: fb-haskell, fb-cpp, deps, folly
@@ -365,7 +382,9 @@
         glean/rts/thrift.cpp
         glean/rts/timer.cpp
         glean/rts/validate.cpp
+    c-sources: 
     cxx-options: -DOSS=1
+    cc-options: -DOSS=1
     install-includes:
         glean/bytecode/evaluate.h
         glean/bytecode/instruction.h
@@ -414,16 +433,35 @@
     extra-libraries: atomic
     pkgconfig-depends: libunwind, libglog, icu-uc, gflags, libxxhash
 
+library storage
+    import: fb-haskell, fb-cpp, deps, folly
+    visibility: private
+    cxx-sources:
+        glean/storage/ffi.cpp
+        glean/storage/stats.cpp
+    c-sources: 
+    cxx-options: -DOSS=1
+    cc-options: -DOSS=1
+    include-dirs: .
+    install-includes:
+        glean/storage/ffi.h
+        glean/storage/common.h
+        glean/storage/db.h
+        glean/storage/stats.h
+    build-depends:
+        glean:rts,
+
 library rocksdb
     import: fb-haskell, fb-cpp, deps, folly
     visibility: private
     cxx-sources:
         glean/rocksdb/container-impl.cpp
         glean/rocksdb/database-impl.cpp
-        glean/rocksdb/ownership.cpp
         glean/rocksdb/ffi.cpp
         glean/rocksdb/rocksdb.cpp
+    c-sources: 
     cxx-options: -fno-rtti -DOSS=1
+    cc-options: -fno-rtti -DOSS=1
     include-dirs: .
     install-includes:
         glean/rocksdb/container-impl.h
@@ -433,20 +471,32 @@
         glean/rocksdb/util.h
     pkgconfig-depends: rocksdb, fmt
     build-depends:
-        glean:rocksdb-stats,
+        glean:storage,
         glean:rts,
 
--- This needs to be separate from rocksdb because it can't be compiled with -fno-rtti
-library rocksdb-stats
+library lmdb
     import: fb-haskell, fb-cpp, deps, folly
     visibility: private
     cxx-sources:
-        glean/rocksdb/stats.cpp
+        glean/lmdb/container-impl.cpp
+        glean/lmdb/database-impl.cpp
+        glean/lmdb/ffi.cpp
+        glean/lmdb/glean_lmdb.cpp
+    c-sources: 
+    cxx-options: -DOSS=1
+    cc-options: -DOSS=1
     include-dirs: .
     install-includes:
-        glean/rocksdb/stats.h
+        glean/lmdb/container-impl.h
+        glean/lmdb/database-impl.h
+        glean/lmdb/ffi.h
+        glean/lmdb/glean_lmdb.h
+        glean/lmdb/util.h
+    pkgconfig-depends: fmt
     build-depends:
+        glean:storage,
         glean:rts,
+        lmdb-clib,
 
 library util
     import: fb-haskell, fb-cpp, deps, thrift-client
@@ -456,6 +506,7 @@
         Glean.Impl.ThriftService
         Glean.Impl.ConfigProvider
         Glean.Impl.TestConfigProvider
+        Glean.Impl.MemoryReader
         Glean.Util.Bisect
         Glean.Util.ConfigProvider
         Glean.Util.Disk
@@ -483,8 +534,31 @@
         glean:config,
         glean:if-glean-hs,
         primitive,
-        network
+        network,
+        network-uri
 
+-- Angle AST and parser, schema name resolution
+library angle
+    import: fb-haskell, fb-cpp, deps, hsc2hs-cpp
+    visibility: private
+    hs-source-dirs: glean/angle
+    default-extensions: CPP
+    hsc2hs-options: --cflag=-DOSS=1
+    build-tool-depends: alex:alex, happy:happy
+    exposed-modules:
+        Glean.Angle.Hash
+        Glean.Angle.Lexer
+        Glean.Angle.Parser
+        Glean.Angle.Types
+        Glean.Display
+        Glean.Schema.Resolve
+        Glean.Schema.Evolve
+        Glean.Schema.Types
+        Glean.Schema.Util
+    build-depends:
+        glean:if-glean-hs,
+
+-- Haskell interface to glean:rts; storage and bytecode execution
 library core
     import: fb-haskell, fb-cpp, deps, hsc2hs-cpp
     visibility: public
@@ -527,42 +601,14 @@
         Glean.RTS.Bytecode.Gen.Issue
         Glean.RTS.Bytecode.Gen.Version
 
-        Glean.Typed
-        Glean.Typed.Binary
-        Glean.Typed.Build
-        Glean.Typed.BuildFact
-        Glean.Typed.Fact
-        Glean.Typed.Id
-        Glean.Typed.Predicate
-        Glean.Typed.Prim
-
-        Glean.Query.Thrift
-        Glean.Query.Thrift.Internal
-
-        Glean.Write.Async
-        Glean.Write.Options
-        Glean.Write.SendBatch
-        Glean.Write.SendQueue
-        Glean.Write.SendAndRebaseQueue
-        Glean.Write.Stats
-
-        Glean.Angle.Hash
-        Glean.Angle.Lexer
-        Glean.Angle.Parser
-        Glean.Angle.Types
-        Glean.Display
-        Glean.Query.Angle
+        -- shouldn't really be here
         Glean.Repo.Text
-        Glean.Schema.Resolve
-        Glean.Schema.Evolve
-        Glean.Schema.Types
-        Glean.Schema.Util
 
-        Glean.Backend.Types
-        Glean.Backend.Retry
+        -- shared by glean:write and glean:db
+        Glean.Write.Stats
 
-    build-tool-depends: alex:alex, happy:happy
     build-depends:
+        glean:angle,
         glean:bytecode,
         glean:config,
         glean:defaultconfigs,
@@ -571,11 +617,31 @@
         glean:if-internal-hs,
         glean:rts,
         glean:stubs,
-        glean:rocksdb,
 
+-- Fact serialization/deserialization, and the query DSL
+library typed
+    import: fb-haskell, fb-cpp, deps
+    visibility: private
+    hs-source-dirs: glean/typed
+    exposed-modules:
+        Glean.Query.Angle
+        Glean.Typed
+        Glean.Typed.Binary
+        Glean.Typed.Build
+        Glean.Typed.BuildFact
+        Glean.Typed.Fact
+        Glean.Typed.Id
+        Glean.Typed.Predicate
+        Glean.Typed.Prim
+    build-depends:
+        glean:angle,
+        glean:core,
+        glean:if-glean-hs,
+
+-- Database handling
 library db
     import: fb-haskell, fb-cpp, deps, hsc2hs-cpp
-    visibility: public
+    visibility: private
     hs-source-dirs: glean/db
     default-extensions: CPP
     cpp-options: -DOSS=1
@@ -615,7 +681,9 @@
         Glean.Database.Schema.Types
         Glean.Database.Storage
         Glean.Database.Storage.Memory
+        Glean.Database.Storage.DB
         Glean.Database.Storage.RocksDB
+        Glean.Database.Storage.LMDB
         Glean.Database.Trace
         Glean.Database.Types
         Glean.Database.Validate
@@ -647,9 +715,6 @@
         Glean.Query.UserQuery
         Glean.Query.Incremental
 
-        Glean.Backend.Local
-        Glean.Backend.Logging
-        Glean.Dump
         Glean.Logger
 
     other-modules:
@@ -659,24 +724,86 @@
 
     build-depends:
         split,
+        -- should NOT depend on glean:typed, glean:write
+        glean:angle,
+        -- only for StackedDbOpts:
+        glean:backend-api,
         glean:bytecode,
         glean:config,
         glean:core,
         glean:defaultconfigs,
-        glean:haxl-datasource,
         glean:util,
         glean:if-glean-hs,
         glean:if-internal-hs,
         glean:rts,
         glean:stubs,
         glean:rocksdb,
+        glean:lmdb,
 
+-- Backend API, and a few things built on top
+library backend-api
+    import: fb-haskell, fb-cpp, deps
+    visibility: private
+    hs-source-dirs: glean/backend-api
+    exposed-modules:
+        Glean.Backend.Types
+        Glean.Backend.Retry
+        Glean.Write.SendBatch
+        Glean.Query.Thrift
+        Glean.Query.Thrift.Internal
+    build-depends:
+        -- does NOT depend on glean:db
+        -- ideally shouldn't depend on glean:typed or glean:core (TODO)
+        glean:if-glean-hs,
+        glean:typed,
+        glean:util,
+
+-- Client-side fact writing
+library write
+    import: fb-haskell, fb-cpp, deps
+    visibility: private
+    hs-source-dirs: glean/write
+    exposed-modules:
+        Glean.Write.Async
+        Glean.Write.Options
+        Glean.Write.SendQueue
+        Glean.Write.SendAndRebaseQueue
+    build-depends:
+        -- does NOT depend on glean:db
+        glean:backend-api,
+        glean:core,
+        glean:if-glean-hs,
+        glean:stubs,
+        glean:typed,
+        glean:util,
+
+-- Instance of Backend for local DBs
+library backend-local
+    import: fb-haskell, fb-cpp, deps
+    visibility: private
+    hs-source-dirs: glean/backend-local
+    exposed-modules:
+        Glean.Backend.Local
+        Glean.Backend.Logging
+        Glean.Dump
+    build-depends:
+        glean:angle,
+        glean:backend-api,
+        glean:core,
+        glean:db,
+        glean:haxl-datasource,
+        glean:if-glean-hs,
+        glean:if-internal-hs,
+        glean:util,
+
+-- Main client API; supports only remote DBs
 library client-hs
     import: fb-haskell, fb-cpp, deps
     visibility: public
     hs-source-dirs: glean/client/hs
     cxx-sources:
         glean/client/hs/cpp/write.cpp
+    c-sources: 
     exposed-modules:
           Glean
           Glean.Angle
@@ -690,17 +817,24 @@
         pretty,
         aeson-pretty,
         mangle,
-        glean:if-glean-hs,
-        glean:util,
-        glean:core,
+        prettyprinter-ansi-terminal,
+        process-extras,
+        thrift-haxl,
+    build-depends:
+        -- does NOT depend on glean:db or glean:backend-local
+        glean:angle,
+        glean:backend-api,
         glean:config,
+        glean:core,
         glean:defaultconfigs,
         glean:haxl-datasource,
+        glean:if-glean-hs,
         glean:stubs,
-        prettyprinter-ansi-terminal,
-        thrift-haxl,
-        process-extras
+        glean:typed,
+        glean:util,
+        glean:write,
 
+-- Client API that supports either local or remote DBs
 library client-hs-local
     import: fb-haskell, fb-cpp, deps
     visibility: public
@@ -709,6 +843,7 @@
         Glean.LocalOrRemote
     build-depends:
         glean:if-glean-hs,
+        glean:backend-local,
         glean:core,
         glean:client-hs,
         glean:db,
@@ -724,7 +859,9 @@
         glean/cpp/glean.cpp
         glean/interprocess/cpp/worklist.cpp
         glean/interprocess/cpp/counters.cpp
+    c-sources: 
     cxx-options: -DOSS=1
+    cc-options: -DOSS=1
     include-dirs: .
     install-includes:
         glean/cpp/filewriter.h
@@ -734,12 +871,13 @@
         glean/interprocess/cpp/counters_ffi.h
         glean/interprocess/cpp/worklist.h
         glean/interprocess/cpp/worklist_ffi.h
+        glean/schema/cpp/schema.h
     build-depends:
         glean:rts
 
 library interprocess
     import: fb-haskell, deps
-    visibility: public
+    visibility: private
     hs-source-dirs: glean/interprocess/hs
     exposed-modules:
         Glean.Interprocess.Counters
@@ -757,8 +895,10 @@
         Glean.Schema.Anglelang
         Glean.Schema.Buck
         Glean.Schema.Builtin
+        Glean.Schema.Chef
         Glean.Schema.Code
         Glean.Schema.CodeAnglelang
+        Glean.Schema.CodeChef
         Glean.Schema.CodeCsharp
         Glean.Schema.CodeCxx
         Glean.Schema.CodeDataswarm
@@ -772,6 +912,7 @@
         Glean.Schema.Codemarkup
         Glean.Schema.CodemarkupAnglelang
         Glean.Schema.CodemarkupBuck
+        Glean.Schema.CodemarkupChef
         Glean.Schema.CodemarkupCsharp
         Glean.Schema.CodemarkupCxx
         Glean.Schema.CodemarkupDataswarm
@@ -820,6 +961,7 @@
         Glean.Schema.Builtin.Types
         Glean.Schema.CodeAnglelang.Types
         Glean.Schema.CodeBuck.Types
+        Glean.Schema.CodeChef.Types
         Glean.Schema.CodeCsharp.Types
         Glean.Schema.CodeCxx.Types
         Glean.Schema.CodeDataswarm.Types
@@ -833,6 +975,7 @@
         Glean.Schema.CodeLsif.Types
         Glean.Schema.CodemarkupAnglelang.Types
         Glean.Schema.CodemarkupBuck.Types
+        Glean.Schema.CodemarkupChef.Types
         Glean.Schema.CodemarkupCsharp.Types
         Glean.Schema.CodemarkupCxx.Types
         Glean.Schema.CodemarkupDataswarm.Types
@@ -846,13 +989,16 @@
         Glean.Schema.CodemarkupPython.Types
         Glean.Schema.CodemarkupScip.Types
         Glean.Schema.CodemarkupSearch.Types
+        Glean.Schema.CodemarkupSwift.Types
         Glean.Schema.Codemarkup.Types
         Glean.Schema.CodemarkupTypes.Types
         Glean.Schema.CodePp.Types
         Glean.Schema.CodePython.Types
         Glean.Schema.CodeScip.Types
+        Glean.Schema.CodeSwift.Types
         Glean.Schema.CodeFbthrift.Types
         Glean.Schema.Code.Types
+        Glean.Schema.Chef.Types
         Glean.Schema.Csharp.Types
         Glean.Schema.Cxx1.Types
         Glean.Schema.Dataswarm.Types
@@ -887,9 +1033,11 @@
         Glean.Schema.Sys.Types
         Glean.Schema.Fbthrift.Types
     build-depends:
+        glean:angle,
         glean:if-glean-hs,
         glean:config,
         glean:core,
+        glean:typed,
         glean:thrift-annotation
 
 -- library clang-test-xref
@@ -906,9 +1054,11 @@
         Haxl.DataSource.Glean
         Haxl.DataSource.Glean.Common
     build-depends:
+        glean:backend-api,
         glean:config,
         glean:core,
         glean:if-glean-hs,
+        glean:typed,
         glean:util,
         thrift-haxl
 
@@ -928,6 +1078,7 @@
         Glean.Schema.Gen.Rust,
         Glean.Schema.Gen.Thrift
     build-depends:
+        glean:angle,
         glean:core,
         glean:db,
         glean:config,
@@ -1021,6 +1172,7 @@
         glean:if-glean-hs,
         glean:lib,
         glean:util,
+        glean:angle,
 
 library test-unit
     import: fb-haskell, fb-cpp, deps
@@ -1036,6 +1188,7 @@
     exposed-modules:
         Glean.Handler
     build-depends:
+        glean:backend-local,
         glean:client-hs,
         glean:if-fb303-hs,
         glean:if-glean-hs,
@@ -1055,6 +1208,8 @@
         Glean.Server.Sharding
     extra-libraries: stdc++
     build-depends:
+        glean:backend-api,
+        glean:backend-local,
         glean:client-hs,
         glean:if-fb303-hs,
         glean:if-glean-hs,
@@ -1079,6 +1234,7 @@
     default-extensions: CPP
     extra-libraries: stdc++
     build-depends:
+        glean:angle,
         glean:cli-types,
         glean:if-glean-hs,
         glean:stubs,
@@ -1099,7 +1255,9 @@
 library indexers
     import: fb-haskell, fb-cpp, deps, thrift-server
     hs-source-dirs:
+        glean/lang/angle
         glean/lang/clang
+        glean/lang/erlang
         glean/lang/flow
         glean/lang/go
         glean/lang/hack
@@ -1117,8 +1275,10 @@
         glean/index/list
     exposed-modules:
         Glean.Indexer
+        Glean.Indexer.Angle
         Glean.Indexer.Cpp
         Glean.Indexer.External
+        Glean.Indexer.Erlang
         Glean.Indexer.Flow
         Glean.Indexer.Go
         Glean.Indexer.Hack
@@ -1165,6 +1325,7 @@
         GleanCLI.Backup
         GleanCLI.Common
         GleanCLI.Complete
+        GleanCLI.Create
         GleanCLI.Derive
         GleanCLI.Finish
         GleanCLI.Merge
@@ -1335,6 +1496,7 @@
         Glean.Glass.Annotations
         Glean.Glass.Attributes
         Glean.Glass.Attributes.Class
+        Glean.Glass.Attributes.PerfUtils
         Glean.Glass.Attributes.SymbolKind
         Glean.Glass.Base
         Glean.Glass.Comments
@@ -1390,6 +1552,7 @@
         Glean.Glass.SymbolId
         Glean.Glass.SymbolId.Angle
         Glean.Glass.SymbolId.Buck
+        Glean.Glass.SymbolId.Chef
         Glean.Glass.SymbolId.Class
         Glean.Glass.SymbolId.CSharp
         Glean.Glass.SymbolId.Cxx
@@ -1484,6 +1647,7 @@
     other-modules: BenchDB
     ghc-options: -main-is QueryBench
     build-depends:
+        glean:backend-api,
         glean:bench-util,
         glean:client-hs,
         glean:core,
@@ -1491,6 +1655,7 @@
         glean:if-glean-hs,
         glean:schema,
         glean:test-lib,
+        glean:typed,
         glean:util,
         criterion < 1.7
 
@@ -1502,6 +1667,7 @@
     main-is: RenameBench.hs
     ghc-options: -main-is RenameBench
     build-depends:
+        glean:backend-local,
         glean:bench-util,
         glean:core,
         glean:db,
@@ -1518,10 +1684,12 @@
     main-is: MakeFactBench.hs
     ghc-options: -main-is MakeFactBench
     build-depends:
+        glean:backend-api,
         glean:bench-util,
         glean:client-hs,
         glean:core,
         glean:schema,
+        glean:typed,
         glean:test-lib,
         criterion < 1.7
 
@@ -1533,6 +1701,8 @@
     main-is: CompileBench.hs
     ghc-options: -main-is CompileBench
     build-depends:
+        glean:angle,
+        glean:backend-api,
         glean:client-hs,
         glean:core,
         glean:db,
@@ -1576,6 +1746,9 @@
         Glean.Database.Catalog.Test
         Glean.Database.Test
     build-depends:
+        glean:angle,
+        glean:backend-api,
+        glean:backend-local,
         glean:core,
         glean:db,
         glean:schema,
@@ -1584,6 +1757,7 @@
         glean:if-internal-hs,
         glean:stubs,
         glean:test-unit,
+        glean:typed,
         glean:util
 
 -- snapshot and other regression tests against glean
@@ -1789,11 +1963,14 @@
     exposed-modules:
         BenchDB
     build-depends:
+        glean:backend-api,
+        glean:bench-util,
         glean:client-hs,
         glean:core,
         glean:db,
         glean:schema,
         glean:test-lib,
+        glean:typed,
 
 -- Skip this one: it depends on the C++ code for the schema, and we
 -- don't want to generate and compile all that just for this one test.
@@ -1825,16 +2002,19 @@
 --     include-dirs: .
 --     cxx-sources:
 --         glean/schema/gen-cpp2/glean_test_types.cpp
---         glean/schema/gen-cpp2/glean_test_types_compact.cpp
 --         glean/schema/gen-cpp2/glean_test_types_binary.cpp
+--         glean/schema/gen-cpp2/glean_test_types_compact.cpp
+--         glean/schema/gen-cpp2/glean_test_types_serialization.cpp
 --         glean/schema/gen-cpp2/glean_test_data.cpp
 --         glean/schema/gen-cpp2/builtin_types.cpp
---         glean/schema/gen-cpp2/builtin_types_compact.cpp
 --         glean/schema/gen-cpp2/builtin_types_binary.cpp
+--         glean/schema/gen-cpp2/builtin_types_compact.cpp
+--         glean/schema/gen-cpp2/builtin_types_serialization.cpp
 --         glean/schema/gen-cpp2/builtin_data.cpp
 --         glean/schema/gen-cpp2/sys_types.cpp
---         glean/schema/gen-cpp2/sys_types_compact.cpp
 --         glean/schema/gen-cpp2/sys_types_binary.cpp
+--         glean/schema/gen-cpp2/sys_types_compact.cpp
+--         glean/schema/gen-cpp2/sys_types_serialization.cpp
 --         glean/schema/gen-cpp2/sys_data.cpp
 --         ... etc.
 
@@ -1848,11 +2028,14 @@
 
 common angle-test
     build-depends:
+        glean:angle,
+        glean:backend-api,
         glean:stubs,
         glean:core,
         glean:db,
         glean:if-glean-hs,
-        glean:schema
+        glean:schema,
+        glean:typed
 
 test-suite angle-test-angle
     import: test, angle-test
@@ -1927,9 +2110,11 @@
     ghc-options: -main-is ApiTest
     build-depends:
         glean:stubs,
+        glean:backend-api,
         glean:core,
         glean:if-glean-hs,
-        glean:schema
+        glean:schema,
+        glean:typed,
 
 test-suite cppexception
     import: test
@@ -1937,11 +2122,13 @@
     main-is: CppCatchTest.hs
     ghc-options: -main-is CppCatchTest
     build-depends:
+        glean:backend-api,
         glean:stubs,
         glean:core,
         glean:db,
         glean:if-glean-hs,
-        glean:schema
+        glean:schema,
+        glean:typed,
 
 test-suite timeout
     import: test
@@ -1949,6 +2136,7 @@
     main-is: TimeoutTest.hs
     ghc-options: -main-is TimeoutTest
     build-depends:
+        glean:backend-api,
         glean:client-hs,
         glean:stubs,
         glean:core,
@@ -1961,12 +2149,15 @@
     main-is: JSONWriteTest.hs
     ghc-options: -main-is JSONWriteTest
     build-depends:
+        glean:angle,
+        glean:backend-api,
         glean:client-hs,
         glean:stubs,
         glean:core,
         glean:db,
         glean:if-glean-hs,
         glean:schema,
+        glean:typed,
 
 test-suite BinaryTest
     import: fb-haskell, fb-cpp, exe
@@ -1984,6 +2175,7 @@
     main-is: RTSTest.hs
     ghc-options: -main-is RTSTest
     build-depends:
+        glean:angle,
         glean:client-hs,
         glean:stubs,
         glean:core,
@@ -2018,8 +2210,6 @@
         glean:schema,
         glean:config,
         glean:util
-    -- https://github.com/facebookincubator/Glean/issues/224
-    buildable: False
 
 test-suite dbderive
     import: test
@@ -2027,13 +2217,16 @@
     main-is: DbDeriveTest.hs
     ghc-options: -main-is DbDeriveTest
     build-depends:
+        glean:angle,
+        glean:backend-api,
         glean:client-hs,
         glean:core,
         glean:db,
         glean:if-glean-hs,
         glean:if-internal-hs,
         glean:schema,
-        glean:stubs
+        glean:stubs,
+        glean:typed,
 
 test-suite backup
     import: test
@@ -2041,6 +2234,8 @@
     main-is: BackupTest.hs
     ghc-options: -main-is BackupTest
     build-depends:
+        glean:backend-api,
+        glean:backend-local,
         glean:config,
         glean:core,
         glean:db,
@@ -2087,6 +2282,7 @@
     main-is: TestShard.hs
     ghc-options: -main-is TestShard
     build-depends:
+        glean:backend-api,
         glean:stubs,
         glean:core,
         glean:if-glean-hs,
@@ -2102,6 +2298,8 @@
         Glean.Server.Config
         Glean.Server.Sharding
     build-depends:
+        glean:backend-api,
+        glean:backend-local,
         glean:config,
         glean:core,
         glean:db,
@@ -2117,6 +2315,7 @@
     main-is: DbPropertiesTest.hs
     ghc-options: -main-is DbPropertiesTest
     build-depends:
+        glean:backend-api,
         glean:client-hs,
         glean:stubs,
         glean:core,
@@ -2128,8 +2327,8 @@
     main-is: ParserTest.hs
     ghc-options: -main-is ParserTest
     build-depends:
+        glean:angle,
         glean:stubs,
-        glean:core,
 
 test-suite schematest
     import: test
@@ -2138,6 +2337,8 @@
     other-modules: Schema.Lib
     ghc-options: -main-is Schema.Basic
     build-depends:
+        glean:angle,
+        glean:backend-api,
         glean:stubs,
         glean:core,
         glean:db,
@@ -2154,6 +2355,8 @@
     other-modules: Schema.Lib
     ghc-options: -main-is Schema.Evolves
     build-depends:
+        glean:angle,
+        glean:backend-api,
         glean:stubs,
         glean:client-hs,
         glean:core,
@@ -2169,6 +2372,8 @@
     other-modules: Schema.Lib
     ghc-options: -main-is Schema.Multi
     build-depends:
+        glean:angle,
+        glean:backend-api,
         glean:stubs,
         glean:core,
         glean:db,
@@ -2194,6 +2399,7 @@
     main-is: ContinuationTest.hs
     ghc-options: -main-is ContinuationTest
     build-depends:
+        glean:backend-api,
         glean:stubs,
         glean:core,
         glean:if-glean-hs,
@@ -2217,13 +2423,16 @@
     main-is: IncrementalTest.hs
     ghc-options: -main-is IncrementalTest
     build-depends:
+        glean:angle,
+        glean:backend-api,
         glean:stubs,
         glean:client-hs,
         glean:core,
         glean:db,
         glean:if-glean-hs,
         glean:lib-derive,
-        glean:schema
+        glean:schema,
+        glean:typed
     if arch(x86_64)
         buildable: True
     else
@@ -2247,6 +2456,17 @@
         glean:test-lib,
         glean:test-unit,
 
+test-suite storage-rocksdb
+    import: test
+    type: exitcode-stdio-1.0
+    main-is: StorageRocksDBTest.hs
+    ghc-options: -main-is StorageRocksDBTest
+    build-depends:
+        glean:config,
+        glean:db,
+        glean:stubs,
+        glean:util,
+
 ------------------------------------------------------------------------
 -- Regression tests for schemas, indexers and systems
 --
@@ -2278,4 +2498,294 @@
         buildable: False
 
 -- The Haskell indexer tests *only* work when run using Cabal with
--- 
+-- 'cabal run' or 'cabal test', because Cabal puts the 'hie-indexer'
+-- binary in the PATH.
+test-suite glean-snapshot-haskell
+    import: fb-haskell, fb-cpp, deps, exe, haskell-indexer
+    hs-source-dirs: glean/lang/haskell/tests
+    type: exitcode-stdio-1.0
+    main-is: Main.hs
+    ghc-options: -main-is Main
+    build-depends:
+       glean:regression-test-lib,
+       glean:indexers
+    build-tool-depends:
+       glean:hie-indexer,
+       glean:glean
+
+test-suite glean-snapshot-codemarkup-haskell
+    import: fb-haskell, fb-cpp, deps, exe, haskell-indexer
+    hs-source-dirs: glean/lang/codemarkup/tests/haskell
+    type: exitcode-stdio-1.0
+    main-is: Main.hs
+    ghc-options: -main-is Main
+    build-depends:
+       glean:regression-test-lib,
+       glean:indexers
+    build-tool-depends:
+       glean:hie-indexer,
+       glean:glean
+
+test-suite glean-snapshot-rust-lsif
+    import: fb-haskell, deps, exe
+    hs-source-dirs: glean/lang/rust-lsif/tests
+    type: exitcode-stdio-1.0
+    main-is: Glean/Regression/RustLsif/Main.hs
+    ghc-options: -main-is Glean.Regression.RustLsif.Main
+    build-depends:
+        glean:regression-test-lib,
+        glean:indexers
+    if !flag(rust-tests)
+        buildable: False
+
+test-suite glean-snapshot-rust-scip
+    import: fb-haskell, deps, exe
+    hs-source-dirs: glean/lang/rust-scip/tests
+    type: exitcode-stdio-1.0
+    main-is: Glean/Regression/RustScip/Main.hs
+    ghc-options: -main-is Glean.Regression.RustScip.Main
+    build-depends:
+        glean:regression-test-lib,
+        glean:indexers
+    if !flag(rust-tests)
+        buildable: False
+
+test-suite glean-snapshot-python-scip
+    import: fb-haskell, deps, exe
+    hs-source-dirs: glean/lang/python-scip/tests
+    type: exitcode-stdio-1.0
+    main-is: Glean/Regression/PythonScip/Main.hs
+    ghc-options: -main-is Glean.Regression.PythonScip.Main
+    build-depends:
+        glean:regression-test-lib,
+        glean:indexers
+    if !flag(python-tests)
+        buildable: False
+
+test-suite glean-snapshot-dotnet-scip
+    import: fb-haskell, deps, exe
+    hs-source-dirs: glean/lang/dotnet-scip/tests
+    type: exitcode-stdio-1.0
+    main-is: Glean/Regression/DotnetScip/Main.hs
+    ghc-options: -main-is Glean.Regression.DotnetScip.Main
+    build-depends:
+        glean:regression-test-lib,
+        glean:indexers
+    if !flag(dotnet-tests)
+        buildable: False
+
+test-suite glean-snapshot-typescript
+    import: fb-haskell, deps, exe
+    hs-source-dirs: glean/lang/codemarkup/tests/typescript
+    type: exitcode-stdio-1.0
+    main-is: Glean/Regression/TypeScript/Main.hs
+    ghc-options: -main-is Glean.Regression.TypeScript.Main
+    build-depends:
+        glean:regression-test-lib,
+        glean:indexers
+    if !flag(typescript-tests)
+        buildable: False
+
+test-suite glean-snapshot-go
+    import: fb-haskell, deps, exe
+    hs-source-dirs: glean/lang/codemarkup/tests/go/
+    type: exitcode-stdio-1.0
+    main-is: Glean/Regression/Go/Main.hs
+    ghc-options: -main-is Glean.Regression.Go.Main
+    build-depends:
+        glean:regression-test-lib,
+        glean:indexers
+    if !flag(go-tests)
+        buildable: False
+
+test-suite glean-snapshot-java-lsif
+    import: fb-haskell, deps, exe
+    hs-source-dirs: glean/lang/java-lsif/tests
+    type: exitcode-stdio-1.0
+    main-is: Glean/Regression/JavaLsif/Main.hs
+    ghc-options: -main-is Glean.Regression.JavaLsif.Main
+    build-depends:
+        glean:regression-test-lib,
+        glean:indexers
+    if !flag(java-lsif-tests)
+        buildable: False
+
+test-suite glean-snapshot-lsif
+    import: fb-haskell, deps, exe
+    hs-source-dirs: glean/lang/codemarkup/tests/lsif/
+    type: exitcode-stdio-1.0
+    main-is: Glean/Regression/Lsif/Main.hs
+    ghc-options: -main-is Glean.Regression.Lsif.Main
+    build-depends:
+        glean:regression-test-lib,
+        glean:indexers
+
+------------------------------------------------------------------------
+-- glass regression tests
+--
+library glass-regression
+    import: fb-haskell, fb-cpp, deps
+    visibility: private
+    hs-source-dirs: glean/glass/test/regression/lib
+    exposed-modules:
+        Glean.Glass.Regression.Tests
+        Glean.Glass.Regression.Util
+        Glean.Glass.Regression.Snapshot
+    build-depends:
+        glean:client-hs,
+        glean:glass-lib,
+        glean:if-glass-hs,
+        glean:client-hs-local,
+        glean:indexers,
+        glean:logger,
+        glean:regression-test-lib,
+        glean:stubs,
+        glean:util,
+        aeson-pretty,
+        yaml
+
+-- common to all regression tests
+common glass-regression-deps
+    hs-source-dirs: glean/glass/test/regression
+    build-depends:
+        HUnit,
+        glean:client-hs-local,
+        glean:glass-lib,
+        glean:glass-regression,
+        glean:if-glass-hs,
+        glean:regression-test-lib,
+
+test-suite glass-regression-buck
+    import: glass-regression-deps, fb-haskell, deps, exe
+    type: exitcode-stdio-1.0
+    main-is: Glean/Glass/Regression/Buck.hs
+    ghc-options: -main-is Glean.Glass.Regression.Buck
+    buildable: False
+
+test-suite glass-regression-cpp
+   import: glass-regression-deps, fb-haskell, deps, exe
+   type: exitcode-stdio-1.0
+   hs-source-dirs:
+     glean/glass/test/regression,
+     glean/lang/clang/tests,
+     glean/lang/clang/tests/github
+   main-is: Glean/Glass/Regression/Cpp/Github.hs
+   ghc-options: -main-is Glean.Glass.Regression.Cpp.Github
+   other-modules: Glean.Clang.Test
+                  Glean.Clang.Test.DerivePass
+                  Glean.Glass.Regression.Cpp
+                  Glean.Regression.Driver.DeriveForCodemarkup
+   build-depends: glean:clang-derive-lib,
+                  glean:client-hs,
+                  glean:client-hs-local,
+                  glean:core,
+                  glean:if-glean-hs,
+                  glean:db,
+                  glean:indexers,
+                  glean:lib,
+                  glean:schema,
+                  glean:stubs,
+                  glean:util
+   if !flag(clang-tests)
+        buildable: False
+
+test-suite glass-regression-flow
+    import: glass-regression-deps, fb-haskell, deps, exe
+    type: exitcode-stdio-1.0
+    main-is: Glean/Glass/Regression/Flow/Main.hs
+    ghc-options: -main-is Glean.Glass.Regression.Flow.Main
+    other-modules: Glean.Glass.Regression.Flow
+    build-depends:
+        glean:client-hs,
+        glean:indexers,
+        glean:util
+    if !flag(flow-tests)
+        buildable: False
+
+test-suite glass-regression-hack
+    import: glass-regression-deps, fb-haskell, deps, exe
+    type: exitcode-stdio-1.0
+    main-is: Glean/Glass/Regression/Hack/Main.hs
+    ghc-options: -main-is Glean.Glass.Regression.Hack.Main
+    other-modules: Glean.Glass.Regression.Hack
+    build-depends:
+        glean:client-hs,
+        glean:indexers,
+        glean:util,
+    if !flag(hack-tests)
+        buildable: False
+
+test-suite glass-regression-haskell
+    import: glass-regression-deps, fb-haskell, deps, exe, haskell-indexer
+    type: exitcode-stdio-1.0
+    main-is: Glean/Glass/Regression/Haskell/Main.hs
+    ghc-options: -main-is Glean.Glass.Regression.Haskell.Main
+    other-modules: Glean.Glass.Regression.Haskell
+    build-depends:
+        glean:client-hs,
+        glean:indexers,
+        glean:util
+    build-tool-depends:
+        glean:hie-indexer
+
+test-suite glass-regression-typescript
+    import: glass-regression-deps, fb-haskell, deps, exe
+    type: exitcode-stdio-1.0
+    main-is: Glean/Glass/Regression/TypeScript/Main.hs
+    ghc-options: -main-is Glean.Glass.Regression.TypeScript.Main
+    other-modules: Glean.Glass.Regression.TypeScript
+    build-depends:
+        glean:indexers,
+        glean:lsif
+    if !flag(typescript-tests)
+        buildable: False
+
+test-suite glass-regression-go
+    import: glass-regression-deps, fb-haskell, deps, exe
+    type: exitcode-stdio-1.0
+    main-is: Glean/Glass/Regression/Go/Main.hs
+    ghc-options: -main-is Glean.Glass.Regression.Go.Main
+    other-modules: Glean.Glass.Regression.Go
+    build-depends:
+        glean:indexers,
+        glean:lsif
+    if !flag(go-tests)
+        buildable: False
+
+test-suite glass-regression-rust-lsif
+    import: glass-regression-deps, fb-haskell, deps, exe
+    type: exitcode-stdio-1.0
+    main-is: Glean/Glass/Regression/RustLsif/Main.hs
+    ghc-options: -main-is Glean.Glass.Regression.RustLsif.Main
+    other-modules: Glean.Glass.Regression.RustLsif
+    build-depends:
+        glean:indexers,
+        glean:lsif
+    if !flag(rust-tests)
+        buildable: False
+
+test-suite glass-regression-java-lsif
+    import: glass-regression-deps, fb-haskell, deps, exe
+    type: exitcode-stdio-1.0
+    main-is: Glean/Glass/Regression/JavaLsif/Main.hs
+    ghc-options: -main-is Glean.Glass.Regression.JavaLsif.Main
+    other-modules: Glean.Glass.Regression.JavaLsif
+    build-depends:
+        glean:indexers,
+        glean:lsif
+    if !flag(java-lsif-tests)
+        buildable: False
+
+test-suite glass-regression-python
+    import: glass-regression-deps, fb-haskell, deps, exe
+    type: exitcode-stdio-1.0
+    main-is: Glean/Glass/Regression/Python.hs
+    ghc-options: -main-is Glean.Glass.Regression.Python
+    buildable: False
+
+test-suite glass-regression-thrift
+    import: glass-regression-deps, fb-haskell, deps, exe
+    type: exitcode-stdio-1.0
+    main-is: Glean/Glass/Regression/Thrift.hs
+    ghc-options: -main-is Glean.Glass.Regression.Thrift
+    buildable: False
diff --git a/glean/angle/Glean/Angle/Hash.hs b/glean/angle/Glean/Angle/Hash.hs
new file mode 100644
--- /dev/null
+++ b/glean/angle/Glean/Angle/Hash.hs
@@ -0,0 +1,53 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+-- | Fingerprints for schema versioning.
+--
+-- Doesn't need to be cryptographically secure, but does need to be
+-- robust against accidental collisions.
+
+module Glean.Angle.Hash
+  ( Hash
+  , hash0
+  , hashString
+  , hashByteString
+  , hashBinary
+  , hashFingerprint
+  ) where
+
+import qualified Data.ByteString as B
+import qualified Data.ByteString.Lazy as LB
+import Data.ByteString.Unsafe (unsafeUseAsCStringLen)
+import Data.Binary (Binary)
+import qualified Data.Binary as Binary
+import Data.Hashable
+import Foreign (castPtr)
+import GHC.Fingerprint as GHC
+import System.IO.Unsafe ( unsafeDupablePerformIO )
+
+-- efficient MD5 hash
+type Hash = GHC.Fingerprint
+
+hash0 :: Hash
+hash0 = GHC.fingerprint0
+
+hashString :: String -> Hash
+hashString = GHC.fingerprintString
+
+hashByteString :: B.ByteString -> Hash
+hashByteString bs = unsafeDupablePerformIO $ do
+  unsafeUseAsCStringLen bs $ \(ptr, len) ->
+    GHC.fingerprintData (castPtr ptr) (fromIntegral len)
+
+hashBinary :: Binary a => a -> Hash
+hashBinary = hashByteString . LB.toStrict . Binary.encode
+
+-- | For building Hashable instances. Avoiding an orphan instance by
+-- making this a function instead.
+hashFingerprint :: Int -> Hash -> Int
+hashFingerprint salt (GHC.Fingerprint _ w) = hashWithSalt salt w
diff --git a/glean/angle/Glean/Angle/Lexer.x b/glean/angle/Glean/Angle/Lexer.x
new file mode 100644
--- /dev/null
+++ b/glean/angle/Glean/Angle/Lexer.x
@@ -0,0 +1,318 @@
+-- Copyright (c) Facebook, Inc. and its affiliates.
+
+{
+{-# OPTIONS_GHC -funbox-strict-fields #-}
+{-# LANGUAGE DeriveFunctor, NamedFieldPuns #-}
+module Glean.Angle.Lexer
+  ( Token(..)
+  , TokenType(..)
+  , Located(..)
+  , AlexInput
+  , alexGetInput
+  , AlexPosn(..)
+  , runAlex
+  , lexer
+  , Alex(..)
+  , alexError
+  , alexMonadScan
+  , getFile
+  , encodeTextForAngle
+  , getVersion
+  , setVersion
+  ) where
+
+import qualified Data.Aeson as Aeson
+import Data.Aeson.Parser
+import Data.Attoparsec.ByteString (parseOnly)
+import Data.ByteString.Lazy (ByteString)
+import qualified Data.ByteString.UTF8 as UTF8
+import qualified Data.ByteString as Strict
+import qualified Data.ByteString.Lazy as Lazy
+import Data.Text (Text)
+import qualified Data.Text.Encoding as Text
+import Data.Word (Word64)
+
+import Glean.Angle.Types (SrcSpan(..), SrcLoc(..), AngleVersion(..), latestAngleVersion)
+}
+
+%wrapper "monadUserState-bytestring"
+
+$all = [.\n]
+$digit = [0-9]
+
+-- The # in identifiers is reserved for "special" uses. Currently
+-- there are two: <predicate>#new and <predicate>#old for
+-- restricting queries to the stacked and base DB respectively, when
+-- writing incremental derivers.
+@ident = [a-zA-Z_] [a-zA-Z0-9_]*
+@lident = [a-z] [a-zA-Z0-9_]*
+@uident = [A-Z_] [a-zA-Z0-9_]*
+
+@string = \" (\\ $all | $all # [\"\\] )* \"
+
+-- A qualified name with an optional version:
+--    VALID: "a" "a.b" "a.b.3" "a.b#new" "a.b.3#old"
+--    INVALID: "a." "a..b" "a.3.b" "a.3b"
+@lqident = @lident (\. @ident)* (\. ($digit+ | @ident)) (\# @ident)?
+
+-- versioned: Predicate.1
+@uqident = @uident (\. @ident)* \. $digit+ (\# @ident)?
+
+tokens :-
+  $white+       ;
+  "#FILE " .* \n { setFile }
+  "#" .*        ;
+
+  $digit+       { tokenContent $ T_NatLit . number  }
+  @string       { tokenContentP $ \b -> T_StringLit <$> parseString b }
+
+  "bool"        { basicToken T_Bool }
+  "byte"        { basicToken T_Byte }
+  "default"     { basicToken T_Default }
+  "derive"      { basicToken T_Derive }
+  "enum"        { basicToken T_Enum }
+  "import"      { basicToken T_Import }
+  "maybe"       { basicToken T_Maybe }
+  "nat"         { basicToken T_Nat }
+  "predicate"   { basicToken T_Predicate }
+  "schema"      { basicToken T_Schema }
+  "set"         { versionDependentToken (AngleVersion 8) T_Set (T_LIdent . ByteString.toStrict) }
+  "elements"    { versionDependentToken (AngleVersion 8) T_Elements (T_LIdent . ByteString.toStrict) }
+  "all"         { versionDependentToken (AngleVersion 8) T_All (T_LIdent . ByteString.toStrict) }
+  "string"      { basicToken T_String }
+  "type"        { basicToken T_Type }
+  "stored"      { basicToken T_Stored }
+  "where"       { basicToken T_QueryDef }
+  "evolves"     { basicToken T_Evolves }
+  "never"       { basicToken T_Never }
+  "if"          { basicToken T_If }
+  "then"        { basicToken T_Then }
+  "else"        { basicToken T_Else }
+  "++"          { basicToken T_Append }
+  ("."){2,}     { basicTokenDotDot }
+  "->"          { basicToken T_RightArrow }
+  ","           { basicToken T_Comma }
+  "|"           { basicToken T_Bar }
+  ":"           { basicToken T_Colon }
+  "("           { basicToken T_LeftParen }
+  ")"           { basicToken T_RightParen }
+  "["           { basicToken T_LeftSquare }
+  "]"           { basicToken T_RightSquare }
+  "{"           { basicToken T_LeftCurly }
+  "}"           { basicToken T_RightCurly }
+  "="           { basicToken T_Equals }
+  "!"           { basicToken T_Negate }
+  "!=="         { basicToken T_NotEquals }
+  "!="          { basicToken T_NotEqualsSingle }
+  ">"           { basicToken T_GreaterThan }
+  ">="          { basicToken T_GreaterThanOrEquals }
+  "<"           { basicToken T_LessThan }
+  "<="          { basicToken T_LessThanOrEquals }
+  "+"           { basicToken T_Plus }
+  ";"           { basicToken T_Semi }
+  "_"           { basicToken T_Underscore }
+  "$"           { basicToken T_Dollar }
+  ".*"          { basicToken T_DotStar }
+
+  -- dot-syntax was introduced in version 9
+  "." @lident / { ifVersion 9 }
+                { tokenContent $ T_Select . ByteString.toStrict . ByteString.tail }
+  "." @lident "?" / { ifVersion 9 }
+                { tokenContent $ T_SelectAlt . ByteString.toStrict .
+                    ByteString.tail . ByteString.init }
+
+  @lqident      { tokenContent $ T_QIdent . ByteString.toStrict }
+  @uqident      { tokenContent $ T_QIdent . ByteString.toStrict }
+  @uident       { tokenContent $ T_UIdent . ByteString.toStrict }
+  @lident       { tokenContent $ T_LIdent . ByteString.toStrict }
+{
+data AlexUserState = AlexUserState
+  { angleVersion :: AngleVersion
+  , currentFile :: FilePath
+  }
+
+alexInitUserState :: AlexUserState
+alexInitUserState = AlexUserState latestAngleVersion ""
+
+ifVersion n AlexUserState{angleVersion=AngleVersion v} _ _ _ = v >= n
+
+-- | A value with its source location.
+data Located a = L
+  { lspan :: SrcSpan
+  , lval  :: a
+  }
+  deriving (Eq, Show, Functor)
+
+data Token = Token ByteString TokenType
+
+data TokenType
+  = T_Bool
+  | T_Byte
+  | T_Derive
+  | T_Default
+  | T_Enum
+  | T_Import
+  | T_Maybe
+  | T_Nat
+  | T_Predicate
+  | T_Schema
+  | T_Set
+  | T_Elements
+  | T_All
+  | T_String
+  | T_Type
+  | T_Stored
+  | T_Where
+  | T_UIdent Strict.ByteString
+  | T_LIdent Strict.ByteString
+  | T_QIdent Strict.ByteString
+  | T_StringLit Text
+  | T_NatLit Word64
+  | T_QueryDef
+  | T_Evolves
+  | T_Never
+  | T_If
+  | T_Then
+  | T_Else
+  | T_Append
+  | T_DotDot
+  | T_RightArrow
+  | T_Comma
+  | T_Bar
+  | T_Colon
+  | T_LeftParen
+  | T_RightParen
+  | T_LeftSquare
+  | T_RightSquare
+  | T_LeftCurly
+  | T_RightCurly
+  | T_Equals
+  | T_Negate
+  | T_NotEquals
+  | T_NotEqualsSingle
+  | T_GreaterThan
+  | T_GreaterThanOrEquals
+  | T_LessThan
+  | T_LessThanOrEquals
+  | T_Plus
+  | T_Semi
+  | T_Underscore
+  | T_Dollar
+  | T_Select Strict.ByteString
+  | T_SelectAlt Strict.ByteString
+  | T_DotStar
+  | T_EOF
+  deriving Show
+
+-- setFile :: AlexAction a
+setFile inp@(_,_,b,_) len = do
+  let filename = ByteString.drop 6 $ ByteString.take (len-1) b
+  Alex $ \state -> Right (
+    state { alex_ust = (alex_ust state) {
+              currentFile = UTF8.toString (ByteString.toStrict filename) }
+          , alex_pos = alexStartPos }, ())
+  skip inp len
+
+getFile :: Alex FilePath
+getFile = Alex $ \state -> Right (state, currentFile (alex_ust state))
+
+getVersion :: Alex AngleVersion
+getVersion = Alex $ \state -> Right (state, angleVersion (alex_ust state))
+
+setVersion :: AngleVersion -> Alex ()
+setVersion ver = Alex $ \state -> Right
+  (state { alex_ust = (alex_ust state) { angleVersion = ver }}, ())
+
+basicToken :: TokenType -> AlexAction (SrcLoc, Token)
+basicToken t (AlexPn _ line col,_,b,_) len =
+  return $ (SrcLoc line col, Token (ByteString.take len b) t)
+
+versionDependentToken :: AngleVersion -> TokenType -> (ByteString -> TokenType) -> AlexAction (SrcLoc, Token)
+versionDependentToken firstSupportedVersion newToken oldToken =
+  tokenContentP $ \bs -> do
+    currentVersion <- getVersion
+    if currentVersion >= firstSupportedVersion
+      then return newToken
+      else return $ oldToken bs
+
+basicTokenDotDot :: AlexAction (SrcLoc, Token)
+basicTokenDotDot i@(AlexPn _ line col,_,_,_) len =
+  if len > 2 then
+    alexError $ "Too many dots at line " ++ show line ++
+      ", column " ++ show col ++
+      ". Try using '..' instead of '" ++ (replicate (fromIntegral len) '.') ++ "'"
+  else
+    basicToken T_DotDot i len
+
+tokenContent :: (ByteString -> TokenType) -> AlexAction (SrcLoc, Token)
+tokenContent f = tokenContentP (return . f)
+
+tokenContentP :: (ByteString -> Alex TokenType) -> AlexAction (SrcLoc, Token)
+tokenContentP f (AlexPn _ line col,_,b,_) len =
+  (SrcLoc line col,) . Token content <$> f content
+  where
+    content = ByteString.take len b
+
+number :: ByteString -> Word64
+number = ByteString.foldl' f 0 where
+  f x y = x * 10 + fromIntegral (y - fromIntegral (Data.Char.ord '0'))
+
+alexEOF :: Alex (SrcLoc, Token)
+alexEOF = do
+  (AlexPn _ line col,_,_,_) <- alexGetInput
+  return (SrcLoc line col, Token "" T_EOF)
+
+-- | We'll use JSON syntax for strings, as a reasonably fast way to support
+-- some escaping syntax.
+parseString :: ByteString -> Alex Text
+parseString b =
+  case parseOnly jstring (ByteString.toStrict b) of
+    Left{} -> alexError "lexical error in string"
+    Right a -> return a
+
+-- | encode a Text value into an Angle string, with appropriate escaping and
+-- surrounded by double quotes. e.g.
+--
+-- > ghci> encodeTextForAngle "ab\"\NUL"
+-- > "\"ab\\\"\\u0000\""
+--
+encodeTextForAngle :: Text -> Text
+encodeTextForAngle =
+  Text.decodeUtf8 . Lazy.toStrict . Aeson.encode . Aeson.String
+
+alexGetUserState_ :: Alex AlexUserState
+alexGetUserState_ = Alex $ \s@AlexState{alex_ust} -> Right (s, alex_ust)
+
+getToken :: Alex (SrcLoc, Token)
+getToken = do
+  inp__@(_,_,_,n) <- alexGetInput
+  sc <- alexGetStartCode
+  ust <- alexGetUserState_
+  case alexScanUser ust inp__ sc of
+    AlexEOF -> alexEOF
+    AlexError ((AlexPn _ line column),_,_,_) ->
+      let
+          file = currentFile ust
+          err = "lexical error at line " ++ show line ++
+            ", column " ++ show column
+      in
+      if null file
+        then alexError err
+        else alexError $ file <> ": " <> err
+
+    AlexSkip  inp__ _len -> do
+      alexSetInput inp__
+      getToken
+
+    AlexToken inp2__@(_,_,_,m) _ action -> let len = m-n in do
+      alexSetInput inp2__
+      action (ignorePendingBytes inp__) len
+
+lexer :: (Located Token -> Alex a) -> Alex a
+lexer f = do
+  (start, tok) <- getToken
+  (AlexPn _ eline ecol,_,_,_) <- alexGetInput
+  let end = SrcLoc eline ecol
+  f $ L (SrcSpan start end) tok
+
+}
diff --git a/glean/angle/Glean/Angle/Parser.y b/glean/angle/Glean/Angle/Parser.y
new file mode 100644
--- /dev/null
+++ b/glean/angle/Glean/Angle/Parser.y
@@ -0,0 +1,510 @@
+-- Copyright (c) Facebook, Inc. and its affiliates.
+
+{
+module Glean.Angle.Parser
+  ( parseQuery
+  , parseQueryWithVersion
+  , parseSchema
+  , stripAngleVersion
+  , parseSchemaWithVersion
+  , parseType
+  ) where
+
+import Control.Monad
+import Data.ByteString (ByteString)
+import qualified Data.ByteString.Char8 as B
+import qualified Data.ByteString.Lazy.Char8 as LB
+import Data.Char
+import Data.Either (partitionEithers)
+import Data.List.NonEmpty (NonEmpty((:|)))
+import Data.Maybe
+import qualified Data.Text as Text
+import qualified Data.Text.Encoding as Text
+import Data.Text (Text)
+import Data.Word
+import Data.Text.Prettyprint.Doc (pretty)
+
+import Glean.Angle.Lexer
+import Glean.Schema.Util
+import Glean.Types hiding (Query, Nat)
+import Glean.Angle.Types as Schema
+}
+
+%tokentype { Located Token }
+%token
+  'bool'        { L _ (Token _ T_Bool) }
+  'byte'        { L _ (Token _ T_Byte) }
+  'derive'      { L _ (Token _ T_Derive) }
+  'default'     { L _ (Token _ T_Default) }
+  'enum'        { L _ (Token _ T_Enum) }
+  'import'      { L _ (Token _ T_Import) }
+  'maybe'       { L _ (Token _ T_Maybe) }
+  'nat'         { L _ (Token _ T_Nat) }
+  'predicate'   { L _ (Token _ T_Predicate) }
+  'schema'      { L _ (Token _ T_Schema) }
+  'set'         { L _ (Token _ T_Set) }
+  'elements'    { L _ (Token _ T_Elements) }
+  'all'         { L _ (Token _ T_All) }
+  'string'      { L _ (Token _ T_String) }
+  'stored'      { L _ (Token _ T_Stored) }
+  'type'        { L _ (Token _ T_Type) }
+  'where'       { L _ (Token _ T_QueryDef) }
+  'evolves'     { L _ (Token _ T_Evolves) }
+  'never'       { L _ (Token _ T_Never) }
+  'if'          { L _ (Token _ T_If) }
+  'then'        { L _ (Token _ T_Then) }
+  'else'        { L _ (Token _ T_Else) }
+  '++'          { L _ (Token _ T_Append) }
+  '..'          { L _ (Token _ T_DotDot) }
+  '->'          { L _ (Token _ T_RightArrow) }
+  ','           { L _ (Token _ T_Comma) }
+  '|'           { L _ (Token _ T_Bar) }
+  ':'           { L _ (Token _ T_Colon) }
+  ';'           { L _ (Token _ T_Semi) }
+  '('           { L _ (Token _ T_LeftParen) }
+  ')'           { L _ (Token _ T_RightParen) }
+  '['           { L _ (Token _ T_LeftSquare) }
+  ']'           { L _ (Token _ T_RightSquare) }
+  '{'           { L _ (Token _ T_LeftCurly) }
+  '}'           { L _ (Token _ T_RightCurly) }
+  '='           { L _ (Token _ T_Equals) }
+  '!'           { L _ (Token _ T_Negate) }
+  '!=='         { L _ (Token _ T_NotEquals) }
+  '!='          { L _ (Token _ T_NotEqualsSingle) }
+  '>'           { L _ (Token _ T_GreaterThan) }
+  '>='          { L _ (Token _ T_GreaterThanOrEquals) }
+  '<'           { L _ (Token _ T_LessThan) }
+  '<='          { L _ (Token _ T_LessThanOrEquals) }
+  '+'           { L _ (Token _ T_Plus) }
+  '_'           { L _ (Token _ T_Underscore) }
+  '$'           { L _ (Token _ T_Dollar) }
+  '.*'          { L _ (Token _ T_DotStar) }
+
+  SELECT_       { L _ (Token _ (T_Select _)) }
+  SELECTALT_    { L _ (Token _ (T_SelectAlt _)) }
+  UIDENT_       { L _ (Token _ (T_UIdent _)) }
+  LIDENT_       { L _ (Token _ (T_LIdent _)) }
+  QIDENT_       { L _ (Token _ (T_QIdent _)) }
+  STRING_       { L _ (Token _ (T_StringLit _)) }
+  NAT_          { L _ (Token _ (T_NatLit _)) }
+
+
+%name query query
+%name schema schemas
+%name type_ type
+%monad { P }
+%lexer { lexer } { L _ (Token _ T_EOF)}
+%error { parseError }
+%expect 0
+
+%%
+
+query :: { SourceQuery }
+query
+  : pattern 'where' seplist_(statement,';') { SourceQuery (Just $1) $3 Ordered }
+  | seplist_(statement,';')  { SourceQuery Nothing $1 Ordered }
+
+statement :: { SourceStatement }
+statement
+  : pattern '=' pattern  { SourceStatement $1 $3 }
+  | pattern              { SourceStatement (Wildcard $ sspan $1) $1 }
+
+pattern :: { SourcePat }
+pattern
+  : gen '++' pattern { OrPattern (s $1 $3) $1 $3 } -- deprecated syntax
+  | gen '|' pattern  { OrPattern (s $1 $3) $1 $3 }
+  | '!' gen          { Negation (s $1 $2) $2 }
+  | 'if' pattern
+    'then' pattern
+    'else' pattern   { IfPattern (s $1 $6) $2 $4 $6 }
+  | gen              { $1 }
+
+gen :: { SourcePat }
+gen
+  : op { $1 }
+  | op ':' type    { TypeSignature (s $1 $3) $1 (lval $3) }
+
+op :: { SourcePat }
+op
+  : plus  { $1 }
+  | plus '!=' plus   { App (s $1 $3) (Variable (sspan $2) "prim.neExpr") [$1, $3] }
+  | plus '!==' plus  { App (s $1 $3) (Variable (sspan $2) "prim.neNat") [$1, $3] }
+  | plus '>' plus    { App (s $1 $3) (Variable (sspan $2) "prim.gtNat") [$1, $3] }
+  | plus '>=' plus   { App (s $1 $3) (Variable (sspan $2) "prim.geNat") [$1, $3] }
+  | plus '<' plus    { App (s $1 $3) (Variable (sspan $2) "prim.ltNat") [$1, $3] }
+  | plus '<=' plus   { App (s $1 $3) (Variable (sspan $2) "prim.leNat") [$1, $3] }
+  | kv '[' '..' ']'  { ElementsOfArray (s $1 $4) $1 }
+    -- NB. kv to resolve shift-reduce conflict
+
+plus :: { SourcePat }
+plus
+  : plus '+' app  { App (s $1 $3) (Variable (sspan $2) "prim.addNat") [$1, $3] }
+  | app  { $1 }
+
+app :: { SourcePat }
+app
+  : list1(kv)  { case $1 of [f] -> f; f:args -> App (s f $ last args) f args }
+  | 'elements' kv { Elements (s $1 $2) $2 }
+  | 'all' kv { All (s $1 $2) $2 }
+
+-- K -> V binds tighter than application, so that e.g.
+--   p K -> V
+-- can be used to match facts of the functional predicate p.
+kv :: { SourcePat }
+kv
+  : select '->' select  { KeyValue (s $1 $3) $1 $3 }
+  | select  { $1 }
+
+select :: { SourcePat }
+select
+  : select SELECT { FieldSelect (s $1 $2) $1 (lval $2) Record }
+  | select SELECTALT { FieldSelect (s $1 $2) $1 (lval $2) Sum }
+  | select '.*' { Deref (s $1 $2) $1 }
+  | apat  { $1 }
+
+apat :: { SourcePat }
+apat
+  : NAT                             { Nat (sspan $1) (lval $1) }
+  | STRING                          { String (sspan $1) (lval $1) }
+  | STRING '..'                     { StringPrefix (s $1 $2) (lval $1) }
+  | '$' NAT                         { FactId (s $1 $2) Nothing (lval $2)  }
+  | '$' var NAT                     { FactId (s $1 $3) (Just $ lval $2) (lval $3) }
+  | '[' seplist0(pattern,',') ']'   { Array (s $1 $3) $2 }
+  | '[' seplist__(pattern,',') '..' ']'  { ArrayPrefix (s $1 $4) (let (h:t) = $2 in h:|t) }
+  | '{' seplist2(pattern,',') '}'   { Tuple (s $1 $3) $2 }
+  | '{' seplist0_(field,',') '}'    { Struct (s $1 $3) $2 }
+  | '_'                             { Wildcard (sspan $1) }
+  | var                             { Variable (sspan $1) (lval $1) }
+  | lident                          { Enum (sspan $1) (lval $1) }
+  | 'never'                         { Never (sspan $1) }
+  | '(' query ')'                   { nestedQuery (s $1 $3) $2 }
+
+field :: { Field SrcSpan SrcSpan SourceRef SourceRef }
+field
+  : fieldname '=' pattern  { Field $1 $3 }
+
+var :: { Located Text }
+var
+  : qident { $1 }
+  | uident { $1 }
+
+lident :: { Located Text }
+lident : LIDENT  { fmap Text.decodeUtf8 $1 }
+
+uident :: { Located Text }
+uident : UIDENT  { fmap Text.decodeUtf8 $1 }
+
+qident :: { Located Text }
+qident : QIDENT  { fmap Text.decodeUtf8 $1 }
+
+UIDENT :: { Located ByteString }
+UIDENT : UIDENT_ { let L span (Token _ (T_UIdent val)) = $1 in L span val }
+
+LIDENT :: { Located ByteString }
+LIDENT : LIDENT_ { let L span (Token _ (T_LIdent val)) = $1 in L span val }
+
+QIDENT :: { Located ByteString }
+QIDENT : QIDENT_ { let L span (Token _ (T_QIdent val)) = $1 in L span val }
+
+STRING :: { Located Text }
+STRING : STRING_ { let L span (Token _ (T_StringLit val)) = $1 in L span val }
+
+SELECT :: { Located Text }
+SELECT : SELECT_ {
+  let L span (Token _ (T_Select val)) = $1 in
+  L span (Text.decodeUtf8 val) }
+
+SELECTALT :: { Located Text }
+SELECTLAT : SELECTALT_ {
+  let L span (Token _ (T_SelectAlt val)) = $1 in
+  L span (Text.decodeUtf8 val) }
+
+NAT :: { Located Word64 }
+NAT : NAT_ { let L span (Token _ (T_NatLit val)) = $1 in L span val }
+
+-- -----------------------------------------------------------------------------
+-- Schema
+
+schemas :: { [Either Schema.SourceEvolves Schema.SourceSchema] }
+schemas
+  : schemas schemadef { Right $2 : $1 }
+  | schemas evolves { Left $2 : $1 }
+  | {- empty -}  { [] }
+
+evolves :: { Schema.SourceEvolves }
+evolves
+  : 'schema' qname 'evolves' qname
+    { Schema.SourceEvolves (s $1 $4) (lval $2) (lval $4) }
+
+schemadef :: { Schema.SourceSchema }
+schemadef
+  : 'schema' qname inherit '{' list(schemadecl) '}'
+    { Schema.SourceSchema (lval $2) $3 (concat $5) (s $1 $6) }
+
+inherit :: { [SourceRef] }
+inherit
+  : ':' seplist_(qname, ',')  { map lval $2 }
+  | {- empty -}  { [] }
+
+schemadecl :: { [Schema.SourceDecl] }
+schemadecl
+  : 'import' qname  { [Schema.SourceImport (lval $2) (sspan $2)] }
+  | typedef  { [$1] }
+  | predicate  { $1 }
+  | derivedecl  { [$1] }
+
+predicate :: { [Schema.SourceDecl] }
+predicate
+  : 'predicate' predicatename ':' type optval maybe(deriving)
+    { let ref = parseRef $2 in
+      Schema.SourcePredicate Schema.PredicateDef
+        { predicateDefRef = ref
+        , predicateDefKeyType = lval $4
+        , predicateDefValueType = $5
+        , predicateDefDeriving = Schema.NoDeriving
+        , predicateDefSrcSpan = case $6 of
+            Just d -> s $1 d
+            _ -> s $1 $4 }
+        : case $6 of
+            Just d -> [Schema.SourceDeriving $ Schema.DerivingDef ref (lval d) (sspan d)]
+            Nothing -> []
+
+    }
+
+deriving :: { Located Schema.SourceDerivingInfo }
+deriving
+  : {- empty -} query { L (sspan $1) $ Schema.Derive Schema.DeriveOnDemand $1 }
+  | derivewhen query {L (s $1 $2) $  Schema.Derive (lval $1) $2 }
+
+derivewhen :: { Located Schema.DeriveWhen }
+derivewhen
+  : 'stored'  { L (sspan $1)  Schema.DerivedAndStored }
+  | 'default'  { % ifVersionOrOlder (AngleVersion 11) $1 (L (sspan $1) Schema.DeriveIfEmpty) }
+
+
+derivedecl :: { Schema.SourceDecl }
+derivedecl
+  : 'derive' qname deriving  { Schema.SourceDeriving
+    Schema.DerivingDef {
+      derivingDefRef = (lval $2)
+      , derivingDefDeriveInfo = lval $3
+      , derivingDefSrcSpan = s $1 $3 }
+    }
+
+optval :: { Schema.SourceType }
+optval
+  : {- empty -} { unit }
+  | '->' type { lval $2 }
+
+type :: { Located Schema.SourceType }
+type
+  : 'byte'                                  { L (sspan $1)   Schema.ByteTy }
+  | 'nat'                                   { L (sspan $1)   Schema.NatTy }
+  | 'string'                                { L (sspan $1)   Schema.StringTy }
+  | '[' type ']'                            { L (s $1 $3)  $ Schema.ArrayTy (lval $2) }
+  | '{' seplist0_(fielddef, ',') '}'        { L (s $1 $3)  $ Schema.RecordTy $2 }
+  | '{' fielddef '|' '}'                    { L (s $1 $4)  $ Schema.SumTy [$2] }
+  | '{' seplist2_(fielddef, '|')  '}'       { L (s $1 $3)  $ Schema.SumTy $2 }
+  | 'set' type                              { L (s $1 $2)  $ Schema.SetTy (lval $2) }
+  | 'enum' '{' seplist_(fieldname, '|') '}' { L (s $1 $4)  $ Schema.EnumeratedTy $3 }
+  | qname                                   { L (sspan $1) $ Schema.PredicateTy (sspan $1) (lval $1) }
+     -- resolved to typedef/predicate later
+  | 'maybe' type                            { L (s $1 $2)  $ Schema.MaybeTy (lval $2) }
+  | 'bool'                                  { L (sspan $1) $ Schema.BooleanTy }
+  | '(' type ')'                            { L (s $1 $3)  $ lval $2 }
+
+fielddef :: { Schema.SourceFieldDef }
+fielddef
+  : fieldname ':' type { Schema.FieldDef $1 (lval $3) }
+  | fieldname  { Schema.FieldDef $1 unit }
+
+predicatename :: { Name }
+predicatename
+  : fieldname { $1 }
+  | qident { lval $1 }
+
+-- Allow keywords to be used as fieldnames
+fieldname :: { Name }
+fieldname
+  : lident  { lval $1 }
+  | uident  { lval $1 } -- we want to deprecate this
+  | 'bool'  { "bool" }
+  | 'byte'  { "byte" }
+  | 'enum'  { "enum" }
+  | 'import'  { "import" }
+  | 'maybe'  { "maybe" }
+  | 'nat'  { "nat" }
+  | 'predicate'  { "predicate" }
+  | 'schema'  { "schema" }
+  | 'string'  { "string" }
+  | 'type'  { "type" }
+  | 'where'  { "where" }
+
+typedef :: { Schema.SourceDecl }
+typedef
+  : 'type' predicatename '=' type
+    { Schema.SourceType Schema.TypeDef
+        { typeDefRef = parseRef $2
+        , typeDefType = lval $4
+        , typeDefSrcSpan = s $1 $4 }
+    }
+
+qname :: { Located SourceRef }
+qname
+  : uident { fmap parseRef $1 }
+  | qident { fmap parseRef $1 }
+  | lident { fmap parseRef $1 } -- probably shouldn't be allowed
+
+-- -----------------------------------------------------------------------------
+-- Utils
+
+-- Optional item
+maybe(p)
+  : {- empty -}  { Nothing }
+  | p  { Just $1 }
+
+-- List with no separator
+list(p)
+  : {- empty -} { [] }
+  | p list(p) { $1 : $2 }
+
+-- List with no separator, >=1 elements
+list1(p)
+  : p  { [$1] }
+  | p list1(p) { $1 : $2 }
+
+-- List with a separator, >=1 elements
+seplist(p,sep)
+  : p sep seplist(p,sep) { $1 : $3 }
+  | p { [$1] }
+
+-- List with a separator, >=0 elements
+seplist0(p,sep)
+  : {- empty -} { [] }
+  | seplist(p,sep) { $1 }
+
+-- List with a separator, >=2 elements
+seplist2(p,sep)
+  : p sep seplist(p,sep) { $1 : $3 }
+
+-- List with a separator, >=1 elements, optional final separator
+seplist_(p,sep)
+  : p sep seplist_(p,sep) { $1 : $3 }
+  | p maybe(sep) { [$1] }
+
+-- List with a separator, >=0 elements, optional final separator
+seplist0_(p,sep)
+  : {- empty -} { [] }
+  | seplist_(p,sep) { $1 }
+
+-- List with a separator, >=2 elements, optional final separator
+seplist2_(p,sep)
+  : p sep seplist_(p,sep) { $1 : $3 }
+
+-- List with a separator, >=1 elements, mandatory final separator
+seplist__(p,sep)
+  : p sep seplist__(p,sep) { $1 : $3 }
+  | p sep { [$1] }
+
+-- List with a separator, >= 1 elements.
+-- The span of the elements is also returned.
+seplistSpan(p,sep)
+  : p sep seplistSpan(p,sep) { (sspan $1, $1) : $3 }
+  | p { [(sspan $1, $1)] }
+
+-- List with a separator, >=0 elements.
+-- The span of the elements is also returned.
+seplistSpan0(p,sep)
+  : {- empty -} { [] }
+  | seplistSpan(p,sep) { $1 }
+
+{
+parseQuery :: ByteString -> Either String SourceQuery
+parseQuery bs = runAlex (LB.fromStrict bs) $ query
+
+parseType :: ByteString -> Either String Schema.SourceType
+parseType bs = runAlex (LB.fromStrict bs) $ fmap lval type_
+
+parseQueryWithVersion
+  :: AngleVersion
+  -> ByteString
+  -> Either String SourceQuery
+parseQueryWithVersion ver bs =
+  runAlex (LB.fromStrict bs) (setVersion ver >> query)
+
+parseSchema :: ByteString -> Either String Schema.SourceSchemas
+parseSchema bs = parseSchemaWithVersion ver rest
+  where (ver, rest) = stripAngleVersion bs
+
+stripAngleVersion :: ByteString -> (AngleVersion, ByteString)
+stripAngleVersion bs
+  | Just bs1 <- B.stripPrefix "version: " (B.dropWhile isSpace bs)
+  , Just (ver, bs2) <- B.readInt bs1 = (Schema.AngleVersion ver, bs2)
+  | otherwise = (latestAngleVersion, bs)
+  -- if the header is omitted, assume we are using the latest version
+
+parseSchemaWithVersion
+  :: AngleVersion
+  -> ByteString
+  -> Either String Schema.SourceSchemas
+parseSchemaWithVersion ver bs =
+  runAlex (LB.fromStrict bs) $ do
+    setVersion ver
+    (srcEvolves, srcSchemas) <- partitionEithers <$> schema
+    return Schema.SourceSchemas
+      { srcAngleVersion = ver
+      , srcSchemas = reverse srcSchemas
+      , srcEvolves = reverse srcEvolves
+      }
+
+type P a = Alex a
+
+class HasSpan a where
+  sspan :: a -> SrcSpan
+instance HasSpan (Located a) where
+  sspan (L span _) = span
+instance HasSpan (SourcePat_ SrcSpan SrcSpan a b) where
+  sspan = sourcePatSpan
+instance HasSpan (SourceStatement_ SrcSpan SrcSpan p t) where
+  sspan (SourceStatement p1 p2) = s p1 p2
+instance HasSpan (SourceQuery_ SrcSpan SrcSpan p t) where
+  sspan (SourceQuery Nothing stmts _) = s (head stmts) (last stmts)
+  sspan (SourceQuery (Just pat) stmts _) = s pat (last stmts)
+
+s :: (HasSpan a, HasSpan b) => a -> b -> SrcSpan
+s from to = spanBetween (sspan from) (sspan to)
+
+-- | Located between two items
+lbetween :: Located a -> Located b -> c -> Located c
+lbetween (L from _) (L to _) = L (spanBetween from to)
+
+invalid :: SourcePat
+invalid = Nat invalidSrcSpan (fromIntegral iNVALID_ID)
+  where
+    invalidSrcSpan = SrcSpan invalidLoc invalidLoc
+    invalidLoc = SrcLoc (-1) (-1)
+
+parseError :: Located Token -> P a
+parseError (L (SrcSpan loc _) (Token b t)) = do
+  filename <- getFile
+  alexError $
+    show (pretty loc) <> "\n" <>
+    (if null filename then "" else filename <> ": ")
+    <> "parse error at: "
+    <> case t of
+      T_EOF -> "end of string"
+      _ -> LB.unpack b
+
+-- | Smart constructor for NestedQuery
+nestedQuery :: SrcSpan -> SourceQuery -> SourcePat
+nestedQuery _s (SourceQuery Nothing [SourceStatement (Wildcard _) pat] _) = pat
+nestedQuery s q = NestedQuery s q
+
+-- Accept older constructs for backwards-compability only when we're
+-- parsing the appropriate version(s) of the syntax.
+ifVersionOrOlder :: AngleVersion -> Located Token -> a -> Alex a
+ifVersionOrOlder v tok r = do
+  thisVer <- getVersion
+  when (thisVer > v) $ parseError tok
+  return r
+}
diff --git a/glean/angle/Glean/Angle/Types.hs b/glean/angle/Glean/Angle/Types.hs
new file mode 100644
--- /dev/null
+++ b/glean/angle/Glean/Angle/Types.hs
@@ -0,0 +1,1216 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+{-# LANGUAGE DerivingStrategies #-}
+{-# LANGUAGE DeriveFunctor #-}
+{-# LANGUAGE DeriveFoldable  #-}
+{-# LANGUAGE DeriveAnyClass  #-}
+{-# OPTIONS_GHC -Wno-orphans -Wno-star-is-type #-}
+
+-- | Types representing a source-level schema
+module Glean.Angle.Types
+  ( -- * Names and references
+    Name
+  , FieldName
+  , Version
+  , PredicateRef(..)
+  , TypeRef(..)
+  , PredicateId(..)
+  , tempPredicateId
+  , TypeId(..)
+
+  -- * Source locations
+  , IsSrcSpan(..)
+  , SrcSpan(..)
+  , SrcLoc(..)
+  , rmLocSchemas
+  , rmLocSchema
+  , rmLocEvolves
+  , rmLocDecl
+  , rmLocQuery
+  , rmLocStatement
+  , rmLocPat
+  , rmLocField
+  , rmLocTypeDef
+  , rmLocType
+  , rmLocPredDef
+  , rmTypeLocPredDef
+
+  -- * Types
+  , Type_(..)
+  , RecordOrSum(..)
+
+  -- * Queries
+  , SourceQuery_(..)
+  , Ordered(..)
+  , SourceStatement_(..)
+  , SourcePat_(..)
+  , PrimOp(..)
+  , SeekSection(..)
+
+  -- * Schemas and definitions
+  , DerivingDef_(..)
+  , TypeDef_(..)
+  , FieldDef_(..)
+  , PredicateDef_(..)
+  , Statement_
+  , Query_
+  , Type
+  , FieldDef
+  , TypeDef
+  , Field(..)
+  , IsWild(..)
+  , tupleField
+  , sourcePatSpan
+  , spanBetween
+  , PredicateDef
+  , DerivingInfo(..)
+  , DeriveWhen(..)
+  , SourceSchema
+  , SourceSchemas
+  , SourceEvolves
+  , SourceDecl
+  , SourceRef(..)
+  , SourceType
+  , SourceFieldDef
+  , SourceTypeDef
+  , SourcePredicateDef
+  , SourceDerivingInfo
+  , SourcePat
+  , SourceStatement
+  , SourceQuery
+  , SourcePat'
+  , SourceStatement'
+  , SourceQuery'
+  , SourceDerivingInfo'
+  , DerivingDef'
+  , SourceType'
+  , Type'
+  , FieldDef'
+  , PredicateDef'
+  , SourceSchemas_(..)
+  , SourceEvolves_(..)
+  , SourceSchema_(..)
+  , SourceDecl_(..)
+
+  -- * Versions of the Angle syntax
+  , AngleVersion(..)
+  , latestAngleVersion
+  , latestSupportedAngleVersion
+
+  -- * Pretty printing
+  , displayStatement
+
+  -- * Description
+  , Describe(..)
+  ) where
+
+import qualified Data.Aeson as Aeson
+import Data.Binary
+import Data.ByteString (ByteString)
+import qualified Data.ByteString.Lazy as BL
+import Data.Hashable
+import Data.List
+import Data.List.NonEmpty (NonEmpty, toList)
+import Data.Map (Map)
+import qualified Data.Map as Map
+import Data.Text (Text)
+import qualified Data.Text.Encoding as Text
+import Compat.Prettyprinter
+import Data.Bifunctor
+import Data.Bifoldable
+import GHC.Generics
+
+import Glean.Angle.Hash
+import Glean.Display
+import Glean.Types (PredicateRef(..), TypeRef(..), Version)
+
+
+-- -----------------------------------------------------------------------------
+-- Names and references
+
+type Name = Text
+
+type FieldName = Text
+
+-- | A reference to a name or type in a source schema. Versions are
+-- often omitted at this level, and will be later resolved by
+-- resolveSchema.
+data SourceRef = SourceRef
+  { sourceRefName :: Name
+  , sourceRefVersion :: Maybe Version
+  }
+  deriving (Show, Eq, Ord, Generic, Hashable)
+
+instance Binary SourceRef
+
+-- -----------------------------------------------------------------------------
+-- Source locations
+
+-- | A 'SrcSpan' delimits a portion of a text file.
+-- The end position is the column /after/ the end of the span.
+-- That is, a span of (1,1)-(1,2) is one character long, and a span of
+-- (1,1)-(1,1) is zero characters long.
+data SrcSpan = SrcSpan
+  { spanStart :: {-# UNPACK #-} !SrcLoc -- inclusive
+  , spanEnd   :: {-# UNPACK #-} !SrcLoc -- exclusive
+  }
+  deriving (Eq, Show)
+
+-- | A point in a source text file.
+data SrcLoc = SrcLoc
+  { locLine :: {-# UNPACK #-} !Int
+  , locCol  :: {-# UNPACK #-} !Int
+  }
+  deriving (Show, Eq)
+
+-- -----------------------------------------------------------------------------
+-- Queries
+
+data SourceQuery_ s st p t = SourceQuery
+  { srcQueryHead :: Maybe (SourcePat_ s st p t)
+  , srcQueryStmts :: [SourceStatement_ s st p t]
+  , srcQueryOrdered :: Ordered
+  }
+  deriving (Eq, Show, Generic, Functor)
+
+data Ordered = Ordered | Unordered
+  deriving (Eq, Show, Generic)
+
+instance Binary Ordered
+
+instance (Binary p, Binary t) => Binary (SourceQuery_ () () p t)
+
+instance Bifunctor (SourceQuery_ s st) where
+  bimap f g (SourceQuery h s o) =
+    SourceQuery (fmap (bimap f g) h) (fmap (bimap f g) s) o
+
+instance Bifoldable (SourceQuery_ s st ) where
+  bifoldMap f g (SourceQuery h s _) =
+    foldMap (bifoldMap f g) h <> foldMap (bifoldMap f g) s
+
+data SourceStatement_ s st p t =
+  SourceStatement (SourcePat_ s st p t) (SourcePat_ s st p t)
+  deriving (Eq, Show, Generic, Functor)
+
+instance (Binary p, Binary t) => Binary (SourceStatement_ () () p t)
+
+instance Bifunctor (SourceStatement_ s st) where
+  bimap f g (SourceStatement l r) = SourceStatement (bimap f g l) (bimap f g r)
+
+instance Bifoldable (SourceStatement_ s st) where
+  bifoldMap f g (SourceStatement l r) = bifoldMap f g l <> bifoldMap f g r
+
+data SourcePat_ s st p t
+  = Nat s Word64
+  | String s Text
+  | StringPrefix s Text
+  | ByteArray s ByteString
+    -- ^ There's no concrete syntax for this (yet), but it can be used
+    -- via the DSL.
+  | Array s [SourcePat_ s st p t]
+  | ArrayPrefix s (NonEmpty (SourcePat_ s st p t))
+  | Tuple s [SourcePat_ s st p t]
+  | Struct s [Field s st p t]
+  | App s (SourcePat_ s st p t) [SourcePat_ s st p t]
+  | KeyValue s (SourcePat_ s st p t) (SourcePat_ s st p t)
+  | Elements s (SourcePat_ s st p t)
+  | All s (SourcePat_ s st p t)
+  | Wildcard s
+  | Variable s Name
+  | ElementsOfArray s (SourcePat_ s st p t)
+  | OrPattern s (SourcePat_ s st p t) (SourcePat_ s st p t)
+  | NestedQuery s (SourceQuery_ s st p t)
+  | Negation s (SourcePat_ s st p t)
+  | FactId s (Maybe Text) Word64
+  | TypeSignature s (SourcePat_ s st p t) (Type_ st p t)
+  | Never s
+  | IfPattern
+      { span :: s
+      , cond :: SourcePat_ s st p t
+      , then_ :: SourcePat_ s st p t
+      , else_ :: SourcePat_ s st p t
+      }
+  | FieldSelect s (SourcePat_ s st p t) FieldName RecordOrSum
+  | Deref s (SourcePat_ s st p t)
+  | Enum s Text
+
+  -- The following forms are introduced by the resolver, and replace
+  -- the Variable and App forms produced by the parser.
+  | Clause s s p (SourcePat_ s st p t) SeekSection
+  | Prim s PrimOp [SourcePat_ s st p t]
+ deriving (Eq, Show, Generic, Functor)
+
+-- | Should a `seek` call be restricted to a section of the database?
+--
+-- When performing a query over a stacked database we have three levels
+--  * base db
+--  * stacked db
+--  * writable FactSet
+--
+-- The writable FactSet is there to store facts from derived predicates
+-- generated during the querying.
+--
+-- This type specifies which of these sections should be be covered in a seek.
+data SeekSection
+  = SeekOnAllFacts -- ^ base + stacked + writable
+  | SeekOnBase -- ^ base only
+  | SeekOnStacked -- ^ stacked only
+  deriving (Eq, Show, Generic)
+
+instance Binary SeekSection
+
+instance (Binary p, Binary t) => Binary (SourcePat_ () () p t)
+
+instance Bifunctor (SourcePat_ s st) where
+  bimap f g pat = case pat of
+    Nat s w -> Nat s w
+    String s t -> String s t
+    StringPrefix s t -> StringPrefix s t
+    ByteArray s t -> ByteArray s t
+    Array s pats -> Array s (fmap (bimap f g) pats)
+    ArrayPrefix s pats -> ArrayPrefix s (fmap (bimap f g) pats)
+    Tuple s pats -> Tuple s (map (bimap f g) pats)
+    Struct s fields -> Struct s (map (bimap f g) fields)
+    App s l r -> App s (bimap f g l) (map (bimap f g) r)
+    KeyValue s k v -> KeyValue s (bimap f g k) (bimap f g v)
+    Elements s pat -> Elements s (bimap f g pat)
+    All s query -> All s (bimap f g query)
+    Wildcard s -> Wildcard s
+    Variable s n -> Variable s n
+    ElementsOfArray s pat -> ElementsOfArray s (bimap f g pat)
+    OrPattern s l r -> OrPattern s (bimap f g l) (bimap f g r)
+    NestedQuery s (SourceQuery head stmts ord) ->
+      NestedQuery s (SourceQuery (fmap (bimap f g) head)
+        (fmap (bimap f g) stmts) ord)
+    Negation s pat -> Negation s (bimap f g pat)
+    FactId s n w -> FactId s n w
+    TypeSignature s pat ty -> TypeSignature s (bimap f g pat) (bimap f g ty)
+    Never s -> Never s
+    IfPattern s a b c -> IfPattern s (bimap f g a) (bimap f g b) (bimap f g c)
+    FieldSelect s pat field q -> FieldSelect s (bimap f g pat) field q
+    Deref s pat -> Deref s (bimap f g pat)
+    Enum s f -> Enum s f
+    Clause sPat sPred p pat rng -> Clause sPat sPred (f p) (bimap f g pat) rng
+    Prim s p pats -> Prim s p (fmap (bimap f g) pats)
+
+instance Bifoldable (SourcePat_ s st) where
+  bifoldMap f g = \case
+    Nat{} -> mempty
+    String{} -> mempty
+    StringPrefix{} -> mempty
+    ByteArray{} -> mempty
+    Array _ pats -> foldMap (bifoldMap f g) pats
+    ArrayPrefix _ pats -> foldMap (bifoldMap f g) pats
+    Tuple _ pats -> foldMap (bifoldMap f g) pats
+    Struct _ fields -> foldMap (bifoldMap f g) fields
+    App _ l r -> foldMap (bifoldMap f g) (l:r)
+    KeyValue _ k v -> bifoldMap f g k <> bifoldMap f g v
+    Elements _ pat -> bifoldMap f g pat
+    All _ query -> bifoldMap f g query
+    Wildcard{} -> mempty
+    Variable{} -> mempty
+    ElementsOfArray _ pat -> bifoldMap f g pat
+    OrPattern _ l r -> bifoldMap f g l <> bifoldMap f g r
+    NestedQuery _ (SourceQuery head stmts _) ->
+      foldMap (bifoldMap f g) head <> foldMap (bifoldMap f g) stmts
+    Negation _ pat -> bifoldMap f g pat
+    FactId{} -> mempty
+    TypeSignature _ pat ty -> bifoldMap f g pat <> bifoldMap f g ty
+    Never{} -> mempty
+    IfPattern _ a b c -> bifoldMap f g a <> bifoldMap f g b <> bifoldMap f g c
+    FieldSelect _ pat _ _ -> bifoldMap f g pat
+    Deref _ pat -> bifoldMap f g pat
+    Enum _ _ -> mempty
+    Clause _ _ p pat _ -> f p <> bifoldMap f g pat
+    Prim _ _ pats -> foldMap (bifoldMap f g) pats
+
+data Field s st p t = Field FieldName (SourcePat_ s st p t)
+  deriving (Eq, Show, Generic, Functor)
+
+instance (Binary p, Binary t) => Binary (Field () () p t)
+
+instance Bifunctor (Field s st) where
+  bimap f g (Field n pat) = Field n (bimap f g pat)
+
+instance Bifoldable (Field s st) where
+  bifoldMap f g (Field _ pat) = bifoldMap f g pat
+
+-- | Primitive operations
+data PrimOp
+  = PrimOpToLower
+  | PrimOpLength
+  | PrimOpZip
+  | PrimOpConcat
+  | PrimOpReverse
+  | PrimOpSize
+  | PrimOpRelToAbsByteSpans
+  | PrimOpUnpackByteSpans
+  | PrimOpGtNat
+  | PrimOpGeNat
+  | PrimOpLtNat
+  | PrimOpLeNat
+  | PrimOpNeNat
+  | PrimOpAddNat
+  | PrimOpNeExpr
+  deriving (Eq, Show, Generic)
+
+instance Binary PrimOp
+
+sourcePatSpan :: SourcePat_ s st p t -> s
+sourcePatSpan = \case
+  Nat s _ -> s
+  String s _ -> s
+  StringPrefix s _ -> s
+  ByteArray s _ -> s
+  Array s _ -> s
+  ArrayPrefix s _ -> s
+  Tuple s _ -> s
+  Struct s _ -> s
+  App s _ _ -> s
+  KeyValue s _ _ -> s
+  Elements s _ -> s
+  All s _ -> s
+  Wildcard s -> s
+  Variable s _ -> s
+  ElementsOfArray s _ -> s
+  OrPattern s _ _ -> s
+  IfPattern s _ _ _ -> s
+  NestedQuery s _ -> s
+  Negation s _ -> s
+  FactId s _ _ -> s
+  TypeSignature s _ _ -> s
+  Never s -> s
+  FieldSelect s _ _ _ -> s
+  Deref s _ -> s
+  Enum s _ -> s
+  Clause s _ _ _ _ -> s
+  Prim s _ _ -> s
+
+-- -----------------------------------------------------------------------------
+-- Types
+
+-- | A Glean Type
+data Type_ srcspan pref tref
+  -- Native types
+  = ByteTy
+  | NatTy
+  | StringTy
+  | ArrayTy (Type_ srcspan pref tref)
+  | RecordTy [FieldDef_ srcspan pref tref]
+  | SumTy [FieldDef_ srcspan pref tref]
+  | SetTy (Type_ srcspan pref tref)
+  | PredicateTy srcspan pref
+  | NamedTy srcspan tref
+
+  -- Derived types. These appear in the source language, but are
+  -- translated into the native types above internally. They also
+  -- act as hints to the code generators, e.g. maybe translates to
+  -- Thrift's optional and enum translates to Thrift's enum.
+  | MaybeTy (Type_ srcspan pref tref)
+    -- maybe T  => { nothing | just : T }
+  | EnumeratedTy [Name]
+    -- enum { a | b } => { a : {}, b : {} }
+  | BooleanTy
+    -- bool => { false : {} | true : {} }
+
+  -- These are used during typechecking only
+  | TyVar {-# UNPACK #-}!Int
+  | HasTy (Map Name (Type_ srcspan pref tref))
+      !(Maybe RecordOrSum) {-# UNPACK #-}!Int
+    -- HasTy { field:type .. } R X
+    --   Constrains X to be a record or sum type containing at least
+    --   the given fields/types. X can only be instantiated
+    --   with a type containing a superset of those fields: either
+    --   a bigger HasTy or a RecordTy/SumTy.
+    --   R is
+    --     Just Record -> type must be a record
+    --     Just Sum -> type must be a sum type
+    --     Nothing -> type can be either a RecordTy or a SumTy
+  | HasKey (Type_ srcspan pref tref) {-# UNPACK #-}!Int
+    -- HasKey K X
+    --   A type variable X that is constrained to be a predicate
+    --   type with key K
+  | ElementsOf (Type_ srcspan pref tref) {-# UNPACK #-}!Int
+    -- ElementsOf T X
+    --   A type variable that is either set T or [T]
+  deriving (Eq, Show, Functor, Foldable, Generic)
+
+data RecordOrSum = Record | Sum
+  deriving (Eq, Show, Generic)
+
+instance Binary RecordOrSum
+
+instance (Binary pref, Binary tref) => Binary (Type_ () pref tref)
+
+instance Bifunctor (Type_ s) where
+  bimap f g = \case
+    ByteTy -> ByteTy
+    NatTy -> NatTy
+    StringTy -> StringTy
+    ArrayTy ty -> ArrayTy $ bimap f g ty
+    RecordTy xs -> RecordTy $ bimap f g <$> xs
+    SumTy xs -> SumTy $ bimap f g <$> xs
+    SetTy ty -> SetTy $ bimap f g ty
+    PredicateTy s pref -> PredicateTy s (f pref)
+    NamedTy s tref -> NamedTy s (g tref)
+    MaybeTy ty -> MaybeTy (bimap f g ty)
+    EnumeratedTy xs -> EnumeratedTy xs
+    BooleanTy -> BooleanTy
+    TyVar x -> TyVar x
+    HasTy m r x -> HasTy (bimap f g <$> m) r x
+    HasKey ty x -> HasKey (bimap f g ty) x
+    ElementsOf ty x -> ElementsOf (bimap f g ty) x
+
+instance Bifoldable (Type_ s) where
+  bifoldr f g r = \case
+    ByteTy -> r
+    NatTy -> r
+    StringTy -> r
+    ArrayTy ty -> bifoldr f g r ty
+    RecordTy xs -> foldr (flip $ bifoldr f g) r xs
+    SumTy xs -> foldr (flip $ bifoldr f g) r xs
+    SetTy ty -> bifoldr f g r ty
+    PredicateTy _ pref -> f pref r
+    NamedTy _ tref -> g tref r
+    MaybeTy ty -> bifoldr f g r ty
+    EnumeratedTy _ -> r
+    BooleanTy -> r
+    TyVar _ -> r
+    HasTy m _ _ -> foldr (flip $ bifoldr f g) r m
+    HasKey ty _ -> bifoldr f g r ty
+    ElementsOf ty _ -> bifoldr f g r ty
+
+{- Note [Types]
+
+There are three main instantiations of `Type_` used throughout
+Glean:
+
+> type SourceType = Type_ SourceRef SourceRef
+
+These are the types from the parser. Predicates and types may be
+unqualified and don't necessarily have versions.
+
+> type Type = Type_ PredicateId TypeId
+
+These are the types after name resolution
+(Glean.Schema.Resolve). Predicates and Types are fully qualified and
+refer to specific hashes.
+
+> type RTS.Type = Type_ PidRef ExpandedType
+
+(see 'Glean.RTS.Type')
+
+These are the types that relate to a particular DB, and are
+constructed when a schema is loaded in `Glean.Database.Schema`.
+
+* Predicates have a particular 'Pid'
+* Named types are expanded (but we can still see them in the AST)
+* A 'RTS.Type' can be converted into a pure representation ('Rep')
+  using 'repType'
+-}
+
+-- -----------------------------------------------------------------------------
+-- Schemas and definitions
+
+data FieldDef_ st pref tref = FieldDef
+  { fieldDefName :: Name
+  , fieldDefType :: Type_ st pref tref
+  }
+  deriving (Eq, Show, Functor, Foldable, Generic)
+
+instance (Binary pref, Binary tref)
+  => Binary (FieldDef_ () pref tref)
+
+instance Bifunctor (FieldDef_ st) where
+  bimap f g (FieldDef n ty)  = FieldDef n $ bimap f g ty
+
+instance Bifoldable (FieldDef_ st) where
+  bifoldMap f g (FieldDef _ ty) = bifoldMap f g ty
+
+tupleField :: Text
+tupleField = "tuplefield"
+
+-- | A definition of a named type
+data TypeDef_ st pref tref = TypeDef
+  { typeDefRef :: tref
+  , typeDefType :: Type_ st pref tref
+  , typeDefSrcSpan :: st
+  }
+  deriving Eq
+
+-- | A definition of a predicate
+data PredicateDef_ s st pref tref = PredicateDef
+  { predicateDefRef :: pref
+  , predicateDefKeyType :: Type_ st pref tref
+  , predicateDefValueType :: Type_ st pref tref
+  , predicateDefDeriving :: DerivingInfo (SourceQuery_ s st pref tref)
+  , predicateDefSrcSpan :: s
+  }
+  deriving Eq
+
+data DerivingDef_ s st pref tref = DerivingDef
+  { derivingDefRef :: pref
+  , derivingDefDeriveInfo :: DerivingInfo (SourceQuery_ s st pref tref)
+  , derivingDefSrcSpan :: s
+  }
+  deriving Eq
+
+-- | Globally unique identifier for a predicate. This is not the same
+-- as a Pid, which is unique only within a particular DB.
+data PredicateId = PredicateId
+  { predicateIdRef :: PredicateRef  -- ^ e.g. python.Name.1
+  , predicateIdHash :: {-# UNPACK #-} !Hash
+  } deriving (Ord, Generic, Show)
+
+instance Hashable PredicateId where
+  hashWithSalt s (PredicateId _ h) = hashFingerprint s h
+
+instance Eq PredicateId where
+  PredicateId _ a == PredicateId _ b = a == b
+
+instance Binary PredicateRef where
+  put (PredicateRef a b) = put a >> put b
+  get = PredicateRef <$> get <*> get
+
+instance Binary PredicateId
+  -- TODO maybe just serialize the hash?
+
+-- | Globally unique identifier for a type.
+data TypeId = TypeId
+  { typeIdRef :: TypeRef -- ^ e.g. python.Declaration.1
+  , typeIdHash :: {-# UNPACK #-} !Hash
+  } deriving (Ord, Generic, Show)
+
+instance Hashable TypeId where
+  hashWithSalt s (TypeId _ h) = hashFingerprint s h
+
+instance Eq TypeId where
+  TypeId _ a == TypeId _ b = a == b
+
+-- Used by query compilation
+tempPredicateId :: PredicateId
+tempPredicateId = PredicateId (PredicateRef "_tmp_" 0) hash0
+
+instance Binary TypeRef where
+  put (TypeRef a b) = put a >> put b
+  get = TypeRef <$> get <*> get
+
+instance Binary TypeId
+  -- TODO maybe just serialize the hash?
+
+-- | How to derive a predicate
+data DerivingInfo q
+  = NoDeriving
+  | Derive DeriveWhen q
+  deriving (Eq, Functor, Foldable, Show, Generic)
+
+instance Binary q => Binary (DerivingInfo q)
+
+data DeriveWhen
+  = DeriveOnDemand
+    -- ^ derived whenever this predicate is queried. Facts of this
+    -- predicate are not expected to be stored in the DB.
+  | DerivedAndStored
+    -- ^ derived eagerly and stored in the DB. By default, queries for
+    -- this predicate will search the DB, just like underived
+    -- predicates.
+  | DeriveIfEmpty
+    -- ^ derived only when the DB has no facts of this predicate.
+    -- This is used to add derivations for backwards compatibility
+    -- during a schema migration.
+  deriving (Eq, Show, Generic)
+
+instance Binary DeriveWhen
+
+-- Source (parsed) abstract syntax
+
+type SourcePat' s st = SourcePat_ s st SourceRef SourceRef
+type SourceStatement' s st = SourceStatement_ s st SourceRef SourceRef
+type SourceQuery' s st = SourceQuery_ s st SourceRef SourceRef
+type SourceDerivingInfo' s = DerivingInfo (SourceQuery' s s)
+type SourcePredicateDef' s = PredicateDef_ s s SourceRef SourceRef
+type SourceTypeDef' s = TypeDef_ s SourceRef SourceRef
+type DerivingDef' s = DerivingDef_ s s SourceRef SourceRef
+type SourceType' st = Type_ st SourceRef SourceRef
+type Type' st = Type_ st PredicateId TypeId
+
+type SourcePat = SourcePat' SrcSpan SrcSpan
+type SourceStatement = SourceStatement' SrcSpan SrcSpan
+type SourceQuery = SourceQuery' SrcSpan SrcSpan
+type SourceType = Type_ SrcSpan SourceRef SourceRef
+type SourceFieldDef = FieldDef_ SrcSpan SourceRef SourceRef
+type SourceTypeDef = TypeDef_ SrcSpan SourceRef SourceRef
+type SourcePredicateDef = SourcePredicateDef' SrcSpan
+type SourceDerivingInfo = SourceDerivingInfo' SrcSpan
+type SourceSchemas = SourceSchemas_ SrcSpan
+type SourceSchema = SourceSchema_ SrcSpan
+type SourceEvolves = SourceEvolves_ SrcSpan
+type SourceDecl = SourceDecl_ SrcSpan
+
+type Statement_ p t = SourceStatement_ SrcSpan SrcSpan p t
+type Query_ p t = SourceQuery_ SrcSpan SrcSpan p t
+
+data SourceEvolves_ s = SourceEvolves
+  { evolvesSpan :: s
+  , evolvesNew :: SourceRef
+  , evolvesOld :: SourceRef
+  }
+  deriving (Eq)
+
+-- | A 'schema' declaration
+data SourceSchema_ s = SourceSchema
+  { schemaName :: SourceRef
+  , schemaInherits :: [SourceRef]
+  , schemaDecls :: [SourceDecl_ s]
+  , schemaSrcSpan :: s
+  }
+  deriving (Eq)
+
+data SourceSchemas_ s = SourceSchemas
+  { srcAngleVersion :: AngleVersion
+  , srcSchemas :: [SourceSchema_ s]
+  , srcEvolves :: [SourceEvolves_ s]
+  }
+  deriving (Eq)
+
+data SourceDecl_ s
+  = SourceImport SourceRef s
+  | SourcePredicate (SourcePredicateDef' s)
+  | SourceType (SourceTypeDef' s)
+  | SourceDeriving (DerivingDef' s)
+  deriving (Eq)
+
+-- Abstract syntax with global Ids
+
+type Type = Type_ SrcSpan PredicateId TypeId
+type FieldDef = FieldDef_ SrcSpan PredicateId TypeId
+type TypeDef = TypeDef_ SrcSpan PredicateId TypeId
+type PredicateDef = PredicateDef_ SrcSpan SrcSpan PredicateId TypeId
+
+type PredicateDef' s st = PredicateDef_ s st PredicateId TypeId
+type FieldDef' st = FieldDef_ st PredicateId TypeId
+
+-- -----------------------------------------------------------------------------
+
+-- | Version of the syntax. This is required so that we can change the
+-- syntax while still allowing DBs that contain a schema with the old
+-- syntax to be understood.
+newtype AngleVersion = AngleVersion Int
+  deriving (Eq, Ord)
+  deriving newtype (Pretty)
+
+-- version 8:
+--   - added set constructs
+-- version 9:
+--   - added dot syntax
+-- version 10:
+--   - optional versions in `import`, `evolves`, inheritance
+-- version 11:
+--   - size primop
+-- version 12:
+--   - remove support for deriving default
+
+latestSupportedAngleVersion :: AngleVersion
+latestSupportedAngleVersion = AngleVersion 5
+
+latestAngleVersion :: AngleVersion
+latestAngleVersion = AngleVersion 12
+
+-- -----------------------------------------------------------------------------
+-- Pretty-printing
+
+instance Display SourceRef where
+  display _ (SourceRef name ver) = pretty name <> case ver of
+    Nothing -> mempty
+    Just ver -> "." <> pretty ver
+
+instance Display PredicateRef where
+  display _ = pretty
+
+instance Display TypeRef where
+  display _ = pretty
+
+instance Display PredicateId where
+  display opts (PredicateId name hash) =
+    case predicateStyle opts of
+      PredicateWithHash -> pretty name <> "." <> pretty (show hash)
+      PredicateWithoutHash -> pretty name
+
+instance Display TypeId where
+  display opts (TypeId name hash) =
+    case predicateStyle opts of
+      PredicateWithHash -> pretty name <> "." <> pretty (show hash)
+      PredicateWithoutHash -> pretty name
+
+instance Display (SourceEvolves_ s) where
+  display opts (SourceEvolves _ new old) =
+    "schema " <> display opts new <> " evolves " <> display opts old
+
+instance (Display pref, Display tref) => Display (Type_ st pref tref) where
+  display _ ByteTy = "byte"
+  display _ NatTy = "nat"
+  display _ StringTy = "string"
+  display opts (ArrayTy ty) = "[" <> display opts ty <> "]"
+  display opts (RecordTy fields) =
+    sep
+      [ nest 2 $ vsep $ "{" :  punctuate "," (map (display opts) fields)
+      , "}" ]
+  display opts (SumTy fields) =
+    sep
+      [ nest 2 $ vsep $ "{" :  map ((<> " |") . display opts) fields
+      , "}" ]
+  display opts (SetTy ty) = "set " <> displayAtom opts ty
+  display opts (PredicateTy _ p) = display opts p
+  display opts (NamedTy _ t) = display opts t
+  display opts (MaybeTy t) = "maybe" <+> displayAtom opts t
+  display _ (EnumeratedTy names) =
+    sep
+      [ nest 2 $ vsep $ "enum {" :  map (<> " |") (map pretty names)
+      , "}" ]
+  display _ BooleanTy = "bool"
+  display _ (TyVar n) = "T" <> pretty n
+  display opts (HasTy m rec x)
+    | Just Sum <- rec =
+    sep
+      [ nest 2 $ vsep $ "{" :  intersperse "|" (map doField (Map.toList m))
+      , "|", "T" <> pretty x, "}" ]
+    | otherwise =
+    sep
+      [ nest 2 $ vsep $ "{" :  map (<> ",") (map doField (Map.toList m))
+      , "T" <> pretty x, "}" ]
+    where
+    doField (n, ty) = pretty n <> " : " <> display opts ty
+  display opts (HasKey ty x) =
+    "T" <> pretty x <> parens (display opts ty)
+  display opts (ElementsOf ty x) =
+    "T" <> pretty x <> brackets (display opts ty)
+  displayAtom opts t = case t of
+    MaybeTy{} -> parens $ display opts t
+    EnumeratedTy{} -> parens $ display opts t
+    SetTy{} -> parens $ display opts t
+    _other -> display opts t
+
+instance (Display pref, Display tref) => Display (FieldDef_ st pref tref) where
+  display opts (FieldDef n ty) = pretty n <> " : " <> displayAtom opts ty
+
+instance (Display pref, Display tref) =>
+    Display (PredicateDef_ s st pref tref) where
+  display opts PredicateDef{..} =
+    hang 2 $ sep $
+      [ "predicate" <+> display opts predicateDefRef <+> ":"
+      , display opts predicateDefKeyType
+      ] ++
+      (case predicateDefValueType of
+         RecordTy [] -> []
+         _other -> [ "->" <+> display opts predicateDefValueType ]) ++
+      (case predicateDefDeriving of
+         Derive DerivedAndStored query -> [ "stored", display opts query ]
+         Derive _ query -> [ display opts query ]
+         _other -> [])
+
+instance (Display pref, Display tref) => Display (TypeDef_ s pref tref) where
+  display opts TypeDef{..} =
+    hang 2 $ sep
+      [ "type" <+> display opts typeDefRef <+> "="
+      , display opts typeDefType
+      ]
+
+instance Display SourceSchemas where
+  display opts SourceSchemas{..} = vcat $
+    ("version:" <+> pretty srcAngleVersion)
+    : map (display opts) srcSchemas <> map (display opts) srcEvolves
+
+instance Display SourceSchema where
+  display opts SourceSchema{..} = vcat
+    [ "schema" <+> display opts schemaName <>
+        case schemaInherits of
+          [] -> mempty
+          _ -> " : " <> hcat (punctuate "," (map (display opts) schemaInherits))
+        <> " {"
+    , vcat (map (display opts) schemaDecls)
+    , "}"
+    ]
+
+instance Display SourceDecl where
+  display opts (SourceImport name _) = "import " <> display opts name
+  display opts (SourcePredicate def) = display opts def
+  display opts (SourceType def) = display opts def
+  display opts (SourceDeriving DerivingDef{..}) =
+    hang 2 $ sep ["derive "
+      <> display opts derivingDefRef, display opts derivingDefDeriveInfo]
+
+instance Display q => Display (DerivingInfo q) where
+  display _ NoDeriving = mempty
+  display opts (Derive DeriveOnDemand q) = display opts q
+  display opts (Derive DerivedAndStored q) = "stored" <+> display opts q
+  display opts (Derive DeriveIfEmpty q) = "default" <+> display opts q
+
+-- ---------------------------------------------------------------------------
+-- Display printing queries
+
+class IsWild pat where
+  isWild :: pat -> Bool
+
+instance IsWild (SourcePat_ s st p t) where
+  isWild Wildcard{} = True
+  isWild _ = False
+
+-- | Types that represent the source location of a term in the AST
+class (Pretty a, Pretty (Loc a)) => IsSrcSpan a where
+  type Loc a :: *
+  startLoc   :: a -> Loc a
+  endLoc     :: a -> Loc a
+  mkSpan     :: Loc a -> Loc a -> a
+
+-- space encompassing from start of first span to end of second.
+spanBetween :: IsSrcSpan a => a -> a-> a
+spanBetween x y = mkSpan (startLoc x) (endLoc y)
+
+instance IsSrcSpan SrcSpan where
+  type Loc SrcSpan = SrcLoc
+  startLoc = spanStart
+  endLoc = spanEnd
+  mkSpan = SrcSpan
+
+instance Display SrcSpan where
+  display opts s =
+    display opts (spanStart s)
+    <> pretty (" - " :: String)
+    <> display opts (spanEnd s)
+
+instance Pretty SrcSpan where
+  pretty = displayDefault
+
+instance Display SrcLoc where
+  display _ (SrcLoc line col) =
+    "line " <> pretty line <> ", column " <> pretty col
+
+instance Pretty SrcLoc where
+  pretty = displayDefault
+
+instance (Display p, Display t) => Pretty (SourcePat_ s st p t) where
+  pretty = displayDefault
+
+instance (Display p, Display t) => Display (SourcePat_ s st p t) where
+  display _ (Nat _ w) = pretty w
+  display _ (String _ str) =
+    pretty (Text.decodeUtf8 (BL.toStrict (Aeson.encode (Aeson.String str))))
+  display opts (StringPrefix s str) =
+    display opts (String s str :: SourcePat_ s st p t) <> ".."
+  display _ (ByteArray _ b) = pretty (show b)
+  display opts (Array _ pats) =
+    brackets $ hsep (punctuate "," (map (display opts) pats))
+  display opts (ArrayPrefix _ pats) =
+    encloseSep "[" ", ..]" "," (map (display opts) $ toList pats)
+  display opts (Tuple _ pats) =
+    braces $ hsep (punctuate "," (map (display opts) pats))
+  display opts (Struct _ fs) = cat [ nest 2 $ cat [ "{", fields fs], "}"]
+    where
+    fields = sep . punctuate "," . map field
+    field (Field name pat) = pretty name <+> "=" <+> display opts pat
+  display opts (App _ l pats) =
+    display opts l <+> hsep (punctuate " " (map (displayAtom opts) pats))
+  display opts (KeyValue _ k v) =
+    displayAtom opts k <+> "->" <+> displayAtom opts v
+  display opts (Elements _ pat) =
+    "elements" <+> parens (display opts pat)
+  display opts (All _ query) =
+    "all" <+> parens (display opts query)
+  display _ (Wildcard _) = "_"
+  display _ (Variable _ name) = pretty name
+  display opts (ElementsOfArray _ pat) = displayAtom opts pat <> "[..]"
+  display opts (OrPattern _ lhs rhs) =
+    sep [displayAtom opts lhs <+> "|", displayAtom opts rhs]
+  display opts (IfPattern _ cond then_ else_) = sep
+    [ nest 2 $ sep ["if", displayAtom opts cond ]
+    , nest 2 $ sep ["then", displayAtom opts then_]
+    , nest 2 $ sep ["else", displayAtom opts else_]
+    ]
+  display opts (NestedQuery _ q) = parens $ display opts q
+  display opts (Negation _ q) = "!" <> parens (display opts q)
+  display _ (FactId _ Nothing n) = "$" <> pretty n
+  display _ (FactId _ (Just p) n) = "$" <> pretty p <+> pretty n
+  display opts (TypeSignature _ p t) =
+    displayAtom opts p <+> ":" <+> display opts t
+  display _ (Never _) = "never"
+  display opts (Clause _ _ p pat rng) =
+    display opts p <> prng <+> displayAtom opts pat
+    where prng = case rng of
+            SeekOnBase -> "#old"
+            SeekOnStacked -> "#new"
+            _ -> mempty
+  display opts (Prim _ p pats) =
+    display opts p <+> hsep (punctuate " " (map (displayAtom opts) pats))
+  display opts (FieldSelect _ pat field q) =
+    displayAtom opts pat <> "." <> pretty field <>
+      case q of
+        Sum -> "?"
+        Record -> mempty
+  display opts (Deref _ pat) =
+    displayAtom opts pat <> ".*"
+  display _ (Enum _ f) = pretty f
+
+  displayAtom opts pat = case pat of
+    App{} -> parens $ display opts pat
+    KeyValue{} -> parens $ display opts pat
+    OrPattern{} -> parens $ display opts pat
+    IfPattern{} -> parens $ display opts pat
+    TypeSignature{} -> parens $ display opts pat
+    Nat{} -> display opts pat
+    String{} -> display opts pat
+    StringPrefix{} -> display opts pat
+    ByteArray{} -> display opts pat
+    Array{} -> display opts pat
+    ArrayPrefix{} -> display opts pat
+    Tuple{} -> display opts pat
+    Struct{} -> display opts pat
+    ElementsOfArray{} -> parens $ display opts pat
+    Elements{} -> display opts pat
+    All{} -> parens $ display opts pat
+    Wildcard{} -> display opts pat
+    Variable{} -> display opts pat
+    NestedQuery{} -> display opts pat
+    Negation{} -> display opts pat
+    FactId{} -> display opts pat
+    Never{} -> display opts pat
+    Clause{} -> parens $ display opts pat
+    Prim{} -> parens $ display opts pat
+    FieldSelect{} -> display opts pat
+    Deref{} -> display opts pat
+    Enum _ _ -> display opts pat
+
+instance (Display p, Display t) => Display (SourceQuery_ s st p t) where
+  display opts (SourceQuery maybeHead stmts _ord) = case stmts of
+    [] -> maybe mempty (display opts) maybeHead
+    _ -> case maybeHead of
+      Just head -> hang 2 (sep (display opts head <+> "where" : pstmts))
+      Nothing -> sep pstmts
+    where
+    pstmts = punctuate ";" (map (display opts) stmts)
+
+instance (Display p, Display t) => Display (SourceStatement_ s st p t) where
+  display opts (SourceStatement lhs rhs) = displayStatement opts lhs rhs
+
+displayStatement
+  :: (IsWild pat, Display pat)
+  => DisplayOpts
+  -> pat
+  -> pat
+  -> Doc ann
+displayStatement opts lhs rhs
+  | isWild lhs = display opts rhs
+  | otherwise = hang 2 $ sep [display opts lhs <+> "=", display opts rhs]
+
+instance Display PrimOp where
+  display _ PrimOpToLower = "prim.toLower"
+  display _ PrimOpLength = "prim.length"
+  display _ PrimOpZip = "prim.zip"
+  display _ PrimOpConcat = "prim.concat"
+  display _ PrimOpReverse = "prim.reverse"
+  display _ PrimOpSize = "prim.size"
+  display _ PrimOpRelToAbsByteSpans = "prim.relToAbsByteSpans"
+  display _ PrimOpUnpackByteSpans = "prim.unpackByteSpans"
+  display _ PrimOpGtNat = "prim.gtNat"
+  display _ PrimOpGeNat = "prim.geNat"
+  display _ PrimOpLtNat = "prim.ltNat"
+  display _ PrimOpLeNat = "prim.leNat"
+  display _ PrimOpNeNat = "prim.neNat"
+  display _ PrimOpAddNat = "prim.addNat"
+  display _ PrimOpNeExpr = "prim.neExpr"
+
+-- -----------------------------------------------------------------------------
+-- Removing source locations from the AST
+
+rmLocSchemas :: SourceSchemas_ a -> SourceSchemas_ ()
+rmLocSchemas (SourceSchemas version schemas evolves) =
+  SourceSchemas version (rmLocSchema <$> schemas) (rmLocEvolves <$> evolves)
+
+rmLocSchema :: SourceSchema_ a -> SourceSchema_ ()
+rmLocSchema (SourceSchema name inherits decls _) =
+  SourceSchema name inherits (rmLocDecl <$> decls) ()
+
+rmLocEvolves :: SourceEvolves_ a -> SourceEvolves_ ()
+rmLocEvolves (SourceEvolves _ a b) = SourceEvolves () a b
+
+rmLocDecl :: SourceDecl_ s -> SourceDecl_ ()
+rmLocDecl = \case
+  SourceImport name _ -> SourceImport name ()
+  SourcePredicate pred -> SourcePredicate $ rmLocPredDef pred
+  SourceType typeDef -> SourceType $ rmLocTypeDef typeDef
+  SourceDeriving DerivingDef{..} -> SourceDeriving $ DerivingDef
+    derivingDefRef (rmLocQuery <$> derivingDefDeriveInfo) ()
+
+rmLocPredDef :: PredicateDef_ s st p t -> PredicateDef_ () () p t
+rmLocPredDef PredicateDef{..} = PredicateDef {
+  predicateDefRef = predicateDefRef,
+  predicateDefKeyType = rmLocType predicateDefKeyType,
+  predicateDefValueType = rmLocType predicateDefValueType,
+  predicateDefDeriving = rmLocQuery <$> predicateDefDeriving,
+  predicateDefSrcSpan = ()
+}
+
+rmLocQuery :: SourceQuery_ s st p t -> SourceQuery_ () () p t
+rmLocQuery (SourceQuery mhead stmts ord) =
+  SourceQuery (rmLocPat <$> mhead) (rmLocStatement <$> stmts) ord
+
+rmLocStatement :: SourceStatement_ s st p t -> SourceStatement_ () () p t
+rmLocStatement (SourceStatement x y) =
+  SourceStatement (rmLocPat x) (rmLocPat y)
+
+rmLocTypeDef :: TypeDef_ s p t -> TypeDef_ () p t
+rmLocTypeDef (TypeDef tref ty _) = TypeDef tref (rmLocType ty) ()
+
+rmLocType :: Type_ st p t -> Type_ () p t
+rmLocType = \case
+  ByteTy -> ByteTy
+  NatTy -> NatTy
+  StringTy -> StringTy
+  ArrayTy ty -> ArrayTy $ rmLocType ty
+  RecordTy xs -> RecordTy $ rmLocFieldDef <$> xs
+  SumTy xs -> SumTy $ rmLocFieldDef <$> xs
+  SetTy ty -> SetTy $ rmLocType ty
+  PredicateTy _ pref -> PredicateTy () pref
+  NamedTy _ tref -> NamedTy () tref
+  MaybeTy ty -> MaybeTy $ rmLocType ty
+  EnumeratedTy xs -> EnumeratedTy xs
+  BooleanTy -> BooleanTy
+  TyVar x -> TyVar x
+  HasTy m r x -> HasTy (rmLocType <$> m) r x
+  HasKey ty x -> HasKey (rmLocType ty) x
+  ElementsOf ty x -> ElementsOf (rmLocType ty) x
+
+rmLocFieldDef :: FieldDef_ s p t -> FieldDef_ () p t
+rmLocFieldDef (FieldDef n ty) = FieldDef n $ rmLocType ty
+
+rmLocPat :: SourcePat_ s st p t -> SourcePat_ () () p t
+rmLocPat = \case
+  Nat _ x -> Nat () x
+  String _ x -> String () x
+  StringPrefix _ x -> StringPrefix () x
+  ByteArray _ x -> ByteArray () x
+  Array _ xs -> Array () (rmLocPat <$> xs)
+  ArrayPrefix _ xs -> ArrayPrefix () (rmLocPat <$> xs)
+  Tuple _ xs -> Tuple () (rmLocPat <$> xs)
+  Struct _ xs -> Struct () (rmLocField <$> xs)
+  App _ x xs -> App () (rmLocPat x) (rmLocPat <$> xs)
+  KeyValue _ x y -> KeyValue () (rmLocPat x) (rmLocPat y)
+  Elements _ pat -> Elements () (rmLocPat pat)
+  All _ query -> All () (rmLocPat query)
+  Wildcard _ -> Wildcard ()
+  Never _ -> Never ()
+  Variable _ v -> Variable () v
+  ElementsOfArray _ x -> ElementsOfArray () (rmLocPat x)
+  OrPattern _ x y -> OrPattern () (rmLocPat x) (rmLocPat y)
+  IfPattern _ x y z -> IfPattern () (rmLocPat x) (rmLocPat y) (rmLocPat z)
+  Negation _ x -> Negation () (rmLocPat x)
+  NestedQuery _ query -> NestedQuery () $ rmLocQuery query
+  FactId _ x y -> FactId () x y
+  TypeSignature _ x t -> TypeSignature () (rmLocPat x) (rmLocType t)
+  Clause _ _ x y rng -> Clause () () x (rmLocPat y) rng
+  Prim _ p ps -> Prim () p (rmLocPat <$> ps)
+  FieldSelect _ pat field q -> FieldSelect () (rmLocPat pat) field q
+  Deref _ pat -> Deref () (rmLocPat pat)
+  Enum _ f -> Enum () f
+
+rmLocField :: Field s st p t -> Field () () p t
+rmLocField (Field name pat) =
+  Field name (rmLocPat pat)
+
+-- Remove spans from type refs only. Useful when
+-- the two span types are different (s != st), e.g., s = SrcSpan, st = ()
+rmTypeLocPredDef :: PredicateDef_ s st p t -> PredicateDef_ s () p t
+rmTypeLocPredDef pred = pred
+    { predicateDefKeyType = rmLocType $ predicateDefKeyType pred
+    , predicateDefValueType = rmLocType $ predicateDefValueType pred
+    , predicateDefDeriving = rmTypeLocQuery <$> predicateDefDeriving pred}
+
+rmTypeLocQuery :: SourceQuery_ s st p t -> SourceQuery_ s () p t
+rmTypeLocQuery (SourceQuery mhead stmts ord) =
+  SourceQuery (rmTypeLocPat <$> mhead) (rmTypeLocStatement <$> stmts) ord
+
+rmTypeLocStatement :: SourceStatement_ s st p t -> SourceStatement_ s () p t
+rmTypeLocStatement (SourceStatement x y) =
+  SourceStatement (rmTypeLocPat x) (rmTypeLocPat y)
+
+rmTypeLocPat :: SourcePat_ s st p t -> SourcePat_ s () p t
+rmTypeLocPat pat = case pat of
+  Nat s x -> Nat s x
+  String s x -> String s x
+  StringPrefix s x -> StringPrefix s x
+  ByteArray s x -> ByteArray s x
+  TypeSignature s x t -> TypeSignature s (rmTypeLocPat x) (rmLocType t)
+  Array s xs -> Array s (rmTypeLocPat <$> xs)
+  ArrayPrefix s xs -> ArrayPrefix s (rmTypeLocPat <$> xs)
+  Tuple s xs -> Tuple s (rmTypeLocPat <$> xs)
+  Struct s xs -> Struct s (rmTypeLocField <$> xs)
+  App s x xs -> App s (rmTypeLocPat x) (rmTypeLocPat <$> xs)
+  KeyValue s x y -> KeyValue s (rmTypeLocPat x) (rmTypeLocPat y)
+  Elements s pat -> Elements s (rmTypeLocPat pat)
+  All s query -> All s (rmTypeLocPat query)
+  Wildcard s -> Wildcard s
+  Never s -> Never s
+  Variable s v -> Variable s v
+  ElementsOfArray s x -> ElementsOfArray s (rmTypeLocPat x)
+  OrPattern s x y -> OrPattern s (rmTypeLocPat x) (rmTypeLocPat y)
+  IfPattern s x y z ->
+    IfPattern s (rmTypeLocPat x) (rmTypeLocPat y) (rmTypeLocPat z)
+  Negation s x -> Negation s (rmTypeLocPat x)
+  NestedQuery s query -> NestedQuery s $ rmTypeLocQuery query
+  FactId s x y -> FactId s x y
+  Clause s ss x y rng -> Clause s ss x (rmTypeLocPat y) rng
+  Prim s p ps -> Prim s p (rmTypeLocPat <$> ps)
+  FieldSelect s pat field q -> FieldSelect s (rmTypeLocPat pat) field q
+  Deref s pat -> Deref s (rmTypeLocPat pat)
+  Enum s f -> Enum s f
+
+rmTypeLocField :: Field s st p t -> Field s () p t
+rmTypeLocField (Field name pat) =
+  Field name (rmTypeLocPat pat)
+
+-- -----------------------------------------------------------------------------
+-- Describing the kind of pattern
+
+class Describe a where
+  describe :: a -> Doc ann
+
+instance Describe (SourcePat_ s st p t) where
+  describe = \case
+    Nat {} -> "a nat"
+    String {} -> "a string"
+    StringPrefix {} -> "a string prefix"
+    ByteArray {} -> "a byte array"
+    Array {} -> "an array"
+    ArrayPrefix {} -> "an array prefix"
+    Tuple {} -> "a tuple"
+    Struct {} -> "a struct"
+    App {} -> "an application"
+    KeyValue {} -> "a key value pattern"
+    All {} -> "a set with all the results of its argument"
+    Wildcard {} -> "a wildcard pattern"
+    Never {} -> "a never pattern"
+    Variable {} -> "a variable"
+    ElementsOfArray {} -> "an element of an array"
+    Elements {} -> "an element of a set"
+    OrPattern {} -> "an or pattern"
+    IfPattern {} -> "an if pattern"
+    Negation {} -> "a negation"
+    NestedQuery {} -> "a nested query"
+    FactId {} -> "a fact id"
+    TypeSignature {} -> "a type signature"
+    Clause {} -> "a clause"
+    Prim {} -> "a primitive function"
+    FieldSelect{} -> "a record field"
+    Deref{} -> "a dereference"
+    Enum{} -> "an enum value"
+
+instance Describe SrcSpan where
+  describe _ = "a source span"
+
+instance Describe SrcLoc where
+  describe _ = "a source location"
diff --git a/glean/angle/Glean/Display.hs b/glean/angle/Glean/Display.hs
new file mode 100644
--- /dev/null
+++ b/glean/angle/Glean/Display.hs
@@ -0,0 +1,65 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module Glean.Display (
+    displayDefault,
+    displayVerbose,
+    Display(..),
+    DisplayOpts(..),
+    PredicateStyle(..),
+    defaultDisplayOpts,
+    verboseDisplayOpts,
+  ) where
+
+import Data.Text (Text)
+import Compat.Prettyprinter
+
+data PredicateStyle = PredicateWithHash | PredicateWithoutHash
+
+newtype DisplayOpts = DisplayOpts
+  { predicateStyle :: PredicateStyle
+  -- more later
+  }
+
+-- | A "human readable" style, for things like error messages
+defaultDisplayOpts :: DisplayOpts
+defaultDisplayOpts = DisplayOpts
+  { predicateStyle = PredicateWithoutHash
+  }
+
+-- | All the details, for debugging
+verboseDisplayOpts :: DisplayOpts
+verboseDisplayOpts = DisplayOpts
+  { predicateStyle = PredicateWithHash
+  }
+
+displayDefault :: Display a => a -> Doc ann
+displayDefault = display defaultDisplayOpts
+
+displayVerbose :: Display a => a -> Doc ann
+displayVerbose = display verboseDisplayOpts
+
+-- | A class for paramterising pretty-printers with some options to
+-- control what gets printed, for example to select different levels
+-- of verbosity.
+class Display a where
+  display :: DisplayOpts -> a -> Doc ann
+
+  -- | If necessary, parenthesise the output to make it suitable for
+  -- use in an "atomic" position such as a function argument.
+  displayAtom :: DisplayOpts -> a -> Doc ann
+  displayAtom opts = display opts
+
+instance Display () where
+  display _ = pretty
+
+instance Display String where
+  display _ = pretty
+
+instance Display Text where
+  display _ = pretty
diff --git a/glean/angle/Glean/Schema/Evolve.hs b/glean/angle/Glean/Schema/Evolve.hs
new file mode 100644
--- /dev/null
+++ b/glean/angle/Glean/Schema/Evolve.hs
@@ -0,0 +1,460 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+{- |
+This module focuses on determining which predicate should be transformed
+into which by looking at the contents of schemas and at the evolution
+relationships between schemas.
+-}
+{-# LANGUAGE CPP #-}
+module Glean.Schema.Evolve
+  ( validateResolvedEvolutions
+  , directSchemaEvolutions
+  , calcEvolutions
+  , validateEvolutions
+  , visiblePredicates
+  , mapVisible
+  , VisiblePredicates
+  , visibleDefined
+  , canBeStored
+  ) where
+
+import Control.Applicative
+import Control.Monad
+#if !MIN_VERSION_base(4,16,0)
+import Data.Foldable
+#endif
+import Data.Graph
+import Data.Hashable
+import qualified Data.HashSet as HashSet
+import Data.HashSet (HashSet)
+import Data.HashMap.Strict (HashMap)
+import qualified Data.HashMap.Strict as HashMap
+import Data.List
+import Data.List.Extra (nubOrdOn)
+import Data.Map (Map)
+import qualified Data.Map as Map
+import Data.Maybe (listToMaybe)
+import qualified Data.Set as Set
+import Data.Text (Text)
+import qualified Data.Text as Text
+
+import Glean.Angle.Types
+import Glean.Display
+import Glean.Schema.Types
+import Glean.Schema.Util
+
+{- Note [Schema Evolutions]
+
+An 'schema evolution' is a non-commuting transitive relationship between two
+schemas. It is established by a source code annotation saying:
+
+    schema A evolves B
+
+It establishes a 'predicate evolution' relationship between all predicates
+exported by B and predicates exported by A if they have the same name. Schema
+evolutions must form a graph with no cycles.
+
+A 'predicate evolution' is a reflexive, commutative, non-transitive
+relationship between two predicates. It means that facts from one predicate can
+be transformed into facts from the other.
+
+It is established in two cases:
+
+  - predicate P evolves predicate Q if the schema containing P evolves the
+  schema containing Q and both P and Q have the same name.
+  This is caused by a source code annotation.
+
+  - predicate P evolves predicate Q if they are defined in schemas with the
+  same SchemaRef and have the same name but different hashes.
+  This is caused by a version-less schema migration and the two instances
+  live in different ProcessedSchema.
+
+NB: Although 'predicate evolution' is not a transitive relationship, we
+expect it to work in all transitively evolved predicates because we want
+'schema evolution' to be transitive.
+
+Example of why predicate evolution is not transitive:
+  predicate P.1 = { a : maybe nat }
+  predicate P.2 = {}
+  predicate P.3 = { a : maybe string }
+
+P.2 can evolve P.1 and P.3 can evolve P.2, but P.3 cannot evolve P.1.
+-}
+
+-- | As specified by a `schema x evolves y` line.
+-- Does not take the db's content into account.
+-- value evolves key
+directSchemaEvolutions
+  :: [ResolvedSchemaRef]
+  -> Either Text (Map SchemaRef SchemaRef)
+directSchemaEvolutions schemas =
+  Map.traverseWithKey checkMultipleEvolves $
+  Map.fromListWith (++)
+    [ (evolved, [schemaRef resolved])
+    | resolved <- schemas
+    , evolved <- Set.toList $ resolvedSchemaEvolves resolved
+    ]
+  where
+  checkMultipleEvolves old newList =
+    case nub newList of
+      [new] -> Right new
+      _     -> Left $ "multiple schemas evolve "
+        <> showSchemaRef old
+        <> ": "
+        <> Text.unwords (map showSchemaRef newList)
+
+-- | Visible predicates which can be evolved.
+data VisiblePredicates p = VisiblePredicates
+  { visibleDefined :: HashSet p
+  , visibleReexported :: HashSet p
+  }
+
+visiblePredicates :: ResolvedSchemaRef -> VisiblePredicates PredicateRef
+visiblePredicates ResolvedSchema{..} = VisiblePredicates
+  { visibleDefined = evolvable resolvedSchemaPredicates
+  , visibleReexported = evolvable resolvedSchemaReExportedPredicates
+  }
+  where
+  evolvable :: HashMap PredicateRef ResolvedPredicateDef -> HashSet PredicateRef
+  evolvable = HashSet.fromList . filter stored . HashMap.keys
+
+  stored ref =
+    maybe True (canBeStored . derivingDefDeriveInfo) $
+      HashMap.lookup ref resolvedSchemaDeriving
+
+canBeStored :: DerivingInfo a -> Bool
+canBeStored = \case
+  Derive DeriveOnDemand _ -> False
+  Derive DerivedAndStored _ -> True
+  Derive DeriveIfEmpty _ -> True
+  NoDeriving -> True
+
+mapVisible
+  :: (Eq q, Hashable q)
+  => (p -> q)
+  -> VisiblePredicates p
+  -> VisiblePredicates q
+mapVisible f (VisiblePredicates d r) =
+  VisiblePredicates (HashSet.map f d) (HashSet.map f r)
+
+instance (Eq p, Hashable p) => Semigroup (VisiblePredicates p) where
+  VisiblePredicates d r <> VisiblePredicates d' r' =
+    VisiblePredicates (d <> d') (r <> r')
+
+instance (Eq p, Hashable p) => Monoid (VisiblePredicates p) where
+  mappend = (<>)
+  mempty = VisiblePredicates mempty mempty
+
+-- | Given evolutions between schemas and evolutions between instances of the
+-- same predicate, calculate the final instance-to-instance predicate
+-- evolutions.
+calcEvolutions
+  :: forall p. (Eq p, Ord p, Hashable p, ShowRef p)
+  => (p -> PredicateRef)
+  -> Map PredicateRef [p]          -- ^ all predicates by ref
+  -> Map SchemaRef (VisiblePredicates p) -- ^ all predicates by schema ref
+  -> Map SchemaRef SchemaRef       -- ^ evolutions from src code directives
+  -> Map PredicateRef p            -- ^ evolutions from versionless migrations
+  -> Either Text (HashMap p p)
+calcEvolutions toRef byPredRef bySchemaRef schemaEvolutions autoEvolutions =
+  case cycles evolutions of
+    [] -> Right evolutions
+    []:_ -> error "calcEvolutions"
+    (x:xs):_ -> Left $ "found a cycle in predicate evolutions: " <>
+      Text.intercalate " -> " (map showRef $ x:xs ++ [x])
+  where
+  cycles :: Ord a => HashMap a a -> [[a]]
+  cycles hm = [ cycle | CyclicSCC cycle <- scc]
+    where
+    scc = stronglyConnComp [ (k,k,[v]) | (k, v) <- HashMap.toList hm ]
+
+  evolutions = fromSourceAnnotations `HashMap.union` fromVersionlessMigrations
+
+  fromVersionlessMigrations :: HashMap p p
+  fromVersionlessMigrations = HashMap.fromList
+    [ (old, new)
+    | (ref, preds) <- Map.toList byPredRef
+    , old <- preds
+    , Just new <- [Map.lookup ref autoEvolutions]
+    , new /= old
+    ]
+
+  fromSourceAnnotations :: HashMap p p
+  fromSourceAnnotations =
+    HashMap.unions
+    $ map concrete
+    $ map (uncurry match)
+    $ Map.toList schemaEvolutions
+    where
+      concrete :: HashMap PredicateRef PredicateRef -> HashMap p p
+      concrete = HashMap.fromList . concatMap expand . HashMap.toList
+
+      expand :: (PredicateRef, PredicateRef) -> [(p,p)]
+      expand (from, to) =
+        [ (from', to')
+        | from' <- allInstances from
+        , Just to' <- [mostEvolvedInstance to]
+        ]
+
+      allInstances :: PredicateRef -> [p]
+      allInstances ref = Map.findWithDefault [] ref byPredRef
+
+      mostEvolvedInstance :: PredicateRef -> Maybe p
+      mostEvolvedInstance ref = evolved <|> anyInstance
+        where
+        evolved = Map.lookup ref autoEvolutions
+        anyInstance = listToMaybe =<< Map.lookup ref byPredRef
+
+  match :: SchemaRef -> SchemaRef -> HashMap PredicateRef PredicateRef
+  match old new = HashMap.fromList
+    [ (rold, rnew)
+    | rold <- predicates old
+    , Just rnew <- [Map.lookup (name rold) newByName]
+    , rnew /= rold -- avoid re-exports evolving themselves
+    ]
+    where
+    newByName :: Map Name PredicateRef
+    newByName = Map.fromList [ (name ref, ref) | ref <- predicates new ]
+
+  predicates :: SchemaRef -> [PredicateRef]
+  predicates sref =
+    -- defined override reexported
+    nubOrdOn name
+      $ map toRef
+      $ HashSet.toList defined <> HashSet.toList reexported
+    where
+      VisiblePredicates defined reexported =
+        Map.findWithDefault mempty sref bySchemaRef
+
+  name :: PredicateRef -> Name
+  name = predicateRef_name
+
+-- | Check schemas for compatibility and map each predicate to their
+-- evolved counterpart in the the evolvedBy map.
+--
+-- This is abstracted over the type of predicates and types, because
+-- we use it in two different ways:
+--
+-- 1. To check the validity of "schema A evolves B" declarations.  This
+--    check is performa at schema resolution time, so
+--       p = PredicateRef
+--       t = TypeRef
+--
+-- 2. To check compatibility between complete schemas when a new
+--    schema instance is added to the SchemaIndex. We're dealing with
+--    complete hashed schemas in this case, so
+--       p = PredicateId
+--       t = TypeId
+--
+validateEvolutions
+  :: (Eq p, Eq t, ShowRef p, ShowRef t,
+      Hashable p, Hashable t, Display p, Display t)
+  => Maybe (p -> Bool)               -- ^ does the db has facts of p
+  -> HashMap t (TypeDef_ st p t)        -- ^ types to their definitions
+  -> HashMap p (PredicateDef_ s st p t) -- ^ predicates to their definitions
+  -> HashMap p p                     -- ^ predicate evolutions
+  -> Either Text ()
+validateEvolutions mHasFacts types preds evolutions =
+  void $ HashMap.traverseWithKey validate evolutions
+  where
+    validate old new =
+      let PredicateDef _ oldKey oldVal _ _ = preds HashMap.! old
+          PredicateDef _ newKey newVal _ _ = preds HashMap.! new
+          keyErr = newKey `canEvolve'` oldKey
+          valErr = newVal `canEvolve'` oldVal
+      in
+      case keyErr <|> valErr of
+        Nothing -> Right ()
+        Just err -> Left $
+          "cannot evolve predicate " <> showRef old <>
+          " into " <> showRef new <> ": " <> err
+
+    canEvolve' = canEvolve types compatible
+
+    compatible new old =
+      case mHasFacts of
+        Nothing ->
+          -- Here we are validating an evolution graph without a database.
+          -- Compatible predicates must ultimately evolve to the same
+          -- PredicateRef. We ignore hashes because auto-evolutions will make
+          -- all predicates with the same PredicateRef evolve to the same thing
+          -- in a concrete database.
+          ref (evolved new) == ref (evolved old)
+        Just hasFacts
+            -- if there are no facts, there will be no transformation so all
+            -- types are considered compatible.
+          | not (hasFacts old) -> True
+            -- there will be a transformation so the evolutions map should have
+            -- an exact match.
+          | otherwise ->
+            HashMap.lookupDefault old old evolutions
+              ==  HashMap.lookupDefault new new evolutions
+
+    ref p = predicateDefRef $ preds HashMap.! p
+
+    -- get most evolved version of a predicate
+    evolved p = case HashMap.lookup p evolutions of
+      Nothing -> p
+      Just p' -> if p' == p then p else evolved p'
+
+
+-- | Create a mapping from a schema to the schema that evolves it. This will
+--  - check if any schema is evolved by multiple schemas.
+--  - check if all schema evolutions are legal.
+--
+-- If 'B evolves A' and 'C evolves A', when a query for A comes we won't
+-- know whether to serve facts from C or from B. Therefore we disallow
+-- multiple schemas to evolve a single one.
+validateResolvedEvolutions :: [ResolvedSchemaRef] -> Either Text ()
+validateResolvedEvolutions resolved = do
+  schemaEvolutions <- directSchemaEvolutions resolved
+  let autoEvolutions = mempty
+  evolutions <- calcEvolutions
+    id
+    byRef
+    bySchemaRef
+    schemaEvolutions
+    autoEvolutions
+
+  validateEvolutions Nothing types preds evolutions
+  where
+    byRef :: Map PredicateRef [PredicateRef]
+    byRef = Map.fromList [ (ref, [ref]) | ref <- HashMap.keys preds ]
+
+    bySchemaRef :: Map SchemaRef (VisiblePredicates PredicateRef)
+    bySchemaRef = Map.fromList
+      [ (schemaRef schema, visiblePredicates schema)
+      | schema <- resolved
+      ]
+
+    -- Later definitions override earlier ones in case of db overrides
+    -- (is this really the case or are overrides added to a new ProcessedSchema?)
+    preds :: HashMap PredicateRef
+      (PredicateDef_ SrcSpan SrcSpan PredicateRef TypeRef)
+    preds = HashMap.unions $ reverse $ map resolvedSchemaPredicates resolved
+
+    types :: HashMap TypeRef ResolvedTypeDef
+    types = HashMap.unions $ reverse $ map resolvedSchemaTypes resolved
+
+data Opt = Option | FieldOpt
+
+-- | Check if a type is backward and forward compatible.
+--
+-- For backward and forward compatibility the rules are:
+--  - only add or remove fields with defaultable values
+--  - if a field referencing a predicate is changed, it must be
+--    to a compatible predicate reference.
+--
+-- Two predicate references are compatible if they evolve to the same predicate
+-- or have the same PredicateRef.
+canEvolve
+  :: (Eq p, Eq t, ShowRef p, ShowRef t,
+      Hashable p, Hashable t, Display p, Display t)
+  => HashMap t (TypeDef_ s p t) -- ^ type definitions
+  -> (p -> p -> Bool)         -- ^ whether two predicates are compatible
+  -> Type_ s p t                -- ^ updated type
+  -> Type_ s p t                -- ^ old type
+  -> Maybe Text               -- ^ compatibility error
+canEvolve types compatible new old = go new old
+  where
+    get ty = case HashMap.lookup ty types of
+      Just v -> typeDefType v
+      Nothing -> error $ "unknown type " <> Text.unpack (showRef ty)
+
+    go (NamedTy _ new) (NamedTy _ old )
+      | new == old = Nothing
+      | otherwise = go (get new) (get old)
+    go (NamedTy _ t) old = go (get t) old
+    go new (NamedTy _ t) = go new (get t)
+    go (MaybeTy new) (MaybeTy old) = go new old
+    go ByteTy ByteTy = Nothing
+    go NatTy NatTy = Nothing
+    go StringTy StringTy = Nothing
+    go BooleanTy BooleanTy = Nothing
+    go (ArrayTy new) (ArrayTy old) = go new old
+    go (SetTy new) (SetTy old) = go new old
+    go (PredicateTy _ new) (PredicateTy _ old)
+      | not (compatible new old) = Just
+          $ "type changed from " <> showRef old
+          <> " to " <> showRef new
+      | otherwise = Nothing
+    go (EnumeratedTy new) (EnumeratedTy old) =
+      compareFieldList Option new' old'
+      where
+        new' = map unitOpt new
+        old' = map unitOpt old
+        unitOpt name = FieldDef name (RecordTy [])
+    go (SumTy new) (SumTy old) = compareFieldList Option new old
+    go (RecordTy new) (RecordTy old) = compareFieldList FieldOpt new old
+    go (SetTy new) (ArrayTy old) = go new old
+    go (ArrayTy new) (SetTy old) = go new old
+    go new old = Just $ Text.pack $
+      "type changed from " <>
+        show (displayDefault old) <> " to " <>
+        show (displayDefault new)
+
+    compareFieldList optName new old =
+      removedFieldsError <|> newRequiredFieldsError <|>
+      asum (map compareField matchingFields)
+      where
+        names = map fieldDefName
+        oldByName = Map.fromList (zip (names old) old)
+        newByName = Map.fromList (zip (names new) new)
+        matchingFields =
+          [ (name, fNew, fOld)
+          | FieldDef name fNew <- new
+          , Just (FieldDef _ fOld) <- [Map.lookup name oldByName]
+          ]
+        compareField (name, new, old) = addLocation <$> go new old
+          where
+            addLocation err =
+              "in " <> showOpt optName <> " '" <> name <> "', " <> err
+
+        addedFields = Map.difference newByName oldByName
+        removedFields = Map.difference oldByName newByName
+        required fields = Map.filter (not . hasDefault . fieldDefType) fields
+        hasDefault ty = case ty of
+          MaybeTy _ -> True
+          NatTy -> True
+          StringTy -> True
+          BooleanTy -> True
+          ByteTy -> True
+          ArrayTy _ -> True
+          SetTy _ -> True
+          RecordTy fields -> all (hasDefault . fieldDefType) fields
+          EnumeratedTy{} -> True
+          SumTy (first : _) -> hasDefault (fieldDefType first)
+          NamedTy _ ty -> hasDefault (get ty)
+          _ -> False
+
+        newRequiredFields = Map.keys (required addedFields)
+        removedRequiredFields = Map.keys (required removedFields)
+
+        removedFieldsError = case optName of
+          Option -> Nothing
+          FieldOpt -> case removedRequiredFields  of
+            [] -> Nothing
+            fields -> Just $ "missing required " <> plural optName fields
+              <> ": " <> Text.unwords fields
+
+        newRequiredFieldsError = case optName of
+          Option -> Nothing
+          FieldOpt -> case newRequiredFields of
+            [] -> Nothing
+            _ -> Just $ Text.unlines
+              [ Text.unwords [ "required" , plural optName newRequiredFields
+                , "added:" , Text.unwords newRequiredFields ]
+              , "For backward and forward compatibility, predicate evolutions"
+                <> " require that all new fields are non-predicate types"
+              ]
+
+    plural s [_] = showOpt s
+    plural s _ = showOpt s <> "s"
+    showOpt Option = "option"
+    showOpt FieldOpt = "field"
diff --git a/glean/angle/Glean/Schema/Resolve.hs b/glean/angle/Glean/Schema/Resolve.hs
new file mode 100644
--- /dev/null
+++ b/glean/angle/Glean/Schema/Resolve.hs
@@ -0,0 +1,824 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+{-# LANGUAGE DeriveGeneric #-}
+
+module Glean.Schema.Resolve
+  ( parseAndResolveSchema
+  , parseAndResolveSchemaCached
+  , SchemaParserCache
+  , resolveType
+  , resolveSchema
+  , runResolve
+  , resolveQuery
+  , resolveSchemaRefs
+  ) where
+
+import Control.Monad
+import Control.Monad.Reader
+import Control.Monad.Except
+import Data.ByteString (ByteString)
+import qualified Data.ByteString as ByteString
+import Data.Char
+import Data.Graph
+import Data.Foldable
+import Data.HashMap.Strict (HashMap)
+import qualified Data.HashMap.Strict as HashMap
+import qualified Data.HashSet as HashSet
+import Data.HashSet (HashSet)
+import Data.List
+import Data.Maybe
+import qualified Data.Set as Set
+import Data.Text (Text)
+import qualified Data.Text as Text
+import Compat.Prettyprinter hiding (group)
+import TextShow
+
+import Glean.Angle.Hash
+import Glean.Angle.Parser
+import Glean.Angle.Types
+import Glean.Schema.Types
+import Glean.Schema.Util
+import Glean.Schema.Evolve (validateResolvedEvolutions)
+
+type SchemaParserCache = HashMap Hash SourceSchemas
+
+-- ---------------------------------------------------------------------------
+-- High-level schema parsing / resolution APIs
+
+--
+-- | Useful packaging of 'parseSchema' and 'resolveSchema'. Note that
+-- parsing and resolution of a schema is a pure function.
+--
+parseAndResolveSchema
+  :: ByteString
+  -> Either String (SourceSchemas, ResolvedSchemas)
+parseAndResolveSchema str =
+  case parseSchema str of
+    Left str -> Left str
+    Right ss -> case resolveSchema ss of
+      Left txt -> Left (Text.unpack txt)
+      Right r -> Right (ss, r)
+
+--
+-- | Like parseAndResolveSchema but uses a cache to avoid repeatedly
+-- parsing the same schema fragments.
+--
+-- We split the input string at "schema" declarations and hash the
+-- content of each one to use as the cache key. There are a couple of
+-- caveats here:
+--
+--  * we lose the benefit of the FILE annotations that tell us the
+--    original source file name for error messages. Therefore don't
+--    use this parsing method when you want error messages; use
+--    the uncached parseAndResolveSchema instead.
+--
+--  * "schema" should appear in column 0. But if it doesn't, the worst
+--    that can happen is we miss out on some caching. Since "schema" is
+--    a keyword, it can't appear inside a schema or anything silly like
+--    that.
+--
+parseAndResolveSchemaCached
+  :: SchemaParserCache
+  -> ByteString
+  -> Either String (SourceSchemas, ResolvedSchemas, SchemaParserCache)
+parseAndResolveSchemaCached cache str = do
+  let
+    (ver, rest) = stripAngleVersion str
+
+    cutSchemas b =
+      (h <> "\n") : -- put the "\n" back on the end
+        if ByteString.null t
+          then []
+          else cutSchemas (ByteString.drop 1 t) -- drop the "\n"
+      where (h,t) = ByteString.breakSubstring "\nschema" b
+
+    schemaFragments =
+      [ (hashByteString frag, frag)
+      | frag <- cutSchemas rest ]
+
+  parsed <- forM schemaFragments $ \(key, str) ->
+    case HashMap.lookup key cache of
+      Nothing -> case parseSchemaWithVersion ver str of
+        Left err -> Left err
+        Right ss -> return (key, ss)
+      Just cached -> return (key, cached)
+
+  let
+    merged = SourceSchemas
+      { srcAngleVersion = ver
+      , srcSchemas = schemas
+      , srcEvolves = evolves }
+      where
+        schemas = concatMap (srcSchemas . snd) parsed
+        evolves = concatMap (srcEvolves . snd) parsed
+
+    newCache = HashMap.union cache (HashMap.fromList parsed)
+
+  case resolveSchema merged of
+    Left txt -> Left (Text.unpack txt)
+    Right r -> Right (merged, r, newCache)
+
+--
+-- | Turn 'SourceSchemas' into a 'ResolvedSchemas' by resolving all the
+-- references and checking for validity.
+--
+resolveSchema :: SourceSchemas -> Either Text ResolvedSchemas
+resolveSchema schemas = runExcept $ do
+  checkAngleVersion (srcAngleVersion schemas)
+
+  SourceSchemas{..} <- resolveSchemaRefs schemas
+
+  let
+    -- dependency analysis: we want to process schemas in dependency
+    -- order, and detect cycles in evolves declarations.
+    sccs = stronglyConnComp
+      [ (schema, schemaName schema, out schema)
+      | schema <- srcSchemas ]
+
+    out s = schemaDependencies s <> evolvesOf (schemaName s)
+
+    schemaDependencies SourceSchema{..} =
+      schemaInherits ++ [ name | SourceImport name _ <- schemaDecls ]
+
+    evolves = HashMap.fromListWith (++)
+      [ (new, [old])
+      | SourceEvolves _ new old <- srcEvolves
+      ]
+
+    evolvesOf name = HashMap.lookupDefault [] name evolves
+
+    resolveSchemas env [] = return env
+    resolveSchemas env (AcyclicSCC one : rest) = do
+      let schemaEvolves = HashMap.lookupDefault [] (schemaName one) evolves
+      resolved <- resolveOneSchema env srcAngleVersion
+        schemaEvolves one
+      resolveSchemas (HashMap.insert (schemaName one) resolved env) rest
+    resolveSchemas _ (CyclicSCC some : _) = throwError $
+      "cycle in schema definitions between: " <>
+        Text.intercalate ", " (map (showRef . schemaName) some)
+
+  -- Resolve all the references in each individual schema
+  finalEnv <- resolveSchemas HashMap.empty sccs
+
+  let
+    resolved =
+        [ schema
+        | AcyclicSCC one <- sccs
+        , Just schema <- [HashMap.lookup (schemaName one) finalEnv ] ]
+
+    allSchemas =
+      [ schema
+      | schema@ResolvedSchema{..} <- HashMap.elems finalEnv
+      , resolvedSchemaName == "all"
+      ]
+
+  when (srcAngleVersion >= AngleVersion 6) $
+    liftEither $ validateResolvedEvolutions resolved
+
+  return ResolvedSchemas
+    { schemasHighestVersion =
+        if null allSchemas
+           then Nothing
+           else Just (maximum $ map resolvedSchemaVersion allSchemas)
+    , schemasResolved = resolved
+    }
+
+
+resolveSchemaRefs :: SourceSchemas -> Except Text SourceSchemas
+resolveSchemaRefs SourceSchemas{..} = do
+  let
+     unqualMap
+       | srcAngleVersion >= AngleVersion 10 =
+         HashMap.fromListWith (<>)
+           [ (SourceRef name Nothing, HashSet.singleton ref)
+           | SourceSchema{..} <- srcSchemas
+           , let ref@(SourceRef name _) = schemaName
+           ]
+       | otherwise = HashMap.empty
+
+     refMap = unqualMap <> HashMap.fromList
+       [ (schemaName, HashSet.singleton schemaName)
+       | SourceSchema{..} <- srcSchemas
+       ]
+
+     schemaByName ref =
+       case HashMap.lookup ref refMap of
+         Nothing -> unknown
+         Just s -> case HashSet.toList s of
+           [one] -> return one
+           names -> throwError $
+             "ambiguous schema " <> showRef ref <>
+             ", could be one of " <> Text.intercalate ", " (map showRef names)
+       where
+       unknown = throwError $ "unknown schema: " <> showRef ref
+
+     schemaByNameWithNamespace parentSchema ref =
+       let message e = e <> " within schema: " <> showRef parentSchema
+       in withExcept message (schemaByName ref)
+
+     resolveDecl parentSchema (SourceImport r s) =
+      SourceImport <$> schemaByNameWithNamespace parentSchema r <*> pure s
+     resolveDecl _ decl = return decl
+
+     resolveEvolve (SourceEvolves l n o) =
+       SourceEvolves l <$> schemaByName n <*> schemaByName o
+
+     resolveSchema SourceSchema{..} = do
+       inherits <- mapM (schemaByNameWithNamespace schemaName) schemaInherits
+       decls <- mapM (resolveDecl schemaName) schemaDecls
+       return SourceSchema
+         { schemaName = schemaName
+         , schemaInherits = inherits
+         , schemaDecls = decls
+         , schemaSrcSpan = schemaSrcSpan
+         }
+
+  schemas <- traverse resolveSchema srcSchemas
+  evolves <- traverse resolveEvolve srcEvolves
+
+  return SourceSchemas
+    { srcAngleVersion = srcAngleVersion
+    , srcSchemas = schemas
+    , srcEvolves = evolves
+    }
+
+type Environment = HashMap SourceRef ResolvedSchemaRef
+
+resolveOneSchema
+  :: Environment
+  -> AngleVersion
+  -> [SourceRef]
+  -> SourceSchema
+  -> Except Text ResolvedSchemaRef
+
+resolveOneSchema env angleVersion evolves SourceSchema{..} =
+  let inSchema e = throwError $ "In " <> showRef schemaName <> ":\n  " <> e in
+  flip catchError inSchema $ do
+  let
+    SourceRef namespace maybeVer = schemaName
+
+    schemaByName name = case HashMap.lookup name env of
+      Nothing -> throwError $ "unknown schema: " <> showRef name
+      Just one -> return one
+
+  checkNameSpace namespace
+
+  -- Version of this schema
+  version <- case maybeVer of
+    Nothing -> throwError $ "missing version: " <> showRef schemaName
+    Just v -> return v
+
+  -- All the schemas we're inheriting from
+  inherits <- traverse schemaByName schemaInherits
+
+  -- All the schemas we imported
+  imports <- traverse schemaByName [ name | SourceImport name _ <- schemaDecls ]
+
+  let
+    qualify :: Name -> Name
+    qualify x = namespace <> "." <> x
+
+    qualifyNameEnv :: NameEnv t -> NameEnv t
+    qualifyNameEnv env = HashMap.fromList
+      [ (SourceRef (qualify name) ver, target)
+      | (SourceRef name ver, target) <- HashMap.toList env ]
+
+    localPreds =
+      [ let
+          SourceRef name explicitVersion = predicateDefRef p
+          thisVersion = fromMaybe version explicitVersion
+          qname = qualify name
+        in
+          (name, PredicateRef qname thisVersion, p)
+      | SourcePredicate p <- schemaDecls
+      ]
+
+    localTypes =
+      [ let
+          SourceRef name explicitVersion = typeDefRef p
+          thisVersion = fromMaybe version explicitVersion
+          qname = qualify name
+        in
+          (name, TypeRef qname thisVersion, p)
+      | SourceType p <- schemaDecls
+      ]
+
+  -- Check for multiple definitions of the same name/version.
+  -- Multiple definitions of the same name is OK: an unqualified
+  -- reference will be rejected as ambiguous, but can be resolved by
+  -- using an explicit version.
+  let
+    numRefs = HashMap.fromListWith (+) $
+      [ ((predicateRef_name, predicateRef_version), 1::Int)
+      | (_, PredicateRef{..}, _) <- localPreds ] ++
+      [ ((typeRef_name, typeRef_version), 1)
+      | (_, TypeRef{..}, _) <- localTypes]
+  forM_ (HashMap.toList numRefs) $ \((name,ver), num) -> do
+    when (num > 1) $ throwError $
+      "multiple definitions for: " <> name <> "." <> showt ver
+
+  -- Build the scope: a mapping from unversioned names to RefTarget
+  let
+    -- inherited definitions are in scope unqualified and qualified
+    --   (but unqualified local names override unqualified inherited names)
+    qualInheritedScope :: NameEnv RefResolved
+    qualInheritedScope =
+      unionNameEnvs $ map resolvedSchemaQualScope inherits
+
+    unqualInheritedScope :: NameEnv RefResolved
+    unqualInheritedScope =
+      unionNameEnvs $ map resolvedSchemaUnqualScope inherits
+
+    -- imported names are in scope qualified only
+    importedScope :: NameEnv RefResolved
+    importedScope = unionNameEnvs $ map resolvedSchemaQualScope imports
+
+    unionNameEnvs :: [NameEnv RefResolved] -> NameEnv RefResolved
+    unionNameEnvs = foldl' (HashMap.unionWith Set.union) HashMap.empty
+
+    nameEntries name ver target =
+      [ (SourceRef name Nothing, set),
+        (SourceRef name (Just ver), set) ]
+      where set = Set.singleton target
+
+    -- local definitions are in scope unqualified and qualified
+    unqualLocalScope :: NameEnv RefResolved
+    unqualLocalScope = HashMap.fromListWith Set.union unqualLocalEntities
+
+    qualLocalScope :: NameEnv RefResolved
+    qualLocalScope = qualifyNameEnv unqualLocalScope
+
+    unqualLocalEntities =
+      -- P and P.1 for each local predicate
+      [ entry
+      | (name, r, _) <- localPreds
+      , entry <- nameEntries name (predicateRef_version r) (RefPred r)
+      ] ++
+      -- T and T.1 for each local type
+      [ entry
+      | (name, r, _) <- localTypes
+      , entry <- nameEntries name (typeRef_version r) (RefType r)
+      ]
+
+    scope =
+      HashMap.union unqualLocalScope $
+      HashMap.union unqualInheritedScope $
+      HashMap.unionWith Set.union qualLocalScope $
+      HashMap.unionWith Set.union qualInheritedScope
+      importedScope
+
+  -- Check for inheriting multiple versions of a predicate/types
+  --
+  -- As a special case, if the schema is called "all" then allow name
+  -- clashes in the inheritance set. This is to facilitate our "all.N"
+  -- convention for declaring the "top-level" schema which will
+  -- inevitably have name clashes, but we don't care about what it
+  -- exports.
+  unless (namespace == "all") $
+    forM_ (HashMap.toList unqualInheritedScope) $ \(ref, targets) -> do
+      case Set.elems targets of
+        (_:_:_) -> throwError $
+          "inherited schemas give multiple definitions for: " <> showRef ref
+        _ -> return ()
+
+  -- resolve type definitions
+  types <- forM localTypes $
+    \(name, ref, TypeDef{..}) -> do
+      checkName name
+      type' <- runResolve angleVersion scope (resolveType typeDefType)
+      return (name, TypeDef
+        { typeDefRef = ref
+        , typeDefType = type'
+        , typeDefSrcSpan = typeDefSrcSpan })
+
+  -- resolve predicate definitions
+  predicates <- forM localPreds $
+    \(name, ref, PredicateDef{..}) -> do
+      checkName name
+      runResolve angleVersion scope $ do
+        key <- resolveType predicateDefKeyType
+        value <- resolveType predicateDefValueType
+        return (name, PredicateDef
+          { predicateDefRef = ref
+          , predicateDefKeyType = key
+          , predicateDefValueType = value
+          , predicateDefDeriving = NoDeriving
+          , predicateDefSrcSpan = predicateDefSrcSpan })
+
+  let
+    -- scope of predicates that we can specify queries for. Namely
+    -- locally-defined predicates and inherited predicates.
+    predScope = resolveRef $
+      HashMap.union unqualLocalScope $
+      HashMap.union unqualInheritedScope $
+      HashMap.unionWith Set.union qualLocalScope
+      qualInheritedScope
+
+  -- resolve queries
+  localDeriving <-
+    forM [ (derivingDefRef,derive)
+      | SourceDeriving derive@DerivingDef{..} <- schemaDecls ] $
+    \(ref, DerivingDef{..}) -> do
+      ty <- lookupResultToExcept ref $ predScope ref
+      ref <- case ty of
+        RefPred ref -> return ref
+        _ -> throwError $ showRef ref <> " is not a predicate"
+      resolvedDerInfo <- runResolve angleVersion scope $
+        resolveDeriving derivingDefDeriveInfo
+      return (ref, DerivingDef ref resolvedDerInfo derivingDefSrcSpan)
+
+  let
+    localTypeNames = HashSet.fromList $
+      map (typeRef_name . typeDefRef . snd) types
+
+    localTypes = HashMap.fromList
+      [ (typeDefRef def, def) | (_, def) <- types ]
+
+    -- The types we re-export from this schema are all the types that
+    -- are inherited but not shadowed by a locally-defined type.
+    reExportedTypes =
+      HashMap.fromList
+        [ (typeDefRef def, def)
+        | schema <- inherits
+        , (ref, def) <- HashMap.toList $
+            resolvedSchemaTypes schema <>
+            resolvedSchemaReExportedTypes schema
+        , not (typeRef_name ref `HashSet.member` localTypeNames)
+        ]
+
+    localPredicateNames = HashSet.fromList $
+      [ predicateRef_name (predicateDefRef def) | (_, def) <- predicates ]
+
+    localPredicates = HashMap.fromList
+      [ (predicateDefRef def, def) | (_, def) <- predicates ]
+
+    -- Similarly for predicates.
+    reExportedPredicates =
+      HashMap.fromList
+        [ (predicateDefRef def, def)
+        | schema <- inherits
+        , (ref, def) <- HashMap.toList $
+            resolvedSchemaPredicates schema <>
+            resolvedSchemaReExportedPredicates schema
+        , not (predicateRef_name ref `HashSet.member` localPredicateNames)
+        ]
+
+    exportedUnqualScope = HashMap.union unqualLocalScope unqualInheritedScope
+      -- Note: local names override inherited names
+
+    -- Qualified exported names. The "all" schema is special: we don't
+    -- re-export things qualified with "all.", only with the original
+    -- schema name.
+    exportedQualScope
+      | namespace == "all" = qualInheritedScope
+      | otherwise =
+         HashMap.union
+           (qualifyNameEnv exportedUnqualScope)
+           qualInheritedScope -- NB. local overrides inherited
+
+  schemaEvolves <- traverse schemaByName evolves
+
+  return ResolvedSchema
+    { resolvedSchemaName = namespace
+    , resolvedSchemaVersion = version
+    , resolvedSchemaAngleVersion = angleVersion
+    , resolvedSchemaTypes = localTypes
+    , resolvedSchemaReExportedTypes = reExportedTypes
+    , resolvedSchemaPredicates = localPredicates
+    , resolvedSchemaReExportedPredicates = reExportedPredicates
+    , resolvedSchemaUnqualScope = exportedUnqualScope
+    , resolvedSchemaQualScope = exportedQualScope
+    , resolvedSchemaDeriving = HashMap.fromList localDeriving
+    , resolvedSchemaEvolves = Set.fromList (schemaRef <$> schemaEvolves)
+    }
+
+resolveType :: (ShowRef t, ShowRef p) =>
+  SourceType -> Resolve p t (Type_ SrcSpan p t)
+resolveType typ = go typ
+  where
+  go typ = case typ of
+    ByteTy -> return ByteTy
+    NatTy -> return NatTy
+    StringTy -> return StringTy
+    ArrayTy ty -> ArrayTy <$> go ty
+    RecordTy fields -> do checkFields fields; RecordTy <$> mapM goField fields
+    SumTy fields -> do checkFields fields; SumTy <$> mapM goField fields
+    SetTy ty -> SetTy <$> go ty
+    PredicateTy s ref -> goRef ref s
+    NamedTy s ref -> goRef ref s -- shouldn't happen, but handle it anyway
+    MaybeTy ty -> MaybeTy <$> go ty
+    EnumeratedTy names -> lift $ do
+      mapM_ checkName names
+      return (EnumeratedTy names)
+    BooleanTy -> return BooleanTy
+    _ -> error "resolveType"
+
+  goRef ref s = do
+    scope <- getScope
+    target <- lift $ lookupResultToExcept ref $
+      resolveRef scope ref
+    case target of
+      RefType ref -> return (NamedTy s ref)
+      RefPred ref -> return (PredicateTy s ref)
+
+  checkFields fields = do
+    sequence_
+      [ throwError $ "duplicate field: " <> x
+        | x:_:_ <- group $ sort $ map fieldDefName fields ]
+    lift $ do
+      mapM_ (checkName . fieldDefName) fields
+      mapM_ (checkFieldName . fieldDefName) fields
+
+  goField (FieldDef name ty) = FieldDef name <$> go ty
+
+
+lookupResultToExcept
+  :: (ShowRef t, ShowRef p)
+  => SourceRef
+  -> LookupResult (RefTarget p t)
+  -> Except Text (RefTarget p t)
+lookupResultToExcept ref res =
+  either throwError return (lookupResultToEither ref res)
+
+checkAngleVersion :: AngleVersion -> Except Text ()
+checkAngleVersion v =
+  unless (v >= latestSupportedAngleVersion) $
+    let ver = Text.pack $ show $ pretty v in
+    throwError $ "Angle version " <> ver <> " is not supported"
+
+checkFieldName :: Name -> Except Text ()
+checkFieldName n =
+  when (isUpper (Text.head n)) $
+    throwError $ "field names must begin with a lowercase letter: " <> n
+
+checkName :: Name -> Except Text ()
+checkName n = do
+  when (n `HashSet.member` reservedWords) $
+    throwError $ n <> " is a reserved word, it cannot be used"
+
+checkNameSpace :: Name -> Except Text ()
+checkNameSpace n = mapM_ checkName (splitDot n)
+
+reservedWords :: HashSet Text
+reservedWords = HashSet.fromList [
+    -- Thrift reserved words, seems like a good idea to avoid these
+    "binary", "bool", "byte", "const", "cpp_include",
+    "double", "enum", "exception", "extends", "false", "float",
+    "hash_map", "hash_set", "hs_include", "i16", "i32", "i64", "include",
+    "list", "map", "namespace", "oneway", "optional", "required", "senum",
+    "service", "set", "stream", "string", "struct", "throws", "true",
+    "typedef", "union", "view", "void",
+
+    -- keywords that the fbthrift compiler rejects (see
+    -- thrift/compiler/parse/thrift.ll)
+    "abstract",
+    "and",
+    "args",
+    "as",
+    "assert",
+    "auto",
+    "break",
+    "case",
+    "char",
+    "class",
+    "continue",
+    "declare",
+    "def",
+    "default",
+    "del",
+    "do",
+    "elif",
+    "else",
+    "elseif",
+    "except",
+    "exec",
+    "extern",
+    "finally",
+    "for",
+    "foreach",
+    "function",
+    "global",
+    "goto",
+    "if",
+    "implements",
+    "import",
+    "in",
+    "int",
+    "inline",
+    "instanceof",
+    "interface",
+    "is",
+    "lambda",
+    "long",
+    "native",
+    "new",
+    "not",
+    "or",
+    "pass",
+    "public",
+    "print",
+    "private",
+    "protected",
+    "raise",
+    "register",
+    "return",
+    "short",
+    "signed",
+    "sizeof",
+    "static",
+    "switch",
+    "synchronized",
+    "template",
+    "this",
+    "throw",
+    "transient",
+    "try",
+    "unsigned",
+    "var",
+    "virtual",
+    "volatile",
+    "while",
+    "with",
+    "yield",
+    "Object",
+    "Client",
+    "IFace",
+    "Processor",
+
+    -- Other words to avoid, because they lead to Thrift-generated code that
+    -- does not compile for one or more languages.
+    "None", "operator", {- TODO: "Enum" -}
+
+    -- Reserved for temporary predicates
+    "_tmp_"
+  ]
+
+
+-- -----------------------------------------------------------------------------
+-- Resolving queries
+
+runResolve
+  :: AngleVersion
+  -> NameEnv (RefTarget p t)
+  -> Resolve p t a
+  -> Except Text a
+runResolve ver scope act = runReaderT act (ver,scope)
+
+type Resolve p t a =
+  ReaderT (AngleVersion, NameEnv (RefTarget p t)) (Except Text) a
+
+getScope :: Resolve p t (NameEnv (RefTarget p t))
+getScope = asks snd
+
+resolveDeriving
+  :: (ShowRef t, ShowRef p)
+  => SourceDerivingInfo' SrcSpan
+  -> Resolve p t (DerivingInfo (Query_ p t))
+resolveDeriving NoDeriving = return NoDeriving
+resolveDeriving (Derive when query) = Derive when <$> resolveQuery query
+
+resolveQuery
+  :: (ShowRef t, ShowRef p)
+  => SourceQuery
+  -> Resolve p t (Query_ p t)
+resolveQuery (SourceQuery head stmts ord) =
+  SourceQuery
+    <$> mapM resolvePat head
+    <*> mapM resolveStatement stmts
+    <*> pure ord
+
+resolvePat
+  :: (ShowRef t, ShowRef p)
+  => SourcePat
+  -> Resolve p t (SourcePat_ SrcSpan SrcSpan p t)
+resolvePat pat = case pat of
+  Nat s i -> return (Nat s i)
+  String s t -> return (String s t)
+  StringPrefix s t -> return (StringPrefix s t)
+  ByteArray s b -> return (ByteArray s b)
+  Array s pats -> Array s <$> mapM resolvePat pats
+  ArrayPrefix s pats -> ArrayPrefix s <$> mapM resolvePat pats
+  Tuple s pats -> Tuple s <$> mapM resolvePat pats
+  All s qs -> All s <$> resolvePat qs
+  Elements s pat -> Elements s <$> resolvePat pat
+  Wildcard s -> return (Wildcard s)
+  TypeSignature s pat ty ->
+    TypeSignature s
+      <$> resolvePat pat
+      <*> resolveType ty
+  Variable s n -> return (Variable s n)
+  FactId s Nothing id -> return (FactId s Nothing id)
+  FactId s (Just pred) id -> do
+    res <- resolveTypeOrPred s pred
+    case res of
+      RefPred ref ->
+        return (TypeSignature s (FactId s Nothing id) (PredicateTy s ref))
+      _other -> prettyErrorIn pat $ "not a predicate: " <> pretty pred
+  OrPattern s l r -> OrPattern s <$> resolvePat l <*> resolvePat r
+  Negation s pat -> Negation s <$> resolvePat pat
+  Never s -> return (Never s)
+  IfPattern s cond then_ else_ ->
+    IfPattern s
+      <$> resolvePat cond
+      <*> resolvePat then_
+      <*> resolvePat else_
+  ElementsOfArray s pat -> ElementsOfArray s <$> resolvePat pat
+  KeyValue s k v -> KeyValue s <$> resolvePat k <*> resolvePat v
+  NestedQuery s q -> NestedQuery s <$> resolveQuery q
+  Struct s fields -> Struct s <$> mapM resolveField fields
+    where resolveField (Field n pat) = Field n <$> resolvePat pat
+  App s (Variable svar txt) args
+    | Just primOp <- HashMap.lookup txt primitives -> do
+      Prim s primOp <$> mapM resolvePat args
+    | otherwise ->
+    case args of
+      [arg] -> do
+        arg' <- resolvePat arg
+        let (range, txt') = if
+              | Just rem <- Text.stripSuffix "#new" txt -> (SeekOnStacked, rem)
+              | Just rem <- Text.stripSuffix "#old" txt -> (SeekOnBase, rem)
+              | otherwise -> (SeekOnAllFacts, txt)
+        res <- resolveTypeOrPred svar txt'
+        case res of
+          RefPred ref -> return (Clause s svar ref arg' range)
+          RefType ref
+            | SeekOnAllFacts <- range ->
+              return (TypeSignature s arg' (NamedTy svar ref))
+            | otherwise ->
+              prettyErrorIn pat "cannot use #new or #old with types"
+            -- The syntax "T pat" for "pat : T" is something we might
+            -- consider deprecating later. For now it's just desugared
+            -- here.
+      _ -> prettyErrorIn pat "unexpected extra argument(s)"
+  App s (StringPrefix a b) [pat] -> do
+    pat' <- resolvePat pat
+    return (App s (StringPrefix a b) [pat'])
+  App _ f _ ->
+    prettyErrorIn pat $ "invalid pattern: cannot apply " <>
+    describe f <> " to arguments"
+  FieldSelect s pat field q ->
+    (\p -> FieldSelect s p field q)
+      <$> resolvePat pat
+  Deref s pat -> Deref s <$> resolvePat pat
+  Enum s n -> return (Enum s n)
+  Clause{} -> internal
+  Prim{} -> internal
+  where
+  internal = throwError $ "internal: unexpected: " <>
+    Text.pack (show (pretty pat))
+
+resolveTypeOrPred
+  :: (ShowRef p, ShowRef t)
+  => SrcSpan
+  -> Name
+  -> Resolve p t (RefTarget p t)
+resolveTypeOrPred span txt = do
+  scope <- getScope
+  let ref = parseRef txt
+  case lookupResultToEither ref $ resolveRef scope ref of
+    Left s -> prettyErrorAt span (pretty s)
+    Right r -> return r
+
+prettyError :: Doc ann -> Resolve p t a
+prettyError = throwError . Text.pack . show
+
+prettyErrorIn :: IsSrcSpan s => SourcePat' s st -> Doc ann -> Resolve p t a
+prettyErrorIn pat doc = prettyErrorAt (sourcePatSpan pat) doc
+
+prettyErrorAt :: IsSrcSpan span => span -> Doc ann -> Resolve p t a
+prettyErrorAt span doc = prettyError $ vcat
+  [ pretty span
+  , doc
+  ]
+
+resolveStatement
+  :: (ShowRef t, ShowRef p)
+  => SourceStatement
+  -> Resolve p t (Statement_ p t)
+resolveStatement (SourceStatement l r) =
+  SourceStatement <$> resolvePat l <*> resolvePat r
+
+primitives :: HashMap Text PrimOp
+primitives = HashMap.fromList
+  [ ("prim.toLower", PrimOpToLower)
+  , ("prim.length", PrimOpLength)
+  , ("prim.relToAbsByteSpans", PrimOpRelToAbsByteSpans)
+  , ("prim.unpackByteSpans", PrimOpUnpackByteSpans)
+  , ("prim.zip", PrimOpZip)
+  , ("prim.concat", PrimOpConcat)
+  , ("prim.reverse", PrimOpReverse)
+  , ("prim.size", PrimOpSize)
+  , ("prim.gtNat", PrimOpGtNat)
+  , ("prim.geNat", PrimOpGeNat)
+  , ("prim.ltNat", PrimOpLtNat)
+  , ("prim.leNat", PrimOpLeNat)
+  , ("prim.neNat", PrimOpNeNat)
+  , ("prim.addNat", PrimOpAddNat)
+  , ("prim.neExpr", PrimOpNeExpr)
+  ]
diff --git a/glean/angle/Glean/Schema/Types.hs b/glean/angle/Glean/Schema/Types.hs
new file mode 100644
--- /dev/null
+++ b/glean/angle/Glean/Schema/Types.hs
@@ -0,0 +1,191 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+
+{-# LANGUAGE DeriveFunctor #-}
+module Glean.Schema.Types (
+  -- * Schema references
+  SchemaRef(..), showSchemaRef,
+
+  -- * Name targets
+  RefTarget(..), RefResolved,
+
+  -- * Resolved abstract syntax
+  ResolvedPat,
+  ResolvedType,
+  ResolvedFieldDef,
+  ResolvedTypeDef,
+  ResolvedPredicateDef,
+  ResolvedDerivingDef,
+  ResolvedQuery,
+  ResolvedStatement,
+  ResolvedDeriving,
+
+  ResolvedPat',
+  ResolvedStatement',
+  ResolvedQuery',
+  ResolvedDeriving',
+  ResolvedTypeDef',
+  ResolvedType',
+  ResolvedFieldDef',
+
+  -- * Name environments and resolution
+  NameEnv,
+  mapNameEnv,
+  LookupResult(..),
+  resolveRef,
+  resolveRefFiltered,
+  lookupResultToEither,
+
+  -- * Resolved schemas
+  ResolvedSchemas(..),
+  ResolvedSchema(..),
+  ResolvedSchemaRef,
+  schemaRef,
+) where
+
+import Data.Bifunctor
+import Data.Binary
+import Data.Hashable
+import Data.HashMap.Strict (HashMap)
+import qualified Data.HashMap.Strict as HashMap
+import Data.Set (Set)
+import qualified Data.Set as Set
+import Data.Text (Text)
+import qualified Data.Text as Text
+import GHC.Generics
+
+import Glean.Angle.Types
+import Glean.Schema.Util
+
+-- | Identify a schema
+data SchemaRef = SchemaRef Name Version
+  deriving (Eq, Ord, Show, Generic)
+
+showSchemaRef :: SchemaRef -> Text
+showSchemaRef (SchemaRef name version) =
+  name <> "." <> Text.pack (show version)
+
+instance Hashable SchemaRef
+
+-- | The target of a reference
+data RefTarget p t = RefPred p | RefType t
+  deriving (Eq, Ord, Show, Generic, Functor)
+
+instance (Binary p, Binary t) => Binary (RefTarget p t)
+
+instance Bifunctor RefTarget where
+  bimap f _ (RefPred p) = RefPred (f p)
+  bimap _ g (RefType t) = RefType (g t)
+
+type RefResolved = RefTarget PredicateRef TypeRef
+
+showRefTarget :: (ShowRef t, ShowRef p) => RefTarget p t -> Text
+showRefTarget (RefType t) = showRef t
+showRefTarget (RefPred p) = showRef p
+
+-- | An environment that describes which names are in scope.
+type NameEnv t = HashMap SourceRef (Set t)
+
+mapNameEnv :: Ord b => (a -> Maybe b) -> NameEnv a -> NameEnv b
+mapNameEnv f = fmap g
+  where
+  g set = Set.fromList [ b | a <- Set.toList set, Just b <- [f a] ]
+
+data LookupResult t
+  = OutOfScope
+  | Ambiguous [t]
+  | ResolvesTo t
+
+lookupResultToEither
+  :: (ShowRef t, ShowRef p)
+  => SourceRef
+  -> LookupResult (RefTarget p t)
+  -> Either Text (RefTarget p t)
+lookupResultToEither ref OutOfScope =
+  Left $ "not in scope: " <> showRef ref
+lookupResultToEither ref (Ambiguous targets) =
+  Left $ showRef ref <> " is ambiguous. It could refer to: " <>
+      Text.intercalate ", " (map showRefTarget targets)
+lookupResultToEither _ (ResolvesTo target) = Right target
+
+-- | Resolve a name (@SourceRef@) with respect to a scope (@NameEnv@)
+resolveRef :: NameEnv t -> SourceRef -> LookupResult t
+resolveRef scope ref = resolveRefFiltered scope (const True) ref
+
+resolveRefFiltered :: NameEnv t -> (t -> Bool) -> SourceRef -> LookupResult t
+resolveRefFiltered scope p ref =
+  case HashMap.lookup ref scope of
+    Nothing -> OutOfScope
+    Just set -> case filter p $ Set.toList set of
+      [] -> OutOfScope
+      [one] -> ResolvesTo one
+      many -> Ambiguous many
+
+-- Resolved abstract syntax
+
+type ResolvedType = Type_ SrcSpan PredicateRef TypeRef
+type ResolvedFieldDef = FieldDef_ SrcSpan PredicateRef TypeRef
+type ResolvedTypeDef = TypeDef_ SrcSpan PredicateRef TypeRef
+type ResolvedPredicateDef = PredicateDef_ SrcSpan SrcSpan PredicateRef TypeRef
+type ResolvedDerivingDef = DerivingDef_ SrcSpan SrcSpan PredicateRef TypeRef
+type ResolvedPat = SourcePat_ SrcSpan SrcSpan PredicateRef TypeRef
+type ResolvedStatement = SourceStatement_ SrcSpan SrcSpan PredicateRef TypeRef
+type ResolvedQuery = SourceQuery_ SrcSpan SrcSpan PredicateRef TypeRef
+type ResolvedDeriving = DerivingInfo ResolvedQuery
+
+-- Versions of the above types abstracted over the source spans
+type ResolvedPat' s = SourcePat_ s s PredicateRef TypeRef
+type ResolvedStatement' s = SourceStatement_ s s PredicateRef TypeRef
+type ResolvedQuery' s = SourceQuery_ s s PredicateRef TypeRef
+type ResolvedDeriving' s = DerivingInfo (ResolvedQuery' s)
+type ResolvedTypeDef' s = TypeDef_ s PredicateRef TypeRef
+type ResolvedType' s = Type_ s PredicateRef TypeRef
+type ResolvedFieldDef' s = FieldDef_ s PredicateRef TypeRef
+-- | A 'ResolvedSchema' is used during schema resolution to resolve
+-- schemas that import or inherit from this schema.
+data ResolvedSchema p t = ResolvedSchema
+  { resolvedSchemaName :: Name
+  , resolvedSchemaVersion :: Version
+  , resolvedSchemaAngleVersion :: AngleVersion
+  , resolvedSchemaTypes :: HashMap TypeRef (TypeDef_ SrcSpan p t )
+    -- ^ types that are defined by this schema
+  , resolvedSchemaReExportedTypes :: HashMap TypeRef (TypeDef_ SrcSpan p t )
+    -- ^ types that are inherited and re-exported by this schema
+  , resolvedSchemaPredicates ::
+      HashMap PredicateRef (PredicateDef_ SrcSpan SrcSpan p t)
+    -- ^ predicates that are defined by this schema
+  , resolvedSchemaReExportedPredicates ::
+      HashMap PredicateRef (PredicateDef_ SrcSpan SrcSpan p t)
+    -- ^ predicates that are inherited and re-exported by this schema
+  , resolvedSchemaUnqualScope :: NameEnv (RefTarget p t)
+    -- ^ The scope exposed by this schema, unqualified. This will be
+    -- used when the schema is inherited.
+  , resolvedSchemaQualScope :: NameEnv (RefTarget p t)
+    -- ^ The scope exposed by this schema, qualified. This will be
+    -- used when the schema is inherited or imported.
+  , resolvedSchemaDeriving ::
+      HashMap PredicateRef (DerivingDef_ SrcSpan SrcSpan p t)
+    -- ^ deriving declarations, for predicates defined in this schema
+    -- or an inherited schema.
+  , resolvedSchemaEvolves :: Set SchemaRef
+    -- ^ schemas evolves by this schema.
+  }
+
+type ResolvedSchemaRef = ResolvedSchema PredicateRef TypeRef
+
+schemaRef :: ResolvedSchema p t -> SchemaRef
+schemaRef ResolvedSchema{..} =
+  SchemaRef resolvedSchemaName resolvedSchemaVersion
+
+-- | A set of schemas after name resolution
+data ResolvedSchemas = ResolvedSchemas
+  { schemasHighestVersion :: Maybe Version
+  , schemasResolved :: [ResolvedSchemaRef]
+    -- ^ Resolved schemas in dependency order
+  }
diff --git a/glean/angle/Glean/Schema/Util.hs b/glean/angle/Glean/Schema/Util.hs
new file mode 100644
--- /dev/null
+++ b/glean/angle/Glean/Schema/Util.hs
@@ -0,0 +1,115 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+-- | Utilities for working with Glean.Angle.Types
+module Glean.Schema.Util
+  ( unit
+  , lowerBool
+  , lowerMaybe
+  , lowerEnum
+  , boolFields
+  , maybeFields
+  , enumFields
+  , tupleSchema
+  , parseRef
+  , convertRef
+  , ShowRef(..)
+  , NameSpaces
+  , splitDot
+  , SourceRef(..)
+  ) where
+
+import Data.Text (Text)
+import qualified Data.Text as Text
+import TextShow
+
+import Util.Text
+
+import Glean.Angle.Types
+
+unit :: Type_ s a b
+unit = RecordTy []
+
+-- | A maybe type is equivalent to a sum type with {nothing,just} fields.
+lowerMaybe :: Type_ s a b -> Type_ s a b
+lowerMaybe param = SumTy (maybeFields param)
+
+maybeFields :: Type_ s a b -> [FieldDef_ s a b]
+maybeFields param =
+  [ FieldDef "nothing" unit
+  , FieldDef "just" param ]
+
+lowerBool :: Type_ s a b
+lowerBool = SumTy boolFields
+
+boolFields :: [FieldDef_ s a b]
+boolFields = [FieldDef "false" unit, FieldDef "true" unit]
+
+lowerEnum :: [Name] -> Type_ s a b
+lowerEnum ides = SumTy (enumFields ides)
+
+enumFields :: [Name] -> [FieldDef_ s a b]
+enumFields ides = [FieldDef ide unit | ide <- ides]
+
+tupleSchema :: [Type_ s a b] -> Type_ s a b
+tupleSchema tys = RecordTy
+  [ FieldDef (tupleField <> Text.pack (show n)) ty
+  | (n,ty) <- zip [0::Int ..] tys ]
+
+-- | Parse a predicate reference of the form @<predicate>[.<version>]@
+-- If the version is omitted, it defaults to the most recent version
+-- of that predicate.
+--
+-- This syntax is used in:
+--  * The JSON format for writing facts
+--  * Referring to predicates in the shell
+--
+parseRef :: Text -> SourceRef
+parseRef txt
+  | Right ver <- textToInt after =
+    SourceRef (Text.init before) (Just (fromIntegral ver))
+  | otherwise =
+    SourceRef txt Nothing
+  where
+   (before,after) = Text.breakOnEnd "." txt
+
+-- | Convert from a 'PredicateRef' (oftem from 'getName') to 'SourceRef'
+-- (which is guaranteed to have a 'Version')
+convertRef :: PredicateRef -> SourceRef
+convertRef p = SourceRef
+  { sourceRefName = predicateRef_name p
+  , sourceRefVersion = Just (fromIntegral (predicateRef_version p)) }
+
+class ShowRef t where
+  showRef :: t -> Text
+
+-- | Render the SourceRef to @name@ or @name.ver@
+instance ShowRef SourceRef where
+  showRef (SourceRef name Nothing) = name
+  showRef (SourceRef name (Just ver)) = name <> "." <> showt ver
+
+instance ShowRef TypeRef where
+  showRef (TypeRef name ver) = name <> "." <> showt ver
+
+instance ShowRef PredicateRef where
+  showRef = showRef . convertRef
+
+instance ShowRef PredicateId where
+  showRef (PredicateId name hash) = showRef name <> "." <> Text.pack (show hash)
+
+instance ShowRef TypeId where
+  showRef (TypeId name hash) = showRef name <> "." <> Text.pack (show hash)
+
+type NameSpaces = [Text]
+
+splitDot :: Name -> (NameSpaces, Text)
+splitDot x =
+  let pieces = Text.split ('.' ==) x
+  in case reverse pieces of
+      [] -> ([], "")
+      x : ys -> (reverse ys, x)
diff --git a/glean/backend-api/Glean/Backend/Retry.hs b/glean/backend-api/Glean/Backend/Retry.hs
new file mode 100644
--- /dev/null
+++ b/glean/backend-api/Glean/Backend/Retry.hs
@@ -0,0 +1,121 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module Glean.Backend.Retry
+  ( RetryWritesBackend(..)
+  , backendRetryWrites
+  , RetryReadsBackend(..)
+  , backendRetryReads
+  ) where
+
+import Glean.Backend.Types
+import Glean.Util.RetryChannelException
+import Glean.Util.Some
+
+data RetryWritesBackend = RetryWritesBackend RetryPolicy (Some Backend)
+
+-- | Make a 'Backend' that will retry all write-related operations
+-- according to the given 'RetryPolicy'
+backendRetryWrites :: Backend b => b -> RetryPolicy -> RetryWritesBackend
+backendRetryWrites backend policy = RetryWritesBackend policy (Some backend)
+
+instance Backend RetryWritesBackend where
+  queryFact (RetryWritesBackend _ backend) = queryFact backend
+  factIdRange (RetryWritesBackend _ backend) = factIdRange backend
+  getSchemaInfo (RetryWritesBackend _ backend) = getSchemaInfo backend
+  validateSchema (RetryWritesBackend _ backend) = validateSchema backend
+  predicateStats (RetryWritesBackend _ backend) = predicateStats backend
+  listDatabases (RetryWritesBackend _ backend) = listDatabases backend
+  getDatabase (RetryWritesBackend _ backend) = getDatabase backend
+  userQueryFacts (RetryWritesBackend _ backend) = userQueryFacts backend
+  userQuery (RetryWritesBackend _ backend) = userQuery backend
+  userQueryBatch (RetryWritesBackend _ backend) = userQueryBatch backend
+  deriveStored (RetryWritesBackend _ backend) = deriveStored backend
+
+  kickOffDatabase (RetryWritesBackend policy backend) kickOff =
+    retryChannelExceptions policy $ kickOffDatabase backend kickOff
+  finishDatabase (RetryWritesBackend policy backend) repo =
+    retryChannelExceptions policy $ finishDatabase backend repo
+  finalizeDatabase (RetryWritesBackend policy backend) repo =
+    retryChannelExceptions policy $ finalizeDatabase backend repo
+  updateProperties (RetryWritesBackend policy backend) repo props vals =
+    retryChannelExceptions policy $ updateProperties backend repo props vals
+  completePredicates_ (RetryWritesBackend policy backend) repo preds =
+    retryChannelExceptions policy $ completePredicates_ backend repo preds
+
+  restoreDatabase (RetryWritesBackend _ backend) = restoreDatabase backend
+  deleteDatabase (RetryWritesBackend _ backend) = deleteDatabase backend
+
+  enqueueBatch (RetryWritesBackend policy backend) batch =
+    retryChannelExceptions policy $ enqueueBatch backend batch
+  enqueueJsonBatch (RetryWritesBackend policy backend) repo batch =
+    retryChannelExceptions policy $ enqueueJsonBatch backend repo batch
+  enqueueBatchDescriptor (RetryWritesBackend policy backend)
+    repo batch waitPolicy =
+      retryChannelExceptions policy
+        $ enqueueBatchDescriptor backend repo batch waitPolicy
+  pollBatch (RetryWritesBackend policy backend) handle =
+    retryChannelExceptions policy $ pollBatch backend handle
+
+  displayBackend (RetryWritesBackend _ backend) = displayBackend backend
+  hasDatabase (RetryWritesBackend _ backend) = hasDatabase backend
+  schemaId (RetryWritesBackend _ backend) = schemaId backend
+  usingShards (RetryWritesBackend _ backend) = usingShards backend
+  initGlobalState (RetryWritesBackend _ backend) = initGlobalState backend
+
+data RetryReadsBackend = RetryReadsBackend RetryPolicy (Some Backend)
+
+-- | Make a 'Backend' that will retry all read-related operations
+-- according to the given 'RetryPolicy'
+backendRetryReads :: Backend b => b -> RetryPolicy -> RetryReadsBackend
+backendRetryReads backend policy = RetryReadsBackend policy (Some backend)
+
+instance Backend RetryReadsBackend where
+  queryFact (RetryReadsBackend policy backend) repo id =
+    retryChannelExceptions policy $ queryFact backend repo id
+  factIdRange (RetryReadsBackend policy backend) repo =
+    retryChannelExceptions policy $ factIdRange backend repo
+  getSchemaInfo (RetryReadsBackend policy backend) repo opts =
+    retryChannelExceptions policy $ getSchemaInfo backend repo opts
+  validateSchema (RetryReadsBackend policy backend) req =
+    retryChannelExceptions policy $ validateSchema backend req
+  predicateStats (RetryReadsBackend policy backend) repo opts =
+    retryChannelExceptions policy $ predicateStats backend repo opts
+  listDatabases (RetryReadsBackend policy backend) req =
+    retryChannelExceptions policy $ listDatabases backend req
+  getDatabase (RetryReadsBackend policy backend) repo =
+    retryChannelExceptions policy $ getDatabase backend repo
+  userQueryFacts (RetryReadsBackend policy backend) repo req =
+    retryChannelExceptions policy $ userQueryFacts backend repo req
+  userQuery (RetryReadsBackend policy backend) repo req =
+    retryChannelExceptions policy $ userQuery backend repo req
+  userQueryBatch (RetryReadsBackend policy backend) repo req =
+    retryChannelExceptions policy $ userQueryBatch backend repo req
+  deriveStored (RetryReadsBackend _ backend) = deriveStored backend
+
+  kickOffDatabase (RetryReadsBackend _ backend) = kickOffDatabase backend
+  finishDatabase (RetryReadsBackend _ backend) = finishDatabase backend
+  finalizeDatabase (RetryReadsBackend _ backend) = finalizeDatabase backend
+  updateProperties (RetryReadsBackend _ backend) = updateProperties backend
+  completePredicates_ (RetryReadsBackend _ backend) =
+    completePredicates_ backend
+
+  restoreDatabase (RetryReadsBackend _ backend) = restoreDatabase backend
+  deleteDatabase (RetryReadsBackend _ backend) = deleteDatabase backend
+
+  enqueueBatch (RetryReadsBackend _ backend) = enqueueBatch backend
+  enqueueJsonBatch (RetryReadsBackend _ backend) = enqueueJsonBatch backend
+  enqueueBatchDescriptor (RetryReadsBackend _ backend) =
+    enqueueBatchDescriptor backend
+  pollBatch (RetryReadsBackend _ backend) = pollBatch backend
+
+  displayBackend (RetryReadsBackend _ backend) = displayBackend backend
+  hasDatabase (RetryReadsBackend _ backend) = hasDatabase backend
+  schemaId (RetryReadsBackend _ backend) = schemaId backend
+  usingShards (RetryReadsBackend _ backend) = usingShards backend
+  initGlobalState (RetryReadsBackend _ backend) = initGlobalState backend
diff --git a/glean/backend-api/Glean/Backend/Types.hs b/glean/backend-api/Glean/Backend/Types.hs
new file mode 100644
--- /dev/null
+++ b/glean/backend-api/Glean/Backend/Types.hs
@@ -0,0 +1,470 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+{-# LANGUAGE TypeApplications #-}
+module Glean.Backend.Types
+  (
+    -- * Types
+    Backend(..)
+  , StackedDbOpts(..)
+  , LogDerivationResult
+  , Query(..)
+
+    -- * Operations
+  , SchemaPredicates
+  , loadPredicates
+  , loadPredicatesForSchema
+  , databases
+  , localDatabases
+  , create
+  , finish
+  , fillDatabase
+  , finalize
+  , completePredicates
+  , untilDone
+
+    -- * Haxl
+  , GleanGet(..)
+  , GleanQuery(..)
+  , GleanFetcher
+  , GleanQueryer
+  , Haxl.State(..)
+  , QueryResult(..)
+  , AppendList(..)
+  , fromAppendList
+
+    -- * Shards
+  , dbShard
+  , dbShardWord
+  ) where
+
+import qualified Data.ByteString.Unsafe as B
+import Control.Concurrent
+import Control.Exception
+import Control.Monad
+import Data.Bits
+import Data.Default
+import Data.Hashable
+import qualified Data.HashMap.Strict as HashMap
+import Data.Map (Map)
+import qualified Data.Map as Map
+import Data.Monoid
+import Data.Text (Text)
+import qualified Data.Text as Text
+import qualified Data.Text.Encoding as Text
+import Data.Word
+import Data.Typeable
+import Foreign.Ptr
+import GHC.Fingerprint
+import qualified Haxl.Core as Haxl
+import System.IO.Unsafe
+
+import Util.Control.Exception
+import Util.Time (DiffTimePoints)
+
+import Glean.Typed
+import qualified Glean.Types as Thrift
+import Glean.Util.Some
+import Glean.Util.ThriftService (DbShard)
+import Glean.Types
+import Data.Either
+
+data StackedDbOpts
+  = IncludeBase
+  | ExcludeBase
+  deriving (Eq, Show)
+
+-- |
+-- An abstraction over Glean's Thrift API. This allows client code
+-- to work with either a local or remote backend, chosen at runtime.
+--
+class Backend a where
+  queryFact :: a -> Thrift.Repo -> Thrift.Id -> IO (Maybe Thrift.Fact)
+  factIdRange :: a -> Thrift.Repo -> IO Thrift.FactIdRange
+  getSchemaInfo :: a -> Maybe Thrift.Repo -> Thrift.GetSchemaInfo
+    -> IO Thrift.SchemaInfo
+  validateSchema :: a -> Thrift.ValidateSchema -> IO ()
+  predicateStats :: a -> Thrift.Repo -> StackedDbOpts
+    -> IO (Map Thrift.Id Thrift.PredicateStats)
+  listDatabases :: a -> Thrift.ListDatabases -> IO Thrift.ListDatabasesResult
+  getDatabase :: a -> Thrift.Repo -> IO Thrift.GetDatabaseResult
+
+  userQueryFacts :: a -> Thrift.Repo -> Thrift.UserQueryFacts
+    -> IO Thrift.UserQueryResults
+  userQuery :: a -> Thrift.Repo -> Thrift.UserQuery
+    -> IO Thrift.UserQueryResults
+  userQueryBatch :: a -> Thrift.Repo -> Thrift.UserQueryBatch
+    -> IO [Thrift.UserQueryResultsOrException]
+
+  deriveStored :: a -> LogDerivationResult -> Thrift.Repo
+    -> Thrift.DerivePredicateQuery -> IO Thrift.DerivationStatus
+
+  kickOffDatabase :: a -> Thrift.KickOff -> IO Thrift.KickOffResponse
+  finishDatabase :: a -> Thrift.Repo -> IO Thrift.FinishDatabaseResponse
+  finalizeDatabase :: a -> Thrift.Repo -> IO Thrift.FinalizeResponse
+
+  updateProperties
+    :: a
+    -> Thrift.Repo
+    -> Thrift.DatabaseProperties
+    -> [Text]
+    -> IO Thrift.UpdatePropertiesResponse
+
+  completePredicates_
+    :: a
+    -> Thrift.Repo
+    -> Thrift.CompletePredicates
+    -> IO Thrift.CompletePredicatesResponse
+
+  -- | Request a backed up database (specified via its backup locator) to be
+  -- made available. This call doesn't wait until the database actually becomes
+  -- available, it only issues the request.
+  --
+  -- This might (for local databases) or might not (for databases on a Thrift
+  -- server) return an STM action that waits for the restore operation.
+  restoreDatabase :: a -> Text -> IO ()
+
+  -- For a local database this will delete the specified repo
+  deleteDatabase :: a -> Thrift.Repo -> IO Thrift.DeleteDatabaseResult
+
+  -- Enqueue a batch for writing
+  enqueueBatch :: a -> Thrift.ComputedBatch -> IO Thrift.SendResponse
+
+  -- Enqueue a JSON batch for writing
+  enqueueJsonBatch
+    :: a
+    -> Thrift.Repo
+    -> Thrift.SendJsonBatch
+    -> IO Thrift.SendJsonBatchResponse
+
+  -- Enqueue a batch descriptor to be downloaded and written
+  enqueueBatchDescriptor
+    :: a
+    -> Thrift.Repo
+    -> Thrift.EnqueueBatch
+    -> Thrift.EnqueueBatchWaitPolicy
+    -> IO Thrift.EnqueueBatchResponse
+
+  -- Poll the status of a write batch
+  pollBatch :: a -> Thrift.Handle -> IO Thrift.FinishResponse
+
+  -- | Render for debugging
+  displayBackend :: a -> String
+
+  -- | For a given 'Repo', check whether any servers have the DB.  If
+  -- the backend is remote and using shards, this should check whether
+  -- any servers are advertising the appropriate shard.
+  hasDatabase :: a -> Thrift.Repo -> IO Bool
+
+  -- | The schema version the client wants to use. This is sent along
+  -- with queries.
+  schemaId :: a -> Maybe Thrift.SchemaId
+
+  -- | True if this is a distributed backend, and different servers
+  -- may have different DBs. If this returns True, then `hasDatabase`
+  -- can be used to check the availability of a DB.
+  usingShards :: a -> Bool
+
+  -- | Initialise the Haxl state for this Backend.
+  initGlobalState :: a -> IO (Haxl.State GleanGet, Haxl.State GleanQuery)
+
+
+-- | The exception includes the length of time from start to error
+type LogDerivationResult =
+  Either (DiffTimePoints, SomeException) Thrift.UserQueryStats -> IO ()
+
+instance Backend (Some Backend) where
+  queryFact (Some backend) = queryFact backend
+  factIdRange (Some backend) = factIdRange backend
+  getSchemaInfo (Some backend) = getSchemaInfo backend
+  validateSchema (Some backend) = validateSchema backend
+  predicateStats (Some backend) = predicateStats backend
+  listDatabases (Some backend) = listDatabases backend
+  getDatabase (Some backend) = getDatabase backend
+  userQueryFacts (Some backend) = userQueryFacts backend
+  userQuery (Some backend) = userQuery backend
+  userQueryBatch (Some backend) = userQueryBatch backend
+  deriveStored (Some backend) = deriveStored backend
+
+  kickOffDatabase (Some backend) = kickOffDatabase backend
+  finishDatabase (Some backend) = finishDatabase backend
+  finalizeDatabase (Some backend) = finalizeDatabase backend
+  updateProperties (Some backend) = updateProperties backend
+  completePredicates_ (Some backend) = completePredicates_ backend
+
+  restoreDatabase (Some backend) = restoreDatabase backend
+  deleteDatabase (Some backend) = deleteDatabase backend
+
+  enqueueBatch (Some backend) = enqueueBatch backend
+  enqueueJsonBatch (Some backend) = enqueueJsonBatch backend
+  enqueueBatchDescriptor (Some backend) = enqueueBatchDescriptor backend
+  pollBatch (Some backend) = pollBatch backend
+  displayBackend (Some backend) = displayBackend backend
+  hasDatabase (Some backend) = hasDatabase backend
+  schemaId (Some backend) = schemaId backend
+  usingShards (Some backend) = usingShards backend
+  initGlobalState (Some backend) = initGlobalState backend
+
+-- -----------------------------------------------------------------------------
+-- Functionality built on Backend
+
+loadPredicates
+  :: Backend a
+  => a
+  -> Thrift.Repo
+  -> [SchemaPredicates]
+  -> IO Predicates
+loadPredicates backend repo refs =
+  makePredicates refs <$> getSchemaInfo backend (Just repo)
+    def { Thrift.getSchemaInfo_omit_source = True }
+
+loadPredicatesForSchema :: Backend a => a -> SchemaId -> IO Predicates
+loadPredicatesForSchema backend schemaId = do
+  info <- getSchemaInfo backend Nothing
+    def {
+      Thrift.getSchemaInfo_select = Thrift.SelectSchema_schema_id schemaId,
+      Thrift.getSchemaInfo_omit_source = True
+    }
+  return $ makePredicates [Map.elems (Thrift.schemaInfo_predicateIds info)] info
+
+databases :: Backend a => a -> IO [Thrift.Database]
+databases be =
+  Thrift.listDatabasesResult_databases <$>
+    listDatabases be def { Thrift.listDatabases_includeBackups = True }
+
+localDatabases :: Backend a => a -> IO [Thrift.Database]
+localDatabases be =
+  Thrift.listDatabasesResult_databases <$>
+    listDatabases be def { Thrift.listDatabases_includeBackups = False }
+
+-- | Create a database and run the supplied IO action to write data
+-- into it. When the IO action returns, the DB will be marked complete
+-- and cannot be modified further.
+fillDatabase
+  :: Backend a
+  => a
+    -- ^ The backend
+  -> Repo
+    -- ^ The repo to create
+  -> Maybe Dependencies
+    -- ^ Optionally stack the new DB on another DB
+  -> IO ()
+    -- ^ What to do if the DB already exists. @return ()@ to continue,
+    -- or @throwIO@ to forbid.
+  -> IO b
+    -- ^ Caller-supplied action to write data into the DB.
+  -> IO b
+fillDatabase env repo maybeDeps ifexists action =
+  tryBracket
+    (do
+      exists <- create env repo maybeDeps
+      when exists ifexists
+    )
+    (\_ ex -> do
+      when (isRight ex) $ do
+        finish env repo
+    )
+    (const action)
+
+-- | Create a database. The schema ID is set from the Backend.
+create
+  :: Backend a
+  => a
+  -> Repo
+  -> Maybe Dependencies
+  -> IO Bool  -- ^ Returns 'True' if the DB already existed
+create backend repo maybeDeps = do
+  r <- kickOffDatabase backend def
+    { kickOff_repo = repo
+    , kickOff_properties = HashMap.fromList $
+        [ ("glean.schema_id", id)
+        | Just (SchemaId id) <- [schemaId backend]
+        ]
+    , kickOff_dependencies = maybeDeps
+    }
+  return (kickOffResponse_alreadyExists r)
+
+-- | Finish a DB created with 'create'
+finish
+  :: Backend a
+  => a
+  -> Repo
+  -> IO ()
+finish backend repo = do
+  void $ finishDatabase backend repo
+  finalize backend repo
+
+-- | Wait for a database to finish finalizing and enter the "complete"
+-- state after all writing has finished. Before the database is
+-- complete, it may be queried but a stacked database cannot be
+-- created on top of it.
+finalize :: Backend a => a -> Repo -> IO ()
+finalize env repo =
+  void $ untilDone $ finalizeDatabase env repo
+
+-- | Notify the server when non-derived predicates are complete. This
+-- must be called before derivedStored.
+completePredicates :: Backend a => a -> Repo -> CompletePredicates -> IO ()
+completePredicates env repo preds =
+  void $ untilDone $ completePredicates_ env repo preds
+
+untilDone :: IO a -> IO a
+untilDone io = loop
+  where
+  loop = do
+    r <- try io
+    case r of
+      Right a -> return a
+      Left (Retry n) -> do
+        threadDelay (truncate (n * 1000000))
+        loop
+
+-- -----------------------------------------------------------------------------
+-- Query type
+
+-- This is here because the Haxl types below depend on it.
+
+-- | A query that can be performed by 'runQuery'. Build using 'query'.
+data Query a = Type a => Query
+  { querySpec :: UserQuery
+  }
+
+instance Show (Query a) where
+  show (Query spec) = show spec
+
+instance Eq (Query a) where
+  Query spec1 == Query spec2 = spec1 == spec2
+
+instance Hashable (Query a) where
+  hashWithSalt salt (Query spec) = hashWithSalt salt spec
+
+-- -----------------------------------------------------------------------------
+-- Haxl
+
+data GleanGet p where
+  Get
+    :: (Typeable p, Show p, Predicate p)
+    => {-# UNPACK #-} !(IdOf p)
+    -> Bool
+    -> Repo
+    -> GleanGet p
+  GetKey
+    :: (Typeable p, Show p, Predicate p)
+    => {-# UNPACK #-} !(IdOf p)
+    -> Bool
+    -> Repo
+    -> GleanGet (KeyType p)
+
+deriving instance Show (GleanGet a)
+instance Haxl.ShowP GleanGet where showp = show
+
+instance Eq (GleanGet p) where
+  (Get p rec repo) == (Get q rec' repo') =
+    p == q && rec == rec' && repo == repo'
+  (GetKey (p :: IdOf a) rec repo) == (GetKey (q :: IdOf b) rec' repo')
+    | Just Refl <- eqT @a @b = p == q && rec == rec' && repo == repo'
+    -- the KeyTypes being equal doesn't tell us that the predicates are
+    -- equal, so we need to check that with eqT here.
+  _ == _ = False
+
+instance Hashable (GleanGet a) where
+  hashWithSalt salt (Get p rec repo) =
+    hashWithSalt salt (0::Int, typeOf p, p, rec, repo)
+  hashWithSalt salt (GetKey p rec repo) =
+    hashWithSalt salt (1::Int, typeOf p, p, rec, repo)
+
+instance Haxl.DataSourceName GleanGet where
+  dataSourceName _ = "GleanGet"
+
+type GleanFetcher = Haxl.PerformFetch GleanGet
+
+instance Haxl.StateKey GleanGet where
+  data State GleanGet = GleanGetState GleanFetcher
+
+instance Haxl.DataSource u GleanGet where
+  fetch (GleanGetState fetcher) _ _ = fetcher
+
+{-
+Why is streaming handled behind the datasource abstraction instead of
+exposing resumable queries as a request?  Because exposing resumable
+queries as a Haxl data fetch would mean hashing the continuation and
+keeping it in the Haxl cache.
+-}
+
+data GleanQuery a where
+  QueryReq
+    :: (Show q, Typeable q, QueryResult q r)
+    => Query q   -- The query
+    -> Repo
+    -> Bool -- stream all results?
+    -> GleanQuery (r, Bool)
+
+-- | List with O(1) append and O(n) conversion to [], aka DList
+newtype AppendList a = AppendList ([a] -> [a])
+
+instance Semigroup (AppendList a) where
+  AppendList x <> AppendList y = AppendList (x . y)
+
+instance Monoid (AppendList a) where
+  mempty = AppendList id
+
+fromAppendList :: AppendList a -> [a]
+fromAppendList (AppendList f) = f []
+
+instance Show a => Show (AppendList a) where
+  show = show . fromAppendList
+
+class Monoid r => QueryResult q r where
+  fromResults :: [q] -> r
+
+instance QueryResult q (AppendList q) where
+  fromResults qs = AppendList (qs++)
+
+instance QueryResult q (Sum Int) where
+  fromResults = Sum . length
+
+deriving instance Show (GleanQuery q)
+instance Haxl.ShowP GleanQuery where showp = show
+
+instance Eq (GleanQuery r) where
+  QueryReq (q1 :: Query a) repo1 s1 == QueryReq (q2 :: Query b) repo2 s2
+    | Just Refl <- eqT @a @b = q1 == q2 && repo1 == repo2 && s1 == s2
+  _ == _ = False
+
+instance Hashable (GleanQuery q) where
+  hashWithSalt salt (QueryReq q s repo) = hashWithSalt salt (q,s,repo)
+
+
+instance Haxl.DataSourceName GleanQuery where
+  dataSourceName _ = "GleanQuery"
+
+type GleanQueryer = Haxl.PerformFetch GleanQuery
+
+instance Haxl.StateKey GleanQuery where
+  data State GleanQuery = GleanQueryState GleanQueryer
+
+instance Haxl.DataSource u GleanQuery where
+  fetch (GleanQueryState queryer) _ _ = queryer
+
+-- -----------------------------------------------------------------------------
+-- Shards
+
+dbShard :: Thrift.Repo -> DbShard
+dbShard = Text.pack . show . dbShardWord
+
+dbShardWord :: Thrift.Repo -> Word64
+dbShardWord Thrift.Repo{..} =
+  unsafeDupablePerformIO $ B.unsafeUseAsCStringLen repo $ \(ptr,len) -> do
+      -- Use GHC's md5 binding. If this ever changes then the test in
+      -- hs/tests/TestShard.hs will detect it.
+    Fingerprint w _ <- fingerprintData (castPtr ptr) len
+    return (w `shiftR` 1)
+       -- SR doesn't like shards >= 0x8000000000000000
+  where
+  repo = Text.encodeUtf8 repo_name <> "/" <> Text.encodeUtf8 repo_hash
+
diff --git a/glean/backend-api/Glean/Query/Thrift.hs b/glean/backend-api/Glean/Query/Thrift.hs
new file mode 100644
--- /dev/null
+++ b/glean/backend-api/Glean/Query/Thrift.hs
@@ -0,0 +1,153 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module Glean.Query.Thrift
+  ( -- * Types
+    Query
+    -- * Perform query
+  , runQuery
+  , runQuery_
+  , runQueryPage
+    -- ** streaming
+  , runQueryMapPages_
+  , runQueryEach
+  , runQueryEachBatch
+    -- * Query combinators
+  , query
+  , angle
+  , angleData
+  , keys
+  , recursive
+  , limit
+  , limitBytes
+  , limitTime
+  , expanding
+  , store
+  , allFacts
+    -- * Support
+  , displayQuery
+  ) where
+
+import Control.Concurrent.Async
+import Control.Monad
+import Data.Default
+import Data.Maybe
+
+import Util.Log.Text
+
+import Glean.Typed.Binary
+import Glean.Types as Thrift
+import Glean.Backend.Types (Backend(..))
+import Glean.Query.Thrift.Internal
+import Glean.Write.SendBatch
+
+-- | Perform a query, fetching all results
+runQuery_
+  :: forall q backend . (Backend backend)
+  => backend    -- ^ Backend to use to perform the query
+  -> Repo       -- ^ Repo to query
+  -> Query q    -- ^ The query
+  -> IO [q]
+runQuery_ backend repo query = do
+  r <- runQueryEachBatch backend repo query id $
+    \acc page -> return (acc . (page++))
+  return (r [])
+
+-- | Perform a query, fetching results up to the limits specified by
+-- the query ('limit', 'limitBytes', 'limitTime').
+runQuery
+  :: forall q backend . (Backend backend)
+  => backend    -- ^ Backend to use to perform the query
+  -> Repo       -- ^ Repo to query
+  -> Query q    -- ^ The query
+  -> IO ([q], Bool)
+       -- ^ The 'Bool' is 'True' if the query results were truncated
+       -- by a limit (either a user-supplied limit, or one imposed by
+       -- the query server).
+runQuery backend repo query = do
+  (io, cont) <- runQueryPage backend repo Nothing query
+  results <- io
+  return (results, isJust cont)
+
+
+-- | Perform a query, fetching results up to the limits specified by
+-- the query ('limit', 'limitBytes', 'limitTime'), and returning a
+-- continuation to fetch more results if a limit was hit.
+runQueryPage
+  :: forall q backend . (Backend backend)
+  => backend
+  -> Repo
+  -> Maybe UserQueryCont
+  -> Query q
+  -> IO (IO [q], Maybe UserQueryCont)
+
+runQueryPage be repo cont (Query query) = do
+  let
+    query' = query
+      { userQuery_options = Just
+          (fromMaybe def (userQuery_options query))
+            { userQueryOptions_continuation = cont }
+      , userQuery_encodings = [
+          UserQueryEncoding_listbin def,
+          UserQueryEncoding_bin def
+        ]
+      }
+  UserQueryResults{..} <- userQuery be repo query'
+  mapM_ reportUserQueryStats userQueryResults_stats
+  mapM_ (vlog 1) userQueryResults_diagnostics
+  mapM_ (waitBatch be) userQueryResults_handle
+  let results = decodeResults userQueryResults_results decodeAsFact
+  return (results, userQueryResults_continuation)
+
+
+-- | Perform a query and map an IO function over the results, running the
+-- query over multiple pages of results if necessary.
+runQueryMapPages_
+  :: forall q backend . (Backend backend)
+  => backend
+  -> Repo
+  -> ([q] -> IO ())
+  -> Query q
+  -> IO ()
+runQueryMapPages_ be repo fn query =
+  runQueryEachBatch be repo query () (const fn)
+
+-- | Perform a query, by pages, and map a state function over each
+-- result in each page. The query is pipelined so that each page of
+-- results are decoded and processed while the next page is being
+-- fetched.
+runQueryEach
+  :: forall q backend s . (Backend backend)
+  => backend
+  -> Repo
+  -> Query q
+  -> s
+  -> (s -> q -> IO s)
+  -> IO s
+runQueryEach be repo query s fn =
+  runQueryEachBatch be repo query s (foldM fn)
+
+-- | Like runQueryEach, but process results in batches.
+runQueryEachBatch
+  :: forall q backend s . (Backend backend)
+  => backend
+  -> Repo
+  -> Query q
+  -> s
+  -> (s -> [q] -> IO s)
+  -> IO s
+runQueryEachBatch be repo query init f = do
+  (page, cont) <- runQueryPage be repo Nothing query
+  go page cont init
+  where
+  go page Nothing s = f s =<< page
+  go page cont@Just{} s = do
+    ((nextPage, nextCont), s2) <- concurrently
+      (runQueryPage be repo cont query)
+      (f s =<< page)
+    go nextPage nextCont s2
diff --git a/glean/backend-api/Glean/Query/Thrift/Internal.hs b/glean/backend-api/Glean/Query/Thrift/Internal.hs
new file mode 100644
--- /dev/null
+++ b/glean/backend-api/Glean/Query/Thrift/Internal.hs
@@ -0,0 +1,253 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+{-# LANGUAGE TypeApplications #-}
+{-# LANGUAGE ConstraintKinds #-}
+{-# LANGUAGE TypeFamilyDependencies #-}
+{-# LANGUAGE InstanceSigs #-}
+{-# LANGUAGE AllowAmbiguousTypes #-}
+-- | Define internal pieces, please import "Glean.Query.Thrift" instead
+module Glean.Query.Thrift.Internal
+  ( -- * Types
+    Query(..)
+    -- * Query combinators
+  , query
+  , angle
+  , angleData
+  , keys
+  , recursive
+  , limit
+  , limitBytes
+  , limitTime
+  , store
+  , allFacts
+  , expanding
+    -- * Support
+  , reportUserQueryStats
+  , showUserQueryStats
+  , displayQuery
+  , decodeResults
+  , justCheck
+  , dbgPredHasFacts
+  ) where
+
+import Control.Exception
+import Control.Monad
+import Control.Monad.IO.Class
+import Data.Default
+import Data.Dynamic
+import Data.IntMap (IntMap)
+import qualified Data.IntMap as IntMap
+import Data.IORef
+import qualified Data.Map as Map
+import Data.Maybe
+import Data.Proxy
+import qualified Data.Text as Text
+import Data.Text (Text)
+import qualified Data.Text.Encoding as Text
+import Compat.Prettyprinter (Pretty(..))
+import qualified Data.Vector as Vector
+import Text.Printf (printf)
+
+import Util.Log
+
+import Glean.Query.Angle
+import Glean.Typed as Typed
+import Glean.Types as Thrift
+import Glean.Backend.Types (Query(..))
+
+-- | Build a query. It can returns facts of a predicate:
+--
+-- >    query $ predicate @Pp.Define (field @"macro" "NULL" end)
+--
+-- Or arbitrary values:
+--
+-- >    query $ var $ \n ->
+-- >      n `where_` [
+-- >        stmt $ predicate @Hack.MethodDeclaration $
+-- >          rec $
+-- >            field @"name" "foo" $
+-- >            field @"container"
+-- >              (rec $
+-- >                 field @"class_"
+-- >                    (rec (field @"name" n end))
+-- >                 end)
+-- >      ]
+query :: (Type t) => Angle t -> Query t
+query = angleData . display . sig
+  -- adding a type signature ensures that our type matches the type
+  -- Glean infers. Otherwise these could diverge, leading to
+  -- deserialization errors or just wrong data.
+
+type ResultDecoder a =
+     IntMap Thrift.Fact               -- ^ serialized nested facts
+  -> IORef (IntMap Dynamic)           -- ^ cached deserialized facts
+  -> IdOf a
+  -> Thrift.Fact
+  -> IO a
+
+decodeResults :: UserQueryEncodedResults -> ResultDecoder a -> IO [a]
+decodeResults results decoder =
+  case results of
+    UserQueryEncodedResults_bin UserQueryResultsBin{..} -> do
+      cacheRef <- newIORef IntMap.empty
+      let serialized = IntMap.fromList
+            [ (fromIntegral id,f)
+            | (id,f) <- Map.toList userQueryResultsBin_nestedFacts ]
+      forM (Map.toList userQueryResultsBin_facts) $ \(fid, fact) -> do
+        liftIO $ decoder serialized cacheRef (Typed.IdOf (Fid fid)) fact
+
+    UserQueryEncodedResults_listbin UserQueryResultsListBin{..} -> do
+      cacheRef <- newIORef IntMap.empty
+      let serialized = IntMap.fromList
+            [ (fromIntegral id,f)
+            | (id,f) <- Map.toList userQueryResultsListBin_nestedFacts ]
+          fids = Vector.toList userQueryResultsListBin_ids
+          facts = Vector.toList userQueryResultsListBin_facts
+          f fid fact = liftIO $
+            decoder serialized cacheRef (Typed.IdOf (Fid fid)) fact
+      zipWithM f fids facts
+
+    _other -> throwIO $ ErrorCall
+      "runQueryPage: server returned the wrong encoding"
+
+-- | A human-readable form of the Query.
+displayQuery :: Query a -> Text
+displayQuery (Query UserQuery{..}) = Text.decodeUtf8 userQuery_query
+
+allFacts :: forall q . (Predicate q) => Query q
+allFacts = angle $ Text.pack $
+  show (pretty (getName (Proxy :: Proxy q))) <> " _"
+
+-- | Build a query for facts using Angle syntax
+--
+-- Warning: nothing is checking that the type of the query matches the
+-- expected type at the callsite. If you get this wrong, undefined
+-- behaviour will ensue.
+angle :: forall r. (Predicate r) => Text -> Query r
+angle q = Query
+  { querySpec = angleQuery (getName (Proxy @r)) q
+  }
+
+-- | Fetch just the keys of the given fact query
+keys :: (Predicate r) => Query r -> Query (KeyType r)
+keys (Query spec) = Query { querySpec = spec }
+
+angleQuery :: PredicateRef -> Text -> UserQuery
+angleQuery pref query = def
+  { userQuery_predicate = predicateRef_name pref
+  , userQuery_predicate_version =
+    Just (fromIntegral (predicateRef_version pref))
+  , userQuery_query = Text.encodeUtf8 query
+  , userQuery_options = Just def
+    { userQueryOptions_expand_results = False
+    , userQueryOptions_syntax = QuerySyntax_ANGLE
+    }
+  }
+
+-- | A query for arbitrary data, as opposed to 'angle' which queries
+-- for facts.
+--
+-- For example:
+--
+-- > angleData "{ 3, false }" :: Query (Nat, Bool)
+--
+-- Warning: nothing is checking that the type of the query matches the
+-- expected type at the callsite. If you get this wrong, undefined
+-- behaviour will ensue.
+angleData :: (Type r) => Text -> Query r
+angleData query = Query { querySpec = spec  }
+  where
+  spec = def
+    { userQuery_query = Text.encodeUtf8 query
+    , userQuery_options = Just def
+      { userQueryOptions_expand_results = False
+      , userQueryOptions_syntax = QuerySyntax_ANGLE
+      }
+    }
+
+-- | Make a query recursive
+recursive :: Query a -> Query a
+recursive (Query q) = Query q'
+  where
+  q' = q { userQuery_options = Just (fromMaybe def (userQuery_options q))
+    { userQueryOptions_recursive = True } }
+
+-- | Instead of 'recursive', pick individual predicates to expand in
+-- the result
+--
+-- e.g.
+--   expanding @My.Predicate1 $ expanding @My.Predicate2 $ query ...
+--
+expanding :: forall p a . Predicate p => Query a -> Query a
+expanding (Query q) = Query q'
+  where
+  old = fromMaybe def (userQuery_options q)
+  PredicateRef name version = getName (Proxy @p)
+  ref = Thrift.SourcePredicate name (Just version)
+  q' = q { userQuery_options = Just old
+    { userQueryOptions_expand_predicates =
+       ref : userQueryOptions_expand_predicates old }}
+
+-- | Set a limit on the number of results returned by a query. This controls
+-- query result page size when streaming.
+limit :: Int -> Query a -> Query a
+limit n (Query q) = Query q'
+  where
+  q' = q { userQuery_options = Just (fromMaybe def (userQuery_options q))
+    { userQueryOptions_max_results = Just (fromIntegral n) } }
+
+-- | Set a limit on the size of data returned by a query. This
+-- controls query result page size when streaming.
+limitBytes :: Int -> Query a -> Query a
+limitBytes n (Query q) = Query q'
+  where
+  q' = q { userQuery_options = Just (fromMaybe def (userQuery_options q))
+    { userQueryOptions_max_bytes = Just (fromIntegral n) } }
+
+-- | Set a limit on the time that a query can execute for. When streaming,
+-- this imposes a time budget on each query page.
+limitTime
+  :: Int  -- ^ time budget in milliseconds
+  -> Query a -> Query a
+limitTime n (Query q) = Query q'
+  where
+  q' = q { userQuery_options = Just (fromMaybe def (userQuery_options q))
+    { userQueryOptions_max_time_ms = Just (fromIntegral n) } }
+
+-- | Store derived facts arising from the query. This is intended for
+-- caching derived facts after creating a DB, not for normal usage. If
+-- the datbase is read-only, this will cause the query to fail.
+store :: Query a -> Query a
+store (Query q) = Query q'
+  where
+  q' = q { userQuery_options = Just (fromMaybe def (userQuery_options q))
+    { userQueryOptions_store_derived_facts = True } }
+
+justCheck :: Query a -> Query a
+justCheck (Query q) = Query q'
+  where
+  q' = q { userQuery_options = Just (fromMaybe def (userQuery_options q))
+  { userQueryOptions_just_check = True } }
+
+dbgPredHasFacts :: Query a -> Query a
+dbgPredHasFacts (Query q) = Query q'
+  where
+  q' = q { userQuery_options = Just (fromMaybe def (userQuery_options q))
+  { userQueryOptions_debug = def {queryDebugOptions_pred_has_facts = True}}}
+
+reportUserQueryStats :: Thrift.UserQueryStats -> IO ()
+reportUserQueryStats stats =
+  vlog 1 $ showUserQueryStats stats
+
+showUserQueryStats :: Thrift.UserQueryStats -> String
+showUserQueryStats Thrift.UserQueryStats{..} =
+  printf "%d facts, %.2fms, %ld bytes\n"
+    userQueryStats_num_facts
+    (realToFrac userQueryStats_elapsed_ns / 1000000 :: Double)
+    userQueryStats_allocated_bytes
diff --git a/glean/backend-api/Glean/Write/SendBatch.hs b/glean/backend-api/Glean/Write/SendBatch.hs
new file mode 100644
--- /dev/null
+++ b/glean/backend-api/Glean/Write/SendBatch.hs
@@ -0,0 +1,141 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+-- |
+-- This layer provides synchronous writing on top of the lower-level
+-- asynchronous write API, by doing polling and waiting as necessary.
+--
+module Glean.Write.SendBatch
+  ( sendBatchAndWait
+  , sendBatch
+  , sendJsonBatchAndWait
+  , sendJsonBatch
+  , sendBatchDescriptorAndWait
+  , sendBatchDescriptor
+  , waitBatch
+  ) where
+
+import Control.Exception
+import Data.Default
+import qualified Data.Text as Text
+import System.Time.Extra
+
+import Glean.Backend.Types
+import qualified Glean.Types as Thrift
+
+sendBatchAndWait
+  :: Backend be
+  => be
+  -> Thrift.Repo
+  -> Thrift.Batch
+  -> IO Thrift.Subst
+sendBatchAndWait backend repo batch = do
+  handle <- sendBatch backend repo batch True
+  waitBatch backend handle
+
+sendBatch
+  :: Backend be
+  => be
+  -> Thrift.Repo
+  -> Thrift.Batch
+  -> Bool
+  -> IO Thrift.Handle
+sendBatch backend repo batch remember = do
+  r <- enqueueBatch backend $ Thrift.ComputedBatch repo remember batch
+  case r of
+    Thrift.SendResponse_handle h -> return h
+    Thrift.SendResponse_retry (Thrift.BatchRetry r) ->
+      retry r $ sendBatch backend repo batch remember
+
+sendJsonBatchAndWait
+  :: Backend be
+  => be
+  -> Thrift.Repo
+  -> [Thrift.JsonFactBatch]
+  -> Maybe Thrift.SendJsonBatchOptions
+  -> IO Thrift.Subst
+sendJsonBatchAndWait backend repo batches opts = do
+  handle <- sendJsonBatch backend repo batches opts True
+  -- Cope with talking to an old server where this API was synchronous
+  -- and didn't return a handle.
+  if Text.null handle
+    then return def
+    else waitBatch backend handle
+
+sendJsonBatch
+  :: Backend be
+  => be
+  -> Thrift.Repo
+  -> [Thrift.JsonFactBatch]
+  -> Maybe Thrift.SendJsonBatchOptions
+  -> Bool
+  -> IO Thrift.Handle
+sendJsonBatch backend repo batches opts remember = do
+  r <- try $ enqueueJsonBatch backend repo
+    Thrift.SendJsonBatch
+      { Thrift.sendJsonBatch_batches = batches
+      , Thrift.sendJsonBatch_options = opts
+      , Thrift.sendJsonBatch_remember = remember }
+  case r of
+    Right Thrift.SendJsonBatchResponse{..} ->
+      return sendJsonBatchResponse_handle
+    Left Thrift.Retry{..} ->
+      retry retry_seconds $
+        sendJsonBatch backend repo batches opts remember
+
+sendBatchDescriptorAndWait
+  :: Backend be
+  => be
+  -> Thrift.Repo
+  -> Thrift.BatchDescriptor
+  -> IO Thrift.Subst
+sendBatchDescriptorAndWait backend repo descriptor = do
+  handle <- sendBatchDescriptor backend repo descriptor True
+  if Text.null handle
+    then return def
+    else waitBatch backend handle
+
+sendBatchDescriptor
+  :: Backend be
+  => be
+  -> Thrift.Repo
+  -> Thrift.BatchDescriptor
+  -> Bool
+  -> IO Thrift.Handle
+sendBatchDescriptor backend repo descriptor remember = do
+  let batch = Thrift.EnqueueBatch_descriptor descriptor
+      policy = if remember
+        then Thrift.EnqueueBatchWaitPolicy_Remember
+        else Thrift.EnqueueBatchWaitPolicy_None
+  r <- try $ enqueueBatchDescriptor backend repo batch policy
+  case r of
+    Right Thrift.EnqueueBatchResponse{..} ->
+      return enqueueBatchResponse_handle
+    Left Thrift.Retry{..} ->
+      retry retry_seconds $
+        sendBatchDescriptor backend repo descriptor remember
+
+retry :: Double -> IO a -> IO a
+retry secs action = do
+  sleep $ max secs 1
+  action
+
+waitBatch
+  :: Backend be
+  => be
+  -> Thrift.Handle
+  -> IO Thrift.Subst
+waitBatch backend handle = do
+  e <- try $ pollBatch backend handle
+  case e of
+    Left Thrift.Retry{..} ->
+      retry retry_seconds $ waitBatch backend handle
+    Right r -> case r of
+      Thrift.FinishResponse_subst subst -> return subst
+      Thrift.FinishResponse_retry (Thrift.BatchRetry r) ->
+        retry r $ waitBatch backend handle
diff --git a/glean/backend-local/Glean/Backend/Local.hs b/glean/backend-local/Glean/Backend/Local.hs
new file mode 100644
--- /dev/null
+++ b/glean/backend-local/Glean/Backend/Local.hs
@@ -0,0 +1,261 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+{-# LANGUAGE ApplicativeDo #-}
+{-# OPTIONS_GHC -Wno-orphans #-}
+--
+-- | An abstraction over the Glean API that can be served by
+-- either a local DB or a remote server.
+--
+module Glean.Backend.Local
+  (
+    Env(..)
+  , Config(..)
+  , options
+  , withDatabases
+
+    -- * Schemas
+  , loadDbSchema
+  , serializeInventory
+  ) where
+
+import Control.Applicative
+import Control.Concurrent (getNumCapabilities)
+import Control.Concurrent.Stream (stream)
+import Control.Exception (catches, Handler (Handler), throwIO)
+import Control.Monad (forM_)
+import Data.ByteString (ByteString)
+import Data.Default
+import Data.IORef.Extra
+import qualified Data.HashMap.Strict as HashMap
+import qualified Data.Map.Strict as Map
+import Data.Maybe
+import Data.Typeable
+import qualified Haxl.Core as Haxl
+
+import Util.Control.Exception
+import qualified Util.Control.Exception.CallStack as CallStack
+import Util.STM
+
+import Glean.Backend.Types
+import qualified Glean.Database.Catalog as Catalog
+import qualified Glean.Database.CompletePredicates as Database
+import qualified Glean.Database.Create as Database
+import Glean.Database.Config
+import qualified Glean.Database.Delete as Database
+import Glean.Database.Env
+import Glean.Database.Open as Database
+import qualified Glean.Database.List as Database
+import qualified Glean.Database.PredicateStats as Database (predicateStats)
+import qualified Glean.Database.Restore as Database
+import qualified Glean.Database.Schema as Database
+import Glean.Database.Schema hiding (getSchemaInfo, schemaId)
+import qualified Glean.Database.Types as Database
+import Glean.Database.Types (Env(..))
+import qualified Glean.Database.Finish as Database
+import qualified Glean.Database.Writes as Database
+import Glean.Internal.Types
+import qualified Glean.Query.UserQuery as UserQuery
+import qualified Glean.Query.Derive as Derive
+import Glean.RTS (Fid(..))
+import qualified Glean.RTS.Foreign.Inventory as Inventory
+import qualified Glean.RTS.Foreign.Lookup as Lookup
+import qualified Glean.Types as Thrift
+import Glean.Util.Observed as Observed
+import Haxl.DataSource.Glean.Common
+
+
+instance Backend Database.Env where
+  queryFact env repo id = readDatabase env repo $ \_ db ->
+    Lookup.lookupFact db (Fid id)
+
+  factIdRange env repo = do
+    (starting, next) <- readDatabase env repo $ \_ db ->
+      (,) <$> Lookup.startingId db <*> Lookup.firstFreeId db
+    return $ Thrift.FactIdRange (fromFid starting) (fromFid next)
+
+  getSchemaInfo env (Just repo) req =
+    withOpenDatabase env repo $ \odb -> do
+      index <- Observed.get (Database.envSchemaSource env)
+      Database.getSchemaInfo (Database.odbSchema odb) index req
+
+  getSchemaInfo env Nothing Thrift.GetSchemaInfo{..} = do
+      index <- Observed.get (Database.envSchemaSource env)
+      sid <- case getSchemaInfo_select of
+          Thrift.SelectSchema_schema_id sid -> return sid
+          other -> throwIO $ userError $ "unsupported: " <> show other
+      Database.getSchemaInfoForSchema index sid (envDebug env)
+
+  validateSchema env (Thrift.ValidateSchema str) = do
+    schema <- Observed.get (Database.envSchemaSource env)
+    conf <- Observed.get (Database.envServerConfig env)
+    validateNewSchema conf str schema (envDebug env)
+
+  predicateStats env repo opts = Database.predicateStats env repo opts
+
+  userQueryFacts env repo q
+    | isNothing (Thrift.userQueryFacts_schema_id q) =
+      UserQuery.userQueryFacts env repo q {
+        Thrift.userQueryFacts_schema_id = schemaId env
+      }
+    | otherwise = UserQuery.userQueryFacts env repo q
+
+  userQuery env repo q
+    | isNothing (Thrift.userQuery_schema_id q) =
+      UserQuery.userQuery env repo q {
+        Thrift.userQuery_schema_id = schemaId env
+      }
+    | otherwise = UserQuery.userQuery env repo q
+
+  userQueryBatch env repo Thrift.UserQueryBatch{..} = do
+      resultsRef <- newIORef mempty
+      numCaps <- getNumCapabilities
+      stream numCaps (forM_ queries) $ \q -> do
+        res <- runOne q
+        atomicModifyIORef'_ resultsRef $ Map.insert q res
+      results <- readIORef resultsRef
+      return $ map (results Map.!) queries
+      where
+        queries =
+          [ Thrift.UserQuery
+            { userQuery_predicate = userQueryBatch_predicate
+            , userQuery_predicate_version = userQueryBatch_predicate_version
+            , userQuery_encodings  = userQueryBatch_encodings
+            , userQuery_client_info = userQueryBatch_client_info
+            , userQuery_schema_id = userQueryBatch_schema_id <|> schemaId env
+            , userQuery_options = userQueryBatch_options
+            , userQuery_query = q
+            }
+          | q <- userQueryBatch_queries
+          ]
+        runOne query =
+          (Thrift.UserQueryResultsOrException_results
+            <$> userQuery env repo query)
+          `catches`
+          [ Handler $ \(Thrift.Retry r) -> return $
+              Thrift.UserQueryResultsOrException_retry $
+                Thrift.RetryException r
+          , Handler $ \(Thrift.BadQuery b) -> return $
+              Thrift.UserQueryResultsOrException_badQuery $
+                Thrift.BadQueryException b
+          ]
+
+
+  deriveStored = Derive.deriveStored
+
+  listDatabases = Database.listDatabases
+  getDatabase env repo =
+    maybe (CallStack.throwIO $ Thrift.UnknownDatabase repo) return
+    =<< atomically (Catalog.getLocalDatabase (Database.envCatalog env) repo)
+
+  kickOffDatabase = Database.kickOffDatabase
+  finishDatabase = Database.finishDatabase
+  finalizeDatabase = Database.finalizeDatabase
+  updateProperties env repo set unset = do
+    Database.updateProperties env repo set unset
+    return def
+
+  completePredicates_ = Database.completePredicates
+
+  restoreDatabase = Database.restoreDatabase
+
+  deleteDatabase env repo = do
+    Database.deleteDatabase env repo
+    return def
+
+  enqueueBatch env cbatch = Database.enqueueBatch env cbatch Nothing
+  enqueueJsonBatch env cbatch = Database.enqueueJsonBatch env cbatch
+  enqueueBatchDescriptor env repo batch waitPolicy =
+    Database.enqueueBatchDescriptor env repo batch waitPolicy
+  pollBatch env handle = Database.pollBatch env handle
+
+  displayBackend _ = "(local backend)"
+
+  hasDatabase env repo = do
+    Thrift.GetDatabaseResult { getDatabaseResult_database = Thrift.Database{..}}
+      <- getDatabase env repo
+    return $ case database_status of
+      Thrift.DatabaseStatus_Restorable -> False
+      _ -> True
+
+  schemaId = Database.envSchemaId
+
+  usingShards _ = False
+
+  initGlobalState backend = do
+    capabilities <- getNumCapabilities
+    let streamMapM_ :: (a -> IO ()) -> [a] -> IO ()
+        streamMapM_ f xx = stream capabilities (forM_ xx) f
+    if capabilities == 1
+      then return
+        ( GleanGetState $ Haxl.SyncFetch $
+            mapM_ (syncGetOne backend) . HashMap.toList . requestByRepo
+        , GleanQueryState $ Haxl.SyncFetch $
+            mapM_ (syncQueryOne backend)
+        )
+      else return
+        ( GleanGetState $ Haxl.BackgroundFetch $
+            streamMapM_ (syncGetOne backend) . HashMap.toList . requestByRepo
+        , GleanQueryState $ Haxl.BackgroundFetch $
+            streamMapM_ (syncQueryOne backend)
+        )
+
+
+-- -----------------------------------------------------------------------------
+-- Haxl
+
+syncGetOne :: Env -> (Thrift.Repo, [Haxl.BlockedFetch GleanGet]) -> IO ()
+syncGetOne env (repo, requests) = do
+  let schema = schemaId env
+  results <- userQueryFacts env repo (mkUserQueryFacts Nothing schema requests)
+  putResults results requests
+
+syncQueryOne :: Env -> Haxl.BlockedFetch GleanQuery -> IO ()
+syncQueryOne env
+    (Haxl.BlockedFetch (QueryReq (Query q :: Query q) repo stream) rvar) =
+  runSyncQuery repo env
+    (Query (mkUserQuery Nothing (schemaId env) q) :: Query q)
+    (if stream then Just mempty else Nothing) rvar
+
+runSyncQuery
+  :: forall q r. (Show q, Typeable q, QueryResult q r)
+  => Thrift.Repo
+  -> Env
+  -> Query q
+  -> Maybe r -- results so far
+  -> Haxl.ResultVar (r, Bool)
+  -> IO ()
+runSyncQuery repo env q@(Query req) acc rvar = do
+  r <- tryAll $ userQuery env repo req
+  case r of
+    Left e -> Haxl.putFailure rvar e
+    Right results ->
+      putQueryResults q results acc rvar $
+        \(q :: Query q) acc -> runSyncQuery repo env q acc rvar
+
+-- -----------------------------------------------------------------------------
+-- DbSchema
+
+loadDbSchema :: Backend a => a -> Thrift.Repo -> IO DbSchema
+loadDbSchema backend repo = do
+  Thrift.SchemaInfo schema pids _ dbSchemaIds _ _ <-
+    getSchemaInfo backend (Just repo) def
+      { Thrift.getSchemaInfo_select = Thrift.SelectSchema_stored def }
+  fromStoredSchema Nothing (StoredSchema schema pids dbSchemaIds)
+    readWriteContent def
+
+-- | Serialize the inventory for the schema used by this repo.
+-- The inventory is some information about the predicates in the schema
+serializeInventory
+  :: Backend backend
+  => backend
+  -> Thrift.Repo
+  -> IO ByteString
+serializeInventory backend repo = do
+  dbSchema <- loadDbSchema backend repo
+  return $ Inventory.serialize $ schemaInventory dbSchema
diff --git a/glean/backend-local/Glean/Backend/Logging.hs b/glean/backend-local/Glean/Backend/Logging.hs
new file mode 100644
--- /dev/null
+++ b/glean/backend-local/Glean/Backend/Logging.hs
@@ -0,0 +1,351 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module Glean.Backend.Logging
+  ( LoggingBackend(..)
+  ) where
+
+import Control.Exception
+import qualified Data.ByteString as ByteString
+import qualified Data.HashMap.Strict as HashMap
+import qualified Data.Map as Map
+import Data.Maybe
+import Data.Monoid (Sum(getSum, Sum))
+import Data.Text (Text)
+import qualified Data.Text as Text
+import qualified Data.Text.Encoding as Text
+import qualified Data.Text.Encoding.Error as Text
+import TextShow (showt)
+
+import Util.Logger
+
+import Glean.Schema.Util (showRef)
+import Glean.Backend.Local ()
+import Glean.Logger.Server as Logger
+import qualified Glean.Database.List as Database
+import qualified Glean.Database.Types as Database
+import Glean.Database.Writes (batchOwnedSize, batchDependenciesSize)
+import Glean.Logger
+import qualified Glean.Types as Thrift
+import Util.Time
+
+import Glean.Backend.Types
+
+
+-- | A logging wrapper for Env. We do it this way because some backend
+-- calls invoke other backend calls, and we only want to log the
+-- outermost one. For example, userQuery will call queryFact a *lot*,
+-- and it would be too expensive to log each and every call to
+-- queryFact.
+newtype LoggingBackend = LoggingBackend Database.Env
+
+instance Backend LoggingBackend where
+  queryFact (LoggingBackend env) repo id =
+    loggingAction (runLogRepo "queryFact" env repo) (const mempty) $
+      queryFact env repo id
+  factIdRange (LoggingBackend env) repo =
+    loggingAction (runLogRepo "factIdRange" env repo) (const mempty) $
+      factIdRange env repo
+  getSchemaInfo (LoggingBackend env) (Just repo) req =
+    loggingAction (runLogRepo "getSchemaInfo" env repo) (const mempty) $
+      getSchemaInfo env (Just repo) req
+  getSchemaInfo (LoggingBackend env) Nothing req =
+    loggingAction (runLogCmd "getSchemaInfo" env) (const mempty) $
+      getSchemaInfo env Nothing req
+  validateSchema (LoggingBackend env) req =
+    loggingAction (runLogCmd "validateSchema" env) (const mempty) $
+      validateSchema env req
+  predicateStats (LoggingBackend env) repo opts =
+    loggingAction (runLogRepo "predicateStats" env repo) (const mempty) $
+      predicateStats env repo opts
+  userQueryFacts (LoggingBackend env) repo req =
+    loggingAction (runLogQueryFacts "userQueryFacts" env repo req)
+      logQueryResults $
+        userQueryFacts env repo req
+  userQuery (LoggingBackend env) repo req =
+    loggingAction (runLogQuery "userQuery" env repo req) logQueryResults $
+      userQuery env repo req
+  userQueryBatch (LoggingBackend env) repo reqBatch =
+    loggingAction
+      (runLogQueryBatch "userQueryBatch" env repo reqBatch)
+      logQueryResultsOrException
+      (userQueryBatch env repo reqBatch)
+
+  deriveStored (LoggingBackend env) log repo q =
+    loggingAction
+      (runLogDerivePredicate "deriveStored" env repo q)
+      (const mempty)
+      (deriveStored env (runLogDerivationResult env log repo q) repo q)
+
+  listDatabases (LoggingBackend env) req =
+    loggingAction (runLogCmd "listDatabases" env) (const mempty) $
+      Database.listDatabases env req
+  getDatabase (LoggingBackend env) repo =
+    loggingAction (runLogRepo "getDatabase" env repo) (const mempty) $
+      getDatabase env repo
+
+  kickOffDatabase (LoggingBackend env) rq =
+    loggingAction
+      (runLogKickOff "kickOff" env rq)
+      (const mempty) $
+      kickOffDatabase env rq
+  finishDatabase (LoggingBackend env) repo =
+    loggingAction
+      (runLogRepo "finishDatabase" env repo)
+      (const mempty) $
+      finishDatabase env repo
+  finalizeDatabase (LoggingBackend env) repo =
+    loggingAction
+      (runLogRepo "finalizeDatabase" env repo)
+      (const mempty) $
+      finalizeDatabase env repo
+  updateProperties (LoggingBackend env) repo set unset =
+    loggingAction
+      (runLogRepo "updateProperties" env repo)
+      (const mempty) $
+      updateProperties env repo set unset
+
+  completePredicates_ (LoggingBackend env) repo preds =
+    loggingAction
+       (runLogRepo "completePredicates" env repo)
+       (const mempty) $
+       completePredicates_ env repo preds
+
+  restoreDatabase (LoggingBackend env) loc =
+    loggingAction (runLogCmd "restoreDatabase" env) (const mempty) $
+      restoreDatabase env loc
+  deleteDatabase (LoggingBackend env) repo =
+    loggingAction (runLogRepo "deleteDatabase" env repo) (const mempty) $
+      deleteDatabase env repo
+  enqueueBatch (LoggingBackend env) cbatch =
+    loggingAction
+      (runLogEnqueueBatch "enqueueBatch" env cbatch)
+      (const mempty) $
+        enqueueBatch env cbatch
+  enqueueJsonBatch (LoggingBackend env) repo batch =
+    loggingAction (runLogRepo "enqueueJsonBatch" env repo) (const mempty) $
+      enqueueJsonBatch env repo batch
+  enqueueBatchDescriptor (LoggingBackend env) repo batch waitPolicy =
+    loggingAction
+      (runLogRepo "enqueueBatchDescriptor" env repo)
+      (const mempty) $
+        enqueueBatchDescriptor env repo batch waitPolicy
+  pollBatch (LoggingBackend env) handle =
+    loggingAction (runLogCmd "pollBatch" env) (const mempty) $
+      pollBatch env handle
+  displayBackend (LoggingBackend b) = displayBackend b
+  hasDatabase (LoggingBackend b) repo = hasDatabase b repo
+  schemaId (LoggingBackend b) = schemaId b
+  usingShards (LoggingBackend b) = usingShards b
+  initGlobalState (LoggingBackend b) = initGlobalState b
+
+runLogKickOff
+  :: Text
+  -> Database.Env
+  -> Thrift.KickOff
+  -> GleanServerLog
+  -> IO ()
+runLogKickOff cmd env Thrift.KickOff{..} log =
+  runLogRepo cmd env kickOff_repo $ log <> schemaId
+  where
+  schemaId = maybe mempty Logger.SetSchemaId $
+    HashMap.lookup "glean.schema_id" kickOff_properties
+
+runLogQueryFacts
+  :: Text
+  -> Database.Env
+  -> Thrift.Repo
+  -> Thrift.UserQueryFacts
+  -> GleanServerLog -> IO ()
+runLogQueryFacts cmd env repo Thrift.UserQueryFacts{..} log =
+  runLogRepo cmd env repo $ log
+    <> maybe mempty logQueryOptions userQueryFacts_options
+    <> maybe mempty logQueryClientInfo userQueryFacts_client_info
+    <> maybe mempty (Logger.SetSchemaId . Thrift.unSchemaId)
+        userQueryFacts_schema_id
+
+runLogQuery
+  :: Text
+  -> Database.Env
+  -> Thrift.Repo
+  -> Thrift.UserQuery
+  -> GleanServerLog
+  -> IO ()
+runLogQuery cmd env repo Thrift.UserQuery{..} log = do
+  runLogRepo cmd env repo $ mconcat
+    [ log
+    , Logger.SetQuery
+        (Text.decodeUtf8With Text.lenientDecode $
+          if ByteString.length userQuery_query > 1024
+            then "[truncated] " <> ByteString.take 1024 userQuery_query
+            else userQuery_query)
+    , Logger.SetPredicate userQuery_predicate
+    , maybe mempty (Logger.SetPredicateVersion . fromIntegral)
+        userQuery_predicate_version
+    , maybe mempty (Logger.SetSchemaId . Thrift.unSchemaId)
+        userQuery_schema_id
+    , maybe mempty logQueryOptions userQuery_options
+    , maybe mempty logQueryClientInfo userQuery_client_info
+    ]
+
+runLogQueryBatch
+  :: Text
+  -> Database.Env
+  -> Thrift.Repo
+  -> Thrift.UserQueryBatch
+  -> GleanServerLog
+  -> IO ()
+runLogQueryBatch cmd env repo Thrift.UserQueryBatch{..} log =
+  runLogRepo cmd env repo $ mconcat
+    [ log
+    , Logger.SetQuery $ case userQueryBatch_queries of
+        [] -> "0 batched queries"
+        q:rest -> Text.unlines $
+          Text.decodeUtf8With Text.lenientDecode q :
+          [" + " <> showt n <> " batched queries"
+          | let n = length rest
+          , n > 1
+          ]
+    , Logger.SetPredicate userQueryBatch_predicate
+    , maybe mempty (Logger.SetPredicateVersion . fromIntegral)
+        userQueryBatch_predicate_version
+    , maybe mempty (Logger.SetSchemaId . Thrift.unSchemaId)
+        userQueryBatch_schema_id
+    , maybe mempty logQueryOptions userQueryBatch_options
+    , maybe mempty logQueryClientInfo userQueryBatch_client_info
+    ]
+
+runLogEnqueueBatch
+  :: Text
+  -> Database.Env
+  -> Thrift.ComputedBatch
+  -> GleanServerLog
+  -> IO ()
+runLogEnqueueBatch cmd env Thrift.ComputedBatch{..} log =
+  let !Thrift.Batch{..} = computedBatch_batch in
+  runLogRepo cmd env computedBatch_repo $ mconcat
+    [ log
+    , Logger.SetBatchFactsSize $ ByteString.length batch_facts
+    , Logger.SetBatchFactsCount $ fromIntegral $
+        Thrift.batch_count computedBatch_batch
+    , Logger.SetBatchOwnedSize $ batchOwnedSize batch_owned
+    , Logger.SetBatchDependenciesSize $ batchDependenciesSize batch_dependencies
+    ]
+
+logQueryOptions :: Thrift.UserQueryOptions -> GleanServerLog
+logQueryOptions Thrift.UserQueryOptions{..} = mconcat
+  [ Logger.SetNoBase64Binary userQueryOptions_no_base64_binary
+  , Logger.SetExpandResults userQueryOptions_expand_results
+  , Logger.SetRecursive userQueryOptions_recursive
+  , maybe mempty (Logger.SetMaxResults . fromIntegral)
+      userQueryOptions_max_results
+  , Logger.SetSyntax $ case userQueryOptions_syntax of
+      Thrift.QuerySyntax_JSON -> "JSON"
+      Thrift.QuerySyntax_ANGLE -> "Angle"
+  , maybe mempty
+      ( Logger.SetRequestContinuationSize
+      . ByteString.length
+      . Thrift.userQueryCont_continuation
+      )
+      userQueryOptions_continuation
+  ]
+
+logQueryClientInfo :: Thrift.UserQueryClientInfo -> GleanServerLog
+logQueryClientInfo Thrift.UserQueryClientInfo{..} = mconcat
+  [ maybe mempty Logger.SetClientUnixname userQueryClientInfo_unixname
+  , Logger.SetClientApplication userQueryClientInfo_application
+  , Logger.SetClientName userQueryClientInfo_name
+  ]
+
+logQueryResultsOrException
+  :: [Thrift.UserQueryResultsOrException] -> GleanServerLog
+logQueryResultsOrException results = mconcat
+  [
+    Logger.SetResults $ getSum $ foldMap (Sum . countQueryResults)
+      [ r | Thrift.UserQueryResultsOrException_results r <- results]
+  ]
+
+logQueryResults :: Thrift.UserQueryResults -> GleanServerLog
+logQueryResults it@Thrift.UserQueryResults{..} = mconcat
+  [ Logger.SetResults $ countQueryResults it
+  , Logger.SetTruncated (isJust userQueryResults_continuation)
+  , maybe mempty logQueryStats userQueryResults_stats
+  , maybe mempty Logger.SetType userQueryResults_type
+  , maybe mempty
+      ( Logger.SetResponseContinuationSize
+      . ByteString.length
+      . Thrift.userQueryCont_continuation
+      )
+      userQueryResults_continuation
+  ]
+
+countQueryResults :: Thrift.UserQueryResults -> Int
+countQueryResults Thrift.UserQueryResults{..} =
+  case userQueryResults_results of
+    Thrift.UserQueryEncodedResults_bin bin ->
+      Map.size (Thrift.userQueryResultsBin_facts bin)
+    Thrift.UserQueryEncodedResults_json json ->
+      length (Thrift.userQueryResultsJSON_facts json)
+    Thrift.UserQueryEncodedResults_compact compact ->
+      length (Thrift.userQueryResultsCompact_facts compact)
+    _ ->
+      length userQueryResults_facts
+
+logQueryStats :: Thrift.UserQueryStats -> GleanServerLog
+logQueryStats Thrift.UserQueryStats{..} = mconcat
+  [ Logger.SetResults (fromIntegral userQueryStats_result_count)
+  , Logger.SetFacts (fromIntegral userQueryStats_num_facts)
+  , Logger.SetFullScans (showRef <$> userQueryStats_full_scans)
+  , maybe mempty (Logger.SetBytecodeSize . fromIntegral)
+      userQueryStats_bytecode_size
+  , maybe mempty (Logger.SetCompileTimeUs . fromIntegral . (`quot` 1000))
+      userQueryStats_compile_time_ns
+  , maybe mempty (Logger.SetExecuteTimeUs . fromIntegral . (`quot` 1000))
+      userQueryStats_execute_time_ns
+  , maybe mempty (Logger.SetQueryResultBytes . fromIntegral)
+      userQueryStats_result_bytes
+  ]
+
+runLogDerivePredicate
+  :: Text
+  -> Database.Env
+  -> Thrift.Repo
+  -> Thrift.DerivePredicateQuery
+  -> GleanServerLog
+  -> IO ()
+runLogDerivePredicate cmd env repo Thrift.DerivePredicateQuery {..} log =
+  runLogRepo cmd env repo $ mconcat
+    [ log
+    , Logger.SetPredicate derivePredicateQuery_predicate
+    , maybe mempty (Logger.SetPredicateVersion . fromIntegral)
+        derivePredicateQuery_predicate_version
+    , maybe mempty logQueryClientInfo derivePredicateQuery_client_info
+    ]
+
+runLogDerivationResult
+  :: Database.Env
+  -> LogDerivationResult
+  -> Thrift.Repo
+  -> Thrift.DerivePredicateQuery
+  -> Either (DiffTimePoints, SomeException) Thrift.UserQueryStats
+  -> IO ()
+runLogDerivationResult env log repo Thrift.DerivePredicateQuery{..} res = do
+  log res
+  runLogRepo "deriveStored(completed)" env repo $ mconcat
+    [ Logger.SetPredicate derivePredicateQuery_predicate
+    , maybe mempty (Logger.SetPredicateVersion . fromIntegral)
+        derivePredicateQuery_predicate_version
+    , maybe mempty logQueryClientInfo derivePredicateQuery_client_info
+    , case res of
+        Left (_,err) -> failureLog err
+        Right stats -> successLog <> logQueryStats stats
+    , timeLog $ toDiffSeconds $ case res of
+        Left (duration, _) -> duration
+        Right Thrift.UserQueryStats{..} ->
+          nanoseconds (fromIntegral userQueryStats_elapsed_ns)
+    ]
diff --git a/glean/backend-local/Glean/Dump.hs b/glean/backend-local/Glean/Dump.hs
new file mode 100644
--- /dev/null
+++ b/glean/backend-local/Glean/Dump.hs
@@ -0,0 +1,80 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module Glean.Dump
+  ( dump
+  ) where
+
+import Control.Exception
+import Control.Monad
+import Data.Int (Int64)
+import Text.Printf
+
+import Util.Control.Exception (catchAll)
+import Util.Log
+
+import Glean.Backend.Types
+import Glean.Backend.Local
+import Glean.Database.Schema
+import Glean.Query.JSON
+import Glean.RTS.Types
+import Glean.Types
+
+dump :: Backend b => b -> Repo -> (JsonFactBatch -> IO ()) -> IO ()
+dump backend repo withBatch = doDump =<< loadDbSchema backend repo
+  where
+    doDump dbSchema = do
+      FactIdRange{..} <- factIdRange backend repo
+      go iNVALID_ID [] 0 factIdRange_start factIdRange_finish
+      where
+
+      doneBatch :: Id -> [(Id,Fact)] -> IO ()
+      doneBatch _ [] = return ()
+      doneBatch pid facts = do
+        vlog 1 (printf "%d facts for predicate %d\n" (length facts) pid)
+        case lookupPid (Pid pid) dbSchema of
+          Nothing -> throwIO $ ErrorCall $ "unknown predicate Id: " <> show pid
+          Just details@PredicateDetails{} -> do
+            jsonFacts <- forM (reverse facts) $ \(fid, Fact{..}) ->
+                factToJSON
+                  True
+                  mempty
+                  details
+                  (Fid fid)
+                  fact_key
+                  fact_value
+                `catchAll` \exc -> throwIO $ ErrorCall $ show exc
+            withBatch JsonFactBatch
+              { jsonFactBatch_predicate = predicateRef details
+              , jsonFactBatch_facts = jsonFacts
+              , jsonFactBatch_unit = Nothing -- TODO?
+              }
+
+      -- limit the size of batches we give back, so that the writer
+      -- can run in constant space.
+      maxBatchSize :: Id
+      maxBatchSize = 10000
+
+      go :: Id -> [(Id,Fact)] -> Int64 -> Id -> Id ->  IO ()
+      go !currentPid facts !batchSize !nextId !finalId
+        | nextId < finalId = do
+            r <- queryFact backend repo nextId
+            case r of
+              Nothing -> go currentPid facts batchSize (nextId+1) finalId
+              Just fact@Fact{..} ->
+                if fact_type == currentPid && batchSize < maxBatchSize
+                  then go
+                    currentPid
+                    ((nextId,fact):facts)
+                    (batchSize + 1)
+                    (nextId+1)
+                    finalId
+                  else do
+                    doneBatch currentPid facts
+                    go fact_type [(nextId,fact)] 1 (nextId+1) finalId
+        | otherwise = doneBatch currentPid facts
diff --git a/glean/bench/BenchDB.hs b/glean/bench/BenchDB.hs
--- a/glean/bench/BenchDB.hs
+++ b/glean/bench/BenchDB.hs
@@ -16,7 +16,7 @@
 
 import Glean
 import Glean.Backend.Types (loadPredicates)
-import Glean.Database.Test (withEmptyTestDB, completeTestDB)
+import Glean.Database.Test
 import Glean.Database.Open
 import Glean.Database.Write.Batch
 import qualified Glean.Schema.Sys.Types as Sys
@@ -26,9 +26,20 @@
 import qualified Glean.Schema.Cxx1 as Cxx
 import qualified Glean.Schema.GleanTest as Glean.Test
 import Glean.Typed
+import Glean.Util.Benchmark
 
-withBenchDB :: Int -> (forall b . Backend b => b -> Repo -> IO a) -> IO a
-withBenchDB num act = withEmptyTestDB [] $ \env repo -> do
+withBenchDB
+  :: GleanBenchConfig
+  -> Int
+  -> (forall b . Backend b => b -> Repo -> IO a)
+  -> IO a
+withBenchDB conf num act = do
+  let
+    settings
+      | useLMDB conf = [setLMDBStorage]
+      | otherwise = []
+
+  withEmptyTestDB (enableRocksDBCache : settings) $ \env repo -> do
   withOpenDatabase env repo $ \odb ->
     void $ return odb
 
diff --git a/glean/bench/MakeFactBench.hs b/glean/bench/MakeFactBench.hs
--- a/glean/bench/MakeFactBench.hs
+++ b/glean/bench/MakeFactBench.hs
@@ -21,7 +21,7 @@
 import Glean.Typed
 
 main :: IO ()
-main = benchmarkMain $ \run -> do
+main = benchmarkMain $ \_conf run -> do
   withEmptyTestDB [] $ \env repo -> do
     predicates <- Backend.loadPredicates env repo
       [ Cxx.allPredicates
diff --git a/glean/bench/QueryBench.hs b/glean/bench/QueryBench.hs
--- a/glean/bench/QueryBench.hs
+++ b/glean/bench/QueryBench.hs
@@ -29,7 +29,8 @@
 import BenchDB
 
 main :: IO ()
-main = benchmarkMain $ \run -> withBenchDB 10000 $ \env repo -> do
+main = benchmarkMain $ \conf run ->
+  withBenchDB conf 10000 $ \env repo -> do
   let
     nestedAngle :: Query Cxx.FunctionName
     nestedAngle = angle "cxx1.FunctionName { name = \"x1\" }"
diff --git a/glean/bench/RenameBench.hs b/glean/bench/RenameBench.hs
--- a/glean/bench/RenameBench.hs
+++ b/glean/bench/RenameBench.hs
@@ -22,7 +22,7 @@
 import TestBatch
 
 main :: IO ()
-main = benchmarkMain $ \run ->
+main = benchmarkMain $ \_conf run ->
   withEmptyTestDB [] $ \env repo -> do
   schema <- loadDbSchema env repo
   batch <- testBatch 500000 env repo
diff --git a/glean/bench/lib/Glean/Util/Benchmark.hs b/glean/bench/lib/Glean/Util/Benchmark.hs
--- a/glean/bench/lib/Glean/Util/Benchmark.hs
+++ b/glean/bench/lib/Glean/Util/Benchmark.hs
@@ -9,15 +9,31 @@
 module Glean.Util.Benchmark
   ( BenchmarkRunner
   , benchmarkMain
+  , GleanBenchConfig(..)
   ) where
 
 import Criterion.Main
 import Criterion.Main.Options
+import Data.Default
+import Options.Applicative
 
 import Glean.Init
 
 type BenchmarkRunner = [Benchmark] -> IO ()
 
-benchmarkMain :: (BenchmarkRunner -> IO ()) -> IO ()
-benchmarkMain exec = withOptions (describe defaultConfig) $
-  exec . runMode
+benchmarkMain :: (GleanBenchConfig -> BenchmarkRunner -> IO ()) -> IO ()
+benchmarkMain exec =
+  withOptions
+    (describeWith ((,) <$> opts <*> parseWith defaultConfig)) $ \(conf, crit) ->
+    exec conf (runMode crit)
+
+data GleanBenchConfig = GleanBenchConfig {
+    useLMDB :: Bool
+  }
+
+instance Default GleanBenchConfig where
+  def = GleanBenchConfig { useLMDB = False }
+
+opts :: Parser GleanBenchConfig
+opts = GleanBenchConfig
+  <$> switch (long "lmdb" <> help "use LMDB (otherwise use RocksDB)")
diff --git a/glean/client/hs/Glean.hs b/glean/client/hs/Glean.hs
--- a/glean/client/hs/Glean.hs
+++ b/glean/client/hs/Glean.hs
@@ -154,6 +154,7 @@
   , makeFactV
   , makeFactV_
   , NewFact(..)
+  , UnitName
 
   -- ** Lower-level write API
   , withSender
@@ -181,12 +182,15 @@
   , withBatchWriter
 
   -- ** Writing binary
-  , sendBatch
+  , sendBatchAndWait
 
   -- ** Writing JSON
-  , sendJsonBatch
+  , sendJsonBatchAndWait
   , SendJsonBatch(..)
   , JsonFactBatch(..)
+
+  -- ** Writing with batch locations
+  , sendBatchDescriptor
 
   -- * Misc
   , showUserQueryStats
diff --git a/glean/client/hs/Glean/Angle.hs b/glean/client/hs/Glean/Angle.hs
--- a/glean/client/hs/Glean/Angle.hs
+++ b/glean/client/hs/Glean/Angle.hs
@@ -10,6 +10,7 @@
 -- Small domain-specific language for building Angle queries
 -- programmatically.
 --
-module Glean.Angle (module Glean.Query.Angle) where
+module Glean.Angle (query, module Glean.Query.Angle) where
 
 import Glean.Query.Angle
+import Glean.Query.Thrift.Internal (query)
diff --git a/glean/client/hs/Glean/Remote.hs b/glean/client/hs/Glean/Remote.hs
--- a/glean/client/hs/Glean/Remote.hs
+++ b/glean/client/hs/Glean/Remote.hs
@@ -71,8 +71,6 @@
 import Glean.GleanService.Client (GleanService)
 import qualified Glean.GleanService.Client as GleanService
 import qualified Glean.Types as Thrift
-import Glean.Query.Thrift
-import Glean.Query.Thrift.Internal
 import Glean.Util.ConfigProvider
 import Glean.Util.RetryChannelException
 import Glean.Util.Service
@@ -148,32 +146,33 @@
   -> IO a
 withRemoteBackendSettings evb configAPI configSource schema settings inner = do
   config <- ThriftSource.loadDefault configAPI configSource
-  client <- clientInfo
   let (config', opts) = settings (config, def)
-  inner $ ThriftBackend
-    config
-    evb
-    (thriftServiceWithTimeout config' opts)
-    client
-    schema
+  case thriftServiceWithTimeout config' opts of
+    Nothing -> throwIO $ ErrorCall $
+      "Service not supported: " <> serviceToString (clientConfig_serv config')
+    Just thriftService -> do
+      client <- clientInfo
+      inner $ ThriftBackend config evb thriftService client schema
 
 thriftServiceWithTimeout
   :: IsThriftService t
   => ClientConfig
   -> ThriftServiceOptions
-  -> t s
+  -> Maybe (t s)
 thriftServiceWithTimeout ClientConfig{..} opts =
   mkThriftService clientConfig_serv opts'
   where
     -- add host_timeout_ms if a timeout wasn't already specified and
     -- we're talking to a specific host.
+    timeoutOpts =
+      opts {
+        processingTimeout = processingTimeout opts <|> Just t,
+        queueTimeout = queueTimeout opts <|> Just t
+        }
+      where t = fromIntegral clientConfig_host_timeout_ms / 1000
     opts' = case clientConfig_serv of
-      HostPort{} ->
-        opts {
-          processingTimeout = processingTimeout opts <|> Just t,
-          queueTimeout = queueTimeout opts <|> Just t
-          }
-        where t = fromIntegral clientConfig_host_timeout_ms / 1000
+      HostPort{} -> timeoutOpts
+      Uri{} -> timeoutOpts
       _otherwise -> opts
 
 
diff --git a/glean/client/hs/local/Glean/LocalOrRemote.hs b/glean/client/hs/local/Glean/LocalOrRemote.hs
--- a/glean/client/hs/local/Glean/LocalOrRemote.hs
+++ b/glean/client/hs/local/Glean/LocalOrRemote.hs
@@ -54,6 +54,7 @@
   , serializeInventory
   ) where
 
+import Control.Exception
 import Control.Monad.Extra
 import qualified Data.ByteString.Char8 as BC
 import Data.Default
@@ -64,7 +65,7 @@
 
 import Util.EventBase
 
-import Glean hiding (finalize, sendJsonBatch)
+import Glean hiding (finalize)
   -- we will provide versions of finalize and sendJsonBatch that are
   -- more efficient with local DBs.
 import qualified Glean
@@ -77,6 +78,7 @@
 import Glean.Database.Finish (finalizeWait)
 import qualified Glean.Remote as Remote
 import Glean.Util.ConfigProvider
+import qualified Glean.Util.Service as Service
 import Glean.Util.Some
 import qualified Glean.Util.ThriftSource as ThriftSource
 import Glean.Write.JSON (syncWriteJsonBatch)
@@ -119,22 +121,38 @@
   -> (forall b. LocalOrRemote b => b -> IO a)
   -> IO a
 withBackend evb cfgapi service schema settings inner = case service of
-  Local cfg logging ->
-    let cfg' = cfg { cfgSchemaId = schema } in
-    withDatabases evb cfg' cfgapi $
-      case logging of
-        EnableLogging -> inner . LoggingBackend
-        DisableLogging -> inner
-  Remote src -> do
-    config <- ThriftSource.loadDefault cfgapi src
-    let (config', opts) = settings (config, def)
-    client <- Remote.clientInfo
-    inner $ Remote.ThriftBackend
-      config'
-      evb
-      (Remote.thriftServiceWithTimeout config' opts)
-      client
-      schema
+    Local cfg logging ->
+      let cfg' = cfg { cfgSchemaId = schema } in
+      withDatabases evb cfg' cfgapi $
+        case logging of
+          EnableLogging -> inner . LoggingBackend
+          DisableLogging -> inner
+    Remote src -> do
+      config <- ThriftSource.loadDefault cfgapi src
+      let (config', opts) = settings (config, def)
+      case Remote.thriftServiceWithTimeout config' opts of
+        Nothing
+          -- The default service is a tier, which is not supported in
+          -- the open-source build. To avoid a confusing error message
+          -- when someone just forgets to use --db-root or --service,
+          -- let's try to be helpful:
+          | clientConfig_serv config' == clientConfig_serv def ->
+            throwIO $ ErrorCall $
+            "No default Glean service. To use local DBs, " <>
+            "specify --db-root <dir>, or to connect to a server " <>
+            "use --service <host>:<port>"
+          | otherwise ->
+            throwIO $ ErrorCall $
+              "Service not supported: " <>
+                Service.serviceToString (clientConfig_serv config')
+        Just thriftService -> do
+          client <- Remote.clientInfo
+          inner $ Remote.ThriftBackend
+            config'
+            evb
+            thriftService
+            client
+            schema
 
 -- | Command-line options to specify a 'Service' that we can connect to.
 -- The 'Service' is either a remote Glean server (e.g. @--service=<host>:port@)
@@ -271,4 +289,4 @@
   case backendKind backend of
     -- syncWriteJsonBatch is faster than polling if we have local DBs.
     BackendEnv env -> syncWriteJsonBatch env repo batches opts
-    _ -> void $ Glean.sendJsonBatch backend repo batches opts
+    _ -> void $ Glean.sendJsonBatchAndWait backend repo batches opts
diff --git a/glean/config/client/gen-hs2/Glean/ClientConfig/Types.hs b/glean/config/client/gen-hs2/Glean/ClientConfig/Types.hs
--- a/glean/config/client/gen-hs2/Glean/ClientConfig/Types.hs
+++ b/glean/config/client/gen-hs2/Glean/ClientConfig/Types.hs
@@ -32,6 +32,8 @@
 import qualified Data.Int as Int
 import qualified Data.List as List
 import qualified Data.Ord as Ord
+import qualified Facebook.Thrift.Annotation.Thrift.Thrift.Types
+       as Facebook.Thrift.Annotation.Thrift.Thrift
 import qualified GHC.Magic as GHC
 import qualified Glean.Service.Types as Glean.Service
 import qualified Prelude as Prelude
diff --git a/glean/config/gen-hs2/Glean/Service/Types.hs b/glean/config/gen-hs2/Glean/Service/Types.hs
--- a/glean/config/gen-hs2/Glean/Service/Types.hs
+++ b/glean/config/gen-hs2/Glean/Service/Types.hs
@@ -14,7 +14,7 @@
 {-# LANGUAGE GeneralizedNewtypeDeriving #-}
 module Glean.Service.Types
        (HostPort(HostPort, hostPort_host, hostPort_port),
-        Service(Service_tier, Service_hostPort))
+        Service(Service_tier, Service_hostPort, Service_uri))
        where
 import qualified Control.DeepSeq as DeepSeq
 import qualified Control.Exception as Exception
@@ -31,6 +31,8 @@
 import qualified Data.Ord as Ord
 import qualified Data.Text as Text
 import qualified Data.Text.Encoding as Text
+import qualified Facebook.Thrift.Annotation.Thrift.Thrift.Types
+       as Facebook.Thrift.Annotation.Thrift.Thrift
 import qualified Prelude as Prelude
 import qualified Thrift.Binary.Parser as Parser
 import qualified Thrift.CodegenTypesOnly as Thrift
@@ -113,12 +115,14 @@
 
 data Service = Service_tier Text.Text
              | Service_hostPort HostPort
+             | Service_uri Text.Text
                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
 
 instance Aeson.ToJSON Service where
   toJSON (Service_tier __tier) = Aeson.object ["tier" .= __tier]
   toJSON (Service_hostPort __hostPort)
     = Aeson.object ["hostPort" .= __hostPort]
+  toJSON (Service_uri __uri) = Aeson.object ["uri" .= __uri]
 
 instance Thrift.ThriftStruct Service where
   buildStruct _proxy (Service_tier __tier)
@@ -130,6 +134,10 @@
         [Thrift.genField _proxy "hostPort" (Thrift.getStructType _proxy) 2
            0
            (Thrift.buildStruct _proxy __hostPort)]
+  buildStruct _proxy (Service_uri __uri)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "uri" (Thrift.getStringType _proxy) 3 0
+           (Thrift.genText _proxy __uri)]
   parseStruct _proxy
     = do _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap
          case _fieldBegin of
@@ -142,16 +150,22 @@
                                                          do _val <- Thrift.parseStruct _proxy
                                                             Thrift.parseStop _proxy
                                                             Prelude.return (Service_hostPort _val)
+                                                     3 | _type == Thrift.getStringType _proxy ->
+                                                         do _val <- Thrift.parseText _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return (Service_uri _val)
                                                      _ -> Prelude.fail
                                                             ("unrecognized alternative for union 'Service': "
                                                                ++ Prelude.show _id)
            Thrift.FieldEnd -> Prelude.fail "union 'Service' is empty"
     where
-      _idMap = HashMap.fromList [("tier", 1), ("hostPort", 2)]
+      _idMap
+        = HashMap.fromList [("tier", 1), ("hostPort", 2), ("uri", 3)]
 
 instance DeepSeq.NFData Service where
   rnf (Service_tier __tier) = DeepSeq.rnf __tier
   rnf (Service_hostPort __hostPort) = DeepSeq.rnf __hostPort
+  rnf (Service_uri __uri) = DeepSeq.rnf __uri
 
 instance Default.Default Service where
   def = Service_tier ""
@@ -161,3 +175,5 @@
     = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 1 _tier)
   hashWithSalt __salt (Service_hostPort _hostPort)
     = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 2 _hostPort)
+  hashWithSalt __salt (Service_uri _uri)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 3 _uri)
diff --git a/glean/config/server/gen-hs2/Glean/ServerConfig/Types.hs b/glean/config/server/gen-hs2/Glean/ServerConfig/Types.hs
--- a/glean/config/server/gen-hs2/Glean/ServerConfig/Types.hs
+++ b/glean/config/server/gen-hs2/Glean/ServerConfig/Types.hs
@@ -62,7 +62,11 @@
                config_strict_query_schema_id, config_use_manifold_cli,
                config_max_remote_db_list_age, config_restore_timeout,
                config_max_set_size_bytes, config_check_write_schema_id,
-               config_schema_location),
+               config_schema_location,
+               config_db_rocksdb_disk_mem_capacity_ratio_limit,
+               config_db_rocksdb_cache_to_mem_ratio,
+               config_db_lmdb_mksquashfs_args, config_db_lmdb_restore_unpack,
+               config_db_create_storage),
         Set_RepoName_8170)
        where
 import qualified Control.DeepSeq as DeepSeq
@@ -83,6 +87,8 @@
 import qualified Data.Set as Set
 import qualified Data.Text as Text
 import qualified Data.Text.Encoding as Text
+import qualified Facebook.Thrift.Annotation.Thrift.Thrift.Types
+       as Facebook.Thrift.Annotation.Thrift.Thrift
 import qualified Prelude as Prelude
 import qualified Thrift.Binary.Parser as Parser
 import qualified Thrift.CodegenTypesOnly as Thrift
@@ -1612,7 +1618,14 @@
                      config_restore_timeout :: Prelude.Maybe Seconds,
                      config_max_set_size_bytes :: Prelude.Maybe Int.Int64,
                      config_check_write_schema_id :: Prelude.Bool,
-                     config_schema_location :: Prelude.Maybe SchemaLocation}
+                     config_schema_location :: Prelude.Maybe SchemaLocation,
+                     config_db_rocksdb_disk_mem_capacity_ratio_limit ::
+                     Prelude.Maybe Int.Int32,
+                     config_db_rocksdb_cache_to_mem_ratio ::
+                     Prelude.Maybe Prelude.Float,
+                     config_db_lmdb_mksquashfs_args :: [Text.Text],
+                     config_db_lmdb_restore_unpack :: Prelude.Bool,
+                     config_db_create_storage :: Prelude.Maybe Text.Text}
               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
 
 instance Aeson.ToJSON Config where
@@ -1634,7 +1647,11 @@
        __field__strict_query_schema_id __field__use_manifold_cli
        __field__max_remote_db_list_age __field__restore_timeout
        __field__max_set_size_bytes __field__check_write_schema_id
-       __field__schema_location)
+       __field__schema_location
+       __field__db_rocksdb_disk_mem_capacity_ratio_limit
+       __field__db_rocksdb_cache_to_mem_ratio
+       __field__db_lmdb_mksquashfs_args __field__db_lmdb_restore_unpack
+       __field__db_create_storage)
     = Aeson.object
         ("retention" .= __field__retention :
            "restore" .= __field__restore :
@@ -1719,7 +1736,31 @@
                                                                                      ((:) .
                                                                                         ("schema_location" .=))
                                                                                      __field__schema_location
-                                                                                     Prelude.mempty)))))))))
+                                                                                     (Prelude.maybe
+                                                                                        Prelude.id
+                                                                                        ((:) .
+                                                                                           ("db_rocksdb_disk_mem_capacity_ratio_limit" .=))
+                                                                                        __field__db_rocksdb_disk_mem_capacity_ratio_limit
+                                                                                        (Prelude.maybe
+                                                                                           Prelude.id
+                                                                                           ((:) .
+                                                                                              ("db_rocksdb_cache_to_mem_ratio" .=))
+                                                                                           __field__db_rocksdb_cache_to_mem_ratio
+                                                                                           ("db_lmdb_mksquashfs_args"
+                                                                                              .=
+                                                                                              __field__db_lmdb_mksquashfs_args
+                                                                                              :
+                                                                                              "db_lmdb_restore_unpack"
+                                                                                                .=
+                                                                                                __field__db_lmdb_restore_unpack
+                                                                                                :
+                                                                                                Prelude.maybe
+                                                                                                  Prelude.id
+                                                                                                  ((:)
+                                                                                                     .
+                                                                                                     ("db_create_storage" .=))
+                                                                                                  __field__db_create_storage
+                                                                                                  Prelude.mempty))))))))))))
 
 instance Thrift.ThriftStruct Config where
   buildStruct _proxy
@@ -1740,7 +1781,11 @@
        __field__strict_query_schema_id __field__use_manifold_cli
        __field__max_remote_db_list_age __field__restore_timeout
        __field__max_set_size_bytes __field__check_write_schema_id
-       __field__schema_location)
+       __field__schema_location
+       __field__db_rocksdb_disk_mem_capacity_ratio_limit
+       __field__db_rocksdb_cache_to_mem_ratio
+       __field__db_lmdb_mksquashfs_args __field__db_lmdb_restore_unpack
+       __field__db_create_storage)
     = Thrift.genStruct _proxy
         (Thrift.genField _proxy "retention" (Thrift.getStructType _proxy) 1
            0
@@ -2048,23 +2093,111 @@
                                                                                                    __id__max_set_size_bytes
                                                                                                    __field__check_write_schema_id
                                                                                                    :
-                                                                                                   case
-                                                                                                     __field__schema_location
-                                                                                                     of
-                                                                                                     Prelude.Just
-                                                                                                       _val -> Thrift.genField
-                                                                                                                 _proxy
-                                                                                                                 "schema_location"
-                                                                                                                 (Thrift.getStructType
-                                                                                                                    _proxy)
-                                                                                                                 36
-                                                                                                                 35
-                                                                                                                 (Thrift.buildStruct
+                                                                                                   let (__cereal__schema_location,
+                                                                                                        __id__schema_location)
+                                                                                                         = case
+                                                                                                             __field__schema_location
+                                                                                                             of
+                                                                                                             Prelude.Just
+                                                                                                               _val -> ((:)
+                                                                                                                          (Thrift.genField
+                                                                                                                             _proxy
+                                                                                                                             "schema_location"
+                                                                                                                             (Thrift.getStructType
+                                                                                                                                _proxy)
+                                                                                                                             36
+                                                                                                                             35
+                                                                                                                             (Thrift.buildStruct
+                                                                                                                                _proxy
+                                                                                                                                _val)),
+                                                                                                                        36)
+                                                                                                             Prelude.Nothing -> (Prelude.id,
+                                                                                                                                 35)
+                                                                                                     in
+                                                                                                     __cereal__schema_location
+                                                                                                       (let (__cereal__db_rocksdb_disk_mem_capacity_ratio_limit,
+                                                                                                             __id__db_rocksdb_disk_mem_capacity_ratio_limit)
+                                                                                                              = case
+                                                                                                                  __field__db_rocksdb_disk_mem_capacity_ratio_limit
+                                                                                                                  of
+                                                                                                                  Prelude.Just
+                                                                                                                    _val -> ((:)
+                                                                                                                               (Thrift.genFieldPrim
+                                                                                                                                  _proxy
+                                                                                                                                  "db_rocksdb_disk_mem_capacity_ratio_limit"
+                                                                                                                                  (Thrift.getI32Type
+                                                                                                                                     _proxy)
+                                                                                                                                  37
+                                                                                                                                  __id__schema_location
+                                                                                                                                  (Thrift.genI32Prim
+                                                                                                                                     _proxy)
+                                                                                                                                  _val),
+                                                                                                                             37)
+                                                                                                                  Prelude.Nothing -> (Prelude.id,
+                                                                                                                                      __id__schema_location)
+                                                                                                          in
+                                                                                                          __cereal__db_rocksdb_disk_mem_capacity_ratio_limit
+                                                                                                            (let (__cereal__db_rocksdb_cache_to_mem_ratio,
+                                                                                                                  __id__db_rocksdb_cache_to_mem_ratio)
+                                                                                                                   = case
+                                                                                                                       __field__db_rocksdb_cache_to_mem_ratio
+                                                                                                                       of
+                                                                                                                       Prelude.Just
+                                                                                                                         _val -> ((:)
+                                                                                                                                    (Thrift.genField
+                                                                                                                                       _proxy
+                                                                                                                                       "db_rocksdb_cache_to_mem_ratio"
+                                                                                                                                       (Thrift.getFloatType
+                                                                                                                                          _proxy)
+                                                                                                                                       38
+                                                                                                                                       __id__db_rocksdb_disk_mem_capacity_ratio_limit
+                                                                                                                                       (Thrift.genFloat
+                                                                                                                                          _proxy
+                                                                                                                                          _val)),
+                                                                                                                                  38)
+                                                                                                                       Prelude.Nothing -> (Prelude.id,
+                                                                                                                                           __id__db_rocksdb_disk_mem_capacity_ratio_limit)
+                                                                                                               in
+                                                                                                               __cereal__db_rocksdb_cache_to_mem_ratio
+                                                                                                                 (Thrift.genField
                                                                                                                     _proxy
-                                                                                                                    _val)
-                                                                                                                 :
-                                                                                                                 []
-                                                                                                     Prelude.Nothing -> [])))))))))
+                                                                                                                    "db_lmdb_mksquashfs_args"
+                                                                                                                    (Thrift.getListType
+                                                                                                                       _proxy)
+                                                                                                                    39
+                                                                                                                    __id__db_rocksdb_cache_to_mem_ratio
+                                                                                                                    (Thrift.genList
+                                                                                                                       _proxy
+                                                                                                                       (Thrift.getStringType
+                                                                                                                          _proxy)
+                                                                                                                       (Thrift.genText
+                                                                                                                          _proxy)
+                                                                                                                       __field__db_lmdb_mksquashfs_args)
+                                                                                                                    :
+                                                                                                                    Thrift.genFieldBool
+                                                                                                                      _proxy
+                                                                                                                      "db_lmdb_restore_unpack"
+                                                                                                                      40
+                                                                                                                      39
+                                                                                                                      __field__db_lmdb_restore_unpack
+                                                                                                                      :
+                                                                                                                      case
+                                                                                                                        __field__db_create_storage
+                                                                                                                        of
+                                                                                                                        Prelude.Just
+                                                                                                                          _val -> Thrift.genField
+                                                                                                                                    _proxy
+                                                                                                                                    "db_create_storage"
+                                                                                                                                    (Thrift.getStringType
+                                                                                                                                       _proxy)
+                                                                                                                                    41
+                                                                                                                                    40
+                                                                                                                                    (Thrift.genText
+                                                                                                                                       _proxy
+                                                                                                                                       _val)
+                                                                                                                                    :
+                                                                                                                                    []
+                                                                                                                        Prelude.Nothing -> []))))))))))))
   parseStruct _proxy
     = ST.runSTT
         (do Prelude.return ()
@@ -2105,6 +2238,14 @@
             __field__max_set_size_bytes <- ST.newSTRef Prelude.Nothing
             __field__check_write_schema_id <- ST.newSTRef Prelude.True
             __field__schema_location <- ST.newSTRef Prelude.Nothing
+            __field__db_rocksdb_disk_mem_capacity_ratio_limit <- ST.newSTRef
+                                                                   Prelude.Nothing
+            __field__db_rocksdb_cache_to_mem_ratio <- ST.newSTRef
+                                                        Prelude.Nothing
+            __field__db_lmdb_mksquashfs_args <- ST.newSTRef
+                                                  ["-comp", "zstd", "-Xcompression-level", "8"]
+            __field__db_lmdb_restore_unpack <- ST.newSTRef Prelude.True
+            __field__db_create_storage <- ST.newSTRef Prelude.Nothing
             let
               _parse _lastId
                 = do _fieldBegin <- Trans.lift
@@ -2427,6 +2568,55 @@
                                                                          ST.writeSTRef
                                                                            __field__schema_location
                                                                            (Prelude.Just _val)
+                                                                 37 | _type ==
+                                                                        Thrift.getI32Type _proxy
+                                                                      ->
+                                                                      do !_val <- Trans.lift
+                                                                                    (Thrift.parseI32
+                                                                                       _proxy)
+                                                                         ST.writeSTRef
+                                                                           __field__db_rocksdb_disk_mem_capacity_ratio_limit
+                                                                           (Prelude.Just _val)
+                                                                 38 | _type ==
+                                                                        Thrift.getFloatType _proxy
+                                                                      ->
+                                                                      do !_val <- Trans.lift
+                                                                                    (Thrift.parseFloat
+                                                                                       _proxy)
+                                                                         ST.writeSTRef
+                                                                           __field__db_rocksdb_cache_to_mem_ratio
+                                                                           (Prelude.Just _val)
+                                                                 39 | _type ==
+                                                                        Thrift.getListType _proxy
+                                                                      ->
+                                                                      do !_val <- Trans.lift
+                                                                                    (Prelude.snd <$>
+                                                                                       Thrift.parseList
+                                                                                         _proxy
+                                                                                         (Thrift.parseText
+                                                                                            _proxy))
+                                                                         ST.writeSTRef
+                                                                           __field__db_lmdb_mksquashfs_args
+                                                                           _val
+                                                                 40 | _type ==
+                                                                        Thrift.getBoolType _proxy
+                                                                      ->
+                                                                      do !_val <- Trans.lift
+                                                                                    (Thrift.parseBoolF
+                                                                                       _proxy
+                                                                                       _bool)
+                                                                         ST.writeSTRef
+                                                                           __field__db_lmdb_restore_unpack
+                                                                           _val
+                                                                 41 | _type ==
+                                                                        Thrift.getStringType _proxy
+                                                                      ->
+                                                                      do !_val <- Trans.lift
+                                                                                    (Thrift.parseText
+                                                                                       _proxy)
+                                                                         ST.writeSTRef
+                                                                           __field__db_create_storage
+                                                                           (Prelude.Just _val)
                                                                  _ -> Trans.lift
                                                                         (Thrift.parseSkip _proxy
                                                                            _type
@@ -2495,6 +2685,16 @@
                                                                                 __field__check_write_schema_id
                                              !__val__schema_location <- ST.readSTRef
                                                                           __field__schema_location
+                                             !__val__db_rocksdb_disk_mem_capacity_ratio_limit <- ST.readSTRef
+                                                                                                   __field__db_rocksdb_disk_mem_capacity_ratio_limit
+                                             !__val__db_rocksdb_cache_to_mem_ratio <- ST.readSTRef
+                                                                                        __field__db_rocksdb_cache_to_mem_ratio
+                                             !__val__db_lmdb_mksquashfs_args <- ST.readSTRef
+                                                                                  __field__db_lmdb_mksquashfs_args
+                                             !__val__db_lmdb_restore_unpack <- ST.readSTRef
+                                                                                 __field__db_lmdb_restore_unpack
+                                             !__val__db_create_storage <- ST.readSTRef
+                                                                            __field__db_create_storage
                                              Prelude.pure
                                                (Config __val__retention __val__restore __val__close
                                                   __val__backup
@@ -2527,7 +2727,12 @@
                                                   __val__restore_timeout
                                                   __val__max_set_size_bytes
                                                   __val__check_write_schema_id
-                                                  __val__schema_location)
+                                                  __val__schema_location
+                                                  __val__db_rocksdb_disk_mem_capacity_ratio_limit
+                                                  __val__db_rocksdb_cache_to_mem_ratio
+                                                  __val__db_lmdb_mksquashfs_args
+                                                  __val__db_lmdb_restore_unpack
+                                                  __val__db_create_storage)
               _idMap
                 = HashMap.fromList
                     [("retention", 1), ("restore", 2), ("close", 3), ("backup", 4),
@@ -2546,7 +2751,11 @@
                      ("strict_query_schema_id", 29), ("use_manifold_cli", 30),
                      ("max_remote_db_list_age", 31), ("restore_timeout", 33),
                      ("max_set_size_bytes", 34), ("check_write_schema_id", 35),
-                     ("schema_location", 36)]
+                     ("schema_location", 36),
+                     ("db_rocksdb_disk_mem_capacity_ratio_limit", 37),
+                     ("db_rocksdb_cache_to_mem_ratio", 38),
+                     ("db_lmdb_mksquashfs_args", 39), ("db_lmdb_restore_unpack", 40),
+                     ("db_create_storage", 41)]
             _parse 0)
 
 instance DeepSeq.NFData Config where
@@ -2568,7 +2777,11 @@
        __field__strict_query_schema_id __field__use_manifold_cli
        __field__max_remote_db_list_age __field__restore_timeout
        __field__max_set_size_bytes __field__check_write_schema_id
-       __field__schema_location)
+       __field__schema_location
+       __field__db_rocksdb_disk_mem_capacity_ratio_limit
+       __field__db_rocksdb_cache_to_mem_ratio
+       __field__db_lmdb_mksquashfs_args __field__db_lmdb_restore_unpack
+       __field__db_create_storage)
     = DeepSeq.rnf __field__retention `Prelude.seq`
         DeepSeq.rnf __field__restore `Prelude.seq`
           DeepSeq.rnf __field__close `Prelude.seq`
@@ -2623,7 +2836,22 @@
                                                                         `Prelude.seq`
                                                                         DeepSeq.rnf
                                                                           __field__schema_location
-                                                                          `Prelude.seq` ()
+                                                                          `Prelude.seq`
+                                                                          DeepSeq.rnf
+                                                                            __field__db_rocksdb_disk_mem_capacity_ratio_limit
+                                                                            `Prelude.seq`
+                                                                            DeepSeq.rnf
+                                                                              __field__db_rocksdb_cache_to_mem_ratio
+                                                                              `Prelude.seq`
+                                                                              DeepSeq.rnf
+                                                                                __field__db_lmdb_mksquashfs_args
+                                                                                `Prelude.seq`
+                                                                                DeepSeq.rnf
+                                                                                  __field__db_lmdb_restore_unpack
+                                                                                  `Prelude.seq`
+                                                                                  DeepSeq.rnf
+                                                                                    __field__db_create_storage
+                                                                                    `Prelude.seq` ()
 
 instance Default.Default Config where
   def
@@ -2658,6 +2886,11 @@
         Prelude.Nothing
         Prelude.True
         Prelude.Nothing
+        Prelude.Nothing
+        Prelude.Nothing
+        ["-comp", "zstd", "-Xcompression-level", "8"]
+        Prelude.True
+        Prelude.Nothing
 
 instance Hashable.Hashable Config where
   hashWithSalt __salt
@@ -2672,7 +2905,10 @@
        _enable_schema_evolution _min_db_age _sharding _use_schema_id
        _db_rocksdb_cache_index_and_filter_blocks _strict_query_schema_id
        _use_manifold_cli _max_remote_db_list_age _restore_timeout
-       _max_set_size_bytes _check_write_schema_id _schema_location)
+       _max_set_size_bytes _check_write_schema_id _schema_location
+       _db_rocksdb_disk_mem_capacity_ratio_limit
+       _db_rocksdb_cache_to_mem_ratio _db_lmdb_mksquashfs_args
+       _db_lmdb_restore_unpack _db_create_storage)
     = Hashable.hashWithSalt
         (Hashable.hashWithSalt
            (Hashable.hashWithSalt
@@ -2707,40 +2943,50 @@
                                                                                                   (Hashable.hashWithSalt
                                                                                                      (Hashable.hashWithSalt
                                                                                                         (Hashable.hashWithSalt
-                                                                                                           __salt
-                                                                                                           _retention)
-                                                                                                        _restore)
-                                                                                                     _close)
-                                                                                                  _backup)
-                                                                                               _janitor_period)
-                                                                                            _backup_list_sync_period)
-                                                                                         _default_max_results)
-                                                                                      _default_max_bytes)
-                                                                                   _default_max_time_ms)
-                                                                                _query_alloc_limit)
-                                                                             _logging_rate_limit)
-                                                                          _db_writes_keep)
-                                                                       _db_writes_reap)
-                                                                    _db_writer_threads)
-                                                                 _db_write_queue_limit_mb)
-                                                              _db_ptail_checkpoint_bytes)
-                                                           _db_ptail_checkpoint_enabled)
-                                                        _db_rocksdb_cache_mb)
-                                                     _db_lookup_cache_limit_mb)
-                                                  _db_create_version)
-                                               _disable_predicate_dependency_checks)
-                                            _compact_on_completion)
-                                         _enable_schema_evolution)
-                                      _min_db_age)
-                                   _sharding)
-                                _use_schema_id)
-                             _db_rocksdb_cache_index_and_filter_blocks)
-                          _strict_query_schema_id)
-                       _use_manifold_cli)
-                    _max_remote_db_list_age)
-                 _restore_timeout)
-              _max_set_size_bytes)
-           _check_write_schema_id)
-        _schema_location
+                                                                                                           (Hashable.hashWithSalt
+                                                                                                              (Hashable.hashWithSalt
+                                                                                                                 (Hashable.hashWithSalt
+                                                                                                                    (Hashable.hashWithSalt
+                                                                                                                       (Hashable.hashWithSalt
+                                                                                                                          __salt
+                                                                                                                          _retention)
+                                                                                                                       _restore)
+                                                                                                                    _close)
+                                                                                                                 _backup)
+                                                                                                              _janitor_period)
+                                                                                                           _backup_list_sync_period)
+                                                                                                        _default_max_results)
+                                                                                                     _default_max_bytes)
+                                                                                                  _default_max_time_ms)
+                                                                                               _query_alloc_limit)
+                                                                                            _logging_rate_limit)
+                                                                                         _db_writes_keep)
+                                                                                      _db_writes_reap)
+                                                                                   _db_writer_threads)
+                                                                                _db_write_queue_limit_mb)
+                                                                             _db_ptail_checkpoint_bytes)
+                                                                          _db_ptail_checkpoint_enabled)
+                                                                       _db_rocksdb_cache_mb)
+                                                                    _db_lookup_cache_limit_mb)
+                                                                 _db_create_version)
+                                                              _disable_predicate_dependency_checks)
+                                                           _compact_on_completion)
+                                                        _enable_schema_evolution)
+                                                     _min_db_age)
+                                                  _sharding)
+                                               _use_schema_id)
+                                            _db_rocksdb_cache_index_and_filter_blocks)
+                                         _strict_query_schema_id)
+                                      _use_manifold_cli)
+                                   _max_remote_db_list_age)
+                                _restore_timeout)
+                             _max_set_size_bytes)
+                          _check_write_schema_id)
+                       _schema_location)
+                    _db_rocksdb_disk_mem_capacity_ratio_limit)
+                 _db_rocksdb_cache_to_mem_ratio)
+              _db_lmdb_mksquashfs_args)
+           _db_lmdb_restore_unpack)
+        _db_create_storage
 
 type Set_RepoName_8170 = HashSet.HashSet RepoName
diff --git a/glean/cpp/glean.h b/glean/cpp/glean.h
--- a/glean/cpp/glean.h
+++ b/glean/cpp/glean.h
@@ -464,6 +464,7 @@
       const SchemaInventory* inventory,
       size_t cache_capacity,
       std::string schemaId);
+  ~BatchBase() = default;
   BatchBase(const BatchBase&) = delete;
   BatchBase(BatchBase&&) = delete;
   BatchBase& operator=(const BatchBase&) = delete;
diff --git a/glean/cpp/sender.h b/glean/cpp/sender.h
--- a/glean/cpp/sender.h
+++ b/glean/cpp/sender.h
@@ -10,11 +10,13 @@
 
 #include "glean/cpp/glean.h"
 
+#include <folly/Utility.h>
+
 namespace facebook {
 namespace glean {
 
-struct Sender {
-  virtual ~Sender() {}
+struct Sender : folly::NonCopyableNonMovable {
+  virtual ~Sender() = default;
 
   // If we called rebaseAndSend previously, check if we have a response from
   // the server (or wait for it if 'wait' is true) and rebase the batch (i.e.,
diff --git a/glean/db/Glean/Backend/Local.hs b/glean/db/Glean/Backend/Local.hs
deleted file mode 100644
--- a/glean/db/Glean/Backend/Local.hs
+++ /dev/null
@@ -1,263 +0,0 @@
-{-
-  Copyright (c) Meta Platforms, Inc. and affiliates.
-  All rights reserved.
-
-  This source code is licensed under the BSD-style license found in the
-  LICENSE file in the root directory of this source tree.
--}
-
-{-# LANGUAGE ApplicativeDo #-}
-{-# OPTIONS_GHC -Wno-orphans #-}
---
--- | An abstraction over the Glean API that can be served by
--- either a local DB or a remote server.
---
-module Glean.Backend.Local
-  (
-    Env(..)
-  , Config(..)
-  , options
-  , withDatabases
-
-    -- * Schemas
-  , loadDbSchema
-  , serializeInventory
-  ) where
-
-import Control.Applicative
-import Control.Concurrent (getNumCapabilities)
-import Control.Concurrent.Stream (stream)
-import Control.Exception (catches, Handler (Handler), throwIO)
-import Control.Monad (forM_)
-import Data.ByteString (ByteString)
-import Data.Default
-import Data.IORef.Extra
-import qualified Data.HashMap.Strict as HashMap
-import qualified Data.Map.Strict as Map
-import Data.Maybe
-import Data.Typeable
-import qualified Haxl.Core as Haxl
-
-import Util.Control.Exception
-import qualified Util.Control.Exception.CallStack as CallStack
-import Util.STM
-
-import Glean.Backend.Types
-import qualified Glean.Database.Catalog as Catalog
-import qualified Glean.Database.CompletePredicates as Database
-import qualified Glean.Database.Create as Database
-import Glean.Database.Config
-import qualified Glean.Database.Delete as Database
-import Glean.Database.Env
-import Glean.Database.Open as Database
-import qualified Glean.Database.List as Database
-import qualified Glean.Database.PredicateStats as Database (predicateStats)
-import qualified Glean.Database.Restore as Database
-import qualified Glean.Database.Schema as Database
-import Glean.Database.Schema hiding (getSchemaInfo, schemaId)
-import qualified Glean.Database.Types as Database
-import Glean.Database.Types (Env(..))
-import qualified Glean.Database.Finish as Database
-import qualified Glean.Database.Writes as Database
-import Glean.Internal.Types
-import qualified Glean.Query.UserQuery as UserQuery
-import qualified Glean.Query.Derive as Derive
-import Glean.Query.Thrift
-import Glean.Query.Thrift.Internal
-import Glean.RTS (Fid(..))
-import qualified Glean.RTS.Foreign.Inventory as Inventory
-import qualified Glean.RTS.Foreign.Lookup as Lookup
-import qualified Glean.Types as Thrift
-import Glean.Util.Observed as Observed
-import Haxl.DataSource.Glean.Common
-
-
-instance Backend Database.Env where
-  queryFact env repo id = readDatabase env repo $ \_ db ->
-    Lookup.lookupFact db (Fid id)
-
-  factIdRange env repo = do
-    (starting, next) <- readDatabase env repo $ \_ db ->
-      (,) <$> Lookup.startingId db <*> Lookup.firstFreeId db
-    return $ Thrift.FactIdRange (fromFid starting) (fromFid next)
-
-  getSchemaInfo env (Just repo) req =
-    withOpenDatabase env repo $ \odb -> do
-      index <- Observed.get (Database.envSchemaSource env)
-      Database.getSchemaInfo (Database.odbSchema odb) index req
-
-  getSchemaInfo env Nothing Thrift.GetSchemaInfo{..} = do
-      index <- Observed.get (Database.envSchemaSource env)
-      sid <- case getSchemaInfo_select of
-          Thrift.SelectSchema_schema_id sid -> return sid
-          other -> throwIO $ userError $ "unsupported: " <> show other
-      Database.getSchemaInfoForSchema index sid (envDebug env)
-
-  validateSchema env (Thrift.ValidateSchema str) = do
-    schema <- Observed.get (Database.envSchemaSource env)
-    conf <- Observed.get (Database.envServerConfig env)
-    validateNewSchema conf str schema (envDebug env)
-
-  predicateStats env repo opts = Database.predicateStats env repo opts
-
-  userQueryFacts env repo q
-    | isNothing (Thrift.userQueryFacts_schema_id q) =
-      UserQuery.userQueryFacts env repo q {
-        Thrift.userQueryFacts_schema_id = schemaId env
-      }
-    | otherwise = UserQuery.userQueryFacts env repo q
-
-  userQuery env repo q
-    | isNothing (Thrift.userQuery_schema_id q) =
-      UserQuery.userQuery env repo q {
-        Thrift.userQuery_schema_id = schemaId env
-      }
-    | otherwise = UserQuery.userQuery env repo q
-
-  userQueryBatch env repo Thrift.UserQueryBatch{..} = do
-      resultsRef <- newIORef mempty
-      numCaps <- getNumCapabilities
-      stream numCaps (forM_ queries) $ \q -> do
-        res <- runOne q
-        atomicModifyIORef'_ resultsRef $ Map.insert q res
-      results <- readIORef resultsRef
-      return $ map (results Map.!) queries
-      where
-        queries =
-          [ Thrift.UserQuery
-            { userQuery_predicate = userQueryBatch_predicate
-            , userQuery_predicate_version = userQueryBatch_predicate_version
-            , userQuery_encodings  = userQueryBatch_encodings
-            , userQuery_client_info = userQueryBatch_client_info
-            , userQuery_schema_id = userQueryBatch_schema_id <|> schemaId env
-            , userQuery_options = userQueryBatch_options
-            , userQuery_query = q
-            }
-          | q <- userQueryBatch_queries
-          ]
-        runOne query =
-          (Thrift.UserQueryResultsOrException_results
-            <$> userQuery env repo query)
-          `catches`
-          [ Handler $ \(Thrift.Retry r) -> return $
-              Thrift.UserQueryResultsOrException_retry $
-                Thrift.RetryException r
-          , Handler $ \(Thrift.BadQuery b) -> return $
-              Thrift.UserQueryResultsOrException_badQuery $
-                Thrift.BadQueryException b
-          ]
-
-
-  deriveStored = Derive.deriveStored
-
-  listDatabases = Database.listDatabases
-  getDatabase env repo =
-    maybe (CallStack.throwIO $ Thrift.UnknownDatabase repo) return
-    =<< atomically (Catalog.getLocalDatabase (Database.envCatalog env) repo)
-
-  kickOffDatabase = Database.kickOffDatabase
-  finishDatabase = Database.finishDatabase
-  finalizeDatabase = Database.finalizeDatabase
-  updateProperties env repo set unset = do
-    Database.updateProperties env repo set unset
-    return def
-
-  completePredicates_ = Database.completePredicates
-
-  restoreDatabase = Database.restoreDatabase
-
-  deleteDatabase env repo = do
-    Database.deleteDatabase env repo
-    return def
-
-  enqueueBatch env cbatch = Database.enqueueBatch env cbatch Nothing
-  enqueueJsonBatch env cbatch = Database.enqueueJsonBatch env cbatch
-  enqueueBatchDescriptor env repo batch waitPolicy =
-    Database.enqueueBatchDescriptor env repo batch waitPolicy
-  pollBatch env handle = Database.pollBatch env handle
-
-  displayBackend _ = "(local backend)"
-
-  hasDatabase env repo = do
-    Thrift.GetDatabaseResult { getDatabaseResult_database = Thrift.Database{..}}
-      <- getDatabase env repo
-    return $ case database_status of
-      Thrift.DatabaseStatus_Restorable -> False
-      _ -> True
-
-  schemaId = Database.envSchemaId
-
-  usingShards _ = False
-
-  initGlobalState backend = do
-    capabilities <- getNumCapabilities
-    let streamMapM_ :: (a -> IO ()) -> [a] -> IO ()
-        streamMapM_ f xx = stream capabilities (forM_ xx) f
-    if capabilities == 1
-      then return
-        ( GleanGetState $ Haxl.SyncFetch $
-            mapM_ (syncGetOne backend) . HashMap.toList . requestByRepo
-        , GleanQueryState $ Haxl.SyncFetch $
-            mapM_ (syncQueryOne backend)
-        )
-      else return
-        ( GleanGetState $ Haxl.BackgroundFetch $
-            streamMapM_ (syncGetOne backend) . HashMap.toList . requestByRepo
-        , GleanQueryState $ Haxl.BackgroundFetch $
-            streamMapM_ (syncQueryOne backend)
-        )
-
-
--- -----------------------------------------------------------------------------
--- Haxl
-
-syncGetOne :: Env -> (Thrift.Repo, [Haxl.BlockedFetch GleanGet]) -> IO ()
-syncGetOne env (repo, requests) = do
-  let schema = schemaId env
-  results <- userQueryFacts env repo (mkUserQueryFacts Nothing schema requests)
-  putResults results requests
-
-syncQueryOne :: Env -> Haxl.BlockedFetch GleanQuery -> IO ()
-syncQueryOne env
-    (Haxl.BlockedFetch (QueryReq (Query q :: Query q) repo stream) rvar) =
-  runSyncQuery repo env
-    (Query (mkUserQuery Nothing (schemaId env) q) :: Query q)
-    (if stream then Just mempty else Nothing) rvar
-
-runSyncQuery
-  :: forall q r. (Show q, Typeable q, QueryResult q r)
-  => Thrift.Repo
-  -> Env
-  -> Query q
-  -> Maybe r -- results so far
-  -> Haxl.ResultVar (r, Bool)
-  -> IO ()
-runSyncQuery repo env q@(Query req) acc rvar = do
-  r <- tryAll $ userQuery env repo req
-  case r of
-    Left e -> Haxl.putFailure rvar e
-    Right results ->
-      putQueryResults q results acc rvar $
-        \(q :: Query q) acc -> runSyncQuery repo env q acc rvar
-
--- -----------------------------------------------------------------------------
--- DbSchema
-
-loadDbSchema :: Backend a => a -> Thrift.Repo -> IO DbSchema
-loadDbSchema backend repo = do
-  Thrift.SchemaInfo schema pids _ dbSchemaIds _ _ <-
-    getSchemaInfo backend (Just repo) def
-      { Thrift.getSchemaInfo_select = Thrift.SelectSchema_stored def }
-  fromStoredSchema Nothing (StoredSchema schema pids dbSchemaIds)
-    readWriteContent def
-
--- | Serialize the inventory for the schema used by this repo.
--- The inventory is some information about the predicates in the schema
-serializeInventory
-  :: Backend backend
-  => backend
-  -> Thrift.Repo
-  -> IO ByteString
-serializeInventory backend repo = do
-  dbSchema <- loadDbSchema backend repo
-  return $ Inventory.serialize $ schemaInventory dbSchema
diff --git a/glean/db/Glean/Backend/Logging.hs b/glean/db/Glean/Backend/Logging.hs
deleted file mode 100644
--- a/glean/db/Glean/Backend/Logging.hs
+++ /dev/null
@@ -1,351 +0,0 @@
-{-
-  Copyright (c) Meta Platforms, Inc. and affiliates.
-  All rights reserved.
-
-  This source code is licensed under the BSD-style license found in the
-  LICENSE file in the root directory of this source tree.
--}
-
-module Glean.Backend.Logging
-  ( LoggingBackend(..)
-  ) where
-
-import Control.Exception
-import qualified Data.ByteString as ByteString
-import qualified Data.HashMap.Strict as HashMap
-import qualified Data.Map as Map
-import Data.Maybe
-import Data.Monoid (Sum(getSum, Sum))
-import Data.Text (Text)
-import qualified Data.Text as Text
-import qualified Data.Text.Encoding as Text
-import qualified Data.Text.Encoding.Error as Text
-import TextShow (showt)
-
-import Util.Logger
-
-import Glean.Schema.Util (showRef)
-import Glean.Backend.Local ()
-import Glean.Logger.Server as Logger
-import qualified Glean.Database.List as Database
-import qualified Glean.Database.Types as Database
-import Glean.Database.Writes (batchOwnedSize, batchDependenciesSize)
-import Glean.Logger
-import qualified Glean.Types as Thrift
-import Util.Time
-
-import Glean.Backend.Types
-
-
--- | A logging wrapper for Env. We do it this way because some backend
--- calls invoke other backend calls, and we only want to log the
--- outermost one. For example, userQuery will call queryFact a *lot*,
--- and it would be too expensive to log each and every call to
--- queryFact.
-newtype LoggingBackend = LoggingBackend Database.Env
-
-instance Backend LoggingBackend where
-  queryFact (LoggingBackend env) repo id =
-    loggingAction (runLogRepo "queryFact" env repo) (const mempty) $
-      queryFact env repo id
-  factIdRange (LoggingBackend env) repo =
-    loggingAction (runLogRepo "factIdRange" env repo) (const mempty) $
-      factIdRange env repo
-  getSchemaInfo (LoggingBackend env) (Just repo) req =
-    loggingAction (runLogRepo "getSchemaInfo" env repo) (const mempty) $
-      getSchemaInfo env (Just repo) req
-  getSchemaInfo (LoggingBackend env) Nothing req =
-    loggingAction (runLogCmd "getSchemaInfo" env) (const mempty) $
-      getSchemaInfo env Nothing req
-  validateSchema (LoggingBackend env) req =
-    loggingAction (runLogCmd "validateSchema" env) (const mempty) $
-      validateSchema env req
-  predicateStats (LoggingBackend env) repo opts =
-    loggingAction (runLogRepo "predicateStats" env repo) (const mempty) $
-      predicateStats env repo opts
-  userQueryFacts (LoggingBackend env) repo req =
-    loggingAction (runLogQueryFacts "userQueryFacts" env repo req)
-      logQueryResults $
-        userQueryFacts env repo req
-  userQuery (LoggingBackend env) repo req =
-    loggingAction (runLogQuery "userQuery" env repo req) logQueryResults $
-      userQuery env repo req
-  userQueryBatch (LoggingBackend env) repo reqBatch =
-    loggingAction
-      (runLogQueryBatch "userQueryBatch" env repo reqBatch)
-      logQueryResultsOrException
-      (userQueryBatch env repo reqBatch)
-
-  deriveStored (LoggingBackend env) log repo q =
-    loggingAction
-      (runLogDerivePredicate "deriveStored" env repo q)
-      (const mempty)
-      (deriveStored env (runLogDerivationResult env log repo q) repo q)
-
-  listDatabases (LoggingBackend env) req =
-    loggingAction (runLogCmd "listDatabases" env) (const mempty) $
-      Database.listDatabases env req
-  getDatabase (LoggingBackend env) repo =
-    loggingAction (runLogRepo "getDatabase" env repo) (const mempty) $
-      getDatabase env repo
-
-  kickOffDatabase (LoggingBackend env) rq =
-    loggingAction
-      (runLogKickOff "kickOff" env rq)
-      (const mempty) $
-      kickOffDatabase env rq
-  finishDatabase (LoggingBackend env) repo =
-    loggingAction
-      (runLogRepo "finishDatabase" env repo)
-      (const mempty) $
-      finishDatabase env repo
-  finalizeDatabase (LoggingBackend env) repo =
-    loggingAction
-      (runLogRepo "finalizeDatabase" env repo)
-      (const mempty) $
-      finalizeDatabase env repo
-  updateProperties (LoggingBackend env) repo set unset =
-    loggingAction
-      (runLogRepo "updateProperties" env repo)
-      (const mempty) $
-      updateProperties env repo set unset
-
-  completePredicates_ (LoggingBackend env) repo preds =
-    loggingAction
-       (runLogRepo "completePredicates" env repo)
-       (const mempty) $
-       completePredicates_ env repo preds
-
-  restoreDatabase (LoggingBackend env) loc =
-    loggingAction (runLogCmd "restoreDatabase" env) (const mempty) $
-      restoreDatabase env loc
-  deleteDatabase (LoggingBackend env) repo =
-    loggingAction (runLogRepo "deleteDatabase" env repo) (const mempty) $
-      deleteDatabase env repo
-  enqueueBatch (LoggingBackend env) cbatch =
-    loggingAction
-      (runLogEnqueueBatch "enqueueBatch" env cbatch)
-      (const mempty) $
-        enqueueBatch env cbatch
-  enqueueJsonBatch (LoggingBackend env) repo batch =
-    loggingAction (runLogRepo "enqueueJsonBatch" env repo) (const mempty) $
-      enqueueJsonBatch env repo batch
-  enqueueBatchDescriptor (LoggingBackend env) repo batch waitPolicy =
-    loggingAction
-      (runLogRepo "enqueueBatchDescriptor" env repo)
-      (const mempty) $
-        enqueueBatchDescriptor env repo batch waitPolicy
-  pollBatch (LoggingBackend env) handle =
-    loggingAction (runLogCmd "pollBatch" env) (const mempty) $
-      pollBatch env handle
-  displayBackend (LoggingBackend b) = displayBackend b
-  hasDatabase (LoggingBackend b) repo = hasDatabase b repo
-  schemaId (LoggingBackend b) = schemaId b
-  usingShards (LoggingBackend b) = usingShards b
-  initGlobalState (LoggingBackend b) = initGlobalState b
-
-runLogKickOff
-  :: Text
-  -> Database.Env
-  -> Thrift.KickOff
-  -> GleanServerLog
-  -> IO ()
-runLogKickOff cmd env Thrift.KickOff{..} log =
-  runLogRepo cmd env kickOff_repo $ log <> schemaId
-  where
-  schemaId = maybe mempty Logger.SetSchemaId $
-    HashMap.lookup "glean.schema_id" kickOff_properties
-
-runLogQueryFacts
-  :: Text
-  -> Database.Env
-  -> Thrift.Repo
-  -> Thrift.UserQueryFacts
-  -> GleanServerLog -> IO ()
-runLogQueryFacts cmd env repo Thrift.UserQueryFacts{..} log =
-  runLogRepo cmd env repo $ log
-    <> maybe mempty logQueryOptions userQueryFacts_options
-    <> maybe mempty logQueryClientInfo userQueryFacts_client_info
-    <> maybe mempty (Logger.SetSchemaId . Thrift.unSchemaId)
-        userQueryFacts_schema_id
-
-runLogQuery
-  :: Text
-  -> Database.Env
-  -> Thrift.Repo
-  -> Thrift.UserQuery
-  -> GleanServerLog
-  -> IO ()
-runLogQuery cmd env repo Thrift.UserQuery{..} log = do
-  runLogRepo cmd env repo $ mconcat
-    [ log
-    , Logger.SetQuery
-        (Text.decodeUtf8With Text.lenientDecode $
-          if ByteString.length userQuery_query > 1024
-            then "[truncated] " <> ByteString.take 1024 userQuery_query
-            else userQuery_query)
-    , Logger.SetPredicate userQuery_predicate
-    , maybe mempty (Logger.SetPredicateVersion . fromIntegral)
-        userQuery_predicate_version
-    , maybe mempty (Logger.SetSchemaId . Thrift.unSchemaId)
-        userQuery_schema_id
-    , maybe mempty logQueryOptions userQuery_options
-    , maybe mempty logQueryClientInfo userQuery_client_info
-    ]
-
-runLogQueryBatch
-  :: Text
-  -> Database.Env
-  -> Thrift.Repo
-  -> Thrift.UserQueryBatch
-  -> GleanServerLog
-  -> IO ()
-runLogQueryBatch cmd env repo Thrift.UserQueryBatch{..} log =
-  runLogRepo cmd env repo $ mconcat
-    [ log
-    , Logger.SetQuery $ case userQueryBatch_queries of
-        [] -> "0 batched queries"
-        q:rest -> Text.unlines $
-          Text.decodeUtf8With Text.lenientDecode q :
-          [" + " <> showt n <> " batched queries"
-          | let n = length rest
-          , n > 1
-          ]
-    , Logger.SetPredicate userQueryBatch_predicate
-    , maybe mempty (Logger.SetPredicateVersion . fromIntegral)
-        userQueryBatch_predicate_version
-    , maybe mempty (Logger.SetSchemaId . Thrift.unSchemaId)
-        userQueryBatch_schema_id
-    , maybe mempty logQueryOptions userQueryBatch_options
-    , maybe mempty logQueryClientInfo userQueryBatch_client_info
-    ]
-
-runLogEnqueueBatch
-  :: Text
-  -> Database.Env
-  -> Thrift.ComputedBatch
-  -> GleanServerLog
-  -> IO ()
-runLogEnqueueBatch cmd env Thrift.ComputedBatch{..} log =
-  let !Thrift.Batch{..} = computedBatch_batch in
-  runLogRepo cmd env computedBatch_repo $ mconcat
-    [ log
-    , Logger.SetBatchFactsSize $ ByteString.length batch_facts
-    , Logger.SetBatchFactsCount $ fromIntegral $
-        Thrift.batch_count computedBatch_batch
-    , Logger.SetBatchOwnedSize $ batchOwnedSize batch_owned
-    , Logger.SetBatchDependenciesSize $ batchDependenciesSize batch_dependencies
-    ]
-
-logQueryOptions :: Thrift.UserQueryOptions -> GleanServerLog
-logQueryOptions Thrift.UserQueryOptions{..} = mconcat
-  [ Logger.SetNoBase64Binary userQueryOptions_no_base64_binary
-  , Logger.SetExpandResults userQueryOptions_expand_results
-  , Logger.SetRecursive userQueryOptions_recursive
-  , maybe mempty (Logger.SetMaxResults . fromIntegral)
-      userQueryOptions_max_results
-  , Logger.SetSyntax $ case userQueryOptions_syntax of
-      Thrift.QuerySyntax_JSON -> "JSON"
-      Thrift.QuerySyntax_ANGLE -> "Angle"
-  , maybe mempty
-      ( Logger.SetRequestContinuationSize
-      . ByteString.length
-      . Thrift.userQueryCont_continuation
-      )
-      userQueryOptions_continuation
-  ]
-
-logQueryClientInfo :: Thrift.UserQueryClientInfo -> GleanServerLog
-logQueryClientInfo Thrift.UserQueryClientInfo{..} = mconcat
-  [ maybe mempty Logger.SetClientUnixname userQueryClientInfo_unixname
-  , Logger.SetClientApplication userQueryClientInfo_application
-  , Logger.SetClientName userQueryClientInfo_name
-  ]
-
-logQueryResultsOrException
-  :: [Thrift.UserQueryResultsOrException] -> GleanServerLog
-logQueryResultsOrException results = mconcat
-  [
-    Logger.SetResults $ getSum $ foldMap (Sum . countQueryResults)
-      [ r | Thrift.UserQueryResultsOrException_results r <- results]
-  ]
-
-logQueryResults :: Thrift.UserQueryResults -> GleanServerLog
-logQueryResults it@Thrift.UserQueryResults{..} = mconcat
-  [ Logger.SetResults $ countQueryResults it
-  , Logger.SetTruncated (isJust userQueryResults_continuation)
-  , maybe mempty logQueryStats userQueryResults_stats
-  , maybe mempty Logger.SetType userQueryResults_type
-  , maybe mempty
-      ( Logger.SetResponseContinuationSize
-      . ByteString.length
-      . Thrift.userQueryCont_continuation
-      )
-      userQueryResults_continuation
-  ]
-
-countQueryResults :: Thrift.UserQueryResults -> Int
-countQueryResults Thrift.UserQueryResults{..} =
-  case userQueryResults_results of
-    Thrift.UserQueryEncodedResults_bin bin ->
-      Map.size (Thrift.userQueryResultsBin_facts bin)
-    Thrift.UserQueryEncodedResults_json json ->
-      length (Thrift.userQueryResultsJSON_facts json)
-    Thrift.UserQueryEncodedResults_compact compact ->
-      length (Thrift.userQueryResultsCompact_facts compact)
-    _ ->
-      length userQueryResults_facts
-
-logQueryStats :: Thrift.UserQueryStats -> GleanServerLog
-logQueryStats Thrift.UserQueryStats{..} = mconcat
-  [ Logger.SetResults (fromIntegral userQueryStats_result_count)
-  , Logger.SetFacts (fromIntegral userQueryStats_num_facts)
-  , Logger.SetFullScans (showRef <$> userQueryStats_full_scans)
-  , maybe mempty (Logger.SetBytecodeSize . fromIntegral)
-      userQueryStats_bytecode_size
-  , maybe mempty (Logger.SetCompileTimeUs . fromIntegral . (`quot` 1000))
-      userQueryStats_compile_time_ns
-  , maybe mempty (Logger.SetExecuteTimeUs . fromIntegral . (`quot` 1000))
-      userQueryStats_execute_time_ns
-  , maybe mempty (Logger.SetQueryResultBytes . fromIntegral)
-      userQueryStats_result_bytes
-  ]
-
-runLogDerivePredicate
-  :: Text
-  -> Database.Env
-  -> Thrift.Repo
-  -> Thrift.DerivePredicateQuery
-  -> GleanServerLog
-  -> IO ()
-runLogDerivePredicate cmd env repo Thrift.DerivePredicateQuery {..} log =
-  runLogRepo cmd env repo $ mconcat
-    [ log
-    , Logger.SetPredicate derivePredicateQuery_predicate
-    , maybe mempty (Logger.SetPredicateVersion . fromIntegral)
-        derivePredicateQuery_predicate_version
-    , maybe mempty logQueryClientInfo derivePredicateQuery_client_info
-    ]
-
-runLogDerivationResult
-  :: Database.Env
-  -> LogDerivationResult
-  -> Thrift.Repo
-  -> Thrift.DerivePredicateQuery
-  -> Either (DiffTimePoints, SomeException) Thrift.UserQueryStats
-  -> IO ()
-runLogDerivationResult env log repo Thrift.DerivePredicateQuery{..} res = do
-  log res
-  runLogRepo "deriveStored(completed)" env repo $ mconcat
-    [ Logger.SetPredicate derivePredicateQuery_predicate
-    , maybe mempty (Logger.SetPredicateVersion . fromIntegral)
-        derivePredicateQuery_predicate_version
-    , maybe mempty logQueryClientInfo derivePredicateQuery_client_info
-    , case res of
-        Left (_,err) -> failureLog err
-        Right stats -> successLog <> logQueryStats stats
-    , timeLog $ toDiffSeconds $ case res of
-        Left (duration, _) -> duration
-        Right Thrift.UserQueryStats{..} ->
-          nanoseconds (fromIntegral userQueryStats_elapsed_ns)
-    ]
diff --git a/glean/db/Glean/Database/Backup.hs b/glean/db/Glean/Database/Backup.hs
--- a/glean/db/Glean/Database/Backup.hs
+++ b/glean/db/Glean/Database/Backup.hs
@@ -60,6 +60,7 @@
 import Glean.Database.Trace
 import Glean.Database.Types
 import Glean.Database.Schema
+import Glean.Database.Storage
 import Glean.Logger
 import Glean.RTS.Foreign.Ownership (getOwnershipStats, showOwnershipStats)
 import Glean.ServerConfig.Types (DatabaseBackupPolicy(..))
@@ -235,13 +236,13 @@
   say log s = log $ inRepo repo $ "backup: " ++ s
 
   backup = loggingAction (runLogRepo "backup" env repo) (const mempty) $ do
-    ServerConfig.Config{..} <- Observed.get envServerConfig
+    cfg@ServerConfig.Config{..} <- Observed.get envServerConfig
     meta <- atomically $ Catalog.readMeta envCatalog repo
     let excluded =
           hasExcludeProperty repo (metaProperties meta) config_retention
     atomically $ notify envListener $ BackupStarted repo
     say logInfo "starting"
-    withOpenDatabaseStorage env repo $ \_storage OpenDB{..} -> do
+    withOpenDatabase env repo $ \OpenDB{..} -> do
     say logInfo "packing"
     stats <- mapMaybe
       (\(pid,stats) -> (,stats) . predicateRef <$> lookupPid pid odbSchema)
@@ -249,15 +250,18 @@
     ownershipStats <- do
       maybeOwnership <- readTVarIO odbOwnership
       mapM getOwnershipStats maybeOwnership
+    withStorageFor env repo meta $ \storage -> do
 
-    Backend.Data{..} <- withScratchDirectory envStorage repo $ \scratch ->
-      Storage.backup odbHandle scratch $ \path Data{dataSize} -> do
+    Backend.Data{..} <- withScratchDirectory storage repo $ \scratch ->
+      Storage.backup odbHandle cfg scratch $ \path Data{dataSize} -> do
         say logInfo "uploading"
         let policy = ServerConfig.databaseBackupPolicy_repos config_backup
-            ttl = case ServerConfig.backup_delete_after_seconds <$>
-              Map.lookup (repo_name repo) policy of
-                Just 0 -> Nothing
-                ttl -> fromIntegral <$> ttl
+            ttl = case Map.lookup (repo_name repo) policy of
+              Just backupPolicy ->
+                case ServerConfig.backup_delete_after_seconds backupPolicy of
+                  0 -> Nothing
+                  seconds -> Just (fromIntegral seconds)
+              Nothing -> Just (30 * 24 * 60 * 60)  -- Default: 30 days
             metaWithBytes = meta {
               metaCompleteness = case metaCompleteness meta of
                 Complete DatabaseComplete{..} ->
@@ -276,6 +280,7 @@
       dataSize
       locator
       excluded
+      (metaProperties meta)
     say logInfo "finished"
     atomically $ do
       void $ Catalog.modifyMeta envCatalog repo $ \meta -> return meta
@@ -305,12 +310,13 @@
   , Just (_, Some site, r_repo) <- fromRepoLocator envBackupBackends loc
   , r_repo == repo =
     loggingAction (runLogRepo "restore" env repo) (const mempty) $ do
-      ServerConfig.Config{..} <- Observed.get envServerConfig
+      cfg@ServerConfig.Config{..} <- Observed.get envServerConfig
       let maybeTimeout =
             case config_restore_timeout of
               Just seconds -> void . timeout (fromIntegral seconds * 1000000)
               Nothing -> id
-      maybeTimeout $ restore site size `catch` handler
+      withStorageFor env repo meta $ \storage ->
+        maybeTimeout $ restore site storage cfg size `catch` handler storage
 
       -- NOTE: No point in adding the repo to the sinbin if there was
       -- an exception, the handler removed it from the list of known DBs
@@ -327,10 +333,17 @@
   where
   say log s = log $ inRepo repo $ "restore: " ++ s
 
-  restore :: Site s => s -> Maybe Int64 -> IO ()
-  restore site bytes = traceMsg envTracer (GleanTraceDownload repo) $ do
+  restore
+    :: (Storage st, Site s)
+    => s
+    -> st
+    -> ServerConfig.Config
+    -> Maybe Int64
+    -> IO ()
+  restore site storage cfg bytes =
+      traceMsg envTracer (GleanTraceDownload repo) $ do
     atomically $ notify envListener $ RestoreStarted repo
-    mbFreeBytes <- (Just <$> Storage.getFreeCapacity envStorage)
+    mbFreeBytes <- (Just <$> Storage.getFreeCapacity storage)
                   `catch` \(_ :: IOException) -> return Nothing
     case (mbFreeBytes, bytes)  of
       (Just freeBytes, Just size) -> do
@@ -342,7 +355,7 @@
               neededBytes freeBytes
       _ -> return ()
 
-    withScratchDirectory envStorage repo $ \scratch -> do
+    withScratchDirectory storage repo $ \scratch -> do
     say logInfo "starting"
     say logInfo "downloading"
     let scratch_restore = scratch </> "restore"
@@ -353,14 +366,15 @@
     say logInfo "restoring"
     createDirectoryIfMissing True scratch_restore
     traceMsg envTracer GleanTraceStorageRestore $
-      Storage.restore envStorage repo scratch_restore scratch_file
+      Storage.restore storage cfg repo scratch_restore scratch_file
     say logInfo "adding"
     traceMsg envTracer GleanTraceFinishRestore $
       Catalog.finishRestoring envCatalog repo
     atomically $ notify envListener $ RestoreFinished repo
     say logInfo "finished"
 
-  handler exc = do
+  handler :: Storage s => s -> SomeException -> IO ()
+  handler storage exc = do
     failed <- atomically $ do
       failed <- Catalog.exists envCatalog [Restoring] repo
       when failed $ do
@@ -369,7 +383,7 @@
       return failed
     when failed $ do
       say logError $ "failed: " ++ show exc
-      swallow $ Storage.safeRemoveForcibly envStorage repo
+      swallow $ Storage.safeRemoveForcibly storage repo
     rethrowAsync exc
 
 
diff --git a/glean/db/Glean/Database/Close.hs b/glean/db/Glean/Database/Close.hs
--- a/glean/db/Glean/Database/Close.hs
+++ b/glean/db/Glean/Database/Close.hs
@@ -39,7 +39,7 @@
   dbs <- readTVarIO envActive
   forM_ (HashMap.keys dbs) $ closeDatabase env
 
-isIdle :: (TimePoint -> Bool) -> DB s -> OpenDB s -> STM Bool
+isIdle :: (TimePoint -> Bool) -> DB -> OpenDB -> STM Bool
 isIdle long_enough db odb = and <$> sequence
   [ (== 1) <$> readTVar (dbUsers db)  -- we are the only user
   , long_enough <$> readTVar (odbIdleSince odb)
@@ -52,7 +52,7 @@
   ]
 
 closeIf
-  :: (forall s . DB s -> DBState s -> STM (Maybe (OpenDB s)))
+  :: (DB -> DBState -> STM (Maybe OpenDB))
   -> Env
   -> Repo
   -> IO ()
@@ -132,7 +132,7 @@
   forM_ (HashMap.toList repoOpenCounts) $ \(repoNm,count) -> do
     setCounter ("glean.db." <> Text.encodeUtf8 repoNm <> ".open") count
 
-closeOpenDB :: Storage.Storage s => Env -> OpenDB s -> IO ()
+closeOpenDB :: Env -> OpenDB -> IO ()
 closeOpenDB env OpenDB{..} = do
   case odbWriting of
     Just Writing{..} -> do
diff --git a/glean/db/Glean/Database/Config.hs b/glean/db/Glean/Database/Config.hs
--- a/glean/db/Glean/Database/Config.hs
+++ b/glean/db/Glean/Database/Config.hs
@@ -10,9 +10,12 @@
 module Glean.Database.Config (
   -- * DataStore
   DataStore(..),
+  StorageName,
   fileDataStore,
   tmpDataStore,
   memoryDataStore,
+  rocksdbName,
+  lmdbName,
 
   -- * Config, and options parser
   options,
@@ -82,8 +85,10 @@
 import Glean.Database.Storage
 import qualified Glean.Database.Storage.Memory as Memory
 import qualified Glean.Database.Storage.RocksDB as RocksDB
+import qualified Glean.Database.Storage.LMDB as LMDB
 import Glean.Database.Trace
 import qualified Glean.Internal.Types as Internal
+import Glean.Internal.Types (StorageName(..))
 import Glean.DefaultConfigs
 import Glean.Logger.Database
 import Glean.Logger.Server
@@ -104,36 +109,56 @@
 #endif
 
 data DataStore = DataStore
-  { withDataStore
-      :: forall a. ServerConfig.Config
-      -> (forall c s. (Catalog.Store c, Storage s) => c -> s -> IO a)
-      -> IO a
+  { withStorage ::
+      -- setup the storage backend. Must be scoped, because it might
+      -- involve creating temporary resources.
+      forall a.
+      ServerConfig.Config ->
+      ((HashMap StorageName (Some Storage), Some Catalog.Store) -> IO a) ->
+      IO a
+  , defaultStorage :: (StorageName, Bool)
+    -- ^ Default storage, Bool => explicitly selected on CLI
+    -- (otherwise can be overriden by ServerConfig.config_db_create_storage)
   , dataStoreTag :: String
   }
 
+rocksdbName, lmdbName, memoryName :: StorageName
+rocksdbName = StorageName "rocksdb"
+lmdbName = StorageName "lmdb"
+memoryName = StorageName "memory"
+
 fileDataStore :: FilePath -> DataStore
 fileDataStore path = DataStore
-  { withDataStore = \scfg f -> do
+  { withStorage = \scfg f -> do
       rocksdb <- RocksDB.newStorage path scfg
-      f (Catalog.fileCatalog path) rocksdb
-  , dataStoreTag = "rocksdb:" <> path
+      lmdb <- LMDB.newStorage path scfg
+      f (
+        HashMap.fromList
+          [ (rocksdbName, Some rocksdb),
+            (lmdbName, Some lmdb)
+          ],
+        Some (Catalog.fileCatalog path)
+        )
+  , defaultStorage = (rocksdbName, False)
+  , dataStoreTag = "db:" <> path
   }
 
 tmpDataStore :: DataStore
 tmpDataStore = DataStore
-  { withDataStore = \scfg f -> withSystemTempDirectory "glean" $ \tmp -> do
+  { withStorage = \scfg f -> withSystemTempDirectory "glean" $ \tmp -> do
       logInfo $ "Storing temporary DBs in " <> tmp
-      rocksdb <- RocksDB.newStorage tmp scfg
-      f (Catalog.fileCatalog tmp) rocksdb
-  , dataStoreTag = "rocksdb:{TMP}"
+      withStorage (fileDataStore tmp) scfg f
+  , defaultStorage = (rocksdbName, False)
+  , dataStoreTag = dataStoreTag (fileDataStore "<tmp>")
   }
 
 memoryDataStore :: DataStore
 memoryDataStore = DataStore
-  { withDataStore = \_ f -> do
+  { withStorage = \_ f -> do
       cat <- Catalog.memoryCatalog
       mem <- Memory.newStorage
-      f cat mem
+      f (HashMap.fromList [(memoryName, Some mem)], Some cat)
+  , defaultStorage = (memoryName, False)
   , dataStoreTag = "memory"
   }
 
@@ -488,10 +513,15 @@
 options :: Parser Config
 options = do
   let
-    dbRoot = fileDataStore <$> strOption (
-      long "db-root" <>
-      metavar "DIR" <>
-      help "Directory containing databases")
+    dbRoot = do
+      path <- strOption (
+        long "db-root" <>
+        metavar "DIR" <>
+        help "Directory containing databases")
+      lmdb <- switch (long "lmdb")
+      pure $
+        (if lmdb then \s -> s { defaultStorage = (lmdbName, True) } else id) $
+        fileDataStore path
     dbTmp = tmpDataStore <$ flag' () (
       long "db-tmp" <>
       help "Store databases in a temporary directory (default)")
diff --git a/glean/db/Glean/Database/Create.hs b/glean/db/Glean/Database/Create.hs
--- a/glean/db/Glean/Database/Create.hs
+++ b/glean/db/Glean/Database/Create.hs
@@ -105,39 +105,42 @@
           , timestampRepoHash =
               posixEpochTimeToUTCTime <$> kickOff_repo_hash_time
           }
+      withDefaultStorage env $ \storageName storage -> do
+
       version <-
-        fromMaybe Storage.currentVersion . ServerConfig.config_db_create_version
+        fromMaybe (Storage.currentVersion storage) .
+          ServerConfig.config_db_create_version
         <$> Observed.get envServerConfig
-      when (not $ Storage.canOpenVersion Storage.ReadWrite version) $
+
+      when (not $ Storage.canOpenVersion storage Storage.ReadWrite version) $
         dbError kickOff_repo
           "can't create databases (unsupported binary version)"
       db <- atomically $ newDB kickOff_repo
       handle
         (\Catalog.EntryAlreadyExists{} ->
             return $ Thrift.KickOffResponse True) $
-        mask $ \unmask ->
+        mask $ \unmask -> do
         -- FIXME: There is a tiny race here where we might fail in a weird way
         -- if kick off a DB that is being deleted after it got removed from
         -- the Catalog but before it got removed from the storage. The entire
         -- concept of deleting DBs will change with the new metadata handling so
         -- it's not worth fixing at this point, especially since we aren't
         -- supposed to be kicking off DBs we've previously deleted.
+        let meta = newMeta storageName version time
+                     (Incomplete def) allProps
+                     (lightDeps kickOff_dependencies')
         bracket_
-          (Catalog.create
-            envCatalog
-            kickOff_repo
-            (newMeta version time (Incomplete def) allProps
-              (lightDeps kickOff_dependencies')) $ do
-                modifyTVar' envActive $ HashMap.insert kickOff_repo db
-                writeTVar (dbState db) Opening
-                acquireDB db)
+          (Catalog.create envCatalog kickOff_repo meta $ do
+             modifyTVar' envActive $ HashMap.insert kickOff_repo db
+             writeTVar (dbState db) Opening
+             acquireDB db)
           (atomically $ releaseDB envCatalog envActive db) $
-          do
+            withStorageFor env kickOff_repo meta $ \storage -> do
             -- Open the new db in Create mode which will create the
             -- physical storage. This might fail - in that case, we
             -- mark the db as failed. NB. pass the full dependencies
             -- here, not lightDeps.
-            opener <- asyncOpenDB env envStorage db version mode
+            opener <- asyncOpenDB env storage db version mode
                 kickOff_dependencies'
               (do
                 logInfo $ inRepo kickOff_repo "created")
@@ -201,7 +204,7 @@
         Complete{} -> return $
           HashMap.lookup "glean.guid" $ metaProperties meta
         c -> throwSTM $ InvalidDependency kickOff_repo base $
-          "database is " <> showCompleteness c
+          "database is " <> showCompletenessFull c
     start <- firstFreeId lookup
 
     index <- Observed.get envSchemaSource
diff --git a/glean/db/Glean/Database/Data.hs b/glean/db/Glean/Database/Data.hs
--- a/glean/db/Glean/Database/Data.hs
+++ b/glean/db/Glean/Database/Data.hs
@@ -22,7 +22,7 @@
 import Thrift.Protocol.Compact
 
 import Glean.Database.Exception
-import Glean.Database.Storage (Storage, Database)
+import Glean.Database.Storage (DatabaseOps)
 import qualified Glean.Database.Storage as Storage
 import Glean.RTS.Foreign.Ownership
 import Glean.Types (Repo)
@@ -39,10 +39,10 @@
 sLICES_KEY :: ByteString
 sLICES_KEY = "slices"
 
-storeSchema :: Storage s => Database s -> StoredSchema -> IO ()
+storeSchema :: DatabaseOps db => db -> StoredSchema -> IO ()
 storeSchema db = Storage.store db sCHEMA_KEY . serializeCompact
 
-retrieveSchema :: Storage s => Repo -> Database s -> IO (Maybe StoredSchema)
+retrieveSchema :: DatabaseOps db => Repo -> db -> IO (Maybe StoredSchema)
 retrieveSchema repo db = do
   value <- Storage.retrieve db sCHEMA_KEY
   case deserializeCompact <$> value of
@@ -50,10 +50,10 @@
     Just (Left msg) -> dbError repo $ "invalid schema: " ++ msg
     Nothing -> return Nothing
 
-storeUnits :: Storage s => Database s -> [ByteString] -> IO ()
+storeUnits :: DatabaseOps db => db -> [ByteString] -> IO ()
 storeUnits db = Storage.store db uNITS_KEY . toStrict . encode
 
-retrieveUnits :: Storage s => Repo -> Database s -> IO (Maybe [ByteString])
+retrieveUnits :: DatabaseOps db => Repo -> db -> IO (Maybe [ByteString])
 retrieveUnits repo db = do
   value <- Storage.retrieve db uNITS_KEY
   case decodeOrFail . fromStrict <$> value of
@@ -64,12 +64,12 @@
 -- Slices are each serialized using the RTS Slice::serialize(), and then
 -- the list of serialized slices :: [ByteString] is serialized with
 -- the Haskell Binary encoder.
-storeSlices :: Storage s => Database s -> [Slice] -> IO ()
+storeSlices :: DatabaseOps db => db -> [Slice] -> IO ()
 storeSlices db slices = do
   bytestrings <- mapM serializeSlice slices
   Storage.store db sLICES_KEY $ toStrict $ encode bytestrings
 
-retrieveSlices :: Storage s => Repo -> Database s -> IO (Maybe [Slice])
+retrieveSlices :: DatabaseOps db => Repo -> db -> IO (Maybe [Slice])
 retrieveSlices repo db = do
   value <- Storage.retrieve db sLICES_KEY
   case decodeOrFail . fromStrict <$> value of
diff --git a/glean/db/Glean/Database/Delete.hs b/glean/db/Glean/Database/Delete.hs
--- a/glean/db/Glean/Database/Delete.hs
+++ b/glean/db/Glean/Database/Delete.hs
@@ -63,10 +63,9 @@
 
 -- | Database deletion thread
 removeDatabase
-  :: Storage.Storage s
-  => Env
+  :: Env
   -> Repo
-  -> TMVar (Maybe (DB s))
+  -> TMVar (Maybe DB)
   -> IO ()
 removeDatabase env@Env{..} repo todo = uninterruptibleMask_ $
   -- This runs under uninterruptibleMask_ because there is really nothing
@@ -94,12 +93,14 @@
           Open odb -> closeOpenDB env odb
             `finally` atomically (writeTVar dbState Closed)
           _ -> return ()
-        Storage.delete envStorage repo
-        Catalog.delete envCatalog repo
-        Storage.safeRemoveForcibly envStorage repo
+        meta <- atomically $ Catalog.readMeta envCatalog repo
+        withStorageFor env repo meta $ \storage -> do
+          Storage.delete storage repo
+          Catalog.delete envCatalog repo
+          Storage.safeRemoveForcibly storage repo
         atomically $ modifyTVar envDerivations $
           HashMap.filterWithKey (\(repo',_) _ -> repo' /= repo)
-      logInfo $ inRepo repo "deleted"
+        logInfo $ inRepo repo "deleted"
 
 -- | Schedule a DB for deletion and return the 'Async' which can be used to
 -- obtain the result.
diff --git a/glean/db/Glean/Database/Env.hs b/glean/db/Glean/Database/Env.hs
--- a/glean/db/Glean/Database/Env.hs
+++ b/glean/db/Glean/Database/Env.hs
@@ -17,6 +17,7 @@
 import Control.Exception.Safe
 import Control.Monad.Extra
 import Data.Default
+import Data.HashMap.Strict (HashMap)
 import qualified Data.HashMap.Strict as HashMap
 import Data.List.Split
 import Data.Time
@@ -45,6 +46,7 @@
 import Glean.Util.Observed as Observed
 import Glean.Util.Periodic
 import Glean.Util.ShardManager (SomeShardManager)
+import Glean.Util.Some
 import Glean.Util.ThriftSource as ThriftSource
 import Util.Time
 import qualified Glean.Util.Warden as Warden
@@ -65,13 +67,14 @@
   logInfo $ "Using schema from " <> showSchemaLocation schemaLoc
   let (schema, updateSchema) = cfgSchemaHook cfg schemaLoc
   ThriftSource.withValue cfgapi schema $ \schema_source -> do
-  withDataStore (cfgDataStore cfg) server_cfg $ \catalog storage -> do
+  withStorage (cfgDataStore cfg) server_cfg $ \(storageMap, Some catalog) -> do
     envCatalog <- Catalog.open catalog
     cfgShardManager cfg envCatalog server_config $ \shardManager ->
       bracket
         (initEnv
           evb
-          storage
+          storageMap
+          (defaultStorage (cfgDataStore cfg))
           envCatalog
           shardManager
           cfg
@@ -84,9 +87,9 @@
             act env
 
 initEnv
-  :: Storage.Storage storage
-  => EventBaseDataplane
-  -> storage
+  :: EventBaseDataplane
+  -> HashMap StorageName (Some Storage.Storage)
+  -> (StorageName, Bool)
   -> Catalog.Catalog
   -> SomeShardManager
   -> Config
@@ -94,7 +97,7 @@
   -> Bool
   -> Observed ServerConfig.Config
   -> IO Env
-initEnv evb envStorage envCatalog shardManager cfg
+initEnv evb envStorage envDefaultStorage envCatalog shardManager cfg
   envSchemaSource updateSchema envServerConfig = do
     ServerConfig.Config{..} <- Observed.get envServerConfig
 
@@ -218,9 +221,10 @@
       atomically $ void $ tryPutTMVar envSchemaUpdateSignal ()
 
   -- Disk usage counters
-  Warden.spawn_ envWarden $ doPeriodically (seconds 600) $ do
-    diskSize <- Storage.getTotalCapacity envStorage
-    diskUsed <- Storage.getUsedCapacity envStorage
+  Warden.spawn_ envWarden $ doPeriodically (seconds 600) $
+    withDefaultStorage env $ \_ storage -> do
+    diskSize <- Storage.getTotalCapacity storage
+    diskUsed <- Storage.getUsedCapacity storage
 
     whenJust diskSize $ \size ->
         void $ setCounter "glean.db.disk.capacity_bytes" size
diff --git a/glean/db/Glean/Database/Finish.hs b/glean/db/Glean/Database/Finish.hs
--- a/glean/db/Glean/Database/Finish.hs
+++ b/glean/db/Glean/Database/Finish.hs
@@ -36,6 +36,9 @@
 finishDatabase :: Env -> Repo -> IO Thrift.FinishDatabaseResponse
 finishDatabase Env{..} repo  = do
   atomically $ do
+    -- Mark the database as finalizing.
+    -- This is read and processed in getTodo in Backup.hs, which then
+    -- calls doFinalize.
     void $ Catalog.modifyMeta envCatalog repo $ \oldmeta ->
       case completenessStatus oldmeta of
         DatabaseStatus_Incomplete ->
diff --git a/glean/db/Glean/Database/Logger.hs b/glean/db/Glean/Database/Logger.hs
--- a/glean/db/Glean/Database/Logger.hs
+++ b/glean/db/Glean/Database/Logger.hs
@@ -11,7 +11,11 @@
   logDBStatistics
 ) where
 
+import Data.Aeson (encode)
+import Data.HashMap.Strict (HashMap)
 import Data.Text (Text)
+import Data.Text.Lazy (toStrict)
+import Data.Text.Lazy.Encoding (decodeUtf8)
 
 import qualified Glean.Database.Types as Database
 import qualified Glean.Types as Thrift
@@ -29,6 +33,7 @@
   -> Int          -- ^ Number of bytes backed up
   -> Text         -- ^ Backup locator
   -> Bool         -- ^ The db has exclude property
+  -> HashMap Text Text -- ^ Database properties
   -> IO ()
 logDBStatistics
   env
@@ -37,18 +42,21 @@
   maybeOwnershipStats
   size
   locator
-  excluded = do
+  excluded
+  properties = do
   let preamble = mconcat
         [ Logger.SetRepoName repo_name
         , Logger.SetRepoHash repo_hash
         ]
 
   -- We shoehorn a summary row into the format for query rows
-  let summary  = mconcat
+  let propertiesJson = toStrict $ decodeUtf8 $ encode properties
+      summary  = mconcat
         [ Logger.SetPredicateSize size            -- # bytes uploaded
         , Logger.SetPredicateCount factCount      -- # total facts
         , Logger.SetUploadDestination locator
         , Logger.SetHasExcludeProperty excluded
+        , Logger.SetDatabaseProperties propertiesJson
         ]
       factCount = fromIntegral $ sum [predicateStats_count p| (_, p) <- preds]
 
diff --git a/glean/db/Glean/Database/Meta.hs b/glean/db/Glean/Database/Meta.hs
--- a/glean/db/Glean/Database/Meta.hs
+++ b/glean/db/Glean/Database/Meta.hs
@@ -12,6 +12,7 @@
   , DBTimestamp(..)
   , newMeta
   , showCompleteness
+  , showCompletenessFull
   , completenessStatus
   , dbAge
   , dbTime
@@ -46,13 +47,14 @@
 
 -- | Produce DB metadata
 newMeta
-  :: DBVersion -- ^ DB version
+  :: StorageName
+  -> DBVersion -- ^ DB version
   -> DBTimestamp -- ^ creation time and repo hash time
   -> Completeness -- ^ write status
   -> DatabaseProperties -- ^ user properties
   -> Maybe Dependencies -- ^ stacked
   -> Meta
-newMeta version timestamp completeness properties deps = Meta
+newMeta storage version timestamp completeness properties deps = Meta
   { metaVersion = version
   , metaCreated = utcTimeToPosixEpochTime $ timestampCreated timestamp
   , metaRepoHashTime = utcTimeToPosixEpochTime <$> timestampRepoHash timestamp
@@ -62,6 +64,7 @@
   , metaDependencies = deps
   , metaCompletePredicates = mempty
   , metaAxiomComplete = False
+  , metaStorage = storage
   }
 
 showCompleteness :: Completeness -> Text
@@ -69,6 +72,11 @@
 showCompleteness Complete{} = "complete"
 showCompleteness Broken{} = "broken"
 showCompleteness Finalizing{} = "finalizing"
+
+showCompletenessFull :: Completeness -> Text
+showCompletenessFull (Broken (DatabaseBroken task reason)) =
+    "broken at task \"" <> task <> "\": " <> reason
+showCompletenessFull x = showCompleteness x
 
 completenessStatus :: Meta -> DatabaseStatus
 completenessStatus meta = case metaCompleteness meta of
diff --git a/glean/db/Glean/Database/Open.hs b/glean/db/Glean/Database/Open.hs
--- a/glean/db/Glean/Database/Open.hs
+++ b/glean/db/Glean/Database/Open.hs
@@ -9,7 +9,6 @@
 module Glean.Database.Open (
   usingActiveDatabase,
   withOpenDatabase, withOpenDatabaseStack, withWritableDatabase,
-  withOpenDatabaseStorage,
   readDatabase, readDatabaseWithBoundaries,
   asyncOpenDB,
   newDB, acquireDB, releaseDB,
@@ -71,25 +70,18 @@
 import Glean.Util.Mutex
 import qualified Glean.Util.Observed as Observed
 import Util.Time
+import Glean.Util.Some
 import qualified Glean.Util.Warden as Warden
 import qualified Glean.Write.Stats as Stats
 
 withOpenDatabase
- :: HasCallStack
- => Env
- -> Repo
- -> (forall s . Storage s => OpenDB s -> IO a)
- -> IO a
-withOpenDatabase env repo act = withOpenDatabaseStorage env repo (const act)
-
-withOpenDatabaseStorage
   :: HasCallStack
   => Env
   -> Repo
-  -> (forall s . Storage s => s -> OpenDB s -> IO a)
+  -> (OpenDB -> IO a)
   -> IO a
-withOpenDatabaseStorage env@Env{..} repo action =
-  withActiveDatabase env repo $ \storage db@DB{..} -> do
+withOpenDatabase env@Env{..} repo action =
+  withActiveDatabase env repo $ \db@DB{..} -> do
     odb <- mask $ \restore -> do
       r <- atomically $ do
         state <- readTVar dbState
@@ -107,23 +99,23 @@
                     -- Note: Finalizing also needs to be ReadWrite,
                     -- because compaction modifies the DB.
                   where completeness = metaCompleteness meta
-            when (not $ canOpenVersion mode version) $ dbError dbRepo
-              $ "can't open database version " ++ show (unDBVersion version)
             writeTVar dbState Opening
             return $ Right (version, mode)
       case r of
         Left odb -> return odb
         Right (version, mode) -> do
-          deps <- atomically $ metaDependencies <$>
-            Catalog.readMeta envCatalog dbRepo
+          meta <- atomically $ Catalog.readMeta envCatalog dbRepo
           let
+            deps = metaDependencies meta
             onFailure ex = atomically $ Catalog.dbFailed envCatalog dbRepo ex
           -- opening a DB has long uninterruptible sections so do it on a
           -- separate thread in case we get cancelled
-          opener <-
-            asyncOpenDB env storage db version mode deps (return ()) onFailure
-          restore $ wait opener
-    action storage odb `finally` do
+          withStorageFor env repo meta $ \storage -> do
+            opener <-
+              asyncOpenDB env storage db version mode deps (return ())
+                onFailure
+            restore $ wait opener
+    action odb `finally` do
       t <- getTimePoint
       atomically $ writeTVar (odbIdleSince odb) t
 
@@ -131,7 +123,7 @@
 withOpenDatabaseStack
   :: Env
   -> Repo
-  -> (forall s . Storage s => OpenDB s -> IO a)
+  -> (OpenDB -> IO a)
   -> IO [a]
 withOpenDatabaseStack env repo action = do
   parents <- repoParents env repo
@@ -158,10 +150,9 @@
   Thrift.Dependencies_stacked Thrift.Stacked{..} -> Thrift.Repo stacked_name stacked_hash
 
 withOpenDBLookup
-  :: Storage s
-  => Env
+  :: Env
   -> Repo
-  -> OpenDB s
+  -> OpenDB
   -> (Boundaries -> Lookup -> IO a)
   -> IO a
 withOpenDBLookup env repo OpenDB{ odbBaseSlices = baseSlices, .. } f =
@@ -212,7 +203,7 @@
 readDatabase
   :: Env
   -> Repo
-  -> (forall s . Storage s => OpenDB s -> Lookup.Lookup -> IO a)
+  -> (OpenDB -> Lookup.Lookup -> IO a)
   -> IO a
 readDatabase env repo f =
   readDatabaseWithBoundaries env repo $ \odb _ lookup ->
@@ -221,26 +212,26 @@
 readDatabaseWithBoundaries
   :: Env
   -> Repo
-  -> (forall s. Storage s => OpenDB s -> Boundaries -> Lookup -> IO a)
+  -> (OpenDB -> Boundaries -> Lookup -> IO a)
   -> IO a
 readDatabaseWithBoundaries env repo f =
   withOpenDatabase env repo $ \odb ->
   withOpenDBLookup env repo odb $ \bounds lookup ->
     f odb bounds lookup
 
-newDB :: Repo -> STM (DB s)
+newDB :: Repo -> STM DB
 newDB repo = DB repo
   <$> newTVar Closed
   <*> newTVar 0
 
-acquireDB :: DB s -> STM ()
+acquireDB :: DB -> STM ()
 acquireDB db = modifyTVar' (dbUsers db) (+1)
 
 -- | MUST be paired with 'acquireDB'
 releaseDB
   :: Catalog.Catalog
-  -> TVar (HashMap Thrift.Repo (DB storage))
-  -> DB s
+  -> TVar (HashMap Thrift.Repo DB)
+  -> DB
   -> STM ()
 releaseDB catalog active DB{..} = do
   users <- readTVar dbUsers
@@ -259,7 +250,7 @@
   :: HasCallStack
   => Env
   -> Repo
-  -> (forall s . Storage s => s -> DB s -> IO a)
+  -> (DB -> IO a)
   -> IO a
 withActiveDatabase Env{..} repo act = bracket
   (atomically $ do
@@ -278,12 +269,12 @@
     acquireDB db
     return db)
   (atomically . releaseDB envCatalog envActive)
-  (\db -> act envStorage db)
+  (\db -> act db)
 
 usingActiveDatabase
   :: Env
   -> Repo
-  -> (forall s. Storage s => Maybe (DB s) -> IO a)
+  -> (Maybe DB -> IO a)
   -> IO a
 usingActiveDatabase Env{..} repo = bracket
   (atomically $ do
@@ -295,7 +286,7 @@
 withMaybeActiveDatabase
   :: Env
   -> Repo
-  -> (forall s . Storage s => Maybe (DB s) -> STM a)
+  -> (Maybe DB -> STM a)
   -> STM a
 withMaybeActiveDatabase Env{..} repo fn = do
   active <- readTVar envActive
@@ -306,7 +297,13 @@
   Stats.bump (envStats env) Stats.lookupCacheStats
   =<< LookupCache.readStatsAndResetCounters (envLookupCacheStats env)
 
-setupSchema :: Storage s => Env -> Repo -> Database s -> Mode -> IO DbSchema
+setupSchema
+  :: DatabaseOps db
+  => Env
+  -> Repo
+  -> db
+  -> Mode
+  -> IO DbSchema
 setupSchema Env{..} _ handle (Create _ _ initial) = do
   schema <- Observed.get envSchemaSource
   dbSchema <- case initial of
@@ -471,7 +468,7 @@
   :: Storage s
   => Env
   -> s
-  -> DB s
+  -> DB
   -> DBVersion
   -> Mode
   -> Maybe Thrift.Dependencies
@@ -480,15 +477,18 @@
       -- 'Open'. If this fails, we will call the failure action.
   -> (SomeException -> IO ())
       -- ^ Action to run on any failure.
-  -> IO (Async (OpenDB s))
+  -> IO (Async OpenDB)
 asyncOpenDB env@Env{..} storage db@DB{..} version mode deps
     on_success on_failure =
   -- Be paranoid about 'spawnMask' itself throwing.
   handling_failures $ Warden.spawnMask envWarden $ \restore ->
-  loggingAction (runLogRepo "open" env dbRepo) (const mempty) $
+  loggingAction (runLogRepo "open" env dbRepo) (const mempty) $ do
+  when (not $ canOpenVersion storage mode version) $
+    dbError dbRepo $
+      "can't open database version " ++ show (unDBVersion version)
   bracket_
     (atomically $ acquireDB db)
-    (atomically $ releaseDB envCatalog envActive db) $
+    (atomically $ releaseDB envCatalog envActive db) $ do
   handling_failures $ do
     logInfo $ inRepo dbRepo "opening"
     bracketOnError
@@ -524,7 +524,7 @@
             ownership <- newTVarIO =<< Storage.getOwnership handle
             on_success
             return OpenDB
-              { odbHandle = handle
+              { odbHandle = Some handle
               , odbWriting = writing
               , odbSchema = dbSchema
               , odbIdleSince = idle
diff --git a/glean/db/Glean/Database/Restore.hs b/glean/db/Glean/Database/Restore.hs
--- a/glean/db/Glean/Database/Restore.hs
+++ b/glean/db/Glean/Database/Restore.hs
@@ -13,6 +13,7 @@
 ) where
 
 import Control.Exception hiding(handle)
+import Data.Maybe
 import qualified Data.Set as Set
 import Data.Text (Text)
 
@@ -20,6 +21,7 @@
 
 import qualified Glean.Database.Backup.Backend as Backup
 import qualified Glean.Database.Backup.Locator as Backup
+import Glean.Database.Meta
 import qualified Glean.Database.Catalog as Catalog
 import Glean.Database.Types
 import qualified Glean.ServerConfig.Types as ServerConfig
@@ -66,7 +68,7 @@
 restoreDatabase env loc
   | Just (_, site, repo) <-
       Backup.fromRepoLocator (envBackupBackends env) loc =
-        atomically =<< restoreDatabaseFromSite env site repo
+        atomically =<< restoreDatabaseFromSite env site repo loc
   | otherwise = throwIO $
       Thrift.InvalidLocator $ "invalid locator '" <> loc <>  "'"
 
@@ -75,7 +77,15 @@
   => Env
   -> site
   -> Repo
+  -> Text
   -> IO (STM ())
-restoreDatabaseFromSite Env{..} site repo = do
+restoreDatabaseFromSite Env{..} site repo loc = do
   props <- Backup.inspect site repo
-  return $ Catalog.startRestoring envCatalog repo props
+  -- doRestore expects to find the location in metaBackup, but
+  -- Backup.inspect is not required to populate this so we fill it
+  -- in if it's missing.
+  let props'
+        | isNothing (metaBackup props) =
+            props { metaBackup = Just loc }
+        | otherwise = props
+  return $ Catalog.startRestoring envCatalog repo props'
diff --git a/glean/db/Glean/Database/Storage.hs b/glean/db/Glean/Database/Storage.hs
--- a/glean/db/Glean/Database/Storage.hs
+++ b/glean/db/Glean/Database/Storage.hs
@@ -10,12 +10,13 @@
   ( Mode(..)
   , CreateSchema(..)
   , Storage(..)
+  , Database
+  , DatabaseOps(..)
   , DBVersion(..)
   , AxiomOwnership
   , WriteLock(..)
   , canOpenVersion
   , currentVersion
-  , writableVersions
   ) where
 
 import Data.ByteString (ByteString)
@@ -26,32 +27,26 @@
 import Glean.Internal.Types (StoredSchema)
 import Glean.RTS.Foreign.FactSet (FactSet)
 import Glean.RTS.Foreign.Inventory (Inventory)
-import Glean.RTS.Foreign.Lookup (CanLookup, Lookup)
-import Glean.RTS.Foreign.Ownership
+import Glean.RTS.Foreign.Lookup (CanLookup(..), Lookup)
+import Glean.RTS.Foreign.Ownership hiding (computeDerivedOwnership)
 import Glean.RTS.Types (Fid, Pid)
 import Glean.ServerConfig.Types (DBVersion(..))
+import qualified Glean.ServerConfig.Types as ServerConfig
 import Glean.Types (PredicateStats, Repo, SchemaId)
-
--- | List of binary representation versions we can read
-readableVersions :: [DBVersion]
-readableVersions = [DBVersion 3]
-
--- | List of binary representation versions we can write
-writableVersions :: [DBVersion]
-writableVersions = [DBVersion 3]
+import Glean.Util.Some
 
 -- | Check whether we can open a particular database version
-canOpenVersion :: Mode -> DBVersion -> Bool
-canOpenVersion mode version = version `elem` versions
+canOpenVersion :: Storage s => s -> Mode -> DBVersion -> Bool
+canOpenVersion s mode version = version `elem` versions
   where
     versions = case mode of
-      ReadOnly -> readableVersions
-      ReadWrite -> writableVersions
-      Create{} -> writableVersions
+      ReadOnly -> readableVersions s
+      ReadWrite -> writableVersions s
+      Create{} -> writableVersions s
 
 -- | Default current binary representation version
-currentVersion :: DBVersion
-currentVersion = maximum writableVersions
+currentVersion :: Storage s => s -> DBVersion
+currentVersion = maximum . writableVersions
 
 -- Choose which schema goes into a newly created DB
 data CreateSchema
@@ -76,20 +71,22 @@
 -- | Token representing the write lock
 data WriteLock w = WriteLock w
 
--- | An abstract storage for fact database
-class CanLookup (Database s) => Storage s where
-  -- | A fact database
-  data Database s
+data family Database s
 
+-- | An abstract storage for fact database
+class DatabaseOps (Database s) => Storage s where
   -- | A short, user-readable description of the storage
   describe :: s -> String
 
+  -- | List of binary representation versions we can read
+  readableVersions :: s -> [DBVersion]
+
+  -- | List of binary representation versions we can write
+  writableVersions :: s -> [DBVersion]
+
   -- | Open a database
   open :: s -> Repo -> Mode -> DBVersion -> IO (Database s)
 
-  -- | Close a database
-  close :: Database s -> IO ()
-
   -- | Delete a database if it exists
   delete :: s -> Repo -> IO ()
 
@@ -98,8 +95,41 @@
   -- directory where the database would be stored.
   safeRemoveForcibly :: s -> Repo -> IO ()
 
+  -- | Determine the total capacity of the storage medium (e.g., disk size).
+  getTotalCapacity :: s -> IO (Maybe Int)
+
+  -- | Determine the used capacity of the storage medium (e.g., how much of the
+  -- disk is in use).
+  getUsedCapacity :: s -> IO (Maybe Int)
+
+  -- | Determine the free capacity of the storage medium (e.g., how much of the
+  -- disk is free).
+  getFreeCapacity :: s -> IO Int
+
+  -- | Execute the action, passing to it a path to a scratch directory which can
+  -- be used, e.g., for downloading databases. This directory is not guaranteed
+  -- to persist beyond the call and is not guaranteed to be empty.
+  withScratchRoot :: s -> (FilePath -> IO a) -> IO a
+
+  -- | Restore a database. The scratch directory which can be used for
+  -- storing intermediate files is guaranteed to be empty and will be
+  -- deleted after the operation completes. The implementation may
+  -- delete the serialized database file after it has been consumed,
+  -- to reduce the number of copies of the DB on disk during a restore.
+  restore
+    :: s   -- ^ storage
+    -> ServerConfig.Config  -- ^ server config
+    -> Repo  -- ^ repo
+    -> FilePath  -- ^ scratch directory
+    -> FilePath  -- ^ file containing the serialiased database (produced by 'backup')
+    -> IO ()
+
+class CanLookup db => DatabaseOps db where
+  -- | Close a database
+  close :: db -> IO ()
+
   -- | Obtain the 'PredicateStats' for each predicate
-  predicateStats :: Database s -> IO [(Pid, PredicateStats)]
+  predicateStats :: db -> IO [(Pid, PredicateStats)]
 
   -- | Store an arbitrary binary key/value pair in the database. This data is
   -- completely separate from the facts.
@@ -107,30 +137,30 @@
   -- NOTE: It is expected that 'store' and 'retrieve' are used sparingly and
   -- there are no performance guarantees. A typical use case for this is
   -- storing the serialised schema in the database.
-  store :: Database s -> ByteString -> ByteString -> IO ()
+  store :: db -> ByteString -> ByteString -> IO ()
 
   -- | Retrieve the value of a key previously stored with 'store'.
-  retrieve :: Database s -> ByteString -> IO (Maybe ByteString)
+  retrieve :: db -> ByteString -> IO (Maybe ByteString)
 
   -- | Commit a set of facts to the database. The facts must have the right ids,
   -- they are NOT renamed.
-  commit :: Database s -> FactSet -> IO ()
+  commit :: db -> FactSet -> IO ()
 
   -- | Add ownership data about a set of (committed) facts.
-  addOwnership :: Database s -> WriteLock w -> AxiomOwnership -> IO ()
+  addOwnership :: db -> WriteLock w -> AxiomOwnership -> IO ()
 
   -- | Optimise a database for reading. This is typically done before backup.
-  optimize :: Database s -> Bool {- compact -} -> IO ()
+  optimize :: db -> Bool {- compact -} -> IO ()
 
   computeOwnership
-    :: Database s
+    :: db
     -> Maybe Lookup
        -- ^ Base DB lookup if this is a stacked DB, because ownership may
        -- need to propagate ownership through facts in the base DB.
     -> Inventory
     -> IO ComputedOwnership
 
-  storeOwnership :: Database s -> WriteLock w -> ComputedOwnership -> IO ()
+  storeOwnership :: db -> WriteLock w -> ComputedOwnership -> IO ()
 
   -- | Fetch the 'Ownership' interface for this DB. This is used to
   -- make a 'Slice' (a view of a subset of the facts in the DB).
@@ -138,17 +168,17 @@
   -- Can return 'Nothing' if this database backend doesn't support
   -- ownership. (TODO: support ownership in the memory backend and
   -- remove this 'Maybe').
-  getOwnership :: Database s -> IO (Maybe Ownership)
+  getOwnership :: db -> IO (Maybe Ownership)
 
-  getUnitId :: Database s -> ByteString -> IO (Maybe UnitId)
-  getUnit :: Database s -> UnitId -> IO (Maybe ByteString)
+  getUnitId :: db -> ByteString -> IO (Maybe UnitId)
+  getUnit :: db -> UnitId -> IO (Maybe ByteString)
 
   -- | Called once per batch.
-  addDefineOwnership :: Database s -> WriteLock w -> DefineOwnership -> IO ()
+  addDefineOwnership :: db -> WriteLock w -> DefineOwnership -> IO ()
 
   -- | Called once per derived predicate at the end of its derivation.
   computeDerivedOwnership
-    :: Database s
+    :: db
     -> WriteLock w
     -> Ownership
     -> Maybe Lookup
@@ -162,44 +192,40 @@
   -- faster getOwner() operations. Takes time to cache the data and
   -- memory to retain the cache. Only useful if this DB will be used
   -- in an incremental stack.
-  cacheOwnership :: Database s -> IO ()
-
-  prepareFactOwnerCache :: Database s -> IO ()
-
-  -- | Determine the total capacity of the storage medium (e.g., disk size).
-  getTotalCapacity :: s -> IO (Maybe Int)
-
-  -- | Determine the used capacity of the storage medium (e.g., how much of the
-  -- disk is in use).
-  getUsedCapacity :: s -> IO (Maybe Int)
-
-  -- | Determine the free capacity of the storage medium (e.g., how much of the
-  -- disk is free).
-  getFreeCapacity :: s -> IO Int
+  cacheOwnership :: db -> IO ()
 
-  -- | Execute the action, passing to it a path to a scratch directory which can
-  -- be used, e.g., for downloading databases. This directory is not guaranteed
-  -- to persist beyond the call and is not guaranteed to be empty.
-  withScratchRoot :: s -> (FilePath -> IO a) -> IO a
+  prepareFactOwnerCache :: db -> IO ()
 
   -- | Backup a database. The scratch directory which can be used for storing
   -- intermediate files is guaranteed to be empty and will be deleted after
   -- the operation completes.
   backup
-    :: Database s  -- ^ database
+    :: db  -- ^ database
+    -> ServerConfig.Config  -- ^ server config
     -> FilePath  -- ^ scratch directory
     -> (FilePath -> Data -> IO a)
           -- ^ function which expects the serialised database
     -> IO a
 
-  -- | Restore a database. The scratch directory which can be used for
-  -- storing intermediate files is guaranteed to be empty and will be
-  -- deleted after the operation completes. The implementation may
-  -- delete the serialized database file after it has been consumed,
-  -- to reduce the number of copies of the DB on disk during a restore.
-  restore
-    :: s   -- ^ storage
-    -> Repo  -- ^ repo
-    -> FilePath  -- ^ scratch directory
-    -> FilePath  -- ^ file containing the serialiased database (produced by 'backup')
-    -> IO ()
+instance CanLookup (Some DatabaseOps) where
+  withLookup (Some db) = withLookup db
+  lookupName (Some db) = lookupName db
+
+instance DatabaseOps (Some DatabaseOps) where
+  close (Some db) = close db
+  predicateStats (Some db) = predicateStats db
+  store (Some db) = store db
+  retrieve (Some db) = retrieve db
+  commit (Some db) = commit db
+  addOwnership (Some db) = addOwnership db
+  optimize (Some db) = optimize db
+  computeOwnership (Some db) = computeOwnership db
+  storeOwnership (Some db) = storeOwnership db
+  getOwnership (Some db) = getOwnership db
+  getUnitId (Some db) = getUnitId db
+  getUnit (Some db) = getUnit db
+  addDefineOwnership (Some db) = addDefineOwnership db
+  computeDerivedOwnership (Some db) = computeDerivedOwnership db
+  cacheOwnership (Some db) = cacheOwnership db
+  prepareFactOwnerCache (Some db) = prepareFactOwnerCache db
+  backup (Some db) = backup db
diff --git a/glean/db/Glean/Database/Storage/DB.hs b/glean/db/Glean/Database/Storage/DB.hs
new file mode 100644
--- /dev/null
+++ b/glean/db/Glean/Database/Storage/DB.hs
@@ -0,0 +1,280 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+-- | Generic DB operations shared by the RocksDB and LMDB backends
+module Glean.Database.Storage.DB (
+    DB(..), Container(..), withContainer
+  ) where
+
+import Control.Monad
+import qualified Data.HashMap.Strict as HashMap
+import Data.Int
+import Data.List (unzip4)
+import qualified Data.Vector.Storable as VS
+import Data.Word
+import Foreign.C.String
+import Foreign.C.Types
+import Foreign.ForeignPtr
+import Foreign.Marshal.Array
+import Foreign.Ptr
+import Foreign.Storable
+import System.Directory
+import System.FilePath
+
+import Util.FFI
+
+import Glean.Database.Backup.Backend (Data(Data))
+import Glean.Database.Storage
+import Glean.FFI
+import Glean.Repo.Text
+import Glean.RTS.Foreign.FactSet (FactSet)
+import Glean.RTS.Foreign.Lookup
+  (CanLookup(..), Lookup(..))
+import Glean.RTS.Foreign.Ownership as Ownership
+import Glean.RTS.Foreign.Stats (marshalPredicateStats)
+import Glean.RTS.Types (Fid(..), Pid(..))
+import Glean.Types (Repo)
+
+data DB = DB
+  { dbPtr :: ForeignPtr DB
+  , dbRepo :: Repo
+  }
+
+instance CanLookup DB where
+  lookupName db = "rocksdb:" <> repoToText (dbRepo db)
+  withLookup db f = unsafeWithForeignPtr (dbPtr db) $
+    f . glean_rocksdb_database_lookup
+
+instance DatabaseOps DB where
+  close db = withContainer db glean_rocksdb_container_close
+
+  predicateStats db = unsafeWithForeignPtr (dbPtr db)
+    $ marshalPredicateStats . glean_rocksdb_database_predicateStats
+
+  store db key value =
+    withContainer db $ \s_ptr ->
+    unsafeWithBytes key $ \key_ptr key_size ->
+    unsafeWithBytes value $ \value_ptr value_size ->
+    invoke $ glean_rocksdb_container_write_data
+      s_ptr
+      key_ptr
+      key_size
+      value_ptr
+      value_size
+
+  retrieve db key =
+    withContainer db $ \s_ptr ->
+    unsafeWithBytes key $ \key_ptr key_size -> do
+      (value_ptr, value_size, found)
+        <- invoke $ glean_rocksdb_container_read_data s_ptr key_ptr key_size
+      if found /= 0
+        then Just <$> unsafeMallocedByteString value_ptr value_size
+        else return Nothing
+
+  commit db facts = unsafeWithForeignPtr (dbPtr db) $ \db_ptr -> do
+    with facts $ \facts_ptr -> invoke $ glean_rocksdb_commit db_ptr facts_ptr
+
+  addOwnership db _ owned =
+    unsafeWithForeignPtr (dbPtr db) $ \db_ptr ->
+    when (not $ HashMap.null owned) $
+      withMany entry (HashMap.toList owned) $ \xs ->
+      let (unit_ptrs, unit_sizes, facts_ptrs, facts_sizes) = unzip4 xs
+      in
+      withArray unit_ptrs $ \p_unit_ptrs ->
+      withArray unit_sizes $ \p_unit_sizes ->
+      withArray facts_ptrs $ \p_facts_ptrs ->
+      withArray facts_sizes $ \p_facts_sizes ->
+      invoke $ glean_rocksdb_add_ownership
+        db_ptr
+        (fromIntegral $ HashMap.size owned)
+        p_unit_ptrs
+        p_unit_sizes
+        p_facts_ptrs
+        p_facts_sizes
+    where
+      entry (unit, facts) f =
+        unsafeWithBytes unit $ \unit_ptr unit_size ->
+        VS.unsafeWith facts $ \facts_ptr ->
+        f (unit_ptr, unit_size, facts_ptr, fromIntegral $ VS.length facts)
+
+  optimize db compact = withContainer db $ \s_ptr ->
+    invoke $ glean_rocksdb_container_optimize s_ptr
+      (fromIntegral (fromEnum compact))
+
+  computeOwnership db base inv =
+    unsafeWithForeignPtr (dbPtr db) $ \db_ptr ->
+    using (invoke $ glean_rocksdb_get_ownership_unit_iterator db_ptr) $
+    Ownership.compute inv db base
+
+  storeOwnership db _ own =
+    unsafeWithForeignPtr (dbPtr db) $ \db_ptr ->
+    with own $ \own_ptr ->
+    invoke $ glean_rocksdb_store_ownership db_ptr own_ptr
+
+  getOwnership db = fmap Just $
+    unsafeWithForeignPtr (dbPtr db) $ \db_ptr ->
+    construct $ invoke $ glean_rocksdb_get_ownership db_ptr
+
+  getUnitId db unit =
+    unsafeWithForeignPtr (dbPtr db) $ \db_ptr ->
+    unsafeWithBytes unit $ \unit_ptr unit_size -> do
+      w64 <- invoke $ glean_rocksdb_get_unit_id db_ptr unit_ptr unit_size
+      if w64 > 0xffffffff
+        then return Nothing
+        else return (Just (UnitId (fromIntegral w64)))
+
+  getUnit db unit =
+    unsafeWithForeignPtr (dbPtr db) $ \db_ptr -> do
+      (unit_ptr, unit_size) <- invoke $ glean_rocksdb_get_unit db_ptr unit
+      if unit_size /= 0
+        then Just <$> unsafeMallocedByteString unit_ptr unit_size
+        else return Nothing
+
+  addDefineOwnership db _ define =
+    unsafeWithForeignPtr (dbPtr db) $ \db_ptr ->
+    with define $ \define_ptr ->
+      invoke $ glean_rocksdb_add_define_ownership db_ptr define_ptr
+
+  computeDerivedOwnership db _ ownership base (Pid pid) =
+    unsafeWithForeignPtr (dbPtr db) $ \db_ptr ->
+    using
+      (invoke $
+        glean_rocksdb_get_derived_fact_ownership_iterator
+          db_ptr
+          (fromIntegral pid)) $
+      Ownership.computeDerivedOwnership ownership base
+
+  cacheOwnership db =
+    unsafeWithForeignPtr (dbPtr db) $ \db_ptr ->
+      invoke $ glean_rocksdb_cache_ownership db_ptr
+
+  prepareFactOwnerCache db =
+    unsafeWithForeignPtr (dbPtr db) $ \db_ptr ->
+      invoke $ glean_rocksdb_prepare_fact_owner_cache db_ptr
+
+  backup db _ scratch process = do
+    let path = scratch </> "backup"
+    createDirectoryIfMissing True path
+    withContainer db $ \s_ptr ->
+      withCString path $ invoke . glean_rocksdb_container_backup s_ptr
+    process path (Data 0)
+
+newtype Container = Container (Ptr Container)
+  deriving(Storable)
+
+instance Static Container where
+  destroyStatic = glean_rocksdb_container_free
+
+withContainer :: DB -> (Container -> IO a) -> IO a
+withContainer db f = unsafeWithForeignPtr (dbPtr db) $
+  f . glean_rocksdb_database_container
+
+foreign import ccall safe glean_rocksdb_container_free
+  :: Container -> IO ()
+
+foreign import ccall safe glean_rocksdb_container_close
+  :: Container -> IO ()
+
+foreign import ccall safe glean_rocksdb_container_backup
+  :: Container -> CString -> IO CString
+
+foreign import ccall unsafe glean_rocksdb_container_write_data
+  :: Container
+  -> Ptr ()
+  -> CSize
+  -> Ptr ()
+  -> CSize
+  -> IO CString
+
+foreign import ccall unsafe glean_rocksdb_container_read_data
+  :: Container
+  -> Ptr ()
+  -> CSize
+  -> Ptr (Ptr ())
+  -> Ptr CSize
+  -> Ptr CChar
+  -> IO CString
+
+foreign import ccall safe glean_rocksdb_container_optimize
+  :: Container -> CBool -> IO CString
+
+foreign import ccall unsafe glean_rocksdb_database_container
+  :: Ptr DB -> Container
+
+foreign import ccall unsafe glean_rocksdb_database_lookup
+  :: Ptr DB -> Ptr Lookup
+
+foreign import ccall safe glean_rocksdb_commit
+  :: Ptr DB
+  -> Ptr FactSet
+  -> IO CString
+
+foreign import ccall safe glean_rocksdb_add_ownership
+  :: Ptr DB
+  -> CSize
+  -> Ptr (Ptr ())
+  -> Ptr CSize
+  -> Ptr (Ptr Fid)
+  -> Ptr CSize
+  -> IO CString
+
+foreign import ccall safe glean_rocksdb_get_ownership_unit_iterator
+  :: Ptr DB
+  -> Ptr Ownership.UnitIterator
+  -> IO CString
+
+foreign import ccall unsafe glean_rocksdb_database_predicateStats
+  :: Ptr DB
+  -> Ptr CSize
+  -> Ptr (Ptr Int64)
+  -> Ptr (Ptr Word64)
+  -> Ptr (Ptr Word64)
+  -> IO CString
+
+foreign import ccall unsafe glean_rocksdb_get_unit_id
+  :: Ptr DB
+  -> Ptr ()
+  -> CSize
+  -> Ptr Word64
+  -> IO CString
+
+foreign import ccall unsafe glean_rocksdb_get_unit
+  :: Ptr DB
+  -> UnitId
+  -> Ptr (Ptr ())
+  -> Ptr CSize
+  -> IO CString
+
+foreign import ccall safe glean_rocksdb_store_ownership
+  :: Ptr DB
+  -> Ptr ComputedOwnership
+  -> IO CString
+
+foreign import ccall unsafe glean_rocksdb_get_ownership
+  :: Ptr DB
+  -> Ptr (Ptr Ownership)
+  -> IO CString
+
+foreign import ccall safe glean_rocksdb_add_define_ownership
+  :: Ptr DB
+  -> Ptr DefineOwnership
+  -> IO CString
+
+foreign import ccall unsafe glean_rocksdb_get_derived_fact_ownership_iterator
+  :: Ptr DB
+  -> Word64
+  -> Ptr Ownership.DerivedFactOwnershipIterator
+  -> IO CString
+
+foreign import ccall unsafe glean_rocksdb_cache_ownership
+  :: Ptr DB
+  -> IO CString
+
+foreign import ccall safe glean_rocksdb_prepare_fact_owner_cache
+  :: Ptr DB
+  -> IO CString
diff --git a/glean/db/Glean/Database/Storage/LMDB.hs b/glean/db/Glean/Database/Storage/LMDB.hs
new file mode 100644
--- /dev/null
+++ b/glean/db/Glean/Database/Storage/LMDB.hs
@@ -0,0 +1,201 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module Glean.Database.Storage.LMDB
+  ( LMDB(..)
+  , newStorage
+  ) where
+
+import Control.Exception
+import Control.Monad
+import Data.Int
+import qualified Data.Text as Text
+import Foreign.C.String
+import Foreign.C.Types
+import Foreign.ForeignPtr
+import Foreign.Ptr
+import System.Directory
+import System.IO.Temp (withTempDirectory)
+import System.FilePath
+import System.Process
+
+import Util.FFI
+import Util.IO (safeRemovePathForcibly)
+
+import Glean.Database.Backup.Backend (Data(Data))
+import Glean.Database.Repo (databasePath)
+import Glean.Database.Storage
+import Glean.Database.Storage.DB
+import Glean.FFI
+import Glean.RTS.Foreign.Lookup (CanLookup(..))
+import Glean.RTS.Foreign.Ownership as Ownership
+  hiding (computeDerivedOwnership)
+import Glean.RTS.Types (Fid(..), invalidFid)
+import qualified Glean.ServerConfig.Types as ServerConfig
+import Glean.Types (Repo)
+import Glean.Util.Disk
+import Glean.Impl.MemoryReader
+
+data LMDB = LMDB
+  { lmdbRoot :: FilePath
+  , lmdbMaxDiskSize :: Maybe Int
+    -- ^ virtual limit to report capped disk capacities. The limit is
+    -- not enforced. It's up to each io usage to check diskspace before writing.
+    -- We're using this to avoid serving too many dbs on query servers,
+    -- and smarter sharding.
+  }
+
+newStorage :: FilePath -> ServerConfig.Config -> IO LMDB
+newStorage root ServerConfig.Config{..} = do
+  mem_capacity <- totalMemCapacityKB
+  return LMDB
+    { lmdbRoot = root
+    , lmdbMaxDiskSize = case mem_capacity of
+        Just mem -> (* (mem * 1024)) . fromIntegral <$>
+          config_db_rocksdb_disk_mem_capacity_ratio_limit
+        Nothing -> Nothing
+    }
+
+data instance Database LMDB = Database DB LMDB
+
+instance CanLookup (Database LMDB) where
+  withLookup (Database db _) = withLookup db
+  lookupName (Database db _) = lookupName db
+
+instance Storage LMDB where
+  describe db = "lmdb:" <> lmdbRoot db
+
+  -- we started at 3 because that's what RocksDB was on
+  readableVersions _ = [DBVersion 3]
+  writableVersions _ = [DBVersion 3]
+
+  open lmdb repo mode (DBVersion version) = do
+    (cmode, start, ownership) <- case mode of
+      ReadOnly -> do
+        exists <- doesDirectoryExist (path </> "data.mdb")
+        when (not exists) $ do
+          haveSquash <- doesFileExist squash
+          when haveSquash $ do
+            createDirectoryIfMissing True path
+            callProcess "squashfuse_ll" [squash, path]
+        return (0, invalidFid, Nothing)
+      ReadWrite -> return (1, invalidFid, Nothing)
+      Create start ownership _ -> do
+        createDirectoryIfMissing True path
+        return (2, start, ownership)
+    withCString path $ \cpath ->
+      using (invoke $ glean_lmdb_container_open cpath cmode)
+        $ \container -> do
+      fp <- mask_ $ do
+        first_unit_id <- maybe (return firstUsetId) nextUsetId ownership
+        p <- invoke $
+          glean_lmdb_container_open_database container start
+            first_unit_id version
+        newForeignPtr glean_rocksdb_database_free p
+      return (Database (DB (castForeignPtr fp) repo) lmdb)
+    where
+      path = containerPath lmdb repo
+      squash = path <.> "squashfs"
+
+  delete lmdb = safeRemovePathForcibly . containerPath lmdb
+
+  safeRemoveForcibly lmdb =
+      safeRemovePathForcibly . databasePath (lmdbRoot lmdb)
+
+  getTotalCapacity lmdb = do
+    exists <- doesDirectoryExist (lmdbRoot lmdb)
+    if exists
+      then do
+        fullDiskCapacity <- getDiskSize (lmdbRoot lmdb)
+        return $ Just $ case lmdbMaxDiskSize lmdb of
+          Just maxDiskSize -> min maxDiskSize fullDiskCapacity
+          Nothing -> fullDiskCapacity
+      else return Nothing
+
+  getUsedCapacity lmdb = do
+    exists <- doesDirectoryExist (lmdbRoot lmdb)
+    if exists
+      then Just <$> getUsedDiskSpace (lmdbRoot lmdb)
+      else return Nothing
+
+  getFreeCapacity lmdb = do
+    used <- getUsedCapacity lmdb
+    total <- getTotalCapacity lmdb
+    case (used,total) of
+      (Just used, Just total) -> return $ total - used
+      _ -> getFreeDiskSpace (lmdbRoot lmdb) -- not aware of disk limit
+
+  withScratchRoot rocks f = f $ lmdbRoot rocks </> ".scratch"
+
+  restore lmdb cfg repo scratch scratch_file = do
+    withTempDirectory scratch "restore" $ \scratch_restore -> do
+      let target = containerPath lmdb repo
+      createDirectoryIfMissing True $ takeDirectory target
+      if ServerConfig.config_db_lmdb_restore_unpack cfg
+        then do
+          let db = scratch_restore </> "db"
+          createDirectoryIfMissing True db
+          callProcess "unsquashfs" ["-d", db, scratch_file ]
+            -- to avoid retaining an extra copy of the DB during restore,
+            -- delete the input file now.
+          renameDirectory db target
+        else
+          renameFile scratch_file (target <.> "squashfs")
+
+containerPath :: LMDB -> Repo -> FilePath
+containerPath LMDB{..} repo = databasePath lmdbRoot repo </> "db"
+
+instance DatabaseOps (Database LMDB) where
+  close (Database db@(DB _ repo) lmdb) = do
+    close db
+    let path = containerPath lmdb repo; squash = path <.> "squashfs"
+    haveSquash <- doesFileExist squash
+    when haveSquash $ callProcess "umount" [path]
+      `catch` \(_ :: IOException) -> return ()
+
+  predicateStats (Database db _) = predicateStats db
+  store (Database db _) = store db
+  retrieve (Database db _) = retrieve db
+  commit (Database db _) = commit db
+  addOwnership (Database db _) = addOwnership db
+  optimize (Database db _) = optimize db
+  computeOwnership (Database db _) = computeOwnership db
+  storeOwnership (Database db _) = storeOwnership db
+  getOwnership (Database db _) = getOwnership db
+  getUnitId (Database db _) = getUnitId db
+  getUnit (Database db _) = getUnit db
+  addDefineOwnership (Database db _) = addDefineOwnership db
+  computeDerivedOwnership (Database db _) = computeDerivedOwnership db
+  cacheOwnership (Database db _) = cacheOwnership db
+  prepareFactOwnerCache (Database db _) = prepareFactOwnerCache db
+
+  backup (Database db _) cfg scratch process =
+    backup db cfg scratch $ \path _ -> do
+      withTempDirectory scratch "out" $ \tmpdir -> do
+        let out = tmpdir </> "db.squashfs"
+        callProcess "mksquashfs" $ [ path, out ] <>
+          map Text.unpack (ServerConfig.config_db_lmdb_mksquashfs_args cfg)
+        size <- getFileSize out
+        process out (Data $ fromIntegral size)
+
+
+foreign import ccall safe glean_lmdb_container_open
+  :: CString
+  -> CInt
+  -> Ptr Container
+  -> IO CString
+
+foreign import ccall safe glean_lmdb_container_open_database
+  :: Container
+  -> Fid
+  -> UsetId
+  -> Int64
+  -> Ptr (Ptr (Database LMDB))
+  -> IO CString
+foreign import ccall safe "&glean_rocksdb_database_free"
+  glean_rocksdb_database_free :: Destroy (Database LMDB)
diff --git a/glean/db/Glean/Database/Storage/Memory.hs b/glean/db/Glean/Database/Storage/Memory.hs
--- a/glean/db/Glean/Database/Storage/Memory.hs
+++ b/glean/db/Glean/Database/Storage/Memory.hs
@@ -36,16 +36,20 @@
 newStorage :: IO Memory
 newStorage = Memory <$> newTVarIO HashMap.empty
 
+data instance Database Memory = Database
+  { dbRepo :: Repo
+  , dbFacts :: FactSet
+  , dbData :: TVar (HashMap ByteString ByteString)
+  }
+
 -- | An abstract storage for fact database
 instance Storage Memory where
-  data Database Memory = Database
-    { dbRepo :: Repo
-    , dbFacts :: FactSet
-    , dbData :: TVar (HashMap ByteString ByteString)
-    }
 
   describe = const "memory:"
 
+  readableVersions _ = [DBVersion 0]
+  writableVersions _ = [DBVersion 0]
+
   open (Memory v) repo (Create start _unit _) _ = do
     facts <- FactSet.new start
     atomically $ do
@@ -62,13 +66,32 @@
       Just db -> return db
       Nothing -> dbError repo "database doesn't exist"
 
-  -- TODO
-  close _ = return ()
-
   delete (Memory v) = atomically . modifyTVar' v . HashMap.delete
 
   safeRemoveForcibly = delete
 
+  -- TODO
+  getTotalCapacity _ = return Nothing
+
+  -- TODO
+  getUsedCapacity _ = return Nothing
+
+  -- TODO
+  getFreeCapacity _ = return maxBound
+
+  withScratchRoot _ f = withSystemTempDirectory "glean" f
+
+  -- TODO
+  restore _ _ repo _ _ = dbError repo "unimplemented 'restore'"
+
+instance CanLookup (Database Memory) where
+  lookupName Database{..} = "memory:" <> repoToText dbRepo
+  withLookup = withLookup . dbFacts
+
+instance DatabaseOps (Database Memory) where
+  -- TODO
+  close _ = return ()
+
   predicateStats = FactSet.predicateStats . dbFacts
 
   store db key value =
@@ -97,21 +120,4 @@
   prepareFactOwnerCache _ = return ()
 
   -- TODO
-  getTotalCapacity _ = return Nothing
-
-  -- TODO
-  getUsedCapacity _ = return Nothing
-
-  -- TODO
-  getFreeCapacity _ = return maxBound
-
-  withScratchRoot _ f = withSystemTempDirectory "glean" f
-
-  -- TODO
-  backup db _ _ = dbError (dbRepo db) "unimplemented 'backup'"
-  -- TODO
-  restore _ repo _ _ = dbError repo "unimplemented 'restore'"
-
-instance CanLookup (Database Memory) where
-  lookupName Database{..} = "memory:" <> repoToText dbRepo
-  withLookup = withLookup . dbFacts
+  backup db _ _ _ = dbError (dbRepo db) "unimplemented 'backup'"
diff --git a/glean/db/Glean/Database/Storage/RocksDB.hs b/glean/db/Glean/Database/Storage/RocksDB.hs
--- a/glean/db/Glean/Database/Storage/RocksDB.hs
+++ b/glean/db/Glean/Database/Storage/RocksDB.hs
@@ -9,21 +9,16 @@
 module Glean.Database.Storage.RocksDB
   ( RocksDB(..)
   , newStorage
+  , getCacheCapacity
   ) where
 
 import Control.Exception
 import Control.Monad
-import qualified Data.HashMap.Strict as HashMap
 import Data.Int
-import Data.List (unzip4)
-import qualified Data.Vector.Storable as VS
-import Data.Word
 import Foreign.C.String
 import Foreign.C.Types
 import Foreign.ForeignPtr
-import Foreign.Marshal.Array
 import Foreign.Ptr
-import Foreign.Storable
 import System.Directory
 import System.IO.Temp (withTempDirectory)
 import System.FilePath
@@ -36,17 +31,16 @@
 import Glean.Database.Backup.Backend (Data(Data))
 import Glean.Database.Repo (databasePath)
 import Glean.Database.Storage
+import Glean.Database.Storage.DB
 import Glean.FFI
-import Glean.Repo.Text
-import Glean.RTS.Foreign.FactSet (FactSet)
-import Glean.RTS.Foreign.Lookup
-  (CanLookup(..), Lookup(..))
+import Glean.RTS.Foreign.Lookup (CanLookup(..))
 import Glean.RTS.Foreign.Ownership as Ownership
-import Glean.RTS.Foreign.Stats (marshalPredicateStats)
-import Glean.RTS.Types (Fid(..), invalidFid, Pid(..))
+  hiding (computeDerivedOwnership)
+import Glean.RTS.Types (Fid(..), invalidFid)
 import qualified Glean.ServerConfig.Types as ServerConfig
 import Glean.Types (Repo)
 import Glean.Util.Disk
+import Glean.Impl.MemoryReader
 import System.IO.Extra (withTempFile)
 
 newtype Cache = Cache (ForeignPtr Cache)
@@ -68,35 +62,54 @@
   { rocksRoot :: FilePath
   , rocksCache :: Maybe Cache
   , rocksCacheIndexAndFilterBlocks :: Bool
+  , rocksMaxDiskSize :: Maybe Int
+    -- ^ virtual limit (bytes) to report capped disk capacities. The limit is
+    -- not enforced. It's up to each io usage to check diskspace before writing.
+    -- We're using this to avoid serving too many dbs on query servers,
+    -- and smarter sharding.
   }
 
+-- | Compute the size of the cache in bytes
+-- There's two configs that control the size:
+-- 1. db_rocksdb_cache_to_mem_ratio is used if provided
+--    sets the rocksdb cache to a fraction of the total memory.
+--    This is useful if the same server binary runs with the same server_config,
+--    but with varying RAM capacity
+-- 2. db_rocksdb_cache_mb is used if the above is not provided,
+--    or if the memory capacity cannot be read
+cacheSize :: ServerConfig.Config -> Maybe Int ->  Int
+cacheSize ServerConfig.Config{..} memCapacityKB =
+  case (memCapacityKB, config_db_rocksdb_cache_to_mem_ratio) of
+    (Just ramKB, Just ratio) -> round $ fromIntegral ramKB * ratio * 1024
+    _ -> fromIntegral config_db_rocksdb_cache_mb * 1024 * 1024
+
 newStorage :: FilePath -> ServerConfig.Config -> IO RocksDB
-newStorage root ServerConfig.Config{..} = do
-  cache <- if config_db_rocksdb_cache_mb > 0
-    then
-      Just <$> newCache (fromIntegral config_db_rocksdb_cache_mb * 1024 * 1024)
+newStorage root config@ServerConfig.Config{..} = do
+  mem_capacity <- totalMemCapacityKB
+  let cache_size = cacheSize config mem_capacity
+  cache <- if cache_size > 0
+    then Just <$> newCache cache_size
     else return Nothing
   return RocksDB
     { rocksRoot = root
     , rocksCache = cache
     , rocksCacheIndexAndFilterBlocks =
         config_db_rocksdb_cache_index_and_filter_blocks
+    , rocksMaxDiskSize = case mem_capacity of
+        Just mem -> (* (mem * 1024)) . fromIntegral <$>
+          config_db_rocksdb_disk_mem_capacity_ratio_limit
+        Nothing -> Nothing
     }
 
-newtype Container = Container (Ptr Container)
-  deriving(Storable)
-
-instance Static Container where
-  destroyStatic = glean_rocksdb_container_free
+newtype instance Database RocksDB = Database DB
+  deriving (CanLookup)
 
 instance Storage RocksDB where
-  data Database RocksDB = Database
-    { dbPtr :: ForeignPtr (Database RocksDB)
-    , dbRepo :: Repo
-    }
-
   describe rocks = "rocksdb:" <> rocksRoot rocks
 
+  readableVersions _ = [DBVersion 3]
+  writableVersions _ = [DBVersion 3]
+
   open rocks repo mode (DBVersion version) = do
     (cmode, start, ownership) <- case mode of
       ReadOnly -> return (0, invalidFid, Nothing)
@@ -118,125 +131,23 @@
           glean_rocksdb_container_open_database container start
             first_unit_id version
         newForeignPtr glean_rocksdb_database_free p
-      return (Database fp repo)
+      return (Database (DB (castForeignPtr fp) repo))
     where
       path = containerPath rocks repo
 
-  close db = withContainer db glean_rocksdb_container_close
-
   delete rocks = safeRemovePathForcibly . containerPath rocks
 
   safeRemoveForcibly rocks =
       safeRemovePathForcibly . databasePath (rocksRoot rocks)
 
-  predicateStats db = unsafeWithForeignPtr (dbPtr db)
-    $ marshalPredicateStats . glean_rocksdb_database_predicateStats
-
-  store db key value =
-    withContainer db $ \s_ptr ->
-    unsafeWithBytes key $ \key_ptr key_size ->
-    unsafeWithBytes value $ \value_ptr value_size ->
-    invoke $ glean_rocksdb_container_write_data
-      s_ptr
-      key_ptr
-      key_size
-      value_ptr
-      value_size
-
-  retrieve db key =
-    withContainer db $ \s_ptr ->
-    unsafeWithBytes key $ \key_ptr key_size -> do
-      (value_ptr, value_size, found)
-        <- invoke $ glean_rocksdb_container_read_data s_ptr key_ptr key_size
-      if found /= 0
-        then Just <$> unsafeMallocedByteString value_ptr value_size
-        else return Nothing
-
-  commit db facts = unsafeWithForeignPtr (dbPtr db) $ \db_ptr -> do
-    with facts $ \facts_ptr -> invoke $ glean_rocksdb_commit db_ptr facts_ptr
-
-  addOwnership db _ owned =
-    unsafeWithForeignPtr (dbPtr db) $ \db_ptr ->
-    when (not $ HashMap.null owned) $
-      withMany entry (HashMap.toList owned) $ \xs ->
-      let (unit_ptrs, unit_sizes, facts_ptrs, facts_sizes) = unzip4 xs
-      in
-      withArray unit_ptrs $ \p_unit_ptrs ->
-      withArray unit_sizes $ \p_unit_sizes ->
-      withArray facts_ptrs $ \p_facts_ptrs ->
-      withArray facts_sizes $ \p_facts_sizes ->
-      invoke $ glean_rocksdb_add_ownership
-        db_ptr
-        (fromIntegral $ HashMap.size owned)
-        p_unit_ptrs
-        p_unit_sizes
-        p_facts_ptrs
-        p_facts_sizes
-    where
-      entry (unit, facts) f =
-        unsafeWithBytes unit $ \unit_ptr unit_size ->
-        VS.unsafeWith facts $ \facts_ptr ->
-        f (unit_ptr, unit_size, facts_ptr, fromIntegral $ VS.length facts)
-
-  optimize db compact = withContainer db $ \s_ptr ->
-    invoke $ glean_rocksdb_container_optimize s_ptr
-      (fromIntegral (fromEnum compact))
-
-  computeOwnership db base inv =
-    unsafeWithForeignPtr (dbPtr db) $ \db_ptr ->
-    using (invoke $ glean_rocksdb_get_ownership_unit_iterator db_ptr) $
-    Ownership.compute inv db base
-
-  storeOwnership db _ own =
-    unsafeWithForeignPtr (dbPtr db) $ \db_ptr ->
-    with own $ \own_ptr ->
-    invoke $ glean_rocksdb_store_ownership db_ptr own_ptr
-
-  getOwnership db = fmap Just $
-    unsafeWithForeignPtr (dbPtr db) $ \db_ptr ->
-    construct $ invoke $ glean_rocksdb_get_ownership db_ptr
-
-  getUnitId db unit =
-    unsafeWithForeignPtr (dbPtr db) $ \db_ptr ->
-    unsafeWithBytes unit $ \unit_ptr unit_size -> do
-      w64 <- invoke $ glean_rocksdb_get_unit_id db_ptr unit_ptr unit_size
-      if w64 > 0xffffffff
-        then return Nothing
-        else return (Just (UnitId (fromIntegral w64)))
-
-  getUnit db unit =
-    unsafeWithForeignPtr (dbPtr db) $ \db_ptr -> do
-      (unit_ptr, unit_size) <- invoke $ glean_rocksdb_get_unit db_ptr unit
-      if unit_size /= 0
-        then Just <$> unsafeMallocedByteString unit_ptr unit_size
-        else return Nothing
-
-  addDefineOwnership db _ define =
-    unsafeWithForeignPtr (dbPtr db) $ \db_ptr ->
-    with define $ \define_ptr ->
-      invoke $ glean_rocksdb_add_define_ownership db_ptr define_ptr
-
-  computeDerivedOwnership db _ ownership base (Pid pid) =
-    unsafeWithForeignPtr (dbPtr db) $ \db_ptr ->
-    using
-      (invoke $
-        glean_rocksdb_get_derived_fact_ownership_iterator
-          db_ptr
-          (fromIntegral pid)) $
-      Ownership.computeDerivedOwnership ownership base
-
-  cacheOwnership db =
-    unsafeWithForeignPtr (dbPtr db) $ \db_ptr ->
-      invoke $ glean_rocksdb_cache_ownership db_ptr
-
-  prepareFactOwnerCache db =
-    unsafeWithForeignPtr (dbPtr db) $ \db_ptr ->
-      invoke $ glean_rocksdb_prepare_fact_owner_cache db_ptr
-
   getTotalCapacity rocksdb = do
     exists <- doesDirectoryExist (rocksRoot rocksdb)
     if exists
-      then Just <$> getDiskSize (rocksRoot rocksdb)
+      then do
+        fullDiskCapacity <- getDiskSize (rocksRoot rocksdb)
+        return $ Just $ case rocksMaxDiskSize rocksdb of
+          Just maxDiskSize -> min maxDiskSize fullDiskCapacity
+          Nothing -> fullDiskCapacity
       else return Nothing
 
   getUsedCapacity rocksdb = do
@@ -245,22 +156,16 @@
       then Just <$> getUsedDiskSpace (rocksRoot rocksdb)
       else return Nothing
 
-  getFreeCapacity = getFreeDiskSpace . rocksRoot
+  getFreeCapacity rocksdb = do
+    used <- getUsedCapacity rocksdb
+    total <- getTotalCapacity rocksdb
+    case (used,total) of
+      (Just used, Just total) -> return $ total - used
+      _ -> getFreeDiskSpace (rocksRoot rocksdb) -- not aware of disk limit
 
   withScratchRoot rocks f = f $ rocksRoot rocks </> ".scratch"
 
-  backup db scratch process = do
-    createDirectoryIfMissing True path
-    withContainer db $ \s_ptr ->
-      withCString path $ invoke . glean_rocksdb_container_backup s_ptr
-    withTempFile $ \tarFile -> do
-      tar ["-cf", tarFile, "-C", scratch, "backup"]
-      size <- getFileSize tarFile
-      process tarFile (Data $ fromIntegral size)
-    where
-      path = scratch </> "backup"
-
-  restore rocks repo scratch scratch_file =
+  restore rocks _ repo scratch scratch_file =
     withTempDirectory scratch "restore" $ \scratch_restore -> do
       unTar scratch_file scratch_restore
       -- to avoid retaining an extra copy of the DB during restore,
@@ -291,7 +196,33 @@
       createDirectoryIfMissing True $ takeDirectory target
       renameDirectory db target
 
+instance DatabaseOps (Database RocksDB) where
+  close (Database db) = close db
+  predicateStats (Database db) = predicateStats db
+  store (Database db) = store db
+  retrieve (Database db) = retrieve db
+  commit (Database db) = commit db
+  addOwnership (Database db) = addOwnership db
+  optimize (Database db) = optimize db
+  computeOwnership (Database db) = computeOwnership db
+  storeOwnership (Database db) = storeOwnership db
+  getOwnership (Database db) = getOwnership db
+  getUnitId (Database db) = getUnitId db
+  getUnit (Database db) = getUnit db
+  addDefineOwnership (Database db) = addDefineOwnership db
+  computeDerivedOwnership (Database db) = computeDerivedOwnership db
+  cacheOwnership (Database db) = cacheOwnership db
+  prepareFactOwnerCache (Database db) = prepareFactOwnerCache db
 
+  backup (Database db) cfg scratch process = do
+    backup db cfg scratch $ \path _ -> do
+      let (base, dir) = splitFileName path
+      withTempFile $ \tarFile -> do
+        tar ["-cf", tarFile, "-C", base, dir]
+        size <- getFileSize tarFile
+        process tarFile (Data $ fromIntegral size)
+
+
 unTar :: FilePath -> FilePath -> IO ()
 unTar scratch_file scratch_restore =
   tar ["-xf", scratch_file, "-C", scratch_restore]
@@ -308,21 +239,19 @@
 containerPath :: RocksDB -> Repo -> FilePath
 containerPath RocksDB{..} repo = databasePath rocksRoot repo </> "db"
 
-instance CanLookup (Database RocksDB) where
-  lookupName db = "rocksdb:" <> repoToText (dbRepo db)
-  withLookup db f = unsafeWithForeignPtr (dbPtr db) $
-    f . glean_rocksdb_database_lookup
-
-withContainer :: Database RocksDB -> (Container -> IO a) -> IO a
-withContainer db f = unsafeWithForeignPtr (dbPtr db) $
-  f . glean_rocksdb_database_container
-
 foreign import ccall unsafe glean_rocksdb_new_cache
   :: CSize -> Ptr (Ptr Cache) -> IO CString
 foreign import ccall unsafe "&glean_rocksdb_free_cache"
   glean_rocksdb_free_cache :: Destroy Cache
+foreign import ccall unsafe glean_rocksdb_cache_capacity
+  :: Ptr Cache -> IO CSize
 
+getCacheCapacity :: RocksDB -> IO Int
+getCacheCapacity rocks = do
+  withCache (rocksCache rocks) $
+    fmap fromIntegral . glean_rocksdb_cache_capacity
 
+
 foreign import ccall safe glean_rocksdb_container_open
   :: CString
   -> CInt
@@ -330,35 +259,7 @@
   -> Ptr Cache
   -> Ptr Container
   -> IO CString
-foreign import ccall safe glean_rocksdb_container_free
-  :: Container -> IO ()
 
-foreign import ccall safe glean_rocksdb_container_close
-  :: Container -> IO ()
-
-foreign import ccall unsafe glean_rocksdb_container_write_data
-  :: Container
-  -> Ptr ()
-  -> CSize
-  -> Ptr ()
-  -> CSize
-  -> IO CString
-
-foreign import ccall unsafe glean_rocksdb_container_read_data
-  :: Container
-  -> Ptr ()
-  -> CSize
-  -> Ptr (Ptr ())
-  -> Ptr CSize
-  -> Ptr CChar
-  -> IO CString
-
-foreign import ccall safe glean_rocksdb_container_optimize
-  :: Container -> CBool -> IO CString
-
-foreign import ccall safe glean_rocksdb_container_backup
-  :: Container -> CString -> IO CString
-
 foreign import ccall safe glean_rocksdb_container_open_database
   :: Container
   -> Fid
@@ -369,83 +270,7 @@
 foreign import ccall safe "&glean_rocksdb_database_free"
   glean_rocksdb_database_free :: Destroy (Database RocksDB)
 
-foreign import ccall unsafe glean_rocksdb_database_container
-  :: Ptr (Database RocksDB) -> Container
-
-foreign import ccall unsafe glean_rocksdb_database_lookup
-  :: Ptr (Database RocksDB) -> Ptr Lookup
-
-foreign import ccall safe glean_rocksdb_commit
-  :: Ptr (Database RocksDB)
-  -> Ptr FactSet
-  -> IO CString
-
-foreign import ccall safe glean_rocksdb_add_ownership
-  :: Ptr (Database RocksDB)
-  -> CSize
-  -> Ptr (Ptr ())
-  -> Ptr CSize
-  -> Ptr (Ptr Fid)
-  -> Ptr CSize
-  -> IO CString
-
-foreign import ccall safe glean_rocksdb_get_ownership_unit_iterator
-  :: Ptr (Database RocksDB)
-  -> Ptr Ownership.UnitIterator
-  -> IO CString
-
-foreign import ccall unsafe glean_rocksdb_database_predicateStats
-  :: Ptr (Database RocksDB)
-  -> Ptr CSize
-  -> Ptr (Ptr Int64)
-  -> Ptr (Ptr Word64)
-  -> Ptr (Ptr Word64)
-  -> IO CString
-
 foreign import ccall safe glean_rocksdb_restore
   :: CString
   -> CString
-  -> IO CString
-
-foreign import ccall unsafe glean_rocksdb_get_unit_id
-  :: Ptr (Database RocksDB)
-  -> Ptr ()
-  -> CSize
-  -> Ptr Word64
-  -> IO CString
-
-foreign import ccall unsafe glean_rocksdb_get_unit
-  :: Ptr (Database RocksDB)
-  -> UnitId
-  -> Ptr (Ptr ())
-  -> Ptr CSize
-  -> IO CString
-
-foreign import ccall safe glean_rocksdb_store_ownership
-  :: Ptr (Database RocksDB)
-  -> Ptr ComputedOwnership
-  -> IO CString
-
-foreign import ccall unsafe glean_rocksdb_get_ownership
-  :: Ptr (Database RocksDB)
-  -> Ptr (Ptr Ownership)
-  -> IO CString
-
-foreign import ccall safe glean_rocksdb_add_define_ownership
-  :: Ptr (Database RocksDB)
-  -> Ptr DefineOwnership
-  -> IO CString
-
-foreign import ccall unsafe glean_rocksdb_get_derived_fact_ownership_iterator
-  :: Ptr (Database RocksDB)
-  -> Word64
-  -> Ptr Ownership.DerivedFactOwnershipIterator
-  -> IO CString
-
-foreign import ccall unsafe glean_rocksdb_cache_ownership
-  :: Ptr (Database RocksDB)
-  -> IO CString
-
-foreign import ccall safe glean_rocksdb_prepare_fact_owner_cache
-  :: Ptr (Database RocksDB)
   -> IO CString
diff --git a/glean/db/Glean/Database/Types.hs b/glean/db/Glean/Database/Types.hs
--- a/glean/db/Glean/Database/Types.hs
+++ b/glean/db/Glean/Database/Types.hs
@@ -15,6 +15,9 @@
   EnableRecursion(..),
   JanitorRunResult(..), JanitorException(..),
   DebugFlags(..),
+
+  withStorageFor,
+  withDefaultStorage,
 ) where
 
 import Control.DeepSeq
@@ -24,9 +27,12 @@
 import Control.Trace (Tracer)
 import Data.ByteString (ByteString)
 import Data.HashMap.Strict (HashMap)
+import qualified Data.HashMap.Strict as HashMap
 import Data.HashSet (HashSet)
 import Data.IORef (IORef)
+import Data.Maybe
 import Data.Text (Text)
+import qualified Data.Text as Text
 import Data.Typeable (Typeable)
 import Data.Time
 import System.Clock
@@ -40,10 +46,12 @@
 import qualified Glean.Database.BatchLocation as BatchLocation
 import Glean.Database.Catalog (Catalog)
 import Glean.Database.Config
+import Glean.Database.Exception
 import Glean.Database.Meta
 import Glean.Database.Schema.Types
-import Glean.Database.Storage (Database, Storage, describe, WriteLock(..))
+import Glean.Database.Storage (Storage, DatabaseOps, WriteLock(..))
 import Glean.Database.Trace
+import Glean.Internal.Types (StorageName(..))
 import Glean.Logger.Server (GleanServerLogger)
 import Glean.Logger.Database (GleanDatabaseLogger)
 import Glean.RTS.Foreign.FactSet (FactSet)
@@ -56,7 +64,7 @@
 import qualified Glean.Types as Thrift
 import Glean.Util.Metric (Point)
 import Glean.Util.Mutex
-import Glean.Util.Observed
+import Glean.Util.Observed as Observed
 import Glean.Util.ShardManager
 import Glean.Util.Some
 import Util.Time
@@ -86,9 +94,9 @@
   }
 
 -- An open database
-data OpenDB s = OpenDB
+data OpenDB = OpenDB
   { -- The database handle
-    odbHandle :: Database s
+    odbHandle :: Some DatabaseOps
 
     -- Write queue, caches etc. Nothing means DB is read only.
   , odbWriting :: Maybe Writing
@@ -108,12 +116,12 @@
   }
 
 -- State of a databases
-data DBState s
+data DBState
     -- In the process of being open
   = Opening
 
     -- Currently open
-  | Open (OpenDB s)
+  | Open OpenDB
 
     -- In the process of being closed
   | Closing
@@ -122,12 +130,12 @@
   | Closed
 
 -- A known database
-data DB s = DB
+data DB = DB
   { -- The repo the database refers to
     dbRepo :: Thrift.Repo
 
     -- Database state
-  , dbState :: TVar (DBState s)
+  , dbState :: TVar DBState
 
     -- Number of users
   , dbUsers :: TVar Int
@@ -152,6 +160,11 @@
     , writeContentIO :: IO WriteContent
     , writeDone :: MVar (Either SomeException Subst)
     , writeStart :: Point
+    , writeFailureIrrecoverable :: Bool
+      -- ^ If False, clients are supposed to check the write
+      -- and handle the result.
+      -- If True, the write is fully handled by server.
+      -- In case of an error, the db will be marked as 'broken'
     }
   | WriteCheckpoint
     { writeCheckpoint :: IO ()
@@ -218,14 +231,15 @@
 
 instance Exception JanitorException
 
-data Env = forall storage. Storage storage => Env
+data Env = Env
   { envEventBase :: EventBaseDataplane
   , envServerLogger :: Some GleanServerLogger
   , envDatabaseLogger :: Some GleanDatabaseLogger
   , envBatchLocationParser :: Some BatchLocation.Parser
   , envLoggerRateLimit :: RateLimiterMap Text
   , envCatalog :: Catalog
-  , envStorage :: storage
+  , envStorage :: HashMap StorageName (Some Storage)
+  , envDefaultStorage :: (StorageName, Bool)
   , envSchemaSource :: Observed SchemaIndex
     -- ^ The schema source, and its parsed/resolved form are both cached here.
   , envDbSchemaCache :: MVar DbSchemaCache
@@ -235,7 +249,7 @@
     -- ^ Used to store the schema ID for the session when using the local backend
   , envServerConfig :: Observed ServerConfig.Config
   , envBackupBackends :: Backup.Backends
-  , envActive :: TVar (HashMap Thrift.Repo (DB storage))
+  , envActive :: TVar (HashMap Thrift.Repo DB)
   , envDeleting :: TVar (HashMap Thrift.Repo (Async ()))
   , envCompleting :: TVar (HashMap Thrift.Repo (Async ()))
   , envCompletingDerived ::
@@ -267,6 +281,35 @@
   , envDebug :: DebugFlags
   }
 
-instance Show Env where
-  show Env{..} = unwords [ "Glean.Database.Types.Env {",
-    "envStorage: " <> describe envStorage, "}" ]
+withStorageFor
+  :: Env
+  -> Thrift.Repo
+  -> Meta
+  -> (forall s. Storage s => s -> IO a) -> IO a
+withStorageFor env repo meta f = do
+  let name
+        | Text.null (unStorageName n) = rocksdbName -- backwards compat
+        | otherwise = n
+        where n = metaStorage meta
+  case HashMap.lookup name (envStorage env) of
+    Nothing -> dbError repo $
+      "unknown storage: " <> Text.unpack (unStorageName name)
+    Just (Some storage) -> f storage
+
+withDefaultStorage
+  :: Env
+  -> (forall s. Storage s => StorageName -> s -> IO a)
+  -> IO a
+withDefaultStorage env fn = do
+  name <- case envDefaultStorage env of
+    (name, cli)
+      | cli -> return name
+      | otherwise -> do
+        cfg <- Observed.get (envServerConfig env)
+        return $ fromMaybe name $ fmap StorageName $
+          ServerConfig.config_db_create_storage cfg
+  case HashMap.lookup name (envStorage env) of
+    Nothing -> throwIO $ Thrift.Exception $
+      "unknown storage: " <> unStorageName name
+    Just (Some storage) -> fn name storage
+
diff --git a/glean/db/Glean/Database/Write/Batch.hs b/glean/db/Glean/Database/Write/Batch.hs
--- a/glean/db/Glean/Database/Write/Batch.hs
+++ b/glean/db/Glean/Database/Write/Batch.hs
@@ -91,7 +91,7 @@
       Ownership.addDerivedOwners lookup define (Pid pid) ownerMap
     return define
 
-checkWritable :: Repo -> OpenDB s -> IO Writing
+checkWritable :: Repo -> OpenDB -> IO Writing
 checkWritable repo OpenDB{..} =
   case odbWriting of
     Nothing -> dbError repo "can't write to a read only database"
@@ -144,10 +144,9 @@
           deDupBatch env repo odb lookup writing size writeBatch writeOwnership
 
 reallyWriteBatch
-  :: Storage.Storage s
-  => Env
+  :: Env
   -> Repo
-  -> OpenDB s
+  -> OpenDB
   -> Storage.WriteLock w
   -> Lookup
   -> Writing
@@ -239,10 +238,9 @@
         -- commit takes place outside the write lock
 
 deDupBatch
-  :: Storage.Storage s
-  => Env
+  :: Env
   -> Repo
-  -> OpenDB s
+  -> OpenDB
   -> Lookup
   -> Writing
   -> Word64
diff --git a/glean/db/Glean/Database/Writes.hs b/glean/db/Glean/Database/Writes.hs
--- a/glean/db/Glean/Database/Writes.hs
+++ b/glean/db/Glean/Database/Writes.hs
@@ -54,7 +54,7 @@
 import qualified Data.HashMap.Strict as HashMap
 import qualified Data.Map as Map
 import qualified Data.Monoid as Monoid
-import Data.Text as Text (Text)
+import Data.Text as Text (Text, pack)
 import qualified Data.Text.Encoding as Text
 import qualified Data.UUID as UUID
 import qualified Data.UUID.V4 as UUID
@@ -72,12 +72,14 @@
 import Util.STM
 
 import Glean.Database.BatchLocation as BatchLocation
+import qualified Glean.Database.Catalog as Catalog
 import Glean.Database.Exception
 import Glean.Database.Open
 import Glean.Database.Schema.Types
 import Glean.Database.Trace
 import Glean.Database.Write.Batch
 import Glean.Database.Types
+import Glean.Internal.Types as Thrift
 import qualified Glean.RTS.Foreign.Subst as Subst
 import Glean.RTS.Foreign.Ownership (DefineOwnership)
 import qualified Glean.ServerConfig.Types as ServerConfig
@@ -127,6 +129,14 @@
       addStatValueType "glean.db.write.failed" (writeSize `div` k) Sum
     else
       addStatValueType "glean.db.write.succeeded" (writeSize `div` k) Sum
+    case result of
+      Left exc | writeFailureIrrecoverable ->
+        void $ atomically $ Catalog.modifyMeta (envCatalog env) repo $ \meta ->
+          return meta {
+            Thrift.metaCompleteness = Thrift.Broken
+              (Thrift.DatabaseBroken "write" (Text.pack (show exc)))
+          }
+      _ -> return ()
     immediately $ do
       now $ writeTVar writeQueueLatency latency
       now $ modifyTVar' writeQueueActive (subtract 1)
@@ -220,9 +230,11 @@
   -> Int
   -> Maybe SchemaId
   -> Bool
+  -> Bool
   -> IO WriteContent
   -> IO (MVar (Either SomeException Subst.Subst))
-enqueueWrite env@Env{..} repo size optSchemaId checkQueueSize writeContent = do
+enqueueWrite env@Env{..} repo size optSchemaId checkQueueSize remember
+    writeContent = do
   start <- beginTick 1
   config <- Observed.get envServerConfig
   mvar <- newEmptyMVar
@@ -251,7 +263,8 @@
               { writeSize = size
               , writeContentIO = writeContent
               , writeDone = mvar
-              , writeStart = start }
+              , writeStart = start
+              , writeFailureIrrecoverable = not remember }
         queueCount <- now $ updateTVar writeQueueCount (+1)
         queueSize <- now $ updateTVar writeQueueSize (+ size)
         later $ do
@@ -315,7 +328,8 @@
 
   let size = batchSize computedBatch_batch
       optSchemaId = batch_schema_id computedBatch_batch
-  r <- try $ enqueueWrite env computedBatch_repo size optSchemaId True $ pure $
+  r <- try $ enqueueWrite env computedBatch_repo size optSchemaId
+      True computedBatch_remember $ pure $
         (writeContentFromBatch computedBatch_batch) {
           writeOwnership= ownership
         }
@@ -360,13 +374,14 @@
       maybe 0 ByteString.length jsonFactBatch_unit
     size = sum (map jsonFactBatchSize (sendJsonBatch_batches batch))
   traceMsg (envTracer env) (GleanTraceEnqueue repo EnqueueJsonBatch size) $ do
-  handle <- UUID.toText <$> UUID.nextRandom
-  let optSchemaId =
-        sendJsonBatch_options batch >>= sendJsonBatchOptions_schema_id
-  write <- enqueueWrite env repo size optSchemaId True $
-    writeJsonBatch env repo batch
-  when (sendJsonBatch_remember batch) $ rememberWrite env handle write
-  return $ def { sendJsonBatchResponse_handle = handle }
+    handle <- UUID.toText <$> UUID.nextRandom
+    let optSchemaId =
+          sendJsonBatch_options batch >>= sendJsonBatchOptions_schema_id
+        remember = sendJsonBatch_remember batch
+    write <- enqueueWrite env repo size optSchemaId True remember $
+      writeJsonBatch env repo batch
+    when remember $ rememberWrite env handle write
+    return $ def { sendJsonBatchResponse_handle = handle }
 
 enqueueBatchDescriptor
   :: Env
@@ -377,15 +392,15 @@
 enqueueBatchDescriptor env repo enqueueBatch waitPolicy = do
   traceMsg (envTracer env)
     (GleanTraceEnqueue repo EnqueueBatchDescriptor 0) $ do
-  handle <- UUID.toText <$> UUID.nextRandom
-  descriptor <- case enqueueBatch of
-    Thrift.EnqueueBatch_descriptor descriptor -> return descriptor
-    Thrift.EnqueueBatch_EMPTY -> throwIO $ Thrift.Exception "empty batch"
-  write <- enqueueWrite env repo 0 Nothing False $
-    writeContentFromBatch <$> downloadBatchFromLocation env descriptor
-  when (waitPolicy == Thrift.EnqueueBatchWaitPolicy_Remember)
-    $ rememberWrite env handle write
-  return $ def { enqueueBatchResponse_handle = handle }
+    handle <- UUID.toText <$> UUID.nextRandom
+    descriptor <- case enqueueBatch of
+      Thrift.EnqueueBatch_descriptor descriptor -> return descriptor
+      Thrift.EnqueueBatch_EMPTY -> throwIO $ Thrift.Exception "empty batch"
+    let remember = waitPolicy == Thrift.EnqueueBatchWaitPolicy_Remember
+    write <- enqueueWrite env repo 0 Nothing False remember $
+      writeContentFromBatch <$> downloadBatchFromLocation env descriptor
+    when remember $ rememberWrite env handle write
+    return $ def { enqueueBatchResponse_handle = handle }
 
 pollBatch :: Env -> Handle -> IO FinishResponse
 pollBatch env@Env{..} handle = do
@@ -448,7 +463,7 @@
   now <- getTimePoint
   atomically $ modifyTVar' writes $ HashMap.filter $ \x -> writeTimeout x > now
 
-deleteWriteQueues :: Env -> OpenDB s -> STM ()
+deleteWriteQueues :: Env -> OpenDB -> STM ()
 deleteWriteQueues env OpenDB{odbWriting = Just Writing{..}} = do
   let !WriteQueue{..} = wrQueue
   size <- readTVar writeQueueSize
diff --git a/glean/db/Glean/Dump.hs b/glean/db/Glean/Dump.hs
deleted file mode 100644
--- a/glean/db/Glean/Dump.hs
+++ /dev/null
@@ -1,80 +0,0 @@
-{-
-  Copyright (c) Meta Platforms, Inc. and affiliates.
-  All rights reserved.
-
-  This source code is licensed under the BSD-style license found in the
-  LICENSE file in the root directory of this source tree.
--}
-
-module Glean.Dump
-  ( dump
-  ) where
-
-import Control.Exception
-import Control.Monad
-import Data.Int (Int64)
-import Text.Printf
-
-import Util.Control.Exception (catchAll)
-import Util.Log
-
-import Glean.Backend.Types
-import Glean.Backend.Local
-import Glean.Database.Schema
-import Glean.Query.JSON
-import Glean.RTS.Types
-import Glean.Types
-
-dump :: Backend b => b -> Repo -> (JsonFactBatch -> IO ()) -> IO ()
-dump backend repo withBatch = doDump =<< loadDbSchema backend repo
-  where
-    doDump dbSchema = do
-      FactIdRange{..} <- factIdRange backend repo
-      go iNVALID_ID [] 0 factIdRange_start factIdRange_finish
-      where
-
-      doneBatch :: Id -> [(Id,Fact)] -> IO ()
-      doneBatch _ [] = return ()
-      doneBatch pid facts = do
-        vlog 1 (printf "%d facts for predicate %d\n" (length facts) pid)
-        case lookupPid (Pid pid) dbSchema of
-          Nothing -> throwIO $ ErrorCall $ "unknown predicate Id: " <> show pid
-          Just details@PredicateDetails{} -> do
-            jsonFacts <- forM (reverse facts) $ \(fid, Fact{..}) ->
-                factToJSON
-                  True
-                  mempty
-                  details
-                  (Fid fid)
-                  fact_key
-                  fact_value
-                `catchAll` \exc -> throwIO $ ErrorCall $ show exc
-            withBatch JsonFactBatch
-              { jsonFactBatch_predicate = predicateRef details
-              , jsonFactBatch_facts = jsonFacts
-              , jsonFactBatch_unit = Nothing -- TODO?
-              }
-
-      -- limit the size of batches we give back, so that the writer
-      -- can run in constant space.
-      maxBatchSize :: Id
-      maxBatchSize = 10000
-
-      go :: Id -> [(Id,Fact)] -> Int64 -> Id -> Id ->  IO ()
-      go !currentPid facts !batchSize !nextId !finalId
-        | nextId < finalId = do
-            r <- queryFact backend repo nextId
-            case r of
-              Nothing -> go currentPid facts batchSize (nextId+1) finalId
-              Just fact@Fact{..} ->
-                if fact_type == currentPid && batchSize < maxBatchSize
-                  then go
-                    currentPid
-                    ((nextId,fact):facts)
-                    (batchSize + 1)
-                    (nextId+1)
-                    finalId
-                  else do
-                    doneBatch currentPid facts
-                    go fact_type [(nextId,fact)] 1 (nextId+1) finalId
-        | otherwise = doneBatch currentPid facts
diff --git a/glean/db/Glean/Logger/Database.hs b/glean/db/Glean/Logger/Database.hs
--- a/glean/db/Glean/Logger/Database.hs
+++ b/glean/db/Glean/Logger/Database.hs
@@ -31,6 +31,7 @@
   | SetCount Int
   | SetSize Int
   | SetHasExcludeProperty Bool
+  | SetDatabaseProperties Text
 
 instance Semigroup GleanDatabaseLog where
   a <> b = GleanDatabaseLogAnd a b
diff --git a/glean/db/Glean/Query/Codegen.hs b/glean/db/Glean/Query/Codegen.hs
--- a/glean/db/Glean/Query/Codegen.hs
+++ b/glean/db/Glean/Query/Codegen.hs
@@ -72,7 +72,6 @@
 import Glean.RTS.Traverse
 import Glean.RTS.Types
 import Glean.RTS.Term
-import Glean.Typed.Binary (buildRtsValue)
 import Glean.Types hiding (Nat, Byte)
 import Glean.Bytecode.SysCalls (userQuerySysCalls)
 
@@ -1586,12 +1585,12 @@
 -- | Compile a query for some facts, possibly with recursive expansion.
 compileQueryFacts :: [FactQuery] -> IO CompiledQuery
 compileQueryFacts facts = do
-  input <- withBuilder $ \builder -> do
-    buildRtsValue builder
-      [ (fromIntegral factQuery_id :: Word64,
-          if factQuery_recursive then 1 else 0 :: Word64)
-      | FactQuery{..} <- facts ]
-    finishBuilder builder
+  let input = fromValue $ Array $
+        [ Tuple [
+            Nat (fromIntegral factQuery_id),
+            Nat (if factQuery_recursive then 1 else 0)
+          ]
+        | FactQuery{..} <- facts ]
   (Meta{..}, sub) <- generateQueryCode $ \ QueryRegs{..} ->
     outputUninitialized $ \kout vout -> local $ \fid pid rec_ ptr end -> do
       loadLiteral input ptr end
diff --git a/glean/db/Glean/Query/Codegen/Types.hs b/glean/db/Glean/Query/Codegen/Types.hs
--- a/glean/db/Glean/Query/Codegen/Types.hs
+++ b/glean/db/Glean/Query/Codegen/Types.hs
@@ -311,6 +311,7 @@
 
 instance Display x => Display (Typed x) where
   display opts (Typed _ x) = display opts x
+  displayAtom opts (Typed _ x) = displayAtom opts x
 
 -- -----------------------------------------------------------------------------
 -- Pretty-printing
diff --git a/glean/db/Glean/Query/Derive.hs b/glean/db/Glean/Query/Derive.hs
--- a/glean/db/Glean/Query/Derive.hs
+++ b/glean/db/Glean/Query/Derive.hs
@@ -319,7 +319,7 @@
       Just par -> parallelDerivation odb bounds lookup par
 
   where
-    deriveQuery :: OpenDB s -> Boundaries -> Lookup -> UserQuery -> IO ()
+    deriveQuery :: OpenDB -> Boundaries -> Lookup -> UserQuery -> IO ()
     deriveQuery odb bounds lookup q = do
       config <- Observed.get (envServerConfig env)
       result <- try $
@@ -334,7 +334,7 @@
             Nothing -> return ()
 
     parallelDerivation
-      :: OpenDB s
+      :: OpenDB
       -> Boundaries
       -> Lookup
       -> ParallelDerivation
diff --git a/glean/db/Glean/Query/Flatten.hs b/glean/db/Glean/Query/Flatten.hs
--- a/glean/db/Glean/Query/Flatten.hs
+++ b/glean/db/Glean/Query/Flatten.hs
@@ -506,7 +506,7 @@
 
 disjunction :: [FlatStatementGroup] -> FlatStatement
 disjunction [FlatStatementGroup [x]] = unOrdered x
-disjunction groups = FlatDisjunction groups
+disjunction groups = flatDisjunction groups
 
 mkGroup :: [Statements] -> [Statements] -> FlatStatementGroup
 mkGroup ords floats =
diff --git a/glean/db/Glean/Query/Flatten/Types.hs b/glean/db/Glean/Query/Flatten/Types.hs
--- a/glean/db/Glean/Query/Flatten/Types.hs
+++ b/glean/db/Glean/Query/Flatten/Types.hs
@@ -21,6 +21,7 @@
   , Ordered(..)
   , unOrdered
   , grouping
+  , flatDisjunction
   , mkStatementGroup
   , singletonGroup
   , boundVars
@@ -128,6 +129,18 @@
 grouping :: FlatStatementGroup -> FlatStatement
 grouping (FlatStatementGroup [one]) = unOrdered one
 grouping group = FlatDisjunction [group]
+
+-- | Flatten nested FlatDisjunction
+flatDisjunction :: [FlatStatementGroup] -> FlatStatement
+flatDisjunction groups =
+  FlatDisjunction
+    [ group
+    | g <- groups
+    , group <- case g of
+        FlatStatementGroup [Ordered (FlatDisjunction gs)] -> gs
+        FlatStatementGroup [Floating (FlatDisjunction gs)] -> gs
+        _ -> [g]
+    ]
 
 -- | Smart constructor for a FlatStatementGroup, as with "grouping"
 -- this flattens unnecessary nesting.
diff --git a/glean/db/Glean/Query/Opt.hs b/glean/db/Glean/Query/Opt.hs
--- a/glean/db/Glean/Query/Opt.hs
+++ b/glean/db/Glean/Query/Opt.hs
@@ -162,7 +162,7 @@
 optimiseQuery query@(FlatQuery key maybeVal stmts) = do
   -- determine variables visible outside of any nested choice:
   modify $ \s -> s { optCurrentScope = queryScope query }
-  stmts' <- optStmts stmts
+  stmts' <- filterGroup =<< optStmts stmts
   FlatQuery
     <$> apply key
     <*> mapM apply maybeVal
@@ -248,7 +248,7 @@
       [] -> case stmtss' of
         [] -> return (FlatDisjunction [])
         (ss : _) -> return (grouping ss)
-      some -> return (FlatDisjunction some)
+      some -> return (flatDisjunction some)
   apply (FlatConditional cond then_ else_) = do
     -- like disjunctions, assumptions arising from the conditional statements
     -- are not true outside of it. However, those arising from the condition
@@ -275,11 +275,10 @@
 optStmts (FlatStatementGroup ord) = do
   notFalse <- and <$> mapM unifyOrdStmt ord
   ord' <- concatMap (mapM expandStmt) <$> mapM (mapM apply) ord
-  ord'' <- filterOrdStmts ord'
   -- unify may fail, but apply may also leave behind a false statement:
-  if notFalse && not (any isFalseOrdStmt ord'')
-    then return (mkStatementGroup ord'')
-    else return (mkStatementGroup (Ordered falseStmt : ord'' ))
+  if notFalse && not (any isFalseOrdStmt ord')
+    then return (mkStatementGroup ord')
+    else return (mkStatementGroup (Ordered falseStmt : ord' ))
 
 -- Look for the sentinel left by optStmts
 isFalseGroups :: FlatStatementGroup -> Bool
@@ -731,7 +730,7 @@
   FlatNegation stmts -> FlatNegation <$> filterGroupEnclosed stmts
   FlatDisjunction [stmts] -> grouping <$> filterGroup stmts
   FlatDisjunction stmtss ->
-    FlatDisjunction <$> mapM filterGroupEnclosed stmtss
+    flatDisjunction <$> mapM filterGroupEnclosed stmtss
   FlatConditional cond then_ else_ -> do
     (cond', then') <- encloseSeen $ do
       cond' <- filterGroup cond
diff --git a/glean/db/Glean/Query/Transform.hs b/glean/db/Glean/Query/Transform.hs
--- a/glean/db/Glean/Query/Transform.hs
+++ b/glean/db/Glean/Query/Transform.hs
@@ -329,8 +329,7 @@
 transformExpression from to =
   case transformTerm inner defaultValue from to of
     Nothing -> Nothing
-    Just f -> Just $ \ta ->
-      f (error "QueryRegs are never used in transformExpression") discard ta id
+    Just f -> Just $ \ta -> f () discard ta id
   where
     inner _ _ _ _ _ a f = f a
     discard _ _ = return ()
@@ -415,8 +414,8 @@
     run :: forall x. Cont (Code x) () -> Code ()
     run m = void $ runCont m (\() -> return undefined)
 
-type TransformTerm m a b
-  = QueryRegs
+type TransformTerm m qr a b
+  = qr
   -> (Type -> Term a -> m ())   -- ^ discard term
   -> Term a                    -- ^ source term
   -> m (Term b)
@@ -427,8 +426,8 @@
 -- these two cases we will handle default values and discarded records fields
 -- differently so we take those handling functions as input.
 transformTerm
-  :: forall a b m. (Coercible a b, Show a, Show b, Monad m)
-  => ( QueryRegs
+  :: forall a b qr m. (Coercible a b, Show a, Show b, Monad m)
+  => ( qr
     -> (Type -> a -> m ())       --  discard inner value
     -> Type                      --  from type
     -> Type                      --  to type
@@ -438,7 +437,7 @@
   -> (Type -> Term b)            -- ^ default value for type
   -> Type                        -- ^ from type
   -> Type                        -- ^ to type
-  -> Maybe (TransformTerm m a b)
+  -> Maybe (TransformTerm m qr a b)
 transformTerm inner defaultForType src dst = go src dst
   where
     -- Types are the same. No transformation is required
@@ -451,13 +450,13 @@
     transformationsFor
       :: [RTS.FieldDef]
       -> [RTS.FieldDef]
-      -> Map Text (Maybe (Word64, TransformTerm m a b))
+      -> Map Text (Maybe (Word64, TransformTerm m qr a b))
     transformationsFor from to =
       Map.intersectionWith trans fromFields toFields
       where
         trans :: (Word64, Type)
               -> (Word64, Type)
-              -> Maybe (Word64, TransformTerm m a b)
+              -> Maybe (Word64, TransformTerm m qr a b)
         trans (ixFrom, defFrom) (ixTo, defTo) =
           case go defFrom defTo of
             -- fields are identical
@@ -475,7 +474,7 @@
         toFields = Map.fromList $ flip map (zip to [0..])
           $ \(FieldDef name def, ix) -> (name, (ix, def))
 
-    go :: Type -> Type -> Maybe (TransformTerm m a b)
+    go :: Type -> Type -> Maybe (TransformTerm m qr a b)
     go from@(NamedTy _ _) to = go (derefType from) to
     go from to@(NamedTy _ _) = go from (derefType to)
     go ByteTy ByteTy = Nothing
diff --git a/glean/db/Glean/Query/UserQuery.hs b/glean/db/Glean/Query/UserQuery.hs
--- a/glean/db/Glean/Query/UserQuery.hs
+++ b/glean/db/Glean/Query/UserQuery.hs
@@ -544,7 +544,7 @@
 -- caused by the query. Used for stored predicate derivation.
 userQueryWrites
   :: Database.Env
-  -> OpenDB s
+  -> OpenDB
   -> ServerConfig.Config
   -> Boundaries
   -> Lookup
@@ -608,7 +608,7 @@
 
 userQueryImpl
   :: Database.Env
-  -> OpenDB s
+  -> OpenDB
   -> ServerConfig.Config
   -> CompilationMode
   -> Boundaries
@@ -755,7 +755,7 @@
 
 runQuery
   :: Database.Env
-  -> OpenDB s
+  -> OpenDB
   -> ServerConfig.Config
   -> Boundaries
   -> Lookup
diff --git a/glean/github/Facebook/Service.hs b/glean/github/Facebook/Service.hs
--- a/glean/github/Facebook/Service.hs
+++ b/glean/github/Facebook/Service.hs
@@ -32,6 +32,7 @@
 import Thrift.Server.CppServer
 #else
 import Thrift.Server.HTTP
+import Facebook.Service.HttpFb303
 #endif
 
 -- | Runs a facebook service on a CPPServer
@@ -166,7 +167,12 @@
   -> IO a
 withBackgroundFacebookService_ fb303 handler postProcess opts waitAction = do
   bracketFb303 fb303 Fb303_status_STARTING Fb303_status_STOPPED $ do
-    withBackgroundServer' handler postProcess opts waitAction
+#if FBTHRIFT
+    let opts' = opts
+#else
+    let opts' = opts { middleware = middleware opts . fb303Middleware fb303 }
+#endif
+    withBackgroundServer' handler postProcess opts' waitAction
 
 nilPostProcess :: a -> b -> [c]
 nilPostProcess _ _ = []
diff --git a/glean/github/Facebook/Service/HttpFb303.hs b/glean/github/Facebook/Service/HttpFb303.hs
new file mode 100644
--- /dev/null
+++ b/glean/github/Facebook/Service/HttpFb303.hs
@@ -0,0 +1,34 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module Facebook.Service.HttpFb303 where
+
+import qualified Data.ByteString.Lazy as LBS
+import Data.IORef (readIORef)
+import Network.HTTP.Types
+import Network.Wai
+
+import Facebook.Fb303
+import Fb303Core.Types
+
+-- | Middleware exposing Fb303 as a more standard health check endpoint at @/health@.
+fb303Middleware :: Fb303State -> Middleware
+fb303Middleware fb303 app req respond = do
+  case pathInfo req of
+    ["health"] -> do
+      status <- readIORef (fb303_status fb303)
+      let replyStatus = case status of
+            Fb303_status_ALIVE -> ok200
+            Fb303_status_WARNING -> mkStatus 290 "warning"
+            Fb303_status_STARTING -> mkStatus 291 "starting"
+            Fb303_status_STOPPING -> mkStatus 292 "stopping"
+            Fb303_status_STOPPED -> mkStatus 293 "stopped"
+            Fb303_status_DEAD -> mkStatus 294 "dead"
+            Fb303_status__UNKNOWN _ -> mkStatus 299 "unknown status"
+      respond $ responseLBS replyStatus [(hContentType, "text/plain")] (LBS.fromStrict $ statusMessage replyStatus)
+    _ -> app req respond
diff --git a/glean/github/Glean/BuildInfo.hs b/glean/github/Glean/BuildInfo.hs
--- a/glean/github/Glean/BuildInfo.hs
+++ b/glean/github/Glean/BuildInfo.hs
@@ -16,6 +16,8 @@
 import System.Exit
 import System.Process
 
+import Util.Control.Exception
+
 buildRule :: Text
 buildRule = "glean"
 
@@ -30,9 +32,9 @@
 
 buildRevision :: Text
 buildRevision = $(do
-  (exit, rev, _) <- liftIO $
+  res <- liftIO $ tryAll $
     readProcessWithExitCode "git" ["rev-parse", "HEAD"] ""
-  case exit of
-    ExitSuccess -> litE (stringL (head (lines rev)))
+  case res of
+    Right (ExitSuccess, rev, _) -> litE (stringL (head (lines rev)))
     _ -> litE (stringL "<unknown>")
   )
diff --git a/glean/github/Glean/Init.hsc b/glean/github/Glean/Init.hsc
--- a/glean/github/Glean/Init.hsc
+++ b/glean/github/Glean/Init.hsc
@@ -35,7 +35,7 @@
 import Mangle.TH
 
 $(mangle
-  "void folly::init(int*, char***, bool)"
+  "void folly::unsafe_unscoped_init(int*, char***, bool)"
   [d|
     foreign import ccall unsafe
       c_follyInit
diff --git a/glean/github/Logger/GleanGlass.hs b/glean/github/Logger/GleanGlass.hs
--- a/glean/github/Logger/GleanGlass.hs
+++ b/glean/github/Logger/GleanGlass.hs
@@ -118,3 +118,12 @@
 
 setDynamicAttributeStats  :: [Text] -> GleanGlassLogger
 setDynamicAttributeStats _ = GleanGlassLogger
+
+setClientUnixname :: Text -> GleanGlassLogger
+setClientUnixname _ = GleanGlassLogger
+
+setClientApplication :: Text -> GleanGlassLogger
+setClientApplication _ = GleanGlassLogger
+
+setClientName :: Text -> GleanGlassLogger
+setClientName _ = GleanGlassLogger
diff --git a/glean/github/TestRunner.hs b/glean/github/TestRunner.hs
--- a/glean/github/TestRunner.hs
+++ b/glean/github/TestRunner.hs
@@ -8,10 +8,13 @@
 
 module TestRunner (module TestRunner) where
 
+import Control.Exception
 import System.Environment (withArgs)
 import Test.HUnit
 import qualified Test.Tasty as Tasty
-import qualified Test.Tasty.HUnit.Adapter as Tasty
+import qualified Test.HUnit.Base  as HUB
+import qualified Test.Tasty.HUnit as TFH
+import Test.HUnit.Lang as HUnitInternals (HUnitFailure(..), formatFailureReason)
 
 -- | Wraps the HUnit test using tasty, so we get parallel test runs,
 -- test listing, and test selection.
@@ -19,7 +22,7 @@
 testRunner t =
   Tasty.defaultMain $
   Tasty.testGroup "test" $
-  Tasty.hUnitTestToTestTree t
+  hUnitTestToTestTree t
 
 data TestAction = TestAction
 
@@ -40,4 +43,28 @@
   withArgs [] $
   Tasty.defaultMain $
   Tasty.testGroup "test" $
-  Tasty.hUnitTestToTestTree t
+  hUnitTestToTestTree t
+
+-- | Convert existing HUnit test to a TestTree list that can be used
+-- with tasty.  This is modified from the tasty-hunit-adapter package,
+-- adding conversion of the original HUnitFailure exception into
+-- Tasty's version, so that we get better diagnostics.
+hUnitTestToTestTree :: HUB.Test -> [Tasty.TestTree]
+hUnitTestToTestTree = go ""
+  where
+    go desc (HUB.TestCase a)    = [TFH.testCase desc (rethrow a)]
+    go desc (HUB.TestLabel s t)
+      | null desc = go s t
+      | otherwise = go (desc ++ ":" ++ s) t
+    go desc (HUB.TestList ts)
+        -- If the list occurs at the top level (with no description above it),
+        -- just return that list straightforwardly
+      | null desc = concatMap (go "") ts
+        -- If the list occurs with a description, turn that into a honest-to-god
+        -- test group. This is heuristic, but likely to give good results
+      | otherwise = [Tasty.testGroup desc (concatMap (go "") ts)]
+
+    rethrow t = --recomp
+      t `catch` \(HUnitInternals.HUnitFailure loc reason) ->
+        throwIO $
+          TFH.HUnitFailure loc (HUnitInternals.formatFailureReason reason)
diff --git a/glean/glass/Glean/Glass/Attributes/PerfUtils.hs b/glean/glass/Glean/Glass/Attributes/PerfUtils.hs
new file mode 100644
--- /dev/null
+++ b/glean/glass/Glean/Glass/Attributes/PerfUtils.hs
@@ -0,0 +1,26 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module Glean.Glass.Attributes.PerfUtils (
+    parseGitDiff,
+    applyLineMappingToDefs,
+    applyLineMappingToRefs
+  ) where
+
+import Data.Text (Text)
+
+type Mapping = ()
+
+parseGitDiff :: Maybe Text -> Mapping
+parseGitDiff = const ()
+
+applyLineMappingToDefs :: Mapping -> a -> a
+applyLineMappingToDefs _ = id
+
+applyLineMappingToRefs :: Mapping -> a -> a
+applyLineMappingToRefs _ = id
diff --git a/glean/glass/Glean/Glass/Base.hs b/glean/glass/Glean/Glass/Base.hs
--- a/glean/glass/Glean/Glass/Base.hs
+++ b/glean/glass/Glean/Glass/Base.hs
@@ -81,22 +81,33 @@
   -- ^ Nothing means the db is default, can be used for any branch
   }
 
-data RepoMapping = RepoMapping
-  { gleanIndices :: Map.Map Glass.RepoName [GleanDBSelector]
-    -- ^ This should be in a config
-    --
-    -- This is the set of Glean dbs that should implement codemarkup.*
-    --
-    -- Note: the order here determines the order of search/lookup
-    -- if you have overlapping dbs , for file contents, the first in the order
-    -- with a src.File fact will win.
+data RepoMapping
+  = AutoRepoMapping
+    -- ^ Repo name == Glean DB name. e.g. if we get a documentSymbols
+    -- request for myrepo/lang/My/File then we query the latest
+    -- "myrepo" Glean DB.
     --
-    -- If you add/remove a db, consider if it needs to be present in
-    -- gleanRequiredIndices as well
+    -- In this case 'RepoMapping.allGleanRepos' can be 'Nothing' to
+    -- enable use of any Glean DB, or it can be set to a list to
+    -- restrict Glass to using particular Glean DBs.
 
-  , gleanAttrIndices :: Map.Map Glass.RepoName [GleanDBAttrName]
-    -- ^ Map of source db to attr db names & attribute key types
-    --
-    -- This pairs attribute Glean dbs with a key type to index the ToAttribute
-    -- class, that in turns knowns how to query and marshal the attributes
-  }
+  | RepoMapping
+    { gleanIndices :: Map.Map Glass.RepoName [GleanDBSelector]
+      -- ^ This should be in a config
+      --
+      -- This is the set of Glean dbs that should implement codemarkup.*
+      --
+      -- Note: the order here determines the order of search/lookup
+      -- if you have overlapping dbs , for file contents, the first in the order
+      -- with a src.File fact will win.
+      --
+      -- If you add/remove a db, consider if it needs to be present in
+      -- gleanRequiredIndices as well
+
+    , gleanAttrIndices ::
+        Map.Map (Glass.RepoName, Glass.Language) [GleanDBAttrName]
+      -- ^ Map of (repo, language) to attr db names & attribute key types
+      --
+      -- This pairs attribute Glean dbs with a key type to index the ToAttribute
+      -- class, that in turns knowns how to query and marshal the attributes
+    }
diff --git a/glean/glass/Glean/Glass/Handler/Documents.hs b/glean/glass/Glean/Glass/Handler/Documents.hs
--- a/glean/glass/Glean/Glass/Handler/Documents.hs
+++ b/glean/glass/Glean/Glass/Handler/Documents.hs
@@ -88,6 +88,8 @@
 import ServiceData.GlobalStats as Stats
 import ServiceData.Types as Stats
 import Util.Time (elapsedTime, toDiffMillis)
+import Glean.Glass.Attributes.PerfUtils (parseGitDiff, applyLineMappingToDefs, applyLineMappingToRefs)
+import qualified Glean.Glass.Query as Query
 
 -- | Runner for methods that are keyed by a file path.
 -- Select the right Glean DBs and pass them to the function (via a GleanBackend)
@@ -198,7 +200,7 @@
   -> DocumentSymbolListXResult
   -> DocumentSymbolListXResult
 translateMirroredRepoListXResult
-  (DocumentSymbolsRequest repository path _ _ _) res =
+  (DocumentSymbolsRequest repository path _ _ _ _) res =
   case repoPathToMirror repository path of
     Just (Mirror mirror prefix origin) ->
       Utils.translateDocumentSymbolListXResult origin mirror prefix Nothing res
@@ -218,15 +220,20 @@
        Maybe ErrorLogger
      )
 fetchSymbolsAndAttributesGlean
-  env@Glass.Env{tracer, gleanBackend}
+  env@Glass.Env{tracer, gleanBackend, sourceControl}
   dbInfo req opts be mOtherBackend mlang = do
   (res1, gLogs, elogs) <- traceSpan tracer "fetchDocumentSymbols" $
     fetchDocumentSymbols env file path mlimit
       (requestOptions_revision opts)
       (requestOptions_exact_revision opts)
       withContentHash
+      fetchContent
       ExtraSymbolOpts{..} be mlang dbInfo (requestOptions_attribute_opts opts)
 
+  res1 <- if oAmendLinesOnRevisionMismatch
+          then amendRefLinesIfMismatch res1
+          else return res1
+
   (res2, attributesLog) <- do
     (t, result) <- elapsedTime $ traceSpan tracer "addDynamicAttributes" $
       addDynamicAttributes env dbInfo repo opts
@@ -250,14 +257,54 @@
     oIncludeRefs = documentSymbolsRequest_include_refs req
     oLineRange = documentSymbolsRequest_range req
     withContentHash = shouldFetchContentHash opts
-    oIncludeXlangRefs = case opts of
-      RequestOptions { requestOptions_feature_flags = Just
-        FeatureFlags { featureFlags_include_xlang_refs = Just True } } -> True
-      _ -> documentSymbolsRequest_include_xlang_refs req
+    fetchContent = documentSymbolsRequest_include_content req
+    oIncludeXlangRefs = documentSymbolsRequest_include_xlang_refs req
+    oAmendLinesOnRevisionMismatch = maybe False
+      featureFlags_amend_lines_on_revision_mismatch (requestOptions_feature_flags opts)
 
     mlimit = Just (fromIntegral (fromMaybe mAXIMUM_SYMBOLS_QUERY_LIMIT
       (requestOptions_limit opts)))
 
+    amendRefLinesIfMismatch res = do
+      case requestOptions_revision opts of
+        Nothing -> return res -- no requested revision, no need to amend
+        Just revision1 -> do
+          let revision2 = revision res
+          match <- fromMaybe False <$> contentMatch revision1 revision2
+          if match
+            then return res -- revision match, no need to amend
+            else
+              let op = do
+                  -- obtain line mapping from source diff
+                  diffResult <- backendRunHaxl be env $
+                    withRepo (snd (NonEmpty.head (gleanDBs be))) $ do
+                      getFileLineDiff sourceControl repo path revision1 revision2
+                  let mapping = parseGitDiff diffResult
+                      -- apply line mapping to references and definitions
+                  return res {
+                    refs  = applyLineMappingToRefs mapping (refs res),
+                    defs = applyLineMappingToDefs mapping (defs res)
+                  }
+              in do
+                (t, result) <- elapsedTime op
+                let metricName = "glass.amend_lines.latency_ms"
+                Stats.addStatValueType metricName (toDiffMillis t) Stats.Avg
+                return result
+
+    contentMatch myrev wantedrev
+      | myrev == wantedrev = return (Just True)
+      | otherwise = let
+          op = backendRunHaxl be env $
+            withRepo (snd (NonEmpty.head (gleanDBs be))) $ do
+              wanted <- getFileContentHash sourceControl repo path wantedrev
+              mine <- getFileContentHash sourceControl repo path myrev
+              return $ (==) <$> wanted <*> mine
+        in do (t, result) <- elapsedTime op
+              let metricName = "glass.content_match.latency_ms"
+              Stats.addStatValueType metricName (toDiffMillis t) Stats.Avg
+              return result
+
+
 shouldFetchContentHash :: RequestOptions -> Bool
 shouldFetchContentHash opts =
   not (requestOptions_exact_revision opts) &&
@@ -273,7 +320,14 @@
 -- use based on the requested revision, the revision of the result and
 -- RequestOptions.
 chooseGleanOrSnapshot
-  :: RequestOptions
+  :: Glean.Backend b
+  => Glass.Env
+  -> GleanDBInfo
+  -> RepoName
+  -> RequestOptions
+  -> FileReference
+  -> Maybe Int
+  -> GleanBackend b
   -> Revision
   -> (
        (DocumentSymbolListXResult, QueryEachRepoLog, GleanGlassLogger),
@@ -285,26 +339,34 @@
        (Revision, DocumentSymbolListXResult, Maybe Bool)
      -- ^ Snapshot result (with deferred fetch)
   -> IO FetchDocumentSymbols
-chooseGleanOrSnapshot RequestOptions{..} revision glean esnapshot
-  | isRevisionHit revision glean =
-    returnGlean
-  | Right (rev, res, _) <- esnapshot, rev == revision =
-    return $ returnSnapshot res Snapshot.ExactMatch
-  | requestOptions_matching_revision && not requestOptions_exact_revision =
-    doMatching
-  | otherwise =
-    returnGlean
+chooseGleanOrSnapshot env dbInfo repo RequestOptions{..} repofile mlimit be
+    revision glean esnapshot =
+  if isRevisionHit revision glean
+    then returnGlean
+    else case esnapshot of
+      Right (rev, res, _) | rev == revision ->
+        returnSnapshotConditionally env dbInfo repo (RequestOptions{..})
+          repofile mlimit be res Snapshot.ExactMatch
+      _ | requestOptions_matching_revision &&
+          not requestOptions_exact_revision ->
+        doMatching
+      _ ->
+        returnGlean
   where
     returnGlean = return $
       addStatus (fromLeft Snapshot.Ignored esnapshot) glean
 
-    doMatching
-      | Just True <- resultContentMatch glean = returnGlean
-      | Right (_, res, match) <- esnapshot =
-          return $ if match == Just True
-            then returnSnapshot res Snapshot.CompatibleMatch
-            else empty Snapshot.Ignored
-      | Left s <- esnapshot = return $ empty s
+    doMatching = do
+      let gleanContentMatch = resultContentMatch glean
+      case gleanContentMatch of
+        Just True -> returnGlean
+        _ -> case esnapshot of
+          Right (_, res, match) ->
+            if match == Just True
+              then returnSnapshotConditionally env dbInfo repo (RequestOptions{..})
+                     repofile mlimit be res Snapshot.CompatibleMatch
+              else return $ empty Snapshot.Ignored
+          Left s -> return $ empty s
       where
       empty status =
         ((toDocumentSymbolResult(emptyDocumentSymbols revision)
@@ -324,22 +386,102 @@
     resultContentMatch ((r, _, _), _) =
       documentSymbolListXResult_content_match r
 
+-- | Set content_match field based on snapshot status
+setContentMatchForSnapshot
+  :: SnapshotStatus
+  -> DocumentSymbolListXResult
+  -> DocumentSymbolListXResult
+setContentMatchForSnapshot match res = case match of
+  Snapshot.ExactMatch -> matchYes
+  Snapshot.CompatibleMatch -> matchYes
+  _ -> res
+  where
+    matchYes = res { documentSymbolListXResult_content_match = Just True }
+
 returnSnapshot
   :: DocumentSymbolListXResult
   -> SnapshotStatus
   -> FetchDocumentSymbols
 returnSnapshot queryResult match =
-  ((setContentMatch queryResult, match,
+  ((setContentMatchForSnapshot match queryResult, match,
     QueryEachRepoUnrequested, mempty), Nothing)
+
+-- | Helper function to conditionally return snapshot with or without attributes
+-- based on RequestOptions attribute settings
+returnSnapshotConditionally
+  :: Glean.Backend b
+  => Glass.Env
+  -> GleanDBInfo
+  -> RepoName
+  -> RequestOptions
+  -> FileReference
+  -> Maybe Int
+  -> GleanBackend b
+  -> DocumentSymbolListXResult
+  -> SnapshotStatus
+  -> IO FetchDocumentSymbols
+returnSnapshotConditionally env dbInfo repo opts repofile mlimit be res match =
+  if attributeOptions_fetch_per_line_data (requestOptions_attribute_opts opts) ||
+     attributeOptions_fetch_default_view (requestOptions_attribute_opts opts)
+  then returnSnapshotWithAttributes env dbInfo repo opts repofile mlimit be res match
+  else return $ returnSnapshot res match
+
+-- | Process snapshot result through addDynamicAttributes pipeline
+returnSnapshotWithAttributes
+  :: Glean.Backend b
+  => Glass.Env
+  -> GleanDBInfo
+  -> RepoName
+  -> RequestOptions
+  -> FileReference
+  -> Maybe Int
+  -> GleanBackend b
+  -> DocumentSymbolListXResult
+  -> SnapshotStatus
+  -> IO FetchDocumentSymbols
+returnSnapshotWithAttributes env dbInfo repo opts repofile mlimit be
+    queryResult match = do
+  -- Convert DocumentSymbolListXResult back to DocumentSymbols for processing
+  let docSymbols = fromDocumentSymbolResult queryResult
+
+  (res2, attributesLog) <- addDynamicAttributes env dbInfo repo opts
+    repofile mlimit be docSymbols
+  let finalResult = toDocumentSymbolResult res2
+
+  return ((setContentMatchForSnapshot match finalResult, match, QueryEachRepoUnrequested,
+    attributesLog), Nothing)
+
+-- | Convert DocumentSymbolListXResult back to DocumentSymbols for
+-- attribute processing.
+-- Note: This creates dummy Code.Entity values since snapshot results
+-- don't have full entity data
+fromDocumentSymbolResult :: DocumentSymbolListXResult -> DocumentSymbols
+fromDocumentSymbolResult DocumentSymbolListXResult{..} = DocumentSymbols
+  { refs = map createDummyRefEntity documentSymbolListXResult_references
+  , defs = map createDummyDefEntity documentSymbolListXResult_definitions
+  , revision = documentSymbolListXResult_revision
+  , contentMatch = documentSymbolListXResult_content_match
+  , truncated = documentSymbolListXResult_truncated
+  , digest = documentSymbolListXResult_digest
+  , xref_digests = documentSymbolListXResult_referenced_file_digests
+  , unresolvedXrefsXlang = []
+  , srcFile = Nothing
+  , offsets = Nothing
+  , attributes = documentSymbolListXResult_attributes
+  , content = documentSymbolListXResult_content
+  }
   where
-    -- set the content_match field appropriately if we used a snapshot
-    setContentMatch res = case match of
-      Snapshot.ExactMatch -> matchYes
-      Snapshot.CompatibleMatch -> matchYes
-      _ -> res
-      where
-      matchYes = res { documentSymbolListXResult_content_match = Just True }
+    createDummyRefEntity :: ReferenceRangeSymbolX ->
+      (Code.Entity, ReferenceRangeSymbolX)
+    createDummyRefEntity ref = (createDummyEntity, ref)
 
+    createDummyDefEntity :: DefinitionSymbolX ->
+      (Code.Entity, DefinitionSymbolX)
+    createDummyDefEntity def = (createDummyEntity, def)
+
+    createDummyEntity :: Code.Entity
+    createDummyEntity = Code.Entity_EMPTY
+
 -- | Fall back to the best snapshot available for new files (not yet in repo)
 fallbackForNewFiles
   :: SnapshotBackend snapshotBackend
@@ -392,7 +534,8 @@
       (esnapshot, glean) <- Async.concurrently
         (traceSpan tracer "getSnapshot" $ getFromSnapshot revision)
         (traceSpan tracer "getFromGlean" getFromGlean)
-      chooseGleanOrSnapshot opts revision glean esnapshot
+      chooseGleanOrSnapshot env dbInfo repo opts (toFileReference repo file)
+        Nothing be revision glean esnapshot
 
   fallbackForNewFiles env opts snapshotbe repo file res
   where
@@ -452,6 +595,7 @@
   -> Maybe Revision
   -> Bool  -- ^ exact revision only?
   -> Bool  -- ^ fetch file content hash?
+  -> Bool  -- ^ fetch file content
   -> ExtraSymbolOpts
   -> GleanBackend b
   -> Maybe Language
@@ -459,8 +603,8 @@
   -> AttributeOptions
   -> IO (DocumentSymbols, QueryEachRepoLog, Maybe ErrorLogger)
 fetchDocumentSymbols env@Glass.Env{..} (FileReference scsrepo path)
-    repoPath mlimit wantedRevision exactRevision fetchContentHash extraOpts
-    b mlang dbInfo attrOpts = do
+    repoPath mlimit wantedRevision exactRevision fetchContentHash fetchContent
+    extraOpts b mlang dbInfo attrOpts = do
   backendRunHaxl b env $ do
     --
     -- we pick the first db in the list that has the full FileInfo{..}
@@ -505,6 +649,12 @@
         (kinds, _, merr) <- withRepo fileRepo $
           documentSymbolKinds mlimit mlang fileId attrOpts
 
+        content <-
+          if fetchContent then
+            withRepo fileRepo $ Utils.fetchData $ Query.fileContent fileId
+          else
+            return Nothing
+
         let revision = getDBRevision (scmRevisions dbInfo) fileRepo scsrepo
         contentMatch <- case wantedRevision of
           Nothing -> return Nothing
@@ -640,7 +790,7 @@
     translateSymbol
         (Just Language_Swift)
         Language_Cpp
-        (Code.SymbolId_scip (Scip.Symbol _ (Just usr))) =
+        (Code.SymbolId_swift (Scip.Symbol _ (Just usr))) =
       Code.SymbolId_cxx $ hashUSR usr
     translateSymbol _ _ symId = symId
 
@@ -657,12 +807,13 @@
   , srcFile :: Maybe Src.File
   , offsets :: Maybe Range.LineOffsets
   , attributes :: Maybe AttributeList
+  , content :: Maybe Text
   }
 
 emptyDocumentSymbols :: Revision -> DocumentSymbols
 emptyDocumentSymbols revision =
   DocumentSymbols [] [] revision Nothing False Nothing mempty mempty Nothing
-    Nothing Nothing
+    Nothing Nothing Nothing
 
 -- | Drop any remnant entities after we are done with them
 toDocumentSymbolResult :: DocumentSymbols -> DocumentSymbolListXResult
@@ -676,6 +827,7 @@
     documentSymbolListXResult_referenced_file_digests = xref_digests
     documentSymbolListXResult_content_match = contentMatch
     documentSymbolListXResult_attributes = attributes
+    documentSymbolListXResult_content = content
 
 
 
@@ -715,7 +867,8 @@
           documentSymbolListXResult_referenced_file_digests,
         documentSymbolIndex_content_match =
           documentSymbolListXResult_content_match,
-        documentSymbolIndex_attributes = documentSymbolListXResult_attributes
+        documentSymbolIndex_attributes = documentSymbolListXResult_attributes,
+        documentSymbolIndex_content = documentSymbolListXResult_content
       }
   return ((idxResult, status, gleanDataLog, attrLog), merr1)
 
@@ -1007,9 +1160,11 @@
   -> IO ([Augment], [Maybe AttributeList])
 getSymbolAttributes env dbInfo repo opts repofile mlimit
     be@GleanBackend{..} revision = do
+  let mlanguage = fileLanguage $
+        symbolPath $ fromGleanPath repo (theGleanPath repofile)
   mAttrDBs <-
     getLatestAttrDBs tracer (sourceControl env) (Glass.repoMapping env)
-      dbInfo repo
+      dbInfo repo mlanguage
   backendRunHaxl be env $ do
     attrsTuples <- forM mAttrDBs $
       \(attrDB, GleanDBAttrName _ attrKey{- existential key -}) ->
diff --git a/glean/glass/Glean/Glass/Handler/Symbols.hs b/glean/glass/Glean/Glass/Handler/Symbols.hs
--- a/glean/glass/Glean/Glass/Handler/Symbols.hs
+++ b/glean/glass/Glean/Glass/Handler/Symbols.hs
@@ -109,14 +109,22 @@
 import Glean.Glass.SymbolKind (findSymbolKind)
 import Glean.Glass.Env (Env' (tracer, sourceControl, useSnapshotsForSymbolsList))
 
+extractDefFileFilter :: [SymbolFilter] -> Maybe Text
+extractDefFileFilter [] = Nothing
+extractDefFileFilter (SymbolFilter_definition_file filePath : _) = Just filePath
+extractDefFileFilter (_ : rest) = extractDefFileFilter rest
+
+
 -- | Symbol-based find-references.
 findReferenceRanges
   :: Glass.Env -> SymbolId -> RequestOptions -> IO [LocationRange]
 findReferenceRanges env@Glass.Env{..} sym opts@RequestOptions{..} =
   withSymbol "findReferenceRanges" env opts sym
-    $ \gleanDBs _dbInfo (repo, lang, toks) ->
-      fetchSymbolReferenceRanges env repo lang toks limit
-        GleanBackend{..}
+    $ \gleanDBs _dbInfo (repo, lang, toks, symbolFilters) -> do
+      let filename = extractDefFileFilter symbolFilters
+      (ranges, maybeError) <-
+            fetchSymbolReferenceRanges env repo lang toks limit filename GleanBackend{..}
+      return (ranges, maybeError)
   where
     limit = fmap fromIntegral requestOptions_limit
 
@@ -125,8 +133,11 @@
 symbolLocation :: Glass.Env -> SymbolId -> RequestOptions -> IO SymbolLocation
 symbolLocation env@Glass.Env{..} sym opts =
   withSymbol "symbolLocation" env opts sym $
-    \gleanDBs dbInfo (scmRepo, lang, toks) ->
+    \gleanDBs dbInfo (scmRepo, lang, toks, filters) ->
       backendRunHaxl GleanBackend{..} env $ do
+        case filters of
+          [] -> return ()
+          _ -> throwM (ServerException "symbolLocation: filters not supported")
         r <- Search.searchEntityLocation lang toks
         (entity, err) <- case r of
           None t -> throwM (ServerException t)
@@ -150,8 +161,11 @@
   -> IO SymbolDescription
 describeSymbol env@Glass.Env{..} symId opts =
   withSymbol "describeSymbol" env opts symId $
-    \gleanDBs dbInfo (scmRepo, lang, toks) ->
+    \gleanDBs dbInfo (scmRepo, lang, toks, filters) ->
       backendRunHaxl GleanBackend{..} env $ do
+        case filters of
+          [] -> return ()
+          _ -> throwM (ServerException "describeSymbol: filters not supported")
         r <- Search.searchEntityLocation lang toks
         (first :| rest, err) <- case r of
           None t -> throwM (ServerException t)
@@ -178,8 +192,11 @@
   results <- forM symIds $ \symId -> do
     -- Try to resolve the symbol, returning any error encountered
     (resolutions, err) <- withSymbol "resolveSymbols" env opts symId $
-      \gleanDBs dbInfo (scmRepo, lang, toks) ->
+      \gleanDBs dbInfo (scmRepo, lang, toks, filters) ->
       backendRunHaxl GleanBackend{..} env $ do
+        case filters of
+          [] -> return ()
+          _ -> throwM (ServerException "resolveSymbols: filters not supported")
         r <- Search.searchEntityLocation lang toks
         (entities, err) <- case r of
           None t ->
@@ -608,9 +625,10 @@
   -> Language
   -> [Text]
   -> Maybe Int
+  -> Maybe Text
   -> GleanBackend b
   -> IO ([LocationRange], Maybe ErrorLogger)
-fetchSymbolReferenceRanges env scsrepo lang toks limit b =
+fetchSymbolReferenceRanges env scsrepo lang toks limit filename b =
   backendRunHaxl b env $ do
     er <- symbolToAngleEntities lang toks
     let logDBs x = logError (gleanDBs b) <> x
@@ -621,7 +639,11 @@
           withRepo entityRepo $ do
             let convert (targetFile, rspan) =
                   rangeSpanToLocationRange scsrepo targetFile rspan
-            uses <- searchWithLimit limit $ Query.findReferenceRangeSpan query
+            uses <- searchWithLimit limit $ case (filename, lang) of
+              -- Definition file filter only supported for Python
+              (Just filename, Language_Python) ->
+                Query.findReferenceRangeSpanByDef query filename
+              _ -> Query.findReferenceRangeSpan query
             mapM convert uses
         return (nubOrd $ concat ranges, fmap (logDBs . logError) searchErr)
 
@@ -687,9 +709,12 @@
 searchRelated env@Glass.Env{..} sym opts@RequestOptions{..}
     SearchRelatedRequest{..} =
   withSymbol "searchRelated" env opts sym $
-    \gleanDBs_ dbInfo (repo, lang, toks) ->
+    \gleanDBs_ dbInfo (repo, lang, toks, filters) ->
       let gleanDBs = filterDBs lang gleanDBs_ in
       backendRunHaxl GleanBackend{..} env $ do
+        case filters of
+          [] -> return ()
+          _ -> throwM (ServerException "searchRelated: filters not supported")
         entity <- searchFirstEntity lang toks
         withRepo (entityRepo entity) $ do
           (symPairs, desc, merr) <- case searchRelatedRequest_relatedBy of
@@ -922,8 +947,11 @@
   -> IO RelatedNeighborhoodResult
 searchRelatedNeighborhood env@Glass.Env{..} sym opts@RequestOptions{..} req =
   withSymbol "searchRelatedNeighborhood" env opts sym $
-    \gleanDBs dbInfo (repo, lang, toks) ->
+    \gleanDBs dbInfo (repo, lang, toks, filters) ->
       backendRunHaxl GleanBackend{..} env $ do
+        case filters of
+          [] -> return ()
+          _ -> throwM (ServerException "searchRelatedNeighborhood: filters not supported")
         baseEntity <- searchFirstEntity lang toks
         let lang = entityLanguage (fst4 (decl baseEntity))
         (,Nothing) <$> searchNeighborhood limit req sym repo
diff --git a/glean/glass/Glean/Glass/Handler/Utils.hs b/glean/glass/Glean/Glass/Handler/Utils.hs
--- a/glean/glass/Glean/Glass/Handler/Utils.hs
+++ b/glean/glass/Glean/Glass/Handler/Utils.hs
@@ -206,14 +206,14 @@
   -> SymbolId
   -> (  NonEmpty (GleanDBName, Glean.Repo)
      -> GleanDBInfo
-     -> (RepoName, Language, [Text])
+     -> (RepoName, Language, [Text], [SymbolFilter])
      -> IO (res, Maybe ErrorLogger))
   -> IO res
 withSymbol method env@Glass.Env{..} opts sym fn =
   fmap fst $ withRequest method env sym opts $ \dbInfo ->
     case symbolTokens sym of
       Left err -> throwM $ ServerException err
-      Right req@(repo, lang, _toks) -> do
+      Right req@(repo, lang, _toks, _filters) -> do
         dbs <- getGleanRepos tracer sourceControl repoMapping dbInfo repo
           (Just lang) (requestOptions_revision opts)
           (dbChooser repo opts) gleanDB
@@ -340,9 +340,10 @@
   -> RepoMapping
   -> GleanDBInfo
   -> RepoName
+  -> Maybe Language
   -> IO [(Glean.Repo, GleanDBAttrName)]
-getLatestAttrDBs tracer scm repoMapping dbInfo repo =
-  fmap catMaybes $ forM (attrDBsForRepo repoMapping repo) $
+getLatestAttrDBs tracer scm repoMapping dbInfo repo mlanguage =
+  fmap catMaybes $ forM (attrDBsForRepo repoMapping repo mlanguage) $
     \attrDBName -> do
       dbs <- chooseGleanDBs tracer scm dbInfo ChooseLatest
         [gleanAttrDBName attrDBName]
diff --git a/glean/glass/Glean/Glass/Logging.hs b/glean/glass/Glean/Glass/Logging.hs
--- a/glean/glass/Glean/Glass/Logging.hs
+++ b/glean/glass/Glean/Glass/Logging.hs
@@ -67,16 +67,24 @@
     Logger.setExactRevision requestOptions_exact_revision <>
     Logger.setMatchingRevision requestOptions_matching_revision <>
     Logger.setContentCheck requestOptions_content_check <>
+    logRequest requestOptions_client_info <>
     logRequest requestOptions_feature_flags <>
     logRequest requestOptions_attribute_opts
 
+instance LogRequest ClientInfo where
+  logRequest ClientInfo{..} = mconcat
+    [ maybe mempty Logger.setClientUnixname clientInfo_unixname
+    , maybe mempty Logger.setClientApplication clientInfo_application
+    , maybe mempty Logger.setClientName clientInfo_name
+    ]
+
 instance LogRequest AttributeOptions where
   logRequest AttributeOptions{..} =
-    Logger.setAttributeOptions $ textShow $ Thrift.serializeJSON AttributeOptions{..}
+    Logger.setAttributeOptions $ textShow $
+      Thrift.serializeJSON AttributeOptions{..}
 
 instance LogRequest FeatureFlags where
-  logRequest FeatureFlags{..} =
-    maybe mempty Logger.setIncludeXlangXrefs featureFlags_include_xlang_refs
+  logRequest FeatureFlags{} = mempty
 
 instance LogRequest DocumentSymbolsRequest where
   logRequest = logDocumentSymbolsRequestSG Logger.setFilepath Logger.setRepo
diff --git a/glean/glass/Glean/Glass/Main.hs b/glean/glass/Glean/Glass/Main.hs
--- a/glean/glass/Glean/Glass/Main.hs
+++ b/glean/glass/Glean/Glass/Main.hs
@@ -16,6 +16,7 @@
 
 import Control.Concurrent (myThreadId)
 import Control.Trace (traceMsg, (>$<))
+import Data.Default (def)
 import Data.Hashable (hash)
 import Data.List (stripPrefix)
 import Facebook.Service ( runFacebookService' )
@@ -57,7 +58,7 @@
 
 import Glean.Glass.Types
   ( GlassException (GlassException, glassException_reasons),
-    GlassExceptionReason (..))
+    GlassExceptionReason (..), RequestOptions)
 import Glean.Glass.Env (Env'(tracer), Env)
 import Glean.Glass.Tracer ( isTracingEnabled )
 import Glean.Glass.Handler.Cxx as Cxx
@@ -103,7 +104,7 @@
   withLatestRepos backend scm (Just logger)
     (if isRemote gleanService then listDatabasesRetry else Nothing) refreshFreq
     $ \latestGleanRepos -> do
-      repoMapping <- getRepoMapping
+      repoMapping <- getRepoMapping def
       f Glass.Env
         { gleanBackend = Some backend
         , gleanDB = gleanDB
@@ -146,9 +147,9 @@
 assignHeaders _ _ = []
 
 -- | Perform an operation with the latest RepoMapping
-withCurrentRepoMapping :: Glass.Env -> (Glass.Env -> IO a) -> IO a
-withCurrentRepoMapping env0 fn = do
-  current <- getRepoMapping
+withCurrentRepoMapping :: RequestOptions -> Glass.Env -> (Glass.Env -> IO a) -> IO a
+withCurrentRepoMapping opts env0 fn = do
+  current <- getRepoMapping opts
   fn (env0 { Glass.repoMapping = current })
 
 withRequestTracing :: Env' GlassTraceWithId -> (Env -> IO b) -> IO b
@@ -167,6 +168,22 @@
       Just n | [(i, "")] <- reads n -> i
       _ -> hash tid -- should be unreachable
 
+getOptsFromCommand :: GlassServiceCommand r -> RequestOptions
+getOptsFromCommand cmd = case cmd of
+  SuperFacebookService _ -> def
+  DocumentSymbolListX _ opts -> opts
+  DocumentSymbolIndex _ opts -> opts
+  FindReferenceRanges _ opts -> opts
+  DescribeSymbol _ opts -> opts
+  SymbolLocation _ opts -> opts
+  ResolveSymbols _ opts -> opts
+  SearchSymbol _ opts -> opts
+  SearchRelated _ opts _ -> opts
+  SearchRelatedNeighborhood _ opts _ -> opts
+  FileIncludeLocations _ opts -> opts
+  ClangUSRToDefinition _ opts -> opts
+  UsrToDefinition _ opts -> opts
+
 -- Actual glass service handler, types from glass.thrift
 -- TODO: snapshot the env, rather than passing in the mutable fields
 --
@@ -174,7 +191,7 @@
 glassHandler env0 cmd =
   Glass.withAllocationLimit env0 $
   withRequestTracing env0 $ \env1 ->
-  withCurrentRepoMapping env1 $ \env ->
+  withCurrentRepoMapping (getOptsFromCommand cmd) env1 $ \env ->
   tracing env $
   withTimeout $ case cmd of
   SuperFacebookService r -> fb303Handler (Glass.fb303 env) r
diff --git a/glean/glass/Glean/Glass/Pretty/Hack.hs b/glean/glass/Glean/Glass/Pretty/Hack.hs
--- a/glean/glass/Glean/Glass/Pretty/Hack.hs
+++ b/glean/glass/Glean/Glass/Pretty/Hack.hs
@@ -128,7 +128,7 @@
 
 data Abstract = Abstract | NotAbstract deriving Eq
 data Final = Final | NotFinal deriving Eq
-data Visibility = Public | Protected | Private | Internal
+data Visibility = Public | Protected | Private | Internal | ProtectedInternal
 data Static = Static | NotStatic deriving Eq
 data Async = Async | NotAsync deriving Eq
 data ModuleInternal = IsInternal | NotInternal deriving Eq
@@ -455,6 +455,7 @@
       Protected -> "protected"
       Private -> "private"
       Internal -> "internal"
+      ProtectedInternal -> "protected internal"
     when (static==Static) $ tell ["static"]
     when (readonlyThis==IsReadOnly) $ tell ["readonly"]
     when (async==Async) $ tell ["async"]
@@ -472,6 +473,7 @@
       Public -> "public"
       Protected -> "protected"
       Private -> "private"
+      ProtectedInternal -> "protected internal"
       Internal -> "internal"
     when (static==Static) $ tell ["static"]
 
@@ -680,6 +682,7 @@
   Hack.Visibility_Public -> Public
   Hack.Visibility_Protected -> Protected
   Hack.Visibility_Private -> Private
+  Hack.Visibility_ProtectedInternal -> ProtectedInternal
   Hack.Visibility_Internal -> Internal
   Hack.Visibility__UNKNOWN{} -> error "unexpected visibility"
 
diff --git a/glean/glass/Glean/Glass/Query.hs b/glean/glass/Glean/Glass/Query.hs
--- a/glean/glass/Glean/Glass/Query.hs
+++ b/glean/glass/Glean/Glass/Query.hs
@@ -14,6 +14,7 @@
     srcFile
   , fileInfo
   , fileDigests
+  , fileContent
 
   -- * Working with XRefs
   , fileEntityLocations
@@ -21,6 +22,7 @@
 
   -- * Finding references to declarations
   , findReferenceRangeSpan
+  , findReferenceRangeSpanByDef
 
   -- * Finding references for call hierarchy
   , findReferenceEntities
@@ -74,6 +76,13 @@
     field @"file" (string path)
   end
 
+fileContent :: Glean.IdOf Src.File -> Angle Text
+fileContent fileId =
+  var $ \content ->
+    content `where_` [
+      stmt $ predicate @Src.FileContent $ factId fileId .-> content
+    ]
+
 -- | Given a file id, look up the index of line endings
 --
 -- Line ending tables are needed to do line:col conversions, but we want to
@@ -150,6 +159,43 @@
         end
       )
     ]
+
+-- | Entity-based find-references returning native range or bytespan filtered by
+-- the referenced symbols being defined in the given file.
+findReferenceRangeSpanByDef
+  :: Angle Code.Entity
+  -> Text
+  -> Angle (Src.File, Code.RangeSpan)
+findReferenceRangeSpanByDef ent filename =
+  vars $ \(reffile :: Angle Src.File)
+    (rangespan :: Angle Code.RangeSpan)
+    (deffile :: Angle Src.File)
+    (xref :: Angle Code.XRefLocation)
+    (targetLoc :: Angle Code.Location) ->
+      Angle.tuple (reffile, rangespan) `where_` [
+        wild .= predicate @Code.EntityReferences (
+          rec $
+              field @"target" ent $
+              field @"file" (asPredicate reffile) $
+              field @"range" rangespan
+            end
+          )
+        , deffile .= predicate @Src.File (string filename)
+        , wild .= predicate @Code.FileEntityXRefLocations (
+            rec $
+              field @"file" (asPredicate reffile) $
+              field @"xref" xref $
+              field @"entity" ent
+            end
+          )
+        , xref .= rec (
+            field @"target" targetLoc $
+            field @"source" rangespan
+          end)
+        , targetLoc .= rec (
+            field @"file" (asPredicate deffile)
+          end)
+      ]
 
 generatedEntityToIdlEntity
   :: Angle Code.Entity
diff --git a/glean/glass/Glean/Glass/Query/Cxx.hs b/glean/glass/Glean/Glass/Query/Cxx.hs
--- a/glean/glass/Glean/Glass/Query/Cxx.hs
+++ b/glean/glass/Glean/Glass/Query/Cxx.hs
@@ -685,7 +685,7 @@
       fst <$> searchRecursiveWithLimit mlimit (ppXRefFileLocations traceQ)
   where
     -- arbitrary number of fact traces to be reasonable. More than 1. But
-    -- don't overwhelm things. c.f PPTrace { file = folly/Optional.h }
+    -- don't overwhelm things. c.f. PPTrace { file = folly/Optional.h }
     -- also the query gets quite large
     traceMaxLimit = 10
 
diff --git a/glean/glass/Glean/Glass/RepoMapping.hs b/glean/glass/Glean/Glass/RepoMapping.hs
--- a/glean/glass/Glean/Glass/RepoMapping.hs
+++ b/glean/glass/Glean/Glass/RepoMapping.hs
@@ -18,71 +18,28 @@
 
 import Data.Set (Set)
 import qualified Data.Set as Set
-import qualified Data.Map.Strict as Map
+import Data.Text(Text)
 
 import Glean.Glass.Base
   ( GleanDBName(..)
   , RepoMapping(..)
-  , GleanDBSelector(..)
   )
-import Glean.Glass.Types ( Language(..), RepoName(..) )
-import Data.Text(Text)
+import Glean.Glass.Types
+  ( RepoName(..)
+  , RequestOptions(..)
+  )
 
-getRepoMapping :: IO RepoMapping
-getRepoMapping = return RepoMapping
-  { gleanIndices = gleanIndices_
-  , gleanAttrIndices = Map.empty
-  }
+getRepoMapping :: RequestOptions -> IO RepoMapping
+getRepoMapping _ = return AutoRepoMapping
 
 fixedRepoMapping :: RepoMapping
-fixedRepoMapping = RepoMapping
-  { gleanIndices = gleanIndices_
-  , gleanAttrIndices = Map.empty
-  }
-
--- example: the open source react repo.
-gleanIndices_ :: Map.Map RepoName [GleanDBSelector]
-gleanIndices_ = Map.fromList
-  -- demo
-  [ ( RepoName "react",
-      [ GleanDBSelector
-        { dbName = "react"
-        , language = Language_JavaScript
-        , branchName = Nothing
-        }
-      ]
-    )
-  -- for running tests with locally-indexed repos:
-  , ( RepoName "test",
-      [ testSelector Language_JavaScript
-      , testSelector Language_Hack
-      , testSelector Language_Haskell
-      , testSelector Language_Cpp
-      , testSelector Language_PreProcessor
-      , testSelector Language_Python
-      , testSelector Language_Thrift
-      , testSelector Language_Buck
-      , testSelector Language_Go
-      , testSelector Language_TypeScript
-      , testSelector Language_Rust
-      , testSelector Language_Java
-      , testSelector Language_Swift
-      ]
-    )
-  ]
-  where
-    testSelector language =
-      GleanDBSelector
-        { dbName = "test"
-        , language = language
-        , branchName = Nothing
-        }
+fixedRepoMapping = AutoRepoMapping
 
 -- | All the Glean db repo names we're aware of
--- We will only be able to query members of this set
-allGleanRepos :: Set GleanDBName
-allGleanRepos = Set.fromList $
-  map dbName (concat (Map.elems gleanIndices_))
+-- We will only be able to query members of this set.
+-- 'Nothing' means all existing Glean DBs can be used.
+allGleanRepos :: Maybe (Set GleanDBName)
+allGleanRepos = Nothing
 
 -- repos that are required
 gleanRequiredIndices :: Set.Set GleanDBName
diff --git a/glean/glass/Glean/Glass/Repos.hs b/glean/glass/Glean/Glass/Repos.hs
--- a/glean/glass/Glean/Glass/Repos.hs
+++ b/glean/glass/Glean/Glass/Repos.hs
@@ -104,6 +104,7 @@
 
 -- return a RepoName if indexed by glean
 toRepoName :: RepoMapping -> Text -> Maybe RepoName
+toRepoName AutoRepoMapping repo = Just (RepoName repo)
 toRepoName RepoMapping{..} repo =
   case Map.lookup repoName gleanIndices of
     Just _ -> Just repoName
@@ -112,9 +113,15 @@
     repoName = RepoName repo
 
 -- | Additional metadata about files and methods in attribute dbs
-attrDBsForRepo :: RepoMapping -> RepoName -> [GleanDBAttrName]
-attrDBsForRepo RepoMapping{..} repo =
-  Map.findWithDefault [] repo gleanAttrIndices
+attrDBsForRepo ::
+  RepoMapping -> RepoName -> Maybe Language -> [GleanDBAttrName]
+attrDBsForRepo AutoRepoMapping _ _ = []
+attrDBsForRepo RepoMapping{..} repo mlanguage =
+  case mlanguage of
+    Just language ->
+      Map.findWithDefault [] (repo, language) gleanAttrIndices
+    Nothing ->
+      []
 
 -- | Expand generic string search request parameters into a set of candidate
 -- GleanDBs, grouped by logical SCM repo or corpus.
@@ -145,6 +152,12 @@
   -> Maybe RepoName
   -> Set Language
   -> Either Text (Map.Map RepoName (Set GleanDBName))
+selectGleanDBs AutoRepoMapping (Just repoName) _langs =
+  Right (
+    Map.singleton repoName (
+      Set.singleton (GleanDBName (unRepoName repoName))))
+selectGleanDBs AutoRepoMapping Nothing _langs =
+  Right Map.empty
 selectGleanDBs repoMapping mRepoName langs0 =
   case map flatten (filter matches candidates) of
     [] -> Left err
@@ -182,6 +195,7 @@
 -- | Select universe of glean repo,(db/language) pairs.
 -- Either just the test dbs, or all the non-test dbs.
 listGleanIndices :: RepoMapping -> Bool -> [(RepoName, GleanDBSelector)]
+listGleanIndices AutoRepoMapping _ = [] -- handled earlier
 listGleanIndices RepoMapping{..} testsOnly =
   let testRepos = [RepoName "test", RepoName "test-xlang"]
       flatten (repo,langs) = map (repo,) langs
@@ -199,6 +213,8 @@
   -> Maybe (Text -> IO Bool)
   -> Maybe Language
   -> IO [GleanDBName]
+fromSCSRepo AutoRepoMapping repo _branchFilter _mLanguage =
+  return [GleanDBName (unRepoName repo)]
 fromSCSRepo RepoMapping{..} repo branchFilter mLanguage
   | Just rs <- Map.lookup repo gleanIndices = do
     let filteredByLang = filterByLanguage mLanguage rs
@@ -267,6 +283,8 @@
   | is "TARGETS"  = Just Language_Buck
   | is "BUCK"  = Just Language_Buck
   | is ".bzl"  = Just Language_Buck
+  | is ".bxl"  = Just Language_Buck
+  | is ".sky"  = Just Language_Buck
 
   | is ".cs"  = Just Language_CSharp
   | is ".graphql"  = Just Language_GraphQL
@@ -279,7 +297,7 @@
     is a =  a `Text.isSuffixOf` file
 
 --
--- Operating on the latest repo statea
+-- Operating on the latest repo state
 --
 
 -- | Fetch all latest dbs we care for
@@ -295,7 +313,7 @@
     go :: Maybe Int -> IO GleanDBInfo
     go n = do
       latest <- Glean.getLatestRepos backend $ \name ->
-        GleanDBName name `Set.member` Mapping.allGleanRepos
+        maybe True (GleanDBName name `Set.member`) Mapping.allGleanRepos
 
       -- Filter unavailable DBs using hasDatabase. Glean.getLatestRepos does
       -- this for latestRepos but not allLatestRepos, in that case it's up to
@@ -317,21 +335,16 @@
             , scmRevisions = scmRevisions
             , dbByRevision = getDbByRevision dbs scmRevisions
             }
-      if required `Set.isSubsetOf` advertised
-        then return info
-        else do
+          required = Set.map unGleanDBName Mapping.gleanRequiredIndices
+          missing = required `Set.difference` advertised
+      if
+        | not (Set.null missing), Just m <- n, m > 1 -> do
           -- some required dbs are missing! this is transient? and bad
           -- in prod/full service mode this would be bad
-          let missing = required `Set.difference` advertised
+          -- if no retries allowed, give up
           logIt mlogger dbs missing n backend
-          case n of
-            Just n
-              | n > 1 -> do {- i.e. try more than 1 time -}
-                delay (seconds 1) >> go (Just (n-1))
-
-            _ -> return info -- if no retries allowed, give up
-
-    required = Set.map unGleanDBName Mapping.gleanRequiredIndices
+          delay (seconds 1) >> go (Just (m-1))
+        | otherwise -> return info
 
 -- | Log an entry in glean_glass_server_error_events if a logger is available,
 -- and locally (e.g. to stderr). Do not log otherwise (e.g. in test mode).
diff --git a/glean/glass/Glean/Glass/SymbolId.hs b/glean/glass/Glean/Glass/SymbolId.hs
--- a/glean/glass/Glean/Glass/SymbolId.hs
+++ b/glean/glass/Glean/Glass/SymbolId.hs
@@ -43,7 +43,7 @@
   ,nativeSymbol) where
 
 import Control.Monad.Catch ( throwM, try )
-import Data.Maybe ( fromMaybe )
+import Data.Maybe ( fromMaybe, mapMaybe )
 import Data.Tuple ( swap )
 import Util.Text ( textShow )
 import Data.Text ( Text )
@@ -59,7 +59,8 @@
       Language(..),
       SymbolId(SymbolId),
       RepoName(..),
-      Name, )
+      Name,
+      SymbolFilter(..) )
 
 import Glean.Angle ( alt, Angle )
 import qualified Glean.Haxl.Repos as Glean
@@ -74,6 +75,7 @@
 import Glean.Glass.SymbolId.Angle ({- instances -})
 import Glean.Glass.SymbolId.Buck ({- instances -})
 import Glean.Glass.SymbolId.Cxx ({- instances -})
+import Glean.Glass.SymbolId.Chef ({- instances -})
 import Glean.Glass.SymbolId.Erlang ({- instances -})
 import Glean.Glass.SymbolId.Fbthrift ({- instances -})
 import Glean.Glass.SymbolId.Flow ({- instances -})
@@ -108,11 +110,12 @@
 -- If we can't encode the entity, it is still useful to return the path and
 -- file, as this is enough to navigate with.
 --
--- Symbol IDs have 3 parts:
+-- Symbol IDs have 3 fixed parts and 1 optional part:
 --
 -- - scm repo (corpus in biggrep term), e.g. "fbsource"
 -- - language short code (e.g py or php or cpp)
 -- - entity encoding
+-- - [optional] filters as defined in the thrift schema
 --
 -- We uri encode the pieces and separate with / so they look like nice urls
 --
@@ -164,22 +167,39 @@
     Right (_, qualifiedName_container) -> Just qualifiedName_container
     Left _ -> Nothing
 
+parseFilter :: Text -> Maybe SymbolFilter
+parseFilter f = case Text.splitOn "=" f of
+  [k, v] -> case k of
+    "definition_file" -> Just (SymbolFilter_definition_file v)
+    _ -> Nothing
+  _ -> Nothing
+
+parseFilters :: Text -> [SymbolFilter]
+parseFilters = mapMaybe parseFilter . Text.split (=='&')
+
 -- | Tokenize a symbol (inverse of the intercalate "/")
 -- Leaves the path/qname/syms for further search.
-symbolTokens :: SymbolId -> Either Text (RepoName, Language, [Text])
+symbolTokens
+  :: SymbolId
+  -> Either Text (RepoName, Language, [Text], [SymbolFilter])
 symbolTokens (SymbolId symid)
   | (repo: code: pieces) <- tokens
   , Just lang <- fromShortCode code
-  = Right (RepoName repo, lang, map URI.decodeText pieces)
+  = Right (RepoName repo, lang, map URI.decodeText pieces, filters)
   | otherwise = Left $ "Invalid symbol: " <> symid
   where
-    tokens = Text.split (=='/') symid
+    (ident, filters) = case Text.split (=='?') symid of
+      [identOnly] -> (identOnly, [])
+      [identPart, filtersPart] -> (identPart, parseFilters filtersPart)
+      _ -> (symid, [])
+    tokens = Text.split (=='/') ident
 
 -- | SymbolID-encoded language, used for db name lookups
 shortCodeTable :: [(Language,Text)]
 shortCodeTable =
   [ (Language_Angle , "angle")
   , (Language_Buck , "buck")
+  , (Language_Chef, "chef")
   , (Language_CSharp, "cs")
   , (Language_Cpp, "cpp")
   , (Language_Dataswarm, "dataswarm")
@@ -222,6 +242,7 @@
 entityLanguage e = case e of
   Code.Entity_angle{} -> Language_Angle
   Code.Entity_buck{} -> Language_Buck
+  Code.Entity_chef{} -> Language_Chef
   Code.Entity_csharp{} -> Language_CSharp
   Code.Entity_cxx{} -> Language_Cpp
   Code.Entity_erlang{} -> Language_Erlang
@@ -247,6 +268,17 @@
   Code.Entity_scip Scip.Entity_java{} -> Language_Java
   Code.Entity_scip Scip.Entity_kotlin{} -> Language_Kotlin
   Code.Entity_scip Scip.Entity_swift{} -> Language_Swift
+  Code.Entity_scip Scip.Entity_python{} -> Language_Python
+  Code.Entity_scip Scip.Entity_typescriptReact{} -> Language_TypeScriptReact
+  Code.Entity_scip Scip.Entity_javascript{} -> Language_JavaScript
+  Code.Entity_scip Scip.Entity_javascriptReact{} -> Language_JavaScriptReact
+  Code.Entity_scip Scip.Entity_c{} -> Language_C
+  Code.Entity_scip Scip.Entity_cpp{} -> Language_Cpp
+  Code.Entity_scip Scip.Entity_ruby{} -> Language_Ruby
+  Code.Entity_scip Scip.Entity_csharp{} -> Language_CSharp
+  Code.Entity_scip Scip.Entity_visualBasic{} -> Language_VisualBasic
+  Code.Entity_scip Scip.Entity_dart{} -> Language_Dart
+  Code.Entity_scip Scip.Entity_php{} -> Language_PHP
   Code.Entity_scip _ -> Language__UNKNOWN 0
   Code.Entity_EMPTY -> Language__UNKNOWN 0
 
@@ -256,8 +288,11 @@
 languageToCodeLang l = case l of
   Language_Angle -> Just Code.Language_Angle
   Language_Buck -> Just Code.Language_Buck
+  Language_C -> Just Code.Language_C
+  Language_Chef -> Just Code.Language_Chef
   Language_CSharp -> Just Code.Language_CSharp
   Language_Cpp -> Just Code.Language_Cpp
+  Language_Dart -> Just Code.Language_Dart
   Language_Dataswarm -> Just Code.Language_Dataswarm
   Language_Erlang -> Just Code.Language_Erlang
   Language_Go -> Just Code.Language_Go
@@ -266,14 +301,19 @@
   Language_Haskell -> Just Code.Language_Haskell
   Language_Java -> Just Code.Language_Java
   Language_JavaScript -> Just Code.Language_JavaScript
+  Language_JavaScriptReact -> Just Code.Language_JavaScriptReact
   Language_Kotlin -> Just Code.Language_Kotlin
   Language_ObjectiveC -> Just Code.Language_Cpp -- we don't distinguish these
+  Language_PHP -> Just Code.Language_PHP
   Language_PreProcessor -> Just Code.Language_PreProcessor
   Language_Python -> Just Code.Language_Python
+  Language_Ruby -> Just Code.Language_Ruby
   Language_Rust -> Just Code.Language_Rust
   Language_Swift -> Just Code.Language_Swift
   Language_Thrift -> Just Code.Language_Thrift
   Language_TypeScript -> Just Code.Language_TypeScript
+  Language_TypeScriptReact -> Just Code.Language_TypeScriptReact
+  Language_VisualBasic -> Just Code.Language_VisualBasic
   Language_Yaml -> Just Code.Language_Yaml
   Language__UNKNOWN{} -> Nothing
 
@@ -300,6 +340,7 @@
     Code.Entity_csharp x -> toSymbolWithPath x p
     Code.Entity_cxx x -> toSymbolWithPath x p
     Code.Entity_buck x -> toSymbolWithPath x p
+    Code.Entity_chef x -> toSymbolWithPath x p
     Code.Entity_erlang x -> toSymbolWithPath x p
     Code.Entity_graphql x -> toSymbolWithPath x p
     Code.Entity_hs x -> toSymbolWithPath x p
@@ -329,6 +370,17 @@
       Scip.Entity_java se -> toSymbolWithPath se p
       Scip.Entity_kotlin se -> toSymbolWithPath se p
       Scip.Entity_swift se -> toSymbolWithPath se p
+      Scip.Entity_python se -> toSymbolWithPath se p
+      Scip.Entity_typescriptReact se -> toSymbolWithPath se p
+      Scip.Entity_javascript se -> toSymbolWithPath se p
+      Scip.Entity_javascriptReact se -> toSymbolWithPath se p
+      Scip.Entity_c se -> toSymbolWithPath se p
+      Scip.Entity_cpp se -> toSymbolWithPath se p
+      Scip.Entity_ruby se -> toSymbolWithPath se p
+      Scip.Entity_csharp se -> toSymbolWithPath se p
+      Scip.Entity_visualBasic se -> toSymbolWithPath se p
+      Scip.Entity_dart se -> toSymbolWithPath se p
+      Scip.Entity_php se -> toSymbolWithPath se p
       Scip.Entity_EMPTY -> throwM $ SymbolError "Unknown SCIP language"
 
     _ -> throwM $ SymbolError "Language not supported"
@@ -388,6 +440,19 @@
       Scip.Entity_java x -> Right $ alt @"java" (toAngle x)
       Scip.Entity_kotlin x -> Right $ alt @"kotlin" (toAngle x)
       Scip.Entity_swift x -> Right $ alt @"swift" (toAngle x)
+      Scip.Entity_python x -> Right $ alt @"python" (toAngle x)
+      Scip.Entity_typescriptReact x ->
+        Right $ alt @"typescriptReact" (toAngle x)
+      Scip.Entity_javascript x -> Right $ alt @"javascript" (toAngle x)
+      Scip.Entity_javascriptReact x ->
+        Right $ alt @"javascriptReact" (toAngle x)
+      Scip.Entity_c x -> Right $ alt @"c" (toAngle x)
+      Scip.Entity_cpp x -> Right $ alt @"cpp" (toAngle x)
+      Scip.Entity_ruby x -> Right $ alt @"ruby" (toAngle x)
+      Scip.Entity_csharp x -> Right $ alt @"csharp" (toAngle x)
+      Scip.Entity_visualBasic x -> Right $ alt @"visualBasic" (toAngle x)
+      Scip.Entity_dart x -> Right $ alt @"dart" (toAngle x)
+      Scip.Entity_php x -> Right $ alt @"php" (toAngle x)
       Scip.Entity_EMPTY -> Left "toAngle: Unknown SCIP language"
 
   _ -> Left $
@@ -397,6 +462,7 @@
   toQName e = case e of
     Code.Entity_angle x -> toQName x
     Code.Entity_buck x -> toQName x
+    Code.Entity_chef x -> toQName x
     Code.Entity_csharp x -> toQName x
     Code.Entity_cxx x -> toQName x
     Code.Entity_erlang x -> toQName x
@@ -423,13 +489,24 @@
       Lsif.Entity_swift x -> toQName x
       Lsif.Entity_typescript x -> toQName x
       Lsif.Entity_EMPTY -> pure $ Left "LSIF: language unsupported"
-    Code.Entity_scip se -> case se of -- enumerate all cases for lsif
+    Code.Entity_scip se -> case se of -- enumerate all cases for scip
       Scip.Entity_rust x -> toQName x
       Scip.Entity_go x -> toQName x
       Scip.Entity_typescript x -> toQName x
       Scip.Entity_java x -> toQName x
       Scip.Entity_kotlin x -> toQName x
       Scip.Entity_swift x -> toQName x
+      Scip.Entity_python x -> toQName x
+      Scip.Entity_typescriptReact x -> toQName x
+      Scip.Entity_javascript x -> toQName x
+      Scip.Entity_javascriptReact x -> toQName x
+      Scip.Entity_c x -> toQName x
+      Scip.Entity_cpp x -> toQName x
+      Scip.Entity_ruby x -> toQName x
+      Scip.Entity_csharp x -> toQName x
+      Scip.Entity_visualBasic x -> toQName x
+      Scip.Entity_dart x -> toQName x
+      Scip.Entity_php x -> toQName x
       Scip.Entity_EMPTY -> pure $ Left "SCIP: language unsupported"
     _ -> pure $ Left ("Language unsupported: " <> textShow (entityLanguage e))
 
diff --git a/glean/glass/Glean/Glass/SymbolId/Chef.hs b/glean/glass/Glean/Glass/SymbolId/Chef.hs
new file mode 100644
--- /dev/null
+++ b/glean/glass/Glean/Glass/SymbolId/Chef.hs
@@ -0,0 +1,44 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+{-# OPTIONS_GHC -Wno-orphans #-}
+
+module Glean.Glass.SymbolId.Chef (
+    {- instances and -}
+  ) where
+
+import qualified Glean
+import Glean.Glass.SymbolId.Class
+import Glean.Glass.Types (Name(..))
+import qualified Data.Text as T
+
+import qualified Glean.Schema.Chef.Types as Chef
+import Glean.Schema.CodeChef.Types as CodeChef
+    ( Entity(..) )
+
+
+instance Symbol CodeChef.Entity where
+  toSymbol e = case e of
+    CodeChef.Entity_symbol x -> toSymbolPredicate x
+    CodeChef.Entity_EMPTY -> return []
+
+instance Symbol Chef.Symbol_key where
+  toSymbol (Chef.Symbol_key identifier qualifiedName) = do
+    qNames <- mapM Glean.keyOf qualifiedName
+    name <- Glean.keyOf identifier
+    return $ qNames ++ [ name ]
+
+instance ToQName CodeChef.Entity where
+  toQName e = case e of
+    CodeChef.Entity_symbol definition -> do
+      Chef.Symbol_key identifier qNameList <- Glean.keyOf definition
+      qNameText <- mapM Glean.keyOf qNameList
+      let path = T.intercalate "::" qNameText
+      name <- Glean.keyOf identifier
+      return (Right (Name name, Name path))
+    CodeChef.Entity_EMPTY -> pure $ Left "ToQName: Unknown Chef entity"
diff --git a/glean/glass/Glean/Glass/SymbolSig.hs b/glean/glass/Glean/Glass/SymbolSig.hs
--- a/glean/glass/Glean/Glass/SymbolSig.hs
+++ b/glean/glass/Glean/Glass/SymbolSig.hs
@@ -147,6 +147,17 @@
       Scip.Entity_java x -> SCIP.prettyScipSignature opts x
       Scip.Entity_kotlin x -> SCIP.prettyScipSignature opts x
       Scip.Entity_swift x -> SCIP.prettyScipSignature opts x
+      Scip.Entity_python x -> SCIP.prettyScipSignature opts x
+      Scip.Entity_typescriptReact x -> SCIP.prettyScipSignature opts x
+      Scip.Entity_javascript x -> SCIP.prettyScipSignature opts x
+      Scip.Entity_javascriptReact x -> SCIP.prettyScipSignature opts x
+      Scip.Entity_c x -> SCIP.prettyScipSignature opts x
+      Scip.Entity_cpp x -> SCIP.prettyScipSignature opts x
+      Scip.Entity_ruby x -> SCIP.prettyScipSignature opts x
+      Scip.Entity_csharp x -> SCIP.prettyScipSignature opts x
+      Scip.Entity_visualBasic x -> SCIP.prettyScipSignature opts x
+      Scip.Entity_dart x -> SCIP.prettyScipSignature opts x
+      Scip.Entity_php x -> SCIP.prettyScipSignature opts x
       Scip.Entity_EMPTY -> pure Nothing
     -- lsif languages, just enumerate completely to stay total
     Code.Entity_lsif e -> case e of
diff --git a/glean/glass/if/glass/gen-hs2/Glean/Glass/Types.hs b/glean/glass/if/glass/gen-hs2/Glean/Glass/Types.hs
--- a/glean/glass/if/glass/gen-hs2/Glean/Glass/Types.hs
+++ b/glean/glass/if/glass/gen-hs2/Glean/Glass/Types.hs
@@ -35,24 +35,36 @@
                          attributeOptions_fetch_frame_matches,
                          attributeOptions_fetch_assembly_data,
                          attributeOptions_fetch_strobelight_frames,
-                         attributeOptions_fetch_default_view),
+                         attributeOptions_fetch_default_view, attributeOptions_package_name,
+                         attributeOptions_use_binary_for_default_view,
+                         attributeOptions_use_customized_parameters,
+                         attributeOptions_fetch_memory,
+                         attributeOptions_use_file_path_mapping,
+                         attributeOptions_fetch_ds_mapping),
         ServiceID(ServiceID, unServiceID),
         BinaryName(BinaryName, unBinaryName),
+        PackageName(PackageName, unPackageName),
+        ClientInfo(ClientInfo, clientInfo_name, clientInfo_unixname,
+                   clientInfo_application),
         RequestOptions(RequestOptions, requestOptions_revision,
                        requestOptions_limit, requestOptions_feature_flags,
                        requestOptions_strict, requestOptions_exact_revision,
                        requestOptions_content_check, requestOptions_matching_revision,
-                       requestOptions_attribute_opts),
-        FeatureFlags(FeatureFlags, featureFlags_include_xlang_refs),
+                       requestOptions_attribute_opts, requestOptions_client_info),
+        FeatureFlags(FeatureFlags,
+                     featureFlags_amend_lines_on_revision_mismatch,
+                     featureFlags_use_pyrefly_indexer_for_instagram_server),
         DocumentSymbolsRequest(DocumentSymbolsRequest,
                                documentSymbolsRequest_repository, documentSymbolsRequest_filepath,
                                documentSymbolsRequest_range, documentSymbolsRequest_include_refs,
-                               documentSymbolsRequest_include_xlang_refs),
+                               documentSymbolsRequest_include_xlang_refs,
+                               documentSymbolsRequest_include_content),
+        SymbolFilter(SymbolFilter_EMPTY, SymbolFilter_definition_file),
         SymbolId(SymbolId, unSymbolId),
         Attribute(Attribute_EMPTY, Attribute_aBool, Attribute_aInteger,
                   Attribute_aDouble, Attribute_aString, Attribute_aList,
                   Attribute_aMapIntDouble, Attribute_aMapIntString,
-                  Attribute_aMapStringDouble),
+                  Attribute_aMapStringDouble, Attribute_aMapIntListString),
         Attributes(Attributes, unAttributes),
         KeyedAttribute(KeyedAttribute, keyedAttribute_key,
                        keyedAttribute_attribute),
@@ -76,13 +88,15 @@
                                   documentSymbolListXResult_digest,
                                   documentSymbolListXResult_referenced_file_digests,
                                   documentSymbolListXResult_content_match,
-                                  documentSymbolListXResult_attributes),
+                                  documentSymbolListXResult_attributes,
+                                  documentSymbolListXResult_content),
         DocumentSymbolIndex(DocumentSymbolIndex,
                             documentSymbolIndex_symbols, documentSymbolIndex_revision,
                             documentSymbolIndex_size, documentSymbolIndex_truncated,
                             documentSymbolIndex_digest,
                             documentSymbolIndex_referenced_file_digests,
-                            documentSymbolIndex_content_match, documentSymbolIndex_attributes),
+                            documentSymbolIndex_content_match, documentSymbolIndex_attributes,
+                            documentSymbolIndex_content),
         ServerException(ServerException, serverException_message),
         GlassExceptionReason(GlassExceptionReason_EMPTY,
                              GlassExceptionReason_noSrcFileFact,
@@ -150,7 +164,9 @@
                  Language_Rust, Language_Buck, Language_Erlang, Language_TypeScript,
                  Language_Go, Language_Kotlin, Language_CSharp, Language_GraphQL,
                  Language_Dataswarm, Language_Yaml, Language_Swift, Language_Angle,
-                 Language__UNKNOWN),
+                 Language_Chef, Language_Ruby, Language_C, Language_VisualBasic,
+                 Language_PHP, Language_Dart, Language_TypeScriptReact,
+                 Language_JavaScriptReact, Language__UNKNOWN),
         DefinitionKind(DefinitionKind_Definition,
                        DefinitionKind_Declaration, DefinitionKind__UNKNOWN),
         SymbolSearchOptions(SymbolSearchOptions,
@@ -1007,7 +1023,14 @@
                                          attributeOptions_fetch_frame_matches :: Prelude.Bool,
                                          attributeOptions_fetch_assembly_data :: Prelude.Bool,
                                          attributeOptions_fetch_strobelight_frames :: Prelude.Bool,
-                                         attributeOptions_fetch_default_view :: Prelude.Bool}
+                                         attributeOptions_fetch_default_view :: Prelude.Bool,
+                                         attributeOptions_package_name :: Prelude.Maybe PackageName,
+                                         attributeOptions_use_binary_for_default_view ::
+                                         Prelude.Bool,
+                                         attributeOptions_use_customized_parameters :: Prelude.Bool,
+                                         attributeOptions_fetch_memory :: Prelude.Bool,
+                                         attributeOptions_use_file_path_mapping :: Prelude.Bool,
+                                         attributeOptions_fetch_ds_mapping :: Prelude.Bool}
                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
 
 instance Aeson.ToJSON AttributeOptions where
@@ -1015,7 +1038,10 @@
     (AttributeOptions __field__fetch_per_line_data __field__revision
        __field__service_id __field__binary_name
        __field__fetch_frame_matches __field__fetch_assembly_data
-       __field__fetch_strobelight_frames __field__fetch_default_view)
+       __field__fetch_strobelight_frames __field__fetch_default_view
+       __field__package_name __field__use_binary_for_default_view
+       __field__use_customized_parameters __field__fetch_memory
+       __field__use_file_path_mapping __field__fetch_ds_mapping)
     = Aeson.object
         ("fetch_per_line_data" .= __field__fetch_per_line_data :
            Prelude.maybe Prelude.id ((:) . ("revision" .=))
@@ -1028,14 +1054,26 @@
                       "fetch_assembly_data" .= __field__fetch_assembly_data :
                         "fetch_strobelight_frames" .= __field__fetch_strobelight_frames :
                           "fetch_default_view" .= __field__fetch_default_view :
-                            Prelude.mempty))))
+                            Prelude.maybe Prelude.id ((:) . ("package_name" .=))
+                              (Prelude.fmap unPackageName __field__package_name)
+                              ("use_binary_for_default_view" .=
+                                 __field__use_binary_for_default_view
+                                 :
+                                 "use_customized_parameters" .= __field__use_customized_parameters :
+                                   "fetch_memory" .= __field__fetch_memory :
+                                     "use_file_path_mapping" .= __field__use_file_path_mapping :
+                                       "fetch_ds_mapping" .= __field__fetch_ds_mapping :
+                                         Prelude.mempty)))))
 
 instance Thrift.ThriftStruct AttributeOptions where
   buildStruct _proxy
     (AttributeOptions __field__fetch_per_line_data __field__revision
        __field__service_id __field__binary_name
        __field__fetch_frame_matches __field__fetch_assembly_data
-       __field__fetch_strobelight_frames __field__fetch_default_view)
+       __field__fetch_strobelight_frames __field__fetch_default_view
+       __field__package_name __field__use_binary_for_default_view
+       __field__use_customized_parameters __field__fetch_memory
+       __field__use_file_path_mapping __field__fetch_ds_mapping)
     = Thrift.genStruct _proxy
         (Thrift.genFieldBool _proxy "fetch_per_line_data" 1 0
            __field__fetch_per_line_data
@@ -1089,7 +1127,40 @@
                                 :
                                 Thrift.genFieldBool _proxy "fetch_default_view" 8 7
                                   __field__fetch_default_view
-                                  : []))))
+                                  :
+                                  let (__cereal__package_name, __id__package_name)
+                                        = case __field__package_name of
+                                            Prelude.Just _val -> ((:)
+                                                                    (Thrift.genField _proxy
+                                                                       "package_name"
+                                                                       (Thrift.getStringType _proxy)
+                                                                       9
+                                                                       8
+                                                                       ((Thrift.genText _proxy .
+                                                                           unPackageName)
+                                                                          _val)),
+                                                                  9)
+                                            Prelude.Nothing -> (Prelude.id, 8)
+                                    in
+                                    __cereal__package_name
+                                      (Thrift.genFieldBool _proxy "use_binary_for_default_view" 10
+                                         __id__package_name
+                                         __field__use_binary_for_default_view
+                                         :
+                                         Thrift.genFieldBool _proxy "use_customized_parameters" 11
+                                           10
+                                           __field__use_customized_parameters
+                                           :
+                                           Thrift.genFieldBool _proxy "fetch_memory" 12 11
+                                             __field__fetch_memory
+                                             :
+                                             Thrift.genFieldBool _proxy "use_file_path_mapping" 13
+                                               12
+                                               __field__use_file_path_mapping
+                                               :
+                                               Thrift.genFieldBool _proxy "fetch_ds_mapping" 14 13
+                                                 __field__fetch_ds_mapping
+                                                 : [])))))
   parseStruct _proxy
     = ST.runSTT
         (do Prelude.return ()
@@ -1101,6 +1172,12 @@
             __field__fetch_assembly_data <- ST.newSTRef Prelude.False
             __field__fetch_strobelight_frames <- ST.newSTRef Prelude.False
             __field__fetch_default_view <- ST.newSTRef Prelude.False
+            __field__package_name <- ST.newSTRef Prelude.Nothing
+            __field__use_binary_for_default_view <- ST.newSTRef Prelude.False
+            __field__use_customized_parameters <- ST.newSTRef Prelude.False
+            __field__fetch_memory <- ST.newSTRef Prelude.False
+            __field__use_file_path_mapping <- ST.newSTRef Prelude.False
+            __field__fetch_ds_mapping <- ST.newSTRef Prelude.False
             let
               _parse _lastId
                 = do _fieldBegin <- Trans.lift
@@ -1190,6 +1267,67 @@
                                                                         ST.writeSTRef
                                                                           __field__fetch_default_view
                                                                           _val
+                                                                 9 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.fmap
+                                                                                      PackageName
+                                                                                      (Thrift.parseText
+                                                                                         _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__package_name
+                                                                          (Prelude.Just _val)
+                                                                 10 | _type ==
+                                                                        Thrift.getBoolType _proxy
+                                                                      ->
+                                                                      do !_val <- Trans.lift
+                                                                                    (Thrift.parseBoolF
+                                                                                       _proxy
+                                                                                       _bool)
+                                                                         ST.writeSTRef
+                                                                           __field__use_binary_for_default_view
+                                                                           _val
+                                                                 11 | _type ==
+                                                                        Thrift.getBoolType _proxy
+                                                                      ->
+                                                                      do !_val <- Trans.lift
+                                                                                    (Thrift.parseBoolF
+                                                                                       _proxy
+                                                                                       _bool)
+                                                                         ST.writeSTRef
+                                                                           __field__use_customized_parameters
+                                                                           _val
+                                                                 12 | _type ==
+                                                                        Thrift.getBoolType _proxy
+                                                                      ->
+                                                                      do !_val <- Trans.lift
+                                                                                    (Thrift.parseBoolF
+                                                                                       _proxy
+                                                                                       _bool)
+                                                                         ST.writeSTRef
+                                                                           __field__fetch_memory
+                                                                           _val
+                                                                 13 | _type ==
+                                                                        Thrift.getBoolType _proxy
+                                                                      ->
+                                                                      do !_val <- Trans.lift
+                                                                                    (Thrift.parseBoolF
+                                                                                       _proxy
+                                                                                       _bool)
+                                                                         ST.writeSTRef
+                                                                           __field__use_file_path_mapping
+                                                                           _val
+                                                                 14 | _type ==
+                                                                        Thrift.getBoolType _proxy
+                                                                      ->
+                                                                      do !_val <- Trans.lift
+                                                                                    (Thrift.parseBoolF
+                                                                                       _proxy
+                                                                                       _bool)
+                                                                         ST.writeSTRef
+                                                                           __field__fetch_ds_mapping
+                                                                           _val
                                                                  _ -> Trans.lift
                                                                         (Thrift.parseSkip _proxy
                                                                            _type
@@ -1209,6 +1347,18 @@
                                                                                    __field__fetch_strobelight_frames
                                              !__val__fetch_default_view <- ST.readSTRef
                                                                              __field__fetch_default_view
+                                             !__val__package_name <- ST.readSTRef
+                                                                       __field__package_name
+                                             !__val__use_binary_for_default_view <- ST.readSTRef
+                                                                                      __field__use_binary_for_default_view
+                                             !__val__use_customized_parameters <- ST.readSTRef
+                                                                                    __field__use_customized_parameters
+                                             !__val__fetch_memory <- ST.readSTRef
+                                                                       __field__fetch_memory
+                                             !__val__use_file_path_mapping <- ST.readSTRef
+                                                                                __field__use_file_path_mapping
+                                             !__val__fetch_ds_mapping <- ST.readSTRef
+                                                                           __field__fetch_ds_mapping
                                              Prelude.pure
                                                (AttributeOptions __val__fetch_per_line_data
                                                   __val__revision
@@ -1217,13 +1367,22 @@
                                                   __val__fetch_frame_matches
                                                   __val__fetch_assembly_data
                                                   __val__fetch_strobelight_frames
-                                                  __val__fetch_default_view)
+                                                  __val__fetch_default_view
+                                                  __val__package_name
+                                                  __val__use_binary_for_default_view
+                                                  __val__use_customized_parameters
+                                                  __val__fetch_memory
+                                                  __val__use_file_path_mapping
+                                                  __val__fetch_ds_mapping)
               _idMap
                 = HashMap.fromList
                     [("fetch_per_line_data", 1), ("revision", 2), ("service_id", 3),
                      ("binary_name", 4), ("fetch_frame_matches", 5),
                      ("fetch_assembly_data", 6), ("fetch_strobelight_frames", 7),
-                     ("fetch_default_view", 8)]
+                     ("fetch_default_view", 8), ("package_name", 9),
+                     ("use_binary_for_default_view", 10),
+                     ("use_customized_parameters", 11), ("fetch_memory", 12),
+                     ("use_file_path_mapping", 13), ("fetch_ds_mapping", 14)]
             _parse 0)
 
 instance DeepSeq.NFData AttributeOptions where
@@ -1231,7 +1390,10 @@
     (AttributeOptions __field__fetch_per_line_data __field__revision
        __field__service_id __field__binary_name
        __field__fetch_frame_matches __field__fetch_assembly_data
-       __field__fetch_strobelight_frames __field__fetch_default_view)
+       __field__fetch_strobelight_frames __field__fetch_default_view
+       __field__package_name __field__use_binary_for_default_view
+       __field__use_customized_parameters __field__fetch_memory
+       __field__use_file_path_mapping __field__fetch_ds_mapping)
     = DeepSeq.rnf __field__fetch_per_line_data `Prelude.seq`
         DeepSeq.rnf __field__revision `Prelude.seq`
           DeepSeq.rnf __field__service_id `Prelude.seq`
@@ -1239,7 +1401,13 @@
               DeepSeq.rnf __field__fetch_frame_matches `Prelude.seq`
                 DeepSeq.rnf __field__fetch_assembly_data `Prelude.seq`
                   DeepSeq.rnf __field__fetch_strobelight_frames `Prelude.seq`
-                    DeepSeq.rnf __field__fetch_default_view `Prelude.seq` ()
+                    DeepSeq.rnf __field__fetch_default_view `Prelude.seq`
+                      DeepSeq.rnf __field__package_name `Prelude.seq`
+                        DeepSeq.rnf __field__use_binary_for_default_view `Prelude.seq`
+                          DeepSeq.rnf __field__use_customized_parameters `Prelude.seq`
+                            DeepSeq.rnf __field__fetch_memory `Prelude.seq`
+                              DeepSeq.rnf __field__use_file_path_mapping `Prelude.seq`
+                                DeepSeq.rnf __field__fetch_ds_mapping `Prelude.seq` ()
 
 instance Default.Default AttributeOptions where
   def
@@ -1249,12 +1417,20 @@
         Prelude.False
         Prelude.False
         Prelude.False
+        Prelude.Nothing
+        Prelude.False
+        Prelude.False
+        Prelude.False
+        Prelude.False
+        Prelude.False
 
 instance Hashable.Hashable AttributeOptions where
   hashWithSalt __salt
     (AttributeOptions _fetch_per_line_data _revision _service_id
        _binary_name _fetch_frame_matches _fetch_assembly_data
-       _fetch_strobelight_frames _fetch_default_view)
+       _fetch_strobelight_frames _fetch_default_view _package_name
+       _use_binary_for_default_view _use_customized_parameters
+       _fetch_memory _use_file_path_mapping _fetch_ds_mapping)
     = Hashable.hashWithSalt
         (Hashable.hashWithSalt
            (Hashable.hashWithSalt
@@ -1262,14 +1438,26 @@
                  (Hashable.hashWithSalt
                     (Hashable.hashWithSalt
                        (Hashable.hashWithSalt
-                          (Hashable.hashWithSalt __salt _fetch_per_line_data)
-                          _revision)
-                       _service_id)
-                    _binary_name)
-                 _fetch_frame_matches)
-              _fetch_assembly_data)
-           _fetch_strobelight_frames)
-        _fetch_default_view
+                          (Hashable.hashWithSalt
+                             (Hashable.hashWithSalt
+                                (Hashable.hashWithSalt
+                                   (Hashable.hashWithSalt
+                                      (Hashable.hashWithSalt
+                                         (Hashable.hashWithSalt
+                                            (Hashable.hashWithSalt __salt _fetch_per_line_data)
+                                            _revision)
+                                         _service_id)
+                                      _binary_name)
+                                   _fetch_frame_matches)
+                                _fetch_assembly_data)
+                             _fetch_strobelight_frames)
+                          _fetch_default_view)
+                       _package_name)
+                    _use_binary_for_default_view)
+                 _use_customized_parameters)
+              _fetch_memory)
+           _use_file_path_mapping)
+        _fetch_ds_mapping
 
 newtype ServiceID = ServiceID{unServiceID :: Text.Text}
                     deriving (Prelude.Eq, Prelude.Show, DeepSeq.NFData, Prelude.Ord)
@@ -1291,6 +1479,140 @@
 instance Aeson.ToJSON BinaryName where
   toJSON (BinaryName __val) = Aeson.toJSON __val
 
+newtype PackageName = PackageName{unPackageName :: Text.Text}
+                      deriving (Prelude.Eq, Prelude.Show, DeepSeq.NFData, Prelude.Ord)
+
+instance Hashable.Hashable PackageName where
+  hashWithSalt __salt (PackageName __val)
+    = Hashable.hashWithSalt __salt __val
+
+instance Aeson.ToJSON PackageName where
+  toJSON (PackageName __val) = Aeson.toJSON __val
+
+data ClientInfo = ClientInfo{clientInfo_name ::
+                             Prelude.Maybe Text.Text,
+                             clientInfo_unixname :: Prelude.Maybe Text.Text,
+                             clientInfo_application :: Prelude.Maybe Text.Text}
+                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ClientInfo where
+  toJSON
+    (ClientInfo __field__name __field__unixname __field__application)
+    = Aeson.object
+        (Prelude.maybe Prelude.id ((:) . ("name" .=)) __field__name
+           (Prelude.maybe Prelude.id ((:) . ("unixname" .=)) __field__unixname
+              (Prelude.maybe Prelude.id ((:) . ("application" .=))
+                 __field__application
+                 Prelude.mempty)))
+
+instance Thrift.ThriftStruct ClientInfo where
+  buildStruct _proxy
+    (ClientInfo __field__name __field__unixname __field__application)
+    = Thrift.genStruct _proxy
+        (let (__cereal__name, __id__name)
+               = case __field__name of
+                   Prelude.Just _val -> ((:)
+                                           (Thrift.genField _proxy "name"
+                                              (Thrift.getStringType _proxy)
+                                              1
+                                              0
+                                              (Thrift.genText _proxy _val)),
+                                         1)
+                   Prelude.Nothing -> (Prelude.id, 0)
+           in
+           __cereal__name
+             (let (__cereal__unixname, __id__unixname)
+                    = case __field__unixname of
+                        Prelude.Just _val -> ((:)
+                                                (Thrift.genField _proxy "unixname"
+                                                   (Thrift.getStringType _proxy)
+                                                   2
+                                                   __id__name
+                                                   (Thrift.genText _proxy _val)),
+                                              2)
+                        Prelude.Nothing -> (Prelude.id, __id__name)
+                in
+                __cereal__unixname
+                  (case __field__application of
+                     Prelude.Just _val -> Thrift.genField _proxy "application"
+                                            (Thrift.getStringType _proxy)
+                                            3
+                                            __id__unixname
+                                            (Thrift.genText _proxy _val)
+                                            : []
+                     Prelude.Nothing -> [])))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef Prelude.Nothing
+            __field__unixname <- ST.newSTRef Prelude.Nothing
+            __field__application <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          (Prelude.Just _val)
+                                                                 2 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__unixname
+                                                                          (Prelude.Just _val)
+                                                                 3 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__application
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__unixname <- ST.readSTRef __field__unixname
+                                             !__val__application <- ST.readSTRef
+                                                                      __field__application
+                                             Prelude.pure
+                                               (ClientInfo __val__name __val__unixname
+                                                  __val__application)
+              _idMap
+                = HashMap.fromList
+                    [("name", 1), ("unixname", 2), ("application", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData ClientInfo where
+  rnf
+    (ClientInfo __field__name __field__unixname __field__application)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__unixname `Prelude.seq`
+          DeepSeq.rnf __field__application `Prelude.seq` ()
+
+instance Default.Default ClientInfo where
+  def = ClientInfo Prelude.Nothing Prelude.Nothing Prelude.Nothing
+
+instance Hashable.Hashable ClientInfo where
+  hashWithSalt __salt (ClientInfo _name _unixname _application)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+           _unixname)
+        _application
+
 data RequestOptions = RequestOptions{requestOptions_revision ::
                                      Prelude.Maybe Revision,
                                      requestOptions_limit :: Prelude.Maybe Int.Int32,
@@ -1299,7 +1621,8 @@
                                      requestOptions_exact_revision :: Prelude.Bool,
                                      requestOptions_content_check :: Prelude.Bool,
                                      requestOptions_matching_revision :: Prelude.Bool,
-                                     requestOptions_attribute_opts :: AttributeOptions}
+                                     requestOptions_attribute_opts :: AttributeOptions,
+                                     requestOptions_client_info :: Prelude.Maybe ClientInfo}
                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
 
 instance Aeson.ToJSON RequestOptions where
@@ -1307,7 +1630,7 @@
     (RequestOptions __field__revision __field__limit
        __field__feature_flags __field__strict __field__exact_revision
        __field__content_check __field__matching_revision
-       __field__attribute_opts)
+       __field__attribute_opts __field__client_info)
     = Aeson.object
         (Prelude.maybe Prelude.id ((:) . ("revision" .=))
            (Prelude.fmap unRevision __field__revision)
@@ -1318,14 +1641,17 @@
                     "exact_revision" .= __field__exact_revision :
                       "content_check" .= __field__content_check :
                         "matching_revision" .= __field__matching_revision :
-                          "attribute_opts" .= __field__attribute_opts : Prelude.mempty))))
+                          "attribute_opts" .= __field__attribute_opts :
+                            Prelude.maybe Prelude.id ((:) . ("client_info" .=))
+                              __field__client_info
+                              Prelude.mempty))))
 
 instance Thrift.ThriftStruct RequestOptions where
   buildStruct _proxy
     (RequestOptions __field__revision __field__limit
        __field__feature_flags __field__strict __field__exact_revision
        __field__content_check __field__matching_revision
-       __field__attribute_opts)
+       __field__attribute_opts __field__client_info)
     = Thrift.genStruct _proxy
         (let (__cereal__revision, __id__revision)
                = case __field__revision of
@@ -1381,7 +1707,15 @@
                                   8
                                   6
                                   (Thrift.buildStruct _proxy __field__attribute_opts)
-                                  : []))))
+                                  :
+                                  case __field__client_info of
+                                    Prelude.Just _val -> Thrift.genField _proxy "client_info"
+                                                           (Thrift.getStructType _proxy)
+                                                           9
+                                                           8
+                                                           (Thrift.buildStruct _proxy _val)
+                                                           : []
+                                    Prelude.Nothing -> []))))
   parseStruct _proxy
     = ST.runSTT
         (do Prelude.return ()
@@ -1393,6 +1727,7 @@
             __field__content_check <- ST.newSTRef Prelude.False
             __field__matching_revision <- ST.newSTRef Prelude.False
             __field__attribute_opts <- ST.newSTRef Default.def
+            __field__client_info <- ST.newSTRef Prelude.Nothing
             let
               _parse _lastId
                 = do _fieldBegin <- Trans.lift
@@ -1476,6 +1811,15 @@
                                                                         ST.writeSTRef
                                                                           __field__attribute_opts
                                                                           _val
+                                                                 9 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__client_info
+                                                                          (Prelude.Just _val)
                                                                  _ -> Trans.lift
                                                                         (Thrift.parseSkip _proxy
                                                                            _type
@@ -1495,6 +1839,8 @@
                                                                             __field__matching_revision
                                              !__val__attribute_opts <- ST.readSTRef
                                                                          __field__attribute_opts
+                                             !__val__client_info <- ST.readSTRef
+                                                                      __field__client_info
                                              Prelude.pure
                                                (RequestOptions __val__revision __val__limit
                                                   __val__feature_flags
@@ -1502,12 +1848,14 @@
                                                   __val__exact_revision
                                                   __val__content_check
                                                   __val__matching_revision
-                                                  __val__attribute_opts)
+                                                  __val__attribute_opts
+                                                  __val__client_info)
               _idMap
                 = HashMap.fromList
                     [("revision", 1), ("limit", 2), ("feature_flags", 3),
                      ("strict", 4), ("exact_revision", 5), ("content_check", 7),
-                     ("matching_revision", 6), ("attribute_opts", 8)]
+                     ("matching_revision", 6), ("attribute_opts", 8),
+                     ("client_info", 9)]
             _parse 0)
 
 instance DeepSeq.NFData RequestOptions where
@@ -1515,7 +1863,7 @@
     (RequestOptions __field__revision __field__limit
        __field__feature_flags __field__strict __field__exact_revision
        __field__content_check __field__matching_revision
-       __field__attribute_opts)
+       __field__attribute_opts __field__client_info)
     = DeepSeq.rnf __field__revision `Prelude.seq`
         DeepSeq.rnf __field__limit `Prelude.seq`
           DeepSeq.rnf __field__feature_flags `Prelude.seq`
@@ -1523,7 +1871,8 @@
               DeepSeq.rnf __field__exact_revision `Prelude.seq`
                 DeepSeq.rnf __field__content_check `Prelude.seq`
                   DeepSeq.rnf __field__matching_revision `Prelude.seq`
-                    DeepSeq.rnf __field__attribute_opts `Prelude.seq` ()
+                    DeepSeq.rnf __field__attribute_opts `Prelude.seq`
+                      DeepSeq.rnf __field__client_info `Prelude.seq` ()
 
 instance Default.Default RequestOptions where
   def
@@ -1533,59 +1882,76 @@
         Prelude.False
         Prelude.False
         Default.def
+        Prelude.Nothing
 
 instance Hashable.Hashable RequestOptions where
   hashWithSalt __salt
     (RequestOptions _revision _limit _feature_flags _strict
-       _exact_revision _content_check _matching_revision _attribute_opts)
+       _exact_revision _content_check _matching_revision _attribute_opts
+       _client_info)
     = Hashable.hashWithSalt
         (Hashable.hashWithSalt
            (Hashable.hashWithSalt
               (Hashable.hashWithSalt
                  (Hashable.hashWithSalt
                     (Hashable.hashWithSalt
-                       (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _revision)
-                          _limit)
-                       _feature_flags)
-                    _strict)
-                 _exact_revision)
-              _content_check)
-           _matching_revision)
-        _attribute_opts
+                       (Hashable.hashWithSalt
+                          (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _revision)
+                             _limit)
+                          _feature_flags)
+                       _strict)
+                    _exact_revision)
+                 _content_check)
+              _matching_revision)
+           _attribute_opts)
+        _client_info
 
-newtype FeatureFlags = FeatureFlags{featureFlags_include_xlang_refs
-                                    :: Prelude.Maybe Prelude.Bool}
-                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+data FeatureFlags = FeatureFlags{featureFlags_amend_lines_on_revision_mismatch
+                                 :: Prelude.Bool,
+                                 featureFlags_use_pyrefly_indexer_for_instagram_server ::
+                                 Prelude.Bool}
+                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
 
 instance Aeson.ToJSON FeatureFlags where
-  toJSON (FeatureFlags __field__include_xlang_refs)
+  toJSON
+    (FeatureFlags __field__amend_lines_on_revision_mismatch
+       __field__use_pyrefly_indexer_for_instagram_server)
     = Aeson.object
-        (Prelude.maybe Prelude.id ((:) . ("include_xlang_refs" .=))
-           __field__include_xlang_refs
-           Prelude.mempty)
+        ("amend_lines_on_revision_mismatch" .=
+           __field__amend_lines_on_revision_mismatch
+           :
+           "use_pyrefly_indexer_for_instagram_server" .=
+             __field__use_pyrefly_indexer_for_instagram_server
+             : Prelude.mempty)
 
 instance Thrift.ThriftStruct FeatureFlags where
-  buildStruct _proxy (FeatureFlags __field__include_xlang_refs)
+  buildStruct _proxy
+    (FeatureFlags __field__amend_lines_on_revision_mismatch
+       __field__use_pyrefly_indexer_for_instagram_server)
     = Thrift.genStruct _proxy
-        (case __field__include_xlang_refs of
-           Prelude.Just _val -> Thrift.genFieldBool _proxy
-                                  "include_xlang_refs"
-                                  3
-                                  0
-                                  _val
-                                  : []
-           Prelude.Nothing -> [])
+        (Thrift.genFieldBool _proxy "amend_lines_on_revision_mismatch" 4 0
+           __field__amend_lines_on_revision_mismatch
+           :
+           Thrift.genFieldBool _proxy
+             "use_pyrefly_indexer_for_instagram_server"
+             5
+             4
+             __field__use_pyrefly_indexer_for_instagram_server
+             : [])
   parseStruct _proxy
     = ST.runSTT
         (do Prelude.return ()
-            __field__include_xlang_refs <- ST.newSTRef Prelude.Nothing
+            __field__amend_lines_on_revision_mismatch <- ST.newSTRef
+                                                           Prelude.False
+            __field__use_pyrefly_indexer_for_instagram_server <- ST.newSTRef
+                                                                   Prelude.False
             let
               _parse _lastId
                 = do _fieldBegin <- Trans.lift
                                       (Thrift.parseFieldBegin _proxy _lastId _idMap)
                      case _fieldBegin of
                        Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 3 | _type ==
+                                                                 4 | _type ==
                                                                        Thrift.getBoolType _proxy
                                                                      ->
                                                                      do !_val <- Trans.lift
@@ -1593,29 +1959,55 @@
                                                                                       _proxy
                                                                                       _bool)
                                                                         ST.writeSTRef
-                                                                          __field__include_xlang_refs
-                                                                          (Prelude.Just _val)
+                                                                          __field__amend_lines_on_revision_mismatch
+                                                                          _val
+                                                                 5 | _type ==
+                                                                       Thrift.getBoolType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseBoolF
+                                                                                      _proxy
+                                                                                      _bool)
+                                                                        ST.writeSTRef
+                                                                          __field__use_pyrefly_indexer_for_instagram_server
+                                                                          _val
                                                                  _ -> Trans.lift
                                                                         (Thrift.parseSkip _proxy
                                                                            _type
                                                                            (Prelude.Just _bool))
                                                                _parse _id
-                       Thrift.FieldEnd -> do !__val__include_xlang_refs <- ST.readSTRef
-                                                                             __field__include_xlang_refs
-                                             Prelude.pure (FeatureFlags __val__include_xlang_refs)
-              _idMap = HashMap.fromList [("include_xlang_refs", 3)]
+                       Thrift.FieldEnd -> do !__val__amend_lines_on_revision_mismatch <- ST.readSTRef
+                                                                                           __field__amend_lines_on_revision_mismatch
+                                             !__val__use_pyrefly_indexer_for_instagram_server <- ST.readSTRef
+                                                                                                   __field__use_pyrefly_indexer_for_instagram_server
+                                             Prelude.pure
+                                               (FeatureFlags __val__amend_lines_on_revision_mismatch
+                                                  __val__use_pyrefly_indexer_for_instagram_server)
+              _idMap
+                = HashMap.fromList
+                    [("amend_lines_on_revision_mismatch", 4),
+                     ("use_pyrefly_indexer_for_instagram_server", 5)]
             _parse 0)
 
 instance DeepSeq.NFData FeatureFlags where
-  rnf (FeatureFlags __field__include_xlang_refs)
-    = DeepSeq.rnf __field__include_xlang_refs `Prelude.seq` ()
+  rnf
+    (FeatureFlags __field__amend_lines_on_revision_mismatch
+       __field__use_pyrefly_indexer_for_instagram_server)
+    = DeepSeq.rnf __field__amend_lines_on_revision_mismatch
+        `Prelude.seq`
+        DeepSeq.rnf __field__use_pyrefly_indexer_for_instagram_server
+          `Prelude.seq` ()
 
 instance Default.Default FeatureFlags where
-  def = FeatureFlags Prelude.Nothing
+  def = FeatureFlags Prelude.False Prelude.False
 
 instance Hashable.Hashable FeatureFlags where
-  hashWithSalt __salt (FeatureFlags _include_xlang_refs)
-    = Hashable.hashWithSalt __salt _include_xlang_refs
+  hashWithSalt __salt
+    (FeatureFlags _amend_lines_on_revision_mismatch
+       _use_pyrefly_indexer_for_instagram_server)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt __salt _amend_lines_on_revision_mismatch)
+        _use_pyrefly_indexer_for_instagram_server
 
 data DocumentSymbolsRequest = DocumentSymbolsRequest{documentSymbolsRequest_repository
                                                      :: RepoName,
@@ -1625,25 +2017,29 @@
                                                      documentSymbolsRequest_include_refs ::
                                                      Prelude.Bool,
                                                      documentSymbolsRequest_include_xlang_refs ::
+                                                     Prelude.Bool,
+                                                     documentSymbolsRequest_include_content ::
                                                      Prelude.Bool}
                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
 
 instance Aeson.ToJSON DocumentSymbolsRequest where
   toJSON
     (DocumentSymbolsRequest __field__repository __field__filepath
-       __field__range __field__include_refs __field__include_xlang_refs)
+       __field__range __field__include_refs __field__include_xlang_refs
+       __field__include_content)
     = Aeson.object
         ("repository" .= unRepoName __field__repository :
            "filepath" .= unPath __field__filepath :
              Prelude.maybe Prelude.id ((:) . ("range" .=)) __field__range
                ("include_refs" .= __field__include_refs :
                   "include_xlang_refs" .= __field__include_xlang_refs :
-                    Prelude.mempty))
+                    "include_content" .= __field__include_content : Prelude.mempty))
 
 instance Thrift.ThriftStruct DocumentSymbolsRequest where
   buildStruct _proxy
     (DocumentSymbolsRequest __field__repository __field__filepath
-       __field__range __field__include_refs __field__include_xlang_refs)
+       __field__range __field__include_refs __field__include_xlang_refs
+       __field__include_content)
     = Thrift.genStruct _proxy
         (Thrift.genField _proxy "repository" (Thrift.getStringType _proxy)
            1
@@ -1673,7 +2069,10 @@
                     :
                     Thrift.genFieldBool _proxy "include_xlang_refs" 5 4
                       __field__include_xlang_refs
-                      : []))
+                      :
+                      Thrift.genFieldBool _proxy "include_content" 6 5
+                        __field__include_content
+                        : []))
   parseStruct _proxy
     = ST.runSTT
         (do Prelude.return ()
@@ -1682,6 +2081,7 @@
             __field__range <- ST.newSTRef Prelude.Nothing
             __field__include_refs <- ST.newSTRef Prelude.True
             __field__include_xlang_refs <- ST.newSTRef Prelude.False
+            __field__include_content <- ST.newSTRef Prelude.False
             let
               _parse _lastId
                 = do _fieldBegin <- Trans.lift
@@ -1741,6 +2141,16 @@
                                                                         ST.writeSTRef
                                                                           __field__include_xlang_refs
                                                                           _val
+                                                                 6 | _type ==
+                                                                       Thrift.getBoolType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseBoolF
+                                                                                      _proxy
+                                                                                      _bool)
+                                                                        ST.writeSTRef
+                                                                          __field__include_content
+                                                                          _val
                                                                  _ -> Trans.lift
                                                                         (Thrift.parseSkip _proxy
                                                                            _type
@@ -1754,47 +2164,106 @@
                                                                        __field__include_refs
                                              !__val__include_xlang_refs <- ST.readSTRef
                                                                              __field__include_xlang_refs
+                                             !__val__include_content <- ST.readSTRef
+                                                                          __field__include_content
                                              Prelude.pure
                                                (DocumentSymbolsRequest __val__repository
                                                   __val__filepath
                                                   __val__range
                                                   __val__include_refs
-                                                  __val__include_xlang_refs)
+                                                  __val__include_xlang_refs
+                                                  __val__include_content)
               _idMap
                 = HashMap.fromList
                     [("repository", 1), ("filepath", 2), ("range", 3),
-                     ("include_refs", 4), ("include_xlang_refs", 5)]
+                     ("include_refs", 4), ("include_xlang_refs", 5),
+                     ("include_content", 6)]
             _parse 0)
 
 instance DeepSeq.NFData DocumentSymbolsRequest where
   rnf
     (DocumentSymbolsRequest __field__repository __field__filepath
-       __field__range __field__include_refs __field__include_xlang_refs)
+       __field__range __field__include_refs __field__include_xlang_refs
+       __field__include_content)
     = DeepSeq.rnf __field__repository `Prelude.seq`
         DeepSeq.rnf __field__filepath `Prelude.seq`
           DeepSeq.rnf __field__range `Prelude.seq`
             DeepSeq.rnf __field__include_refs `Prelude.seq`
-              DeepSeq.rnf __field__include_xlang_refs `Prelude.seq` ()
+              DeepSeq.rnf __field__include_xlang_refs `Prelude.seq`
+                DeepSeq.rnf __field__include_content `Prelude.seq` ()
 
 instance Default.Default DocumentSymbolsRequest where
   def
     = DocumentSymbolsRequest (RepoName "") (Path "") Prelude.Nothing
         Prelude.True
         Prelude.False
+        Prelude.False
 
 instance Hashable.Hashable DocumentSymbolsRequest where
   hashWithSalt __salt
     (DocumentSymbolsRequest _repository _filepath _range _include_refs
-       _include_xlang_refs)
+       _include_xlang_refs _include_content)
     = Hashable.hashWithSalt
         (Hashable.hashWithSalt
            (Hashable.hashWithSalt
-              (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _repository)
-                 _filepath)
-              _range)
-           _include_refs)
-        _include_xlang_refs
+              (Hashable.hashWithSalt
+                 (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _repository)
+                    _filepath)
+                 _range)
+              _include_refs)
+           _include_xlang_refs)
+        _include_content
 
+data SymbolFilter = SymbolFilter_definition_file Text.Text
+                  | SymbolFilter_EMPTY
+                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SymbolFilter where
+  toJSON (SymbolFilter_definition_file __definition_file)
+    = Aeson.object ["definition_file" .= __definition_file]
+  toJSON SymbolFilter_EMPTY = Aeson.object []
+
+instance Thrift.ThriftStruct SymbolFilter where
+  buildStruct _proxy (SymbolFilter_definition_file __definition_file)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "definition_file"
+           (Thrift.getStringType _proxy)
+           1
+           0
+           (Thrift.genText _proxy __definition_file)]
+  buildStruct _proxy SymbolFilter_EMPTY = Thrift.genStruct _proxy []
+  parseStruct _proxy
+    = do _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap
+         case _fieldBegin of
+           Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                     1 | _type == Thrift.getStringType _proxy ->
+                                                         do _val <- Thrift.parseText _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (SymbolFilter_definition_file _val)
+                                                     _ -> do Thrift.parseSkip _proxy _type
+                                                               Prelude.Nothing
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return SymbolFilter_EMPTY
+           Thrift.FieldEnd -> Prelude.return SymbolFilter_EMPTY
+    where
+      _idMap = HashMap.fromList [("definition_file", 1)]
+
+instance DeepSeq.NFData SymbolFilter where
+  rnf (SymbolFilter_definition_file __definition_file)
+    = DeepSeq.rnf __definition_file
+  rnf SymbolFilter_EMPTY = ()
+
+instance Default.Default SymbolFilter where
+  def = SymbolFilter_EMPTY
+
+instance Hashable.Hashable SymbolFilter where
+  hashWithSalt __salt (SymbolFilter_definition_file _definition_file)
+    = Hashable.hashWithSalt __salt
+        (Hashable.hashWithSalt 1 _definition_file)
+  hashWithSalt __salt SymbolFilter_EMPTY
+    = Hashable.hashWithSalt __salt (0 :: Prelude.Int)
+
 newtype SymbolId = SymbolId{unSymbolId :: Text.Text}
                    deriving (Prelude.Eq, Prelude.Show, DeepSeq.NFData, Prelude.Ord)
 
@@ -1813,6 +2282,7 @@
                | Attribute_aMapIntDouble (Map.Map Int.Int64 Prelude.Double)
                | Attribute_aMapIntString (Map.Map Int.Int64 Text.Text)
                | Attribute_aMapStringDouble (Map.Map Text.Text Prelude.Double)
+               | Attribute_aMapIntListString (Map.Map Int.Int64 [Text.Text])
                | Attribute_EMPTY
                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
 
@@ -1835,6 +2305,10 @@
         ["aMapIntString" .= Map.mapKeys Thrift.keyToStr __aMapIntString]
   toJSON (Attribute_aMapStringDouble __aMapStringDouble)
     = Aeson.object ["aMapStringDouble" .= __aMapStringDouble]
+  toJSON (Attribute_aMapIntListString __aMapIntListString)
+    = Aeson.object
+        ["aMapIntListString" .=
+           Map.mapKeys Thrift.keyToStr __aMapIntListString]
   toJSON Attribute_EMPTY = Aeson.object []
 
 instance Thrift.ThriftStruct Attribute where
@@ -1898,6 +2372,21 @@
                (Thrift.genDouble _proxy)
                . Map.toList)
               __aMapStringDouble)]
+  buildStruct _proxy
+    (Attribute_aMapIntListString __aMapIntListString)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "aMapIntListString"
+           (Thrift.getMapType _proxy)
+           9
+           0
+           ((Thrift.genMap _proxy (Thrift.getI64Type _proxy)
+               (Thrift.getListType _proxy)
+               Prelude.False
+               (Thrift.genI64 _proxy)
+               (Thrift.genList _proxy (Thrift.getStringType _proxy)
+                  (Thrift.genText _proxy))
+               . Map.toList)
+              __aMapIntListString)]
   buildStruct _proxy Attribute_EMPTY = Thrift.genStruct _proxy []
   parseStruct _proxy
     = do _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap
@@ -1952,6 +2441,18 @@
                                                             Thrift.parseStop _proxy
                                                             Prelude.return
                                                               (Attribute_aMapStringDouble _val)
+                                                     9 | _type == Thrift.getMapType _proxy ->
+                                                         do _val <- Map.fromList <$>
+                                                                      Thrift.parseMap _proxy
+                                                                        (Thrift.parseI64 _proxy)
+                                                                        (Prelude.snd <$>
+                                                                           Thrift.parseList _proxy
+                                                                             (Thrift.parseText
+                                                                                _proxy))
+                                                                        Prelude.False
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (Attribute_aMapIntListString _val)
                                                      _ -> do Thrift.parseSkip _proxy _type
                                                                Prelude.Nothing
                                                              Thrift.parseStop _proxy
@@ -1962,7 +2463,7 @@
         = HashMap.fromList
             [("aBool", 1), ("aInteger", 2), ("aDouble", 3), ("aString", 4),
              ("aList", 5), ("aMapIntDouble", 6), ("aMapIntString", 7),
-             ("aMapStringDouble", 8)]
+             ("aMapStringDouble", 8), ("aMapIntListString", 9)]
 
 instance DeepSeq.NFData Attribute where
   rnf (Attribute_aBool __aBool) = DeepSeq.rnf __aBool
@@ -1976,6 +2477,8 @@
     = DeepSeq.rnf __aMapIntString
   rnf (Attribute_aMapStringDouble __aMapStringDouble)
     = DeepSeq.rnf __aMapStringDouble
+  rnf (Attribute_aMapIntListString __aMapIntListString)
+    = DeepSeq.rnf __aMapIntListString
   rnf Attribute_EMPTY = ()
 
 instance Default.Default Attribute where
@@ -2007,6 +2510,12 @@
         (Hashable.hashWithSalt 8
            ((Prelude.map (\ (_k, _v) -> (_k, _v)) . Map.toAscList)
               _aMapStringDouble))
+  hashWithSalt __salt
+    (Attribute_aMapIntListString _aMapIntListString)
+    = Hashable.hashWithSalt __salt
+        (Hashable.hashWithSalt 9
+           ((Prelude.map (\ (_k, _v) -> (_k, _v)) . Map.toAscList)
+              _aMapIntListString))
   hashWithSalt __salt Attribute_EMPTY
     = Hashable.hashWithSalt __salt (0 :: Prelude.Int)
 
@@ -2660,7 +3169,9 @@
                                                            documentSymbolListXResult_content_match
                                                            :: Prelude.Maybe Prelude.Bool,
                                                            documentSymbolListXResult_attributes ::
-                                                           Prelude.Maybe AttributeList}
+                                                           Prelude.Maybe AttributeList,
+                                                           documentSymbolListXResult_content ::
+                                                           Prelude.Maybe Text.Text}
                                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
 
 instance Aeson.ToJSON DocumentSymbolListXResult where
@@ -2668,7 +3179,7 @@
     (DocumentSymbolListXResult __field__references __field__definitions
        __field__revision __field__truncated __field__digest
        __field__referenced_file_digests __field__content_match
-       __field__attributes)
+       __field__attributes __field__content)
     = Aeson.object
         ("references" .= __field__references :
            "definitions" .= __field__definitions :
@@ -2680,14 +3191,15 @@
                         __field__content_match
                         (Prelude.maybe Prelude.id ((:) . ("attributes" .=))
                            (Prelude.fmap unAttributeList __field__attributes)
-                           Prelude.mempty)))
+                           (Prelude.maybe Prelude.id ((:) . ("content" .=)) __field__content
+                              Prelude.mempty))))
 
 instance Thrift.ThriftStruct DocumentSymbolListXResult where
   buildStruct _proxy
     (DocumentSymbolListXResult __field__references __field__definitions
        __field__revision __field__truncated __field__digest
        __field__referenced_file_digests __field__content_match
-       __field__attributes)
+       __field__attributes __field__content)
     = Thrift.genStruct _proxy
         (Thrift.genField _proxy "references" (Thrift.getListType _proxy) 1
            0
@@ -2746,18 +3258,30 @@
                                   Prelude.Nothing -> (Prelude.id, 6)
                           in
                           __cereal__content_match
-                            (case __field__attributes of
-                               Prelude.Just _val -> Thrift.genField _proxy "attributes"
-                                                      (Thrift.getListType _proxy)
-                                                      8
-                                                      __id__content_match
-                                                      ((Thrift.genList _proxy
-                                                          (Thrift.getStructType _proxy)
-                                                          (Thrift.buildStruct _proxy)
-                                                          . unAttributeList)
-                                                         _val)
-                                                      : []
-                               Prelude.Nothing -> [])))
+                            (let (__cereal__attributes, __id__attributes)
+                                   = case __field__attributes of
+                                       Prelude.Just _val -> ((:)
+                                                               (Thrift.genField _proxy "attributes"
+                                                                  (Thrift.getListType _proxy)
+                                                                  8
+                                                                  __id__content_match
+                                                                  ((Thrift.genList _proxy
+                                                                      (Thrift.getStructType _proxy)
+                                                                      (Thrift.buildStruct _proxy)
+                                                                      . unAttributeList)
+                                                                     _val)),
+                                                             8)
+                                       Prelude.Nothing -> (Prelude.id, __id__content_match)
+                               in
+                               __cereal__attributes
+                                 (case __field__content of
+                                    Prelude.Just _val -> Thrift.genField _proxy "content"
+                                                           (Thrift.getStringType _proxy)
+                                                           9
+                                                           __id__attributes
+                                                           (Thrift.genText _proxy _val)
+                                                           : []
+                                    Prelude.Nothing -> []))))
   parseStruct _proxy
     = ST.runSTT
         (do Prelude.return ()
@@ -2769,6 +3293,7 @@
             __field__referenced_file_digests <- ST.newSTRef Default.def
             __field__content_match <- ST.newSTRef Prelude.Nothing
             __field__attributes <- ST.newSTRef Prelude.Nothing
+            __field__content <- ST.newSTRef Prelude.Nothing
             let
               _parse _lastId
                 = do _fieldBegin <- Trans.lift
@@ -2876,6 +3401,15 @@
                                                                         ST.writeSTRef
                                                                           __field__attributes
                                                                           (Prelude.Just _val)
+                                                                 9 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__content
+                                                                          (Prelude.Just _val)
                                                                  _ -> Trans.lift
                                                                         (Thrift.parseSkip _proxy
                                                                            _type
@@ -2893,6 +3427,7 @@
                                              !__val__content_match <- ST.readSTRef
                                                                         __field__content_match
                                              !__val__attributes <- ST.readSTRef __field__attributes
+                                             !__val__content <- ST.readSTRef __field__content
                                              Prelude.pure
                                                (DocumentSymbolListXResult __val__references
                                                   __val__definitions
@@ -2901,12 +3436,13 @@
                                                   __val__digest
                                                   __val__referenced_file_digests
                                                   __val__content_match
-                                                  __val__attributes)
+                                                  __val__attributes
+                                                  __val__content)
               _idMap
                 = HashMap.fromList
                     [("references", 1), ("definitions", 2), ("revision", 3),
                      ("truncated", 4), ("digest", 5), ("referenced_file_digests", 6),
-                     ("content_match", 7), ("attributes", 8)]
+                     ("content_match", 7), ("attributes", 8), ("content", 9)]
             _parse 0)
 
 instance DeepSeq.NFData DocumentSymbolListXResult where
@@ -2914,7 +3450,7 @@
     (DocumentSymbolListXResult __field__references __field__definitions
        __field__revision __field__truncated __field__digest
        __field__referenced_file_digests __field__content_match
-       __field__attributes)
+       __field__attributes __field__content)
     = DeepSeq.rnf __field__references `Prelude.seq`
         DeepSeq.rnf __field__definitions `Prelude.seq`
           DeepSeq.rnf __field__revision `Prelude.seq`
@@ -2922,7 +3458,8 @@
               DeepSeq.rnf __field__digest `Prelude.seq`
                 DeepSeq.rnf __field__referenced_file_digests `Prelude.seq`
                   DeepSeq.rnf __field__content_match `Prelude.seq`
-                    DeepSeq.rnf __field__attributes `Prelude.seq` ()
+                    DeepSeq.rnf __field__attributes `Prelude.seq`
+                      DeepSeq.rnf __field__content `Prelude.seq` ()
 
 instance Default.Default DocumentSymbolListXResult where
   def
@@ -2932,30 +3469,33 @@
         Default.def
         Prelude.Nothing
         Prelude.Nothing
+        Prelude.Nothing
 
 instance Hashable.Hashable DocumentSymbolListXResult where
   hashWithSalt __salt
     (DocumentSymbolListXResult _references _definitions _revision
        _truncated _digest _referenced_file_digests _content_match
-       _attributes)
+       _attributes _content)
     = Hashable.hashWithSalt
         (Hashable.hashWithSalt
            (Hashable.hashWithSalt
               (Hashable.hashWithSalt
                  (Hashable.hashWithSalt
                     (Hashable.hashWithSalt
-                       (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _references)
-                          _definitions)
-                       _revision)
-                    _truncated)
-                 _digest)
-              ((Prelude.map
-                  (\ (_k, _v) ->
-                     (_k, (Prelude.map (\ (_k, _v) -> (_k, _v)) . Map.toAscList) _v))
-                  . Map.toAscList)
-                 _referenced_file_digests))
-           _content_match)
-        _attributes
+                       (Hashable.hashWithSalt
+                          (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _references)
+                             _definitions)
+                          _revision)
+                       _truncated)
+                    _digest)
+                 ((Prelude.map
+                     (\ (_k, _v) ->
+                        (_k, (Prelude.map (\ (_k, _v) -> (_k, _v)) . Map.toAscList) _v))
+                     . Map.toAscList)
+                    _referenced_file_digests))
+              _content_match)
+           _attributes)
+        _content
 
 data DocumentSymbolIndex = DocumentSymbolIndex{documentSymbolIndex_symbols
                                                :: Map.Map Int.Int64 [SymbolX],
@@ -2970,7 +3510,9 @@
                                                documentSymbolIndex_content_match ::
                                                Prelude.Maybe Prelude.Bool,
                                                documentSymbolIndex_attributes ::
-                                               Prelude.Maybe AttributeList}
+                                               Prelude.Maybe AttributeList,
+                                               documentSymbolIndex_content ::
+                                               Prelude.Maybe Text.Text}
                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
 
 instance Aeson.ToJSON DocumentSymbolIndex where
@@ -2978,7 +3520,7 @@
     (DocumentSymbolIndex __field__symbols __field__revision
        __field__size __field__truncated __field__digest
        __field__referenced_file_digests __field__content_match
-       __field__attributes)
+       __field__attributes __field__content)
     = Aeson.object
         ("symbols" .= Map.mapKeys Thrift.keyToStr __field__symbols :
            "revision" .= unRevision __field__revision :
@@ -2990,14 +3532,15 @@
                         __field__content_match
                         (Prelude.maybe Prelude.id ((:) . ("attributes" .=))
                            (Prelude.fmap unAttributeList __field__attributes)
-                           Prelude.mempty)))
+                           (Prelude.maybe Prelude.id ((:) . ("content" .=)) __field__content
+                              Prelude.mempty))))
 
 instance Thrift.ThriftStruct DocumentSymbolIndex where
   buildStruct _proxy
     (DocumentSymbolIndex __field__symbols __field__revision
        __field__size __field__truncated __field__digest
        __field__referenced_file_digests __field__content_match
-       __field__attributes)
+       __field__attributes __field__content)
     = Thrift.genStruct _proxy
         (Thrift.genField _proxy "symbols" (Thrift.getMapType _proxy) 1 0
            ((Thrift.genMap _proxy (Thrift.getI64Type _proxy)
@@ -3058,18 +3601,30 @@
                                   Prelude.Nothing -> (Prelude.id, 6)
                           in
                           __cereal__content_match
-                            (case __field__attributes of
-                               Prelude.Just _val -> Thrift.genField _proxy "attributes"
-                                                      (Thrift.getListType _proxy)
-                                                      8
-                                                      __id__content_match
-                                                      ((Thrift.genList _proxy
-                                                          (Thrift.getStructType _proxy)
-                                                          (Thrift.buildStruct _proxy)
-                                                          . unAttributeList)
-                                                         _val)
-                                                      : []
-                               Prelude.Nothing -> [])))
+                            (let (__cereal__attributes, __id__attributes)
+                                   = case __field__attributes of
+                                       Prelude.Just _val -> ((:)
+                                                               (Thrift.genField _proxy "attributes"
+                                                                  (Thrift.getListType _proxy)
+                                                                  8
+                                                                  __id__content_match
+                                                                  ((Thrift.genList _proxy
+                                                                      (Thrift.getStructType _proxy)
+                                                                      (Thrift.buildStruct _proxy)
+                                                                      . unAttributeList)
+                                                                     _val)),
+                                                             8)
+                                       Prelude.Nothing -> (Prelude.id, __id__content_match)
+                               in
+                               __cereal__attributes
+                                 (case __field__content of
+                                    Prelude.Just _val -> Thrift.genField _proxy "content"
+                                                           (Thrift.getStringType _proxy)
+                                                           9
+                                                           __id__attributes
+                                                           (Thrift.genText _proxy _val)
+                                                           : []
+                                    Prelude.Nothing -> []))))
   parseStruct _proxy
     = ST.runSTT
         (do Prelude.return ()
@@ -3081,6 +3636,7 @@
             __field__referenced_file_digests <- ST.newSTRef Default.def
             __field__content_match <- ST.newSTRef Prelude.Nothing
             __field__attributes <- ST.newSTRef Prelude.Nothing
+            __field__content <- ST.newSTRef Prelude.Nothing
             let
               _parse _lastId
                 = do _fieldBegin <- Trans.lift
@@ -3191,6 +3747,15 @@
                                                                         ST.writeSTRef
                                                                           __field__attributes
                                                                           (Prelude.Just _val)
+                                                                 9 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__content
+                                                                          (Prelude.Just _val)
                                                                  _ -> Trans.lift
                                                                         (Thrift.parseSkip _proxy
                                                                            _type
@@ -3207,6 +3772,7 @@
                                              !__val__content_match <- ST.readSTRef
                                                                         __field__content_match
                                              !__val__attributes <- ST.readSTRef __field__attributes
+                                             !__val__content <- ST.readSTRef __field__content
                                              Prelude.pure
                                                (DocumentSymbolIndex __val__symbols __val__revision
                                                   __val__size
@@ -3214,12 +3780,13 @@
                                                   __val__digest
                                                   __val__referenced_file_digests
                                                   __val__content_match
-                                                  __val__attributes)
+                                                  __val__attributes
+                                                  __val__content)
               _idMap
                 = HashMap.fromList
                     [("symbols", 1), ("revision", 2), ("size", 3), ("truncated", 4),
                      ("digest", 5), ("referenced_file_digests", 6),
-                     ("content_match", 7), ("attributes", 8)]
+                     ("content_match", 7), ("attributes", 8), ("content", 9)]
             _parse 0)
 
 instance DeepSeq.NFData DocumentSymbolIndex where
@@ -3227,7 +3794,7 @@
     (DocumentSymbolIndex __field__symbols __field__revision
        __field__size __field__truncated __field__digest
        __field__referenced_file_digests __field__content_match
-       __field__attributes)
+       __field__attributes __field__content)
     = DeepSeq.rnf __field__symbols `Prelude.seq`
         DeepSeq.rnf __field__revision `Prelude.seq`
           DeepSeq.rnf __field__size `Prelude.seq`
@@ -3235,7 +3802,8 @@
               DeepSeq.rnf __field__digest `Prelude.seq`
                 DeepSeq.rnf __field__referenced_file_digests `Prelude.seq`
                   DeepSeq.rnf __field__content_match `Prelude.seq`
-                    DeepSeq.rnf __field__attributes `Prelude.seq` ()
+                    DeepSeq.rnf __field__attributes `Prelude.seq`
+                      DeepSeq.rnf __field__content `Prelude.seq` ()
 
 instance Default.Default DocumentSymbolIndex where
   def
@@ -3245,11 +3813,12 @@
         Default.def
         Prelude.Nothing
         Prelude.Nothing
+        Prelude.Nothing
 
 instance Hashable.Hashable DocumentSymbolIndex where
   hashWithSalt __salt
     (DocumentSymbolIndex _symbols _revision _size _truncated _digest
-       _referenced_file_digests _content_match _attributes)
+       _referenced_file_digests _content_match _attributes _content)
     = Hashable.hashWithSalt
         (Hashable.hashWithSalt
            (Hashable.hashWithSalt
@@ -3257,19 +3826,21 @@
                  (Hashable.hashWithSalt
                     (Hashable.hashWithSalt
                        (Hashable.hashWithSalt
-                          (Hashable.hashWithSalt __salt
-                             ((Prelude.map (\ (_k, _v) -> (_k, _v)) . Map.toAscList) _symbols))
-                          _revision)
-                       _size)
-                    _truncated)
-                 _digest)
-              ((Prelude.map
-                  (\ (_k, _v) ->
-                     (_k, (Prelude.map (\ (_k, _v) -> (_k, _v)) . Map.toAscList) _v))
-                  . Map.toAscList)
-                 _referenced_file_digests))
-           _content_match)
-        _attributes
+                          (Hashable.hashWithSalt
+                             (Hashable.hashWithSalt __salt
+                                ((Prelude.map (\ (_k, _v) -> (_k, _v)) . Map.toAscList) _symbols))
+                             _revision)
+                          _size)
+                       _truncated)
+                    _digest)
+                 ((Prelude.map
+                     (\ (_k, _v) ->
+                        (_k, (Prelude.map (\ (_k, _v) -> (_k, _v)) . Map.toAscList) _v))
+                     . Map.toAscList)
+                    _referenced_file_digests))
+              _content_match)
+           _attributes)
+        _content
 
 newtype ServerException = ServerException{serverException_message
                                           :: Text.Text}
@@ -5404,6 +5975,14 @@
               | Language_Yaml
               | Language_Swift
               | Language_Angle
+              | Language_Chef
+              | Language_Ruby
+              | Language_C
+              | Language_VisualBasic
+              | Language_PHP
+              | Language_Dart
+              | Language_TypeScriptReact
+              | Language_JavaScriptReact
               | Language__UNKNOWN Prelude.Int
                 deriving (Prelude.Eq, Prelude.Show)
 
@@ -5442,6 +6021,14 @@
   toThriftEnum 19 = Language_Yaml
   toThriftEnum 20 = Language_Swift
   toThriftEnum 21 = Language_Angle
+  toThriftEnum 22 = Language_Chef
+  toThriftEnum 23 = Language_Ruby
+  toThriftEnum 24 = Language_C
+  toThriftEnum 25 = Language_VisualBasic
+  toThriftEnum 26 = Language_PHP
+  toThriftEnum 27 = Language_Dart
+  toThriftEnum 28 = Language_TypeScriptReact
+  toThriftEnum 29 = Language_JavaScriptReact
   toThriftEnum val = Language__UNKNOWN val
   fromThriftEnum Language_Cpp = 1
   fromThriftEnum Language_JavaScript = 2
@@ -5464,6 +6051,14 @@
   fromThriftEnum Language_Yaml = 19
   fromThriftEnum Language_Swift = 20
   fromThriftEnum Language_Angle = 21
+  fromThriftEnum Language_Chef = 22
+  fromThriftEnum Language_Ruby = 23
+  fromThriftEnum Language_C = 24
+  fromThriftEnum Language_VisualBasic = 25
+  fromThriftEnum Language_PHP = 26
+  fromThriftEnum Language_Dart = 27
+  fromThriftEnum Language_TypeScriptReact = 28
+  fromThriftEnum Language_JavaScriptReact = 29
   fromThriftEnum (Language__UNKNOWN val) = val
   allThriftEnumValues
     = [Language_Cpp, Language_JavaScript, Language_Hack,
@@ -5471,7 +6066,10 @@
        Language_Python, Language_PreProcessor, Language_Thrift,
        Language_Rust, Language_Buck, Language_Erlang, Language_TypeScript,
        Language_Go, Language_Kotlin, Language_CSharp, Language_GraphQL,
-       Language_Dataswarm, Language_Yaml, Language_Swift, Language_Angle]
+       Language_Dataswarm, Language_Yaml, Language_Swift, Language_Angle,
+       Language_Chef, Language_Ruby, Language_C, Language_VisualBasic,
+       Language_PHP, Language_Dart, Language_TypeScriptReact,
+       Language_JavaScriptReact]
   toThriftEnumEither 1 = Prelude.Right Language_Cpp
   toThriftEnumEither 2 = Prelude.Right Language_JavaScript
   toThriftEnumEither 3 = Prelude.Right Language_Hack
@@ -5493,6 +6091,14 @@
   toThriftEnumEither 19 = Prelude.Right Language_Yaml
   toThriftEnumEither 20 = Prelude.Right Language_Swift
   toThriftEnumEither 21 = Prelude.Right Language_Angle
+  toThriftEnumEither 22 = Prelude.Right Language_Chef
+  toThriftEnumEither 23 = Prelude.Right Language_Ruby
+  toThriftEnumEither 24 = Prelude.Right Language_C
+  toThriftEnumEither 25 = Prelude.Right Language_VisualBasic
+  toThriftEnumEither 26 = Prelude.Right Language_PHP
+  toThriftEnumEither 27 = Prelude.Right Language_Dart
+  toThriftEnumEither 28 = Prelude.Right Language_TypeScriptReact
+  toThriftEnumEither 29 = Prelude.Right Language_JavaScriptReact
   toThriftEnumEither val
     = Prelude.Left
         ("toThriftEnumEither: not a valid identifier for enum Language: "
diff --git a/glean/glass/test/regression/Glean/Glass/Regression/Buck.hs b/glean/glass/test/regression/Glean/Glass/Regression/Buck.hs
new file mode 100644
--- /dev/null
+++ b/glean/glass/test/regression/Glean/Glass/Regression/Buck.hs
@@ -0,0 +1,29 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module Glean.Glass.Regression.Buck (main) where
+
+import Test.HUnit
+
+import Glean.Glass.Regression.Snapshot as Glass
+import Glean.Glass.Regression.Tests
+import Glean.Glass.Types
+import Glean.Indexer.Python as Python
+
+
+main :: IO ()
+main = mainGlassSnapshot testName testPath testIndexer unitTests
+  where
+    testName = "glass-regression-buck"
+    testPath = "glean/glass/test/regression/tests/buck"
+    testIndexer = Python.indexer
+
+unitTests :: Getter -> [Test]
+unitTests get =
+  [ testDocumentSymbolListX (Path "buck_project/TEST_TARGETS") get
+  ]
diff --git a/glean/glass/test/regression/Glean/Glass/Regression/Cpp.hs b/glean/glass/test/regression/Glean/Glass/Regression/Cpp.hs
new file mode 100644
--- /dev/null
+++ b/glean/glass/test/regression/Glean/Glass/Regression/Cpp.hs
@@ -0,0 +1,103 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module Glean.Glass.Regression.Cpp (main) where
+
+import qualified Glean.Clang.Test.DerivePass as DerivePass
+import Test.HUnit
+
+import Data.Bifunctor
+import Data.Text (Text)
+
+import qualified Derive.Lib as DeriveLib
+import Glean.Glass.Types
+import Glean.Glass.Regression.Tests
+import Glean.Glass.Regression.Snapshot
+
+main :: IO ()
+main = mainGlassSnapshotGeneric testName testPath driver unitTests
+  where
+    driver = DerivePass.driver DeriveLib.allCxxPasses
+    testName = "glass-regression-cpp"
+    testPath = "glean/glass/test/regression/tests/cpp"
+
+unitTests :: Getter -> [Test]
+unitTests get =
+  [ testDocumentSymbolListX (Path "test.cpp") get
+  , testCppFindReferences get
+  , testSymbolIdLookup get
+  , testCppDescribeSymbolComments get
+  , testCppSearchRelated get
+  ]
+
+testCppFindReferences :: Getter -> Test
+testCppFindReferences get = TestLabel "findReferences" $ TestList [
+  "test/cpp//foo/S/.decl" --> [("test.cpp", 1)],
+  "test/cpp//foo/bar/T/.decl" --> [("test.cpp", 1)],
+  "test/cpp//foo/f/.decl" --> [("test.cpp", 1)],
+  "test/cpp//foo/bar/g/.decl" --> [("test.cpp", 1)],
+  -- struct/class includes destructors
+  "test/cpp//maybe/Something/.decl" --> [("test.cpp", 1)],
+
+  -- a definition occurrence is find-refereable now
+  "test/cpp//h" --> [("test.cpp", 1)]
+  ]
+  where
+    (-->) :: Text -> [(Text,Int)] -> Test
+    sym --> expected =
+      testFindReferences
+        (SymbolId sym)
+        (map (first Path) expected)
+        get
+
+testSymbolIdLookup :: Getter -> Test
+testSymbolIdLookup get = TestLabel "describeSymbol" $ TestList [
+  "test/cpp//foo/.decl" --> "test.cpp",
+  "test/cpp//foo/f/.decl" --> "test.cpp",
+  "test/cpp//foo/S/.decl" --> "test.cpp",
+  "test/cpp//foo/bar/.decl" --> "test.cpp",
+  "test/cpp//foo/bar/T/.decl" --> "test.cpp",
+  "test/cpp//foo/bar/g/.decl" --> "test.cpp"
+  ]
+  where
+    (-->) :: Text -> Text -> Test
+    sym --> expected =
+      testDescribeSymbolMatchesPath
+        (SymbolId sym)
+        (Path expected)
+        get
+
+testCppDescribeSymbolComments :: Getter -> Test
+testCppDescribeSymbolComments get = TestLabel "describeSymbolComments" $
+  TestList [
+    "test/cpp//foo/f/.decl" --> (18,1)
+  ]
+  where
+    (-->) :: Text -> (Int,Int) -> Test
+    sym --> expected =
+      testDescribeSymbolComments
+        (SymbolId sym)
+        expected
+        get
+
+testCppSearchRelated :: Getter -> Test
+testCppSearchRelated get = TestLabel "searchRelated" $ TestList $
+  "test/cpp//foo/.decl" `contains` "test/cpp//foo/S/.decl"
+  where
+    contains :: Text -> Text -> [Test]
+    contains = contains' False
+    contains' :: Bool -> Text -> Text -> [Test]
+    contains' recurse parent child =
+      [ testSearchRelated
+          (SymbolId parent)
+          recurse
+          RelationDirection_Child
+          RelationType_Contains
+          (SymbolId parent, SymbolId child)
+          get
+      ]
diff --git a/glean/glass/test/regression/Glean/Glass/Regression/Cpp/Github.hs b/glean/glass/test/regression/Glean/Glass/Regression/Cpp/Github.hs
new file mode 100644
--- /dev/null
+++ b/glean/glass/test/regression/Glean/Glass/Regression/Cpp/Github.hs
@@ -0,0 +1,19 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module Glean.Glass.Regression.Cpp.Github (main) where
+
+import qualified Glean.Glass.Regression.Cpp as Cpp
+import System.Environment
+
+main :: IO ()
+main = do
+  args <- getArgs
+  withArgs
+    (["--root", "glean/lang/codemarkup/tests/clang/glass/namespace1"] ++ args)
+    Cpp.main
diff --git a/glean/glass/test/regression/Glean/Glass/Regression/Flow.hs b/glean/glass/test/regression/Glean/Glass/Regression/Flow.hs
new file mode 100644
--- /dev/null
+++ b/glean/glass/test/regression/Glean/Glass/Regression/Flow.hs
@@ -0,0 +1,19 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module Glean.Glass.Regression.Flow (main) where
+
+import Glean.Indexer.Flow as Flow ( indexer )
+import Glean.Glass.Regression.Snapshot ( mainGlassSnapshot )
+
+main :: IO ()
+main = mainGlassSnapshot testName testPath testIndexer (const [])
+  where
+    testName = "glass-regression-flow"
+    testPath = "glean/glass/test/regression/tests/flow"
+    testIndexer = Flow.indexer
diff --git a/glean/glass/test/regression/Glean/Glass/Regression/Flow/Main.hs b/glean/glass/test/regression/Glean/Glass/Regression/Flow/Main.hs
new file mode 100644
--- /dev/null
+++ b/glean/glass/test/regression/Glean/Glass/Regression/Flow/Main.hs
@@ -0,0 +1,17 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module Glean.Glass.Regression.Flow.Main ( main ) where
+
+import System.Environment
+import qualified Glean.Glass.Regression.Flow as Glass
+
+main :: IO ()
+main = getArgs >>= \args -> withArgs (args ++["--root", path, "--write-root", "test"]) $ Glass.main
+  where
+    path = "glean/lang/codemarkup/tests/flow/cases/xrefs"
diff --git a/glean/glass/test/regression/Glean/Glass/Regression/Go.hs b/glean/glass/test/regression/Glean/Glass/Regression/Go.hs
new file mode 100644
--- /dev/null
+++ b/glean/glass/test/regression/Glean/Glass/Regression/Go.hs
@@ -0,0 +1,19 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module Glean.Glass.Regression.Go (main) where
+
+import Glean.Indexer.Go as Go
+import Glean.Glass.Regression.Snapshot
+
+main :: IO ()
+main = mainGlassSnapshot testName testPath testIndexer (const [])
+  where
+    testName = "glass-regression-go"
+    testPath = "glean/glass/test/regression/tests/go"
+    testIndexer = Go.indexer
diff --git a/glean/glass/test/regression/Glean/Glass/Regression/Go/Main.hs b/glean/glass/test/regression/Glean/Glass/Regression/Go/Main.hs
new file mode 100644
--- /dev/null
+++ b/glean/glass/test/regression/Glean/Glass/Regression/Go/Main.hs
@@ -0,0 +1,17 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module Glean.Glass.Regression.Go.Main ( main ) where
+
+import System.Environment
+import qualified Glean.Glass.Regression.Go as Glass
+
+main :: IO ()
+main = getArgs >>= \args -> withArgs (["--root", path] ++ args) Glass.main
+  where
+    path = "glean/lang/go/tests/cases/xrefs"
diff --git a/glean/glass/test/regression/Glean/Glass/Regression/Hack.hs b/glean/glass/test/regression/Glean/Glass/Regression/Hack.hs
new file mode 100644
--- /dev/null
+++ b/glean/glass/test/regression/Glean/Glass/Regression/Hack.hs
@@ -0,0 +1,19 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module Glean.Glass.Regression.Hack (main) where
+
+import Glean.Indexer.Hack as Hack
+import Glean.Glass.Regression.Snapshot as Glass
+
+main :: IO ()
+main = mainGlassSnapshot testName testPath testIndexer (const [])
+  where
+    testName = "glass-regression-hack"
+    testPath = "glean/glass/test/regression/tests/hack"
+    testIndexer = Hack.indexer
diff --git a/glean/glass/test/regression/Glean/Glass/Regression/Hack/Main.hs b/glean/glass/test/regression/Glean/Glass/Regression/Hack/Main.hs
new file mode 100644
--- /dev/null
+++ b/glean/glass/test/regression/Glean/Glass/Regression/Hack/Main.hs
@@ -0,0 +1,17 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module Glean.Glass.Regression.Hack.Main ( main ) where
+
+import System.Environment
+import qualified Glean.Glass.Regression.Hack as Glass
+
+main :: IO ()
+main = getArgs >>= \args -> withArgs (["--root", path] ++ args) Glass.main
+  where
+    path = "glean/lang/codemarkup/tests/hack/cases/xrefs"
diff --git a/glean/glass/test/regression/Glean/Glass/Regression/Haskell.hs b/glean/glass/test/regression/Glean/Glass/Regression/Haskell.hs
new file mode 100644
--- /dev/null
+++ b/glean/glass/test/regression/Glean/Glass/Regression/Haskell.hs
@@ -0,0 +1,25 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module Glean.Glass.Regression.Haskell (main) where
+
+import System.Environment
+import Glean.Indexer.Haskell as Haskell ( indexer )
+import Glean.Glass.Regression.Snapshot ( mainGlassSnapshot )
+
+main :: IO ()
+main = do
+  args <- getArgs
+  withArgs ("--arg=--store-src" : args) $
+    -- tells the indexer to produce src.FileContent facts, which support
+    -- include_content=true in documentSymbolIndex calls.
+    mainGlassSnapshot testName testPath testIndexer (const [])
+  where
+    testName = "glass-regression-haskell"
+    testPath = "glean/glass/test/regression/tests/haskell"
+    testIndexer = Haskell.indexer
diff --git a/glean/glass/test/regression/Glean/Glass/Regression/Haskell/Main.hs b/glean/glass/test/regression/Glean/Glass/Regression/Haskell/Main.hs
new file mode 100644
--- /dev/null
+++ b/glean/glass/test/regression/Glean/Glass/Regression/Haskell/Main.hs
@@ -0,0 +1,19 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module Glean.Glass.Regression.Haskell.Main ( main ) where
+
+import System.Environment
+import qualified Glean.Glass.Regression.Haskell as Glass
+
+main :: IO ()
+main = do
+  args <- getArgs
+  withArgs (["--root", path, "--with-ghc", "ghc"] ++ args) Glass.main
+  where
+    path = "glean/lang/codemarkup/tests/haskell/code"
diff --git a/glean/glass/test/regression/Glean/Glass/Regression/JavaLsif.hs b/glean/glass/test/regression/Glean/Glass/Regression/JavaLsif.hs
new file mode 100644
--- /dev/null
+++ b/glean/glass/test/regression/Glean/Glass/Regression/JavaLsif.hs
@@ -0,0 +1,19 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module Glean.Glass.Regression.JavaLsif (main) where
+
+import Glean.Indexer.JavaLsif as JavaLsif
+import Glean.Glass.Regression.Snapshot
+
+main :: IO ()
+main = mainGlassSnapshot testName testPath testIndexer (const [])
+  where
+    testName = "glass-regression-java-lsif"
+    testPath = "glean/glass/test/regression/tests/java-lsif"
+    testIndexer = JavaLsif.indexer
diff --git a/glean/glass/test/regression/Glean/Glass/Regression/JavaLsif/Main.hs b/glean/glass/test/regression/Glean/Glass/Regression/JavaLsif/Main.hs
new file mode 100644
--- /dev/null
+++ b/glean/glass/test/regression/Glean/Glass/Regression/JavaLsif/Main.hs
@@ -0,0 +1,17 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module Glean.Glass.Regression.JavaLsif.Main ( main ) where
+
+import System.Environment
+import qualified Glean.Glass.Regression.JavaLsif as Glass
+
+main :: IO ()
+main = getArgs >>= \args -> withArgs (args ++ ["--root", path]) Glass.main
+  where
+    path = "glean/lang/java-lsif/tests/cases/xrefs"
diff --git a/glean/glass/test/regression/Glean/Glass/Regression/Python.hs b/glean/glass/test/regression/Glean/Glass/Regression/Python.hs
new file mode 100644
--- /dev/null
+++ b/glean/glass/test/regression/Glean/Glass/Regression/Python.hs
@@ -0,0 +1,105 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module Glean.Glass.Regression.Python (main) where
+
+import Data.Bifunctor
+import Data.Text (Text)
+import Test.HUnit
+
+import Glean
+import Glean.LocalOrRemote
+import Glean.Indexer.Python as Python
+import Glean.Util.Some
+
+import Glean.Glass.Regression.Snapshot
+import Glean.Glass.Types
+import Glean.Glass.Regression.Tests
+
+main :: IO ()
+main = mainGlassSnapshot testName testPath testIndexer unitTests
+  where
+    testName = "glass-regression-python"
+    testPath = "glean/glass/test/regression/tests/python"
+    testIndexer = Python.indexer
+
+unitTests :: Getter -> [Test]
+unitTests get =
+  [ testDocumentSymbolListX (Path "all.py") get
+  , testSymbolIdLookup get
+  , testPythonFindReferences get
+  -- Python doesn't support comments yet, so no testDescribeSymbolComments
+  ]
+
+testSymbolIdLookup :: IO (Some LocalOrRemote, Repo) -> Test
+testSymbolIdLookup get = TestLabel "describeSymbol" $ TestList [
+  -- class
+  "test/py/big_lib.big_func" --> "big_lib/__init__.py",
+  "test/py/big_lib.big_var" --> "big_lib/__init__.py",
+  "test/py/lib.HelperClass" --> "lib.py",
+  "test/py/lib.HelperClass.value" --> "lib.py",
+  "test/py/lib.HelperClass.method" --> "lib.py",
+  "test/py/lib.HelperClass.another_method" --> "lib.py",
+  "test/py/lib.helper_func" --> "lib.py",
+  "test/py/main.f" --> "main.py",
+  "test/py/main.g" --> "main.py",
+  "test/py/shadow.ShadowClass" --> "shadow.py",
+  "test/py/shadow.ShadowClass.big_func" --> "shadow.py",
+  "test/py/shadow.ShadowClass.other_var" --> "shadow.py",
+  "test/py/shadow.local_var" --> "shadow.py",
+  "test/py/shadow.big_func" --> "shadow.py",
+  "test/py/shadow.other_var" --> "shadow.py",
+  "test/py/all.LocalClass" --> "all.py"
+  ]
+  where
+    (-->) :: Text -> Text -> Test
+    sym --> expected =
+      testDescribeSymbolMatchesPath
+        (SymbolId sym)
+        (Path expected)
+        get
+
+testPythonFindReferences :: IO (Some LocalOrRemote, Repo) -> Test
+testPythonFindReferences get = TestLabel "findReferences" $ TestList [
+  "test/py/big_lib.big_func" --> [
+    ("all.py",2),
+    ("big_lib/relative.py",2),
+    ("lib.py",1),
+    ("main.py",2),
+    ("shadow.py",3) ],
+  "test/py/big_lib.big_var" --> [
+    ("all.py",3),
+    ("as.py",1),
+    ("big_lib/__init__.py",1),
+    ("shadow.py",3) ],
+  "test/py/lib.HelperClass" --> [
+    ("all.py",5),
+    ("as.py",1),
+    ("lib.py",5),
+    ("main.py",4) ],
+  "test/py/lib.HelperClass.value" --> [],
+  "test/py/lib.HelperClass.method" --> [],
+  "test/py/lib.HelperClass.another_method" --> [],
+  "test/py/lib.helper_func" --> [("main.py",2)],
+  "test/py/main.f" --> [("main.py",1)],
+  "test/py/main.g" --> [],
+  "test/py/shadow.ShadowClass" --> [],
+  "test/py/shadow.ShadowClass.big_func" --> [("shadow.py",1)],
+  "test/py/shadow.ShadowClass.other_var" --> [],
+  "test/py/shadow.local_var" --> [("shadow.py",2)],
+  "test/py/shadow.big_func" --> [("shadow.py",2)],
+  "test/py/shadow.other_var" --> [],
+  "test/py/all.LocalClass" --> [("all.py",1)]
+  ]
+  where
+    (-->) :: Text -> [(Text,Int)] -> Test
+    sym --> expected =
+      testFindReferences
+        (SymbolId sym)
+        (map (first Path) expected)
+        get
diff --git a/glean/glass/test/regression/Glean/Glass/Regression/RustLsif.hs b/glean/glass/test/regression/Glean/Glass/Regression/RustLsif.hs
new file mode 100644
--- /dev/null
+++ b/glean/glass/test/regression/Glean/Glass/Regression/RustLsif.hs
@@ -0,0 +1,28 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module Glean.Glass.Regression.RustLsif (main) where
+
+import Glean.Indexer.RustLsif as RustLsif
+import Test.HUnit
+
+import Glean.Glass.Regression.Snapshot
+import Glean.Glass.Regression.Tests
+import Glean.Glass.Types
+
+main :: IO ()
+main = mainGlassSnapshot testName testPath testIndexer unitTests
+  where
+    testName = "glass-regression-rust-lsif"
+    testPath = "glean/glass/test/regression/tests/rust-lsif"
+    testIndexer = RustLsif.indexer
+
+unitTests :: Getter -> [Test]
+unitTests get =
+  [ testDocumentSymbolListX (Path "src/lib.rs") get
+  ]
diff --git a/glean/glass/test/regression/Glean/Glass/Regression/RustLsif/Main.hs b/glean/glass/test/regression/Glean/Glass/Regression/RustLsif/Main.hs
new file mode 100644
--- /dev/null
+++ b/glean/glass/test/regression/Glean/Glass/Regression/RustLsif/Main.hs
@@ -0,0 +1,17 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module Glean.Glass.Regression.RustLsif.Main ( main ) where
+
+import System.Environment
+import qualified Glean.Glass.Regression.RustLsif as Glass
+
+main :: IO ()
+main = getArgs >>= \args -> withArgs (["--root", path] ++ args) Glass.main
+  where
+    path = "glean/lang/rust-lsif/tests/cases/xrefs"
diff --git a/glean/glass/test/regression/Glean/Glass/Regression/Thrift.hs b/glean/glass/test/regression/Glean/Glass/Regression/Thrift.hs
new file mode 100644
--- /dev/null
+++ b/glean/glass/test/regression/Glean/Glass/Regression/Thrift.hs
@@ -0,0 +1,27 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module Glean.Glass.Regression.Thrift (main) where
+
+import Test.HUnit
+
+import Glean.Indexer.Fbthrift as Fbthrift
+
+import Glean.Glass.Types
+import Glean.Glass.Regression.Snapshot
+import Glean.Glass.Regression.Tests
+
+main :: IO ()
+main = mainGlassSnapshot testName testPath testIndexer unitTests
+  where
+    testName = "glass-regression-thrift"
+    testPath = "glean/glass/test/regression/tests/thrift"
+    testIndexer = Fbthrift.indexer
+
+unitTests :: Getter -> [Test]
+unitTests get = [testDocumentSymbolListX (Path "lib.thrift") get]
diff --git a/glean/glass/test/regression/Glean/Glass/Regression/TypeScript.hs b/glean/glass/test/regression/Glean/Glass/Regression/TypeScript.hs
new file mode 100644
--- /dev/null
+++ b/glean/glass/test/regression/Glean/Glass/Regression/TypeScript.hs
@@ -0,0 +1,19 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module Glean.Glass.Regression.TypeScript (main) where
+
+import Glean.Glass.Regression.Snapshot as Glass
+import Glean.Indexer.Typescript as Typescript
+
+main :: IO ()
+main = mainGlassSnapshot testName testPath testIndexer (const [])
+  where
+    testName = "glass-regression-typescript"
+    testPath = "glean/glass/test/regression/tests/typescript"
+    testIndexer = Typescript.indexer
diff --git a/glean/glass/test/regression/Glean/Glass/Regression/TypeScript/Main.hs b/glean/glass/test/regression/Glean/Glass/Regression/TypeScript/Main.hs
new file mode 100644
--- /dev/null
+++ b/glean/glass/test/regression/Glean/Glass/Regression/TypeScript/Main.hs
@@ -0,0 +1,17 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module Glean.Glass.Regression.TypeScript.Main ( main ) where
+
+import System.Environment
+import qualified Glean.Glass.Regression.TypeScript as Glass
+
+main :: IO ()
+main = getArgs >>= \args -> withArgs (["--root", path] ++ args) Glass.main
+  where
+    path = "glean/lang/typescript-lsif/tests/cases/xrefs"
diff --git a/glean/glass/test/regression/lib/Glean/Glass/Regression/Snapshot.hs b/glean/glass/test/regression/lib/Glean/Glass/Regression/Snapshot.hs
new file mode 100644
--- /dev/null
+++ b/glean/glass/test/regression/lib/Glean/Glass/Regression/Snapshot.hs
@@ -0,0 +1,450 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+{-# LANGUAGE ApplicativeDo #-}
+
+--
+-- Simple snapshot testing framework for Glass methods
+--
+
+module Glean.Glass.Regression.Snapshot (
+    mainGlassSnapshot,
+    mainGlassSnapshotGeneric,
+    mainGlassSnapshotXLang,
+    Output, Getter
+  ) where
+
+import Data.Aeson
+import qualified Data.Aeson as Aeson
+import qualified Data.Aeson.Types as Aeson ( parse )
+import Data.Default
+import Data.Foldable ( foldl' )
+import Data.List ( sort )
+import Data.Text ( Text )
+import System.Directory ( copyFile, listDirectory )
+import System.Exit ( ExitCode(ExitFailure, ExitSuccess) )
+import System.FilePath
+import System.IO.Temp (withSystemTempDirectory)
+import System.Process ( readProcessWithExitCode )
+import Options.Applicative hiding ( Success )
+import Test.HUnit ( Test(..), assertFailure )
+import qualified Data.Aeson.Encode.Pretty as J
+import qualified Data.ByteString as S
+import qualified Data.ByteString.Lazy as B
+import qualified Data.Map.Strict as Map
+import qualified Data.Yaml as Yaml
+import Util.List ( uniq )
+import Data.Either.Extra
+
+import qualified Thrift.Protocol
+import qualified Thrift.Protocol.JSON as Thrift
+
+import Glean ( Repo )
+import Glean.Indexer
+import Glean.LocalOrRemote ( LocalOrRemote )
+import Glean.Util.Some ( Some(..) )
+import Glean.Regression.Test
+import qualified Glean.Indexer as Glean
+import Glean.Regression.Snapshot.Options ( Config(..) )
+
+import qualified Glean.Glass.Handler.Documents as Glass
+import qualified Glean.Glass.Handler.Symbols as Glass
+import qualified Glean.Glass.Handler.Cxx as Glass
+import Glean.Glass.Types as Glass
+import Glean.Glass.Env as Glass ( Env )
+import Glean.Glass.Regression.Util as Glass ( withTestEnv )
+import qualified Glean.Regression.Snapshot.Driver as Glean
+import qualified Glean.Glass.SymbolId as Glass
+import qualified Glean.Glass.SymbolId.Cxx.Parse as Cxx
+
+-- queries are just thrift method names, and the toJSON string of the
+-- args you want to pass
+data Query
+  = Query {
+      action :: Text, -- ^ name of glass.thrift method
+      args :: Aeson.Value, -- json object of args to method
+      request_args :: Maybe Aeson.Value -- json object of request args to method
+  } deriving (Show)
+
+instance FromJSON Query where
+  parseJSON = withObject "query" $ \v -> Query
+    <$> v .: "action"
+    <*> v .: "args"
+    <*> v .:? "request_args"
+
+type Output = FilePath
+
+type Getter = IO (Some LocalOrRemote, Repo)
+
+data SnapshotConfig = SnapshotConfig
+  { cfgIgnoreMatchingLines :: Maybe String
+  }
+
+configParser :: Parser SnapshotConfig
+configParser = SnapshotConfig
+  <$> optional (strOption
+       ( long "ignore-matching-lines"
+      <> metavar "REGEX"
+      <> help "Ignore changes where all lines match the regex" ))
+
+findQueries :: FilePath -> IO (Map.Map String FilePath)
+findQueries root = do
+  files <- listDirectory root
+  return $ Map.fromList
+    [ (takeBaseName file, root </> file)
+    | file <- files
+    , ".query" `isExtensionOf` file
+    ]
+
+parseQuery :: FilePath -> IO Query
+parseQuery qfile = do
+  r <- Yaml.decodeFileEither qfile
+  case r of
+    Left err -> error
+      $ qfile ++ ": invalid query - " ++ Yaml.prettyPrintParseException err
+    Right q ->
+      return q
+
+mainGlassSnapshot
+  :: String
+  -> FilePath
+  -> Glean.Indexer opts
+  -> (Getter -> [Test])
+  -> IO ()
+mainGlassSnapshot testName testRoot indexer extras =
+  mainGlassSnapshot_ testName testRoot
+    (Glean.driverFromIndexer indexer) extras
+
+mainGlassSnapshotGeneric
+  :: String
+  -> FilePath
+  -> Glean.Driver opts
+  -> (Getter -> [Test])
+  -> IO ()
+mainGlassSnapshotGeneric testName testRoot driver extras =
+  mainGlassSnapshot_ testName testRoot driver extras
+
+mainGlassSnapshot_
+  :: String
+  -> FilePath
+  -> Glean.Driver opts
+  -> (Getter -> [Test])
+  -> IO ()
+mainGlassSnapshot_ testName testRoot driver extras = do
+  qs <- findQueries testRoot
+  withOutput cfgOutput $ \temp ->
+    mainTestIndexGeneric driver configParser testName $ \snapConfig _ config _ get ->
+      TestList $ testAll snapConfig config temp qs get : extras get
+  where
+    cfgOutput = Nothing
+
+    withOutput (Just out) f = f out
+    withOutput Nothing f = withSystemTempDirectory testName f
+
+mainGlassSnapshotXLang
+  :: String
+  -> FilePath
+  -> (Glean.Driver opt, Text)
+  -> (Indexer opts, Text)
+  -> IO ()
+mainGlassSnapshotXLang testName testRoot driver indexer = do
+  qs <- findQueries testRoot
+  withOutput cfgOutput $ \temp ->
+    mainTestIndexXlang driver indexer testName configParser $
+      \snapConfig config get -> TestList [testAll snapConfig config temp qs get]
+  where
+    cfgOutput = Nothing
+
+    withOutput (Just out) f = f out
+    withOutput Nothing f = withSystemTempDirectory testName f
+
+testAll :: SnapshotConfig -> Config -> FilePath -> Map.Map String FilePath -> Getter -> Test
+testAll snapConfig config outDir queries getter = TestList
+  [ mkTest snapConfig config getter name qfile outDir
+  | (name, qfile) <- Map.toList queries
+  ]
+
+mkTest :: SnapshotConfig -> Config -> Getter -> String -> FilePath -> FilePath -> Test
+mkTest SnapshotConfig{..} Config{..} get name qfile tempDir = TestLabel name $ TestCase $ do
+  query <- parseQuery qfile
+  let actual = tempDir </> replaceExtension (takeFileName qfile) "out"
+      expected = replaceExtension qfile "out"
+  (backend, _repo) <- get
+  Glass.withTestEnv backend $ \env -> do
+    evalQuery env qfile query actual
+    case cfgReplace of
+      Just _ -> copyFile actual expected
+      Nothing -> diff actual expected cfgIgnoreMatchingLines
+
+
+evalQuery :: Glass.Env -> FilePath -> Query -> FilePath -> IO ()
+evalQuery glassEnv qFile Query{..} oFile = case action of
+  "documentSymbolListX" -> withObjectArgs qFile oFile args request_args
+    (\req opts -> Glass.documentSymbolListX glassEnv req opts)
+  "documentSymbolIndex" -> withObjectArgs qFile oFile args request_args
+    (\req opts -> Glass.documentSymbolIndex glassEnv req opts)
+  "findReferenceRanges" -> withSymbolId oFile args
+    (Glass.findReferenceRanges glassEnv)
+  "symbolLocation" -> withSymbolId oFile args
+    (Glass.symbolLocation glassEnv)
+  "describeSymbol" -> withSymbolId oFile args
+    (Glass.describeSymbol glassEnv)
+  "resolveSymbols" -> withObjectArgs qFile oFile args request_args
+    (Glass.resolveSymbols glassEnv)
+  "searchSymbol" ->  withObjectArgs qFile oFile args request_args
+    (Glass.searchSymbol glassEnv)
+  "searchRelated" -> withObjectAndSymbolId qFile oFile args
+    (Glass.searchRelated glassEnv)
+  "searchRelatedNeighborhood" -> withSymbolId oFile args
+    (\sym opts -> Glass.searchRelatedNeighborhood glassEnv sym opts
+       def { relatedNeighborhoodRequest_hide_uninteresting = True } )
+  "fileIncludeLocations" -> withObjectArgs qFile oFile args request_args
+    (Glass.fileIncludeLocations glassEnv)
+  "usrToDefinition" -> withObjectArgs qFile oFile args request_args
+    (\x y -> fst <$> Glass.usrToDefinition glassEnv x y)
+  -- this lists all symbol ids in a file and then validates them
+  -- wrapper for validating C++
+  "validateCxxSymbolIds" -> withObjectArgs qFile oFile args request_args
+    (validateCxxSymbols glassEnv)
+
+  _ -> error $ "Invalid action: " <> show action
+
+-- | Take all the symbol ids and validate them as C++ symbol id syntax
+-- Return the errors and any successes as records
+validateCxxSymbols
+  :: Env -> DocumentSymbolsRequest -> RequestOptions
+  -> IO [Either [Text] Cxx.SymbolEnv]
+validateCxxSymbols glassEnv req def = do
+  res <- Glass.documentSymbolListX glassEnv req def
+  let defns = map Glass.definitionSymbolX_sym
+        (Glass.documentSymbolListXResult_definitions res)
+      refs = map Glass.referenceRangeSymbolX_sym
+        (Glass.documentSymbolListXResult_references res)
+      syms = uniq (defns ++ refs)
+      toks = map getTokens (filter ((== Language_Cpp) . getLanguage) -- only cxx ids thx
+                (rights (map Glass.symbolTokens syms)))
+      getLanguage (_, lang, _, _) = lang
+      getTokens (_, _, tokens, _) = tokens
+  return (map Cxx.validateSymbolId toks)
+
+decodeObjectAsThriftJson
+  :: (Thrift.Protocol.ThriftStruct a, ToJSON a)
+  => Aeson.Value -> Either String a
+decodeObjectAsThriftJson
+  = Thrift.deserializeJSON . S.concat . B.toChunks. encode
+
+withSymbolId
+  :: (ToJSON a, DeterministicResponse a)
+  => FilePath -> Value -> (SymbolId -> RequestOptions -> IO a) -> IO ()
+withSymbolId oFile args f = do
+  req <- case fromJSON args of
+          Success sym -> pure (SymbolId sym)
+          Error str -> assertFailure $ "Invalid SymbolId: " <> str
+  res <- f req def
+  writeResult oFile res
+
+withObjectArgs
+ :: (Thrift.Protocol.ThriftSerializable req,
+     Thrift.Protocol.ThriftSerializable opts,
+     ToJSON a, Default opts, DeterministicResponse a)
+ => FilePath
+ -> FilePath
+ -> Value
+ -> Maybe Value
+ -> (req -> opts -> IO a) -> IO ()
+withObjectArgs qFile oFile args rargs f = do
+  req <- parseAsObject qFile args
+  opts <- case rargs of
+    Nothing -> return def
+    Just rargs -> parseAsObject qFile rargs
+  res <- f req opts
+  writeResult oFile res
+
+withObjectAndSymbolId
+ :: (Thrift.Protocol.ThriftStruct req,
+    ToJSON req, ToJSON a, DeterministicResponse a)
+ => FilePath
+ -> FilePath
+ -> Value
+ -> (SymbolId -> RequestOptions -> req -> IO a) -> IO ()
+withObjectAndSymbolId qFile oFile args f = do
+  let argParser = withObject "symbol-and-request" $ \o -> do
+        sym <- o .: "symbol"
+        req <- o .: "request"
+        pure (SymbolId sym, req)
+
+  (sym, rawReq) <- case Aeson.parse argParser args of
+    Success (a, b) -> pure (a,b)
+    Error str -> assertFailure $
+        "Invalid json in " <> qFile <> " : " <> str
+
+  req <- case decodeObjectAsThriftJson rawReq of
+          Left str -> assertFailure $
+            "Invalid args in " <> qFile <> " : " <> str
+          Right req -> pure req
+  res <- f sym def req
+  writeResult oFile res
+
+parseAsObject
+  :: (Thrift.Protocol.ThriftStruct a, ToJSON a) => String -> Value -> IO a
+parseAsObject file args = case decodeObjectAsThriftJson args of
+  Left str -> assertFailure $ "Invalid args in " <> file <> " : " <> str
+  Right req -> pure req
+
+writeResult :: (ToJSON a, DeterministicResponse a) => FilePath -> a -> IO ()
+writeResult oFile res = B.writeFile oFile content
+  where
+    generatedTag = '@':"generated"
+    content = J.encodePretty' cfg (generatedTag,det res)
+
+    cfg = J.defConfig {
+      J.confCompare = compare
+    }
+
+class DeterministicResponse a where
+  det :: a -> a
+
+instance DeterministicResponse Revision where
+  det _ = Revision "testhash"
+
+instance DeterministicResponse (Either [Text] Cxx.SymbolEnv) where
+  det = id
+
+instance DeterministicResponse DocumentSymbolListXResult where
+  det (DocumentSymbolListXResult refs defs _rev truncated digest fileMap
+      contentMatch attributes content) =
+    DocumentSymbolListXResult (det refs) (det defs) (Revision "testhash")
+      truncated
+      digest
+      fileMap
+      -- n.b. don't want to include any test group revision tags
+      contentMatch
+      attributes
+      content
+
+instance DeterministicResponse DocumentSymbolIndex where
+  det (DocumentSymbolIndex syms _rev size truncated digest fileMap
+      contentMatch attributes content) =
+    DocumentSymbolIndex (Map.map sort syms) (Revision "testhash") size truncated
+      digest
+      fileMap
+      contentMatch
+      attributes
+      content
+
+instance DeterministicResponse SymbolSearchResult where
+  det (SymbolSearchResult syms deets) =
+    SymbolSearchResult (det syms) (det deets)
+
+instance (DeterministicResponse a, Ord a) => DeterministicResponse [a] where
+  det = sort . map det
+
+instance DeterministicResponse Range where det = id
+instance DeterministicResponse LocationRange where det = id
+instance DeterministicResponse Glass.QualifiedName where det = id
+instance DeterministicResponse SymbolLocation where
+  det (SymbolLocation loc _rev) = SymbolLocation (det loc) (Revision "testhash")
+
+instance DeterministicResponse SymbolResolution where
+  det (SymbolResolution qname loc rev kind lang sig) =
+    SymbolResolution (det qname) (det loc)
+      (det rev) kind lang sig
+
+instance DeterministicResponse SearchRelatedResult where
+  det (SearchRelatedResult xs ys) = -- to edit the desc hash
+    SearchRelatedResult (det xs) (det ys)
+instance DeterministicResponse RelatedNeighborhoodResult where
+  det (RelatedNeighborhoodResult as bs cs ds es fs gs hs is js) =
+    RelatedNeighborhoodResult (det as) (det bs) (det cs) (det ds)
+      (det es) (det fs) (det gs) (det hs) (det is) (det js)
+instance DeterministicResponse RelatedSymbols where
+  det = id
+instance DeterministicResponse InheritedSymbols where
+  det (InheritedSymbols a xs) = InheritedSymbols a (det xs)
+instance DeterministicResponse SymbolId where
+  det = id
+instance DeterministicResponse DefinitionSymbolX where
+  det = id
+instance DeterministicResponse ReferenceRangeSymbolX where
+  det = id
+instance DeterministicResponse SymbolBasicDescription where
+  det = id
+instance DeterministicResponse (Map.Map Text SymbolBasicDescription) where
+  det = Map.map det
+instance DeterministicResponse SymbolDescription where
+  det sd = sd
+    { symbolDescription_repo_hash = Revision "testhash"
+    , symbolDescription_contains_relation = Glass.RelationDescription
+        { relationDescription_firstParent = Just $ SymbolId "nondeterministic"
+        , relationDescription_firstChild = Just $ SymbolId "nondeterministic"
+        , relationDescription_hasMoreChildren =
+            relationDescription_hasMoreChildren $
+              symbolDescription_contains_relation sd
+        , relationDescription_hasMoreParents =
+            relationDescription_hasMoreParents $
+              symbolDescription_contains_relation sd
+        , relationDescription_firstParentName = Nothing
+        , relationDescription_firstChildName = Nothing
+        }
+    , symbolDescription_extends_relation = Glass.RelationDescription
+        { relationDescription_firstParent = Just $ SymbolId "nondeterministic"
+        , relationDescription_firstChild = Just $ SymbolId "nondeterministic"
+        , relationDescription_hasMoreChildren =
+           relationDescription_hasMoreChildren $
+            symbolDescription_extends_relation sd
+        , relationDescription_hasMoreParents =
+           relationDescription_hasMoreParents $
+            symbolDescription_extends_relation sd
+        , relationDescription_firstParentName = Nothing
+        , relationDescription_firstChildName = Nothing
+        }
+    }
+instance DeterministicResponse (Map.Map Text SymbolDescription) where
+  det = Map.map det
+instance DeterministicResponse SymbolResult where
+  det = id
+instance DeterministicResponse FileIncludeLocationResults where
+  det (FileIncludeLocationResults _rev (XRefFileList refs)) =
+    FileIncludeLocationResults
+     (Revision "testhash")
+     (XRefFileList (sort (map det refs)))
+instance DeterministicResponse FileIncludeXRef where
+  det (FileIncludeXRef path incs) =
+    FileIncludeXRef path (sort incs)
+
+instance DeterministicResponse SymbolResolutionFailure where
+  det = id
+
+instance DeterministicResponse (Maybe SymbolResolutionFailure) where
+  det Nothing = Nothing
+  det (Just x) = Just (det x)
+
+instance DeterministicResponse ResolveSymbolsResult where
+  det (ResolveSymbolsResult syms) =
+    ResolveSymbolsResult (det syms)
+instance DeterministicResponse ResolvedSymbol where
+  det (ResolvedSymbol sym resolutions failure) =
+    ResolvedSymbol (det sym) (det resolutions) (det failure)
+instance DeterministicResponse USRSymbolDefinition where
+  det (USRSymbolDefinition location sym revision) =
+    USRSymbolDefinition (det location) (det sym) (det revision)
+
+diff :: FilePath -> FilePath -> Maybe String -> IO ()
+diff outGenerated outSpec ignoreMatchingLines = do
+  let args =
+        let outargs = [outGenerated, outSpec] in
+        foldl' (\args l -> ("--ignore-matching-lines=" <> l) : args)
+          outargs ignoreMatchingLines
+  (e, sout, serr) <- readProcessWithExitCode "diff" args ""
+  case e of
+    ExitSuccess -> return ()
+    ExitFailure n -> assertFailure $
+      takeFileName outGenerated ++
+        if n == 1
+          then ": unexpected result\n" ++ sout
+          else ": fatal error\n" ++ serr
diff --git a/glean/glass/test/regression/lib/Glean/Glass/Regression/Tests.hs b/glean/glass/test/regression/lib/Glean/Glass/Regression/Tests.hs
new file mode 100644
--- /dev/null
+++ b/glean/glass/test/regression/lib/Glean/Glass/Regression/Tests.hs
@@ -0,0 +1,196 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module Glean.Glass.Regression.Tests (
+  testDocumentSymbolListX,
+  testDescribeSymbolMatchesPath,
+  testFindReferences,
+  testDescribeSymbolComments,
+  testDescribeSymbolHasAnnotations,
+  testDescribeSymbolHasVisibility,
+  testSearchRelated,
+  testSymbolLocation,
+) where
+
+import Data.Default
+import Data.List
+import qualified Data.Map as Map
+import Data.Text (Text)
+import qualified Data.Text as Text
+import Test.HUnit hiding (Path)
+
+import Glean
+import Glean.LocalOrRemote
+import Glean.Util.Some
+
+import Glean.Glass.Handler.Documents
+import Glean.Glass.Handler.Symbols
+import Glean.Glass.Types as Glass
+
+import Glean.Glass.Regression.Util
+
+type Getter = IO (Some LocalOrRemote, Repo)
+
+
+-- | Test that documentSymbolListX returns non-empty definitions and
+-- references for the given Path.
+testDocumentSymbolListX :: Path -> Getter -> Test
+testDocumentSymbolListX path get =
+  TestLabel "testDocumentSymbolListX" $ TestCase $ do
+    (backend, _repo) <- get
+    withTestEnv backend $ \env -> do
+      let req = DocumentSymbolsRequest
+            { documentSymbolsRequest_repository = RepoName "test"
+            , documentSymbolsRequest_filepath = path
+            , documentSymbolsRequest_range = Nothing
+            , documentSymbolsRequest_include_refs = True
+            , documentSymbolsRequest_include_xlang_refs = False
+            , documentSymbolsRequest_include_content = False
+            }
+      res <- documentSymbolListX env req def
+      assertBool "documentSymbolListX"
+        (not (null (documentSymbolListXResult_references res)) &&
+         not (null (documentSymbolListXResult_definitions res)))
+
+testSymbolLocation :: SymbolId -> Path -> Getter -> Test
+testSymbolLocation sym@(SymbolId name) path get =
+  TestLabel (Text.unpack name) $ TestCase $ do
+    (backend, _repo) <- get
+    withTestEnv backend $ \env -> do
+      SymbolLocation{..} <- symbolLocation env sym def
+      let LocationRange{..} = symbolLocation_location
+      assertEqual "symbolLocation Path matches" locationRange_filepath path
+
+-- | Test that both describeSymbol and symbolLocation for a SymbolId
+-- find the symbol in a given Path.
+testDescribeSymbolMatchesPath
+  :: SymbolId -> Path -> Getter -> Test
+testDescribeSymbolMatchesPath sym@(SymbolId name) path get =
+  TestLabel (Text.unpack name) $ TestCase $ do
+    (backend, _repo) <- get
+    withTestEnv backend $ \env -> do
+      SymbolDescription{..} <- describeSymbol env sym def
+      assertEqual "describeSymbol Path matches"
+        (symbolPath_filepath symbolDescription_location)
+        path
+      SymbolLocation{..} <- symbolLocation env sym def
+      let LocationRange{..} = symbolLocation_location
+      assertEqual "symbolLocation Path matches" locationRange_filepath path
+
+-- | Test that both describeSymbol has expected comment
+testDescribeSymbolComments
+  :: SymbolId -> (Int, Int) -> Getter -> Test
+testDescribeSymbolComments sym@(SymbolId name) (line, col) get =
+  TestLabel (Text.unpack name) $ TestCase $ do
+    (backend, _repo) <- get
+    withTestEnv backend $ \env -> do
+      SymbolDescription{..} <- describeSymbol env sym def
+      assertEqual "describeSymbol Comment start matches"
+        [(fromIntegral line, fromIntegral col)] $
+        zip
+          (range_lineBegin . locationRange_range . symbolComment_location
+            <$> symbolDescription_pretty_comments)
+          (range_columnBegin . locationRange_range . symbolComment_location
+            <$> symbolDescription_pretty_comments)
+
+-- | Test that describeSymbol has specific annotations
+testDescribeSymbolHasAnnotations
+  :: SymbolId -> [(Text, Text)] -> Getter -> Test
+testDescribeSymbolHasAnnotations sym@(SymbolId name) anns get =
+  TestLabel (Text.unpack name) $ TestCase $ do
+    (backend, _repo) <- get
+    withTestEnv backend $ \env -> do
+      SymbolDescription{..} <- describeSymbol env sym def
+      assertEqual "describeSymbol Annotations equal"
+        anns
+        (maybe []
+          (map $ \Annotation{..} -> (annotation_name, annotation_source))
+          symbolDescription_annotations)
+
+-- | Test that describeSymbol has a specific visibility
+testDescribeSymbolHasVisibility
+  :: SymbolId -> Visibility -> Getter -> Test
+testDescribeSymbolHasVisibility sym@(SymbolId name) vis get =
+  TestLabel (Text.unpack name) $ TestCase $ do
+    (backend, _repo) <- get
+    withTestEnv backend $ \env -> do
+      SymbolDescription{..} <- describeSymbol env sym def
+      assertEqual "describeSymbol Visibility equal"
+        (Just vis)
+        symbolDescription_visibility
+
+-- | Test findReferences and findReferenceRanges: given a SymbolId check
+-- that the number of references returned for each Path matches the input.
+testFindReferences
+  :: SymbolId -> [(Path,Int)] -> Getter -> Test
+testFindReferences sym@(SymbolId name) paths get =
+  TestLabel (Text.unpack name) $ TestCase $ do
+    (backend, _repo) <- get
+    withTestEnv backend $ \env -> do
+      locs <- findReferenceRanges env sym def
+      let
+        assertLocsEq s results =
+          assertEqual s
+            (Map.fromList paths )
+            (Map.fromList
+              [ (head paths, length paths) | paths <- group (sort results) ])
+      assertLocsEq "findReferences Path matches" $
+        map locationRange_filepath locs
+
+-- | Test search related contains an edge
+testSearchRelated
+  :: SymbolId
+  -> Bool
+  -> RelationDirection
+  -> RelationType
+  -> (SymbolId, SymbolId)
+  -> Getter -> Test
+testSearchRelated sym recurse dir rel (parent, child) get =
+  TestLabel label $ TestCase $ do
+    (backend, _repo) <- get
+    withTestEnv backend $ \env -> do
+      SearchRelatedResult{..} <-
+        searchRelated env sym def SearchRelatedRequest {..}
+      let
+        actual = -- better error messages
+          if
+            any
+              ((==) relatedSymbols_parent . Glass.relatedSymbols_parent)
+              searchRelatedResult_edges &&
+            any
+              ((==) relatedSymbols_child . Glass.relatedSymbols_child)
+              searchRelatedResult_edges
+          then [(parent, arrow, child)]
+          else
+            map
+              (\(RelatedSymbols p c _) -> (p, arrow, c))
+              searchRelatedResult_edges
+      assertEqual
+        "searchRelated contains edge" [(parent, arrow, child)] actual
+  where
+    label =
+      showSymbolId sym <>
+      ": " <>
+      showSymbolId parent <>
+      " " <>
+      arrow <>
+      " " <>
+      showSymbolId child
+    showSymbolId (SymbolId sym) = Text.unpack sym
+    searchRelatedRequest_relatedBy = rel
+    searchRelatedRequest_relation = dir
+    searchRelatedRequest_recursive = recurse
+    searchRelatedRequest_filter = Nothing
+    searchRelatedRequest_detailedResults = False -- don't compute details
+    relatedSymbols_parent = parent
+    relatedSymbols_child = child
+    arrowTail = if recurse then "-/ /-" else "--"
+    arrow = case dir of
+      RelationDirection_Parent -> arrowTail <> show rel <> "->"
+      RelationDirection_Child -> "<-" <> show rel <> arrowTail
+      RelationDirection__UNKNOWN{} -> "??" <> show rel <> "??"
diff --git a/glean/glass/test/regression/lib/Glean/Glass/Regression/Util.hs b/glean/glass/test/regression/lib/Glean/Glass/Regression/Util.hs
new file mode 100644
--- /dev/null
+++ b/glean/glass/test/regression/lib/Glean/Glass/Regression/Util.hs
@@ -0,0 +1,55 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module Glean.Glass.Regression.Util (withTestEnv, withTestEnvScm) where
+
+import qualified Haxl.Core as Haxl
+import Util.EventBase
+import Glean.Util.ConfigProvider
+import Glean.Impl.TestConfigProvider () -- don't use the real ConfigProvider in tests
+import Facebook.Fb303 ( withFb303 )
+import Logger.IO (withLogger)
+
+import Glean
+import Glean.Util.Some
+import Util.Time
+
+import Glean.Glass.Env as Glass
+import Glean.Glass.Repos
+import Glean.Glass.SnapshotBackend as SB
+import Glean.Glass.RepoMapping
+import Glean.Glass.SourceControl
+
+withTestEnv :: Backend b => b -> (Glass.Env -> IO a) -> IO a
+withTestEnv b = withTestEnvScm b (Some NilSourceControl)
+
+withTestEnvScm
+  :: Backend b
+  => b
+  -> Some SourceControl
+  -> (Glass.Env -> IO a)
+  -> IO a
+withTestEnvScm backend scm f =
+  withEventBaseDataplane $ \evp ->
+  withConfigProvider defaultConfigOptions $ \cfgapi ->
+  withLogger cfgapi $ \logger ->
+  withFb303 "glass-test" $ \fb303 ->
+  withLatestRepos backend scm Nothing Nothing (hours 1) $
+    \latestGleanRepos ->
+      f Glass.Env
+        { gleanBackend = Some backend
+        , snapshotBackend = Some SB.NilSnapshotBackend
+        , gleanDB = Nothing
+        , repoMapping = fixedRepoMapping
+        , sourceControl = scm
+        , tracer = mempty
+        , haxlState = Haxl.stateEmpty
+        , useSnapshotsForSymbolsList = pure True
+        , allocationLimit = return Nothing
+        , ..
+        }
diff --git a/glean/glass/tools/Glean/Glass/Test/DemoClient.hs b/glean/glass/tools/Glean/Glass/Test/DemoClient.hs
--- a/glean/glass/tools/Glean/Glass/Test/DemoClient.hs
+++ b/glean/glass/tools/Glean/Glass/Test/DemoClient.hs
@@ -14,6 +14,7 @@
 import Glean.Glass.Types
 import Glean.Glass.GlassService.Client
 
+import Control.Exception
 import Data.Default ( Default(def) )
 import Data.Maybe ( catMaybes )
 import Data.Text (Text)
@@ -158,20 +159,25 @@
 
 type GlassM p a = forall c . ClientChannel c => ThriftM p c GlassService a
 
-svc :: Service -> ThriftService GlassService
+svc :: Service -> Maybe (ThriftService GlassService)
 svc s =  mkThriftService s defCfg
 
 main :: IO ()
 main = Glean.withOptions options $ \Options{..} ->
-  withEventBaseDataplane $ \evp -> do
-    res <- runThrift evp (svc optHost) $
-      case optCommand of
-        List repo path -> runListSymbols repo path
-        Describe sym -> runDescribe sym
-        FindRefs sym -> runFindRefs sym
-        FindLocation sym -> runLocation sym
-        Search repo str ignoreCase -> runSearch repo str ignoreCase
-    mapM_ Text.putStrLn res
+  withEventBaseDataplane $ \evp ->
+    case svc optHost of
+      Nothing ->
+        throwIO $ ErrorCall $
+          "Service not supported: " <> serviceToString optHost
+      Just thriftService -> do
+        res <- runThrift evp thriftService $
+          case optCommand of
+            List repo path -> runListSymbols repo path
+            Describe sym -> runDescribe sym
+            FindRefs sym -> runFindRefs sym
+            FindLocation sym -> runLocation sym
+            Search repo str ignoreCase -> runSearch repo str ignoreCase
+        mapM_ Text.putStrLn res
 
 runListSymbols :: Protocol p => RepoName -> Path -> GlassM p [Text]
 runListSymbols repo path = do
diff --git a/glean/haxl/Haxl/DataSource/Glean.hs b/glean/haxl/Haxl/DataSource/Glean.hs
--- a/glean/haxl/Haxl/DataSource/Glean.hs
+++ b/glean/haxl/Haxl/DataSource/Glean.hs
@@ -33,7 +33,6 @@
 import Haxl.Core hiding (Env)
 
 import Glean.Backend.Types
-import Glean.Query.Thrift
 import Glean.Types
 import Glean.Typed as Typed
 
diff --git a/glean/hs/Glean/Angle/Hash.hs b/glean/hs/Glean/Angle/Hash.hs
deleted file mode 100644
--- a/glean/hs/Glean/Angle/Hash.hs
+++ /dev/null
@@ -1,53 +0,0 @@
-{-
-  Copyright (c) Meta Platforms, Inc. and affiliates.
-  All rights reserved.
-
-  This source code is licensed under the BSD-style license found in the
-  LICENSE file in the root directory of this source tree.
--}
-
--- | Fingerprints for schema versioning.
---
--- Doesn't need to be cryptographically secure, but does need to be
--- robust against accidental collisions.
-
-module Glean.Angle.Hash
-  ( Hash
-  , hash0
-  , hashString
-  , hashByteString
-  , hashBinary
-  , hashFingerprint
-  ) where
-
-import qualified Data.ByteString as B
-import qualified Data.ByteString.Lazy as LB
-import Data.ByteString.Unsafe (unsafeUseAsCStringLen)
-import Data.Binary (Binary)
-import qualified Data.Binary as Binary
-import Data.Hashable
-import Foreign (castPtr)
-import GHC.Fingerprint as GHC
-import System.IO.Unsafe ( unsafeDupablePerformIO )
-
--- efficient MD5 hash
-type Hash = GHC.Fingerprint
-
-hash0 :: Hash
-hash0 = GHC.fingerprint0
-
-hashString :: String -> Hash
-hashString = GHC.fingerprintString
-
-hashByteString :: B.ByteString -> Hash
-hashByteString bs = unsafeDupablePerformIO $ do
-  unsafeUseAsCStringLen bs $ \(ptr, len) ->
-    GHC.fingerprintData (castPtr ptr) (fromIntegral len)
-
-hashBinary :: Binary a => a -> Hash
-hashBinary = hashByteString . LB.toStrict . Binary.encode
-
--- | For building Hashable instances. Avoiding an orphan instance by
--- making this a function instead.
-hashFingerprint :: Int -> Hash -> Int
-hashFingerprint salt (GHC.Fingerprint _ w) = hashWithSalt salt w
diff --git a/glean/hs/Glean/Angle/Lexer.x b/glean/hs/Glean/Angle/Lexer.x
deleted file mode 100644
--- a/glean/hs/Glean/Angle/Lexer.x
+++ /dev/null
@@ -1,318 +0,0 @@
--- Copyright (c) Facebook, Inc. and its affiliates.
-
-{
-{-# OPTIONS_GHC -funbox-strict-fields #-}
-{-# LANGUAGE DeriveFunctor, NamedFieldPuns #-}
-module Glean.Angle.Lexer
-  ( Token(..)
-  , TokenType(..)
-  , Located(..)
-  , AlexInput
-  , alexGetInput
-  , AlexPosn(..)
-  , runAlex
-  , lexer
-  , Alex(..)
-  , alexError
-  , alexMonadScan
-  , getFile
-  , encodeTextForAngle
-  , getVersion
-  , setVersion
-  ) where
-
-import qualified Data.Aeson as Aeson
-import Data.Aeson.Parser
-import Data.Attoparsec.ByteString (parseOnly)
-import Data.ByteString.Lazy (ByteString)
-import qualified Data.ByteString.UTF8 as UTF8
-import qualified Data.ByteString as Strict
-import qualified Data.ByteString.Lazy as Lazy
-import Data.Text (Text)
-import qualified Data.Text.Encoding as Text
-import Data.Word (Word64)
-
-import Glean.Angle.Types (SrcSpan(..), SrcLoc(..), AngleVersion(..), latestAngleVersion)
-}
-
-%wrapper "monadUserState-bytestring"
-
-$all = [.\n]
-$digit = [0-9]
-
--- The # in identifiers is reserved for "special" uses. Currently
--- there are two: <predicate>#new and <predicate>#old for
--- restricting queries to the stacked and base DB respectively, when
--- writing incremental derivers.
-@ident = [a-zA-Z_] [a-zA-Z0-9_]*
-@lident = [a-z] [a-zA-Z0-9_]*
-@uident = [A-Z_] [a-zA-Z0-9_]*
-
-@string = \" (\\ $all | $all # [\"\\] )* \"
-
--- A qualified name with an optional version:
---    VALID: "a" "a.b" "a.b.3" "a.b#new" "a.b.3#old"
---    INVALID: "a." "a..b" "a.3.b" "a.3b"
-@lqident = @lident (\. @ident)* (\. ($digit+ | @ident)) (\# @ident)?
-
--- versioned: Predicate.1
-@uqident = @uident (\. @ident)* \. $digit+ (\# @ident)?
-
-tokens :-
-  $white+       ;
-  "#FILE " .* \n { setFile }
-  "#" .*        ;
-
-  $digit+       { tokenContent $ T_NatLit . number  }
-  @string       { tokenContentP $ \b -> T_StringLit <$> parseString b }
-
-  "bool"        { basicToken T_Bool }
-  "byte"        { basicToken T_Byte }
-  "default"     { basicToken T_Default }
-  "derive"      { basicToken T_Derive }
-  "enum"        { basicToken T_Enum }
-  "import"      { basicToken T_Import }
-  "maybe"       { basicToken T_Maybe }
-  "nat"         { basicToken T_Nat }
-  "predicate"   { basicToken T_Predicate }
-  "schema"      { basicToken T_Schema }
-  "set"         { versionDependentToken (AngleVersion 8) T_Set (T_LIdent . ByteString.toStrict) }
-  "elements"    { versionDependentToken (AngleVersion 8) T_Elements (T_LIdent . ByteString.toStrict) }
-  "all"         { versionDependentToken (AngleVersion 8) T_All (T_LIdent . ByteString.toStrict) }
-  "string"      { basicToken T_String }
-  "type"        { basicToken T_Type }
-  "stored"      { basicToken T_Stored }
-  "where"       { basicToken T_QueryDef }
-  "evolves"     { basicToken T_Evolves }
-  "never"       { basicToken T_Never }
-  "if"          { basicToken T_If }
-  "then"        { basicToken T_Then }
-  "else"        { basicToken T_Else }
-  "++"          { basicToken T_Append }
-  ("."){2,}     { basicTokenDotDot }
-  "->"          { basicToken T_RightArrow }
-  ","           { basicToken T_Comma }
-  "|"           { basicToken T_Bar }
-  ":"           { basicToken T_Colon }
-  "("           { basicToken T_LeftParen }
-  ")"           { basicToken T_RightParen }
-  "["           { basicToken T_LeftSquare }
-  "]"           { basicToken T_RightSquare }
-  "{"           { basicToken T_LeftCurly }
-  "}"           { basicToken T_RightCurly }
-  "="           { basicToken T_Equals }
-  "!"           { basicToken T_Negate }
-  "!=="         { basicToken T_NotEquals }
-  "!="          { basicToken T_NotEqualsSingle }
-  ">"           { basicToken T_GreaterThan }
-  ">="          { basicToken T_GreaterThanOrEquals }
-  "<"           { basicToken T_LessThan }
-  "<="          { basicToken T_LessThanOrEquals }
-  "+"           { basicToken T_Plus }
-  ";"           { basicToken T_Semi }
-  "_"           { basicToken T_Underscore }
-  "$"           { basicToken T_Dollar }
-  ".*"          { basicToken T_DotStar }
-
-  -- dot-syntax was introduced in version 9
-  "." @lident / { ifVersion 9 }
-                { tokenContent $ T_Select . ByteString.toStrict . ByteString.tail }
-  "." @lident "?" / { ifVersion 9 }
-                { tokenContent $ T_SelectAlt . ByteString.toStrict .
-                    ByteString.tail . ByteString.init }
-
-  @lqident      { tokenContent $ T_QIdent . ByteString.toStrict }
-  @uqident      { tokenContent $ T_QIdent . ByteString.toStrict }
-  @uident       { tokenContent $ T_UIdent . ByteString.toStrict }
-  @lident       { tokenContent $ T_LIdent . ByteString.toStrict }
-{
-data AlexUserState = AlexUserState
-  { angleVersion :: AngleVersion
-  , currentFile :: FilePath
-  }
-
-alexInitUserState :: AlexUserState
-alexInitUserState = AlexUserState latestAngleVersion ""
-
-ifVersion n AlexUserState{angleVersion=AngleVersion v} _ _ _ = v >= n
-
--- | A value with its source location.
-data Located a = L
-  { lspan :: SrcSpan
-  , lval  :: a
-  }
-  deriving (Eq, Show, Functor)
-
-data Token = Token ByteString TokenType
-
-data TokenType
-  = T_Bool
-  | T_Byte
-  | T_Derive
-  | T_Default
-  | T_Enum
-  | T_Import
-  | T_Maybe
-  | T_Nat
-  | T_Predicate
-  | T_Schema
-  | T_Set
-  | T_Elements
-  | T_All
-  | T_String
-  | T_Type
-  | T_Stored
-  | T_Where
-  | T_UIdent Strict.ByteString
-  | T_LIdent Strict.ByteString
-  | T_QIdent Strict.ByteString
-  | T_StringLit Text
-  | T_NatLit Word64
-  | T_QueryDef
-  | T_Evolves
-  | T_Never
-  | T_If
-  | T_Then
-  | T_Else
-  | T_Append
-  | T_DotDot
-  | T_RightArrow
-  | T_Comma
-  | T_Bar
-  | T_Colon
-  | T_LeftParen
-  | T_RightParen
-  | T_LeftSquare
-  | T_RightSquare
-  | T_LeftCurly
-  | T_RightCurly
-  | T_Equals
-  | T_Negate
-  | T_NotEquals
-  | T_NotEqualsSingle
-  | T_GreaterThan
-  | T_GreaterThanOrEquals
-  | T_LessThan
-  | T_LessThanOrEquals
-  | T_Plus
-  | T_Semi
-  | T_Underscore
-  | T_Dollar
-  | T_Select Strict.ByteString
-  | T_SelectAlt Strict.ByteString
-  | T_DotStar
-  | T_EOF
-  deriving Show
-
--- setFile :: AlexAction a
-setFile inp@(_,_,b,_) len = do
-  let filename = ByteString.drop 6 $ ByteString.take (len-1) b
-  Alex $ \state -> Right (
-    state { alex_ust = (alex_ust state) {
-              currentFile = UTF8.toString (ByteString.toStrict filename) }
-          , alex_pos = alexStartPos }, ())
-  skip inp len
-
-getFile :: Alex FilePath
-getFile = Alex $ \state -> Right (state, currentFile (alex_ust state))
-
-getVersion :: Alex AngleVersion
-getVersion = Alex $ \state -> Right (state, angleVersion (alex_ust state))
-
-setVersion :: AngleVersion -> Alex ()
-setVersion ver = Alex $ \state -> Right
-  (state { alex_ust = (alex_ust state) { angleVersion = ver }}, ())
-
-basicToken :: TokenType -> AlexAction (SrcLoc, Token)
-basicToken t (AlexPn _ line col,_,b,_) len =
-  return $ (SrcLoc line col, Token (ByteString.take len b) t)
-
-versionDependentToken :: AngleVersion -> TokenType -> (ByteString -> TokenType) -> AlexAction (SrcLoc, Token)
-versionDependentToken firstSupportedVersion newToken oldToken =
-  tokenContentP $ \bs -> do
-    currentVersion <- getVersion
-    if currentVersion >= firstSupportedVersion
-      then return newToken
-      else return $ oldToken bs
-
-basicTokenDotDot :: AlexAction (SrcLoc, Token)
-basicTokenDotDot i@(AlexPn _ line col,_,_,_) len =
-  if len > 2 then
-    alexError $ "Too many dots at line " ++ show line ++
-      ", column " ++ show col ++
-      ". Try using '..' instead of '" ++ (replicate (fromIntegral len) '.') ++ "'"
-  else
-    basicToken T_DotDot i len
-
-tokenContent :: (ByteString -> TokenType) -> AlexAction (SrcLoc, Token)
-tokenContent f = tokenContentP (return . f)
-
-tokenContentP :: (ByteString -> Alex TokenType) -> AlexAction (SrcLoc, Token)
-tokenContentP f (AlexPn _ line col,_,b,_) len =
-  (SrcLoc line col,) . Token content <$> f content
-  where
-    content = ByteString.take len b
-
-number :: ByteString -> Word64
-number = ByteString.foldl' f 0 where
-  f x y = x * 10 + fromIntegral (y - fromIntegral (Data.Char.ord '0'))
-
-alexEOF :: Alex (SrcLoc, Token)
-alexEOF = do
-  (AlexPn _ line col,_,_,_) <- alexGetInput
-  return (SrcLoc line col, Token "" T_EOF)
-
--- | We'll use JSON syntax for strings, as a reasonably fast way to support
--- some escaping syntax.
-parseString :: ByteString -> Alex Text
-parseString b =
-  case parseOnly jstring (ByteString.toStrict b) of
-    Left{} -> alexError "lexical error in string"
-    Right a -> return a
-
--- | encode a Text value into an Angle string, with appropriate escaping and
--- surrounded by double quotes. e.g.
---
--- > ghci> encodeTextForAngle "ab\"\NUL"
--- > "\"ab\\\"\\u0000\""
---
-encodeTextForAngle :: Text -> Text
-encodeTextForAngle =
-  Text.decodeUtf8 . Lazy.toStrict . Aeson.encode . Aeson.String
-
-alexGetUserState_ :: Alex AlexUserState
-alexGetUserState_ = Alex $ \s@AlexState{alex_ust} -> Right (s, alex_ust)
-
-getToken :: Alex (SrcLoc, Token)
-getToken = do
-  inp__@(_,_,_,n) <- alexGetInput
-  sc <- alexGetStartCode
-  ust <- alexGetUserState_
-  case alexScanUser ust inp__ sc of
-    AlexEOF -> alexEOF
-    AlexError ((AlexPn _ line column),_,_,_) ->
-      let
-          file = currentFile ust
-          err = "lexical error at line " ++ show line ++
-            ", column " ++ show column
-      in
-      if null file
-        then alexError err
-        else alexError $ file <> ": " <> err
-
-    AlexSkip  inp__ _len -> do
-      alexSetInput inp__
-      getToken
-
-    AlexToken inp2__@(_,_,_,m) _ action -> let len = m-n in do
-      alexSetInput inp2__
-      action (ignorePendingBytes inp__) len
-
-lexer :: (Located Token -> Alex a) -> Alex a
-lexer f = do
-  (start, tok) <- getToken
-  (AlexPn _ eline ecol,_,_,_) <- alexGetInput
-  let end = SrcLoc eline ecol
-  f $ L (SrcSpan start end) tok
-
-}
diff --git a/glean/hs/Glean/Angle/Parser.y b/glean/hs/Glean/Angle/Parser.y
deleted file mode 100644
--- a/glean/hs/Glean/Angle/Parser.y
+++ /dev/null
@@ -1,510 +0,0 @@
--- Copyright (c) Facebook, Inc. and its affiliates.
-
-{
-module Glean.Angle.Parser
-  ( parseQuery
-  , parseQueryWithVersion
-  , parseSchema
-  , stripAngleVersion
-  , parseSchemaWithVersion
-  , parseType
-  ) where
-
-import Control.Monad
-import Data.ByteString (ByteString)
-import qualified Data.ByteString.Char8 as B
-import qualified Data.ByteString.Lazy.Char8 as LB
-import Data.Char
-import Data.Either (partitionEithers)
-import Data.List.NonEmpty (NonEmpty((:|)))
-import Data.Maybe
-import qualified Data.Text as Text
-import qualified Data.Text.Encoding as Text
-import Data.Text (Text)
-import Data.Word
-import Data.Text.Prettyprint.Doc (pretty)
-
-import Glean.Angle.Lexer
-import Glean.Schema.Util
-import Glean.Types hiding (Query, Nat)
-import Glean.Angle.Types as Schema
-}
-
-%tokentype { Located Token }
-%token
-  'bool'        { L _ (Token _ T_Bool) }
-  'byte'        { L _ (Token _ T_Byte) }
-  'derive'      { L _ (Token _ T_Derive) }
-  'default'     { L _ (Token _ T_Default) }
-  'enum'        { L _ (Token _ T_Enum) }
-  'import'      { L _ (Token _ T_Import) }
-  'maybe'       { L _ (Token _ T_Maybe) }
-  'nat'         { L _ (Token _ T_Nat) }
-  'predicate'   { L _ (Token _ T_Predicate) }
-  'schema'      { L _ (Token _ T_Schema) }
-  'set'         { L _ (Token _ T_Set) }
-  'elements'    { L _ (Token _ T_Elements) }
-  'all'         { L _ (Token _ T_All) }
-  'string'      { L _ (Token _ T_String) }
-  'stored'      { L _ (Token _ T_Stored) }
-  'type'        { L _ (Token _ T_Type) }
-  'where'       { L _ (Token _ T_QueryDef) }
-  'evolves'     { L _ (Token _ T_Evolves) }
-  'never'       { L _ (Token _ T_Never) }
-  'if'          { L _ (Token _ T_If) }
-  'then'        { L _ (Token _ T_Then) }
-  'else'        { L _ (Token _ T_Else) }
-  '++'          { L _ (Token _ T_Append) }
-  '..'          { L _ (Token _ T_DotDot) }
-  '->'          { L _ (Token _ T_RightArrow) }
-  ','           { L _ (Token _ T_Comma) }
-  '|'           { L _ (Token _ T_Bar) }
-  ':'           { L _ (Token _ T_Colon) }
-  ';'           { L _ (Token _ T_Semi) }
-  '('           { L _ (Token _ T_LeftParen) }
-  ')'           { L _ (Token _ T_RightParen) }
-  '['           { L _ (Token _ T_LeftSquare) }
-  ']'           { L _ (Token _ T_RightSquare) }
-  '{'           { L _ (Token _ T_LeftCurly) }
-  '}'           { L _ (Token _ T_RightCurly) }
-  '='           { L _ (Token _ T_Equals) }
-  '!'           { L _ (Token _ T_Negate) }
-  '!=='         { L _ (Token _ T_NotEquals) }
-  '!='          { L _ (Token _ T_NotEqualsSingle) }
-  '>'           { L _ (Token _ T_GreaterThan) }
-  '>='          { L _ (Token _ T_GreaterThanOrEquals) }
-  '<'           { L _ (Token _ T_LessThan) }
-  '<='          { L _ (Token _ T_LessThanOrEquals) }
-  '+'           { L _ (Token _ T_Plus) }
-  '_'           { L _ (Token _ T_Underscore) }
-  '$'           { L _ (Token _ T_Dollar) }
-  '.*'          { L _ (Token _ T_DotStar) }
-
-  SELECT_       { L _ (Token _ (T_Select _)) }
-  SELECTALT_    { L _ (Token _ (T_SelectAlt _)) }
-  UIDENT_       { L _ (Token _ (T_UIdent _)) }
-  LIDENT_       { L _ (Token _ (T_LIdent _)) }
-  QIDENT_       { L _ (Token _ (T_QIdent _)) }
-  STRING_       { L _ (Token _ (T_StringLit _)) }
-  NAT_          { L _ (Token _ (T_NatLit _)) }
-
-
-%name query query
-%name schema schemas
-%name type_ type
-%monad { P }
-%lexer { lexer } { L _ (Token _ T_EOF)}
-%error { parseError }
-%expect 0
-
-%%
-
-query :: { SourceQuery }
-query
-  : pattern 'where' seplist_(statement,';') { SourceQuery (Just $1) $3 Ordered }
-  | seplist_(statement,';')  { SourceQuery Nothing $1 Ordered }
-
-statement :: { SourceStatement }
-statement
-  : pattern '=' pattern  { SourceStatement $1 $3 }
-  | pattern              { SourceStatement (Wildcard $ sspan $1) $1 }
-
-pattern :: { SourcePat }
-pattern
-  : gen '++' pattern { OrPattern (s $1 $3) $1 $3 } -- deprecated syntax
-  | gen '|' pattern  { OrPattern (s $1 $3) $1 $3 }
-  | '!' gen          { Negation (s $1 $2) $2 }
-  | 'if' pattern
-    'then' pattern
-    'else' pattern   { IfPattern (s $1 $6) $2 $4 $6 }
-  | gen              { $1 }
-
-gen :: { SourcePat }
-gen
-  : op { $1 }
-  | op ':' type    { TypeSignature (s $1 $3) $1 (lval $3) }
-
-op :: { SourcePat }
-op
-  : plus  { $1 }
-  | plus '!=' plus   { App (s $1 $3) (Variable (sspan $2) "prim.neExpr") [$1, $3] }
-  | plus '!==' plus  { App (s $1 $3) (Variable (sspan $2) "prim.neNat") [$1, $3] }
-  | plus '>' plus    { App (s $1 $3) (Variable (sspan $2) "prim.gtNat") [$1, $3] }
-  | plus '>=' plus   { App (s $1 $3) (Variable (sspan $2) "prim.geNat") [$1, $3] }
-  | plus '<' plus    { App (s $1 $3) (Variable (sspan $2) "prim.ltNat") [$1, $3] }
-  | plus '<=' plus   { App (s $1 $3) (Variable (sspan $2) "prim.leNat") [$1, $3] }
-  | kv '[' '..' ']'  { ElementsOfArray (s $1 $4) $1 }
-    -- NB. kv to resolve shift-reduce conflict
-
-plus :: { SourcePat }
-plus
-  : plus '+' app  { App (s $1 $3) (Variable (sspan $2) "prim.addNat") [$1, $3] }
-  | app  { $1 }
-
-app :: { SourcePat }
-app
-  : list1(kv)  { case $1 of [f] -> f; f:args -> App (s f $ last args) f args }
-  | 'elements' kv { Elements (s $1 $2) $2 }
-  | 'all' kv { All (s $1 $2) $2 }
-
--- K -> V binds tighter than application, so that e.g.
---   p K -> V
--- can be used to match facts of the functional predicate p.
-kv :: { SourcePat }
-kv
-  : select '->' select  { KeyValue (s $1 $3) $1 $3 }
-  | select  { $1 }
-
-select :: { SourcePat }
-select
-  : select SELECT { FieldSelect (s $1 $2) $1 (lval $2) Record }
-  | select SELECTALT { FieldSelect (s $1 $2) $1 (lval $2) Sum }
-  | select '.*' { Deref (s $1 $2) $1 }
-  | apat  { $1 }
-
-apat :: { SourcePat }
-apat
-  : NAT                             { Nat (sspan $1) (lval $1) }
-  | STRING                          { String (sspan $1) (lval $1) }
-  | STRING '..'                     { StringPrefix (s $1 $2) (lval $1) }
-  | '$' NAT                         { FactId (s $1 $2) Nothing (lval $2)  }
-  | '$' var NAT                     { FactId (s $1 $3) (Just $ lval $2) (lval $3) }
-  | '[' seplist0(pattern,',') ']'   { Array (s $1 $3) $2 }
-  | '[' seplist__(pattern,',') '..' ']'  { ArrayPrefix (s $1 $4) (let (h:t) = $2 in h:|t) }
-  | '{' seplist2(pattern,',') '}'   { Tuple (s $1 $3) $2 }
-  | '{' seplist0_(field,',') '}'    { Struct (s $1 $3) $2 }
-  | '_'                             { Wildcard (sspan $1) }
-  | var                             { Variable (sspan $1) (lval $1) }
-  | lident                          { Enum (sspan $1) (lval $1) }
-  | 'never'                         { Never (sspan $1) }
-  | '(' query ')'                   { nestedQuery (s $1 $3) $2 }
-
-field :: { Field SrcSpan SrcSpan SourceRef SourceRef }
-field
-  : fieldname '=' pattern  { Field $1 $3 }
-
-var :: { Located Text }
-var
-  : qident { $1 }
-  | uident { $1 }
-
-lident :: { Located Text }
-lident : LIDENT  { fmap Text.decodeUtf8 $1 }
-
-uident :: { Located Text }
-uident : UIDENT  { fmap Text.decodeUtf8 $1 }
-
-qident :: { Located Text }
-qident : QIDENT  { fmap Text.decodeUtf8 $1 }
-
-UIDENT :: { Located ByteString }
-UIDENT : UIDENT_ { let L span (Token _ (T_UIdent val)) = $1 in L span val }
-
-LIDENT :: { Located ByteString }
-LIDENT : LIDENT_ { let L span (Token _ (T_LIdent val)) = $1 in L span val }
-
-QIDENT :: { Located ByteString }
-QIDENT : QIDENT_ { let L span (Token _ (T_QIdent val)) = $1 in L span val }
-
-STRING :: { Located Text }
-STRING : STRING_ { let L span (Token _ (T_StringLit val)) = $1 in L span val }
-
-SELECT :: { Located Text }
-SELECT : SELECT_ {
-  let L span (Token _ (T_Select val)) = $1 in
-  L span (Text.decodeUtf8 val) }
-
-SELECTALT :: { Located Text }
-SELECTLAT : SELECTALT_ {
-  let L span (Token _ (T_SelectAlt val)) = $1 in
-  L span (Text.decodeUtf8 val) }
-
-NAT :: { Located Word64 }
-NAT : NAT_ { let L span (Token _ (T_NatLit val)) = $1 in L span val }
-
--- -----------------------------------------------------------------------------
--- Schema
-
-schemas :: { [Either Schema.SourceEvolves Schema.SourceSchema] }
-schemas
-  : schemas schemadef { Right $2 : $1 }
-  | schemas evolves { Left $2 : $1 }
-  | {- empty -}  { [] }
-
-evolves :: { Schema.SourceEvolves }
-evolves
-  : 'schema' qname 'evolves' qname
-    { Schema.SourceEvolves (s $1 $4) (lval $2) (lval $4) }
-
-schemadef :: { Schema.SourceSchema }
-schemadef
-  : 'schema' qname inherit '{' list(schemadecl) '}'
-    { Schema.SourceSchema (lval $2) $3 (concat $5) (s $1 $6) }
-
-inherit :: { [SourceRef] }
-inherit
-  : ':' seplist_(qname, ',')  { map lval $2 }
-  | {- empty -}  { [] }
-
-schemadecl :: { [Schema.SourceDecl] }
-schemadecl
-  : 'import' qname  { [Schema.SourceImport (lval $2) (sspan $2)] }
-  | typedef  { [$1] }
-  | predicate  { $1 }
-  | derivedecl  { [$1] }
-
-predicate :: { [Schema.SourceDecl] }
-predicate
-  : 'predicate' predicatename ':' type optval maybe(deriving)
-    { let ref = parseRef $2 in
-      Schema.SourcePredicate Schema.PredicateDef
-        { predicateDefRef = ref
-        , predicateDefKeyType = lval $4
-        , predicateDefValueType = $5
-        , predicateDefDeriving = Schema.NoDeriving
-        , predicateDefSrcSpan = case $6 of
-            Just d -> s $1 d
-            _ -> s $1 $4 }
-        : case $6 of
-            Just d -> [Schema.SourceDeriving $ Schema.DerivingDef ref (lval d) (sspan d)]
-            Nothing -> []
-
-    }
-
-deriving :: { Located Schema.SourceDerivingInfo }
-deriving
-  : {- empty -} query { L (sspan $1) $ Schema.Derive Schema.DeriveOnDemand $1 }
-  | derivewhen query {L (s $1 $2) $  Schema.Derive (lval $1) $2 }
-
-derivewhen :: { Located Schema.DeriveWhen }
-derivewhen
-  : 'stored'  { L (sspan $1)  Schema.DerivedAndStored }
-  | 'default'  { % ifVersionOrOlder (AngleVersion 11) $1 (L (sspan $1) Schema.DeriveIfEmpty) }
-
-
-derivedecl :: { Schema.SourceDecl }
-derivedecl
-  : 'derive' qname deriving  { Schema.SourceDeriving
-    Schema.DerivingDef {
-      derivingDefRef = (lval $2)
-      , derivingDefDeriveInfo = lval $3
-      , derivingDefSrcSpan = s $1 $3 }
-    }
-
-optval :: { Schema.SourceType }
-optval
-  : {- empty -} { unit }
-  | '->' type { lval $2 }
-
-type :: { Located Schema.SourceType }
-type
-  : 'byte'                                  { L (sspan $1)   Schema.ByteTy }
-  | 'nat'                                   { L (sspan $1)   Schema.NatTy }
-  | 'string'                                { L (sspan $1)   Schema.StringTy }
-  | '[' type ']'                            { L (s $1 $3)  $ Schema.ArrayTy (lval $2) }
-  | '{' seplist0_(fielddef, ',') '}'        { L (s $1 $3)  $ Schema.RecordTy $2 }
-  | '{' fielddef '|' '}'                    { L (s $1 $4)  $ Schema.SumTy [$2] }
-  | '{' seplist2_(fielddef, '|')  '}'       { L (s $1 $3)  $ Schema.SumTy $2 }
-  | 'set' type                              { L (s $1 $2)  $ Schema.SetTy (lval $2) }
-  | 'enum' '{' seplist_(fieldname, '|') '}' { L (s $1 $4)  $ Schema.EnumeratedTy $3 }
-  | qname                                   { L (sspan $1) $ Schema.PredicateTy (sspan $1) (lval $1) }
-     -- resolved to typedef/predicate later
-  | 'maybe' type                            { L (s $1 $2)  $ Schema.MaybeTy (lval $2) }
-  | 'bool'                                  { L (sspan $1) $ Schema.BooleanTy }
-  | '(' type ')'                            { L (s $1 $3)  $ lval $2 }
-
-fielddef :: { Schema.SourceFieldDef }
-fielddef
-  : fieldname ':' type { Schema.FieldDef $1 (lval $3) }
-  | fieldname  { Schema.FieldDef $1 unit }
-
-predicatename :: { Name }
-predicatename
-  : fieldname { $1 }
-  | qident { lval $1 }
-
--- Allow keywords to be used as fieldnames
-fieldname :: { Name }
-fieldname
-  : lident  { lval $1 }
-  | uident  { lval $1 } -- we want to deprecate this
-  | 'bool'  { "bool" }
-  | 'byte'  { "byte" }
-  | 'enum'  { "enum" }
-  | 'import'  { "import" }
-  | 'maybe'  { "maybe" }
-  | 'nat'  { "nat" }
-  | 'predicate'  { "predicate" }
-  | 'schema'  { "schema" }
-  | 'string'  { "string" }
-  | 'type'  { "type" }
-  | 'where'  { "where" }
-
-typedef :: { Schema.SourceDecl }
-typedef
-  : 'type' predicatename '=' type
-    { Schema.SourceType Schema.TypeDef
-        { typeDefRef = parseRef $2
-        , typeDefType = lval $4
-        , typeDefSrcSpan = s $1 $4 }
-    }
-
-qname :: { Located SourceRef }
-qname
-  : uident { fmap parseRef $1 }
-  | qident { fmap parseRef $1 }
-  | lident { fmap parseRef $1 } -- probably shouldn't be allowed
-
--- -----------------------------------------------------------------------------
--- Utils
-
--- Optional item
-maybe(p)
-  : {- empty -}  { Nothing }
-  | p  { Just $1 }
-
--- List with no separator
-list(p)
-  : {- empty -} { [] }
-  | p list(p) { $1 : $2 }
-
--- List with no separator, >=1 elements
-list1(p)
-  : p  { [$1] }
-  | p list1(p) { $1 : $2 }
-
--- List with a separator, >=1 elements
-seplist(p,sep)
-  : p sep seplist(p,sep) { $1 : $3 }
-  | p { [$1] }
-
--- List with a separator, >=0 elements
-seplist0(p,sep)
-  : {- empty -} { [] }
-  | seplist(p,sep) { $1 }
-
--- List with a separator, >=2 elements
-seplist2(p,sep)
-  : p sep seplist(p,sep) { $1 : $3 }
-
--- List with a separator, >=1 elements, optional final separator
-seplist_(p,sep)
-  : p sep seplist_(p,sep) { $1 : $3 }
-  | p maybe(sep) { [$1] }
-
--- List with a separator, >=0 elements, optional final separator
-seplist0_(p,sep)
-  : {- empty -} { [] }
-  | seplist_(p,sep) { $1 }
-
--- List with a separator, >=2 elements, optional final separator
-seplist2_(p,sep)
-  : p sep seplist_(p,sep) { $1 : $3 }
-
--- List with a separator, >=1 elements, mandatory final separator
-seplist__(p,sep)
-  : p sep seplist__(p,sep) { $1 : $3 }
-  | p sep { [$1] }
-
--- List with a separator, >= 1 elements.
--- The span of the elements is also returned.
-seplistSpan(p,sep)
-  : p sep seplistSpan(p,sep) { (sspan $1, $1) : $3 }
-  | p { [(sspan $1, $1)] }
-
--- List with a separator, >=0 elements.
--- The span of the elements is also returned.
-seplistSpan0(p,sep)
-  : {- empty -} { [] }
-  | seplistSpan(p,sep) { $1 }
-
-{
-parseQuery :: ByteString -> Either String SourceQuery
-parseQuery bs = runAlex (LB.fromStrict bs) $ query
-
-parseType :: ByteString -> Either String Schema.SourceType
-parseType bs = runAlex (LB.fromStrict bs) $ fmap lval type_
-
-parseQueryWithVersion
-  :: AngleVersion
-  -> ByteString
-  -> Either String SourceQuery
-parseQueryWithVersion ver bs =
-  runAlex (LB.fromStrict bs) (setVersion ver >> query)
-
-parseSchema :: ByteString -> Either String Schema.SourceSchemas
-parseSchema bs = parseSchemaWithVersion ver rest
-  where (ver, rest) = stripAngleVersion bs
-
-stripAngleVersion :: ByteString -> (AngleVersion, ByteString)
-stripAngleVersion bs
-  | Just bs1 <- B.stripPrefix "version: " (B.dropWhile isSpace bs)
-  , Just (ver, bs2) <- B.readInt bs1 = (Schema.AngleVersion ver, bs2)
-  | otherwise = (latestAngleVersion, bs)
-  -- if the header is omitted, assume we are using the latest version
-
-parseSchemaWithVersion
-  :: AngleVersion
-  -> ByteString
-  -> Either String Schema.SourceSchemas
-parseSchemaWithVersion ver bs =
-  runAlex (LB.fromStrict bs) $ do
-    setVersion ver
-    (srcEvolves, srcSchemas) <- partitionEithers <$> schema
-    return Schema.SourceSchemas
-      { srcAngleVersion = ver
-      , srcSchemas = reverse srcSchemas
-      , srcEvolves = reverse srcEvolves
-      }
-
-type P a = Alex a
-
-class HasSpan a where
-  sspan :: a -> SrcSpan
-instance HasSpan (Located a) where
-  sspan (L span _) = span
-instance HasSpan (SourcePat_ SrcSpan SrcSpan a b) where
-  sspan = sourcePatSpan
-instance HasSpan (SourceStatement_ SrcSpan SrcSpan p t) where
-  sspan (SourceStatement p1 p2) = s p1 p2
-instance HasSpan (SourceQuery_ SrcSpan SrcSpan p t) where
-  sspan (SourceQuery Nothing stmts _) = s (head stmts) (last stmts)
-  sspan (SourceQuery (Just pat) stmts _) = s pat (last stmts)
-
-s :: (HasSpan a, HasSpan b) => a -> b -> SrcSpan
-s from to = spanBetween (sspan from) (sspan to)
-
--- | Located between two items
-lbetween :: Located a -> Located b -> c -> Located c
-lbetween (L from _) (L to _) = L (spanBetween from to)
-
-invalid :: SourcePat
-invalid = Nat invalidSrcSpan (fromIntegral iNVALID_ID)
-  where
-    invalidSrcSpan = SrcSpan invalidLoc invalidLoc
-    invalidLoc = SrcLoc (-1) (-1)
-
-parseError :: Located Token -> P a
-parseError (L (SrcSpan loc _) (Token b t)) = do
-  filename <- getFile
-  alexError $
-    show (pretty loc) <> "\n" <>
-    (if null filename then "" else filename <> ": ")
-    <> "parse error at: "
-    <> case t of
-      T_EOF -> "end of string"
-      _ -> LB.unpack b
-
--- | Smart constructor for NestedQuery
-nestedQuery :: SrcSpan -> SourceQuery -> SourcePat
-nestedQuery _s (SourceQuery Nothing [SourceStatement (Wildcard _) pat] _) = pat
-nestedQuery s q = NestedQuery s q
-
--- Accept older constructs for backwards-compability only when we're
--- parsing the appropriate version(s) of the syntax.
-ifVersionOrOlder :: AngleVersion -> Located Token -> a -> Alex a
-ifVersionOrOlder v tok r = do
-  thisVer <- getVersion
-  when (thisVer > v) $ parseError tok
-  return r
-}
diff --git a/glean/hs/Glean/Angle/Types.hs b/glean/hs/Glean/Angle/Types.hs
deleted file mode 100644
--- a/glean/hs/Glean/Angle/Types.hs
+++ /dev/null
@@ -1,1216 +0,0 @@
-{-
-  Copyright (c) Meta Platforms, Inc. and affiliates.
-  All rights reserved.
-
-  This source code is licensed under the BSD-style license found in the
-  LICENSE file in the root directory of this source tree.
--}
-
-{-# LANGUAGE DerivingStrategies #-}
-{-# LANGUAGE DeriveFunctor #-}
-{-# LANGUAGE DeriveFoldable  #-}
-{-# LANGUAGE DeriveAnyClass  #-}
-{-# OPTIONS_GHC -Wno-orphans -Wno-star-is-type #-}
-
--- | Types representing a source-level schema
-module Glean.Angle.Types
-  ( -- * Names and references
-    Name
-  , FieldName
-  , Version
-  , PredicateRef(..)
-  , TypeRef(..)
-  , PredicateId(..)
-  , tempPredicateId
-  , TypeId(..)
-
-  -- * Source locations
-  , IsSrcSpan(..)
-  , SrcSpan(..)
-  , SrcLoc(..)
-  , rmLocSchemas
-  , rmLocSchema
-  , rmLocEvolves
-  , rmLocDecl
-  , rmLocQuery
-  , rmLocStatement
-  , rmLocPat
-  , rmLocField
-  , rmLocTypeDef
-  , rmLocType
-  , rmLocPredDef
-  , rmTypeLocPredDef
-
-  -- * Types
-  , Type_(..)
-  , RecordOrSum(..)
-
-  -- * Queries
-  , SourceQuery_(..)
-  , Ordered(..)
-  , SourceStatement_(..)
-  , SourcePat_(..)
-  , PrimOp(..)
-  , SeekSection(..)
-
-  -- * Schemas and definitions
-  , DerivingDef_(..)
-  , TypeDef_(..)
-  , FieldDef_(..)
-  , PredicateDef_(..)
-  , Statement_
-  , Query_
-  , Type
-  , FieldDef
-  , TypeDef
-  , Field(..)
-  , IsWild(..)
-  , tupleField
-  , sourcePatSpan
-  , spanBetween
-  , PredicateDef
-  , DerivingInfo(..)
-  , DeriveWhen(..)
-  , SourceSchema
-  , SourceSchemas
-  , SourceEvolves
-  , SourceDecl
-  , SourceRef(..)
-  , SourceType
-  , SourceFieldDef
-  , SourceTypeDef
-  , SourcePredicateDef
-  , SourceDerivingInfo
-  , SourcePat
-  , SourceStatement
-  , SourceQuery
-  , SourcePat'
-  , SourceStatement'
-  , SourceQuery'
-  , SourceDerivingInfo'
-  , DerivingDef'
-  , SourceType'
-  , Type'
-  , FieldDef'
-  , PredicateDef'
-  , SourceSchemas_(..)
-  , SourceEvolves_(..)
-  , SourceSchema_(..)
-  , SourceDecl_(..)
-
-  -- * Versions of the Angle syntax
-  , AngleVersion(..)
-  , latestAngleVersion
-  , latestSupportedAngleVersion
-
-  -- * Pretty printing
-  , displayStatement
-
-  -- * Description
-  , Describe(..)
-  ) where
-
-import qualified Data.Aeson as Aeson
-import Data.Binary
-import Data.ByteString (ByteString)
-import qualified Data.ByteString.Lazy as BL
-import Data.Hashable
-import Data.List
-import Data.List.NonEmpty (NonEmpty, toList)
-import Data.Map (Map)
-import qualified Data.Map as Map
-import Data.Text (Text)
-import qualified Data.Text.Encoding as Text
-import Compat.Prettyprinter
-import Data.Bifunctor
-import Data.Bifoldable
-import GHC.Generics
-
-import Glean.Angle.Hash
-import Glean.Display
-import Glean.Types (PredicateRef(..), TypeRef(..), Version)
-
-
--- -----------------------------------------------------------------------------
--- Names and references
-
-type Name = Text
-
-type FieldName = Text
-
--- | A reference to a name or type in a source schema. Versions are
--- often omitted at this level, and will be later resolved by
--- resolveSchema.
-data SourceRef = SourceRef
-  { sourceRefName :: Name
-  , sourceRefVersion :: Maybe Version
-  }
-  deriving (Show, Eq, Ord, Generic, Hashable)
-
-instance Binary SourceRef
-
--- -----------------------------------------------------------------------------
--- Source locations
-
--- | A 'SrcSpan' delimits a portion of a text file.
--- The end position is the column /after/ the end of the span.
--- That is, a span of (1,1)-(1,2) is one character long, and a span of
--- (1,1)-(1,1) is zero characters long.
-data SrcSpan = SrcSpan
-  { spanStart :: {-# UNPACK #-} !SrcLoc -- inclusive
-  , spanEnd   :: {-# UNPACK #-} !SrcLoc -- exclusive
-  }
-  deriving (Eq, Show)
-
--- | A point in a source text file.
-data SrcLoc = SrcLoc
-  { locLine :: {-# UNPACK #-} !Int
-  , locCol  :: {-# UNPACK #-} !Int
-  }
-  deriving (Show, Eq)
-
--- -----------------------------------------------------------------------------
--- Queries
-
-data SourceQuery_ s st p t = SourceQuery
-  { srcQueryHead :: Maybe (SourcePat_ s st p t)
-  , srcQueryStmts :: [SourceStatement_ s st p t]
-  , srcQueryOrdered :: Ordered
-  }
-  deriving (Eq, Show, Generic, Functor)
-
-data Ordered = Ordered | Unordered
-  deriving (Eq, Show, Generic)
-
-instance Binary Ordered
-
-instance (Binary p, Binary t) => Binary (SourceQuery_ () () p t)
-
-instance Bifunctor (SourceQuery_ s st) where
-  bimap f g (SourceQuery h s o) =
-    SourceQuery (fmap (bimap f g) h) (fmap (bimap f g) s) o
-
-instance Bifoldable (SourceQuery_ s st ) where
-  bifoldMap f g (SourceQuery h s _) =
-    foldMap (bifoldMap f g) h <> foldMap (bifoldMap f g) s
-
-data SourceStatement_ s st p t =
-  SourceStatement (SourcePat_ s st p t) (SourcePat_ s st p t)
-  deriving (Eq, Show, Generic, Functor)
-
-instance (Binary p, Binary t) => Binary (SourceStatement_ () () p t)
-
-instance Bifunctor (SourceStatement_ s st) where
-  bimap f g (SourceStatement l r) = SourceStatement (bimap f g l) (bimap f g r)
-
-instance Bifoldable (SourceStatement_ s st) where
-  bifoldMap f g (SourceStatement l r) = bifoldMap f g l <> bifoldMap f g r
-
-data SourcePat_ s st p t
-  = Nat s Word64
-  | String s Text
-  | StringPrefix s Text
-  | ByteArray s ByteString
-    -- ^ There's no concrete syntax for this (yet), but it can be used
-    -- via the DSL.
-  | Array s [SourcePat_ s st p t]
-  | ArrayPrefix s (NonEmpty (SourcePat_ s st p t))
-  | Tuple s [SourcePat_ s st p t]
-  | Struct s [Field s st p t]
-  | App s (SourcePat_ s st p t) [SourcePat_ s st p t]
-  | KeyValue s (SourcePat_ s st p t) (SourcePat_ s st p t)
-  | Elements s (SourcePat_ s st p t)
-  | All s (SourcePat_ s st p t)
-  | Wildcard s
-  | Variable s Name
-  | ElementsOfArray s (SourcePat_ s st p t)
-  | OrPattern s (SourcePat_ s st p t) (SourcePat_ s st p t)
-  | NestedQuery s (SourceQuery_ s st p t)
-  | Negation s (SourcePat_ s st p t)
-  | FactId s (Maybe Text) Word64
-  | TypeSignature s (SourcePat_ s st p t) (Type_ st p t)
-  | Never s
-  | IfPattern
-      { span :: s
-      , cond :: SourcePat_ s st p t
-      , then_ :: SourcePat_ s st p t
-      , else_ :: SourcePat_ s st p t
-      }
-  | FieldSelect s (SourcePat_ s st p t) FieldName RecordOrSum
-  | Deref s (SourcePat_ s st p t)
-  | Enum s Text
-
-  -- The following forms are introduced by the resolver, and replace
-  -- the Variable and App forms produced by the parser.
-  | Clause s s p (SourcePat_ s st p t) SeekSection
-  | Prim s PrimOp [SourcePat_ s st p t]
- deriving (Eq, Show, Generic, Functor)
-
--- | Should a `seek` call be restricted to a section of the database?
---
--- When performing a query over a stacked database we have three levels
---  * base db
---  * stacked db
---  * writable FactSet
---
--- The writable FactSet is there to store facts from derived predicates
--- generated during the querying.
---
--- This type specifies which of these sections should be be covered in a seek.
-data SeekSection
-  = SeekOnAllFacts -- ^ base + stacked + writable
-  | SeekOnBase -- ^ base only
-  | SeekOnStacked -- ^ stacked only
-  deriving (Eq, Show, Generic)
-
-instance Binary SeekSection
-
-instance (Binary p, Binary t) => Binary (SourcePat_ () () p t)
-
-instance Bifunctor (SourcePat_ s st) where
-  bimap f g pat = case pat of
-    Nat s w -> Nat s w
-    String s t -> String s t
-    StringPrefix s t -> StringPrefix s t
-    ByteArray s t -> ByteArray s t
-    Array s pats -> Array s (fmap (bimap f g) pats)
-    ArrayPrefix s pats -> ArrayPrefix s (fmap (bimap f g) pats)
-    Tuple s pats -> Tuple s (map (bimap f g) pats)
-    Struct s fields -> Struct s (map (bimap f g) fields)
-    App s l r -> App s (bimap f g l) (map (bimap f g) r)
-    KeyValue s k v -> KeyValue s (bimap f g k) (bimap f g v)
-    Elements s pat -> Elements s (bimap f g pat)
-    All s query -> All s (bimap f g query)
-    Wildcard s -> Wildcard s
-    Variable s n -> Variable s n
-    ElementsOfArray s pat -> ElementsOfArray s (bimap f g pat)
-    OrPattern s l r -> OrPattern s (bimap f g l) (bimap f g r)
-    NestedQuery s (SourceQuery head stmts ord) ->
-      NestedQuery s (SourceQuery (fmap (bimap f g) head)
-        (fmap (bimap f g) stmts) ord)
-    Negation s pat -> Negation s (bimap f g pat)
-    FactId s n w -> FactId s n w
-    TypeSignature s pat ty -> TypeSignature s (bimap f g pat) (bimap f g ty)
-    Never s -> Never s
-    IfPattern s a b c -> IfPattern s (bimap f g a) (bimap f g b) (bimap f g c)
-    FieldSelect s pat field q -> FieldSelect s (bimap f g pat) field q
-    Deref s pat -> Deref s (bimap f g pat)
-    Enum s f -> Enum s f
-    Clause sPat sPred p pat rng -> Clause sPat sPred (f p) (bimap f g pat) rng
-    Prim s p pats -> Prim s p (fmap (bimap f g) pats)
-
-instance Bifoldable (SourcePat_ s st) where
-  bifoldMap f g = \case
-    Nat{} -> mempty
-    String{} -> mempty
-    StringPrefix{} -> mempty
-    ByteArray{} -> mempty
-    Array _ pats -> foldMap (bifoldMap f g) pats
-    ArrayPrefix _ pats -> foldMap (bifoldMap f g) pats
-    Tuple _ pats -> foldMap (bifoldMap f g) pats
-    Struct _ fields -> foldMap (bifoldMap f g) fields
-    App _ l r -> foldMap (bifoldMap f g) (l:r)
-    KeyValue _ k v -> bifoldMap f g k <> bifoldMap f g v
-    Elements _ pat -> bifoldMap f g pat
-    All _ query -> bifoldMap f g query
-    Wildcard{} -> mempty
-    Variable{} -> mempty
-    ElementsOfArray _ pat -> bifoldMap f g pat
-    OrPattern _ l r -> bifoldMap f g l <> bifoldMap f g r
-    NestedQuery _ (SourceQuery head stmts _) ->
-      foldMap (bifoldMap f g) head <> foldMap (bifoldMap f g) stmts
-    Negation _ pat -> bifoldMap f g pat
-    FactId{} -> mempty
-    TypeSignature _ pat ty -> bifoldMap f g pat <> bifoldMap f g ty
-    Never{} -> mempty
-    IfPattern _ a b c -> bifoldMap f g a <> bifoldMap f g b <> bifoldMap f g c
-    FieldSelect _ pat _ _ -> bifoldMap f g pat
-    Deref _ pat -> bifoldMap f g pat
-    Enum _ _ -> mempty
-    Clause _ _ p pat _ -> f p <> bifoldMap f g pat
-    Prim _ _ pats -> foldMap (bifoldMap f g) pats
-
-data Field s st p t = Field FieldName (SourcePat_ s st p t)
-  deriving (Eq, Show, Generic, Functor)
-
-instance (Binary p, Binary t) => Binary (Field () () p t)
-
-instance Bifunctor (Field s st) where
-  bimap f g (Field n pat) = Field n (bimap f g pat)
-
-instance Bifoldable (Field s st) where
-  bifoldMap f g (Field _ pat) = bifoldMap f g pat
-
--- | Primitive operations
-data PrimOp
-  = PrimOpToLower
-  | PrimOpLength
-  | PrimOpZip
-  | PrimOpConcat
-  | PrimOpReverse
-  | PrimOpSize
-  | PrimOpRelToAbsByteSpans
-  | PrimOpUnpackByteSpans
-  | PrimOpGtNat
-  | PrimOpGeNat
-  | PrimOpLtNat
-  | PrimOpLeNat
-  | PrimOpNeNat
-  | PrimOpAddNat
-  | PrimOpNeExpr
-  deriving (Eq, Show, Generic)
-
-instance Binary PrimOp
-
-sourcePatSpan :: SourcePat_ s st p t -> s
-sourcePatSpan = \case
-  Nat s _ -> s
-  String s _ -> s
-  StringPrefix s _ -> s
-  ByteArray s _ -> s
-  Array s _ -> s
-  ArrayPrefix s _ -> s
-  Tuple s _ -> s
-  Struct s _ -> s
-  App s _ _ -> s
-  KeyValue s _ _ -> s
-  Elements s _ -> s
-  All s _ -> s
-  Wildcard s -> s
-  Variable s _ -> s
-  ElementsOfArray s _ -> s
-  OrPattern s _ _ -> s
-  IfPattern s _ _ _ -> s
-  NestedQuery s _ -> s
-  Negation s _ -> s
-  FactId s _ _ -> s
-  TypeSignature s _ _ -> s
-  Never s -> s
-  FieldSelect s _ _ _ -> s
-  Deref s _ -> s
-  Enum s _ -> s
-  Clause s _ _ _ _ -> s
-  Prim s _ _ -> s
-
--- -----------------------------------------------------------------------------
--- Types
-
--- | A Glean Type
-data Type_ srcspan pref tref
-  -- Native types
-  = ByteTy
-  | NatTy
-  | StringTy
-  | ArrayTy (Type_ srcspan pref tref)
-  | RecordTy [FieldDef_ srcspan pref tref]
-  | SumTy [FieldDef_ srcspan pref tref]
-  | SetTy (Type_ srcspan pref tref)
-  | PredicateTy srcspan pref
-  | NamedTy srcspan tref
-
-  -- Derived types. These appear in the source language, but are
-  -- translated into the native types above internally. They also
-  -- act as hints to the code generators, e.g. maybe translates to
-  -- Thrift's optional and enum translates to Thrift's enum.
-  | MaybeTy (Type_ srcspan pref tref)
-    -- maybe T  => { nothing | just : T }
-  | EnumeratedTy [Name]
-    -- enum { a | b } => { a : {}, b : {} }
-  | BooleanTy
-    -- bool => { false : {} | true : {} }
-
-  -- These are used during typechecking only
-  | TyVar {-# UNPACK #-}!Int
-  | HasTy (Map Name (Type_ srcspan pref tref))
-      !(Maybe RecordOrSum) {-# UNPACK #-}!Int
-    -- HasTy { field:type .. } R X
-    --   Constrains X to be a record or sum type containing at least
-    --   the given fields/types. X can only be instantiated
-    --   with a type containing a superset of those fields: either
-    --   a bigger HasTy or a RecordTy/SumTy.
-    --   R is
-    --     Just Record -> type must be a record
-    --     Just Sum -> type must be a sum type
-    --     Nothing -> type can be either a RecordTy or a SumTy
-  | HasKey (Type_ srcspan pref tref) {-# UNPACK #-}!Int
-    -- HasKey K X
-    --   A type variable X that is constrained to be a predicate
-    --   type with key K
-  | ElementsOf (Type_ srcspan pref tref) {-# UNPACK #-}!Int
-    -- ElementsOf T X
-    --   A type variable that is either set T or [T]
-  deriving (Eq, Show, Functor, Foldable, Generic)
-
-data RecordOrSum = Record | Sum
-  deriving (Eq, Show, Generic)
-
-instance Binary RecordOrSum
-
-instance (Binary pref, Binary tref) => Binary (Type_ () pref tref)
-
-instance Bifunctor (Type_ s) where
-  bimap f g = \case
-    ByteTy -> ByteTy
-    NatTy -> NatTy
-    StringTy -> StringTy
-    ArrayTy ty -> ArrayTy $ bimap f g ty
-    RecordTy xs -> RecordTy $ bimap f g <$> xs
-    SumTy xs -> SumTy $ bimap f g <$> xs
-    SetTy ty -> SetTy $ bimap f g ty
-    PredicateTy s pref -> PredicateTy s (f pref)
-    NamedTy s tref -> NamedTy s (g tref)
-    MaybeTy ty -> MaybeTy (bimap f g ty)
-    EnumeratedTy xs -> EnumeratedTy xs
-    BooleanTy -> BooleanTy
-    TyVar x -> TyVar x
-    HasTy m r x -> HasTy (bimap f g <$> m) r x
-    HasKey ty x -> HasKey (bimap f g ty) x
-    ElementsOf ty x -> ElementsOf (bimap f g ty) x
-
-instance Bifoldable (Type_ s) where
-  bifoldr f g r = \case
-    ByteTy -> r
-    NatTy -> r
-    StringTy -> r
-    ArrayTy ty -> bifoldr f g r ty
-    RecordTy xs -> foldr (flip $ bifoldr f g) r xs
-    SumTy xs -> foldr (flip $ bifoldr f g) r xs
-    SetTy ty -> bifoldr f g r ty
-    PredicateTy _ pref -> f pref r
-    NamedTy _ tref -> g tref r
-    MaybeTy ty -> bifoldr f g r ty
-    EnumeratedTy _ -> r
-    BooleanTy -> r
-    TyVar _ -> r
-    HasTy m _ _ -> foldr (flip $ bifoldr f g) r m
-    HasKey ty _ -> bifoldr f g r ty
-    ElementsOf ty _ -> bifoldr f g r ty
-
-{- Note [Types]
-
-There are three main instantiations of `Type_` used throughout
-Glean:
-
-> type SourceType = Type_ SourceRef SourceRef
-
-These are the types from the parser. Predicates and types may be
-unqualified and don't necessarily have versions.
-
-> type Type = Type_ PredicateId TypeId
-
-These are the types after name resolution
-(Glean.Schema.Resolve). Predicates and Types are fully qualified and
-refer to specific hashes.
-
-> type RTS.Type = Type_ PidRef ExpandedType
-
-(see 'Glean.RTS.Type')
-
-These are the types that relate to a particular DB, and are
-constructed when a schema is loaded in `Glean.Database.Schema`.
-
-* Predicates have a particular 'Pid'
-* Named types are expanded (but we can still see them in the AST)
-* A 'RTS.Type' can be converted into a pure representation ('Rep')
-  using 'repType'
--}
-
--- -----------------------------------------------------------------------------
--- Schemas and definitions
-
-data FieldDef_ st pref tref = FieldDef
-  { fieldDefName :: Name
-  , fieldDefType :: Type_ st pref tref
-  }
-  deriving (Eq, Show, Functor, Foldable, Generic)
-
-instance (Binary pref, Binary tref)
-  => Binary (FieldDef_ () pref tref)
-
-instance Bifunctor (FieldDef_ st) where
-  bimap f g (FieldDef n ty)  = FieldDef n $ bimap f g ty
-
-instance Bifoldable (FieldDef_ st) where
-  bifoldMap f g (FieldDef _ ty) = bifoldMap f g ty
-
-tupleField :: Text
-tupleField = "tuplefield"
-
--- | A definition of a named type
-data TypeDef_ st pref tref = TypeDef
-  { typeDefRef :: tref
-  , typeDefType :: Type_ st pref tref
-  , typeDefSrcSpan :: st
-  }
-  deriving Eq
-
--- | A definition of a predicate
-data PredicateDef_ s st pref tref = PredicateDef
-  { predicateDefRef :: pref
-  , predicateDefKeyType :: Type_ st pref tref
-  , predicateDefValueType :: Type_ st pref tref
-  , predicateDefDeriving :: DerivingInfo (SourceQuery_ s st pref tref)
-  , predicateDefSrcSpan :: s
-  }
-  deriving Eq
-
-data DerivingDef_ s st pref tref = DerivingDef
-  { derivingDefRef :: pref
-  , derivingDefDeriveInfo :: DerivingInfo (SourceQuery_ s st pref tref)
-  , derivingDefSrcSpan :: s
-  }
-  deriving Eq
-
--- | Globally unique identifier for a predicate. This is not the same
--- as a Pid, which is unique only within a particular DB.
-data PredicateId = PredicateId
-  { predicateIdRef :: PredicateRef  -- ^ e.g. python.Name.1
-  , predicateIdHash :: {-# UNPACK #-} !Hash
-  } deriving (Ord, Generic, Show)
-
-instance Hashable PredicateId where
-  hashWithSalt s (PredicateId _ h) = hashFingerprint s h
-
-instance Eq PredicateId where
-  PredicateId _ a == PredicateId _ b = a == b
-
-instance Binary PredicateRef where
-  put (PredicateRef a b) = put a >> put b
-  get = PredicateRef <$> get <*> get
-
-instance Binary PredicateId
-  -- TODO maybe just serialize the hash?
-
--- | Globally unique identifier for a type.
-data TypeId = TypeId
-  { typeIdRef :: TypeRef -- ^ e.g. python.Declaration.1
-  , typeIdHash :: {-# UNPACK #-} !Hash
-  } deriving (Ord, Generic, Show)
-
-instance Hashable TypeId where
-  hashWithSalt s (TypeId _ h) = hashFingerprint s h
-
-instance Eq TypeId where
-  TypeId _ a == TypeId _ b = a == b
-
--- Used by query compilation
-tempPredicateId :: PredicateId
-tempPredicateId = PredicateId (PredicateRef "_tmp_" 0) hash0
-
-instance Binary TypeRef where
-  put (TypeRef a b) = put a >> put b
-  get = TypeRef <$> get <*> get
-
-instance Binary TypeId
-  -- TODO maybe just serialize the hash?
-
--- | How to derive a predicate
-data DerivingInfo q
-  = NoDeriving
-  | Derive DeriveWhen q
-  deriving (Eq, Functor, Foldable, Show, Generic)
-
-instance Binary q => Binary (DerivingInfo q)
-
-data DeriveWhen
-  = DeriveOnDemand
-    -- ^ derived whenever this predicate is queried. Facts of this
-    -- predicate are not expected to be stored in the DB.
-  | DerivedAndStored
-    -- ^ derived eagerly and stored in the DB. By default, queries for
-    -- this predicate will search the DB, just like underived
-    -- predicates.
-  | DeriveIfEmpty
-    -- ^ derived only when the DB has no facts of this predicate.
-    -- This is used to add derivations for backwards compatibility
-    -- during a schema migration.
-  deriving (Eq, Show, Generic)
-
-instance Binary DeriveWhen
-
--- Source (parsed) abstract syntax
-
-type SourcePat' s st = SourcePat_ s st SourceRef SourceRef
-type SourceStatement' s st = SourceStatement_ s st SourceRef SourceRef
-type SourceQuery' s st = SourceQuery_ s st SourceRef SourceRef
-type SourceDerivingInfo' s = DerivingInfo (SourceQuery' s s)
-type SourcePredicateDef' s = PredicateDef_ s s SourceRef SourceRef
-type SourceTypeDef' s = TypeDef_ s SourceRef SourceRef
-type DerivingDef' s = DerivingDef_ s s SourceRef SourceRef
-type SourceType' st = Type_ st SourceRef SourceRef
-type Type' st = Type_ st PredicateId TypeId
-
-type SourcePat = SourcePat' SrcSpan SrcSpan
-type SourceStatement = SourceStatement' SrcSpan SrcSpan
-type SourceQuery = SourceQuery' SrcSpan SrcSpan
-type SourceType = Type_ SrcSpan SourceRef SourceRef
-type SourceFieldDef = FieldDef_ SrcSpan SourceRef SourceRef
-type SourceTypeDef = TypeDef_ SrcSpan SourceRef SourceRef
-type SourcePredicateDef = SourcePredicateDef' SrcSpan
-type SourceDerivingInfo = SourceDerivingInfo' SrcSpan
-type SourceSchemas = SourceSchemas_ SrcSpan
-type SourceSchema = SourceSchema_ SrcSpan
-type SourceEvolves = SourceEvolves_ SrcSpan
-type SourceDecl = SourceDecl_ SrcSpan
-
-type Statement_ p t = SourceStatement_ SrcSpan SrcSpan p t
-type Query_ p t = SourceQuery_ SrcSpan SrcSpan p t
-
-data SourceEvolves_ s = SourceEvolves
-  { evolvesSpan :: s
-  , evolvesNew :: SourceRef
-  , evolvesOld :: SourceRef
-  }
-  deriving (Eq)
-
--- | A 'schema' declaration
-data SourceSchema_ s = SourceSchema
-  { schemaName :: SourceRef
-  , schemaInherits :: [SourceRef]
-  , schemaDecls :: [SourceDecl_ s]
-  , schemaSrcSpan :: s
-  }
-  deriving (Eq)
-
-data SourceSchemas_ s = SourceSchemas
-  { srcAngleVersion :: AngleVersion
-  , srcSchemas :: [SourceSchema_ s]
-  , srcEvolves :: [SourceEvolves_ s]
-  }
-  deriving (Eq)
-
-data SourceDecl_ s
-  = SourceImport SourceRef s
-  | SourcePredicate (SourcePredicateDef' s)
-  | SourceType (SourceTypeDef' s)
-  | SourceDeriving (DerivingDef' s)
-  deriving (Eq)
-
--- Abstract syntax with global Ids
-
-type Type = Type_ SrcSpan PredicateId TypeId
-type FieldDef = FieldDef_ SrcSpan PredicateId TypeId
-type TypeDef = TypeDef_ SrcSpan PredicateId TypeId
-type PredicateDef = PredicateDef_ SrcSpan SrcSpan PredicateId TypeId
-
-type PredicateDef' s st = PredicateDef_ s st PredicateId TypeId
-type FieldDef' st = FieldDef_ st PredicateId TypeId
-
--- -----------------------------------------------------------------------------
-
--- | Version of the syntax. This is required so that we can change the
--- syntax while still allowing DBs that contain a schema with the old
--- syntax to be understood.
-newtype AngleVersion = AngleVersion Int
-  deriving (Eq, Ord)
-  deriving newtype (Pretty)
-
--- version 8:
---   - added set constructs
--- version 9:
---   - added dot syntax
--- version 10:
---   - optional versions in `import`, `evolves`, inheritance
--- version 11:
---   - size primop
--- version 12:
---   - remove support for deriving default
-
-latestSupportedAngleVersion :: AngleVersion
-latestSupportedAngleVersion = AngleVersion 5
-
-latestAngleVersion :: AngleVersion
-latestAngleVersion = AngleVersion 12
-
--- -----------------------------------------------------------------------------
--- Pretty-printing
-
-instance Display SourceRef where
-  display _ (SourceRef name ver) = pretty name <> case ver of
-    Nothing -> mempty
-    Just ver -> "." <> pretty ver
-
-instance Display PredicateRef where
-  display _ = pretty
-
-instance Display TypeRef where
-  display _ = pretty
-
-instance Display PredicateId where
-  display opts (PredicateId name hash) =
-    case predicateStyle opts of
-      PredicateWithHash -> pretty name <> "." <> pretty (show hash)
-      PredicateWithoutHash -> pretty name
-
-instance Display TypeId where
-  display opts (TypeId name hash) =
-    case predicateStyle opts of
-      PredicateWithHash -> pretty name <> "." <> pretty (show hash)
-      PredicateWithoutHash -> pretty name
-
-instance Display (SourceEvolves_ s) where
-  display opts (SourceEvolves _ new old) =
-    "schema " <> display opts new <> " evolves " <> display opts old
-
-instance (Display pref, Display tref) => Display (Type_ st pref tref) where
-  display _ ByteTy = "byte"
-  display _ NatTy = "nat"
-  display _ StringTy = "string"
-  display opts (ArrayTy ty) = "[" <> display opts ty <> "]"
-  display opts (RecordTy fields) =
-    sep
-      [ nest 2 $ vsep $ "{" :  punctuate "," (map (display opts) fields)
-      , "}" ]
-  display opts (SumTy fields) =
-    sep
-      [ nest 2 $ vsep $ "{" :  map ((<> " |") . display opts) fields
-      , "}" ]
-  display opts (SetTy ty) = "set " <> displayAtom opts ty
-  display opts (PredicateTy _ p) = display opts p
-  display opts (NamedTy _ t) = display opts t
-  display opts (MaybeTy t) = "maybe" <+> displayAtom opts t
-  display _ (EnumeratedTy names) =
-    sep
-      [ nest 2 $ vsep $ "enum {" :  map (<> " |") (map pretty names)
-      , "}" ]
-  display _ BooleanTy = "bool"
-  display _ (TyVar n) = "T" <> pretty n
-  display opts (HasTy m rec x)
-    | Just Sum <- rec =
-    sep
-      [ nest 2 $ vsep $ "{" :  intersperse "|" (map doField (Map.toList m))
-      , "|", "T" <> pretty x, "}" ]
-    | otherwise =
-    sep
-      [ nest 2 $ vsep $ "{" :  map (<> ",") (map doField (Map.toList m))
-      , "T" <> pretty x, "}" ]
-    where
-    doField (n, ty) = pretty n <> " : " <> display opts ty
-  display opts (HasKey ty x) =
-    "T" <> pretty x <> parens (display opts ty)
-  display opts (ElementsOf ty x) =
-    "T" <> pretty x <> brackets (display opts ty)
-  displayAtom opts t = case t of
-    MaybeTy{} -> parens $ display opts t
-    EnumeratedTy{} -> parens $ display opts t
-    SetTy{} -> parens $ display opts t
-    _other -> display opts t
-
-instance (Display pref, Display tref) => Display (FieldDef_ st pref tref) where
-  display opts (FieldDef n ty) = pretty n <> " : " <> displayAtom opts ty
-
-instance (Display pref, Display tref) =>
-    Display (PredicateDef_ s st pref tref) where
-  display opts PredicateDef{..} =
-    hang 2 $ sep $
-      [ "predicate" <+> display opts predicateDefRef <+> ":"
-      , display opts predicateDefKeyType
-      ] ++
-      (case predicateDefValueType of
-         RecordTy [] -> []
-         _other -> [ "->" <+> display opts predicateDefValueType ]) ++
-      (case predicateDefDeriving of
-         Derive DerivedAndStored query -> [ "stored", display opts query ]
-         Derive _ query -> [ display opts query ]
-         _other -> [])
-
-instance (Display pref, Display tref) => Display (TypeDef_ s pref tref) where
-  display opts TypeDef{..} =
-    hang 2 $ sep
-      [ "type" <+> display opts typeDefRef <+> "="
-      , display opts typeDefType
-      ]
-
-instance Display SourceSchemas where
-  display opts SourceSchemas{..} = vcat $
-    ("version:" <+> pretty srcAngleVersion)
-    : map (display opts) srcSchemas <> map (display opts) srcEvolves
-
-instance Display SourceSchema where
-  display opts SourceSchema{..} = vcat
-    [ "schema" <+> display opts schemaName <>
-        case schemaInherits of
-          [] -> mempty
-          _ -> " : " <> hcat (punctuate "," (map (display opts) schemaInherits))
-        <> " {"
-    , vcat (map (display opts) schemaDecls)
-    , "}"
-    ]
-
-instance Display SourceDecl where
-  display opts (SourceImport name _) = "import " <> display opts name
-  display opts (SourcePredicate def) = display opts def
-  display opts (SourceType def) = display opts def
-  display opts (SourceDeriving DerivingDef{..}) =
-    hang 2 $ sep ["derive "
-      <> display opts derivingDefRef, display opts derivingDefDeriveInfo]
-
-instance Display q => Display (DerivingInfo q) where
-  display _ NoDeriving = mempty
-  display opts (Derive DeriveOnDemand q) = display opts q
-  display opts (Derive DerivedAndStored q) = "stored" <+> display opts q
-  display opts (Derive DeriveIfEmpty q) = "default" <+> display opts q
-
--- ---------------------------------------------------------------------------
--- Display printing queries
-
-class IsWild pat where
-  isWild :: pat -> Bool
-
-instance IsWild (SourcePat_ s st p t) where
-  isWild Wildcard{} = True
-  isWild _ = False
-
--- | Types that represent the source location of a term in the AST
-class (Pretty a, Pretty (Loc a)) => IsSrcSpan a where
-  type Loc a :: *
-  startLoc   :: a -> Loc a
-  endLoc     :: a -> Loc a
-  mkSpan     :: Loc a -> Loc a -> a
-
--- space encompassing from start of first span to end of second.
-spanBetween :: IsSrcSpan a => a -> a-> a
-spanBetween x y = mkSpan (startLoc x) (endLoc y)
-
-instance IsSrcSpan SrcSpan where
-  type Loc SrcSpan = SrcLoc
-  startLoc = spanStart
-  endLoc = spanEnd
-  mkSpan = SrcSpan
-
-instance Display SrcSpan where
-  display opts s =
-    display opts (spanStart s)
-    <> pretty (" - " :: String)
-    <> display opts (spanEnd s)
-
-instance Pretty SrcSpan where
-  pretty = displayDefault
-
-instance Display SrcLoc where
-  display _ (SrcLoc line col) =
-    "line " <> pretty line <> ", column " <> pretty col
-
-instance Pretty SrcLoc where
-  pretty = displayDefault
-
-instance (Display p, Display t) => Pretty (SourcePat_ s st p t) where
-  pretty = displayDefault
-
-instance (Display p, Display t) => Display (SourcePat_ s st p t) where
-  display _ (Nat _ w) = pretty w
-  display _ (String _ str) =
-    pretty (Text.decodeUtf8 (BL.toStrict (Aeson.encode (Aeson.String str))))
-  display opts (StringPrefix s str) =
-    display opts (String s str :: SourcePat_ s st p t) <> ".."
-  display _ (ByteArray _ b) = pretty (show b)
-  display opts (Array _ pats) =
-    brackets $ hsep (punctuate "," (map (display opts) pats))
-  display opts (ArrayPrefix _ pats) =
-    encloseSep "[" ", ..]" "," (map (display opts) $ toList pats)
-  display opts (Tuple _ pats) =
-    braces $ hsep (punctuate "," (map (display opts) pats))
-  display opts (Struct _ fs) = cat [ nest 2 $ cat [ "{", fields fs], "}"]
-    where
-    fields = sep . punctuate "," . map field
-    field (Field name pat) = pretty name <+> "=" <+> display opts pat
-  display opts (App _ l pats) =
-    display opts l <+> hsep (punctuate " " (map (displayAtom opts) pats))
-  display opts (KeyValue _ k v) =
-    displayAtom opts k <+> "->" <+> displayAtom opts v
-  display opts (Elements _ pat) =
-    "elements" <+> parens (display opts pat)
-  display opts (All _ query) =
-    "all" <+> parens (display opts query)
-  display _ (Wildcard _) = "_"
-  display _ (Variable _ name) = pretty name
-  display opts (ElementsOfArray _ pat) = displayAtom opts pat <> "[..]"
-  display opts (OrPattern _ lhs rhs) =
-    sep [displayAtom opts lhs <+> "|", displayAtom opts rhs]
-  display opts (IfPattern _ cond then_ else_) = sep
-    [ nest 2 $ sep ["if", displayAtom opts cond ]
-    , nest 2 $ sep ["then", displayAtom opts then_]
-    , nest 2 $ sep ["else", displayAtom opts else_]
-    ]
-  display opts (NestedQuery _ q) = parens $ display opts q
-  display opts (Negation _ q) = "!" <> parens (display opts q)
-  display _ (FactId _ Nothing n) = "$" <> pretty n
-  display _ (FactId _ (Just p) n) = "$" <> pretty p <+> pretty n
-  display opts (TypeSignature _ p t) =
-    displayAtom opts p <+> ":" <+> display opts t
-  display _ (Never _) = "never"
-  display opts (Clause _ _ p pat rng) =
-    display opts p <> prng <+> displayAtom opts pat
-    where prng = case rng of
-            SeekOnBase -> "#old"
-            SeekOnStacked -> "#new"
-            _ -> mempty
-  display opts (Prim _ p pats) =
-    display opts p <+> hsep (punctuate " " (map (displayAtom opts) pats))
-  display opts (FieldSelect _ pat field q) =
-    displayAtom opts pat <> "." <> pretty field <>
-      case q of
-        Sum -> "?"
-        Record -> mempty
-  display opts (Deref _ pat) =
-    displayAtom opts pat <> ".*"
-  display _ (Enum _ f) = pretty f
-
-  displayAtom opts pat = case pat of
-    App{} -> parens $ display opts pat
-    KeyValue{} -> parens $ display opts pat
-    OrPattern{} -> parens $ display opts pat
-    IfPattern{} -> parens $ display opts pat
-    TypeSignature{} -> parens $ display opts pat
-    Nat{} -> display opts pat
-    String{} -> display opts pat
-    StringPrefix{} -> display opts pat
-    ByteArray{} -> display opts pat
-    Array{} -> display opts pat
-    ArrayPrefix{} -> display opts pat
-    Tuple{} -> display opts pat
-    Struct{} -> display opts pat
-    ElementsOfArray{} -> parens $ display opts pat
-    Elements{} -> display opts pat
-    All{} -> parens $ display opts pat
-    Wildcard{} -> display opts pat
-    Variable{} -> display opts pat
-    NestedQuery{} -> display opts pat
-    Negation{} -> display opts pat
-    FactId{} -> display opts pat
-    Never{} -> display opts pat
-    Clause{} -> parens $ display opts pat
-    Prim{} -> parens $ display opts pat
-    FieldSelect{} -> display opts pat
-    Deref{} -> display opts pat
-    Enum _ _ -> display opts pat
-
-instance (Display p, Display t) => Display (SourceQuery_ s st p t) where
-  display opts (SourceQuery maybeHead stmts _ord) = case stmts of
-    [] -> maybe mempty (display opts) maybeHead
-    _ -> case maybeHead of
-      Just head -> hang 2 (sep (display opts head <+> "where" : pstmts))
-      Nothing -> sep pstmts
-    where
-    pstmts = punctuate ";" (map (display opts) stmts)
-
-instance (Display p, Display t) => Display (SourceStatement_ s st p t) where
-  display opts (SourceStatement lhs rhs) = displayStatement opts lhs rhs
-
-displayStatement
-  :: (IsWild pat, Display pat)
-  => DisplayOpts
-  -> pat
-  -> pat
-  -> Doc ann
-displayStatement opts lhs rhs
-  | isWild lhs = display opts rhs
-  | otherwise = hang 2 $ sep [display opts lhs <+> "=", display opts rhs]
-
-instance Display PrimOp where
-  display _ PrimOpToLower = "prim.toLower"
-  display _ PrimOpLength = "prim.length"
-  display _ PrimOpZip = "prim.zip"
-  display _ PrimOpConcat = "prim.concat"
-  display _ PrimOpReverse = "prim.reverse"
-  display _ PrimOpSize = "prim.size"
-  display _ PrimOpRelToAbsByteSpans = "prim.relToAbsByteSpans"
-  display _ PrimOpUnpackByteSpans = "prim.unpackByteSpans"
-  display _ PrimOpGtNat = "prim.gtNat"
-  display _ PrimOpGeNat = "prim.geNat"
-  display _ PrimOpLtNat = "prim.ltNat"
-  display _ PrimOpLeNat = "prim.leNat"
-  display _ PrimOpNeNat = "prim.neNat"
-  display _ PrimOpAddNat = "prim.addNat"
-  display _ PrimOpNeExpr = "prim.neExpr"
-
--- -----------------------------------------------------------------------------
--- Removing source locations from the AST
-
-rmLocSchemas :: SourceSchemas_ a -> SourceSchemas_ ()
-rmLocSchemas (SourceSchemas version schemas evolves) =
-  SourceSchemas version (rmLocSchema <$> schemas) (rmLocEvolves <$> evolves)
-
-rmLocSchema :: SourceSchema_ a -> SourceSchema_ ()
-rmLocSchema (SourceSchema name inherits decls _) =
-  SourceSchema name inherits (rmLocDecl <$> decls) ()
-
-rmLocEvolves :: SourceEvolves_ a -> SourceEvolves_ ()
-rmLocEvolves (SourceEvolves _ a b) = SourceEvolves () a b
-
-rmLocDecl :: SourceDecl_ s -> SourceDecl_ ()
-rmLocDecl = \case
-  SourceImport name _ -> SourceImport name ()
-  SourcePredicate pred -> SourcePredicate $ rmLocPredDef pred
-  SourceType typeDef -> SourceType $ rmLocTypeDef typeDef
-  SourceDeriving DerivingDef{..} -> SourceDeriving $ DerivingDef
-    derivingDefRef (rmLocQuery <$> derivingDefDeriveInfo) ()
-
-rmLocPredDef :: PredicateDef_ s st p t -> PredicateDef_ () () p t
-rmLocPredDef PredicateDef{..} = PredicateDef {
-  predicateDefRef = predicateDefRef,
-  predicateDefKeyType = rmLocType predicateDefKeyType,
-  predicateDefValueType = rmLocType predicateDefValueType,
-  predicateDefDeriving = rmLocQuery <$> predicateDefDeriving,
-  predicateDefSrcSpan = ()
-}
-
-rmLocQuery :: SourceQuery_ s st p t -> SourceQuery_ () () p t
-rmLocQuery (SourceQuery mhead stmts ord) =
-  SourceQuery (rmLocPat <$> mhead) (rmLocStatement <$> stmts) ord
-
-rmLocStatement :: SourceStatement_ s st p t -> SourceStatement_ () () p t
-rmLocStatement (SourceStatement x y) =
-  SourceStatement (rmLocPat x) (rmLocPat y)
-
-rmLocTypeDef :: TypeDef_ s p t -> TypeDef_ () p t
-rmLocTypeDef (TypeDef tref ty _) = TypeDef tref (rmLocType ty) ()
-
-rmLocType :: Type_ st p t -> Type_ () p t
-rmLocType = \case
-  ByteTy -> ByteTy
-  NatTy -> NatTy
-  StringTy -> StringTy
-  ArrayTy ty -> ArrayTy $ rmLocType ty
-  RecordTy xs -> RecordTy $ rmLocFieldDef <$> xs
-  SumTy xs -> SumTy $ rmLocFieldDef <$> xs
-  SetTy ty -> SetTy $ rmLocType ty
-  PredicateTy _ pref -> PredicateTy () pref
-  NamedTy _ tref -> NamedTy () tref
-  MaybeTy ty -> MaybeTy $ rmLocType ty
-  EnumeratedTy xs -> EnumeratedTy xs
-  BooleanTy -> BooleanTy
-  TyVar x -> TyVar x
-  HasTy m r x -> HasTy (rmLocType <$> m) r x
-  HasKey ty x -> HasKey (rmLocType ty) x
-  ElementsOf ty x -> ElementsOf (rmLocType ty) x
-
-rmLocFieldDef :: FieldDef_ s p t -> FieldDef_ () p t
-rmLocFieldDef (FieldDef n ty) = FieldDef n $ rmLocType ty
-
-rmLocPat :: SourcePat_ s st p t -> SourcePat_ () () p t
-rmLocPat = \case
-  Nat _ x -> Nat () x
-  String _ x -> String () x
-  StringPrefix _ x -> StringPrefix () x
-  ByteArray _ x -> ByteArray () x
-  Array _ xs -> Array () (rmLocPat <$> xs)
-  ArrayPrefix _ xs -> ArrayPrefix () (rmLocPat <$> xs)
-  Tuple _ xs -> Tuple () (rmLocPat <$> xs)
-  Struct _ xs -> Struct () (rmLocField <$> xs)
-  App _ x xs -> App () (rmLocPat x) (rmLocPat <$> xs)
-  KeyValue _ x y -> KeyValue () (rmLocPat x) (rmLocPat y)
-  Elements _ pat -> Elements () (rmLocPat pat)
-  All _ query -> All () (rmLocPat query)
-  Wildcard _ -> Wildcard ()
-  Never _ -> Never ()
-  Variable _ v -> Variable () v
-  ElementsOfArray _ x -> ElementsOfArray () (rmLocPat x)
-  OrPattern _ x y -> OrPattern () (rmLocPat x) (rmLocPat y)
-  IfPattern _ x y z -> IfPattern () (rmLocPat x) (rmLocPat y) (rmLocPat z)
-  Negation _ x -> Negation () (rmLocPat x)
-  NestedQuery _ query -> NestedQuery () $ rmLocQuery query
-  FactId _ x y -> FactId () x y
-  TypeSignature _ x t -> TypeSignature () (rmLocPat x) (rmLocType t)
-  Clause _ _ x y rng -> Clause () () x (rmLocPat y) rng
-  Prim _ p ps -> Prim () p (rmLocPat <$> ps)
-  FieldSelect _ pat field q -> FieldSelect () (rmLocPat pat) field q
-  Deref _ pat -> Deref () (rmLocPat pat)
-  Enum _ f -> Enum () f
-
-rmLocField :: Field s st p t -> Field () () p t
-rmLocField (Field name pat) =
-  Field name (rmLocPat pat)
-
--- Remove spans from type refs only. Useful when
--- the two span types are different (s != st), e.g., s = SrcSpan, st = ()
-rmTypeLocPredDef :: PredicateDef_ s st p t -> PredicateDef_ s () p t
-rmTypeLocPredDef pred = pred
-    { predicateDefKeyType = rmLocType $ predicateDefKeyType pred
-    , predicateDefValueType = rmLocType $ predicateDefValueType pred
-    , predicateDefDeriving = rmTypeLocQuery <$> predicateDefDeriving pred}
-
-rmTypeLocQuery :: SourceQuery_ s st p t -> SourceQuery_ s () p t
-rmTypeLocQuery (SourceQuery mhead stmts ord) =
-  SourceQuery (rmTypeLocPat <$> mhead) (rmTypeLocStatement <$> stmts) ord
-
-rmTypeLocStatement :: SourceStatement_ s st p t -> SourceStatement_ s () p t
-rmTypeLocStatement (SourceStatement x y) =
-  SourceStatement (rmTypeLocPat x) (rmTypeLocPat y)
-
-rmTypeLocPat :: SourcePat_ s st p t -> SourcePat_ s () p t
-rmTypeLocPat pat = case pat of
-  Nat s x -> Nat s x
-  String s x -> String s x
-  StringPrefix s x -> StringPrefix s x
-  ByteArray s x -> ByteArray s x
-  TypeSignature s x t -> TypeSignature s (rmTypeLocPat x) (rmLocType t)
-  Array s xs -> Array s (rmTypeLocPat <$> xs)
-  ArrayPrefix s xs -> ArrayPrefix s (rmTypeLocPat <$> xs)
-  Tuple s xs -> Tuple s (rmTypeLocPat <$> xs)
-  Struct s xs -> Struct s (rmTypeLocField <$> xs)
-  App s x xs -> App s (rmTypeLocPat x) (rmTypeLocPat <$> xs)
-  KeyValue s x y -> KeyValue s (rmTypeLocPat x) (rmTypeLocPat y)
-  Elements s pat -> Elements s (rmTypeLocPat pat)
-  All s query -> All s (rmTypeLocPat query)
-  Wildcard s -> Wildcard s
-  Never s -> Never s
-  Variable s v -> Variable s v
-  ElementsOfArray s x -> ElementsOfArray s (rmTypeLocPat x)
-  OrPattern s x y -> OrPattern s (rmTypeLocPat x) (rmTypeLocPat y)
-  IfPattern s x y z ->
-    IfPattern s (rmTypeLocPat x) (rmTypeLocPat y) (rmTypeLocPat z)
-  Negation s x -> Negation s (rmTypeLocPat x)
-  NestedQuery s query -> NestedQuery s $ rmTypeLocQuery query
-  FactId s x y -> FactId s x y
-  Clause s ss x y rng -> Clause s ss x (rmTypeLocPat y) rng
-  Prim s p ps -> Prim s p (rmTypeLocPat <$> ps)
-  FieldSelect s pat field q -> FieldSelect s (rmTypeLocPat pat) field q
-  Deref s pat -> Deref s (rmTypeLocPat pat)
-  Enum s f -> Enum s f
-
-rmTypeLocField :: Field s st p t -> Field s () p t
-rmTypeLocField (Field name pat) =
-  Field name (rmTypeLocPat pat)
-
--- -----------------------------------------------------------------------------
--- Describing the kind of pattern
-
-class Describe a where
-  describe :: a -> Doc ann
-
-instance Describe (SourcePat_ s st p t) where
-  describe = \case
-    Nat {} -> "a nat"
-    String {} -> "a string"
-    StringPrefix {} -> "a string prefix"
-    ByteArray {} -> "a byte array"
-    Array {} -> "an array"
-    ArrayPrefix {} -> "an array prefix"
-    Tuple {} -> "a tuple"
-    Struct {} -> "a struct"
-    App {} -> "an application"
-    KeyValue {} -> "a key value pattern"
-    All {} -> "a set with all the results of its argument"
-    Wildcard {} -> "a wildcard pattern"
-    Never {} -> "a never pattern"
-    Variable {} -> "a variable"
-    ElementsOfArray {} -> "an element of an array"
-    Elements {} -> "an element of a set"
-    OrPattern {} -> "an or pattern"
-    IfPattern {} -> "an if pattern"
-    Negation {} -> "a negation"
-    NestedQuery {} -> "a nested query"
-    FactId {} -> "a fact id"
-    TypeSignature {} -> "a type signature"
-    Clause {} -> "a clause"
-    Prim {} -> "a primitive function"
-    FieldSelect{} -> "a record field"
-    Deref{} -> "a dereference"
-    Enum{} -> "an enum value"
-
-instance Describe SrcSpan where
-  describe _ = "a source span"
-
-instance Describe SrcLoc where
-  describe _ = "a source location"
diff --git a/glean/hs/Glean/Backend/Retry.hs b/glean/hs/Glean/Backend/Retry.hs
deleted file mode 100644
--- a/glean/hs/Glean/Backend/Retry.hs
+++ /dev/null
@@ -1,121 +0,0 @@
-{-
-  Copyright (c) Meta Platforms, Inc. and affiliates.
-  All rights reserved.
-
-  This source code is licensed under the BSD-style license found in the
-  LICENSE file in the root directory of this source tree.
--}
-
-module Glean.Backend.Retry
-  ( RetryWritesBackend(..)
-  , backendRetryWrites
-  , RetryReadsBackend(..)
-  , backendRetryReads
-  ) where
-
-import Glean.Backend.Types
-import Glean.Util.RetryChannelException
-import Glean.Util.Some
-
-data RetryWritesBackend = RetryWritesBackend RetryPolicy (Some Backend)
-
--- | Make a 'Backend' that will retry all write-related operations
--- according to the given 'RetryPolicy'
-backendRetryWrites :: Backend b => b -> RetryPolicy -> RetryWritesBackend
-backendRetryWrites backend policy = RetryWritesBackend policy (Some backend)
-
-instance Backend RetryWritesBackend where
-  queryFact (RetryWritesBackend _ backend) = queryFact backend
-  factIdRange (RetryWritesBackend _ backend) = factIdRange backend
-  getSchemaInfo (RetryWritesBackend _ backend) = getSchemaInfo backend
-  validateSchema (RetryWritesBackend _ backend) = validateSchema backend
-  predicateStats (RetryWritesBackend _ backend) = predicateStats backend
-  listDatabases (RetryWritesBackend _ backend) = listDatabases backend
-  getDatabase (RetryWritesBackend _ backend) = getDatabase backend
-  userQueryFacts (RetryWritesBackend _ backend) = userQueryFacts backend
-  userQuery (RetryWritesBackend _ backend) = userQuery backend
-  userQueryBatch (RetryWritesBackend _ backend) = userQueryBatch backend
-  deriveStored (RetryWritesBackend _ backend) = deriveStored backend
-
-  kickOffDatabase (RetryWritesBackend policy backend) kickOff =
-    retryChannelExceptions policy $ kickOffDatabase backend kickOff
-  finishDatabase (RetryWritesBackend policy backend) repo =
-    retryChannelExceptions policy $ finishDatabase backend repo
-  finalizeDatabase (RetryWritesBackend policy backend) repo =
-    retryChannelExceptions policy $ finalizeDatabase backend repo
-  updateProperties (RetryWritesBackend policy backend) repo props vals =
-    retryChannelExceptions policy $ updateProperties backend repo props vals
-  completePredicates_ (RetryWritesBackend policy backend) repo preds =
-    retryChannelExceptions policy $ completePredicates_ backend repo preds
-
-  restoreDatabase (RetryWritesBackend _ backend) = restoreDatabase backend
-  deleteDatabase (RetryWritesBackend _ backend) = deleteDatabase backend
-
-  enqueueBatch (RetryWritesBackend policy backend) batch =
-    retryChannelExceptions policy $ enqueueBatch backend batch
-  enqueueJsonBatch (RetryWritesBackend policy backend) repo batch =
-    retryChannelExceptions policy $ enqueueJsonBatch backend repo batch
-  enqueueBatchDescriptor (RetryWritesBackend policy backend)
-    repo batch waitPolicy =
-      retryChannelExceptions policy
-        $ enqueueBatchDescriptor backend repo batch waitPolicy
-  pollBatch (RetryWritesBackend policy backend) handle =
-    retryChannelExceptions policy $ pollBatch backend handle
-
-  displayBackend (RetryWritesBackend _ backend) = displayBackend backend
-  hasDatabase (RetryWritesBackend _ backend) = hasDatabase backend
-  schemaId (RetryWritesBackend _ backend) = schemaId backend
-  usingShards (RetryWritesBackend _ backend) = usingShards backend
-  initGlobalState (RetryWritesBackend _ backend) = initGlobalState backend
-
-data RetryReadsBackend = RetryReadsBackend RetryPolicy (Some Backend)
-
--- | Make a 'Backend' that will retry all read-related operations
--- according to the given 'RetryPolicy'
-backendRetryReads :: Backend b => b -> RetryPolicy -> RetryReadsBackend
-backendRetryReads backend policy = RetryReadsBackend policy (Some backend)
-
-instance Backend RetryReadsBackend where
-  queryFact (RetryReadsBackend policy backend) repo id =
-    retryChannelExceptions policy $ queryFact backend repo id
-  factIdRange (RetryReadsBackend policy backend) repo =
-    retryChannelExceptions policy $ factIdRange backend repo
-  getSchemaInfo (RetryReadsBackend policy backend) repo opts =
-    retryChannelExceptions policy $ getSchemaInfo backend repo opts
-  validateSchema (RetryReadsBackend policy backend) req =
-    retryChannelExceptions policy $ validateSchema backend req
-  predicateStats (RetryReadsBackend policy backend) repo opts =
-    retryChannelExceptions policy $ predicateStats backend repo opts
-  listDatabases (RetryReadsBackend policy backend) req =
-    retryChannelExceptions policy $ listDatabases backend req
-  getDatabase (RetryReadsBackend policy backend) repo =
-    retryChannelExceptions policy $ getDatabase backend repo
-  userQueryFacts (RetryReadsBackend policy backend) repo req =
-    retryChannelExceptions policy $ userQueryFacts backend repo req
-  userQuery (RetryReadsBackend policy backend) repo req =
-    retryChannelExceptions policy $ userQuery backend repo req
-  userQueryBatch (RetryReadsBackend policy backend) repo req =
-    retryChannelExceptions policy $ userQueryBatch backend repo req
-  deriveStored (RetryReadsBackend _ backend) = deriveStored backend
-
-  kickOffDatabase (RetryReadsBackend _ backend) = kickOffDatabase backend
-  finishDatabase (RetryReadsBackend _ backend) = finishDatabase backend
-  finalizeDatabase (RetryReadsBackend _ backend) = finalizeDatabase backend
-  updateProperties (RetryReadsBackend _ backend) = updateProperties backend
-  completePredicates_ (RetryReadsBackend _ backend) =
-    completePredicates_ backend
-
-  restoreDatabase (RetryReadsBackend _ backend) = restoreDatabase backend
-  deleteDatabase (RetryReadsBackend _ backend) = deleteDatabase backend
-
-  enqueueBatch (RetryReadsBackend _ backend) = enqueueBatch backend
-  enqueueJsonBatch (RetryReadsBackend _ backend) = enqueueJsonBatch backend
-  enqueueBatchDescriptor (RetryReadsBackend _ backend) =
-    enqueueBatchDescriptor backend
-  pollBatch (RetryReadsBackend _ backend) = pollBatch backend
-
-  displayBackend (RetryReadsBackend _ backend) = displayBackend backend
-  hasDatabase (RetryReadsBackend _ backend) = hasDatabase backend
-  schemaId (RetryReadsBackend _ backend) = schemaId backend
-  usingShards (RetryReadsBackend _ backend) = usingShards backend
-  initGlobalState (RetryReadsBackend _ backend) = initGlobalState backend
diff --git a/glean/hs/Glean/Backend/Types.hs b/glean/hs/Glean/Backend/Types.hs
deleted file mode 100644
--- a/glean/hs/Glean/Backend/Types.hs
+++ /dev/null
@@ -1,451 +0,0 @@
-{-
-  Copyright (c) Meta Platforms, Inc. and affiliates.
-  All rights reserved.
-
-  This source code is licensed under the BSD-style license found in the
-  LICENSE file in the root directory of this source tree.
--}
-
-{-# LANGUAGE TypeApplications #-}
-module Glean.Backend.Types
-  (
-    -- * Types
-    Backend(..)
-  , StackedDbOpts(..)
-  , LogDerivationResult
-
-    -- * Operations
-  , SchemaPredicates
-  , loadPredicates
-  , loadPredicatesForSchema
-  , databases
-  , localDatabases
-  , create
-  , finish
-  , fillDatabase
-  , finalize
-  , completePredicates
-  , untilDone
-
-    -- * Haxl
-  , GleanGet(..)
-  , GleanQuery(..)
-  , GleanFetcher
-  , GleanQueryer
-  , Haxl.State(..)
-  , QueryResult(..)
-  , AppendList(..)
-  , fromAppendList
-
-    -- * Shards
-  , dbShard
-  , dbShardWord
-  ) where
-
-import qualified Data.ByteString.Unsafe as B
-import Control.Concurrent
-import Control.Exception
-import Control.Monad
-import Data.Bits
-import Data.Default
-import Data.Hashable
-import qualified Data.HashMap.Strict as HashMap
-import Data.Map (Map)
-import qualified Data.Map as Map
-import Data.Monoid
-import Data.Text (Text)
-import qualified Data.Text as Text
-import qualified Data.Text.Encoding as Text
-import Data.Word
-import Data.Typeable
-import Foreign.Ptr
-import GHC.Fingerprint
-import qualified Haxl.Core as Haxl
-import System.IO.Unsafe
-
-import Util.Control.Exception
-import Util.Time (DiffTimePoints)
-
-import Glean.Query.Thrift.Internal
-import Glean.Typed
-import qualified Glean.Types as Thrift
-import Glean.Util.Some
-import Glean.Util.ThriftService (DbShard)
-import Glean.Types
-import Data.Either
-
-data StackedDbOpts
-  = IncludeBase
-  | ExcludeBase
-  deriving (Eq, Show)
-
--- |
--- An abstraction over Glean's Thrift API. This allows client code
--- to work with either a local or remote backend, chosen at runtime.
---
-class Backend a where
-  queryFact :: a -> Thrift.Repo -> Thrift.Id -> IO (Maybe Thrift.Fact)
-  factIdRange :: a -> Thrift.Repo -> IO Thrift.FactIdRange
-  getSchemaInfo :: a -> Maybe Thrift.Repo -> Thrift.GetSchemaInfo
-    -> IO Thrift.SchemaInfo
-  validateSchema :: a -> Thrift.ValidateSchema -> IO ()
-  predicateStats :: a -> Thrift.Repo -> StackedDbOpts
-    -> IO (Map Thrift.Id Thrift.PredicateStats)
-  listDatabases :: a -> Thrift.ListDatabases -> IO Thrift.ListDatabasesResult
-  getDatabase :: a -> Thrift.Repo -> IO Thrift.GetDatabaseResult
-
-  userQueryFacts :: a -> Thrift.Repo -> Thrift.UserQueryFacts
-    -> IO Thrift.UserQueryResults
-  userQuery :: a -> Thrift.Repo -> Thrift.UserQuery
-    -> IO Thrift.UserQueryResults
-  userQueryBatch :: a -> Thrift.Repo -> Thrift.UserQueryBatch
-    -> IO [Thrift.UserQueryResultsOrException]
-
-  deriveStored :: a -> LogDerivationResult -> Thrift.Repo
-    -> Thrift.DerivePredicateQuery -> IO Thrift.DerivationStatus
-
-  kickOffDatabase :: a -> Thrift.KickOff -> IO Thrift.KickOffResponse
-  finishDatabase :: a -> Thrift.Repo -> IO Thrift.FinishDatabaseResponse
-  finalizeDatabase :: a -> Thrift.Repo -> IO Thrift.FinalizeResponse
-
-  updateProperties
-    :: a
-    -> Thrift.Repo
-    -> Thrift.DatabaseProperties
-    -> [Text]
-    -> IO Thrift.UpdatePropertiesResponse
-
-  completePredicates_
-    :: a
-    -> Thrift.Repo
-    -> Thrift.CompletePredicates
-    -> IO Thrift.CompletePredicatesResponse
-
-  -- | Request a backed up database (specified via its backup locator) to be
-  -- made available. This call doesn't wait until the database actually becomes
-  -- available, it only issues the request.
-  --
-  -- This might (for local databases) or might not (for databases on a Thrift
-  -- server) return an STM action that waits for the restore operation.
-  restoreDatabase :: a -> Text -> IO ()
-
-  -- For a local database this will delete the specified repo
-  deleteDatabase :: a -> Thrift.Repo -> IO Thrift.DeleteDatabaseResult
-
-  -- Enqueue a batch for writing
-  enqueueBatch :: a -> Thrift.ComputedBatch -> IO Thrift.SendResponse
-
-  -- Enqueue a JSON batch for writing
-  enqueueJsonBatch
-    :: a
-    -> Thrift.Repo
-    -> Thrift.SendJsonBatch
-    -> IO Thrift.SendJsonBatchResponse
-
-  -- Enqueue a batch descriptor to be downloaded and written
-  enqueueBatchDescriptor
-    :: a
-    -> Thrift.Repo
-    -> Thrift.EnqueueBatch
-    -> Thrift.EnqueueBatchWaitPolicy
-    -> IO Thrift.EnqueueBatchResponse
-
-  -- Poll the status of a write batch
-  pollBatch :: a -> Thrift.Handle -> IO Thrift.FinishResponse
-
-  -- | Render for debugging
-  displayBackend :: a -> String
-
-  -- | For a given 'Repo', check whether any servers have the DB.  If
-  -- the backend is remote and using shards, this should check whether
-  -- any servers are advertising the appropriate shard.
-  hasDatabase :: a -> Thrift.Repo -> IO Bool
-
-  -- | The schema version the client wants to use. This is sent along
-  -- with queries.
-  schemaId :: a -> Maybe Thrift.SchemaId
-
-  -- | True if this is a distributed backend, and different servers
-  -- may have different DBs. If this returns True, then `hasDatabase`
-  -- can be used to check the availability of a DB.
-  usingShards :: a -> Bool
-
-  -- | Initialise the Haxl state for this Backend.
-  initGlobalState :: a -> IO (Haxl.State GleanGet, Haxl.State GleanQuery)
-
-
--- | The exception includes the length of time from start to error
-type LogDerivationResult =
-  Either (DiffTimePoints, SomeException) Thrift.UserQueryStats -> IO ()
-
-instance Backend (Some Backend) where
-  queryFact (Some backend) = queryFact backend
-  factIdRange (Some backend) = factIdRange backend
-  getSchemaInfo (Some backend) = getSchemaInfo backend
-  validateSchema (Some backend) = validateSchema backend
-  predicateStats (Some backend) = predicateStats backend
-  listDatabases (Some backend) = listDatabases backend
-  getDatabase (Some backend) = getDatabase backend
-  userQueryFacts (Some backend) = userQueryFacts backend
-  userQuery (Some backend) = userQuery backend
-  userQueryBatch (Some backend) = userQueryBatch backend
-  deriveStored (Some backend) = deriveStored backend
-
-  kickOffDatabase (Some backend) = kickOffDatabase backend
-  finishDatabase (Some backend) = finishDatabase backend
-  finalizeDatabase (Some backend) = finalizeDatabase backend
-  updateProperties (Some backend) = updateProperties backend
-  completePredicates_ (Some backend) = completePredicates_ backend
-
-  restoreDatabase (Some backend) = restoreDatabase backend
-  deleteDatabase (Some backend) = deleteDatabase backend
-
-  enqueueBatch (Some backend) = enqueueBatch backend
-  enqueueJsonBatch (Some backend) = enqueueJsonBatch backend
-  enqueueBatchDescriptor (Some backend) = enqueueBatchDescriptor backend
-  pollBatch (Some backend) = pollBatch backend
-  displayBackend (Some backend) = displayBackend backend
-  hasDatabase (Some backend) = hasDatabase backend
-  schemaId (Some backend) = schemaId backend
-  usingShards (Some backend) = usingShards backend
-  initGlobalState (Some backend) = initGlobalState backend
-
--- -----------------------------------------------------------------------------
--- Functionality built on Backend
-
-loadPredicates
-  :: Backend a
-  => a
-  -> Thrift.Repo
-  -> [SchemaPredicates]
-  -> IO Predicates
-loadPredicates backend repo refs =
-  makePredicates refs <$> getSchemaInfo backend (Just repo)
-    def { Thrift.getSchemaInfo_omit_source = True }
-
-loadPredicatesForSchema :: Backend a => a -> SchemaId -> IO Predicates
-loadPredicatesForSchema backend schemaId = do
-  info <- getSchemaInfo backend Nothing
-    def {
-      Thrift.getSchemaInfo_select = Thrift.SelectSchema_schema_id schemaId,
-      Thrift.getSchemaInfo_omit_source = True
-    }
-  return $ makePredicates [Map.elems (Thrift.schemaInfo_predicateIds info)] info
-
-databases :: Backend a => a -> IO [Thrift.Database]
-databases be =
-  Thrift.listDatabasesResult_databases <$>
-    listDatabases be def { Thrift.listDatabases_includeBackups = True }
-
-localDatabases :: Backend a => a -> IO [Thrift.Database]
-localDatabases be =
-  Thrift.listDatabasesResult_databases <$>
-    listDatabases be def { Thrift.listDatabases_includeBackups = False }
-
--- | Create a database and run the supplied IO action to write data
--- into it. When the IO action returns, the DB will be marked complete
--- and cannot be modified further.
-fillDatabase
-  :: Backend a
-  => a
-    -- ^ The backend
-  -> Repo
-    -- ^ The repo to create
-  -> Maybe Dependencies
-    -- ^ Optionally stack the new DB on another DB
-  -> IO ()
-    -- ^ What to do if the DB already exists. @return ()@ to continue,
-    -- or @throwIO@ to forbid.
-  -> IO b
-    -- ^ Caller-supplied action to write data into the DB.
-  -> IO b
-fillDatabase env repo maybeDeps ifexists action =
-  tryBracket
-    (do
-      exists <- create env repo maybeDeps
-      when exists ifexists
-    )
-    (\_ ex -> do
-      when (isRight ex) $ do
-        finish env repo
-    )
-    (const action)
-
--- | Create a database. The schema ID is set from the Backend.
-create
-  :: Backend a
-  => a
-  -> Repo
-  -> Maybe Dependencies
-  -> IO Bool  -- ^ Returns 'True' if the DB already existed
-create backend repo maybeDeps = do
-  r <- kickOffDatabase backend def
-    { kickOff_repo = repo
-    , kickOff_properties = HashMap.fromList $
-        [ ("glean.schema_id", id)
-        | Just (SchemaId id) <- [schemaId backend]
-        ]
-    , kickOff_dependencies = maybeDeps
-    }
-  return (kickOffResponse_alreadyExists r)
-
--- | Finish a DB created with 'create'
-finish
-  :: Backend a
-  => a
-  -> Repo
-  -> IO ()
-finish backend repo = do
-  void $ finishDatabase backend repo
-  finalize backend repo
-
--- | Wait for a database to finish finalizing and enter the "complete"
--- state after all writing has finished. Before the database is
--- complete, it may be queried but a stacked database cannot be
--- created on top of it.
-finalize :: Backend a => a -> Repo -> IO ()
-finalize env repo =
-  void $ untilDone $ finalizeDatabase env repo
-
--- | Notify the server when non-derived predicates are complete. This
--- must be called before derivedStored.
-completePredicates :: Backend a => a -> Repo -> CompletePredicates -> IO ()
-completePredicates env repo preds =
-  void $ untilDone $ completePredicates_ env repo preds
-
-untilDone :: IO a -> IO a
-untilDone io = loop
-  where
-  loop = do
-    r <- try io
-    case r of
-      Right a -> return a
-      Left (Retry n) -> do
-        threadDelay (truncate (n * 1000000))
-        loop
-
-
--- -----------------------------------------------------------------------------
--- Haxl
-
-data GleanGet p where
-  Get
-    :: (Typeable p, Show p, Predicate p)
-    => {-# UNPACK #-} !(IdOf p)
-    -> Bool
-    -> Repo
-    -> GleanGet p
-  GetKey
-    :: (Typeable p, Show p, Predicate p)
-    => {-# UNPACK #-} !(IdOf p)
-    -> Bool
-    -> Repo
-    -> GleanGet (KeyType p)
-
-deriving instance Show (GleanGet a)
-instance Haxl.ShowP GleanGet where showp = show
-
-instance Eq (GleanGet p) where
-  (Get p rec repo) == (Get q rec' repo') =
-    p == q && rec == rec' && repo == repo'
-  (GetKey (p :: IdOf a) rec repo) == (GetKey (q :: IdOf b) rec' repo')
-    | Just Refl <- eqT @a @b = p == q && rec == rec' && repo == repo'
-    -- the KeyTypes being equal doesn't tell us that the predicates are
-    -- equal, so we need to check that with eqT here.
-  _ == _ = False
-
-instance Hashable (GleanGet a) where
-  hashWithSalt salt (Get p rec repo) =
-    hashWithSalt salt (0::Int, typeOf p, p, rec, repo)
-  hashWithSalt salt (GetKey p rec repo) =
-    hashWithSalt salt (1::Int, typeOf p, p, rec, repo)
-
-instance Haxl.DataSourceName GleanGet where
-  dataSourceName _ = "GleanGet"
-
-type GleanFetcher = Haxl.PerformFetch GleanGet
-
-instance Haxl.StateKey GleanGet where
-  data State GleanGet = GleanGetState GleanFetcher
-
-instance Haxl.DataSource u GleanGet where
-  fetch (GleanGetState fetcher) _ _ = fetcher
-
-{-
-Why is streaming handled behind the datasource abstraction instead of
-exposing resumable queries as a request?  Because exposing resumable
-queries as a Haxl data fetch would mean hashing the continuation and
-keeping it in the Haxl cache.
--}
-
-data GleanQuery a where
-  QueryReq
-    :: (Show q, Typeable q, QueryResult q r)
-    => Query q   -- The query
-    -> Repo
-    -> Bool -- stream all results?
-    -> GleanQuery (r, Bool)
-
--- | List with O(1) append and O(n) conversion to [], aka DList
-newtype AppendList a = AppendList ([a] -> [a])
-
-instance Semigroup (AppendList a) where
-  AppendList x <> AppendList y = AppendList (x . y)
-
-instance Monoid (AppendList a) where
-  mempty = AppendList id
-
-fromAppendList :: AppendList a -> [a]
-fromAppendList (AppendList f) = f []
-
-instance Show a => Show (AppendList a) where
-  show = show . fromAppendList
-
-class Monoid r => QueryResult q r where
-  fromResults :: [q] -> r
-
-instance QueryResult q (AppendList q) where
-  fromResults qs = AppendList (qs++)
-
-instance QueryResult q (Sum Int) where
-  fromResults = Sum . length
-
-deriving instance Show (GleanQuery q)
-instance Haxl.ShowP GleanQuery where showp = show
-
-instance Eq (GleanQuery r) where
-  QueryReq (q1 :: Query a) repo1 s1 == QueryReq (q2 :: Query b) repo2 s2
-    | Just Refl <- eqT @a @b = q1 == q2 && repo1 == repo2 && s1 == s2
-  _ == _ = False
-
-instance Hashable (GleanQuery q) where
-  hashWithSalt salt (QueryReq q s repo) = hashWithSalt salt (q,s,repo)
-
-
-instance Haxl.DataSourceName GleanQuery where
-  dataSourceName _ = "GleanQuery"
-
-type GleanQueryer = Haxl.PerformFetch GleanQuery
-
-instance Haxl.StateKey GleanQuery where
-  data State GleanQuery = GleanQueryState GleanQueryer
-
-instance Haxl.DataSource u GleanQuery where
-  fetch (GleanQueryState queryer) _ _ = queryer
-
--- -----------------------------------------------------------------------------
--- Shards
-
-dbShard :: Thrift.Repo -> DbShard
-dbShard = Text.pack . show . dbShardWord
-
-dbShardWord :: Thrift.Repo -> Word64
-dbShardWord Thrift.Repo{..} =
-  unsafeDupablePerformIO $ B.unsafeUseAsCStringLen repo $ \(ptr,len) -> do
-      -- Use GHC's md5 binding. If this ever changes then the test in
-      -- hs/tests/TestShard.hs will detect it.
-    Fingerprint w _ <- fingerprintData (castPtr ptr) len
-    return (w `shiftR` 1)
-       -- SR doesn't like shards >= 0x8000000000000000
-  where
-  repo = Text.encodeUtf8 repo_name <> "/" <> Text.encodeUtf8 repo_hash
diff --git a/glean/hs/Glean/Display.hs b/glean/hs/Glean/Display.hs
deleted file mode 100644
--- a/glean/hs/Glean/Display.hs
+++ /dev/null
@@ -1,65 +0,0 @@
-{-
-  Copyright (c) Meta Platforms, Inc. and affiliates.
-  All rights reserved.
-
-  This source code is licensed under the BSD-style license found in the
-  LICENSE file in the root directory of this source tree.
--}
-
-module Glean.Display (
-    displayDefault,
-    displayVerbose,
-    Display(..),
-    DisplayOpts(..),
-    PredicateStyle(..),
-    defaultDisplayOpts,
-    verboseDisplayOpts,
-  ) where
-
-import Data.Text (Text)
-import Compat.Prettyprinter
-
-data PredicateStyle = PredicateWithHash | PredicateWithoutHash
-
-newtype DisplayOpts = DisplayOpts
-  { predicateStyle :: PredicateStyle
-  -- more later
-  }
-
--- | A "human readable" style, for things like error messages
-defaultDisplayOpts :: DisplayOpts
-defaultDisplayOpts = DisplayOpts
-  { predicateStyle = PredicateWithoutHash
-  }
-
--- | All the details, for debugging
-verboseDisplayOpts :: DisplayOpts
-verboseDisplayOpts = DisplayOpts
-  { predicateStyle = PredicateWithHash
-  }
-
-displayDefault :: Display a => a -> Doc ann
-displayDefault = display defaultDisplayOpts
-
-displayVerbose :: Display a => a -> Doc ann
-displayVerbose = display verboseDisplayOpts
-
--- | A class for paramterising pretty-printers with some options to
--- control what gets printed, for example to select different levels
--- of verbosity.
-class Display a where
-  display :: DisplayOpts -> a -> Doc ann
-
-  -- | If necessary, parenthesise the output to make it suitable for
-  -- use in an "atomic" position such as a function argument.
-  displayAtom :: DisplayOpts -> a -> Doc ann
-  displayAtom opts = display opts
-
-instance Display () where
-  display _ = pretty
-
-instance Display String where
-  display _ = pretty
-
-instance Display Text where
-  display _ = pretty
diff --git a/glean/hs/Glean/Query/Angle.hs b/glean/hs/Glean/Query/Angle.hs
deleted file mode 100644
--- a/glean/hs/Glean/Query/Angle.hs
+++ /dev/null
@@ -1,566 +0,0 @@
-{-
-  Copyright (c) Meta Platforms, Inc. and affiliates.
-  All rights reserved.
-
-  This source code is licensed under the BSD-style license found in the
-  LICENSE file in the root directory of this source tree.
--}
-
--- |
--- Small domain-specific language for building Angle queries
--- programmatically.
---
-{-# LANGUAGE TypeApplications, TypeOperators, AllowAmbiguousTypes #-}
-{-# OPTIONS_GHC -Wno-star-is-type #-}
-module Glean.Query.Angle
-  ( Angle
-  , AngleStatement
-  , var
-  , Type
-  , vars
-  , predicate
-  , where_
-  , not_
-  , (.=)
-  , stmt
-  , (.|)
-  , or_
-  , (.->)
-  , query
-  , nat
-  , byte
-  , enum
-  , string
-  , stringPrefix
-  , byteArray
-  , array
-  , tuple
-  , wild
-  , never
-  , field
-  , end
-  , rec
-  , alt
-  , asPredicate
-  , sig
-  , factId
-  , factIds
-  , factIdsArray
-  , elementsOf
-  , arrayPrefix
-  , unit
-  , if_
-  , true
-  , false
-  , bool
-  , just
-  , nothing
-  , (.+)
-  , zipp
-  , conc
-  , display
-  , RecordFields
-  , SumFields
-  , TFields(..)
-  , HasFields
-  , HasField
-  , AngleEnum(..)
-  , AngleVars
-  , new
-  , old
-  ) where
-
-import Control.Monad.State.Strict
-import Data.ByteString (ByteString)
-import Data.Proxy
-import Data.String
-import qualified Data.List.Extra as List (nubOrd)
-import Data.List.NonEmpty (NonEmpty(..))
-import qualified Data.List.NonEmpty as NonEmpty (fromList, toList)
-import Data.Text (Text)
-import Compat.Prettyprinter hiding ((<>))
-import Compat.Prettyprinter.Render.Text
-import qualified Data.Text as Text
-import qualified Data.Text.Encoding as Text
-import Data.Word
-import GHC.TypeLits hiding (Nat)
-import TextShow
-
-import Glean.Angle.Types hiding
-  (SourcePat, SourceStatement, SourceQuery, Field, Type)
-import qualified Glean.Angle.Types as Angle
-import qualified Glean.Display as Display
-import Glean.Query.Thrift.Internal as Thrift
-import Glean.Typed hiding (end)
-import Glean.Types (Nat, Byte)
-
-data SpanAngleDSL = DSL
-  deriving (Show, Eq)
-
-instance IsSrcSpan SpanAngleDSL where
-  type Loc SpanAngleDSL = SpanAngleDSL
-  startLoc _ = DSL
-  endLoc _ = DSL
-  mkSpan _ _ = DSL
-
-instance Pretty SpanAngleDSL where
-  pretty DSL = "angle DSL"
-
-type SourcePat = SourcePat' SpanAngleDSL ()
-type SourceStatement = SourceStatement' SpanAngleDSL ()
-type SourceQuery = SourceQuery' SpanAngleDSL ()
-
-newtype Angle t = Angle { gen :: State Int SourcePat }
-
-newtype AngleStatement =
-  AngleStatement { genStmt :: State Int SourceStatement }
-
--- | Render to angle text, to aid logging and debugging
-display :: Angle t -> Text
-display = render . build
-
-render :: SourceQuery -> Text
-render q = renderStrict (layoutCompact (Display.displayDefault q))
-
-build :: Angle t -> SourceQuery
-build (Angle m) =
-  case evalState m 0 of
-    NestedQuery _ q -> q
-    t -> Angle.SourceQuery (Just t) [] Unordered
-
--- | Build a query. It can returns facts of a predicate:
---
--- >    query $ predicate @Pp.Define (field @"macro" "NULL" end)
---
--- Or arbitrary values:
---
--- >    query $ var $ \n ->
--- >      n `where_` [
--- >        stmt $ predicate @Hack.MethodDeclaration $
--- >          rec $
--- >            field @"name" "foo" $
--- >            field @"container"
--- >              (rec $
--- >                 field @"class_"
--- >                    (rec (field @"name" n end))
--- >                 end)
--- >      ]
-query :: (Type t) => Angle t -> Query t
-query = Thrift.angleData . display . sig
-  -- adding a type signature ensures that our type matches the type
-  -- Glean infers. Otherwise these could diverge, leading to
-  -- deserialization errors or just wrong data.
-
-class AngleVars f r where
-  -- | Use `vars` to batch up a series of nested `var` calls:
-  --
-  -- > let foo :: Angle a -> Angle b -> Angle c -> Angle d -> Angle e
-  -- > vars foo == var $ \a -> var $ \b -> var $ \c -> var $ \d -> foo a b c d
-  vars :: f -> Angle r
-
-instance (a ~ b) => AngleVars (Angle a) b where
-  vars = id
-
-instance (Type a, AngleVars s r) => AngleVars (Angle a -> s) r where
-  vars f = var $ \ a -> vars (f a)
-
--- | Introduce an Angle variable
-var :: forall a b . Type a => (Angle a -> Angle b) -> Angle b
-var f = Angle $ do
-  x <- get
-  modify (+1)
-  let v = Angle (pure (Variable DSL ("X" <> showt x)))
-  ty <- gen (sig v)
-  r <- gen (f v)
-  let stmt = Angle.SourceStatement (Wildcard DSL) ty
-  case r of
-    Angle.NestedQuery DSL (Angle.SourceQuery q stmts ord) ->
-      return (Angle.NestedQuery DSL (Angle.SourceQuery q (stmt : stmts) ord))
-    _ ->
-      return (Angle.NestedQuery DSL (Angle.SourceQuery (Just r) [stmt] Ordered))
-
-predicate :: forall p . Predicate p => Angle (KeyType p) -> Angle p
-predicate (Angle pat) = Angle $ do
-  p <- pat
-  return $ App DSL (Variable DSL (predicateRef (Proxy @p))) [p]
-
--- | Build a query of the form `X where statements`
-where_ :: Angle t -> [AngleStatement] -> Angle t
-where_ t stmts = Angle $
-  nest <$> gen t <*> mapM genStmt stmts
-  where
-  -- merge adjacent where-clauses
-  nest (Angle.NestedQuery DSL (Angle.SourceQuery (Just q) stmts1 ord)) stmts2 =
-    Angle.NestedQuery DSL $
-      Angle.SourceQuery (Just q) (stmts1 <> stmts2) ord
-  nest q stmts =
-    Angle.NestedQuery DSL (Angle.SourceQuery (Just q) stmts Ordered)
-
-not_ :: [AngleStatement] -> AngleStatement
-not_ stmts = unit' .= Angle (Negation DSL <$> gen t)
-  where
-    t = unit' `where_` stmts
-    unit' = sig unit
-
--- | Build a statement, `A = B`
-(.=) :: Angle t -> Angle t -> AngleStatement
-l .= r = AngleStatement $ Angle.SourceStatement <$> gen l <*> gen r
-
--- | Build a statement from a plain Angle expression, ignoring the result.
--- `stmt A` is equivalent in Angle to the statement `_ = A`. For example
---
--- > var $ \x ->
--- >   x `where_` [
--- >      stmt $ predicate @Src.File x
--- >   ]
---
-stmt :: Angle t -> AngleStatement
-stmt = (wild .=)
-
-infix 1 .=
-infixr 2 `or_`
-infixr 3 .|
-
-class ToExpr a where
-  type Result a
-  toExpr :: a -> Angle (Result a)
-
-instance ToExpr (Angle a) where
-  type Result (Angle a) = a
-  toExpr = id
-
-instance ToExpr AngleStatement where
-  type Result AngleStatement = ()
-  toExpr stmt = sig unit `where_` [stmt]
-
-instance ToExpr [AngleStatement] where
-  type Result [AngleStatement] = ()
-  toExpr stmts = sig unit `where_` stmts
-
--- | Build an or-pattern, `A | B`
-(.|) :: (Result a ~ Result b, ToExpr a, ToExpr b) => a -> b -> Angle (Result a)
-a .| b = Angle $ OrPattern DSL <$> gen (toExpr a) <*> gen (toExpr b)
-
--- | Build an or-pattern between statements (deprecated: just use '.|' instead)
-or_ :: [AngleStatement] -> [AngleStatement] -> Angle ()
-or_ = (.|)
-
--- | Build a key-value pattern, `A -> B`
-(.->) :: Angle a -> Angle b -> Angle c
-a .-> b = Angle $ KeyValue DSL <$> gen a <*> gen b
-
-instance IsString (Angle Text) where
-  fromString s = Angle (pure (String DSL (Text.pack s)))
-
--- | A string expression. Note that literal strings may be used as Angle
--- expressions directly if the @OverloadedStrings@ extension is
--- enabled.
-string :: Text -> Angle Text
-string t = Angle (pure (String DSL t))
-
-nat :: Word64 -> Angle Nat
-nat w = Angle (pure (Nat DSL w))
-
-byte :: Word8 -> Angle Byte
-byte w = Angle (pure (Nat DSL (fromIntegral w)))
-
--- | HACK: A typeclass to represent enums generated from Angle. This is used
--- to splice values of these Angle-generated Thrift enum values back into Angle
--- queries.
---
--- Ideally implementations of these should be codegenerated or we should come
--- up with a better way of embedding enum values in this DSL.
-class AngleEnum a where
-  type AngleEnumTy a
-  enumName :: a -> Text
-
-enum :: AngleEnum a => a -> Angle (AngleEnumTy a)
-enum e = Angle (pure (Enum DSL (enumName e)))
-
-stringPrefix :: Text -> Angle Text
-stringPrefix t = Angle (pure (StringPrefix DSL t))
-
--- | A query for a literal value of type [byte]
-byteArray :: ByteString -> Angle ByteString
-byteArray b = Angle (pure (String DSL (Text.decodeUtf8 b)))
-
--- | Build an array expression
-array :: [Angle t] -> Angle [t]
-array xs = Angle $ Array DSL <$> mapM gen xs
-
--- | Build a tuple
-tuple :: AngleTuple a => a -> Angle (AngleTupleTy a)
-tuple = fromTuple
-
-type SourceField = Angle.Field SpanAngleDSL () SourceRef SourceRef
-
--- | Match a record. Zero or more of the fields may be matched.
---
--- >   rec $
--- >     field @"abc" x $
--- >     field @"def" y $
--- >   end
---
-rec :: HasFields f (RecordFields t) => Fields f -> Angle t
-rec fs = Angle $ Struct DSL <$> go fs []
-  where
-  go :: forall f . Fields f -> [SourceField] -> State Int [SourceField]
-  go f acc = case f of
-    NoFields -> return acc
-    Field l v rest  -> do
-      v' <- gen v
-      go rest (Angle.Field l v' : acc)
-
--- ToDo: we will also probably want a way to cast a record to a
--- subtype, and to emit a type signature.
-
--- | Match an alternative of a sum type
---
--- >   alt @"abc" value .| alt @"def" value
---
-alt
-  :: forall (l :: Symbol) v r .
-     (KnownSymbol l, HasField l v (SumFields r)) =>
-     Angle v
-  -> Angle r
-alt val = Angle $ do
-  v <- gen val
-  return $ Struct DSL
-    [Angle.Field (Text.pack (symbolVal (Proxy @l))) v]
-
-data Fields :: TFields -> * where
-  NoFields :: Fields 'TNoFields
-  Field :: Text -> Angle v -> Fields fs -> Fields ('TField l v fs)
-
-field
-  :: forall (l :: Symbol) v fs . KnownSymbol l =>
-     Angle v
-  -> Fields fs
-  -> Fields ('TField l v fs)
-field val rest = Field (Text.pack (symbolVal (Proxy @l))) val rest
-
-end :: Fields 'TNoFields
-end = NoFields
-
-wild :: Angle t
-wild = Angle $ pure $ Wildcard DSL
-
-never :: Angle t
-never = Angle $ pure (Variable DSL "never")
-
--- | Use this when you want a variable to match a nested predicate
--- rather than its key.
---
--- >  var $ \(n :: Angle Hack.Name) ->
--- >    n `where_` [
--- >      stmt $ predicate @Hack.MethodDeclaration $
--- >        rec $
--- >          field @"name" (asPredicate n) $
--- >          field @"container"
--- >             (rec $
--- >                field @"class_"
--- >                   (rec (field @"name" "MyClass" end))
--- >              end) $
--- >         end
--- >    ]
---
-asPredicate :: Angle p -> Angle (KeyType p)
-asPredicate (Angle a) = Angle a
-
--- | Sometimes the Angle typechecker needs a type signature.
--- This adds a type signature for any Angle type.
-sig :: forall p. Type p => Angle p -> Angle p
-sig a = Angle $ do
-  ta <- gen a
-  return $ TypeSignature DSL ta $ sourceType (Proxy @p)
-
-class AngleTuple a where
-  type AngleTupleTy a
-  fromTuple :: a -> Angle (AngleTupleTy a)
-
-instance AngleTuple (Angle a, Angle b) where
-  type AngleTupleTy (Angle a, Angle b) = (a,b)
-  fromTuple (a, b) = Angle $ do
-    ta <- gen a
-    tb <- gen b
-    return $ Tuple DSL [ta,tb]
-
-instance AngleTuple (Angle a, Angle b, Angle c) where
-  type AngleTupleTy (Angle a, Angle b, Angle c) = (a,b,c)
-  fromTuple (a,b,c) = Angle $ do
-    ta <- gen a
-    tb <- gen b
-    tc <- gen c
-    return $ Tuple DSL [ta,tb,tc]
-
-instance AngleTuple (Angle a, Angle b, Angle c, Angle d) where
-  type AngleTupleTy (Angle a, Angle b, Angle c, Angle d) = (a,b,c,d)
-  fromTuple (a,b,c,d) = Angle $ do
-    ta <- gen a
-    tb <- gen b
-    tc <- gen c
-    td <- gen d
-    return $ Tuple DSL [ta,tb,tc,td]
-
-instance AngleTuple (Angle a, Angle b, Angle c, Angle d, Angle e) where
-  type AngleTupleTy (Angle a, Angle b, Angle c, Angle d, Angle e) = (a,b,c,d,e)
-  fromTuple (a,b,c,d,e) = Angle $ do
-    ta <- gen a
-    tb <- gen b
-    tc <- gen c
-    td <- gen d
-    te <- gen e
-    return $ Tuple DSL [ta,tb,tc,td,te]
-
-instance AngleTuple (Angle a, Angle b, Angle c, Angle d, Angle e, Angle f) where
-  type AngleTupleTy (Angle a, Angle b, Angle c, Angle d, Angle e, Angle f) =
-    (a,b,c,d,e,f)
-  fromTuple (a,b,c,d,e,f) = Angle $ do
-    ta <- gen a
-    tb <- gen b
-    tc <- gen c
-    td <- gen d
-    te <- gen e
-    tf <- gen f
-    return $ Tuple DSL [ta,tb,tc,td,te,tf]
-
--- | Build a fact id with an explicit type @$123 : Type.2@
-factId :: forall p. Predicate p => IdOf p -> Angle p
-factId = sig . factId_
-
--- | Build a fact id without an explicit type, @$ 123@
-factId_ :: forall p. IdOf p -> Angle p
-factId_ = Angle
-  . return
-  . FactId DSL Nothing
-  . fromIntegral
-  . fromFid
-  . idOf
-
--- | Convert @factIds (1 :| [2,3]) :: NonEmpty (IdOf p)@ into
--- @($1 : p.v) ++ $2 ++ $3@ for building angle
--- queries, where @v@ is the version of predicate @p@.
--- Uses disjuction, and nubOrds the input list
-factIds :: forall p. Predicate p => NonEmpty (IdOf p) -> Angle p
-factIds xs = sig $ foldr1 (.|) (fmap factId_ (nubOrd' xs))
-  where
-    -- Our version of package extra lacks Data.List.NonEmpty.Extra
-    nubOrd' :: Ord a => NonEmpty a -> NonEmpty a
-    nubOrd' = NonEmpty.fromList . List.nubOrd . NonEmpty.toList
-
--- | Similar to `factIds` but generate an array of ids with the signature of the
--- first element only. This doesn't nubOrd the input set
-factIdsArray :: forall p. Predicate p => [IdOf p] -> Angle [p]
-factIdsArray [] = array []
-factIdsArray (x:xs) = array (sig (factId_ x) : map factId_ xs)
-
-elementsOf :: Angle [x] -> Angle x
-elementsOf listOfX = Angle $ do
-  xs <- gen listOfX
-  return (ElementsOfArray DSL xs)
-
-arrayPrefix :: NonEmpty (Angle x) -> Angle x
-arrayPrefix pats = Angle $ do
-  pats <- traverse gen pats
-  return (ArrayPrefix DSL pats)
-
-unit :: Angle ()
-unit = Angle $ pure (Struct DSL  [])
-
-if_ :: Angle cond -> Angle a -> Angle a -> Angle a
-if_ cond t e = Angle $ IfPattern DSL <$> gen cond <*> gen t <*> gen e
-
-true :: Angle Bool
-true = Angle $ pure (Variable DSL "true")
-
-false :: Angle Bool
-false = Angle $ pure (Variable DSL "false")
-
--- | Lift a boolean literal into Angle
-bool :: Bool -> Angle Bool
-bool True = true
-bool False = false
-
-just :: Angle a -> Angle (Maybe a)
-just x = Angle $ do
-  tx <- gen x
-  pure (Struct DSL [Angle.Field "just" tx])
-
-nothing :: Angle (Maybe a)
-nothing = Angle $ pure (Variable DSL "nothing")
-
-{-
-  TODO:
-  | KeyValue (SourcePat_ v t) (SourcePat_ v t)
--}
-
--- Primitives
-
-(.+) :: (ToExpr a, ToExpr b, Result a ~ Nat, Result b ~ Nat)
-     => a -> b -> Angle Nat
-a .+ b =
-  Angle $ App DSL (Variable DSL "prim.addNat") <$>
-  sequence [gen $ toExpr a, gen $ toExpr b]
-
-zipp :: Angle [a] -> Angle [b] -> Angle [(a,b)]
-zipp a b =
-  Angle $ App DSL (Variable DSL "prim.zip") <$>
-  sequence [gen a, gen b]
-
-conc :: Angle [a] -> Angle [a] -> Angle [a]
-conc a b =
-  Angle $ App DSL (Variable DSL "prim.concat") <$>
-  sequence [gen a, gen b]
-
--- -----------------------------------------------------------------------------
--- Special queries
-
--- | Query only new facts of the given predicate, i.e. facts in the
--- topmost DB in the stack.
---
--- (This is a special-purpose query tool for building incremental fact
--- derivers)
-new :: Predicate p => Angle p -> Angle p
-new = specialPredicateQuery "new"
-
--- | Query only old facts of the given predicate, i.e. facts from all
--- but the topmost DB in the stack.
---
--- (This is a special-purpose query tool for building incremental fact
--- derivers)
-old :: Predicate p => Angle p -> Angle p
-old = specialPredicateQuery "old"
-
-specialPredicateQuery :: Predicate p => Text -> Angle p -> Angle p
-specialPredicateQuery suffix (Angle pat) = Angle $ do
-  p <- pat
-  case p of
-    App DSL (Variable DSL p) args ->
-      return $ App DSL (Variable DSL (p <> "#" <> suffix)) args
-    _ -> error ": not a predicate"
-
--- -----------------------------------------------------------------------------
--- Type checking for records and sum types
-
--- | Maps a Thrift-generated record type to its fields
-type family RecordFields t :: TFields
-
--- | Maps a Thrift-generated union type to its fields
-type family SumFields t :: TFields
-
--- | @HasFields f t@ asserts that all the fields @f@ are present in
--- @t@, in any order.
-class HasFields (f :: TFields) (t :: TFields)
-
-instance HasFields 'TNoFields f
-instance (HasField l v f, HasFields r f) => HasFields ('TField l v r) f
-
--- | @HasField l v f@ asserts that field @l@ is present in @f@ with type @v@
-class HasField (l :: Symbol) v (f :: TFields)
-
-instance {-# OVERLAPPING #-} (v ~ v') => HasField l v ('TField l v' f)
-instance HasField l v f => HasField l v ('TField l' v' f)
-
-data TFields where
-  TNoFields :: TFields
-  TField :: Symbol -> v -> TFields -> TFields
diff --git a/glean/hs/Glean/Query/Thrift.hs b/glean/hs/Glean/Query/Thrift.hs
deleted file mode 100644
--- a/glean/hs/Glean/Query/Thrift.hs
+++ /dev/null
@@ -1,152 +0,0 @@
-{-
-  Copyright (c) Meta Platforms, Inc. and affiliates.
-  All rights reserved.
-
-  This source code is licensed under the BSD-style license found in the
-  LICENSE file in the root directory of this source tree.
--}
-
-module Glean.Query.Thrift
-  ( -- * Types
-    Query
-    -- * Perform query
-  , runQuery
-  , runQuery_
-  , runQueryPage
-    -- ** streaming
-  , runQueryMapPages_
-  , runQueryEach
-  , runQueryEachBatch
-    -- * Query combinators
-  , angle
-  , angleData
-  , keys
-  , recursive
-  , limit
-  , limitBytes
-  , limitTime
-  , expanding
-  , store
-  , allFacts
-    -- * Support
-  , displayQuery
-  ) where
-
-import Control.Concurrent.Async
-import Control.Monad
-import Data.Default
-import Data.Maybe
-
-import Util.Log.Text
-
-import Glean.Typed.Binary
-import Glean.Types as Thrift
-import Glean.Backend.Types (Backend(..))
-import Glean.Query.Thrift.Internal
-import Glean.Write.SendBatch
-
--- | Perform a query, fetching all results
-runQuery_
-  :: forall q backend . (Backend backend)
-  => backend    -- ^ Backend to use to perform the query
-  -> Repo       -- ^ Repo to query
-  -> Query q    -- ^ The query
-  -> IO [q]
-runQuery_ backend repo query = do
-  r <- runQueryEachBatch backend repo query id $
-    \acc page -> return (acc . (page++))
-  return (r [])
-
--- | Perform a query, fetching results up to the limits specified by
--- the query ('limit', 'limitBytes', 'limitTime').
-runQuery
-  :: forall q backend . (Backend backend)
-  => backend    -- ^ Backend to use to perform the query
-  -> Repo       -- ^ Repo to query
-  -> Query q    -- ^ The query
-  -> IO ([q], Bool)
-       -- ^ The 'Bool' is 'True' if the query results were truncated
-       -- by a limit (either a user-supplied limit, or one imposed by
-       -- the query server).
-runQuery backend repo query = do
-  (io, cont) <- runQueryPage backend repo Nothing query
-  results <- io
-  return (results, isJust cont)
-
-
--- | Perform a query, fetching results up to the limits specified by
--- the query ('limit', 'limitBytes', 'limitTime'), and returning a
--- continuation to fetch more results if a limit was hit.
-runQueryPage
-  :: forall q backend . (Backend backend)
-  => backend
-  -> Repo
-  -> Maybe UserQueryCont
-  -> Query q
-  -> IO (IO [q], Maybe UserQueryCont)
-
-runQueryPage be repo cont (Query query) = do
-  let
-    query' = query
-      { userQuery_options = Just
-          (fromMaybe def (userQuery_options query))
-            { userQueryOptions_continuation = cont }
-      , userQuery_encodings = [
-          UserQueryEncoding_listbin def,
-          UserQueryEncoding_bin def
-        ]
-      }
-  UserQueryResults{..} <- userQuery be repo query'
-  mapM_ reportUserQueryStats userQueryResults_stats
-  mapM_ (vlog 1) userQueryResults_diagnostics
-  mapM_ (waitBatch be) userQueryResults_handle
-  let results = decodeResults userQueryResults_results decodeAsFact
-  return (results, userQueryResults_continuation)
-
-
--- | Perform a query and map an IO function over the results, running the
--- query over multiple pages of results if necessary.
-runQueryMapPages_
-  :: forall q backend . (Backend backend)
-  => backend
-  -> Repo
-  -> ([q] -> IO ())
-  -> Query q
-  -> IO ()
-runQueryMapPages_ be repo fn query =
-  runQueryEachBatch be repo query () (const fn)
-
--- | Perform a query, by pages, and map a state function over each
--- result in each page. The query is pipelined so that each page of
--- results are decoded and processed while the next page is being
--- fetched.
-runQueryEach
-  :: forall q backend s . (Backend backend)
-  => backend
-  -> Repo
-  -> Query q
-  -> s
-  -> (s -> q -> IO s)
-  -> IO s
-runQueryEach be repo query s fn =
-  runQueryEachBatch be repo query s (foldM fn)
-
--- | Like runQueryEach, but process results in batches.
-runQueryEachBatch
-  :: forall q backend s . (Backend backend)
-  => backend
-  -> Repo
-  -> Query q
-  -> s
-  -> (s -> [q] -> IO s)
-  -> IO s
-runQueryEachBatch be repo query init f = do
-  (page, cont) <- runQueryPage be repo Nothing query
-  go page cont init
-  where
-  go page Nothing s = f s =<< page
-  go page cont@Just{} s = do
-    ((nextPage, nextCont), s2) <- concurrently
-      (runQueryPage be repo cont query)
-      (f s =<< page)
-    go nextPage nextCont s2
diff --git a/glean/hs/Glean/Query/Thrift/Internal.hs b/glean/hs/Glean/Query/Thrift/Internal.hs
deleted file mode 100644
--- a/glean/hs/Glean/Query/Thrift/Internal.hs
+++ /dev/null
@@ -1,241 +0,0 @@
-{-
-  Copyright (c) Meta Platforms, Inc. and affiliates.
-  All rights reserved.
-
-  This source code is licensed under the BSD-style license found in the
-  LICENSE file in the root directory of this source tree.
--}
-
-{-# LANGUAGE TypeApplications #-}
-{-# LANGUAGE ConstraintKinds #-}
-{-# LANGUAGE TypeFamilyDependencies #-}
-{-# LANGUAGE InstanceSigs #-}
-{-# LANGUAGE AllowAmbiguousTypes #-}
--- | Define internal pieces, please import "Glean.Query.Thrift" instead
-module Glean.Query.Thrift.Internal
-  ( -- * Types
-    Query(..)
-    -- * Query combinators
-  , angle
-  , angleData
-  , keys
-  , recursive
-  , limit
-  , limitBytes
-  , limitTime
-  , store
-  , allFacts
-  , expanding
-    -- * Support
-  , reportUserQueryStats
-  , showUserQueryStats
-  , displayQuery
-  , decodeResults
-  , justCheck
-  , dbgPredHasFacts
-  ) where
-
-import Control.Exception
-import Control.Monad
-import Control.Monad.IO.Class
-import Data.Default
-import Data.Dynamic
-import Data.Hashable
-import Data.IntMap (IntMap)
-import qualified Data.IntMap as IntMap
-import Data.IORef
-import qualified Data.Map as Map
-import Data.Maybe
-import Data.Proxy
-import Data.Text as Text
-import qualified Data.Text.Encoding as Text
-import Compat.Prettyprinter hiding ((<>))
-import qualified Data.Vector as Vector
-import Text.Printf
-
-import Util.Log
-
-import Glean.Typed as Typed
-import Glean.Types as Thrift
-
-type ResultDecoder a =
-     IntMap Thrift.Fact               -- ^ serialized nested facts
-  -> IORef (IntMap Dynamic)           -- ^ cached deserialized facts
-  -> IdOf a
-  -> Thrift.Fact
-  -> IO a
-
--- | A query that can be performed by 'runQuery'. Build using 'query'.
-data Query a = Type a => Query
-  { querySpec :: UserQuery
-  }
-
-instance Show (Query a) where
-  show (Query spec) = show spec
-
-instance Eq (Query a) where
-  Query spec1 == Query spec2 = spec1 == spec2
-
-instance Hashable (Query a) where
-  hashWithSalt salt (Query spec) = hashWithSalt salt spec
-
-decodeResults :: UserQueryEncodedResults -> ResultDecoder a -> IO [a]
-decodeResults results decoder =
-  case results of
-    UserQueryEncodedResults_bin UserQueryResultsBin{..} -> do
-      cacheRef <- newIORef IntMap.empty
-      let serialized = IntMap.fromList
-            [ (fromIntegral id,f)
-            | (id,f) <- Map.toList userQueryResultsBin_nestedFacts ]
-      forM (Map.toList userQueryResultsBin_facts) $ \(fid, fact) -> do
-        liftIO $ decoder serialized cacheRef (Typed.IdOf (Fid fid)) fact
-
-    UserQueryEncodedResults_listbin UserQueryResultsListBin{..} -> do
-      cacheRef <- newIORef IntMap.empty
-      let serialized = IntMap.fromList
-            [ (fromIntegral id,f)
-            | (id,f) <- Map.toList userQueryResultsListBin_nestedFacts ]
-          fids = Vector.toList userQueryResultsListBin_ids
-          facts = Vector.toList userQueryResultsListBin_facts
-          f fid fact = liftIO $
-            decoder serialized cacheRef (Typed.IdOf (Fid fid)) fact
-      zipWithM f fids facts
-
-    _other -> throwIO $ ErrorCall
-      "runQueryPage: server returned the wrong encoding"
-
--- | A human-readable form of the Query.
-displayQuery :: Query a -> Text
-displayQuery (Query UserQuery{..}) = Text.decodeUtf8 userQuery_query
-
-allFacts :: forall q . (Predicate q) => Query q
-allFacts = angle $ Text.pack $
-  show (pretty (getName (Proxy :: Proxy q))) <> " _"
-
--- | Build a query for facts using Angle syntax
---
--- Warning: nothing is checking that the type of the query matches the
--- expected type at the callsite. If you get this wrong, undefined
--- behaviour will ensue.
-angle :: forall r. (Predicate r) => Text -> Query r
-angle q = Query
-  { querySpec = angleQuery (getName (Proxy @r)) q
-  }
-
--- | Fetch just the keys of the given fact query
-keys :: (Predicate r) => Query r -> Query (KeyType r)
-keys (Query spec) = Query { querySpec = spec }
-
-angleQuery :: PredicateRef -> Text -> UserQuery
-angleQuery pref query = def
-  { userQuery_predicate = predicateRef_name pref
-  , userQuery_predicate_version =
-    Just (fromIntegral (predicateRef_version pref))
-  , userQuery_query = Text.encodeUtf8 query
-  , userQuery_options = Just def
-    { userQueryOptions_expand_results = False
-    , userQueryOptions_syntax = QuerySyntax_ANGLE
-    }
-  }
-
--- | A query for arbitrary data, as opposed to 'angle' which queries
--- for facts.
---
--- For example:
---
--- > angleData "{ 3, false }" :: Query (Nat, Bool)
---
--- Warning: nothing is checking that the type of the query matches the
--- expected type at the callsite. If you get this wrong, undefined
--- behaviour will ensue.
-angleData :: (Type r) => Text -> Query r
-angleData query = Query { querySpec = spec  }
-  where
-  spec = def
-    { userQuery_query = Text.encodeUtf8 query
-    , userQuery_options = Just def
-      { userQueryOptions_expand_results = False
-      , userQueryOptions_syntax = QuerySyntax_ANGLE
-      }
-    }
-
--- | Make a query recursive
-recursive :: Query a -> Query a
-recursive (Query q) = Query q'
-  where
-  q' = q { userQuery_options = Just (fromMaybe def (userQuery_options q))
-    { userQueryOptions_recursive = True } }
-
--- | Instead of 'recursive', pick individual predicates to expand in
--- the result
---
--- e.g.
---   expanding @My.Predicate1 $ expanding @My.Predicate2 $ query ...
---
-expanding :: forall p a . Predicate p => Query a -> Query a
-expanding (Query q) = Query q'
-  where
-  old = fromMaybe def (userQuery_options q)
-  PredicateRef name version = getName (Proxy @p)
-  ref = Thrift.SourcePredicate name (Just version)
-  q' = q { userQuery_options = Just old
-    { userQueryOptions_expand_predicates =
-       ref : userQueryOptions_expand_predicates old }}
-
--- | Set a limit on the number of results returned by a query. This controls
--- query result page size when streaming.
-limit :: Int -> Query a -> Query a
-limit n (Query q) = Query q'
-  where
-  q' = q { userQuery_options = Just (fromMaybe def (userQuery_options q))
-    { userQueryOptions_max_results = Just (fromIntegral n) } }
-
--- | Set a limit on the size of data returned by a query. This
--- controls query result page size when streaming.
-limitBytes :: Int -> Query a -> Query a
-limitBytes n (Query q) = Query q'
-  where
-  q' = q { userQuery_options = Just (fromMaybe def (userQuery_options q))
-    { userQueryOptions_max_bytes = Just (fromIntegral n) } }
-
--- | Set a limit on the time that a query can execute for. When streaming,
--- this imposes a time budget on each query page.
-limitTime
-  :: Int  -- ^ time budget in milliseconds
-  -> Query a -> Query a
-limitTime n (Query q) = Query q'
-  where
-  q' = q { userQuery_options = Just (fromMaybe def (userQuery_options q))
-    { userQueryOptions_max_time_ms = Just (fromIntegral n) } }
-
--- | Store derived facts arising from the query. This is intended for
--- caching derived facts after creating a DB, not for normal usage. If
--- the datbase is read-only, this will cause the query to fail.
-store :: Query a -> Query a
-store (Query q) = Query q'
-  where
-  q' = q { userQuery_options = Just (fromMaybe def (userQuery_options q))
-    { userQueryOptions_store_derived_facts = True } }
-
-justCheck :: Query a -> Query a
-justCheck (Query q) = Query q'
-  where
-  q' = q { userQuery_options = Just (fromMaybe def (userQuery_options q))
-  { userQueryOptions_just_check = True } }
-
-dbgPredHasFacts :: Query a -> Query a
-dbgPredHasFacts (Query q) = Query q'
-  where
-  q' = q { userQuery_options = Just (fromMaybe def (userQuery_options q))
-  { userQueryOptions_debug = def {queryDebugOptions_pred_has_facts = True}}}
-
-reportUserQueryStats :: Thrift.UserQueryStats -> IO ()
-reportUserQueryStats stats =
-  vlog 1 $ showUserQueryStats stats
-
-showUserQueryStats :: Thrift.UserQueryStats -> String
-showUserQueryStats Thrift.UserQueryStats{..} =
-  printf "%d facts, %.2fms, %ld bytes\n"
-    userQueryStats_num_facts
-    (realToFrac userQueryStats_elapsed_ns / 1000000 :: Double)
-    userQueryStats_allocated_bytes
diff --git a/glean/hs/Glean/Schema/Evolve.hs b/glean/hs/Glean/Schema/Evolve.hs
deleted file mode 100644
--- a/glean/hs/Glean/Schema/Evolve.hs
+++ /dev/null
@@ -1,460 +0,0 @@
-{-
-  Copyright (c) Meta Platforms, Inc. and affiliates.
-  All rights reserved.
-
-  This source code is licensed under the BSD-style license found in the
-  LICENSE file in the root directory of this source tree.
--}
-
-{- |
-This module focuses on determining which predicate should be transformed
-into which by looking at the contents of schemas and at the evolution
-relationships between schemas.
--}
-{-# LANGUAGE CPP #-}
-module Glean.Schema.Evolve
-  ( validateResolvedEvolutions
-  , directSchemaEvolutions
-  , calcEvolutions
-  , validateEvolutions
-  , visiblePredicates
-  , mapVisible
-  , VisiblePredicates
-  , visibleDefined
-  , canBeStored
-  ) where
-
-import Control.Applicative
-import Control.Monad
-#if !MIN_VERSION_base(4,16,0)
-import Data.Foldable
-#endif
-import Data.Graph
-import Data.Hashable
-import qualified Data.HashSet as HashSet
-import Data.HashSet (HashSet)
-import Data.HashMap.Strict (HashMap)
-import qualified Data.HashMap.Strict as HashMap
-import Data.List
-import Data.List.Extra (nubOrdOn)
-import Data.Map (Map)
-import qualified Data.Map as Map
-import Data.Maybe (listToMaybe)
-import qualified Data.Set as Set
-import Data.Text (Text)
-import qualified Data.Text as Text
-
-import Glean.Angle.Types
-import Glean.Display
-import Glean.Schema.Types
-import Glean.Schema.Util
-
-{- Note [Schema Evolutions]
-
-An 'schema evolution' is a non-commuting transitive relationship between two
-schemas. It is established by a source code annotation saying:
-
-    schema A evolves B
-
-It establishes a 'predicate evolution' relationship between all predicates
-exported by B and predicates exported by A if they have the same name. Schema
-evolutions must form a graph with no cycles.
-
-A 'predicate evolution' is a reflexive, commutative, non-transitive
-relationship between two predicates. It means that facts from one predicate can
-be transformed into facts from the other.
-
-It is established in two cases:
-
-  - predicate P evolves predicate Q if the schema containing P evolves the
-  schema containing Q and both P and Q have the same name.
-  This is caused by a source code annotation.
-
-  - predicate P evolves predicate Q if they are defined in schemas with the
-  same SchemaRef and have the same name but different hashes.
-  This is caused by a version-less schema migration and the two instances
-  live in different ProcessedSchema.
-
-NB: Although 'predicate evolution' is not a transitive relationship, we
-expect it to work in all transitively evolved predicates because we want
-'schema evolution' to be transitive.
-
-Example of why predicate evolution is not transitive:
-  predicate P.1 = { a : maybe nat }
-  predicate P.2 = {}
-  predicate P.3 = { a : maybe string }
-
-P.2 can evolve P.1 and P.3 can evolve P.2, but P.3 cannot evolve P.1.
--}
-
--- | As specified by a `schema x evolves y` line.
--- Does not take the db's content into account.
--- value evolves key
-directSchemaEvolutions
-  :: [ResolvedSchemaRef]
-  -> Either Text (Map SchemaRef SchemaRef)
-directSchemaEvolutions schemas =
-  Map.traverseWithKey checkMultipleEvolves $
-  Map.fromListWith (++)
-    [ (evolved, [schemaRef resolved])
-    | resolved <- schemas
-    , evolved <- Set.toList $ resolvedSchemaEvolves resolved
-    ]
-  where
-  checkMultipleEvolves old newList =
-    case nub newList of
-      [new] -> Right new
-      _     -> Left $ "multiple schemas evolve "
-        <> showSchemaRef old
-        <> ": "
-        <> Text.unwords (map showSchemaRef newList)
-
--- | Visible predicates which can be evolved.
-data VisiblePredicates p = VisiblePredicates
-  { visibleDefined :: HashSet p
-  , visibleReexported :: HashSet p
-  }
-
-visiblePredicates :: ResolvedSchemaRef -> VisiblePredicates PredicateRef
-visiblePredicates ResolvedSchema{..} = VisiblePredicates
-  { visibleDefined = evolvable resolvedSchemaPredicates
-  , visibleReexported = evolvable resolvedSchemaReExportedPredicates
-  }
-  where
-  evolvable :: HashMap PredicateRef ResolvedPredicateDef -> HashSet PredicateRef
-  evolvable = HashSet.fromList . filter stored . HashMap.keys
-
-  stored ref =
-    maybe True (canBeStored . derivingDefDeriveInfo) $
-      HashMap.lookup ref resolvedSchemaDeriving
-
-canBeStored :: DerivingInfo a -> Bool
-canBeStored = \case
-  Derive DeriveOnDemand _ -> False
-  Derive DerivedAndStored _ -> True
-  Derive DeriveIfEmpty _ -> True
-  NoDeriving -> True
-
-mapVisible
-  :: (Eq q, Hashable q)
-  => (p -> q)
-  -> VisiblePredicates p
-  -> VisiblePredicates q
-mapVisible f (VisiblePredicates d r) =
-  VisiblePredicates (HashSet.map f d) (HashSet.map f r)
-
-instance (Eq p, Hashable p) => Semigroup (VisiblePredicates p) where
-  VisiblePredicates d r <> VisiblePredicates d' r' =
-    VisiblePredicates (d <> d') (r <> r')
-
-instance (Eq p, Hashable p) => Monoid (VisiblePredicates p) where
-  mappend = (<>)
-  mempty = VisiblePredicates mempty mempty
-
--- | Given evolutions between schemas and evolutions between instances of the
--- same predicate, calculate the final instance-to-instance predicate
--- evolutions.
-calcEvolutions
-  :: forall p. (Eq p, Ord p, Hashable p, ShowRef p)
-  => (p -> PredicateRef)
-  -> Map PredicateRef [p]          -- ^ all predicates by ref
-  -> Map SchemaRef (VisiblePredicates p) -- ^ all predicates by schema ref
-  -> Map SchemaRef SchemaRef       -- ^ evolutions from src code directives
-  -> Map PredicateRef p            -- ^ evolutions from versionless migrations
-  -> Either Text (HashMap p p)
-calcEvolutions toRef byPredRef bySchemaRef schemaEvolutions autoEvolutions =
-  case cycles evolutions of
-    [] -> Right evolutions
-    []:_ -> error "calcEvolutions"
-    (x:xs):_ -> Left $ "found a cycle in predicate evolutions: " <>
-      Text.intercalate " -> " (map showRef $ x:xs ++ [x])
-  where
-  cycles :: Ord a => HashMap a a -> [[a]]
-  cycles hm = [ cycle | CyclicSCC cycle <- scc]
-    where
-    scc = stronglyConnComp [ (k,k,[v]) | (k, v) <- HashMap.toList hm ]
-
-  evolutions = fromSourceAnnotations `HashMap.union` fromVersionlessMigrations
-
-  fromVersionlessMigrations :: HashMap p p
-  fromVersionlessMigrations = HashMap.fromList
-    [ (old, new)
-    | (ref, preds) <- Map.toList byPredRef
-    , old <- preds
-    , Just new <- [Map.lookup ref autoEvolutions]
-    , new /= old
-    ]
-
-  fromSourceAnnotations :: HashMap p p
-  fromSourceAnnotations =
-    HashMap.unions
-    $ map concrete
-    $ map (uncurry match)
-    $ Map.toList schemaEvolutions
-    where
-      concrete :: HashMap PredicateRef PredicateRef -> HashMap p p
-      concrete = HashMap.fromList . concatMap expand . HashMap.toList
-
-      expand :: (PredicateRef, PredicateRef) -> [(p,p)]
-      expand (from, to) =
-        [ (from', to')
-        | from' <- allInstances from
-        , Just to' <- [mostEvolvedInstance to]
-        ]
-
-      allInstances :: PredicateRef -> [p]
-      allInstances ref = Map.findWithDefault [] ref byPredRef
-
-      mostEvolvedInstance :: PredicateRef -> Maybe p
-      mostEvolvedInstance ref = evolved <|> anyInstance
-        where
-        evolved = Map.lookup ref autoEvolutions
-        anyInstance = listToMaybe =<< Map.lookup ref byPredRef
-
-  match :: SchemaRef -> SchemaRef -> HashMap PredicateRef PredicateRef
-  match old new = HashMap.fromList
-    [ (rold, rnew)
-    | rold <- predicates old
-    , Just rnew <- [Map.lookup (name rold) newByName]
-    , rnew /= rold -- avoid re-exports evolving themselves
-    ]
-    where
-    newByName :: Map Name PredicateRef
-    newByName = Map.fromList [ (name ref, ref) | ref <- predicates new ]
-
-  predicates :: SchemaRef -> [PredicateRef]
-  predicates sref =
-    -- defined override reexported
-    nubOrdOn name
-      $ map toRef
-      $ HashSet.toList defined <> HashSet.toList reexported
-    where
-      VisiblePredicates defined reexported =
-        Map.findWithDefault mempty sref bySchemaRef
-
-  name :: PredicateRef -> Name
-  name = predicateRef_name
-
--- | Check schemas for compatibility and map each predicate to their
--- evolved counterpart in the the evolvedBy map.
---
--- This is abstracted over the type of predicates and types, because
--- we use it in two different ways:
---
--- 1. To check the validity of "schema A evolves B" declarations.  This
---    check is performa at schema resolution time, so
---       p = PredicateRef
---       t = TypeRef
---
--- 2. To check compatibility between complete schemas when a new
---    schema instance is added to the SchemaIndex. We're dealing with
---    complete hashed schemas in this case, so
---       p = PredicateId
---       t = TypeId
---
-validateEvolutions
-  :: (Eq p, Eq t, ShowRef p, ShowRef t,
-      Hashable p, Hashable t, Display p, Display t)
-  => Maybe (p -> Bool)               -- ^ does the db has facts of p
-  -> HashMap t (TypeDef_ st p t)        -- ^ types to their definitions
-  -> HashMap p (PredicateDef_ s st p t) -- ^ predicates to their definitions
-  -> HashMap p p                     -- ^ predicate evolutions
-  -> Either Text ()
-validateEvolutions mHasFacts types preds evolutions =
-  void $ HashMap.traverseWithKey validate evolutions
-  where
-    validate old new =
-      let PredicateDef _ oldKey oldVal _ _ = preds HashMap.! old
-          PredicateDef _ newKey newVal _ _ = preds HashMap.! new
-          keyErr = newKey `canEvolve'` oldKey
-          valErr = newVal `canEvolve'` oldVal
-      in
-      case keyErr <|> valErr of
-        Nothing -> Right ()
-        Just err -> Left $
-          "cannot evolve predicate " <> showRef old <>
-          " into " <> showRef new <> ": " <> err
-
-    canEvolve' = canEvolve types compatible
-
-    compatible new old =
-      case mHasFacts of
-        Nothing ->
-          -- Here we are validating an evolution graph without a database.
-          -- Compatible predicates must ultimately evolve to the same
-          -- PredicateRef. We ignore hashes because auto-evolutions will make
-          -- all predicates with the same PredicateRef evolve to the same thing
-          -- in a concrete database.
-          ref (evolved new) == ref (evolved old)
-        Just hasFacts
-            -- if there are no facts, there will be no transformation so all
-            -- types are considered compatible.
-          | not (hasFacts old) -> True
-            -- there will be a transformation so the evolutions map should have
-            -- an exact match.
-          | otherwise ->
-            HashMap.lookupDefault old old evolutions
-              ==  HashMap.lookupDefault new new evolutions
-
-    ref p = predicateDefRef $ preds HashMap.! p
-
-    -- get most evolved version of a predicate
-    evolved p = case HashMap.lookup p evolutions of
-      Nothing -> p
-      Just p' -> if p' == p then p else evolved p'
-
-
--- | Create a mapping from a schema to the schema that evolves it. This will
---  - check if any schema is evolved by multiple schemas.
---  - check if all schema evolutions are legal.
---
--- If 'B evolves A' and 'C evolves A', when a query for A comes we won't
--- know whether to serve facts from C or from B. Therefore we disallow
--- multiple schemas to evolve a single one.
-validateResolvedEvolutions :: [ResolvedSchemaRef] -> Either Text ()
-validateResolvedEvolutions resolved = do
-  schemaEvolutions <- directSchemaEvolutions resolved
-  let autoEvolutions = mempty
-  evolutions <- calcEvolutions
-    id
-    byRef
-    bySchemaRef
-    schemaEvolutions
-    autoEvolutions
-
-  validateEvolutions Nothing types preds evolutions
-  where
-    byRef :: Map PredicateRef [PredicateRef]
-    byRef = Map.fromList [ (ref, [ref]) | ref <- HashMap.keys preds ]
-
-    bySchemaRef :: Map SchemaRef (VisiblePredicates PredicateRef)
-    bySchemaRef = Map.fromList
-      [ (schemaRef schema, visiblePredicates schema)
-      | schema <- resolved
-      ]
-
-    -- Later definitions override earlier ones in case of db overrides
-    -- (is this really the case or are overrides added to a new ProcessedSchema?)
-    preds :: HashMap PredicateRef
-      (PredicateDef_ SrcSpan SrcSpan PredicateRef TypeRef)
-    preds = HashMap.unions $ reverse $ map resolvedSchemaPredicates resolved
-
-    types :: HashMap TypeRef ResolvedTypeDef
-    types = HashMap.unions $ reverse $ map resolvedSchemaTypes resolved
-
-data Opt = Option | FieldOpt
-
--- | Check if a type is backward and forward compatible.
---
--- For backward and forward compatibility the rules are:
---  - only add or remove fields with defaultable values
---  - if a field referencing a predicate is changed, it must be
---    to a compatible predicate reference.
---
--- Two predicate references are compatible if they evolve to the same predicate
--- or have the same PredicateRef.
-canEvolve
-  :: (Eq p, Eq t, ShowRef p, ShowRef t,
-      Hashable p, Hashable t, Display p, Display t)
-  => HashMap t (TypeDef_ s p t) -- ^ type definitions
-  -> (p -> p -> Bool)         -- ^ whether two predicates are compatible
-  -> Type_ s p t                -- ^ updated type
-  -> Type_ s p t                -- ^ old type
-  -> Maybe Text               -- ^ compatibility error
-canEvolve types compatible new old = go new old
-  where
-    get ty = case HashMap.lookup ty types of
-      Just v -> typeDefType v
-      Nothing -> error $ "unknown type " <> Text.unpack (showRef ty)
-
-    go (NamedTy _ new) (NamedTy _ old )
-      | new == old = Nothing
-      | otherwise = go (get new) (get old)
-    go (NamedTy _ t) old = go (get t) old
-    go new (NamedTy _ t) = go new (get t)
-    go (MaybeTy new) (MaybeTy old) = go new old
-    go ByteTy ByteTy = Nothing
-    go NatTy NatTy = Nothing
-    go StringTy StringTy = Nothing
-    go BooleanTy BooleanTy = Nothing
-    go (ArrayTy new) (ArrayTy old) = go new old
-    go (SetTy new) (SetTy old) = go new old
-    go (PredicateTy _ new) (PredicateTy _ old)
-      | not (compatible new old) = Just
-          $ "type changed from " <> showRef old
-          <> " to " <> showRef new
-      | otherwise = Nothing
-    go (EnumeratedTy new) (EnumeratedTy old) =
-      compareFieldList Option new' old'
-      where
-        new' = map unitOpt new
-        old' = map unitOpt old
-        unitOpt name = FieldDef name (RecordTy [])
-    go (SumTy new) (SumTy old) = compareFieldList Option new old
-    go (RecordTy new) (RecordTy old) = compareFieldList FieldOpt new old
-    go (SetTy new) (ArrayTy old) = go new old
-    go (ArrayTy new) (SetTy old) = go new old
-    go new old = Just $ Text.pack $
-      "type changed from " <>
-        show (displayDefault old) <> " to " <>
-        show (displayDefault new)
-
-    compareFieldList optName new old =
-      removedFieldsError <|> newRequiredFieldsError <|>
-      asum (map compareField matchingFields)
-      where
-        names = map fieldDefName
-        oldByName = Map.fromList (zip (names old) old)
-        newByName = Map.fromList (zip (names new) new)
-        matchingFields =
-          [ (name, fNew, fOld)
-          | FieldDef name fNew <- new
-          , Just (FieldDef _ fOld) <- [Map.lookup name oldByName]
-          ]
-        compareField (name, new, old) = addLocation <$> go new old
-          where
-            addLocation err =
-              "in " <> showOpt optName <> " '" <> name <> "', " <> err
-
-        addedFields = Map.difference newByName oldByName
-        removedFields = Map.difference oldByName newByName
-        required fields = Map.filter (not . hasDefault . fieldDefType) fields
-        hasDefault ty = case ty of
-          MaybeTy _ -> True
-          NatTy -> True
-          StringTy -> True
-          BooleanTy -> True
-          ByteTy -> True
-          ArrayTy _ -> True
-          SetTy _ -> True
-          RecordTy fields -> all (hasDefault . fieldDefType) fields
-          EnumeratedTy{} -> True
-          SumTy (first : _) -> hasDefault (fieldDefType first)
-          NamedTy _ ty -> hasDefault (get ty)
-          _ -> False
-
-        newRequiredFields = Map.keys (required addedFields)
-        removedRequiredFields = Map.keys (required removedFields)
-
-        removedFieldsError = case optName of
-          Option -> Nothing
-          FieldOpt -> case removedRequiredFields  of
-            [] -> Nothing
-            fields -> Just $ "missing required " <> plural optName fields
-              <> ": " <> Text.unwords fields
-
-        newRequiredFieldsError = case optName of
-          Option -> Nothing
-          FieldOpt -> case newRequiredFields of
-            [] -> Nothing
-            _ -> Just $ Text.unlines
-              [ Text.unwords [ "required" , plural optName newRequiredFields
-                , "added:" , Text.unwords newRequiredFields ]
-              , "For backward and forward compatibility, predicate evolutions"
-                <> " require that all new fields are non-predicate types"
-              ]
-
-    plural s [_] = showOpt s
-    plural s _ = showOpt s <> "s"
-    showOpt Option = "option"
-    showOpt FieldOpt = "field"
diff --git a/glean/hs/Glean/Schema/Resolve.hs b/glean/hs/Glean/Schema/Resolve.hs
deleted file mode 100644
--- a/glean/hs/Glean/Schema/Resolve.hs
+++ /dev/null
@@ -1,824 +0,0 @@
-{-
-  Copyright (c) Meta Platforms, Inc. and affiliates.
-  All rights reserved.
-
-  This source code is licensed under the BSD-style license found in the
-  LICENSE file in the root directory of this source tree.
--}
-
-{-# LANGUAGE DeriveGeneric #-}
-
-module Glean.Schema.Resolve
-  ( parseAndResolveSchema
-  , parseAndResolveSchemaCached
-  , SchemaParserCache
-  , resolveType
-  , resolveSchema
-  , runResolve
-  , resolveQuery
-  , resolveSchemaRefs
-  ) where
-
-import Control.Monad
-import Control.Monad.Reader
-import Control.Monad.Except
-import Data.ByteString (ByteString)
-import qualified Data.ByteString as ByteString
-import Data.Char
-import Data.Graph
-import Data.Foldable
-import Data.HashMap.Strict (HashMap)
-import qualified Data.HashMap.Strict as HashMap
-import qualified Data.HashSet as HashSet
-import Data.HashSet (HashSet)
-import Data.List
-import Data.Maybe
-import qualified Data.Set as Set
-import Data.Text (Text)
-import qualified Data.Text as Text
-import Compat.Prettyprinter hiding (group)
-import TextShow
-
-import Glean.Angle.Hash
-import Glean.Angle.Parser
-import Glean.Angle.Types
-import Glean.Schema.Types
-import Glean.Schema.Util
-import Glean.Schema.Evolve (validateResolvedEvolutions)
-
-type SchemaParserCache = HashMap Hash SourceSchemas
-
--- ---------------------------------------------------------------------------
--- High-level schema parsing / resolution APIs
-
---
--- | Useful packaging of 'parseSchema' and 'resolveSchema'. Note that
--- parsing and resolution of a schema is a pure function.
---
-parseAndResolveSchema
-  :: ByteString
-  -> Either String (SourceSchemas, ResolvedSchemas)
-parseAndResolveSchema str =
-  case parseSchema str of
-    Left str -> Left str
-    Right ss -> case resolveSchema ss of
-      Left txt -> Left (Text.unpack txt)
-      Right r -> Right (ss, r)
-
---
--- | Like parseAndResolveSchema but uses a cache to avoid repeatedly
--- parsing the same schema fragments.
---
--- We split the input string at "schema" declarations and hash the
--- content of each one to use as the cache key. There are a couple of
--- caveats here:
---
---  * we lose the benefit of the FILE annotations that tell us the
---    original source file name for error messages. Therefore don't
---    use this parsing method when you want error messages; use
---    the uncached parseAndResolveSchema instead.
---
---  * "schema" should appear in column 0. But if it doesn't, the worst
---    that can happen is we miss out on some caching. Since "schema" is
---    a keyword, it can't appear inside a schema or anything silly like
---    that.
---
-parseAndResolveSchemaCached
-  :: SchemaParserCache
-  -> ByteString
-  -> Either String (SourceSchemas, ResolvedSchemas, SchemaParserCache)
-parseAndResolveSchemaCached cache str = do
-  let
-    (ver, rest) = stripAngleVersion str
-
-    cutSchemas b =
-      (h <> "\n") : -- put the "\n" back on the end
-        if ByteString.null t
-          then []
-          else cutSchemas (ByteString.drop 1 t) -- drop the "\n"
-      where (h,t) = ByteString.breakSubstring "\nschema" b
-
-    schemaFragments =
-      [ (hashByteString frag, frag)
-      | frag <- cutSchemas rest ]
-
-  parsed <- forM schemaFragments $ \(key, str) ->
-    case HashMap.lookup key cache of
-      Nothing -> case parseSchemaWithVersion ver str of
-        Left err -> Left err
-        Right ss -> return (key, ss)
-      Just cached -> return (key, cached)
-
-  let
-    merged = SourceSchemas
-      { srcAngleVersion = ver
-      , srcSchemas = schemas
-      , srcEvolves = evolves }
-      where
-        schemas = concatMap (srcSchemas . snd) parsed
-        evolves = concatMap (srcEvolves . snd) parsed
-
-    newCache = HashMap.union cache (HashMap.fromList parsed)
-
-  case resolveSchema merged of
-    Left txt -> Left (Text.unpack txt)
-    Right r -> Right (merged, r, newCache)
-
---
--- | Turn 'SourceSchemas' into a 'ResolvedSchemas' by resolving all the
--- references and checking for validity.
---
-resolveSchema :: SourceSchemas -> Either Text ResolvedSchemas
-resolveSchema schemas = runExcept $ do
-  checkAngleVersion (srcAngleVersion schemas)
-
-  SourceSchemas{..} <- resolveSchemaRefs schemas
-
-  let
-    -- dependency analysis: we want to process schemas in dependency
-    -- order, and detect cycles in evolves declarations.
-    sccs = stronglyConnComp
-      [ (schema, schemaName schema, out schema)
-      | schema <- srcSchemas ]
-
-    out s = schemaDependencies s <> evolvesOf (schemaName s)
-
-    schemaDependencies SourceSchema{..} =
-      schemaInherits ++ [ name | SourceImport name _ <- schemaDecls ]
-
-    evolves = HashMap.fromListWith (++)
-      [ (new, [old])
-      | SourceEvolves _ new old <- srcEvolves
-      ]
-
-    evolvesOf name = HashMap.lookupDefault [] name evolves
-
-    resolveSchemas env [] = return env
-    resolveSchemas env (AcyclicSCC one : rest) = do
-      let schemaEvolves = HashMap.lookupDefault [] (schemaName one) evolves
-      resolved <- resolveOneSchema env srcAngleVersion
-        schemaEvolves one
-      resolveSchemas (HashMap.insert (schemaName one) resolved env) rest
-    resolveSchemas _ (CyclicSCC some : _) = throwError $
-      "cycle in schema definitions between: " <>
-        Text.intercalate ", " (map (showRef . schemaName) some)
-
-  -- Resolve all the references in each individual schema
-  finalEnv <- resolveSchemas HashMap.empty sccs
-
-  let
-    resolved =
-        [ schema
-        | AcyclicSCC one <- sccs
-        , Just schema <- [HashMap.lookup (schemaName one) finalEnv ] ]
-
-    allSchemas =
-      [ schema
-      | schema@ResolvedSchema{..} <- HashMap.elems finalEnv
-      , resolvedSchemaName == "all"
-      ]
-
-  when (srcAngleVersion >= AngleVersion 6) $
-    liftEither $ validateResolvedEvolutions resolved
-
-  return ResolvedSchemas
-    { schemasHighestVersion =
-        if null allSchemas
-           then Nothing
-           else Just (maximum $ map resolvedSchemaVersion allSchemas)
-    , schemasResolved = resolved
-    }
-
-
-resolveSchemaRefs :: SourceSchemas -> Except Text SourceSchemas
-resolveSchemaRefs SourceSchemas{..} = do
-  let
-     unqualMap
-       | srcAngleVersion >= AngleVersion 10 =
-         HashMap.fromListWith (<>)
-           [ (SourceRef name Nothing, HashSet.singleton ref)
-           | SourceSchema{..} <- srcSchemas
-           , let ref@(SourceRef name _) = schemaName
-           ]
-       | otherwise = HashMap.empty
-
-     refMap = unqualMap <> HashMap.fromList
-       [ (schemaName, HashSet.singleton schemaName)
-       | SourceSchema{..} <- srcSchemas
-       ]
-
-     schemaByName ref =
-       case HashMap.lookup ref refMap of
-         Nothing -> unknown
-         Just s -> case HashSet.toList s of
-           [one] -> return one
-           names -> throwError $
-             "ambiguous schema " <> showRef ref <>
-             ", could be one of " <> Text.intercalate ", " (map showRef names)
-       where
-       unknown = throwError $ "unknown schema: " <> showRef ref
-
-     schemaByNameWithNamespace parentSchema ref =
-       let message e = e <> " within schema: " <> showRef parentSchema
-       in withExcept message (schemaByName ref)
-
-     resolveDecl parentSchema (SourceImport r s) =
-      SourceImport <$> schemaByNameWithNamespace parentSchema r <*> pure s
-     resolveDecl _ decl = return decl
-
-     resolveEvolve (SourceEvolves l n o) =
-       SourceEvolves l <$> schemaByName n <*> schemaByName o
-
-     resolveSchema SourceSchema{..} = do
-       inherits <- mapM (schemaByNameWithNamespace schemaName) schemaInherits
-       decls <- mapM (resolveDecl schemaName) schemaDecls
-       return SourceSchema
-         { schemaName = schemaName
-         , schemaInherits = inherits
-         , schemaDecls = decls
-         , schemaSrcSpan = schemaSrcSpan
-         }
-
-  schemas <- traverse resolveSchema srcSchemas
-  evolves <- traverse resolveEvolve srcEvolves
-
-  return SourceSchemas
-    { srcAngleVersion = srcAngleVersion
-    , srcSchemas = schemas
-    , srcEvolves = evolves
-    }
-
-type Environment = HashMap SourceRef ResolvedSchemaRef
-
-resolveOneSchema
-  :: Environment
-  -> AngleVersion
-  -> [SourceRef]
-  -> SourceSchema
-  -> Except Text ResolvedSchemaRef
-
-resolveOneSchema env angleVersion evolves SourceSchema{..} =
-  let inSchema e = throwError $ "In " <> showRef schemaName <> ":\n  " <> e in
-  flip catchError inSchema $ do
-  let
-    SourceRef namespace maybeVer = schemaName
-
-    schemaByName name = case HashMap.lookup name env of
-      Nothing -> throwError $ "unknown schema: " <> showRef name
-      Just one -> return one
-
-  checkNameSpace namespace
-
-  -- Version of this schema
-  version <- case maybeVer of
-    Nothing -> throwError $ "missing version: " <> showRef schemaName
-    Just v -> return v
-
-  -- All the schemas we're inheriting from
-  inherits <- traverse schemaByName schemaInherits
-
-  -- All the schemas we imported
-  imports <- traverse schemaByName [ name | SourceImport name _ <- schemaDecls ]
-
-  let
-    qualify :: Name -> Name
-    qualify x = namespace <> "." <> x
-
-    qualifyNameEnv :: NameEnv t -> NameEnv t
-    qualifyNameEnv env = HashMap.fromList
-      [ (SourceRef (qualify name) ver, target)
-      | (SourceRef name ver, target) <- HashMap.toList env ]
-
-    localPreds =
-      [ let
-          SourceRef name explicitVersion = predicateDefRef p
-          thisVersion = fromMaybe version explicitVersion
-          qname = qualify name
-        in
-          (name, PredicateRef qname thisVersion, p)
-      | SourcePredicate p <- schemaDecls
-      ]
-
-    localTypes =
-      [ let
-          SourceRef name explicitVersion = typeDefRef p
-          thisVersion = fromMaybe version explicitVersion
-          qname = qualify name
-        in
-          (name, TypeRef qname thisVersion, p)
-      | SourceType p <- schemaDecls
-      ]
-
-  -- Check for multiple definitions of the same name/version.
-  -- Multiple definitions of the same name is OK: an unqualified
-  -- reference will be rejected as ambiguous, but can be resolved by
-  -- using an explicit version.
-  let
-    numRefs = HashMap.fromListWith (+) $
-      [ ((predicateRef_name, predicateRef_version), 1::Int)
-      | (_, PredicateRef{..}, _) <- localPreds ] ++
-      [ ((typeRef_name, typeRef_version), 1)
-      | (_, TypeRef{..}, _) <- localTypes]
-  forM_ (HashMap.toList numRefs) $ \((name,ver), num) -> do
-    when (num > 1) $ throwError $
-      "multiple definitions for: " <> name <> "." <> showt ver
-
-  -- Build the scope: a mapping from unversioned names to RefTarget
-  let
-    -- inherited definitions are in scope unqualified and qualified
-    --   (but unqualified local names override unqualified inherited names)
-    qualInheritedScope :: NameEnv RefResolved
-    qualInheritedScope =
-      unionNameEnvs $ map resolvedSchemaQualScope inherits
-
-    unqualInheritedScope :: NameEnv RefResolved
-    unqualInheritedScope =
-      unionNameEnvs $ map resolvedSchemaUnqualScope inherits
-
-    -- imported names are in scope qualified only
-    importedScope :: NameEnv RefResolved
-    importedScope = unionNameEnvs $ map resolvedSchemaQualScope imports
-
-    unionNameEnvs :: [NameEnv RefResolved] -> NameEnv RefResolved
-    unionNameEnvs = foldl' (HashMap.unionWith Set.union) HashMap.empty
-
-    nameEntries name ver target =
-      [ (SourceRef name Nothing, set),
-        (SourceRef name (Just ver), set) ]
-      where set = Set.singleton target
-
-    -- local definitions are in scope unqualified and qualified
-    unqualLocalScope :: NameEnv RefResolved
-    unqualLocalScope = HashMap.fromListWith Set.union unqualLocalEntities
-
-    qualLocalScope :: NameEnv RefResolved
-    qualLocalScope = qualifyNameEnv unqualLocalScope
-
-    unqualLocalEntities =
-      -- P and P.1 for each local predicate
-      [ entry
-      | (name, r, _) <- localPreds
-      , entry <- nameEntries name (predicateRef_version r) (RefPred r)
-      ] ++
-      -- T and T.1 for each local type
-      [ entry
-      | (name, r, _) <- localTypes
-      , entry <- nameEntries name (typeRef_version r) (RefType r)
-      ]
-
-    scope =
-      HashMap.union unqualLocalScope $
-      HashMap.union unqualInheritedScope $
-      HashMap.unionWith Set.union qualLocalScope $
-      HashMap.unionWith Set.union qualInheritedScope
-      importedScope
-
-  -- Check for inheriting multiple versions of a predicate/types
-  --
-  -- As a special case, if the schema is called "all" then allow name
-  -- clashes in the inheritance set. This is to facilitate our "all.N"
-  -- convention for declaring the "top-level" schema which will
-  -- inevitably have name clashes, but we don't care about what it
-  -- exports.
-  unless (namespace == "all") $
-    forM_ (HashMap.toList unqualInheritedScope) $ \(ref, targets) -> do
-      case Set.elems targets of
-        (_:_:_) -> throwError $
-          "inherited schemas give multiple definitions for: " <> showRef ref
-        _ -> return ()
-
-  -- resolve type definitions
-  types <- forM localTypes $
-    \(name, ref, TypeDef{..}) -> do
-      checkName name
-      type' <- runResolve angleVersion scope (resolveType typeDefType)
-      return (name, TypeDef
-        { typeDefRef = ref
-        , typeDefType = type'
-        , typeDefSrcSpan = typeDefSrcSpan })
-
-  -- resolve predicate definitions
-  predicates <- forM localPreds $
-    \(name, ref, PredicateDef{..}) -> do
-      checkName name
-      runResolve angleVersion scope $ do
-        key <- resolveType predicateDefKeyType
-        value <- resolveType predicateDefValueType
-        return (name, PredicateDef
-          { predicateDefRef = ref
-          , predicateDefKeyType = key
-          , predicateDefValueType = value
-          , predicateDefDeriving = NoDeriving
-          , predicateDefSrcSpan = predicateDefSrcSpan })
-
-  let
-    -- scope of predicates that we can specify queries for. Namely
-    -- locally-defined predicates and inherited predicates.
-    predScope = resolveRef $
-      HashMap.union unqualLocalScope $
-      HashMap.union unqualInheritedScope $
-      HashMap.unionWith Set.union qualLocalScope
-      qualInheritedScope
-
-  -- resolve queries
-  localDeriving <-
-    forM [ (derivingDefRef,derive)
-      | SourceDeriving derive@DerivingDef{..} <- schemaDecls ] $
-    \(ref, DerivingDef{..}) -> do
-      ty <- lookupResultToExcept ref $ predScope ref
-      ref <- case ty of
-        RefPred ref -> return ref
-        _ -> throwError $ showRef ref <> " is not a predicate"
-      resolvedDerInfo <- runResolve angleVersion scope $
-        resolveDeriving derivingDefDeriveInfo
-      return (ref, DerivingDef ref resolvedDerInfo derivingDefSrcSpan)
-
-  let
-    localTypeNames = HashSet.fromList $
-      map (typeRef_name . typeDefRef . snd) types
-
-    localTypes = HashMap.fromList
-      [ (typeDefRef def, def) | (_, def) <- types ]
-
-    -- The types we re-export from this schema are all the types that
-    -- are inherited but not shadowed by a locally-defined type.
-    reExportedTypes =
-      HashMap.fromList
-        [ (typeDefRef def, def)
-        | schema <- inherits
-        , (ref, def) <- HashMap.toList $
-            resolvedSchemaTypes schema <>
-            resolvedSchemaReExportedTypes schema
-        , not (typeRef_name ref `HashSet.member` localTypeNames)
-        ]
-
-    localPredicateNames = HashSet.fromList $
-      [ predicateRef_name (predicateDefRef def) | (_, def) <- predicates ]
-
-    localPredicates = HashMap.fromList
-      [ (predicateDefRef def, def) | (_, def) <- predicates ]
-
-    -- Similarly for predicates.
-    reExportedPredicates =
-      HashMap.fromList
-        [ (predicateDefRef def, def)
-        | schema <- inherits
-        , (ref, def) <- HashMap.toList $
-            resolvedSchemaPredicates schema <>
-            resolvedSchemaReExportedPredicates schema
-        , not (predicateRef_name ref `HashSet.member` localPredicateNames)
-        ]
-
-    exportedUnqualScope = HashMap.union unqualLocalScope unqualInheritedScope
-      -- Note: local names override inherited names
-
-    -- Qualified exported names. The "all" schema is special: we don't
-    -- re-export things qualified with "all.", only with the original
-    -- schema name.
-    exportedQualScope
-      | namespace == "all" = qualInheritedScope
-      | otherwise =
-         HashMap.union
-           (qualifyNameEnv exportedUnqualScope)
-           qualInheritedScope -- NB. local overrides inherited
-
-  schemaEvolves <- traverse schemaByName evolves
-
-  return ResolvedSchema
-    { resolvedSchemaName = namespace
-    , resolvedSchemaVersion = version
-    , resolvedSchemaAngleVersion = angleVersion
-    , resolvedSchemaTypes = localTypes
-    , resolvedSchemaReExportedTypes = reExportedTypes
-    , resolvedSchemaPredicates = localPredicates
-    , resolvedSchemaReExportedPredicates = reExportedPredicates
-    , resolvedSchemaUnqualScope = exportedUnqualScope
-    , resolvedSchemaQualScope = exportedQualScope
-    , resolvedSchemaDeriving = HashMap.fromList localDeriving
-    , resolvedSchemaEvolves = Set.fromList (schemaRef <$> schemaEvolves)
-    }
-
-resolveType :: (ShowRef t, ShowRef p) =>
-  SourceType -> Resolve p t (Type_ SrcSpan p t)
-resolveType typ = go typ
-  where
-  go typ = case typ of
-    ByteTy -> return ByteTy
-    NatTy -> return NatTy
-    StringTy -> return StringTy
-    ArrayTy ty -> ArrayTy <$> go ty
-    RecordTy fields -> do checkFields fields; RecordTy <$> mapM goField fields
-    SumTy fields -> do checkFields fields; SumTy <$> mapM goField fields
-    SetTy ty -> SetTy <$> go ty
-    PredicateTy s ref -> goRef ref s
-    NamedTy s ref -> goRef ref s -- shouldn't happen, but handle it anyway
-    MaybeTy ty -> MaybeTy <$> go ty
-    EnumeratedTy names -> lift $ do
-      mapM_ checkName names
-      return (EnumeratedTy names)
-    BooleanTy -> return BooleanTy
-    _ -> error "resolveType"
-
-  goRef ref s = do
-    scope <- getScope
-    target <- lift $ lookupResultToExcept ref $
-      resolveRef scope ref
-    case target of
-      RefType ref -> return (NamedTy s ref)
-      RefPred ref -> return (PredicateTy s ref)
-
-  checkFields fields = do
-    sequence_
-      [ throwError $ "duplicate field: " <> x
-        | x:_:_ <- group $ sort $ map fieldDefName fields ]
-    lift $ do
-      mapM_ (checkName . fieldDefName) fields
-      mapM_ (checkFieldName . fieldDefName) fields
-
-  goField (FieldDef name ty) = FieldDef name <$> go ty
-
-
-lookupResultToExcept
-  :: (ShowRef t, ShowRef p)
-  => SourceRef
-  -> LookupResult (RefTarget p t)
-  -> Except Text (RefTarget p t)
-lookupResultToExcept ref res =
-  either throwError return (lookupResultToEither ref res)
-
-checkAngleVersion :: AngleVersion -> Except Text ()
-checkAngleVersion v =
-  unless (v >= latestSupportedAngleVersion) $
-    let ver = Text.pack $ show $ pretty v in
-    throwError $ "Angle version " <> ver <> " is not supported"
-
-checkFieldName :: Name -> Except Text ()
-checkFieldName n =
-  when (isUpper (Text.head n)) $
-    throwError $ "field names must begin with a lowercase letter: " <> n
-
-checkName :: Name -> Except Text ()
-checkName n = do
-  when (n `HashSet.member` reservedWords) $
-    throwError $ n <> " is a reserved word, it cannot be used"
-
-checkNameSpace :: Name -> Except Text ()
-checkNameSpace n = mapM_ checkName (splitDot n)
-
-reservedWords :: HashSet Text
-reservedWords = HashSet.fromList [
-    -- Thrift reserved words, seems like a good idea to avoid these
-    "binary", "bool", "byte", "const", "cpp_include",
-    "double", "enum", "exception", "extends", "false", "float",
-    "hash_map", "hash_set", "hs_include", "i16", "i32", "i64", "include",
-    "list", "map", "namespace", "oneway", "optional", "required", "senum",
-    "service", "set", "stream", "string", "struct", "throws", "true",
-    "typedef", "union", "view", "void",
-
-    -- keywords that the fbthrift compiler rejects (see
-    -- thrift/compiler/parse/thrift.ll)
-    "abstract",
-    "and",
-    "args",
-    "as",
-    "assert",
-    "auto",
-    "break",
-    "case",
-    "char",
-    "class",
-    "continue",
-    "declare",
-    "def",
-    "default",
-    "del",
-    "do",
-    "elif",
-    "else",
-    "elseif",
-    "except",
-    "exec",
-    "extern",
-    "finally",
-    "for",
-    "foreach",
-    "function",
-    "global",
-    "goto",
-    "if",
-    "implements",
-    "import",
-    "in",
-    "int",
-    "inline",
-    "instanceof",
-    "interface",
-    "is",
-    "lambda",
-    "long",
-    "native",
-    "new",
-    "not",
-    "or",
-    "pass",
-    "public",
-    "print",
-    "private",
-    "protected",
-    "raise",
-    "register",
-    "return",
-    "short",
-    "signed",
-    "sizeof",
-    "static",
-    "switch",
-    "synchronized",
-    "template",
-    "this",
-    "throw",
-    "transient",
-    "try",
-    "unsigned",
-    "var",
-    "virtual",
-    "volatile",
-    "while",
-    "with",
-    "yield",
-    "Object",
-    "Client",
-    "IFace",
-    "Processor",
-
-    -- Other words to avoid, because they lead to Thrift-generated code that
-    -- does not compile for one or more languages.
-    "None", "operator", {- TODO: "Enum" -}
-
-    -- Reserved for temporary predicates
-    "_tmp_"
-  ]
-
-
--- -----------------------------------------------------------------------------
--- Resolving queries
-
-runResolve
-  :: AngleVersion
-  -> NameEnv (RefTarget p t)
-  -> Resolve p t a
-  -> Except Text a
-runResolve ver scope act = runReaderT act (ver,scope)
-
-type Resolve p t a =
-  ReaderT (AngleVersion, NameEnv (RefTarget p t)) (Except Text) a
-
-getScope :: Resolve p t (NameEnv (RefTarget p t))
-getScope = asks snd
-
-resolveDeriving
-  :: (ShowRef t, ShowRef p)
-  => SourceDerivingInfo' SrcSpan
-  -> Resolve p t (DerivingInfo (Query_ p t))
-resolveDeriving NoDeriving = return NoDeriving
-resolveDeriving (Derive when query) = Derive when <$> resolveQuery query
-
-resolveQuery
-  :: (ShowRef t, ShowRef p)
-  => SourceQuery
-  -> Resolve p t (Query_ p t)
-resolveQuery (SourceQuery head stmts ord) =
-  SourceQuery
-    <$> mapM resolvePat head
-    <*> mapM resolveStatement stmts
-    <*> pure ord
-
-resolvePat
-  :: (ShowRef t, ShowRef p)
-  => SourcePat
-  -> Resolve p t (SourcePat_ SrcSpan SrcSpan p t)
-resolvePat pat = case pat of
-  Nat s i -> return (Nat s i)
-  String s t -> return (String s t)
-  StringPrefix s t -> return (StringPrefix s t)
-  ByteArray s b -> return (ByteArray s b)
-  Array s pats -> Array s <$> mapM resolvePat pats
-  ArrayPrefix s pats -> ArrayPrefix s <$> mapM resolvePat pats
-  Tuple s pats -> Tuple s <$> mapM resolvePat pats
-  All s qs -> All s <$> resolvePat qs
-  Elements s pat -> Elements s <$> resolvePat pat
-  Wildcard s -> return (Wildcard s)
-  TypeSignature s pat ty ->
-    TypeSignature s
-      <$> resolvePat pat
-      <*> resolveType ty
-  Variable s n -> return (Variable s n)
-  FactId s Nothing id -> return (FactId s Nothing id)
-  FactId s (Just pred) id -> do
-    res <- resolveTypeOrPred s pred
-    case res of
-      RefPred ref ->
-        return (TypeSignature s (FactId s Nothing id) (PredicateTy s ref))
-      _other -> prettyErrorIn pat $ "not a predicate: " <> pretty pred
-  OrPattern s l r -> OrPattern s <$> resolvePat l <*> resolvePat r
-  Negation s pat -> Negation s <$> resolvePat pat
-  Never s -> return (Never s)
-  IfPattern s cond then_ else_ ->
-    IfPattern s
-      <$> resolvePat cond
-      <*> resolvePat then_
-      <*> resolvePat else_
-  ElementsOfArray s pat -> ElementsOfArray s <$> resolvePat pat
-  KeyValue s k v -> KeyValue s <$> resolvePat k <*> resolvePat v
-  NestedQuery s q -> NestedQuery s <$> resolveQuery q
-  Struct s fields -> Struct s <$> mapM resolveField fields
-    where resolveField (Field n pat) = Field n <$> resolvePat pat
-  App s (Variable svar txt) args
-    | Just primOp <- HashMap.lookup txt primitives -> do
-      Prim s primOp <$> mapM resolvePat args
-    | otherwise ->
-    case args of
-      [arg] -> do
-        arg' <- resolvePat arg
-        let (range, txt') = if
-              | Just rem <- Text.stripSuffix "#new" txt -> (SeekOnStacked, rem)
-              | Just rem <- Text.stripSuffix "#old" txt -> (SeekOnBase, rem)
-              | otherwise -> (SeekOnAllFacts, txt)
-        res <- resolveTypeOrPred svar txt'
-        case res of
-          RefPred ref -> return (Clause s svar ref arg' range)
-          RefType ref
-            | SeekOnAllFacts <- range ->
-              return (TypeSignature s arg' (NamedTy svar ref))
-            | otherwise ->
-              prettyErrorIn pat "cannot use #new or #old with types"
-            -- The syntax "T pat" for "pat : T" is something we might
-            -- consider deprecating later. For now it's just desugared
-            -- here.
-      _ -> prettyErrorIn pat "unexpected extra argument(s)"
-  App s (StringPrefix a b) [pat] -> do
-    pat' <- resolvePat pat
-    return (App s (StringPrefix a b) [pat'])
-  App _ f _ ->
-    prettyErrorIn pat $ "invalid pattern: cannot apply " <>
-    describe f <> " to arguments"
-  FieldSelect s pat field q ->
-    (\p -> FieldSelect s p field q)
-      <$> resolvePat pat
-  Deref s pat -> Deref s <$> resolvePat pat
-  Enum s n -> return (Enum s n)
-  Clause{} -> internal
-  Prim{} -> internal
-  where
-  internal = throwError $ "internal: unexpected: " <>
-    Text.pack (show (pretty pat))
-
-resolveTypeOrPred
-  :: (ShowRef p, ShowRef t)
-  => SrcSpan
-  -> Name
-  -> Resolve p t (RefTarget p t)
-resolveTypeOrPred span txt = do
-  scope <- getScope
-  let ref = parseRef txt
-  case lookupResultToEither ref $ resolveRef scope ref of
-    Left s -> prettyErrorAt span (pretty s)
-    Right r -> return r
-
-prettyError :: Doc ann -> Resolve p t a
-prettyError = throwError . Text.pack . show
-
-prettyErrorIn :: IsSrcSpan s => SourcePat' s st -> Doc ann -> Resolve p t a
-prettyErrorIn pat doc = prettyErrorAt (sourcePatSpan pat) doc
-
-prettyErrorAt :: IsSrcSpan span => span -> Doc ann -> Resolve p t a
-prettyErrorAt span doc = prettyError $ vcat
-  [ pretty span
-  , doc
-  ]
-
-resolveStatement
-  :: (ShowRef t, ShowRef p)
-  => SourceStatement
-  -> Resolve p t (Statement_ p t)
-resolveStatement (SourceStatement l r) =
-  SourceStatement <$> resolvePat l <*> resolvePat r
-
-primitives :: HashMap Text PrimOp
-primitives = HashMap.fromList
-  [ ("prim.toLower", PrimOpToLower)
-  , ("prim.length", PrimOpLength)
-  , ("prim.relToAbsByteSpans", PrimOpRelToAbsByteSpans)
-  , ("prim.unpackByteSpans", PrimOpUnpackByteSpans)
-  , ("prim.zip", PrimOpZip)
-  , ("prim.concat", PrimOpConcat)
-  , ("prim.reverse", PrimOpReverse)
-  , ("prim.size", PrimOpSize)
-  , ("prim.gtNat", PrimOpGtNat)
-  , ("prim.geNat", PrimOpGeNat)
-  , ("prim.ltNat", PrimOpLtNat)
-  , ("prim.leNat", PrimOpLeNat)
-  , ("prim.neNat", PrimOpNeNat)
-  , ("prim.addNat", PrimOpAddNat)
-  , ("prim.neExpr", PrimOpNeExpr)
-  ]
diff --git a/glean/hs/Glean/Schema/Types.hs b/glean/hs/Glean/Schema/Types.hs
deleted file mode 100644
--- a/glean/hs/Glean/Schema/Types.hs
+++ /dev/null
@@ -1,191 +0,0 @@
-{-
-  Copyright (c) Meta Platforms, Inc. and affiliates.
-  All rights reserved.
-
-  This source code is licensed under the BSD-style license found in the
-  LICENSE file in the root directory of this source tree.
--}
-
-
-{-# LANGUAGE DeriveFunctor #-}
-module Glean.Schema.Types (
-  -- * Schema references
-  SchemaRef(..), showSchemaRef,
-
-  -- * Name targets
-  RefTarget(..), RefResolved,
-
-  -- * Resolved abstract syntax
-  ResolvedPat,
-  ResolvedType,
-  ResolvedFieldDef,
-  ResolvedTypeDef,
-  ResolvedPredicateDef,
-  ResolvedDerivingDef,
-  ResolvedQuery,
-  ResolvedStatement,
-  ResolvedDeriving,
-
-  ResolvedPat',
-  ResolvedStatement',
-  ResolvedQuery',
-  ResolvedDeriving',
-  ResolvedTypeDef',
-  ResolvedType',
-  ResolvedFieldDef',
-
-  -- * Name environments and resolution
-  NameEnv,
-  mapNameEnv,
-  LookupResult(..),
-  resolveRef,
-  resolveRefFiltered,
-  lookupResultToEither,
-
-  -- * Resolved schemas
-  ResolvedSchemas(..),
-  ResolvedSchema(..),
-  ResolvedSchemaRef,
-  schemaRef,
-) where
-
-import Data.Bifunctor
-import Data.Binary
-import Data.Hashable
-import Data.HashMap.Strict (HashMap)
-import qualified Data.HashMap.Strict as HashMap
-import Data.Set (Set)
-import qualified Data.Set as Set
-import Data.Text (Text)
-import qualified Data.Text as Text
-import GHC.Generics
-
-import Glean.Angle.Types
-import Glean.Schema.Util
-
--- | Identify a schema
-data SchemaRef = SchemaRef Name Version
-  deriving (Eq, Ord, Show, Generic)
-
-showSchemaRef :: SchemaRef -> Text
-showSchemaRef (SchemaRef name version) =
-  name <> "." <> Text.pack (show version)
-
-instance Hashable SchemaRef
-
--- | The target of a reference
-data RefTarget p t = RefPred p | RefType t
-  deriving (Eq, Ord, Show, Generic, Functor)
-
-instance (Binary p, Binary t) => Binary (RefTarget p t)
-
-instance Bifunctor RefTarget where
-  bimap f _ (RefPred p) = RefPred (f p)
-  bimap _ g (RefType t) = RefType (g t)
-
-type RefResolved = RefTarget PredicateRef TypeRef
-
-showRefTarget :: (ShowRef t, ShowRef p) => RefTarget p t -> Text
-showRefTarget (RefType t) = showRef t
-showRefTarget (RefPred p) = showRef p
-
--- | An environment that describes which names are in scope.
-type NameEnv t = HashMap SourceRef (Set t)
-
-mapNameEnv :: Ord b => (a -> Maybe b) -> NameEnv a -> NameEnv b
-mapNameEnv f = fmap g
-  where
-  g set = Set.fromList [ b | a <- Set.toList set, Just b <- [f a] ]
-
-data LookupResult t
-  = OutOfScope
-  | Ambiguous [t]
-  | ResolvesTo t
-
-lookupResultToEither
-  :: (ShowRef t, ShowRef p)
-  => SourceRef
-  -> LookupResult (RefTarget p t)
-  -> Either Text (RefTarget p t)
-lookupResultToEither ref OutOfScope =
-  Left $ "not in scope: " <> showRef ref
-lookupResultToEither ref (Ambiguous targets) =
-  Left $ showRef ref <> " is ambiguous. It could refer to: " <>
-      Text.intercalate ", " (map showRefTarget targets)
-lookupResultToEither _ (ResolvesTo target) = Right target
-
--- | Resolve a name (@SourceRef@) with respect to a scope (@NameEnv@)
-resolveRef :: NameEnv t -> SourceRef -> LookupResult t
-resolveRef scope ref = resolveRefFiltered scope (const True) ref
-
-resolveRefFiltered :: NameEnv t -> (t -> Bool) -> SourceRef -> LookupResult t
-resolveRefFiltered scope p ref =
-  case HashMap.lookup ref scope of
-    Nothing -> OutOfScope
-    Just set -> case filter p $ Set.toList set of
-      [] -> OutOfScope
-      [one] -> ResolvesTo one
-      many -> Ambiguous many
-
--- Resolved abstract syntax
-
-type ResolvedType = Type_ SrcSpan PredicateRef TypeRef
-type ResolvedFieldDef = FieldDef_ SrcSpan PredicateRef TypeRef
-type ResolvedTypeDef = TypeDef_ SrcSpan PredicateRef TypeRef
-type ResolvedPredicateDef = PredicateDef_ SrcSpan SrcSpan PredicateRef TypeRef
-type ResolvedDerivingDef = DerivingDef_ SrcSpan SrcSpan PredicateRef TypeRef
-type ResolvedPat = SourcePat_ SrcSpan SrcSpan PredicateRef TypeRef
-type ResolvedStatement = SourceStatement_ SrcSpan SrcSpan PredicateRef TypeRef
-type ResolvedQuery = SourceQuery_ SrcSpan SrcSpan PredicateRef TypeRef
-type ResolvedDeriving = DerivingInfo ResolvedQuery
-
--- Versions of the above types abstracted over the source spans
-type ResolvedPat' s = SourcePat_ s s PredicateRef TypeRef
-type ResolvedStatement' s = SourceStatement_ s s PredicateRef TypeRef
-type ResolvedQuery' s = SourceQuery_ s s PredicateRef TypeRef
-type ResolvedDeriving' s = DerivingInfo (ResolvedQuery' s)
-type ResolvedTypeDef' s = TypeDef_ s PredicateRef TypeRef
-type ResolvedType' s = Type_ s PredicateRef TypeRef
-type ResolvedFieldDef' s = FieldDef_ s PredicateRef TypeRef
--- | A 'ResolvedSchema' is used during schema resolution to resolve
--- schemas that import or inherit from this schema.
-data ResolvedSchema p t = ResolvedSchema
-  { resolvedSchemaName :: Name
-  , resolvedSchemaVersion :: Version
-  , resolvedSchemaAngleVersion :: AngleVersion
-  , resolvedSchemaTypes :: HashMap TypeRef (TypeDef_ SrcSpan p t )
-    -- ^ types that are defined by this schema
-  , resolvedSchemaReExportedTypes :: HashMap TypeRef (TypeDef_ SrcSpan p t )
-    -- ^ types that are inherited and re-exported by this schema
-  , resolvedSchemaPredicates ::
-      HashMap PredicateRef (PredicateDef_ SrcSpan SrcSpan p t)
-    -- ^ predicates that are defined by this schema
-  , resolvedSchemaReExportedPredicates ::
-      HashMap PredicateRef (PredicateDef_ SrcSpan SrcSpan p t)
-    -- ^ predicates that are inherited and re-exported by this schema
-  , resolvedSchemaUnqualScope :: NameEnv (RefTarget p t)
-    -- ^ The scope exposed by this schema, unqualified. This will be
-    -- used when the schema is inherited.
-  , resolvedSchemaQualScope :: NameEnv (RefTarget p t)
-    -- ^ The scope exposed by this schema, qualified. This will be
-    -- used when the schema is inherited or imported.
-  , resolvedSchemaDeriving ::
-      HashMap PredicateRef (DerivingDef_ SrcSpan SrcSpan p t)
-    -- ^ deriving declarations, for predicates defined in this schema
-    -- or an inherited schema.
-  , resolvedSchemaEvolves :: Set SchemaRef
-    -- ^ schemas evolves by this schema.
-  }
-
-type ResolvedSchemaRef = ResolvedSchema PredicateRef TypeRef
-
-schemaRef :: ResolvedSchema p t -> SchemaRef
-schemaRef ResolvedSchema{..} =
-  SchemaRef resolvedSchemaName resolvedSchemaVersion
-
--- | A set of schemas after name resolution
-data ResolvedSchemas = ResolvedSchemas
-  { schemasHighestVersion :: Maybe Version
-  , schemasResolved :: [ResolvedSchemaRef]
-    -- ^ Resolved schemas in dependency order
-  }
diff --git a/glean/hs/Glean/Schema/Util.hs b/glean/hs/Glean/Schema/Util.hs
deleted file mode 100644
--- a/glean/hs/Glean/Schema/Util.hs
+++ /dev/null
@@ -1,115 +0,0 @@
-{-
-  Copyright (c) Meta Platforms, Inc. and affiliates.
-  All rights reserved.
-
-  This source code is licensed under the BSD-style license found in the
-  LICENSE file in the root directory of this source tree.
--}
-
--- | Utilities for working with Glean.Angle.Types
-module Glean.Schema.Util
-  ( unit
-  , lowerBool
-  , lowerMaybe
-  , lowerEnum
-  , boolFields
-  , maybeFields
-  , enumFields
-  , tupleSchema
-  , parseRef
-  , convertRef
-  , ShowRef(..)
-  , NameSpaces
-  , splitDot
-  , SourceRef(..)
-  ) where
-
-import Data.Text (Text)
-import qualified Data.Text as Text
-import TextShow
-
-import Util.Text
-
-import Glean.Angle.Types
-
-unit :: Type_ s a b
-unit = RecordTy []
-
--- | A maybe type is equivalent to a sum type with {nothing,just} fields.
-lowerMaybe :: Type_ s a b -> Type_ s a b
-lowerMaybe param = SumTy (maybeFields param)
-
-maybeFields :: Type_ s a b -> [FieldDef_ s a b]
-maybeFields param =
-  [ FieldDef "nothing" unit
-  , FieldDef "just" param ]
-
-lowerBool :: Type_ s a b
-lowerBool = SumTy boolFields
-
-boolFields :: [FieldDef_ s a b]
-boolFields = [FieldDef "false" unit, FieldDef "true" unit]
-
-lowerEnum :: [Name] -> Type_ s a b
-lowerEnum ides = SumTy (enumFields ides)
-
-enumFields :: [Name] -> [FieldDef_ s a b]
-enumFields ides = [FieldDef ide unit | ide <- ides]
-
-tupleSchema :: [Type_ s a b] -> Type_ s a b
-tupleSchema tys = RecordTy
-  [ FieldDef (tupleField <> Text.pack (show n)) ty
-  | (n,ty) <- zip [0::Int ..] tys ]
-
--- | Parse a predicate reference of the form @<predicate>[.<version>]@
--- If the version is omitted, it defaults to the most recent version
--- of that predicate.
---
--- This syntax is used in:
---  * The JSON format for writing facts
---  * Referring to predicates in the shell
---
-parseRef :: Text -> SourceRef
-parseRef txt
-  | Right ver <- textToInt after =
-    SourceRef (Text.init before) (Just (fromIntegral ver))
-  | otherwise =
-    SourceRef txt Nothing
-  where
-   (before,after) = Text.breakOnEnd "." txt
-
--- | Convert from a 'PredicateRef' (oftem from 'getName') to 'SourceRef'
--- (which is guaranteed to have a 'Version')
-convertRef :: PredicateRef -> SourceRef
-convertRef p = SourceRef
-  { sourceRefName = predicateRef_name p
-  , sourceRefVersion = Just (fromIntegral (predicateRef_version p)) }
-
-class ShowRef t where
-  showRef :: t -> Text
-
--- | Render the SourceRef to @name@ or @name.ver@
-instance ShowRef SourceRef where
-  showRef (SourceRef name Nothing) = name
-  showRef (SourceRef name (Just ver)) = name <> "." <> showt ver
-
-instance ShowRef TypeRef where
-  showRef (TypeRef name ver) = name <> "." <> showt ver
-
-instance ShowRef PredicateRef where
-  showRef = showRef . convertRef
-
-instance ShowRef PredicateId where
-  showRef (PredicateId name hash) = showRef name <> "." <> Text.pack (show hash)
-
-instance ShowRef TypeId where
-  showRef (TypeId name hash) = showRef name <> "." <> Text.pack (show hash)
-
-type NameSpaces = [Text]
-
-splitDot :: Name -> (NameSpaces, Text)
-splitDot x =
-  let pieces = Text.split ('.' ==) x
-  in case reverse pieces of
-      [] -> ([], "")
-      x : ys -> (reverse ys, x)
diff --git a/glean/hs/Glean/Typed.hs b/glean/hs/Glean/Typed.hs
deleted file mode 100644
--- a/glean/hs/Glean/Typed.hs
+++ /dev/null
@@ -1,28 +0,0 @@
-{-
-  Copyright (c) Meta Platforms, Inc. and affiliates.
-  All rights reserved.
-
-  This source code is licensed under the BSD-style license found in the
-  LICENSE file in the root directory of this source tree.
--}
-
--- |
--- Support for working with strongly-typed Glean data.
---
-module Glean.Typed
-  ( module Glean.Typed.Binary
-  , module Glean.Typed.Build
-  , module Glean.Typed.BuildFact
-  , module Glean.Typed.Fact
-  , module Glean.Typed.Id
-  , module Glean.Typed.Predicate
-  , module Glean.Typed.Prim
-  ) where
-
-import Glean.Typed.Binary
-import Glean.Typed.Build
-import Glean.Typed.BuildFact
-import Glean.Typed.Fact
-import Glean.Typed.Id
-import Glean.Typed.Predicate
-import Glean.Typed.Prim
diff --git a/glean/hs/Glean/Typed/Binary.hs b/glean/hs/Glean/Typed/Binary.hs
deleted file mode 100644
--- a/glean/hs/Glean/Typed/Binary.hs
+++ /dev/null
@@ -1,330 +0,0 @@
-{-
-  Copyright (c) Meta Platforms, Inc. and affiliates.
-  All rights reserved.
-
-  This source code is licensed under the BSD-style license found in the
-  LICENSE file in the root directory of this source tree.
--}
-
-{-# LANGUAGE AllowAmbiguousTypes, TypeApplications #-}
-
--- |
--- Support for converting between Haskell types and Glean's binary
--- format.
---
-module Glean.Typed.Binary
-  ( -- * 'Type' encoder / decoder
-    Type(..)
-    -- ** helper
-  , decodeRts
-    -- * Used in generated Haskell code
-  , mapD, buildRtsSelector, thriftEnum_buildRtsValue
-  ) where
-
-import Control.Monad
-import Control.Monad.IO.Class
-import Data.ByteString ( ByteString )
-import qualified Data.ByteString.Unsafe as BS
-import Data.Dynamic
-import Data.IORef
-import Data.IntMap (IntMap)
-import Data.Proxy (Proxy(..))
-import Data.Set
-import Data.Text ( Text )
-import Data.Word ( Word64 )
-import Foreign.Ptr
-
-import Thrift.Protocol (ThriftEnum, fromThriftEnum)
-import qualified Util.FFI as FFI
-
-import qualified Glean.Angle.Types as Angle
-import qualified Glean.Schema.Util as Angle
-import qualified Glean.FFI as FFI
-import qualified Glean.RTS as RTS
-import qualified Glean.RTS.Builder as RTS
-import Glean.RTS.Set
-import Glean.Typed.Build
-import Glean.Typed.Id
-import Glean.Types as Thrift
-
--- -----------------------------------------------------------------------------
-
--- | Types that can be converted to/from Glean's binary representation
-class Type a where
-  -- | Convert to a Glean value
-  buildRtsValue :: RTS.Builder -> a -> IO ()
-
-  -- | Convert from a Glean value
-  decodeRtsValue :: Decoder a
-
-  -- | If this type only has one possible value and hence doesn't have a
-  -- run-time representation (i.e., is effectively ()), yield that value
-  constantRtsValue :: Maybe a
-
-  constantRtsValue = Nothing
-
-  -- | Decode this type when it is the result of a query. Queries for
-  -- a predicate type return the facts of the predicate directly,
-  -- whereas queries for non-predicate types return facts of a
-  -- pseudo-predicate whose keys are the query results.  The
-  -- 'decodeAsFact' method abstracts the difference in representation
-  -- between predicate and non-predicate query results, so we can just
-  -- use 'decodeAsFact' to decode query results.
-  --
-  -- The default implementation works for all non-predicate types;
-  -- predicate types override it with 'decodeFact'.
-  decodeAsFact
-    :: (MonadIO m)
-    => IntMap Thrift.Fact               -- ^ serialized nested facts
-    -> IORef (IntMap Dynamic)           -- ^ cached deserialized facts
-    -> IdOf a                           -- ^ Id of fact to decode
-    -> Thrift.Fact                      -- ^ fact to decode
-    -> m a
-
-  decodeAsFact nested cache _fid (Thrift.Fact _ k _) =
-    decodeWithCache nested cache decodeRtsValue k
-
-  -- | Get the representation of the type
-  sourceType :: Proxy a -> Angle.SourceType' ()
-
--- -----------------------------------------------------------------------------
-
--- | Convenient combination, buiding on the 'decode' from
--- "Glean.RTS.Types.Build"
-decodeRts :: forall m a. (MonadIO m, Type a) => ByteString -> m a
-decodeRts = decode decodeRtsValue
-
--- | Nicer and shorter name, very handy to implement custom types by
--- using the tuple instances defined in this module.
-mapD :: Type a => (a -> b) -> Decoder b
-mapD f = f <$> decodeRtsValue
-
--- | Helper for SUM types
-buildRtsSelector :: RTS.Builder -> Int -> IO ()
-buildRtsSelector b = FFI.call . RTS.glean_push_value_selector b . fromIntegral
-
-thriftEnum_buildRtsValue :: forall a. ThriftEnum a => RTS.Builder -> a -> IO ()
-thriftEnum_buildRtsValue b x = buildRtsSelector b $ fromThriftEnum x
-
--- -----------------------------------------------------------------------------
--- Basic Type instances
-
-instance Type Word64 where
-  buildRtsValue b x = FFI.call $ RTS.glean_push_value_nat b x
-  decodeRtsValue = Decoder $ \DecoderEnv{..} ->
-    FFI.ffiBuf buf $ RTS.glean_pop_value_nat begin end
-  sourceType _ = Angle.NatTy
-
-instance Type ByteString where
-  buildRtsValue b xs = BS.unsafeUseAsCStringLen xs $ \(p,n) -> do
-    FFI.call $ RTS.glean_push_value_array b (fromIntegral n)
-    FFI.call $ RTS.glean_push_value_bytes b (castPtr p) (fromIntegral n)
-  decodeRtsValue = Decoder $ \DecoderEnv{..} -> do
-    size <- FFI.ffiBuf buf $ RTS.glean_pop_value_array begin end
-    ptr <- FFI.ffiBuf buf $ RTS.glean_pop_value_bytes begin end size
-    BS.unsafePackMallocCStringLen (castPtr ptr, fromIntegral size)
-  sourceType _ = Angle.ArrayTy Angle.ByteTy
-
-instance Type Text where
-  buildRtsValue b s = FFI.withUTF8Text s $ \p n ->
-    FFI.call $ RTS.glean_push_value_string b (castPtr p) n
-  decodeRtsValue = Decoder $ \DecoderEnv{..} -> do
-    (p,n) <- FFI.invoke $ RTS.glean_pop_value_string begin end
-    FFI.unsafeMallocedUTF8 (castPtr p) n
-  sourceType _ = Angle.StringTy
-
--- | The instance for () does not encode or decode bytes, it is vacuous
-instance Type () where
-  buildRtsValue _ () = return ()
-  decodeRtsValue = pure ()
-  constantRtsValue = Just ()
-  sourceType _ = Angle.unit
-
-
--- | Bool is alias for sum of two ()
-instance Type Bool where
-  buildRtsValue b False = buildRtsSelector b 0
-  buildRtsValue b True = buildRtsSelector b 1
-  decodeRtsValue = enumD fail
-    where fail = Decoder $ \_ -> decodeFail "bool selector out of range"
-  sourceType _ = Angle.BooleanTy
-
-
-instance Type Nat where
-  buildRtsValue b nat = FFI.call $
-    RTS.glean_push_value_nat b ((fromIntegral . unNat) nat)
-  decodeRtsValue = Decoder $ \DecoderEnv{..} ->
-    fmap (Nat . fromIntegral)
-         (FFI.ffiBuf buf (RTS.glean_pop_value_nat begin end))
-  sourceType _ = Angle.NatTy
-
-instance Type Byte where
-  buildRtsValue b byt = FFI.call $
-    RTS.glean_push_value_byte b ((fromIntegral . unByte) byt)
-  decodeRtsValue = Decoder $ \DecoderEnv{..} ->
-    fmap (Byte . fromIntegral)
-         (FFI.ffiBuf buf (RTS.glean_pop_value_byte begin end))
-  sourceType _ = Angle.ByteTy
-
--- -----------------------------------------------------------------------------
--- Containers
-
--- | Lists are preceded with their length
-instance Type a => Type [a] where
-  buildRtsValue b xs = liftIO $ do
-    FFI.call $ RTS.glean_push_value_array b $ fromIntegral $ length xs
-    mapM_ (buildRtsValue b) xs
-  decodeRtsValue = Decoder $ \env@DecoderEnv{..} -> do
-    size <- FFI.ffiBuf buf $ RTS.glean_pop_value_array begin end
-    replicateM (fromIntegral size) (runDecoder decodeRtsValue env)
-
-  sourceType _ = Angle.ArrayTy (sourceType (Proxy @a))
-
--- | 'Maybe' is alias pattern for sum of () | 'a' (in this order)
-instance Type a => Type (Maybe a) where
-  buildRtsValue b Nothing = buildRtsSelector b 0
-  buildRtsValue b (Just x) = do
-    buildRtsSelector b 1
-    buildRtsValue b x
-  decodeRtsValue = sumD
-    (Decoder $ \_ -> decodeFail "maybe selector out of range")
-    [pure Nothing, Just <$> decodeRtsValue]
-  sourceType _ = Angle.MaybeTy (sourceType (Proxy @a))
-
-instance {-# OVERLAPPING #-} Type (Set Byte) where
-  buildRtsValue b xs =
-    withWordRtsSet $ \set -> do
-      forM_ xs $ \x ->
-        insertWordRtsSet set (unByte x)
-      buildWordSetBytes set b
-  decodeRtsValue = Decoder $ \env@DecoderEnv{..} -> do
-    size <- FFI.ffiBuf buf $ RTS.glean_pop_value_set begin end
-    fromList <$> replicateM (fromIntegral size) (runDecoder decodeRtsValue env)
-  sourceType _ = Angle.SetTy Angle.ByteTy
-
-instance {-# OVERLAPPING #-} Type (Set Nat) where
-  buildRtsValue b xs =
-    withWordRtsSet $ \set -> do
-      forM_ xs $ \x -> do
-        insertWordRtsSet set (unNat x)
-      buildWordSet set b
-  decodeRtsValue = Decoder $ \env@DecoderEnv{..} -> do
-    size <- FFI.ffiBuf buf $ RTS.glean_pop_value_set begin end
-    fromList <$> replicateM (fromIntegral size) (runDecoder decodeRtsValue env)
-  sourceType _ = Angle.SetTy Angle.NatTy
-
-instance {-# OVERLAPPABLE #-} (Type a, Ord a) => Type (Set a) where
-  buildRtsValue b xs = liftIO $
-    withRtsSet $ \set -> do
-      RTS.withBuilder $ \tb ->
-        forM_ xs $ \x -> do
-          buildRtsValue tb x
-          insertBuilder set tb
-          RTS.resetBuilder tb
-      buildSet set b
-  decodeRtsValue = Decoder $ \env@DecoderEnv{..} -> do
-    size <- FFI.ffiBuf buf $ RTS.glean_pop_value_set begin end
-    fromList <$> replicateM (fromIntegral size) (runDecoder decodeRtsValue env)
-  sourceType _ = Angle.SetTy (sourceType (Proxy @a))
-
--- -----------------------------------------------------------------------------
-
--- | 'IdOf' as a Glean primitive
-instance (Type p) => Type (IdOf p) where
-  buildRtsValue b (IdOf fid) = FFI.call $ RTS.glean_push_value_fact b fid
-  decodeRtsValue = Decoder $ \DecoderEnv{..} ->
-    IdOf <$> FFI.ffiBuf buf (RTS.glean_pop_value_fact begin end)
-  sourceType _ = sourceType (Proxy @p)
-
--- -----------------------------------------------------------------------------
--- All the tuples, using the wonderful Applicative instance of Decoder
-
-instance (Type a, Type b) => Type (a,b) where
-  buildRtsValue builder (a,b) = do
-    buildRtsValue builder a
-    buildRtsValue builder b
-  decodeRtsValue = (,)
-    <$> decodeRtsValue
-    <*> decodeRtsValue
-  sourceType _ = Angle.tupleSchema
-      [ sourceType (Proxy @a)
-      , sourceType (Proxy @b)
-      ]
-
-instance (Type a, Type b, Type c) => Type (a,b,c) where
-  buildRtsValue builder (a,b,c) = do
-    buildRtsValue builder a
-    buildRtsValue builder b
-    buildRtsValue builder c
-  decodeRtsValue = (,,)
-    <$> decodeRtsValue
-    <*> decodeRtsValue
-    <*> decodeRtsValue
-  sourceType _ = Angle.tupleSchema
-      [ sourceType (Proxy @a)
-      , sourceType (Proxy @b)
-      , sourceType (Proxy @c)
-      ]
-
-instance (Type a, Type b, Type c, Type d) => Type (a,b,c,d) where
-  buildRtsValue builder (a,b,c,d) = do
-    buildRtsValue builder a
-    buildRtsValue builder b
-    buildRtsValue builder c
-    buildRtsValue builder d
-  decodeRtsValue = (,,,)
-    <$> decodeRtsValue
-    <*> decodeRtsValue
-    <*> decodeRtsValue
-    <*> decodeRtsValue
-  sourceType _ = Angle.tupleSchema
-      [ sourceType (Proxy @a)
-      , sourceType (Proxy @b)
-      , sourceType (Proxy @c)
-      , sourceType (Proxy @d)
-      ]
-
-instance (Type a, Type b, Type c, Type d, Type e) => Type (a,b,c,d,e) where
-  buildRtsValue builder (a,b,c,d,e) = do
-    buildRtsValue builder a
-    buildRtsValue builder b
-    buildRtsValue builder c
-    buildRtsValue builder d
-    buildRtsValue builder e
-  decodeRtsValue = (,,,,)
-    <$> decodeRtsValue
-    <*> decodeRtsValue
-    <*> decodeRtsValue
-    <*> decodeRtsValue
-    <*> decodeRtsValue
-  sourceType _ = Angle.tupleSchema
-      [ sourceType (Proxy @a)
-      , sourceType (Proxy @b)
-      , sourceType (Proxy @c)
-      , sourceType (Proxy @d)
-      , sourceType (Proxy @e)
-      ]
-
-instance (Type a, Type b, Type c, Type d, Type e, Type f) => Type (a,b,c,d,e,f) where
-  buildRtsValue builder (a,b,c,d,e,f) = do
-    buildRtsValue builder a
-    buildRtsValue builder b
-    buildRtsValue builder c
-    buildRtsValue builder d
-    buildRtsValue builder e
-    buildRtsValue builder f
-  decodeRtsValue = (,,,,,)
-    <$> decodeRtsValue
-    <*> decodeRtsValue
-    <*> decodeRtsValue
-    <*> decodeRtsValue
-    <*> decodeRtsValue
-    <*> decodeRtsValue
-  sourceType _ = Angle.tupleSchema
-      [ sourceType (Proxy @a)
-      , sourceType (Proxy @b)
-      , sourceType (Proxy @c)
-      , sourceType (Proxy @d)
-      , sourceType (Proxy @e)
-      , sourceType (Proxy @f)
-      ]
diff --git a/glean/hs/Glean/Typed/Build.hs b/glean/hs/Glean/Typed/Build.hs
deleted file mode 100644
--- a/glean/hs/Glean/Typed/Build.hs
+++ /dev/null
@@ -1,139 +0,0 @@
-{-
-  Copyright (c) Meta Platforms, Inc. and affiliates.
-  All rights reserved.
-
-  This source code is licensed under the BSD-style license found in the
-  LICENSE file in the root directory of this source tree.
--}
-
-{-# LANGUAGE OverloadedStrings #-}
--- | This splits out the RTSType encoding and decoding from Typed.hs
-module Glean.Typed.Build
-  ( Decoder(..)
-  , DecoderEnv(..)
-  , DecodingException(..), decodeFail
-  , decode
-  , decodeWithCache
-  , sumD, enumD, thriftEnumD
-  ) where
-
-import Control.Exception ( Exception, throwIO )
-import Control.Monad
-import Control.Monad.IO.Class ( MonadIO, liftIO )
-import Data.ByteString (ByteString)
-import qualified Data.ByteString.Unsafe as BS
-import Data.Dynamic
-import Data.IntMap (IntMap)
-import qualified Data.IntMap as IntMap
-import Data.IORef
-import Data.Text (Text)
-import qualified Data.Text as Text
-import qualified Foreign.Marshal.Utils as Marshal ( with )
-import Foreign
-import Thrift.Protocol (ThriftEnum, toThriftEnum)
-
-import qualified Glean.FFI as FFI
-import qualified Glean.RTS as RTS
-import qualified Glean.Types as Thrift
-
--- -----------------------------------------------------------------------------
-
-data DecoderEnv = DecoderEnv
-  { begin :: {-# UNPACK #-} !(Ptr (Ptr ()))
-  , end :: {-# UNPACK #-} !(Ptr ())
-  , buf :: {-# UNPACK #-} !FFI.FFIResultBuf
-  , serialized :: IntMap Thrift.Fact
-  , cacheRef :: {-# UNPACK #-}!(IORef (IntMap Dynamic))
-  }
-
--- | runDecoder takes 'begin' and 'end' and advances the 'begin' position.
--- Can usually throw 'GleanFFIError' or 'DecodingException'
-newtype Decoder a = Decoder
- { runDecoder :: DecoderEnv -> IO a
- }
-
-instance Functor Decoder where
-  fmap f (Decoder g) = Decoder $ \env -> fmap f (g env)
-
-instance Applicative Decoder where
-  pure x = Decoder $ \_ -> pure x
-  {-# INLINE (<*>) #-}
-  (<*>) = ap
-
-instance Monad Decoder where
-  return = pure
-  {-# INLINE (>>=) #-}
-  Decoder m >>= k = Decoder $ \env -> do
-    a <- m env
-    runDecoder (k a) env
-
--- -----------------------------------------------------------------------------
-
-newtype DecodingException = DecodingException { decodingException :: Text }
-
-instance Show DecodingException where show = Text.unpack . decodingException
-
-instance Exception DecodingException
-
--- | Throw 'DecodingException'
-decodeFail :: Text -> IO a
-decodeFail = throwIO . DecodingException
-
--- -----------------------------------------------------------------------------
-
--- | Can throw 'DecodingException'-. The 'Decoder' must consume the entire
--- 'ByteString' leaving no extra bytes.
-decode :: forall m a. (MonadIO m) => Decoder a -> ByteString -> m a
-decode decoder v = do
-  cache <- liftIO $ newIORef IntMap.empty
-  decodeWithCache IntMap.empty cache decoder v
-
-decodeWithCache
-  :: forall m a. (MonadIO m)
-  => IntMap Thrift.Fact
-  -> IORef (IntMap Dynamic)
-  -> Decoder a
-  -> ByteString
-  -> m a
-decodeWithCache serialized cache decoder v =
-  liftIO $ BS.unsafeUseAsCStringLen v $ \(p,n) -> do
-    let begin = castPtr p :: Ptr ()
-        end   = castPtr (p `plusPtr` n) :: Ptr ()
-    Marshal.with begin $ \ (pbegin :: Ptr (Ptr ())) -> do
-      FFI.withFFIResultBuf $ \buf -> do
-        x <- runDecoder decoder (DecoderEnv pbegin end buf serialized cache)
-        pos <- peek pbegin
-        when (pos /= end) $ do
-          let extra = Text.pack (show (end `minusPtr` pos))
-          decodeFail ("extra " <> extra <> " bytes at end of value")
-        return x
-
-
--- | A generic decoder for sum types. Can throw 'GleanFFIError'
-sumD :: Decoder b -> [Decoder b] -> Decoder b
-sumD empty alts = Decoder $ \env@DecoderEnv{..} -> do
-  sel <- FFI.ffiBuf buf $ RTS.glean_pop_value_selector begin end
-  let Decoder f = index sel alts
-  f env
-  where
-    index 0 (x:_) = x
-    index i (_:xs) = index (i-1) xs
-    index _ [] = empty
-
--- | A generic decoder, used for Bool. Can throw 'GleanFFIError'
-enumD :: forall a. (Enum a, Bounded a) => Decoder a -> Decoder a
-enumD unknown = Decoder $ \env@DecoderEnv{..} -> do
-  sel <- FFI.ffiBuf buf $ RTS.glean_pop_value_selector begin end
-  let Decoder f = if sel <= ord maxBound - ord minBound
-        then return $ toEnum $ fromIntegral $ sel + ord minBound
-        else unknown
-  f env
-  where
-    ord x = fromIntegral $ fromEnum (x :: a)
-
--- | A generic decoder for thrift enum types.
-thriftEnumD :: ThriftEnum a => Decoder a
-thriftEnumD = Decoder $ \DecoderEnv{..} ->
-  fmap (toThriftEnum . fromIntegral)
-    $ FFI.ffiBuf buf
-    $ RTS.glean_pop_value_selector begin end
diff --git a/glean/hs/Glean/Typed/BuildFact.hs b/glean/hs/Glean/Typed/BuildFact.hs
deleted file mode 100644
--- a/glean/hs/Glean/Typed/BuildFact.hs
+++ /dev/null
@@ -1,213 +0,0 @@
-{-
-  Copyright (c) Meta Platforms, Inc. and affiliates.
-  All rights reserved.
-
-  This source code is licensed under the BSD-style license found in the
-  LICENSE file in the root directory of this source tree.
--}
-
-{-# LANGUAGE AllowAmbiguousTypes, TypeApplications, CPP, InstanceSigs #-}
-module Glean.Typed.BuildFact
-  ( NewFact(newFact,withUnit, derivedFrom)
-  , makeFact
-  , makeFact_
-  , makeFactV
-  , makeFactV_
-  , Facts
-  , newFacts
-  , serializeFacts
-  , factsMemory
-  , FactBuilder
-  , buildFacts
-  , extendFacts
-  , buildBatch
-  ) where
-
-import Data.Coerce
-import Data.HashMap.Strict (HashMap)
-import qualified Data.HashMap.Strict as HashMap
-import Data.Int
-import Data.IORef
-import Data.Maybe
-import qualified Data.Vector.Storable as Vector
-import Control.Monad
-import Control.Monad.IO.Class
-#if !MIN_VERSION_base(4,13,0)
-import Control.Monad.Fail (MonadFail)
-#endif
-import Control.Monad.Trans.Class
-import Control.Monad.Trans.Reader
-
-import Glean.RTS.Builder (sizeOfBuilder, withBuilder)
-import Glean.RTS.Foreign.Define (defineFact)
-import Glean.RTS.Foreign.FactSet (FactSet)
-import qualified Glean.RTS.Foreign.FactSet as FactSet
-import Glean.RTS.Foreign.Lookup
-import Glean.RTS.Types (lowestFid)
-import Glean.Typed.Binary
-import Glean.Typed.Id
-import Glean.Typed.Predicate
-import qualified Glean.Types as Thrift
-
--- -----------------------------------------------------------------------------
-
--- | Class of monads which support creation of new typed facts
---
--- Include 'MonadFail' constraint to avoid needing 'error'
-class (MonadFail m, Monad m) => NewFact m where
-  -- | Create a new fact with a the given key and value
-  newFact :: Predicate p => KeyType p -> ValueType p -> m (IdOf p)
-
-  -- | Create some facts owned by the given UnitName
-  withUnit ::Thrift.UnitName -> m a -> m a
-
-  -- | Set dependencies of an externally derived fact
-  derivedFrom :: Predicate p => [Fid] -> [p] -> m ()
-
--- | Create a new fact in a 'NewFact' monad and return the corresponding Thrift
--- structure which will have 'Just' the passed key and value.
-makeFactV
-  :: forall p m. (Predicate p, NewFact m)
-  => KeyType p -> ValueType p -> m p
-makeFactV key value =
-  (\i -> mkFact i (Just key) (Just value)) <$> newFact key value
-
--- | Create a new fact in a 'NewFact' monad.
-makeFactV_
-  :: forall p m. (Predicate p, NewFact m)
-  => KeyType p -> ValueType p -> m ()
-makeFactV_ key value = void $ newFact @m @p key value
-
--- | Create a new key-only fact in a 'NewFact' monad and return the
--- corresponding Thrift structure which will have 'Just' the passed key.
-makeFact
-  :: forall p m. (Predicate p, ValueType p ~ (), NewFact m)
-  => KeyType p -> m p
-makeFact key = makeFactV key ()
-
--- | Create a new key-only fact in a 'NewFact' monad.
-makeFact_
-  :: forall p m. (Predicate p, ValueType p ~ (), NewFact m)
-  => KeyType p -> m ()
-makeFact_ key = makeFactV_ @p key ()
-
--- | A collection of facts which can be written to and then serialized.
-data Facts = Facts
-  { factsPredicates :: Predicates
-  , factsData :: FactSet
-  , factsOwnership :: IORef (HashMap Thrift.UnitName [Int64])
-  , factsDerivations :: IORef (HashMap Pid [([Fid],[Fid])])
-  }
-
--- | Create a new empty collection of facts. New facts will be assigned
--- ids >= start id if a start id is supplied; otherwise, they will be
--- assigned ids which are guaranteed not to clash with any pids in the
--- 'Predicates' map.
-newFacts
-  :: Predicates -- ^ pid map
-  -> Maybe Fid -- ^ start id
-  -> IO Facts
-newFacts ps start =
-  Facts ps
-    <$> FactSet.new (fromMaybe lowestFid start)
-    <*> newIORef HashMap.empty
-    <*> newIORef HashMap.empty
-
--- | Serialize the facts into a batch which can be sent via Thrift.
-serializeFacts :: Facts -> IO Thrift.Batch
-serializeFacts Facts{..} = do
-  batch <- FactSet.serialize factsData
-  ownership <- readIORef factsOwnership
-  derivations <- readIORef factsDerivations
-  return batch
-    { Thrift.batch_owned = fmap Vector.fromList ownership
-    , Thrift.batch_dependencies = HashMap.fromList
-        [ (fromPid pid, map toFactDependencies deps)
-        | (pid, deps) <- HashMap.toList derivations ]
-    }
-  where
-    toFactDependencies :: ([Fid],[Fid]) -> Thrift.FactDependencies
-    toFactDependencies (deps, facts) =
-      Thrift.FactDependencies
-        (Vector.fromList (coerce facts))
-        (Vector.fromList (coerce deps))
-
--- | Return a rough estimate of how much memory is used by the facts.
-factsMemory :: Facts -> IO Int
-factsMemory = FactSet.factMemory . factsData
-
--- | A monad for creating fact batches.
---
--- We expose 'MonadFail' to avoid needing 'error'.
---
--- NOTE: This is very specifically not an instance of MonadIO or
--- MonadTrans as we want to restrict side effects just to fact creation.
-newtype FactsM a = FactsM { runFactsM :: ReaderT Facts IO a }
-  deriving(Functor,Applicative,Monad,MonadFail)
-
-instance NewFact FactsM where
-  newFact key value = FactsM $ do
-    facts <- ask
-    lift $ withBuilder $ \builder -> do
-      buildRtsValue builder key
-      key_size <- sizeOfBuilder builder
-      buildRtsValue builder value
-      mk facts $ \pid -> IdOf <$> defineFact
-        (factsData facts)
-        (pidOf pid)
-        builder
-        key_size
-      where
-        mk :: Predicate p => Facts -> (PidOf p -> f (IdOf p)) -> f (IdOf p)
-        mk facts f = f $ getPid $ factsPredicates facts
-
-  withUnit unit build = FactsM $ do
-    Facts{..} <- ask
-    firstId <- liftIO $ firstFreeId factsData
-    a <- runFactsM build
-    lastId <- liftIO $ firstFreeId factsData
-    when (lastId > firstId) $ liftIO $
-      modifyIORef' factsOwnership $
-        HashMap.insertWith (++) unit
-          [fromFid firstId, fromFid lastId - 1]
-    return a
-
-  derivedFrom :: forall p. Predicate p => [Fid] -> [p] -> FactsM ()
-  derivedFrom deps facts = FactsM $ do
-    Facts{..} <- ask
-    let pid = pidOf (getPid factsPredicates :: PidOf p)
-    liftIO $ modifyIORef' factsDerivations $
-        HashMap.insertWith (<>) pid [(deps, map (idOf . getId) facts)]
-
--- | A fact builder
-type FactBuilder = forall m. NewFact m => m ()
-
--- | Run a fact builder to produce facts based on the supplied
--- 'Predicates' map. The facts will be assigned ids >= start id if a
--- start id is supplied; otherwise, they will be assigned ids which are
--- guaranteed not to clash with any pids in the 'Predicates' map.
-buildFacts
-  :: Predicates -- ^ pid map
-  -> Maybe Fid -- ^ start id
-  -> FactBuilder -- ^ builder
-  -> IO Facts
-buildFacts ps start builder = do
-  facts <- newFacts ps start
-  runReaderT (runFactsM builder) facts
-  return facts
-
-extendFacts :: Facts -> FactBuilder -> IO ()
-extendFacts facts builder = runReaderT (runFactsM builder) facts
-
--- | Run a fact builder and produce a batch of facts based on
--- the supplied 'Predicates' map. The facts will be assigned
--- ids >= start id if a start id is supplied; otherwise, they will be
--- assigned ids which are guaranteed not to clash with any pids in the
--- 'Predicates' map.
-buildBatch
-  :: Predicates -- ^ pid map
-  -> Maybe Fid -- ^ start id
-  -> FactBuilder -- ^ builder
-  -> IO Thrift.Batch
-buildBatch ps start builder =
-  serializeFacts =<< buildFacts ps start builder
diff --git a/glean/hs/Glean/Typed/Fact.hs b/glean/hs/Glean/Typed/Fact.hs
deleted file mode 100644
--- a/glean/hs/Glean/Typed/Fact.hs
+++ /dev/null
@@ -1,66 +0,0 @@
-{-
-  Copyright (c) Meta Platforms, Inc. and affiliates.
-  All rights reserved.
-
-  This source code is licensed under the BSD-style license found in the
-  LICENSE file in the root directory of this source tree.
--}
-
-module Glean.Typed.Fact
-  ( decodeFact
-  , decodeRef
-  ) where
-
-import Control.Exception
-import Control.Monad.IO.Class
-import Data.Dynamic
-import qualified Data.IntMap as IntMap
-import Data.IORef
-import Data.IntMap (IntMap)
-
-import Glean.Typed.Build
-import Glean.Typed.Binary
-import Glean.Typed.Id
-import Glean.Typed.Predicate
-import Glean.Types as Thrift
-
--- | Decode a serialized fact, possibly with nested facts
-decodeFact
-  :: (Predicate p, MonadIO m)
-  => IntMap Thrift.Fact               -- ^ serialized nested facts
-  -> IORef (IntMap Dynamic)           -- ^ cached deserialized facts
-  -> IdOf p                           -- ^ Id of fact to decode
-  -> Thrift.Fact                      -- ^ fact to decode
-  -> m p
-{-# INLINE decodeFact #-}
-decodeFact serialized cache fid (Thrift.Fact _pid k v) = mkFact fid
-  <$> (Just <$> decodeWithCache serialized cache decodeRtsValue k)
-  <*> (Just <$> case constantRtsValue of
-    Just val -> return val
-    Nothing -> decodeWithCache serialized cache decodeRtsValue v)
-
--- | Decode a fact reference inside a fact.
---
--- * If the nested fact is in the cache, then return it
--- * If the serialized fact is available, we decode it and add it to the cache
--- * Otherwise, we simply construct the empty fact with 'justId'.
---
-decodeRef
-  :: forall p. (Predicate p, Typeable p)
-  => Decoder p
-decodeRef = Decoder $ \env@DecoderEnv{..} -> do
-  (fid :: IdOf p) <- runDecoder decodeRtsValue env
-  cache <- liftIO $ readIORef cacheRef
-  let id = fromIntegral (fromFid (idOf fid))
-  case IntMap.lookup id cache of
-    Just dyn
-      | Just p <- fromDynamic dyn -> return p
-      | otherwise -> liftIO $ throwIO $ ErrorCall "decodeRef: wrong type"
-    Nothing -> do
-      case IntMap.lookup id serialized of
-        Nothing -> return (justId fid)
-        Just fact -> do
-          f <- decodeFact serialized cacheRef fid fact
-          liftIO $ modifyIORef' cacheRef $ \cache ->
-            IntMap.insert id (toDyn f) cache
-          return f
diff --git a/glean/hs/Glean/Typed/Id.hs b/glean/hs/Glean/Typed/Id.hs
deleted file mode 100644
--- a/glean/hs/Glean/Typed/Id.hs
+++ /dev/null
@@ -1,41 +0,0 @@
-{-
-  Copyright (c) Meta Platforms, Inc. and affiliates.
-  All rights reserved.
-
-  This source code is licensed under the BSD-style license found in the
-  LICENSE file in the root directory of this source tree.
--}
-
--- Note: UnboxedTuples needed for deriving Prim
-{-# LANGUAGE GeneralizedNewtypeDeriving, UnboxedTuples #-}
-  -- | This does not import Glean modules at all
-module Glean.Typed.Id
-  ( -- * Id-like
-    Pid(..), Fid(..)
-  , PidOf(..), IdOf(..)
-) where
-
-import Control.DeepSeq
-import Data.Hashable (Hashable)
-import Compat.Prettyprinter (Pretty(..))
-import Data.Vector.Primitive (Prim)
-import Foreign.Storable (Storable)
-
-import Glean.RTS.Types
-
--- -----------------------------------------------------------------------------
-
--- | Tie the Pid to a predicate phantom type 'p'.
-newtype PidOf p = PidOf { pidOf :: Pid }
-  deriving(Eq, Ord, Show)
-
-instance Pretty (PidOf p) where
-  pretty (PidOf p) = pretty p
-
--- | Id of a fact of a given predicate type 'p' (phantom type parameter).
--- Note: This is not the Id/Fid/Pid of the definition of predicate 'p'.
-newtype IdOf p = IdOf { idOf :: Fid }
-  deriving(Eq, Ord, Show, Hashable, NFData, Storable, Prim)
-
-instance Pretty (IdOf p) where
-  pretty (IdOf f) = pretty f
diff --git a/glean/hs/Glean/Typed/Predicate.hs b/glean/hs/Glean/Typed/Predicate.hs
deleted file mode 100644
--- a/glean/hs/Glean/Typed/Predicate.hs
+++ /dev/null
@@ -1,156 +0,0 @@
-{-
-  Copyright (c) Meta Platforms, Inc. and affiliates.
-  All rights reserved.
-
-  This source code is licensed under the BSD-style license found in the
-  LICENSE file in the root directory of this source tree.
--}
-
-{-# LANGUAGE TypeApplications #-}
-
--- | Support for working with Thrift-generated predicate types
-module Glean.Typed.Predicate
-  ( -- * class Predicate
-    Predicate(..)
-  , justId
-  , predicateRef
-  , predicateSourceType
-    -- * Lookup PidOf
-  , HasPredicates(..)
-    -- ** exception
-  , MissingPredicate(..), throwMissingPredicate
-    -- * Vector Predicates
-  , Predicates, SchemaPredicates, makePredicates
-  ) where
-
-import Control.Concurrent
-import Control.Exception
-import Data.HashMap.Strict (HashMap)
-import qualified Data.HashMap.Strict as HashMap
-import Data.IORef
-import qualified Data.Map as Map
-import Data.Proxy
-import Data.Text (Text)
-import Data.Vector.Primitive (Vector)
-import qualified Data.Vector.Primitive as Vector
-import System.IO.Unsafe
-import TextShow
-
-import Glean.RTS.Types (invalidPid)
-import qualified Glean.Schema.Util as Angle
-import Glean.Types (PredicateRef(..), SchemaInfo(..))
-import Glean.Typed.Binary
-import Glean.Typed.Id
-import qualified Glean.Angle.Types as Angle
-
--- -----------------------------------------------------------------------------
-
--- | 'Predicate' provides information about the schema's data structures,
--- and convenience functions.
---
--- * Types
---     * @'KeyType' Foo@ : the generated type (often @Foo_key*) that
---       stores the predicate's fields.
---     * @'ValueType' Foo@ : the generated values type, defaults to @()@.
--- * Methods
---     * @'getName' Foo@ : the @glean.thrift@ derived 'PredicateRef' holding
---       the Text name and Int version of the predicate.
---     * @'getIndex' Foo@ : internal use, index into all schema predicate list.
---       Used to efficiently lookup @'T.PidOf' p@ for a particular repo.
---
--- Superclass constraint of 'BT.Type' ensures this can be serialized into
--- the underlying binary format.
-
-class (Type p, Type (KeyType p), Type (ValueType p)) => Predicate p where
-  type KeyType p
-  type ValueType p
-  type ValueType p = ()
-  getName :: proxy p -> PredicateRef
-  mkFact :: IdOf p -> Maybe (KeyType p) -> Maybe (ValueType p) -> p
-  getId :: p -> IdOf p
-  getFactKey :: p -> Maybe (KeyType p)
-  getFactValue :: p -> Maybe (ValueType p)
-
-  -- A unique integer per predicate, used for fast lookup of Pids when
-  -- writing facts.
-  getIndex :: proxy p -> PredicateIndex
-  getIndex = const (predicateIndex (getName (Proxy :: Proxy p)))
-    -- this should be computed once and cached per predicate type
-
--- | Retrieve the Angle representation of the type
-predicateSourceType :: Predicate p => Proxy p -> Angle.SourceType' ()
-predicateSourceType proxy =
-  Angle.PredicateTy () (Angle.convertRef (getName proxy))
-
-justId :: Predicate p => IdOf p -> p
-justId x = mkFact x Nothing Nothing
-
-newtype MissingPredicate = MissingPredicate PredicateRef deriving(Show)
-instance Exception MissingPredicate
-
--- | Useful error for 'getPid' in 'HasPredicates'
-throwMissingPredicate :: forall p. Predicate p => PidOf p
-throwMissingPredicate = throw $ MissingPredicate $ getName (Proxy :: Proxy p)
-
--- | An index into the Predicates vector. Used when writing facts only.
-type PredicateIndex = Int
-
-newtype Predicates = Predicates (Vector Pid)
-  -- invalidPid for predicates missing from the schema
-
--- | Class of values 'a' that have definitions for any predicate 'p'
-class HasPredicates a where
-  getPid :: Predicate p => a -> PidOf p
-
-instance HasPredicates Predicates where
-  getPid = get
-    where
-      get :: forall p. Predicate p => Predicates -> PidOf p
-      get (Predicates pids)
-        | pid /= invalidPid = PidOf pid
-        | otherwise = throw $ MissingPredicate $ getName (Proxy :: Proxy p)
-        where
-          index = getIndex (Proxy :: Proxy p)
-          pid = if index < Vector.length pids
-            then pids Vector.! index
-            else invalidPid
-
--- | The type of @allPredicates@ generated for each schema. To get this,
--- import the generated module for the schema, e.g. @Glean.Schema.Src@.
-type SchemaPredicates = [PredicateRef]
-
-predicateIndex :: PredicateRef -> Int
-predicateIndex ref =
-  unsafeDupablePerformIO $ do
-    modifyMVar predicateIndices $ \hm ->
-      case HashMap.lookup ref hm of
-        Nothing -> do
-          n <- atomicModifyIORef' predicateNextIndex (\x -> (x+1, x+1))
-          return (HashMap.insert ref n hm, n)
-        Just n -> return (hm, n)
-
-{-# NOINLINE predicateIndices #-}
-predicateIndices :: MVar (HashMap PredicateRef Int)
-predicateIndices = unsafePerformIO $ newMVar HashMap.empty
-
-{-# NOINLINE predicateNextIndex #-}
-predicateNextIndex :: IORef Int
-predicateNextIndex = unsafePerformIO $ newIORef 0
-
-makePredicates :: [SchemaPredicates] -> SchemaInfo -> Predicates
-makePredicates schemas info = Predicates $
-  (Vector.//) (Vector.replicate (maxIx+1) invalidPid) assocs
-  where
-    maxIx = maximum $ map fst assocs
-    assocs =
-      [ (predicateIndex ref, HashMap.lookupDefault invalidPid ref ref_ids)
-      | ref <- concat schemas
-      ]
-    ref_ids = HashMap.fromList
-      [(ref, Pid id) | (id,ref) <- Map.toList $ schemaInfo_predicateIds info]
-
--- | Convert a predicate type to a versioned predicate name. This is
--- useful for building Angle queries that refer to specific versions.
-predicateRef :: forall p proxy . Predicate p => proxy p -> Text
-predicateRef _ = name <> "." <> showt version
-  where !(PredicateRef name version) = getName (Proxy @p)
diff --git a/glean/hs/Glean/Typed/Prim.hs b/glean/hs/Glean/Typed/Prim.hs
deleted file mode 100644
--- a/glean/hs/Glean/Typed/Prim.hs
+++ /dev/null
@@ -1,24 +0,0 @@
-{-
-  Copyright (c) Meta Platforms, Inc. and affiliates.
-  All rights reserved.
-
-  This source code is licensed under the BSD-style license found in the
-  LICENSE file in the root directory of this source tree.
--}
-
-
--- | Support for base types
-module Glean.Typed.Prim
-  ( fromNat, toNat,
-  ) where
-
-import Data.Word
-
-import Glean.Types
-
-
-fromNat :: Nat -> Word64
-fromNat = fromIntegral . unNat
-
-toNat :: Word64 -> Nat
-toNat = Nat . fromIntegral
diff --git a/glean/hs/Glean/Write/Async.hs b/glean/hs/Glean/Write/Async.hs
deleted file mode 100644
--- a/glean/hs/Glean/Write/Async.hs
+++ /dev/null
@@ -1,271 +0,0 @@
-{-
-  Copyright (c) Meta Platforms, Inc. and affiliates.
-  All rights reserved.
-
-  This source code is licensed under the BSD-style license found in the
-  LICENSE file in the root directory of this source tree.
--}
-
-module Glean.Write.Async (
-  Sender, SendQueueSettings(..), SendQueueEvent(..), withSender,
-  senderQueue,
-  Writer, WriterSettings(..), WriterEvent(..),
-  withWriter, withWriters, writeFacts,
-  withBatchWriter,
-  basicWriter
-) where
-
-import Control.Applicative
-import Control.Concurrent.Async
-import Control.Concurrent.MVar
-import Control.Exception
-import Control.Monad
-import Data.Default
-import Data.Maybe
-
-import Util.STM
-import Util.Time
-
-import Glean.Backend.Types (Backend)
-import qualified Glean.Backend.Types as Backend
-import Glean.RTS as RTS
-import Glean.Typed.BuildFact
-import Glean.Typed.Predicate
-import qualified Glean.Types as Thrift
-import Glean.Write.SendQueue
-import Glean.Util.Some
-
-
--- | An asynchronous batch sender. Can be interacted with via a 'Writer'.
-data Sender = Sender
-  { senderQueue :: SendQueue
-  , senderPredicates :: Predicates
-  , senderBackend :: Some Backend
-  , senderRepo :: Thrift.Repo
-  }
-
-instance HasPredicates Sender where
-  getPid = getPid . senderPredicates
-
--- | Create an asynchronous 'Sender', run an action and wait until the sender
--- finished sending all batches. The 'Sender' is only usable within the action
--- but is thread safe. Any communication errors will be raised as exceptions.
---
--- A 'Sender' wraps a 'SendQueue', so 'withSender' takes
--- 'SendQueueSettings' to manage its behaviour.
-withSender
-  :: (Backend be)
-  => be
-  -> Thrift.Repo
-  -> [SchemaPredicates]
-  -> SendQueueSettings
-  -> (Sender -> IO a)
-  -> IO a
-withSender backend repo proxy settings action = do
-  predicates <- Backend.loadPredicates backend repo proxy
-  withSendQueue backend repo settings $ \q ->
-    action Sender
-      { senderQueue = q
-      , senderPredicates = predicates
-      , senderBackend = Some backend
-      , senderRepo = repo
-      }
-
--- | An event that happens in a 'Writer' and can be logged
-data WriterEvent
-  =
-    -- | Writer is pushing a patch to the sender
-    WriterPushing Thrift.Batch
-
-    -- | Writer is stalling due to the send queue being full
-  | WriterStalling
-
-    -- | Writer is resuming after having stalled previously
-  | WriterResuming
-      DiffTimePoints -- time spent stalled
-
--- | 'Writer' settings
-data WriterSettings = WriterSettings
-  { -- | Maximum size of a batch the write can accumulate before pushing it
-    -- to the 'Sender' (soft limit)
-    writerMaxSize :: !Int
-
-    -- | Function called whenever a 'WriterEvent' occurs
-  , writerLog :: WriterEvent -> IO ()
-  }
-
-instance Show WriterSettings where
-  show _ = "WriterSettings{}"
-
-instance Default WriterSettings where
-  def = WriterSettings
-    { writerMaxSize = 30000000
-    , writerLog = const $ return ()
-    }
-
--- | An asynchronous writer. It accumulates facts (via 'writeFacts') into
--- batches and pushes those batches to the underlying 'Sender' when they reach
--- a certain size.  Alternatively, the 'WriterContext' holds the 'Predicates'
--- and 'withBatchWriter' produces a single 'Batch' for regression testing.
---
--- NOTE: Writers serialise all writes - if you want to produce facts in
--- parallel, use multiple writers.
-data Writer = Writer
-  { writerPredicates :: !Predicates
-  , writerSender :: Maybe Sender
-  , writerFirstId :: !Fid
-  , writerFacts :: !(MVar Facts)
-  , writerSettings :: WriterSettings
-  }
-
-instance HasPredicates Writer where
-  getPid = getPid . writerPredicates
-
-newWriter :: Sender -> WriterSettings -> IO Writer
-newWriter s settings = do
-  Thrift.FactIdRange { factIdRange_finish = finish } <-
-    Backend.factIdRange (senderBackend s) (senderRepo s)
-  let first_id = Fid finish
-  v <- newMVar =<< newFacts (senderPredicates s) (Just first_id)
-  return Writer
-    { writerPredicates = senderPredicates s
-    , writerSender = Just s
-    , writerFirstId = first_id
-    , writerFacts = v
-    , writerSettings = settings
-    }
-
-newWriterFromPredicates :: Predicates -> Fid -> WriterSettings -> IO Writer
-newWriterFromPredicates ps firstId settings = do
-  v <- newMVar =<< newFacts ps (Just firstId)
-  return Writer
-    { writerPredicates = ps
-    , writerSender = Nothing
-    , writerFirstId = firstId
-    , writerFacts = v
-    , writerSettings = settings
-    }
-
--- Helper type for the @action@ passed to 'maybeFlush'
-data MaybeFlush = DoNotFlushFacts | FlushFacts
-  deriving (Eq)
-
-flushWriter :: Writer -> Callback -> IO ()
-flushWriter w callback = maybeFlush w callback $ const $ return FlushFacts
-
--- | Create a new 'Writer' based on the given 'Sender'. The facts created
--- by the 'Writer' will have fact ids which are guaranteed not to clash with
--- any facts already in the database at the point the 'Writer' is created. At
--- the end, the function will wait until all batches have been delivered to
--- and acknowledged by the server. This means that any subsequent queries will
--- return the facts produced by the 'Writer'.
-withWriter :: Sender -> WriterSettings -> (Writer -> IO a) -> IO a
-withWriter s settings action = do
-  w <- newWriter s settings
-  result <- action w
-  done <- newEmptyTMVarIO
-  flushWriter w (void . tryPutTMVar done)
-  r <- atomically $ readTMVar done
-  case r of
-    Right _subst -> return result
-    Left exc -> throwIO exc
-
--- | Create many Writers for writing to a sender in parallel. Use this
--- instead of `withMany withWriter`, because it will flush the writers
--- in parallel rather than sequentially at the end.
-withWriters :: Sender -> WriterSettings -> Int -> ([Writer] -> IO a) -> IO a
-withWriters  s settings n action = do
-  ws <- replicateM n $ newWriter s settings
-  result <- action ws
-  forConcurrently_ ws $ \w -> do
-    done <- newEmptyTMVarIO
-    flushWriter w (void . tryPutTMVar done)
-    r <- atomically $ readTMVar done
-    case r of
-      Right _subst -> return ()
-      Left exc -> throwIO exc
-  return result
-
--- | Create a new 'Writer' for regression testing.  This accumulates into
--- a single 'Facts' and produces a single 'Batch' without sending to a backend.
-withBatchWriter
-  :: (Backend be)
-  => be
-  -> Thrift.SchemaId
-  -> Maybe Fid
-    --  ^ starting fact ID to create. If the batch will be added to an
-    -- existing DB and the indexer will be creating facts that refer
-    -- to facts from the DB, this should be obtained by calling
-    -- 'firstFreeId' on the DB; otherwise it can be 'Nothing'.
-  -> WriterSettings
-  -> (Writer -> IO a)
-  -> IO (a, Thrift.Batch)
-withBatchWriter backend schemaId firstId settings action = do
-  ps <- Backend.loadPredicatesForSchema backend schemaId
-  w <- newWriterFromPredicates ps (fromMaybe lowestFid firstId) settings
-  result <- action w
-  facts <- takeMVar (writerFacts w)
-  batch <- serializeFacts facts
-  return (result, batch { Thrift.batch_schema_id = Just schemaId })
-
--- | Write a bunch of facts to a 'Writer'. If the accumulated batch goes over
--- the threshold (cf. 'writerMaxSize') the batch will be pushed to the 'Sender'.
---
--- Because 'FactBuilder' uses a forall so as not to expose 'IO' (or similar),
--- fact ids created while running 'FactBuilder' are local to one call of
--- 'writeFacts' and cannot be saved or reused later.
-writeFacts :: Writer -> FactBuilder -> IO ()
-writeFacts w builder = maybeFlush w (const $ return ()) $ \facts -> do
-  extendFacts facts builder
-  mem <- factsMemory facts
-  return $ if mem > writerMaxSize (writerSettings w)
-    then FlushFacts
-    else DoNotFlushFacts
-
--- @'maybeFlush' w calback action@ without a 'Sender' is used merely
--- runs the @action@ and @callback is ignored.
---
--- With a 'Sender' this checks 'MaybeFlush' and if the result is 'FlushFacts'
--- will write to the 'Sender' queue and execute the @callback@ , and if the
--- result is 'DoNotFlushFacts' the @callback@ is ignored.
-maybeFlush :: Writer -> Callback -> (Facts -> IO MaybeFlush) -> IO ()
-maybeFlush w callback action = modifyMVar_ (writerFacts w) $ \facts -> do
-  flush <- action facts
-  case writerSender w of
-    Just sender | flush == FlushFacts -> do
-      new_facts <- newFacts (writerPredicates w) (Just $ writerFirstId w)
-      batch <- addSchemaId sender <$> serializeFacts facts
-      writerLog (writerSettings w) $ WriterPushing batch
-      let write = writeSendQueue (senderQueue sender) batch callback
-      -- NOTE: Yes, we're intentionally blocking inside modifyMVar_
-      ok <- atomically $ (write >> return True) <|> return False
-      when (not ok) $ do
-        writerLog (writerSettings w) WriterStalling
-        start <- getTimePoint
-        atomically write
-        elapsed <- getElapsedTime start
-        writerLog (writerSettings w) $ WriterResuming elapsed
-      return new_facts
-
-    _ -> return facts
-
--- If we add our schema ID to the batch, the server will check that it
--- matches the DB's schema, so we can catch schema mismatches before
--- we get (de)serialization errors.
-addSchemaId :: Sender -> Thrift.Batch -> Thrift.Batch
-addSchemaId Sender{..} batch =
-  batch { Thrift.batch_schema_id = Backend.schemaId senderBackend }
-
--- | Write facts to a Repo using an asynchronous sender, with all the
--- default settings.
-basicWriter
-  :: (Backend be)
-  => be
-  -> Thrift.Repo
-  -> [SchemaPredicates]
-  -> FactBuilder
-  -> IO ()
-basicWriter backend repo proxy builder =
-  withSender backend repo proxy def $ \sender ->
-  withWriter sender def $ \writer ->
-  writeFacts writer builder
diff --git a/glean/hs/Glean/Write/Options.hs b/glean/hs/Glean/Write/Options.hs
deleted file mode 100644
--- a/glean/hs/Glean/Write/Options.hs
+++ /dev/null
@@ -1,123 +0,0 @@
-{-
-  Copyright (c) Meta Platforms, Inc. and affiliates.
-  All rights reserved.
-
-  This source code is licensed under the BSD-style license found in the
-  LICENSE file in the root directory of this source tree.
--}
-
-{-# LANGUAGE ApplicativeDo #-}
-
-module Glean.Write.Options
-  ( sendQueueOptions
-  , sendAndRebaseQueueOptions
-  , writerOptions
-  ) where
-
-import Control.Exception
-import qualified Data.ByteString as B
-import Data.Default (def)
-import qualified Options.Applicative as O
-import System.IO
-import Text.Printf
-
-import Thrift.Protocol.Compact
-import Util.Log
-
-import Glean.Write.Async (WriterSettings(..), WriterEvent(..))
-import Glean.Write.SendQueue (SendQueueSettings(..))
-import Glean.Write.SendAndRebaseQueue (SendAndRebaseQueueSettings(..))
-import Glean.Util.RetryChannelException
-
-
-sendQueueOptions :: O.Parser SendQueueSettings
-sendQueueOptions = do
-  sendQueueThreads <- O.option O.auto $
-    O.long "sender-threads"
-    <> O.metavar "N"
-    <> O.value 1
-    <> O.showDefault
-    <> O.help "number of concurrent sender threads"
-  sendQueueMaxMemory <- O.option O.auto $
-    O.long "max-send-queue-size"
-    <> O.metavar "N"
-    <> O.value 2000000000
-    <> O.showDefault
-    <> O.help "maximum size of send queue (in bytes)"
-  sendQueueMaxBatches <- O.option O.auto $
-    O.long "max-send-queue-batches"
-    <> O.metavar "N"
-    <> O.value 1024
-    <> O.showDefault
-    <> O.help "maximum number of batches in send queue"
-  sendQueueRetry <- fmap toRetryPolicy $ O.option O.auto $
-    O.long "send-retries"
-    <> O.metavar "N"
-    <> O.value 20
-    <> O.showDefault
-    <> O.help "number of retries"
-  return def
-    { sendQueueThreads
-    , sendQueueMaxMemory
-    , sendQueueMaxBatches
-    , sendQueueRetry
-    }
-  where
-  toRetryPolicy n = defaultRetryPolicy { maxRetries = n }
-
-
-sendAndRebaseQueueOptions :: O.Parser SendAndRebaseQueueSettings
-sendAndRebaseQueueOptions = do
-  sendAndRebaseQueueSendQueueSettings <- sendQueueOptions
-  sendAndRebaseQueueFactCacheSize <- O.option O.auto $
-    O.long "fact-cache-size"
-    <> O.metavar "N"
-    <> O.value 2000000000
-    <> O.showDefault
-    <> O.help "size of the cache for sent facts"
-  sendAndRebaseQueueFactBufferSize <- O.option O.auto $
-    O.long "fact-buffer-size"
-    <> O.metavar "N"
-    <> O.value (200*1000*1000)
-    <> O.showDefault
-    <> O.help "size of the buffer for unsent facts per sender"
-  return SendAndRebaseQueueSettings
-    { sendAndRebaseQueueSendQueueSettings
-    , sendAndRebaseQueueFactCacheSize
-    , sendAndRebaseQueueFactBufferSize
-    , sendAndRebaseQueueSenders =
-        sendQueueThreads sendAndRebaseQueueSendQueueSettings
-    , sendAndRebaseQueueAllowRemoteReferences = False
-    , sendAndRebaseQueueStats = Nothing
-    }
-
-
-writerOptions :: O.Parser WriterSettings
-writerOptions = do
-  writerMaxSize <- O.option O.auto $
-    O.long "max-batch-size"
-    <> O.metavar "N"
-    <> O.value 30000000
-    <> O.showDefault
-    <> O.help "maximum size of Thrift batch (in bytes)"
-  writerDump <- O.optional $ O.strOption $
-    O.long "dump-batches"
-    <> O.metavar "DIR"
-    <> O.help ("also dump all batches in binary format to DIR. " <>
-      "The files can be used with 'glean write --file-format=binary'")
-  return def
-    { writerMaxSize = writerMaxSize
-    , writerLog = logBatch writerDump
-    }
-  where
-    logBatch dump (WriterPushing batch)
-      | Just dir <- dump = do
-        let serialized = serializeCompact batch
-        bracket
-          (openTempFile dir "batch.bin")
-          (hClose . snd)
-          $ \(f,h) -> do
-            logInfo $ printf "dumping batch (%d bytes) to %s"
-              (B.length serialized) f
-            B.hPut h serialized
-    logBatch _ _ = return ()
diff --git a/glean/hs/Glean/Write/SendAndRebaseQueue.hs b/glean/hs/Glean/Write/SendAndRebaseQueue.hs
deleted file mode 100644
--- a/glean/hs/Glean/Write/SendAndRebaseQueue.hs
+++ /dev/null
@@ -1,442 +0,0 @@
-{-
-  Copyright (c) Meta Platforms, Inc. and affiliates.
-  All rights reserved.
-
-  This source code is licensed under the BSD-style license found in the
-  LICENSE file in the root directory of this source tree.
--}
-
-module Glean.Write.SendAndRebaseQueue
-  ( SendAndRebaseQueueSettings(..)
-  , SendAndRebaseQueue
-  , withSendAndRebaseQueue
-  , writeSendAndRebaseQueue
-  ) where
-
-import Control.Concurrent
-import Control.Exception
-import Control.Monad
-import qualified Data.ByteString as BS
-import Data.Word
-
-import Util.Log
-import Util.STM
-
-import Glean.Backend.Types (Backend)
-import Glean.FFI (release)
-import qualified Glean.Write.SendQueue as SendQueue
-import Glean.Write.SendQueue (SendQueue)
-import Glean.RTS.Constants (firstAnonId)
-import Glean.Write.Stats as Stats
-import Glean.RTS.Foreign.Define
-import Glean.RTS.Foreign.Ownership
-import Glean.RTS.Foreign.Stacked
-import qualified Glean.RTS.Foreign.Lookup as Lookup
-import qualified Glean.RTS.Foreign.LookupCache as LookupCache
-import Glean.RTS.Foreign.LookupCache (LookupCache, countFailuresAsMisses)
-import qualified Glean.RTS.Foreign.FactSet as FactSet
-import Glean.RTS.Foreign.FactSet (FactSet)
-import Glean.RTS.Foreign.Inventory (Inventory)
-import Glean.RTS.Foreign.Subst
-import Glean.RTS.Types (Fid(..))
-import Glean.Util.Metric
-import qualified Glean.Types as Thrift
-
-{-
-SendAndRebaseQueue
-------------------
-
-This is a queue for sending facts to a Glean server. It has a couple
-of advantages over using a raw SendQueue:
-
-* The queue avoids sending duplicate facts to the server by performing
-  some de-duplication before sending the data.
-
-* When the input is JSON, the facts are serialized as binary before
-  being sent to the server.
-
-De-duplication
---------------
-
-De-duplication happens in two ways:
-
-1. Each batch is added to the current fact buffer, and de-duplicatd
-against the facts already in the buffer.
-
-2. The contents of the buffer are sent to the server asynchronously,
-and when the server responds with a substitution (mapping facts in the
-buffer to their real fact IDs) the queue places the renamed facts in a
-cache, which is used to de-duplicate new batches.
-
-Details
--------
-
-The queue looks like this:
-
-  +-------+     +-------------+
-  | cache |     | fact buffer |
-  +-------+     +-------------+
-
-when a new batch is added (via writeSendAndRebaseQueue), it is added
-to the fact buffer:
-
-                              +---------------+
-                              |   new facts   |
-                              +---------------+
-                              |              /
-                              |   rebase    /
-                              |            /
-  +-------+     +-------------+-----------+
-  | cache |     | fact buffer | new facts |
-  +-------+     +-------------+-----------+
-
-when this happens, any facts in the new batch that duplicate facts in
-the cache or the existing fact buffer are removed.
-
-The fact buffer is sent to the server as a single batch:
-
-  +-------+     +-------------+
-  | cache |     | fact buffer |
-  +-------+     +------+------+
-                       |
-                       v
-                    server
-
-which will later respond with a substitution. When the server
-responds, we will have added more facts to the buffer, so the
-situation is now:
-
-  +-------+     +-------------+-----------+
-  | cache |     | fact buffer | new facts |
-  +-------+     +------+------+-----------+
-                       |
-                       v
-                    server
-
-The server's substitution maps facts in the buffer to their real fact
-IDs. At this point we rename the fact buffer using the substitution,
-and move those facts into the cache, leaving the fact buffer
-containing just the new facts:
-
-  +-------+-------------+    +-----------+
-  | cache | fact buffer |    | new facts |
-  +-------+-------------+    +-----------+
-
-The new facts are then sent to the server:
-
-  +-------+-------------+    +-----------+
-  | cache | fact buffer |    | new facts |
-  +-------+-------------+    +-----+-----+
-                                   |
-                                   v
-                                server
-
-so over time we build up a cache of facts from the server:
-essentially a cache of part of the DB, and use it to avoid sending
-facts that are already in the DB, thereby reducing the amount of data
-we send to the server.
-
-All of this is subject to limits:
-
-- sendAndRebaseQueueFactCacheSize: a limit on the size of the cache
-  (we drop old entries according to an eviction policy)
-
-- sendAndRebaseQueueFactBufferSize: A limit on the size of the fact
-  buffer (writers will wait for the server to respond if the buffer is
-  full)
-
-Threads and SendQueue
----------------------
-
-The fact buffer is a bottleneck if multiple threads are writing
-simultaneously. To avoid that, we can have multiple fact buffers that
-share a cache: this is done by setting sendAndRebaseQueueThreads to a
-value higher than 1.
-
-SendAndRebaseQueue is built on top of SendQueue, which manages sending
-the individual batches to the server, retrying and resending as
-necessary. SendQueue is automatically configured to use the same
-number of sender threads as SendAndRebaseQueue, to parallelise the
-sending.
--}
-
-
--- | When the send operation fails or is completed this is called once.
-type Callback = Either SomeException () -> STM ()
-
-data WaitSubst
-  = WaitSubstNone
-  | WaitSubstError SomeException
-  | WaitSubstSuccess Thrift.Subst
-
-data Sender = Sender
-  { sId :: Integer
-  , sSubstVar :: TMVar WaitSubst
-  , sSent :: TVar Point
-    -- ^ Records the size and time the last batch was sent, for stats
-  , sFacts :: MVar (FactSet, [FactOwnership])
-    -- ^ [Ownership] is the ownership assignments for facts in the FactSet
-  , sCallbacks :: TQueue Callback
-  }
-
-data SendAndRebaseQueue = SendAndRebaseQueue
-  { srqSendQueue :: !SendQueue
-    -- ^ Underlying send queue
-
-  , srqSenders :: TQueue Sender
-    -- ^ Senders accumulate facts while waiting for a substitution
-
-  , srqInventory :: !Inventory
-    -- ^ Schema inventory (used for rebasing)
-
-  , srqFacts :: !LookupCache
-    -- ^ Cache the ids of facts stored on the server
-
-  , srqCacheStats :: !LookupCache.Stats
-    -- ^ Stats for the Lookup cache
-
-  , srqStats :: Maybe Stats
-    -- ^ How to report stats.
-
-  , srqFactBufferSize :: !Int
-    -- ^ Max size of fact buffer
-  }
-
--- | Settings for a 'SendAndRebase'
-data SendAndRebaseQueueSettings = SendAndRebaseQueueSettings
-  { -- | Settings for the underlying send queue
-    sendAndRebaseQueueSendQueueSettings :: !SendQueue.SendQueueSettings
-
-    -- | Max memory that the fact cache should use
-  , sendAndRebaseQueueFactCacheSize :: !Int
-
-    -- | Max memory that the fact buffer should use (per sender). The
-    -- purpose of this limit is to prevent the buffer from growing
-    -- without bound if the server's write queue is full. When the
-    -- buffer exceeds this limit, writers will start waiting for the
-    -- server. Note that the limit is per sender.
-  , sendAndRebaseQueueFactBufferSize :: !Int
-
-    -- | Number of senders
-  , sendAndRebaseQueueSenders :: !Int
-
-    -- | Allow facts in the batch to make reference to facts in the remote
-    -- server that may not be in the local cache.
-  , sendAndRebaseQueueAllowRemoteReferences :: Bool
-
-    -- | How to log stats. Obatin this with 'Glean.Write.Stats.new'.
-  , sendAndRebaseQueueStats :: Maybe Stats
-  }
-
--- | Add a new batch to the fact buffer, de-duplicating against the
--- buffer and the cache.
-rebase
-  :: Inventory
-  -> Thrift.Batch
-  -> LookupCache
-  -> FactSet.FactSet
-  -> IO (FactSet.FactSet, FactOwnership)
-rebase inventory batch cache base = do
-  LookupCache.withCache Lookup.EmptyLookup cache LookupCache.FIFO $ \cache -> do
-    -- when there are multiple senders, the cache may have new facts since
-    -- we previously rebased, and it may contain fact IDs that overlap with
-    -- the current base. So we have to use a snapshot of the cache, restricted
-    -- to fact IDs less than the current base startingId.
-    first_id <- Lookup.startingId base
-    Lookup.withSnapshot cache first_id $ \snapshot -> do
-      factSet <- Lookup.firstFreeId base >>= FactSet.new
-      let define = snapshot `stacked` base `stacked` factSet
-      subst <- defineBatch define inventory batch DefineFlags
-        { trustRefs = True
-        , ignoreRedef = True  -- see Note [redefinition]
-        }
-      owned <- substOwnership subst $
-        FactOwnership $ Thrift.batch_owned batch
-      return (factSet, owned)
-
-{- Note [redefinition]
-
-Redefinition is when we have two facts A->B, C->D where A == C but B /= D.
-
-Normally this would be an error, and defineBatch rejects it with an
-error. But it can arise naturally here because when
-typechecking/rebasing A->B we may have used a different cache from
-when we typechecked/rebased C->D. So even though B and D may be
-semantically identical, they are literally different.
-
-It doesn't seem possible to ensure that we always use a consistent
-cache, so it's inevitable that benign fact redefinitions may
-occur. Therefore we ignore redefinitions in `defineBatch`.
-
-Note: this might mean that we are ignoring actual errors and silently
-picking one of the two facts if they really did differ. That's bad,
-but I don't see an alternative.
-
--}
-
--- | Send the current fact buffer to the server
-senderFlush :: SendAndRebaseQueue -> Sender -> IO ()
-senderFlush srq sender = modifyMVar_ (sFacts sender) $ \(facts, owned) -> do
-  factOnlyBatch <- FactSet.serialize facts
-  let batch = factOnlyBatch {
-        Thrift.batch_owned = ownershipUnits (unionOwnership owned) }
-  !size <- FactSet.factMemory facts
-  start <- beginTick (fromIntegral size)
-  atomically $ do
-    callbacks <- flushTQueue (sCallbacks sender)
-    SendQueue.writeSendQueue (srqSendQueue srq) batch $ \result -> do
-      case result of
-        Right subst -> putTMVar (sSubstVar sender) (WaitSubstSuccess subst)
-        Left e -> putTMVar (sSubstVar sender) (WaitSubstError e)
-      forM_ callbacks ($ void result)
-    writeTVar (sSent sender) start
-  return (facts, [])
-
--- | If the server has returned a substutition, rebase the current
--- fact buffer against it. Send the current fact buffer to the server,
--- unless we're already waiting for a substitution.
-senderRebaseAndFlush :: Bool -> SendAndRebaseQueue -> Sender -> IO ()
-senderRebaseAndFlush wait srq sender = do
-  maybeSubst <- atomically $
-    if wait then
-      Just <$> takeTMVar (sSubstVar sender)
-    else
-      tryTakeTMVar (sSubstVar sender)
-  case maybeSubst of
-    Nothing -> do -- waiting on subst
-      log "Waiting on substitution from server"
-      return ()
-    Just (WaitSubstError e) -> do
-      log "Send failure"
-      atomically $ putTMVar (sSubstVar sender) (WaitSubstError e)
-      throwIO e
-    Just WaitSubstNone -> do -- first send
-      log "Sending first batch"
-      senderFlush srq sender
-    Just (WaitSubstSuccess thriftSubst) -> do -- got subst
-      log "Sending next batch"
-      handle (\(e :: SomeException) -> do
-          logError (show e)
-          atomically $ putTMVar (sSubstVar sender) (WaitSubstError e)
-          throwIO e) $
-        modifyMVar_ (sFacts sender) $ \(base,owned) ->
-          -- eagerly release the subst when we're done
-          bracket (deserialize thriftSubst) release $ \subst -> do
-            (newBase, newSubst) <-
-              FactSet.rebase (srqInventory srq) subst (srqFacts srq) base
-            newOwned <- mapM (substOwnership newSubst) owned
-            return (newBase, newOwned)
-      -- "Commit throughput" will be write throughput to the server
-      start <- readTVarIO (sSent sender)
-      statBump srq Stats.commitThroughput =<< endTick start
-      senderFlush srq sender
-    where log msg = vlog 1 $ "Sender " <> show (sId sender) <> ": " <> msg
-
-updateLookupCacheStats :: SendAndRebaseQueue -> IO ()
-updateLookupCacheStats SendAndRebaseQueue{..} =
-  forM_ srqStats $ \stats -> do
-    statValues <- LookupCache.readStatsAndResetCounters srqCacheStats
-    Stats.bump stats Stats.lookupCacheStats (countFailuresAsMisses statValues)
-
-statTick :: SendAndRebaseQueue -> Bump Tick -> Word64 -> IO a -> IO a
-statTick SendAndRebaseQueue{..} bump val act =
-  case srqStats of
-    Nothing -> act
-    Just stats -> Stats.tick stats bump val act
-
-statBump :: SendAndRebaseQueue -> Bump Tick -> Tick -> IO ()
-statBump SendAndRebaseQueue{..} bump val =
-  case srqStats of
-    Nothing -> return ()
-    Just stats -> Stats.bump stats bump val
-
-senderSendOrAppend
-  :: SendAndRebaseQueue
-  -> Sender
-  -> Thrift.Batch
-  -> Callback
-  -> Point
-  -> IO ()
-senderSendOrAppend srq sender batch callback latency = do
-  -- "Mutator latency" is the latency between calling writeSendAndRebaseQueue
-  -- and having a free Sender to write the batch.
-  statBump srq Stats.mutatorLatency =<< endTick latency
-  let !size = BS.length $ Thrift.batch_facts batch
-  newSize <-
-    -- "Mutator throughput" is how fast we are appending new facts
-    -- to the FactSet.
-    statTick srq Stats.mutatorThroughput (fromIntegral size) $ do
-      modifyMVar (sFacts sender) $ \(base, ownership) -> do
-        (facts, owned) <- rebase (srqInventory srq) batch (srqFacts srq) base
-        FactSet.append base facts
-        atomically $ writeTQueue (sCallbacks sender) callback
-        newSize <- FactSet.factMemory base
-        return ((base, owned : ownership), newSize)
-  updateLookupCacheStats srq
-  let !wait = newSize >= srqFactBufferSize srq
-  senderRebaseAndFlush wait srq sender
-
-withSendAndRebaseQueue
-  :: Backend e
-  => e
-  -> Thrift.Repo
-  -> Inventory
-  -> SendAndRebaseQueueSettings
-  -> (SendAndRebaseQueue -> IO a)
-  -> IO a
-withSendAndRebaseQueue backend repo inventory settings action = do
-  vlog 1 $ "Allow remote refs: " <> show sendAndRebaseQueueAllowRemoteReferences
-  SendQueue.withSendQueue backend repo sendAndRebaseQueueSendQueueSettings $
-    \sendQueue -> do
-      cacheStats <- LookupCache.newStats
-      let cacheSize = fromIntegral sendAndRebaseQueueFactCacheSize
-      srq <- SendAndRebaseQueue
-        <$> pure sendQueue
-        <*> newTQueueIO
-        <*> pure inventory
-        <*> LookupCache.new cacheSize 1 cacheStats
-        <*> pure cacheStats
-        <*> pure sendAndRebaseQueueStats
-        <*> pure sendAndRebaseQueueFactBufferSize
-      bracket_ (createSenderPool srq) (deleteSenderPool srq) $
-        action srq
-    where
-      SendAndRebaseQueueSettings{..} = settings
-      createSenderPool srq =
-        forM_ senderIds $ \i -> do
-          factset <- FactSet.new baseId
-          worker <- Sender i
-            <$> newTMVarIO WaitSubstNone
-            <*> newTVarIO (error "missing sSent")
-            <*> newMVar (factset, [])
-            <*> newTQueueIO
-          atomically $ writeTQueue (srqSenders srq) worker
-      deleteSenderPool srq =
-        forM_ senderIds $ \_i -> do
-          -- don't deadlock here in case we died leaving the queue empty
-          sender <- atomically $ tryReadTQueue (srqSenders srq)
-          forM_ sender $ senderRebaseAndFlush True srq
-      senderIds = take sendAndRebaseQueueSenders [1..]
-
-      baseId = if sendAndRebaseQueueAllowRemoteReferences
-        then firstLocalId
-        else Fid Thrift.fIRST_FREE_ID
-
-      -- Higher than Ids in the remote db to avoid remote fact references
-      -- from being mistaken for local fact references.
-      -- Lower than Ids in JSON batches to avoid references within the
-      -- batch from being mistaken for references to the local db.
-      firstLocalId = Fid (firstAnonId `div` 2)
-
-
-writeSendAndRebaseQueue
-  :: SendAndRebaseQueue
-  -> Thrift.Batch
-  -> Callback
-  -> IO ()
-writeSendAndRebaseQueue srq batch callback = do
-  point <- beginTick 1
-  bracket
-    (atomically $ readTQueue $ srqSenders srq)
-    (\sender -> atomically $ writeTQueue (srqSenders srq) sender)
-    (\sender -> senderSendOrAppend srq sender batch callback point)
diff --git a/glean/hs/Glean/Write/SendBatch.hs b/glean/hs/Glean/Write/SendBatch.hs
deleted file mode 100644
--- a/glean/hs/Glean/Write/SendBatch.hs
+++ /dev/null
@@ -1,136 +0,0 @@
-{-
-  Copyright (c) Meta Platforms, Inc. and affiliates.
-  All rights reserved.
-
-  This source code is licensed under the BSD-style license found in the
-  LICENSE file in the root directory of this source tree.
--}
-
--- |
--- This layer provides synchronous writing on top of the lower-level
--- asynchronous write API, by doing polling and waiting as necessary.
---
-module Glean.Write.SendBatch
-  ( sendBatch
-  , sendBatchAsync
-  , sendJsonBatch
-  , sendJsonBatchAsync
-  , sendBatchDescriptor
-  , sendBatchDescriptorAsync
-  , waitBatch
-  ) where
-
-import Control.Exception
-import Data.Default
-import qualified Data.Text as Text
-import System.Time.Extra
-
-import Glean.Backend.Types
-import qualified Glean.Types as Thrift
-
-sendBatch
-  :: Backend be
-  => be
-  -> Thrift.Repo
-  -> Thrift.Batch
-  -> IO Thrift.Subst
-sendBatch backend repo batch = do
-  handle <- sendBatchAsync backend repo batch
-  waitBatch backend handle
-
-sendBatchAsync
-  :: Backend be
-  => be
-  -> Thrift.Repo
-  -> Thrift.Batch
-  -> IO Thrift.Handle
-sendBatchAsync backend repo batch = do
-  r <- enqueueBatch backend $ Thrift.ComputedBatch repo True batch
-  case r of
-    Thrift.SendResponse_handle h -> return h
-    Thrift.SendResponse_retry (Thrift.BatchRetry r) ->
-      retry r $ sendBatchAsync backend repo batch
-
-sendJsonBatchAsync
-  :: Backend be
-  => be
-  -> Thrift.Repo
-  -> [Thrift.JsonFactBatch]
-  -> Maybe Thrift.SendJsonBatchOptions
-  -> IO Thrift.Handle
-sendJsonBatchAsync backend repo batches opts = do
-  r <- try $ enqueueJsonBatch backend repo
-    Thrift.SendJsonBatch
-      { Thrift.sendJsonBatch_batches = batches
-      , Thrift.sendJsonBatch_options = opts
-      , Thrift.sendJsonBatch_remember = True }
-  case r of
-    Right Thrift.SendJsonBatchResponse{..} ->
-      return sendJsonBatchResponse_handle
-    Left Thrift.Retry{..} ->
-      retry retry_seconds $
-        sendJsonBatchAsync backend repo batches opts
-
-sendJsonBatch
-  :: Backend be
-  => be
-  -> Thrift.Repo
-  -> [Thrift.JsonFactBatch]
-  -> Maybe Thrift.SendJsonBatchOptions
-  -> IO Thrift.Subst
-sendJsonBatch backend repo batches opts = do
-  handle <- sendJsonBatchAsync backend repo batches opts
-  -- Cope with talking to an old server where this API was synchronous
-  -- and didn't return a handle.
-  if Text.null handle
-    then return def
-    else waitBatch backend handle
-
-sendBatchDescriptor
-  :: Backend be
-  => be
-  -> Thrift.Repo
-  -> Thrift.BatchDescriptor
-  -> IO Thrift.Subst
-sendBatchDescriptor backend repo descriptor = do
-  handle <- sendBatchDescriptorAsync backend repo descriptor
-  if Text.null handle
-    then return def
-    else waitBatch backend handle
-
-sendBatchDescriptorAsync
-  :: Backend be
-  => be
-  -> Thrift.Repo
-  -> Thrift.BatchDescriptor
-  -> IO Thrift.Handle
-sendBatchDescriptorAsync backend repo descriptor = do
-  let batch = Thrift.EnqueueBatch_descriptor descriptor
-  r <- try $ enqueueBatchDescriptor backend repo batch
-    Thrift.EnqueueBatchWaitPolicy_Remember
-  case r of
-    Right Thrift.EnqueueBatchResponse{..} ->
-      return enqueueBatchResponse_handle
-    Left Thrift.Retry{..} ->
-      retry retry_seconds $
-        sendBatchDescriptorAsync backend repo descriptor
-
-retry :: Double -> IO a -> IO a
-retry secs action = do
-  sleep $ max secs 1
-  action
-
-waitBatch
-  :: Backend be
-  => be
-  -> Thrift.Handle
-  -> IO Thrift.Subst
-waitBatch backend handle = do
-  e <- try $ pollBatch backend handle
-  case e of
-    Left Thrift.Retry{..} ->
-      retry retry_seconds $ waitBatch backend handle
-    Right r -> case r of
-      Thrift.FinishResponse_subst subst -> return subst
-      Thrift.FinishResponse_retry (Thrift.BatchRetry r) ->
-        retry r $ waitBatch backend handle
diff --git a/glean/hs/Glean/Write/SendQueue.hs b/glean/hs/Glean/Write/SendQueue.hs
deleted file mode 100644
--- a/glean/hs/Glean/Write/SendQueue.hs
+++ /dev/null
@@ -1,365 +0,0 @@
-{-
-  Copyright (c) Meta Platforms, Inc. and affiliates.
-  All rights reserved.
-
-  This source code is licensed under the BSD-style license found in the
-  LICENSE file in the root directory of this source tree.
--}
-
-module Glean.Write.SendQueue
-  ( SendQueueSettings(..)
-  , SendQueueEvent(..)
-  , SendQueue
-  , Callback
-  , withSendQueue
-  , writeSendQueue
-  , writeSendQueueJson
-  , writeSendQueueDescriptor
-  ) where
-
-import qualified Control.Concurrent.Async as Async
-import Control.Exception
-import Control.Monad
-import qualified Data.ByteString as BS
-import Data.Default
-import System.Time.Extra (sleep)
-import Text.Printf (printf)
-
-import Util.Control.Exception (tryBracket)
-import Util.Log.String
-import Util.STM
-import Util.Time
-
-import Glean.Backend.Types (Backend)
-import Glean.Backend.Retry
-import qualified Glean.Backend.Types as Backend
-import qualified Glean.Types as Thrift
-import Glean.Write.SendBatch
-import Glean.Util.RetryChannelException
-
-
--- | An event that happens in a 'SendQueue' and can be logged
-data SendQueueEvent
-  = -- | Started sending a batch
-    SendQueueSending Thrift.Batch
-
-    -- | Started sending a JSON batch
-  | SendQueueSendingJson [Thrift.JsonFactBatch]
-
-    -- | Started sending a batch descriptor
-  | SendQueueSendingDescriptor Thrift.BatchDescriptor
-
-    -- | Finished sending a batch
-  | SendQueueSent
-      Int -- batch size
-      DiffTimePoints -- time taken
-
-    -- | Finished sending all batches and shutting down
-  | SendQueueFinished
-
-    -- | Sending failed
-  | SendQueueFailed SomeException
-
-
-data QueueStatus
-  = Open
-  | Closed
-  | Failed SomeException
-
--- | When the send operation fails or is completed this is called once.
-type Callback = Either SomeException Thrift.Subst -> STM ()
-
--- | The GleanService can return a Handle for an async operation, and the
--- client can later poll to determine the actual result/retry/error.
-data Wait = Wait
-  { waitHandle :: !Thrift.Handle  -- ^ handle from GleanService
-  , waitStart :: !TimePoint  -- ^ When this 'Wait' was constructed
-  , waitCallback :: !Callback  -- ^ use-once callback with result.
-  , waitOriginalBatch :: !Batch  -- ^ the batch, so we can resend it
-  }
-
-data Batch
-  = BinaryBatch Thrift.Batch
-  | JsonBatch !Int {- size -} [Thrift.JsonFactBatch]
-  | BatchDescriptor Thrift.BatchDescriptor
-
-batchSize :: Batch -> Int
-batchSize (BinaryBatch bin) = BS.length $ Thrift.batch_facts bin
-batchSize (JsonBatch sz _) = sz
-batchSize (BatchDescriptor _) = 0
-
-data SendQueue = SendQueue
-  { -- | Batches we haven't sent yet
-    sqOutQueue :: TQueue (Batch, Callback)
-
-    -- | Batches we've sent and are now waiting for the server to commit
-  , sqWaitQueue :: TQueue Wait
-
-    -- | Memory used by batches in sqOutQueue and sqWaitQueue
-  , sqMemory :: TVar Int
-
-    -- | Number of batches in flight (in sqOutQueue and sqWaitQueue)
-  , sqCount :: TVar Int
-
-    -- | Limit on sqMemory
-  , sqMaxMemory :: Int
-
-    -- | Limit on sqCount
-  , sqMaxCount :: Int
-
-    -- | Queue status
-  , sqStatus :: TVar QueueStatus
-  }
-
-data WriteQueueClosed = WriteQueueClosed deriving(Show)
-instance Exception WriteQueueClosed
-
-newSendQueue :: Int -> Int -> IO SendQueue
-newSendQueue max_mem max_count = SendQueue
-  <$> newTQueueIO
-  <*> newTQueueIO
-  <*> newTVarIO 0
-  <*> newTVarIO 0
-  <*> pure max_mem
-  <*> pure max_count
-  <*> newTVarIO Open
-
-releaseBatch :: SendQueue -> Int -> STM ()
-releaseBatch sq size = do
-  modifyTVar' (sqCount sq) $ \n -> n - 1
-  modifyTVar' (sqMemory sq) $ \n -> n - size
-
-acquireBatch :: SendQueue -> Int -> STM ()
-acquireBatch sq size = do
-  mem <- readTVar $ sqMemory sq
-  count <- readTVar $ sqCount sq
-  when (mem > sqMaxMemory sq || count > sqMaxCount sq) retry
-  writeTVar (sqMemory sq) $! mem + size
-  writeTVar (sqCount sq) $! count + 1
-
-writeSendQueue :: SendQueue -> Thrift.Batch -> Callback -> STM ()
-writeSendQueue sq batch callback =
-  writeSendQueue_ sq (BinaryBatch batch) callback
-
-writeSendQueueJson :: SendQueue -> [Thrift.JsonFactBatch] -> Callback -> STM ()
-writeSendQueueJson sq json callback =
-  writeSendQueue_ sq (JsonBatch size json) callback
-  where
-  -- size is approximate for JSON
-  size = sum (map jsonFactBatchSize json)
-  jsonFactBatchSize Thrift.JsonFactBatch{..} =
-    sum (map BS.length jsonFactBatch_facts) +
-    maybe 0 BS.length jsonFactBatch_unit
-
-writeSendQueueDescriptor
-  :: SendQueue
-  -> Thrift.BatchDescriptor
-  -> Callback
-  -> STM ()
-writeSendQueueDescriptor sq descriptor callback =
-  writeSendQueue_ sq (BatchDescriptor descriptor) callback
-
-writeSendQueue_ :: SendQueue -> Batch -> Callback -> STM ()
-writeSendQueue_ sq batch callback = do
-  status <- readTVar $ sqStatus sq
-  case status of
-    Open -> return ()
-    Closed -> throwSTM WriteQueueClosed
-    Failed exc -> throwSTM exc
-  let !size = batchSize batch
-  acquireBatch sq size
-  writeTQueue (sqOutQueue sq) (batch, callback)
-
-closeSendQueue :: SendQueue -> STM ()
-closeSendQueue sq = do
-  status <- readTVar $ sqStatus sq
-  case status of
-    Open -> writeTVar (sqStatus sq) Closed
-    Closed -> return ()
-    Failed exc -> throwSTM exc
-
-failSendQueue :: SendQueue -> SomeException -> STM ()
-failSendQueue sq exc = do
-  writeTVar (sqStatus sq) $ Failed exc
-  xs <- map waitCallback <$> flushTQueue (sqWaitQueue sq)
-  ys <- map snd <$> flushTQueue (sqOutQueue sq)
-  mapM_ ($ Left exc) (xs ++ ys)
-
-readSendQueue :: SendQueue -> STM (Maybe (Batch, Callback))
-readSendQueue sq = do
-  status <- readTVar $ sqStatus sq
-  case status of
-    Open -> get
-    Closed -> do
-      -- Don't exit the sendFromQueue until all batches are safely
-      -- written. We might have to resend batches if the server
-      -- forgets them.
-      count <- readTVar $ sqCount sq
-      if count /= 0 then get else return Nothing
-    Failed exc -> throwSTM exc
-  where
-    get = do
-      (batch, callback) <- readTQueue $ sqOutQueue sq
-      return $ Just (batch, callback)
-
-readWaitQueue :: SendQueue -> STM (Maybe Wait)
-readWaitQueue sq = do
-  status <- readTVar $ sqStatus sq
-  case status of
-    Open -> get
-    Closed -> do
-      -- NOTE: There can still be outstanding batches even if both queues are
-      -- empty - sendFromQueue might be writing one.
-      count <- readTVar $ sqCount sq
-      if count /= 0 then get else return Nothing
-    Failed exc -> throwSTM exc
-  where
-    get = Just <$> readTQueue (sqWaitQueue sq)
-
-pollFromWaitQueue
-  :: Backend.Backend e => e -> SendQueueSettings -> SendQueue -> IO ()
-pollFromWaitQueue backend settings sq = do
-  cont <- tryBracket
-    (atomically $ readWaitQueue sq)
-    (\r ex -> case (ex,r) of
-      (Left exc, Just wait) -> do
-        logWarning $ "Thread killed: " <> show exc
-        atomically $ do
-          waitCallback wait $ Left exc
-          failSendQueue sq exc
-        sendQueueLog settings $ SendQueueFailed exc
-      _ -> return ())
-    $ \r ->
-    case r of
-      Just Wait{..} -> do
-        result <- try $ waitBatch backend waitHandle
-        let !size = batchSize waitOriginalBatch
-        case result of
-          Left e@Thrift.UnknownBatchHandle{} -> do
-            logWarning $ "Server forgot batch; resending (" <> show e <> ")"
-            atomically $ do
-              -- don't writeSendQueue; retries should work even if the
-              -- queue is in the Closed state and shutting down
-              writeTQueue (sqOutQueue sq) (waitOriginalBatch, waitCallback)
-              return True
-          Right subst -> do
-            atomically $ do
-              waitCallback $ Right subst
-              releaseBatch sq size
-            elapsed <- getElapsedTime waitStart
-            sendQueueLog settings $ SendQueueSent size elapsed
-            return True
-
-      Nothing -> return False
-
-  when cont $ pollFromWaitQueue backend settings sq
-
-sendFromQueue
-  :: Backend.Backend e
-  => e
-  -> Thrift.Repo
-  -> SendQueueSettings
-  -> SendQueue
-  -> IO ()
-sendFromQueue backend repo settings sq = do
-  cont <- tryBracket
-    (atomically $ readSendQueue sq)
-    (\r ex -> case (ex,r) of
-      (Left exc, Just (_, callback)) -> do
-        logWarning $ "Thread killed: " <> show exc
-        atomically $ do
-          callback $ Left exc
-          failSendQueue sq exc
-        sendQueueLog settings $ SendQueueFailed exc
-      _ -> return ())
-    $ \r ->
-    case r of
-      Just (batch, callback) -> do
-        sendQueueLog settings $ case batch of
-          BinaryBatch bin -> SendQueueSending bin
-          JsonBatch _ json -> SendQueueSendingJson json
-          BatchDescriptor descriptor -> SendQueueSendingDescriptor descriptor
-        start <- getTimePoint
-        handle <- case batch of
-          BinaryBatch bin -> sendBatchAsync backend repo bin
-          JsonBatch _ json -> sendJsonBatchAsync backend repo json Nothing
-          BatchDescriptor descriptor
-            -> sendBatchDescriptorAsync backend repo descriptor
-        atomically $ writeTQueue (sqWaitQueue sq) Wait
-          { waitHandle = handle
-          , waitStart = start
-          , waitCallback = callback
-          , waitOriginalBatch = batch
-          }
-        return True
-
-      Nothing -> return False
-  when cont $ sendFromQueue backend repo settings sq
-
--- | Settings for a 'SendQueue'
-data SendQueueSettings = SendQueueSettings
-  { -- | Max memory that the send queue should occupy (soft limit)
-    sendQueueMaxMemory :: !Int
-
-    -- | Max number of batches that the queue should hold
-  , sendQueueMaxBatches :: !Int
-
-    -- | Number of threads to use for sending
-  , sendQueueThreads :: !Int
-
-    -- | A function called whenever a 'SendQueueEvent' occurs
-  , sendQueueLog :: SendQueueEvent -> IO ()
-
-    -- | How to retry failures
-  , sendQueueRetry :: RetryPolicy
-
-    -- | Optionally log stats every 10s
-  , sendQueueLogStats :: Bool
-  }
-
-instance Show SendQueueSettings where
-  show _ = "SendQueueSettings{}"
-
-instance Default SendQueueSettings where
-  def = SendQueueSettings
-    { sendQueueMaxMemory = 1000000000
-    , sendQueueMaxBatches = 10000
-    , sendQueueThreads = 1
-    , sendQueueLog = const $ return ()
-    , sendQueueRetry = defaultRetryPolicy
-    , sendQueueLogStats = False
-    }
-
-withSendQueue
-  :: Backend e
-  => e
-  -> Thrift.Repo
-  -> SendQueueSettings
-  -> (SendQueue -> IO a)
-  -> IO a
-withSendQueue backend repo settings@SendQueueSettings{..} action =
-  mask $ \restore -> do
-    q <- newSendQueue sendQueueMaxMemory sendQueueMaxBatches
-    let retryBackend = backendRetryWrites backend sendQueueRetry
-    withStats sendQueueLogStats q $ do
-      snd <$> Async.concurrently
-        (Async.mapConcurrently_ id
-          $ restore (pollFromWaitQueue retryBackend settings q)
-          : replicate
-              sendQueueThreads
-              (restore (sendFromQueue retryBackend repo settings q)))
-        (restore (action q)
-          `finally` atomically (closeSendQueue q))
-
-withStats :: Bool -> SendQueue -> IO a -> IO a
-withStats on SendQueue{..} act = do
-  verbose <- vlogIsOn 1
-  if on || verbose
-    then Async.withAsync (forever $ logQueueStats >> sleep 10) $ \_ -> act
-    else act
-  where
-  logQueueStats = do
-    count <- readTVarIO sqCount
-    memory <- readTVarIO sqMemory
-    logInfo $ printf "count:%d/%d memory:%d/%d"
-      count sqMaxCount memory sqMaxMemory
diff --git a/glean/if/index/gen-hs2/Glean/Index/GleanIndexingService/Client.hs b/glean/if/index/gen-hs2/Glean/Index/GleanIndexingService/Client.hs
--- a/glean/if/index/gen-hs2/Glean/Index/GleanIndexingService/Client.hs
+++ b/glean/if/index/gen-hs2/Glean/Index/GleanIndexingService/Client.hs
@@ -30,6 +30,8 @@
 import qualified Data.Int as Int
 import qualified Data.List as List
 import qualified Data.Proxy as Proxy
+import qualified Facebook.Thrift.Annotation.Thrift.Thrift.Types
+       as Facebook.Thrift.Annotation.Thrift.Thrift
 import qualified Glean.GleanService.Client as GleanService
 import qualified Glean.Types as Glean
 import qualified Prelude as Prelude
diff --git a/glean/if/index/gen-hs2/Glean/Index/GleanIndexingService/Service.hs b/glean/if/index/gen-hs2/Glean/Index/GleanIndexingService/Service.hs
--- a/glean/if/index/gen-hs2/Glean/Index/GleanIndexingService/Service.hs
+++ b/glean/if/index/gen-hs2/Glean/Index/GleanIndexingService/Service.hs
@@ -26,6 +26,8 @@
 import qualified Data.Map.Strict as Map
 import qualified Data.Proxy as Proxy
 import qualified Data.Text as Text
+import qualified Facebook.Thrift.Annotation.Thrift.Thrift.Types
+       as Facebook.Thrift.Annotation.Thrift.Thrift
 import qualified Glean.GleanService.Service as GleanService
 import qualified Glean.Index.Types as Types
 import qualified Glean.Types as Glean
diff --git a/glean/if/index/gen-hs2/Glean/Index/Types.hs b/glean/if/index/gen-hs2/Glean/Index/Types.hs
--- a/glean/if/index/gen-hs2/Glean/Index/Types.hs
+++ b/glean/if/index/gen-hs2/Glean/Index/Types.hs
@@ -41,6 +41,8 @@
 import qualified Data.Ord as Ord
 import qualified Data.Text as Text
 import qualified Data.Text.Encoding as Text
+import qualified Facebook.Thrift.Annotation.Thrift.Thrift.Types
+       as Facebook.Thrift.Annotation.Thrift.Thrift
 import qualified Glean.Types as Glean
 import qualified Prelude as Prelude
 import qualified Thrift.Binary.Parser as Parser
diff --git a/glean/if/internal/gen-hs2/Glean/Internal/Types.hs b/glean/if/internal/gen-hs2/Glean/Internal/Types.hs
--- a/glean/if/internal/gen-hs2/Glean/Internal/Types.hs
+++ b/glean/if/internal/gen-hs2/Glean/Internal/Types.hs
@@ -18,9 +18,10 @@
         DatabaseIncomplete(DatabaseIncomplete),
         DatabaseFinalizing(DatabaseFinalizing),
         Completeness(Incomplete, Complete, Broken, Finalizing),
+        StorageName(StorageName, unStorageName),
         Meta(Meta, metaVersion, metaCreated, metaCompleteness, metaBackup,
              metaProperties, metaDependencies, metaCompletePredicates,
-             metaAxiomComplete, metaRepoHashTime),
+             metaAxiomComplete, metaRepoHashTime, metaStorage),
         SchemaInstance(SchemaInstance, schemaInstance_versions,
                        schemaInstance_file),
         SchemaIndex(SchemaIndex, schemaIndex_current, schemaIndex_older),
@@ -43,6 +44,8 @@
 import qualified Data.Ord as Ord
 import qualified Data.Text as Text
 import qualified Data.Text.Encoding as Text
+import qualified Facebook.Thrift.Annotation.Thrift.Thrift.Types
+       as Facebook.Thrift.Annotation.Thrift.Thrift
 import qualified Glean.ServerConfig.Types as Glean.ServerConfig
 import qualified Glean.Types as Glean
 import qualified Prelude as Prelude
@@ -342,6 +345,16 @@
     = Hashable.hashWithSalt __salt
         (Hashable.hashWithSalt 5 _finalizing)
 
+newtype StorageName = StorageName{unStorageName :: Text.Text}
+                      deriving (Prelude.Eq, Prelude.Show, DeepSeq.NFData, Prelude.Ord)
+
+instance Hashable.Hashable StorageName where
+  hashWithSalt __salt (StorageName __val)
+    = Hashable.hashWithSalt __salt __val
+
+instance Aeson.ToJSON StorageName where
+  toJSON (StorageName __val) = Aeson.toJSON __val
+
 data Meta = Meta{metaVersion :: Glean.ServerConfig.DBVersion,
                  metaCreated :: Glean.PosixEpochTime,
                  metaCompleteness :: Completeness,
@@ -350,7 +363,8 @@
                  metaDependencies :: Prelude.Maybe Glean.Dependencies,
                  metaCompletePredicates :: [Glean.PredicateRef],
                  metaAxiomComplete :: Prelude.Bool,
-                 metaRepoHashTime :: Prelude.Maybe Glean.PosixEpochTime}
+                 metaRepoHashTime :: Prelude.Maybe Glean.PosixEpochTime,
+                 metaStorage :: StorageName}
             deriving (Prelude.Eq, Prelude.Show)
 
 instance Aeson.ToJSON Meta where
@@ -359,7 +373,7 @@
        __field__metaCompleteness __field__metaBackup
        __field__metaProperties __field__metaDependencies
        __field__metaCompletePredicates __field__metaAxiomComplete
-       __field__metaRepoHashTime)
+       __field__metaRepoHashTime __field__metaStorage)
     = Aeson.object
         ("metaVersion" .=
            Glean.ServerConfig.unDBVersion __field__metaVersion
@@ -375,7 +389,8 @@
                          "metaAxiomComplete" .= __field__metaAxiomComplete :
                            Prelude.maybe Prelude.id ((:) . ("metaRepoHashTime" .=))
                              (Prelude.fmap Glean.unPosixEpochTime __field__metaRepoHashTime)
-                             Prelude.mempty)))
+                             ("metaStorage" .= unStorageName __field__metaStorage :
+                                Prelude.mempty))))
 
 instance Thrift.ThriftStruct Meta where
   buildStruct _proxy
@@ -383,7 +398,7 @@
        __field__metaCompleteness __field__metaBackup
        __field__metaProperties __field__metaDependencies
        __field__metaCompletePredicates __field__metaAxiomComplete
-       __field__metaRepoHashTime)
+       __field__metaRepoHashTime __field__metaStorage)
     = Thrift.genStruct _proxy
         (Thrift.genField _proxy "metaVersion" (Thrift.getI64Type _proxy) 1
            0
@@ -446,16 +461,27 @@
                              Thrift.genFieldBool _proxy "metaAxiomComplete" 8 7
                                __field__metaAxiomComplete
                                :
-                               case __field__metaRepoHashTime of
-                                 Prelude.Just _val -> Thrift.genField _proxy "metaRepoHashTime"
-                                                        (Thrift.getI64Type _proxy)
-                                                        9
-                                                        8
-                                                        ((Thrift.genI64 _proxy .
-                                                            Glean.unPosixEpochTime)
-                                                           _val)
-                                                        : []
-                                 Prelude.Nothing -> [])))
+                               let (__cereal__metaRepoHashTime, __id__metaRepoHashTime)
+                                     = case __field__metaRepoHashTime of
+                                         Prelude.Just _val -> ((:)
+                                                                 (Thrift.genField _proxy
+                                                                    "metaRepoHashTime"
+                                                                    (Thrift.getI64Type _proxy)
+                                                                    9
+                                                                    8
+                                                                    ((Thrift.genI64 _proxy .
+                                                                        Glean.unPosixEpochTime)
+                                                                       _val)),
+                                                               9)
+                                         Prelude.Nothing -> (Prelude.id, 8)
+                                 in
+                                 __cereal__metaRepoHashTime
+                                   (Thrift.genField _proxy "metaStorage"
+                                      (Thrift.getStringType _proxy)
+                                      10
+                                      __id__metaRepoHashTime
+                                      ((Thrift.genText _proxy . unStorageName) __field__metaStorage)
+                                      : []))))
   parseStruct _proxy
     = ST.runSTT
         (do Prelude.return ()
@@ -470,6 +496,7 @@
             __field__metaCompletePredicates <- ST.newSTRef Default.def
             __field__metaAxiomComplete <- ST.newSTRef Prelude.False
             __field__metaRepoHashTime <- ST.newSTRef Prelude.Nothing
+            __field__metaStorage <- ST.newSTRef (StorageName "")
             let
               _parse _lastId
                 = do _fieldBegin <- Trans.lift
@@ -574,6 +601,17 @@
                                                                         ST.writeSTRef
                                                                           __field__metaRepoHashTime
                                                                           (Prelude.Just _val)
+                                                                 10 | _type ==
+                                                                        Thrift.getStringType _proxy
+                                                                      ->
+                                                                      do !_val <- Trans.lift
+                                                                                    (Prelude.fmap
+                                                                                       StorageName
+                                                                                       (Thrift.parseText
+                                                                                          _proxy))
+                                                                         ST.writeSTRef
+                                                                           __field__metaStorage
+                                                                           _val
                                                                  _ -> Trans.lift
                                                                         (Thrift.parseSkip _proxy
                                                                            _type
@@ -596,6 +634,8 @@
                                                                             __field__metaAxiomComplete
                                              !__val__metaRepoHashTime <- ST.readSTRef
                                                                            __field__metaRepoHashTime
+                                             !__val__metaStorage <- ST.readSTRef
+                                                                      __field__metaStorage
                                              Prelude.pure
                                                (Meta __val__metaVersion __val__metaCreated
                                                   __val__metaCompleteness
@@ -604,13 +644,14 @@
                                                   __val__metaDependencies
                                                   __val__metaCompletePredicates
                                                   __val__metaAxiomComplete
-                                                  __val__metaRepoHashTime)
+                                                  __val__metaRepoHashTime
+                                                  __val__metaStorage)
               _idMap
                 = HashMap.fromList
                     [("metaVersion", 1), ("metaCreated", 2), ("metaCompleteness", 3),
                      ("metaBackup", 4), ("metaProperties", 5), ("metaDependencies", 6),
                      ("metaCompletePredicates", 7), ("metaAxiomComplete", 8),
-                     ("metaRepoHashTime", 9)]
+                     ("metaRepoHashTime", 9), ("metaStorage", 10)]
             _parse 0)
 
 instance DeepSeq.NFData Meta where
@@ -619,7 +660,7 @@
        __field__metaCompleteness __field__metaBackup
        __field__metaProperties __field__metaDependencies
        __field__metaCompletePredicates __field__metaAxiomComplete
-       __field__metaRepoHashTime)
+       __field__metaRepoHashTime __field__metaStorage)
     = DeepSeq.rnf __field__metaVersion `Prelude.seq`
         DeepSeq.rnf __field__metaCreated `Prelude.seq`
           DeepSeq.rnf __field__metaCompleteness `Prelude.seq`
@@ -628,7 +669,8 @@
                 DeepSeq.rnf __field__metaDependencies `Prelude.seq`
                   DeepSeq.rnf __field__metaCompletePredicates `Prelude.seq`
                     DeepSeq.rnf __field__metaAxiomComplete `Prelude.seq`
-                      DeepSeq.rnf __field__metaRepoHashTime `Prelude.seq` ()
+                      DeepSeq.rnf __field__metaRepoHashTime `Prelude.seq`
+                        DeepSeq.rnf __field__metaStorage `Prelude.seq` ()
 
 instance Default.Default Meta where
   def
@@ -641,12 +683,13 @@
         Default.def
         Prelude.False
         Prelude.Nothing
+        (StorageName "")
 
 instance Hashable.Hashable Meta where
   hashWithSalt __salt
     (Meta _metaVersion _metaCreated _metaCompleteness _metaBackup
        _metaProperties _metaDependencies _metaCompletePredicates
-       _metaAxiomComplete _metaRepoHashTime)
+       _metaAxiomComplete _metaRepoHashTime _metaStorage)
     = Hashable.hashWithSalt
         (Hashable.hashWithSalt
            (Hashable.hashWithSalt
@@ -654,17 +697,19 @@
                  (Hashable.hashWithSalt
                     (Hashable.hashWithSalt
                        (Hashable.hashWithSalt
-                          (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _metaVersion)
-                             _metaCreated)
-                          _metaCompleteness)
-                       _metaBackup)
-                    ((List.sort .
-                        Prelude.map (\ (_k, _v) -> (_k, _v)) . HashMap.toList)
-                       _metaProperties))
-                 _metaDependencies)
-              _metaCompletePredicates)
-           _metaAxiomComplete)
-        _metaRepoHashTime
+                          (Hashable.hashWithSalt
+                             (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _metaVersion)
+                                _metaCreated)
+                             _metaCompleteness)
+                          _metaBackup)
+                       ((List.sort .
+                           Prelude.map (\ (_k, _v) -> (_k, _v)) . HashMap.toList)
+                          _metaProperties))
+                    _metaDependencies)
+                 _metaCompletePredicates)
+              _metaAxiomComplete)
+           _metaRepoHashTime)
+        _metaStorage
 
 instance Ord.Ord Meta where
   compare __a __b
@@ -719,11 +764,20 @@
                                                                                             of
                                                                                             Ord.LT -> Ord.LT
                                                                                             Ord.GT -> Ord.GT
-                                                                                            Ord.EQ -> Ord.compare
-                                                                                                        (metaRepoHashTime
-                                                                                                           __a)
-                                                                                                        (metaRepoHashTime
-                                                                                                           __b)
+                                                                                            Ord.EQ -> case
+                                                                                                        Ord.compare
+                                                                                                          (metaRepoHashTime
+                                                                                                             __a)
+                                                                                                          (metaRepoHashTime
+                                                                                                             __b)
+                                                                                                        of
+                                                                                                        Ord.LT -> Ord.LT
+                                                                                                        Ord.GT -> Ord.GT
+                                                                                                        Ord.EQ -> Ord.compare
+                                                                                                                    (metaStorage
+                                                                                                                       __a)
+                                                                                                                    (metaStorage
+                                                                                                                       __b)
 
 data SchemaInstance = SchemaInstance{schemaInstance_versions ::
                                      Map.Map Text.Text Glean.Version,
diff --git a/glean/index/Glean/Indexer/External.hs b/glean/index/Glean/Indexer/External.hs
--- a/glean/index/Glean/Indexer/External.hs
+++ b/glean/index/Glean/Indexer/External.hs
@@ -80,6 +80,7 @@
   , extArgs :: [String]
   , extFlavour :: Flavour
   , extDerivePredicates :: [Text]
+  , extAllowNonZeroExit :: Bool
   }
 
 extOptions :: O.Parser Ext
@@ -105,6 +106,9 @@
     O.strOption $
     O.long "derive" <> O.metavar "PREDICATE,PREDICATE,..." <>
     O.help "predicates to derive after writing facts (ordered)"
+  extAllowNonZeroExit <-
+    O.switch $ O.long "allow-non-zero-exit" <>
+    O.help "allow the binary to exit with a non-zero exit code"
   return Ext{..}
 
 -- | Finish decoding parameters from @glean_test@ by
@@ -132,12 +136,13 @@
   -- language indexers that build on External.
   maxConcurrency = 20 :: Int
 
+  run = if extAllowNonZeroExit then void . system else callCommand
   index = case extFlavour of
     Json -> do
       jsonBatchDir <- createTempDirectory indexerOutput "glean-json"
       let jsonVars = HashMap.insert "JSON_BATCH_DIR" jsonBatchDir vars
-      callCommand
-        (unwords (extRunScript : map (quoteArg . subst jsonVars) extArgs))
+      let cmdLine = unwords (extRunScript : map (quoteArg . subst jsonVars) extArgs)
+      run cmdLine
       files <- listDirectoryRecursive jsonBatchDir
       stream maxConcurrency (forM_ files) $ \file -> do
         (batches, schema_id) <- fileToBatches (jsonBatchDir </> file)
@@ -149,8 +154,8 @@
       let
         go service = do
           let serverVars = HashMap.insert "GLEAN_SERVER" service vars
-          callCommand
-            (unwords (extRunScript : map (quoteArg . subst serverVars) extArgs))
+          let cmdLine = unwords (extRunScript : map (quoteArg . subst serverVars) extArgs)
+          run cmdLine
       case backendKind env of
         BackendEnv env -> do
           fb303 <- newFb303 "gleandriver"
diff --git a/glean/index/list/Glean/Indexer/List.hs b/glean/index/list/Glean/Indexer/List.hs
--- a/glean/index/list/Glean/Indexer/List.hs
+++ b/glean/index/list/Glean/Indexer/List.hs
@@ -21,6 +21,7 @@
 
 import Glean.Indexer
 import qualified Glean.Indexer.Cpp as Cpp
+import qualified Glean.Indexer.Erlang as Erlang
 import qualified Glean.Indexer.External as External
 import qualified Glean.Indexer.Flow as Flow
 import qualified Glean.Indexer.Hack as Hack
@@ -28,6 +29,7 @@
 import qualified Glean.Indexer.Buck as Buck
 import qualified Glean.Indexer.Fbthrift as Fbthrift
 import qualified Glean.Indexer.Python as Python
+import qualified Glean.Indexer.PythonPyrefly as PythonPyrefly
 import qualified Glean.Indexer.Yaml as Yaml
 #endif
 import qualified Glean.Indexer.Go as Go
@@ -41,12 +43,15 @@
 import qualified Glean.Indexer.Haskell as Hs
 import qualified Glean.Indexer.PythonScip as PythonScip
 import qualified Glean.Indexer.DotnetScip as DotnetScip
+import qualified Glean.Indexer.Angle as Angle
 
 data SomeIndexer = forall opts . SomeIndexer (Indexer opts)
 
 indexers :: [SomeIndexer]
 indexers =
-  [ SomeIndexer Cpp.indexer
+  [ SomeIndexer Angle.indexer
+  , SomeIndexer Cpp.indexer
+  , SomeIndexer Erlang.indexer
   , SomeIndexer External.externalIndexer
   , SomeIndexer Flow.indexer
   , SomeIndexer Hack.indexer
@@ -54,6 +59,7 @@
   , SomeIndexer Buck.indexer
   , SomeIndexer Fbthrift.indexer
   , SomeIndexer Python.indexer
+  , SomeIndexer PythonPyrefly.indexer
   , SomeIndexer Yaml.indexer
 #endif
   , SomeIndexer Hs.indexer
diff --git a/glean/lang/angle/Glean/Indexer/Angle.hs b/glean/lang/angle/Glean/Indexer/Angle.hs
new file mode 100644
--- /dev/null
+++ b/glean/lang/angle/Glean/Indexer/Angle.hs
@@ -0,0 +1,67 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+{-# LANGUAGE ApplicativeDo #-}
+
+module Glean.Indexer.Angle (indexer) where
+
+import Glean.Indexer
+import Glean.Indexer.External
+import Options.Applicative
+
+
+data Angle = Angle
+  { binaryPath :: FilePath
+  , repoRoot :: FilePath
+  }
+
+options :: Parser Angle
+options =
+  Angle
+    <$> strOption
+      ( long "indexer-binary"
+          <> metavar "PATH"
+          <> showDefault
+          <> help "path to the indexer binary"
+      )
+    <*> strOption
+      ( long "repo-root"
+          <> metavar "PATH"
+          <> showDefault
+          <> help "path to the repo root"
+      )
+
+indexer :: Indexer Angle
+indexer =
+  Indexer
+    { indexerShortName = "angle"
+    , indexerDescription = "Index Angle code"
+    , indexerOptParser = options
+    , indexerRun = \Angle {..} -> do
+        let ext =
+              Ext
+                { extRunScript = binaryPath
+                , extFlavour = Server
+                , extArgs =
+                    [ "index",
+                      "--service"
+                    , "${GLEAN_SERVER}"
+                    , "--db"
+                    , "${TEST_REPO_NAME}/${TEST_REPO_HASH}"
+                    , "--repo-path"
+                    , repoRoot
+                    , "--dir"
+                    ,"${TEST_ROOT}"
+                    ]
+                , extDerivePredicates =
+                  ["anglelang.TargetUses"
+                  , "search.anglelang.NameLowerCase"]
+                , extAllowNonZeroExit = False
+                }
+        indexerRun externalIndexer ext
+    }
diff --git a/glean/lang/clang/Derive/Lib.hs b/glean/lang/clang/Derive/Lib.hs
--- a/glean/lang/clang/Derive/Lib.hs
+++ b/glean/lang/clang/Derive/Lib.hs
@@ -10,6 +10,7 @@
   ( dispatchDerive
   , allPredicates
   , allManualPasses
+  , allCxxPasses
   , DerivePass(..)
   , optionsPasses
   ) where
@@ -69,6 +70,44 @@
   , DeriveFunctionCalls_Pass_2
   ]
 
+--
+-- Standard things we need to derive (also Glass) for full code search/nav
+--
+allCxxPasses :: [DerivePass]
+allCxxPasses =
+  allManualPasses <>
+  [DeriveGeneric "cxx1.FunctionDeclAttribute"
+  ,DeriveGeneric "cxx1.DeclarationToUSR"
+  ,DeriveGeneric "cxx1.RecordDerived"
+  ,DeriveGeneric "cxx1.ThriftToCxx"
+  -- name search
+  ,DeriveGeneric "cxx1.EnumDeclarationByName"
+  ,DeriveGeneric "cxx1.EnumeratorByName"
+  ,DeriveGeneric "cxx1.FunctionDeclarationByNameScope"
+  ,DeriveGeneric "cxx1.NamespaceDeclarationByName"
+  ,DeriveGeneric "cxx1.ObjcContainerDeclarationInterface"
+  ,DeriveGeneric "cxx1.RecordDeclarationClass"
+  ,DeriveGeneric "cxx1.RecordDeclarationStruct"
+  ,DeriveGeneric "cxx1.RecordDeclarationUnion"
+  ,DeriveGeneric "cxx1.TypeAliasDeclarationByName"
+  ,DeriveGeneric "cxx1.VariableDeclarationNonLocalByName"
+  -- lowercase name search
+  ,DeriveGeneric "pp1.DefineLowerCase"
+  ,DeriveGeneric "cxx1.EnumLowerCase"
+  ,DeriveGeneric "cxx1.EnumeratorLowerCase"
+  ,DeriveGeneric "cxx1.FunctionLowerCase"
+  ,DeriveGeneric "cxx1.NamespaceLowerCase"
+  ,DeriveGeneric "cxx1.ObjcContainerInterfaceLowerCase"
+  ,DeriveGeneric "cxx1.RecordClassLowerCase"
+  ,DeriveGeneric "cxx1.RecordStructLowerCase"
+  ,DeriveGeneric "cxx1.RecordUnionLowerCase"
+  ,DeriveGeneric "cxx1.TypeAliasLowerCase"
+  ,DeriveGeneric "cxx1.VariableLowerCase"
+  -- objc
+  ,DeriveGeneric "cxx1.ObjcContainerInheritance"
+  ,DeriveGeneric "cxx1.ObjcInterfaceToImplementation"
+  ]
+
 optionsPasses :: O.Parser (Set DerivePass)
 optionsPasses =
   -- With no flags, we run all the derive passes. If you specify
@@ -85,4 +124,4 @@
           )
       ])
     <|>
-      pure allManualPasses
+      pure allCxxPasses
diff --git a/glean/lang/clang/Glean/Indexer/Cpp.hs b/glean/lang/clang/Glean/Indexer/Cpp.hs
--- a/glean/lang/clang/Glean/Indexer/Cpp.hs
+++ b/glean/lang/clang/Glean/Indexer/Cpp.hs
@@ -16,6 +16,8 @@
 import Control.Exception
 import Control.Monad
 import qualified Data.ByteString as BS
+import Data.List
+import Data.Maybe
 import Data.Proxy
 import Options.Applicative
 import qualified System.Console.ANSI as ANSI
@@ -41,7 +43,7 @@
 #endif
 
 import Glean
-  ( sendBatch
+  ( sendBatchAndWait
   , clientConfig_serv
   , showRepo
   , completePredicates
@@ -64,9 +66,13 @@
       -- ^ (optional) path to pre-existing @compile_commands.json@
   , clangTarget       :: Maybe String -- ^ (optional) target to index
   , clangJobs         :: Int -- ^ number of indexers to run concurrently
+  , clangBatch        :: Int -- ^ dump indexer output every N files
   , clangVerbose      :: Bool -- ^ display debugging information
   , clangProgress     :: Bool -- ^ display indexing progress
+  , clangCmakeOpts    :: [String] -- ^ extra flags to cmake
   , clangIncremental  :: Bool -- ^ use incremental derivation
+  , clangOutDir       :: Maybe FilePath -- ^ where to put output files
+  , clangSkipIndexing :: Bool -- ^ use existing indexer output files
   } deriving Show
 
 options :: Parser Clang
@@ -88,6 +94,11 @@
     long "jobs" <>
     value 1 <>
     help "run N indexers in parallel"
+  clangBatch <- option auto $
+    short 'n' <>
+    long "batch" <>
+    value 100 <>
+    help "index files in batches of N"
   clangVerbose <- switch $
     short 'v' <>
     long "verbose" <>
@@ -95,6 +106,17 @@
   clangProgress <- switch $
     long "progress" <>
     help "Display indexing progress even in verbose mode"
+  clangCmakeOpts <- many $ strOption $
+    long "cmake-opt" <>
+    help "Extra flag to pass to cmake"
+  clangOutDir <- optional $ strOption $
+    long "out" <>
+    metavar "DIR" <>
+    help "Directory to save indexer output"
+  clangSkipIndexing <- switch $
+    long "skip-indexing" <>
+    help ("If indexing has already been done, " <>
+      "use the existing indexer output files. Requires --out DIR")
   clangIncremental <- pure False -- internal, not a CLI flag
   return Clang{..}
 
@@ -118,21 +140,28 @@
   indexerRun = \clang@Clang{..} backend repo IndexerParams{..} -> do
     -- indexing
     let tmpDir        = indexerOutput
+        buildDir      = indexerOutput </> "build"
+        outDir        = fromMaybe (indexerOutput </> "indexer") clangOutDir
         inventoryFile = tmpDir </> "inventory.data"
+    createDirectoryIfMissing True buildDir
+    createDirectoryIfMissing True outDir
     generateInventory backend repo inventoryFile
     compileDBDir <-
       case clangCompileDBDir of
         Nothing  ->
           case clangTarget of
-            Nothing -> cmake clangVerbose indexerRoot tmpDir >> return tmpDir
+            Nothing -> cmake clang indexerRoot buildDir >> return buildDir
             Just target -> do
               cdb <- runBuckFullCompilationDatabase target
               return $ takeDirectory cdb
         Just dir -> return dir
-    indexerData <-
-      index clang inventoryFile indexerRoot compileDBDir indexerOutput
-    writeToDB backend repo indexerData
 
+    index clang inventoryFile indexerRoot compileDBDir outDir
+
+    files <- map (outDir </>) . filter ("indexer-" `isPrefixOf`) <$>
+      listDirectory outDir
+    writeToDB backend repo files
+
     -- deriving
     when deriveToo $ do
       completePredicates backend repo $
@@ -171,12 +200,12 @@
     generateInventory backend repo outFile =
       serializeInventory backend repo >>= BS.writeFile outFile
 
-    cmake verbose srcDir tmpDir = withExe "cmake" Nothing $ \cmakeBin ->
-      spawnAndConcurrentLog verbose cmakeBin
+    cmake Clang{..} srcDir tmpDir = withExe "cmake" Nothing $ \cmakeBin ->
+      spawnAndConcurrentLog clangVerbose cmakeBin $
         [ "-DCMAKE_EXPORT_COMPILE_COMMANDS=1"
         , "-S", srcDir
         , "-B", tmpDir
-        ]
+        ] <> clangCmakeOpts
 
     index Clang{..} inventory srcDir buildDir tmpDir =
       withExe "clang-index" clangIndexBin $ \clangIndex -> do
@@ -220,13 +249,15 @@
           let dataFile i = tmpDir </> "indexer-" <> show i <> ".data"
               workerargs i = args ++
                 [ "-dump", dataFile i
+                , "-dump_every", show clangBatch
                 , "--work_file", wfile
                 , "--worker_index", show i
                 , "--worker_count", show workers
                 ]
           currentDir <- getCurrentDirectory
           let cdUp = not $ isPathPrefixOf currentDir buildDir
-          forConcurrently_ [0 .. workers-1] $ \i -> bracket
+          unless clangSkipIndexing $
+            forConcurrently_ [0 .. workers-1] $ \i -> bracket
             -- createProcess_ because we don't want the stdout/stderr handles
             -- to be closed
             (createProcess_
@@ -254,7 +285,7 @@
       dat <- BS.readFile dataFile
       case deserializeGen (Proxy :: Proxy Compact) dat of
         Left parseError -> error parseError
-        Right batch     -> sendBatch backend repo batch
+        Right batch     -> sendBatchAndWait backend repo batch
 
     derive verbose deriveBin backend repo =
       withExe "clang-derive" deriveBin $ \clangDerive -> do
diff --git a/glean/lang/clang/tests/Glean/Regression/Driver/DeriveForCodemarkup.hs b/glean/lang/clang/tests/Glean/Regression/Driver/DeriveForCodemarkup.hs
--- a/glean/lang/clang/tests/Glean/Regression/Driver/DeriveForCodemarkup.hs
+++ b/glean/lang/clang/tests/Glean/Regression/Driver/DeriveForCodemarkup.hs
@@ -8,7 +8,6 @@
 
 module Glean.Regression.Driver.DeriveForCodemarkup (
     main,
-    codemarkupDerivePasses
   ) where
 
 import Derive.Lib as Lib
@@ -18,42 +17,4 @@
 -- Derive things we will need for codemarkup.* calls
 --
 main :: IO ()
-main = testDeriver codemarkupDerivePasses
-
---
--- Standard things we need to derive (also Glass) for full code search/nav
---
-codemarkupDerivePasses :: [DerivePass]
-codemarkupDerivePasses =
-  Lib.allManualPasses ++
-  [DeriveGeneric "cxx1.FunctionDeclAttribute"
-  ,DeriveGeneric "cxx1.DeclarationToUSR"
-  ,DeriveGeneric "cxx1.RecordDerived"
-  ,DeriveGeneric "cxx1.ThriftToCxx"
-  -- name search
-  ,DeriveGeneric "cxx1.EnumDeclarationByName"
-  ,DeriveGeneric "cxx1.EnumeratorByName"
-  ,DeriveGeneric "cxx1.FunctionDeclarationByNameScope"
-  ,DeriveGeneric "cxx1.NamespaceDeclarationByName"
-  ,DeriveGeneric "cxx1.ObjcContainerDeclarationInterface"
-  ,DeriveGeneric "cxx1.RecordDeclarationClass"
-  ,DeriveGeneric "cxx1.RecordDeclarationStruct"
-  ,DeriveGeneric "cxx1.RecordDeclarationUnion"
-  ,DeriveGeneric "cxx1.TypeAliasDeclarationByName"
-  ,DeriveGeneric "cxx1.VariableDeclarationNonLocalByName"
-  -- lowercase name search
-  ,DeriveGeneric "pp1.DefineLowerCase"
-  ,DeriveGeneric "cxx1.EnumLowerCase"
-  ,DeriveGeneric "cxx1.EnumeratorLowerCase"
-  ,DeriveGeneric "cxx1.FunctionLowerCase"
-  ,DeriveGeneric "cxx1.NamespaceLowerCase"
-  ,DeriveGeneric "cxx1.ObjcContainerInterfaceLowerCase"
-  ,DeriveGeneric "cxx1.RecordClassLowerCase"
-  ,DeriveGeneric "cxx1.RecordStructLowerCase"
-  ,DeriveGeneric "cxx1.RecordUnionLowerCase"
-  ,DeriveGeneric "cxx1.TypeAliasLowerCase"
-  ,DeriveGeneric "cxx1.VariableLowerCase"
-  -- objc
-  ,DeriveGeneric "cxx1.ObjcContainerInheritance"
-  ,DeriveGeneric "cxx1.ObjcInterfaceToImplementation"
-  ]
+main = testDeriver allCxxPasses
diff --git a/glean/lang/codemarkup/tests/go/Glean/Regression/Go/Main.hs b/glean/lang/codemarkup/tests/go/Glean/Regression/Go/Main.hs
new file mode 100644
--- /dev/null
+++ b/glean/lang/codemarkup/tests/go/Glean/Regression/Go/Main.hs
@@ -0,0 +1,21 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module Glean.Regression.Go.Main ( main ) where
+
+import System.Environment
+
+import Glean.Indexer.Go as Go
+import Glean.Regression.Snapshot
+import Glean.Regression.Snapshot.Driver
+
+main :: IO ()
+main = getArgs >>= \args -> withArgs (args ++ ["--root", path]) $
+    testMain (driverFromIndexer Go.indexer)
+  where
+    path = "glean/lang/go/tests/cases"
diff --git a/glean/lang/codemarkup/tests/haskell/Main.hs b/glean/lang/codemarkup/tests/haskell/Main.hs
new file mode 100644
--- /dev/null
+++ b/glean/lang/codemarkup/tests/haskell/Main.hs
@@ -0,0 +1,23 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module Main ( main ) where
+
+import System.Environment
+
+import qualified Glean.Indexer.Haskell as Haskell ( indexer )
+import Glean.Regression.Snapshot
+import Glean.Regression.Snapshot.Driver
+
+main :: IO ()
+main = do
+  args <- getArgs
+  withArgs (["--root", path, "--with-ghc", "ghc"] <> args) $
+    testMain (driverFromIndexer Haskell.indexer)
+  where
+    path = "glean/lang/codemarkup/tests/haskell/code"
diff --git a/glean/lang/codemarkup/tests/lsif/Glean/Regression/Lsif/Main.hs b/glean/lang/codemarkup/tests/lsif/Glean/Regression/Lsif/Main.hs
new file mode 100644
--- /dev/null
+++ b/glean/lang/codemarkup/tests/lsif/Glean/Regression/Lsif/Main.hs
@@ -0,0 +1,26 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module Glean.Regression.Lsif.Main ( main ) where
+
+import System.Environment
+
+import Glean.Indexer.LSIF as Lsif
+import Glean.Regression.Snapshot
+import Glean.Regression.Snapshot.Driver
+import System.FilePath
+
+main :: IO ()
+main = getArgs >>= \args ->
+  withArgs (args ++ ["--root", path, "--input", path </> indexFile]) $
+    testMain (driverFromIndexer Lsif.indexer)
+  where
+    -- we have snapshots of all the main LSIF indexers
+    -- to spot any regression in our LSIF translator
+    path = "glean/lang/lsif/tests/cases/lsif-tsc"
+    indexFile = "lsif/dump.lsif"
diff --git a/glean/lang/codemarkup/tests/typescript/Glean/Regression/TypeScript/Main.hs b/glean/lang/codemarkup/tests/typescript/Glean/Regression/TypeScript/Main.hs
new file mode 100644
--- /dev/null
+++ b/glean/lang/codemarkup/tests/typescript/Glean/Regression/TypeScript/Main.hs
@@ -0,0 +1,21 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module Glean.Regression.TypeScript.Main ( main ) where
+
+import System.Environment
+
+import Glean.Indexer.Typescript as Typescript
+import Glean.Regression.Snapshot
+import Glean.Regression.Snapshot.Driver
+
+main :: IO ()
+main = getArgs >>= \args -> withArgs (args ++ ["--root", path]) $
+    testMain (driverFromIndexer Typescript.indexer)
+  where
+    path = "glean/lang/typescript/tests/cases"
diff --git a/glean/lang/dotnet-scip/Glean/Indexer/DotnetScip.hs b/glean/lang/dotnet-scip/Glean/Indexer/DotnetScip.hs
--- a/glean/lang/dotnet-scip/Glean/Indexer/DotnetScip.hs
+++ b/glean/lang/dotnet-scip/Glean/Indexer/DotnetScip.hs
@@ -16,7 +16,10 @@
 import Glean.Indexer.SCIP (derive)
 import Glean.SCIP.Driver as SCIP
 
-newtype DotnetScip = DotnetScip { dotnetScipBinary :: FilePath }
+data DotnetScip = DotnetScip
+    { dotnetScipBinary :: FilePath
+    , scipRustIndexer :: Maybe FilePath
+    }
 
 options :: Parser DotnetScip
 options = do
@@ -24,6 +27,9 @@
         long "scip-dotnet" <>
         value "scip-dotnet" <>
         help "path to scip-dotnet binary"
+    scipRustIndexer <- optional (strOption $
+        long "rust-indexer" <>
+        help "Path to the rust indexer binary. If not provided, uses the haskell indexer instead")
     return DotnetScip{..}
 
 indexer :: Indexer DotnetScip
@@ -35,9 +41,11 @@
             val <- SCIP.runIndexer ScipIndexerParams {
                 scipBinary = dotnetScipBinary,
                 scipArgs = const [ "index"],
+                scipOutDir = Nothing,
                 scipRoot = indexerRoot,
                 scipWritesLocal = True,
-                scipLanguage = Just SCIP.CSharp
+                scipLanguage = Just SCIP.CSharp,
+                scipRustIndexer = scipRustIndexer
             }
             sendJsonBatches backend repo (dotnetScipBinary <> "/scip") val
             derive backend repo
diff --git a/glean/lang/dotnet-scip/tests/Glean/Regression/DotnetScip/Main.hs b/glean/lang/dotnet-scip/tests/Glean/Regression/DotnetScip/Main.hs
new file mode 100644
--- /dev/null
+++ b/glean/lang/dotnet-scip/tests/Glean/Regression/DotnetScip/Main.hs
@@ -0,0 +1,21 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module Glean.Regression.DotnetScip.Main ( main ) where
+
+import System.Environment
+
+import Glean.Indexer.DotnetScip as DotnetScip
+import Glean.Regression.Snapshot
+import Glean.Regression.Snapshot.Driver
+
+main :: IO ()
+main = getArgs >>= \args -> withArgs (args ++ ["--root", path]) $
+    testMain (driverFromIndexer DotnetScip.indexer)
+  where
+    path = "glean/lang/dotnet-scip/tests/cases"
diff --git a/glean/lang/erlang/Glean/Indexer/Erlang.hs b/glean/lang/erlang/Glean/Indexer/Erlang.hs
new file mode 100644
--- /dev/null
+++ b/glean/lang/erlang/Glean/Indexer/Erlang.hs
@@ -0,0 +1,79 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+{-# LANGUAGE ApplicativeDo #-}
+module Glean.Indexer.Erlang ( indexer ) where
+
+import Data.Maybe (fromMaybe)
+import Options.Applicative
+
+import Glean.Indexer
+import Glean.Indexer.External
+
+data Erlang = Erlang
+  { elpBinary :: FilePath
+  , erlBinary :: FilePath
+  , escriptBinary :: FilePath
+  , elpProjectPath :: Maybe FilePath
+  }
+
+options :: Parser Erlang
+options = do
+  elpBinary <- strOption $
+    long "elp" <>
+    value "elp" <>
+    help "path to the elp binary (default: 'elp' from PATH)"
+  erlBinary <- strOption $
+    long "erl" <>
+    value "erl" <>
+    help "path to the erl binary (default: 'erl' from PATH)"
+  escriptBinary <- strOption $
+    long "escript" <>
+    value "escript" <>
+    help "path to the escript binary (default: 'escript' from PATH)"
+  elpProjectPath <- optional (strOption $
+    long "project" <>
+    help "path to the Erlang project root (optional, defaults to indexerRoot)")
+  return Erlang{..}
+
+-- | Erlang indexer using ELP (Erlang Language Platform)
+-- ELP generates Glean facts directly in JSON format
+--
+-- Usage:
+--   cli:    glean index erlang --elp /path/to/elp --repo name/hash
+--   shell:  :index erlang --elp /path/to/elp
+--
+indexer :: Indexer Erlang
+indexer = Indexer {
+  indexerShortName = "erlang",
+  indexerDescription = "Index Erlang code using ELP",
+  indexerOptParser = options,
+  indexerRun = \Erlang{..} -> do
+    let ext = Ext {
+          extRunScript = elpBinary,
+          extFlavour = Json,
+          extArgs =
+            [ "glean"
+            , "--v2"
+            , "--multi"
+            , "--project"
+            , fromMaybe "${TEST_ROOT}" elpProjectPath
+            , "--erl"
+            , erlBinary
+            , "--escript"
+            , escriptBinary
+            , "--to"
+            , "${JSON_BATCH_DIR}"
+            ],
+          extDerivePredicates =
+            [ "erlang.DeclarationUses"
+            ],
+          extAllowNonZeroExit = False
+        }
+    indexerRun externalIndexer ext
+  }
diff --git a/glean/lang/flow/Glean/Indexer/Flow.hs b/glean/lang/flow/Glean/Indexer/Flow.hs
--- a/glean/lang/flow/Glean/Indexer/Flow.hs
+++ b/glean/lang/flow/Glean/Indexer/Flow.hs
@@ -27,7 +27,7 @@
     long "flow" <>
     value "flow" <>
     help "path to the flow binary"
-  flowWriteRoot <- strOption $ long "write-root" <> value "test"
+  flowWriteRoot <- strOption $ long "write-root" <> value ""
   flowIncludeDirectDeps <- switch (long "include-direct-deps")
   flowIncludeTransitiveDeps <- switch (long "include-transitive-deps")
   return Flow{..}
@@ -71,7 +71,8 @@
             , "flow.SearchTypeDeclarationByName"
             , "flow.SearchTypeDeclarationByLowerCaseName"
             , "flow.SearchModuleByLowerCaseName"
-            ]
+            ],
+            extAllowNonZeroExit = False
         }
     indexerRun externalIndexer ext
   }
diff --git a/glean/lang/go/Glean/Indexer/Go.hs b/glean/lang/go/Glean/Indexer/Go.hs
--- a/glean/lang/go/Glean/Indexer/Go.hs
+++ b/glean/lang/go/Glean/Indexer/Go.hs
@@ -22,21 +22,25 @@
   { scipGoBinary :: FilePath
   , goPackagesDriverBinary :: Maybe FilePath
   , scipExtraArgs :: [String]
+  , scipRustIndexer :: Maybe FilePath
   }
 
 options :: Parser Go
 options = do
   scipGoBinary <- strOption $
     long "scip-go" <>
+    metavar "PATH" <>
     value "scip-go" <>
-    help "path to the scip-go binary"
+    help "path to scip-go binary"
   goPackagesDriverBinary <- optional (strOption $
     long "gopackagesdriver" <>
-    value "gopackagesdriver" <>
-    help "path to the gopackagesdriver binary")
+    help "path to to the gopackagesdriver binary")
   scipExtraArgs <- many $ strOption $
     long "extra-arg" <>
     help "extra arguments to pass to the indexer"
+  scipRustIndexer <- optional (strOption $
+    long "rust-indexer" <>
+    help "Path to the rust indexer binary. If not provided, uses the haskell indexer instead")
   return Go{..}
 
 indexer :: Indexer Go
@@ -51,9 +55,11 @@
         scipArgs = \outFile ->
            ["--module-version=glean", "--no-animation", "-o", outFile ]
            ++ scipExtraArgs,
+        scipOutDir = Nothing,
         scipRoot = indexerRoot,
         scipWritesLocal = False,
-        scipLanguage = Just SCIP.Go
+        scipLanguage = Just SCIP.Go,
+        scipRustIndexer = scipRustIndexer
       }
     sendJsonBatches backend repo (scipGoBinary <> "/scip") val
     derive backend repo
diff --git a/glean/lang/hack/Glean/Indexer/Hack.hs b/glean/lang/hack/Glean/Indexer/Hack.hs
--- a/glean/lang/hack/Glean/Indexer/Hack.hs
+++ b/glean/lang/hack/Glean/Indexer/Hack.hs
@@ -61,6 +61,7 @@
             , "hack.TargetUses"
             , "hack.AttributeToDeclaration"
             , "hack.ThriftToHack"
+            , "hack.FileHasPackageOverride"
             -- new search predicates replacing hack.NameLowerCase
             , "hack.SearchClassConstByName"
             , "hack.SearchClassConstByLowerCaseName"
@@ -90,7 +91,8 @@
             , "hack.SearchTypedefByLowerCaseName"
             , "hack.SearchNamespaceByName"
             , "hack.SearchNamespaceByLowerCaseName"
-            ]
+            ],
+            extAllowNonZeroExit = False
         }
 
         hhConfig = concatMap (\x -> ["--config", x]) $
diff --git a/glean/lang/haskell/Glean/Indexer/Haskell.hs b/glean/lang/haskell/Glean/Indexer/Haskell.hs
--- a/glean/lang/haskell/Glean/Indexer/Haskell.hs
+++ b/glean/lang/haskell/Glean/Indexer/Haskell.hs
@@ -24,6 +24,7 @@
   { haskellBinary :: FilePath
   , haskellGhc :: Maybe FilePath
   , haskellSrcs :: [FilePath]
+  , haskellArgs :: [String]
   }
 
 options :: Parser Haskell
@@ -42,6 +43,9 @@
              " (otherwise read existing .hie files)")
     )
   haskellSrcs <- many (strOption (long "src"))
+  haskellArgs <- many (strOption (
+    long "arg" <> metavar "ARG" <>
+    help "argument to pass to hie-indexer"))
   return Haskell{..}
 
 indexer :: Indexer Haskell
@@ -77,11 +81,12 @@
                     , "--repo-hash"
                     , "${TEST_REPO_HASH}"
                     , hieDir
-                    ] <> [ "--src=" <> f | f <- haskellSrcs ]
+                    ] <> [ "--src=" <> f | f <- haskellSrcs ] <> haskellArgs
                 , extDerivePredicates = [
                     "hs.OccNameLowerCase",
                     "hs.SourceModule"
-                  ]
+                  ],
+                  extAllowNonZeroExit = False
                 }
         indexerRun externalIndexer ext backend repo params
     }
diff --git a/glean/lang/haskell/HieIndexer/Index.hs b/glean/lang/haskell/HieIndexer/Index.hs
--- a/glean/lang/haskell/HieIndexer/Index.hs
+++ b/glean/lang/haskell/HieIndexer/Index.hs
@@ -8,6 +8,8 @@
 
 {-# LANGUAGE CPP #-}
 {-# LANGUAGE TypeApplications #-}
+{-# LANGUAGE DuplicateRecordFields #-}
+{-# LANGUAGE OverloadedRecordDot #-}
 module HieIndexer.Index (indexHieFile) where
 
 import Control.Applicative
@@ -33,6 +35,7 @@
 import Data.Text (Text)
 import qualified Data.Text as Text
 import qualified Data.Text.Encoding as Text
+import Data.Text.Encoding.Error (lenientDecode)
 import qualified Data.Vector.Unboxed as Vector
 import HieDb.Compat (nameModule_maybe, nameOccName)
 import System.Directory
@@ -56,7 +59,8 @@
 #else
 import qualified GHC.Types.Var as GHC (ArgFlag(..), Specificity(..))
 #endif
-import GHC.Unit.Types (unitFS)
+import qualified GHC.Unit.Types as GHC
+import qualified GHC.Types.Unique.Set as GHC (mkUniqSet, elementOfUniqSet)
 #if !MIN_VERSION_ghc(9,6,0)
 import qualified GHC.Unit.Module.Name as GHC (moduleNameFS)
 #endif
@@ -69,6 +73,7 @@
 import qualified Glean.Schema.Hs.Types as Hs
 import qualified Glean.Schema.Src.Types as Src
 import Glean.Util.Range
+import HieIndexer.Options
 
 {- TODO
 
@@ -94,6 +99,12 @@
     Haddock's Interface type has all the ASTs for the declarations
     in addition to the Hie.
 
+- imports
+  - import refs contain only ModuleName, not Module. This means we can't
+    resolve imports to the correct file for module names that occur in
+    multiple packages.
+  - modules in the export list should be refs
+
 - map Name to exportedness?
 
 - exclude generated names in a cleaner way
@@ -106,15 +117,41 @@
   - Haddock docs for symbol
 -}
 
-mkModule :: Glean.NewFact m => GHC.Module -> m Hs.Module
-mkModule mod = do
+mkModule :: Glean.NewFact m => GHC.Module -> UnitName -> m Hs.Module
+mkModule mod unit = do
   modname <- Glean.makeFact @Hs.ModuleName $
     fsToText (GHC.moduleNameFS (GHC.moduleName mod))
   unitname <- Glean.makeFact @Hs.UnitName $
-    fsToText (unitFS (GHC.moduleUnit mod))
+    toUnitName unit $ GHC.moduleUnit mod
   Glean.makeFact @Hs.Module $
     Hs.Module_key modname unitname
 
+-- The Glean unit (used for incremental indexing) is
+-- <package>:<module>.  We use this rather than the source file path,
+-- because you might move the source file while keeping the module
+-- name unchanged.
+gleanUnit :: GHC.Module -> Glean.UnitName
+gleanUnit mod = ghcUnit <> ":" <> moduleName
+  where
+    ghcUnit = GHC.bytesFS $ GHC.unitFS $ GHC.moduleUnit mod
+    moduleName = GHC.bytesFS $ GHC.moduleNameFS $ GHC.moduleName mod
+
+toUnitName :: UnitName -> GHC.Unit -> Text
+toUnitName unitName u = case unitName of
+  UnitKey -> t
+  UnitId
+    | isWiredInUnit u -> t
+    | (id, _) <- Text.breakOnEnd "-" t, not (Text.null id) -> Text.init id
+    | otherwise -> t
+    -- TODO: this is not right for local libraries, which have names like
+    -- aeson-pretty-0.8.9-inplace-aeson
+  where t = fsToText $ GHC.unitFS u
+
+isWiredInUnit :: GHC.Unit -> Bool
+isWiredInUnit = \u -> GHC.toUnitId u `GHC.elementOfUniqSet` wiredInUnitIds
+  where
+  wiredInUnitIds = GHC.mkUniqSet GHC.wiredInUnitIds
+
 mkName :: Glean.NewFact m => GHC.Name -> Hs.Module -> Hs.NameSort -> m Hs.Name
 mkName name mod sort = do
   let occ = nameOccName name
@@ -199,67 +236,63 @@
     -> MaybeT (WriterT (Map (Glean.IdOf Hs.Name) Hs.SigDecl) m) ()
   makeDecl info =
     case info of
-      SigDecl { sigDeclName = name, sigDeclSpan = span } -> do
-        hsName <- getName name
+      SigDecl{} -> do
+        hsName <- getName info.name
         decl <- glean $ Glean.makeFact @Hs.SigDecl $
           Hs.SigDecl_key hsName (
-            Src.FileLocation fileFact (toByteSpan span))
+            Src.FileLocation fileFact (toByteSpan info.span))
         -- collect SigDecls using WriterT
         Writer.tell (Map.singleton (Glean.getId hsName) decl)
-      DataDecl { dataDeclName = name, dataDeclConstrs = cs } -> do
-        hsName <- getName name
-        cons <- forM cs $ \(ConstrInfo cName fields) -> do
-          hsCName <- getName cName
-          fNames <- mapM getName fields
-          fDecls <- forM fNames $ \fName ->
+      DataDecl{} -> do
+        hsName <- getName info.name
+        cons <- forM info.constrs $ \con -> do
+          hsCName <- getName con.name
+          fDecls <- forM con.fields $ \fName -> do
+            hsFName <- getName fName
             glean $ Glean.makeFact @Hs.RecordFieldDecl $
-              Hs.RecordFieldDecl_key fName hsCName
+              Hs.RecordFieldDecl_key hsFName hsCName
           glean $ Glean.makeFact @Hs.ConstrDecl $
             Hs.ConstrDecl_key hsCName hsName fDecls
         glean $ Glean.makeFact_ @Hs.DataDecl $
           Hs.DataDecl_key hsName cons
-      ClassDecl {
-          classDeclName = name,
-          classDeclMethods = meths,
-          classDeclDefaults = defs } -> do
-        hsName <- getName name
-        mNames <- mapM getName meths
-        mDecls <- forM mNames $ \mName ->
+      ClassDecl{} -> do
+        hsName <- getName info.name
+        mDecls <- forM info.methods $ \mName -> do
+          hsMName <- getName mName
           glean $ Glean.makeFact @Hs.MethDecl $
-            Hs.MethDecl_key mName hsName
-        defaults <- mapM makeInstBind defs
+            Hs.MethDecl_key hsMName hsName
+        defaults <- mapM makeInstBind info.defaults
         decl <- glean $ Glean.makeFact @Hs.ClassDecl $
           Hs.ClassDecl_key hsName mDecls defaults
         forM_ defaults $ \bind ->
           glean $ Glean.makeFact_ @Hs.InstanceBindToDecl $
             Hs.InstanceBindToDecl_key bind
               (Hs.InstanceBindToDecl_decl_class_ decl)
-      InstDecl {
-          instanceDeclBinds = instBinds,
-          instanceDeclSpan = span } -> do
-        binds <- mapM makeInstBind instBinds
+      InstDecl{} -> do
+        binds <- mapM makeInstBind info.binds
         decl <- glean $ Glean.makeFact @Hs.InstDecl $
           Hs.InstDecl_key binds
-            (Src.FileLocation fileFact (toByteSpan span))
+            (Src.FileLocation fileFact (toByteSpan info.span))
         forM_ binds $ \bind ->
           glean $ Glean.makeFact_ @Hs.InstanceBindToDecl $
             Hs.InstanceBindToDecl_key bind
               (Hs.InstanceBindToDecl_decl_inst decl)
 
-  makeInstBind InstanceBindInfo{..} = do
-    meth <- getName instBindMeth
+  makeInstBind instBind = do
+    meth <- getName instBind.method
     glean $ Glean.makeFact @Hs.InstanceBind $
       Hs.InstanceBind_key meth {-(IntMap.lookup instBindTy typeMap)-}
-        (Src.FileLocation fileFact (toByteSpan instBindSpan))
+        (Src.FileLocation fileFact (toByteSpan instBind.span))
 
 nat :: Integral a => a -> Glean.Nat
 nat = Glean.toNat . fromIntegral
 
 indexTypes
   :: forall m . (MonadFail m, Monad m, Glean.NewFact m)
-  => A.Array TypeIndex HieTypeFlat
+  => UnitName
+  -> A.Array TypeIndex HieTypeFlat
   -> m (IntMap Hs.Type)
-indexTypes typeArr = foldM go IntMap.empty (A.assocs typeArr)
+indexTypes unit typeArr = foldM go IntMap.empty (A.assocs typeArr)
   where
   go tymap (n,ty) = do
     fact <- mkTy ty
@@ -317,7 +350,7 @@
         tcname <- case nameModule_maybe name of
           Nothing -> fail "HTyConApp: internal name"
           Just mod -> do
-            namemod <- mkModule mod
+            namemod <- mkModule mod unit
             mkName name namemod (Hs.NameSort_external def)
         let sort = case GHC.ifaceTyConSort info of
               GHC.IfaceNormalTyCon -> Hs.TyConSort_normal def
@@ -349,26 +382,31 @@
 
 indexHieFile
   :: Glean.Writer
-  -> NonEmpty Text
+  -> HieIndexerOptions
   -> FilePath
   -> HieFile
   -> IO ()
-indexHieFile writer srcPaths path hie = do
+indexHieFile writer HieIndexerOptions{..} path hie = do
   srcFile <- findSourceFile srcPaths (hie_module hie) (hie_hs_file hie)
   logInfo $ "Indexing: " <> path <> " (" <> srcFile <> ")"
-  Glean.writeFacts writer $ do
-    modfact <- mkModule smod
+  Glean.writeFacts writer $ Glean.withUnit (gleanUnit smod) $ do
+    modfact <- mkModule smod unitName
 
     let offs = getLineOffsets (hie_hs_src hie)
     let hsFileFS = GHC.mkFastString $ hie_hs_file hie
-    filefact <- Glean.makeFact @Src.File (Text.pack srcFile)
+    let file = maybe id (\p f -> (p <> "/" <> f)) srcPrefix (Text.pack srcFile)
+    filefact <- Glean.makeFact @Src.File file
     let fileLines = mkFileLines filefact offs
     Glean.makeFact_ @Src.FileLines fileLines
 
+    when storeSrc $
+      Glean.makeFactV_ @Src.FileContent filefact $
+        Text.decodeUtf8With lenientDecode (hie_hs_src hie)
+
     Glean.makeFact_ @Hs.ModuleSource $
       Hs.ModuleSource_key modfact filefact
 
-    typeMap <- indexTypes (hie_types hie)
+    typeMap <- indexTypes unitName (hie_types hie)
 
     let toByteRange = srcRangeToByteRange fileLines (hie_hs_src hie)
         toByteSpan sp
@@ -416,7 +454,7 @@
               -- But it does happen, so let's not crash.
               return Nothing
             Just m -> do
-              mod <- if m == smod then return modfact else mkModule m
+              mod <- if m == smod then return modfact else mkModule m unitName
               Just <$> mkName name mod (Hs.NameSort_external def)
 
     sigMap <- produceDeclInfo filefact toByteSpan getName declInfo
@@ -515,7 +553,7 @@
       return src
     Just f -> return f
   where
-  pkg = fsToText (unitFS (GHC.moduleUnit mod))
+  pkg = fsToText (GHC.unitFS (GHC.moduleUnit mod))
   isVer = Text.all (\c -> isDigit c || c == '.')
   pkgNameAndVersion = case break isVer (Text.splitOn "-" pkg) of
     (before, after) -> Text.intercalate "-" (before <> take 1 after)
@@ -564,26 +602,26 @@
 
 data DeclInfo
   = DataDecl {
-      dataDeclName :: GHC.Name,
-      dataDeclConstrs :: [ConstrInfo]
+      name :: GHC.Name,
+      constrs :: [ConstrInfo]
     }
   | ClassDecl {
-      classDeclName :: GHC.Name,
-      classDeclMethods :: [GHC.Name],
-      classDeclDefaults :: [InstanceBindInfo]
+      name :: GHC.Name,
+      methods :: [GHC.Name],
+      defaults :: [InstanceBindInfo]
     }
   | SigDecl {
-      sigDeclName :: GHC.Name,
-      sigDeclSpan :: GHC.RealSrcSpan
+      name :: GHC.Name,
+      span :: GHC.RealSrcSpan
     }
   | InstDecl {
-      instanceDeclBinds :: [InstanceBindInfo],
-      instanceDeclSpan :: GHC.RealSrcSpan
+      binds :: [InstanceBindInfo],
+      span :: GHC.RealSrcSpan
     }
 
 data InstanceBindInfo = InstanceBindInfo {
-    instBindMeth :: GHC.Name,
-    instBindSpan :: GHC.RealSrcSpan
+    method :: GHC.Name,
+    span :: GHC.RealSrcSpan
     -- TODO: add type. The identifier with context ValBind InstanceBind
     -- doesn't have a type, but there is also a ValBind RegularBind
     -- identifier that does have the type attached.
@@ -591,16 +629,16 @@
 
 data ConstrInfo =
   ConstrInfo {
-    _constrName :: GHC.Name,
-    _constrFields :: [GHC.Name]
+    name :: GHC.Name,
+    fields :: [GHC.Name]
   }
 
 getDeclInfos :: HieAST TypeIndex -> [DeclInfo]
 getDeclInfos node = snd $ State.runState (go node) []
   where
-  go node@Node{..} = do
+  go node = do
     visit node
-    void $ traverse go nodeChildren
+    void $ traverse go node.nodeChildren
 
   visit node =
     {-
@@ -615,54 +653,54 @@
     hasInfo
       | isDataDecl nodeInfo,
         [(name,_,_)] <- findIdent dataDeclCtx nodeInfo node =
-         Just (DataDecl {
-           dataDeclName = name,
-           dataDeclConstrs = findConstrs node })
+         Just $ DataDecl {
+           name = name,
+           constrs = findConstrs node }
       | isClassDecl nodeInfo,
         [(name,_,_)] <- findIdent classDeclCtx nodeInfo node =
-         Just (ClassDecl {
-           classDeclName = name,
-           classDeclMethods = findMethods node,
-           classDeclDefaults = findInstBinds node })
+         Just $ ClassDecl {
+           name = name,
+           methods = findMethods node,
+           defaults = findInstBinds node }
       | isTypeSig nodeInfo,
         [(name,_,_)] <- findIdent tyDeclCtx nodeInfo node =
-         Just (SigDecl {
-           sigDeclName = name,
-           sigDeclSpan = nodeSpan node })
+         Just $ SigDecl {
+           name = name,
+           span = nodeSpan node }
       | isInstDecl nodeInfo =
-         Just (InstDecl {
-           instanceDeclBinds = findInstBinds node,
-           instanceDeclSpan = nodeSpan node })
+         Just $ InstDecl {
+           binds = findInstBinds node,
+           span = nodeSpan node }
       | otherwise =
           Nothing
 
     -- The Name for a decl seems to be a child of the declaration Node
-    findIdent ctx ni Node{..} =
+    findIdent ctx ni node =
       concatMap (namesWithContext ctx) $
-        map nodeIdentifiers (ni : map getNodeInfo nodeChildren)
+        map nodeIdentifiers (ni : map getNodeInfo node.nodeChildren)
 
-    findMethods Node{..} =
+    findMethods node =
       [ meth
-      | n <- nodeChildren
+      | n <- node.nodeChildren
       , let ni = getNodeInfo n
       , isMethodDecl ni
       , (meth,_,_) <- findIdent classTyDeclCtx ni n
       ]
 
-    findInstBinds Node{..} =
+    findInstBinds node =
       [ InstanceBindInfo {
-          instBindMeth = meth,
-          instBindSpan = span
+          method = meth,
+          span = span
         }
-      | n <- nodeChildren
+      | n <- node.nodeChildren
       , let ni = getNodeInfo n
       , isInstanceBind ni
       , (meth, _ty, ValBind _ _ (Just span))  <- findIdent instBindCtx ni n
       ]
 
-    findConstrs Node{..} =
+    findConstrs node =
       [ ConstrInfo con (fields n)
-      | n <- nodeChildren
+      | n <- node.nodeChildren
       , let ni = getNodeInfo n
       , isConstrDecl ni
       , (con,_,_) <- findIdent conDeclCtx ni n
diff --git a/glean/lang/haskell/HieIndexer/Main.hs b/glean/lang/haskell/HieIndexer/Main.hs
--- a/glean/lang/haskell/HieIndexer/Main.hs
+++ b/glean/lang/haskell/HieIndexer/Main.hs
@@ -15,12 +15,10 @@
 import qualified Data.ByteString as BS
 import Data.Default
 import Data.IORef
-import Data.List.NonEmpty (NonEmpty)
 import qualified Data.List.NonEmpty as NonEmpty
 import qualified Data.Map as AMap
 import qualified Data.Set as Set
 import qualified Data.HashSet as HashSet
-import Data.Text (Text)
 import qualified Data.Text as Text
 import Options.Applicative
 import System.Directory
@@ -87,7 +85,7 @@
 
   Glean.withSender backend repo allPredicates def $ \sender -> do
     Glean.withWriter sender def $
-      indexHieFiles paths (srcPaths cfg)
+      indexHieFiles paths cfg
 
   predicates <-
     Glean.schemaInfo_predicateIds
@@ -119,20 +117,20 @@
   paths <- getHieFilesIn (NonEmpty.toList (hiePaths cfg))
   ((), batch) <-
     Glean.withBatchWriter backend schema_id Nothing def $
-      indexHieFiles paths (srcPaths cfg)
+      indexHieFiles paths cfg
   BS.writeFile out (Thrift.Protocol.Compact.serializeCompact batch)
 
 indexHieFiles
   :: HashSet.HashSet FilePath
-  -> NonEmpty Text
+  -> HieIndexerOptions
   -> Glean.Writer
   -> IO ()
-indexHieFiles paths srcs writer =
+indexHieFiles paths opts writer =
   forM_ (HashSet.toList paths) $ \f -> do
     nc <- newIORef =<< makeNc
     runDbM nc $ do
       withHieFile f $ \h ->
-        liftIO $ indexHieFile writer srcs f h
+        liftIO $ indexHieFile writer opts f h
 
 {- | Recursively search for @.hie@ and @.hie-boot@  files in given directory
    avoiding loops due to symlinks
diff --git a/glean/lang/haskell/HieIndexer/Options.hs b/glean/lang/haskell/HieIndexer/Options.hs
--- a/glean/lang/haskell/HieIndexer/Options.hs
+++ b/glean/lang/haskell/HieIndexer/Options.hs
@@ -11,6 +11,7 @@
 module HieIndexer.Options (
     HieIndexerOptions(..),
     Mode(..),
+    UnitName(..),
     options,
   ) where
 
@@ -31,9 +32,26 @@
       -- ^ Paths to look for source files. May include the string
       -- @$PACKAGE@ which will be replaced by the package name
       -- (@<pkg>-<version>@).
+  , srcPrefix :: Maybe Text
+      -- ^ Prefix to add to source paths
+  , unitName :: UnitName
+      -- ^ How to handle unit names
+  , storeSrc :: Bool
+      -- ^ Whether to store the indexed source in src.FileContent
   , verbosity :: Int
   }
 
+data UnitName = UnitKey | UnitId
+
+parseUnit :: String -> Maybe UnitName
+parseUnit "key" = Just UnitKey
+parseUnit "id" = Just UnitId
+parseUnit _ = Nothing
+
+showUnit :: UnitName -> String
+showUnit UnitKey = "key"
+showUnit UnitId = "id"
+
 data Mode
   = WriteMode {
       repo :: Repo
@@ -60,6 +78,22 @@
           help (
             "Path to search for source files. The string \"$PACKAGE\" is " <>
             "replaced by the package name, e.g. text-2.0.2")))
+
+      srcPrefix <- optional (textOption (
+        long "prefix" <>
+        metavar "PATH" <>
+        help "Prefix to add to source paths in the DB"))
+
+      storeSrc <- switch (
+        long "store-src" <>
+        help "Store the full source file in src.FileContent")
+
+      unitName <- option (maybeReader parseUnit) (
+        long "unit" <>
+        metavar "key|id" <>
+        value UnitKey <>
+        showDefaultWith showUnit <>
+        help "Whether to store the full unit key (key) or just name-version (id)")
 
       verbosity <-
         option
diff --git a/glean/lang/haskell/tests/Main.hs b/glean/lang/haskell/tests/Main.hs
new file mode 100644
--- /dev/null
+++ b/glean/lang/haskell/tests/Main.hs
@@ -0,0 +1,23 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module Main ( main ) where
+
+import System.Environment
+
+import qualified Glean.Indexer.Haskell as Haskell ( indexer )
+import Glean.Regression.Snapshot
+import Glean.Regression.Snapshot.Driver
+
+main :: IO ()
+main = do
+  args <- getArgs
+  withArgs (["--root", path, "--with-ghc", "ghc"] <> args) $
+    testMain (driverFromIndexer Haskell.indexer)
+  where
+    path = "glean/lang/haskell/tests/code"
diff --git a/glean/lang/java-lsif/tests/Glean/Regression/JavaLsif/Main.hs b/glean/lang/java-lsif/tests/Glean/Regression/JavaLsif/Main.hs
new file mode 100644
--- /dev/null
+++ b/glean/lang/java-lsif/tests/Glean/Regression/JavaLsif/Main.hs
@@ -0,0 +1,21 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module Glean.Regression.JavaLsif.Main ( main ) where
+
+import System.Environment
+
+import Glean.Indexer.JavaLsif as JavaLsif
+import Glean.Regression.Snapshot
+import Glean.Regression.Snapshot.Driver
+
+main :: IO ()
+main = getArgs >>= \args -> withArgs (args ++ ["--root", path]) $
+    testMain (driverFromIndexer JavaLsif.indexer)
+  where
+    path = "glean/lang/java-lsif/tests/cases"
diff --git a/glean/lang/python-scip/Glean/Indexer/PythonScip.hs b/glean/lang/python-scip/Glean/Indexer/PythonScip.hs
--- a/glean/lang/python-scip/Glean/Indexer/PythonScip.hs
+++ b/glean/lang/python-scip/Glean/Indexer/PythonScip.hs
@@ -16,7 +16,10 @@
 import Glean.Indexer.SCIP (derive)
 import Glean.SCIP.Driver as SCIP
 
-newtype PythonScip = PythonScip { pythonScipBinary :: FilePath }
+data PythonScip = PythonScip
+    { pythonScipBinary :: FilePath
+    , scipRustIndexer :: Maybe FilePath
+    }
 
 options :: Parser PythonScip
 options = do
@@ -24,6 +27,9 @@
         long "scip-python" <>
         value "scip-python" <>
         help "path to scip-python binary"
+    scipRustIndexer <- optional (strOption $
+        long "rust-indexer" <>
+        help "Path to the rust indexer binary. If not provided, uses the haskell indexer instead")
     return PythonScip{..}
 
 indexer :: Indexer PythonScip
@@ -35,9 +41,11 @@
         val <- SCIP.runIndexer ScipIndexerParams {
             scipBinary = pythonScipBinary,
             scipArgs = const [ "index", "--project-version", "test", "."],
+            scipOutDir = Nothing,
             scipRoot = indexerRoot,
             scipWritesLocal = True,
-            scipLanguage = Just SCIP.Python
+            scipLanguage = Just SCIP.Python,
+            scipRustIndexer = scipRustIndexer
         }
         sendJsonBatches backend repo (pythonScipBinary <> "/scip") val
         derive backend repo
diff --git a/glean/lang/python-scip/tests/Glean/Regression/PythonScip/Main.hs b/glean/lang/python-scip/tests/Glean/Regression/PythonScip/Main.hs
new file mode 100644
--- /dev/null
+++ b/glean/lang/python-scip/tests/Glean/Regression/PythonScip/Main.hs
@@ -0,0 +1,21 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module Glean.Regression.PythonScip.Main ( main ) where
+
+import System.Environment
+
+import Glean.Indexer.PythonScip as PythonScip
+import Glean.Regression.Snapshot
+import Glean.Regression.Snapshot.Driver
+
+main :: IO ()
+main = getArgs >>= \args -> withArgs (args ++ ["--root", path]) $
+    testMain (driverFromIndexer PythonScip.indexer)
+  where
+    path = "glean/lang/python-scip/tests/cases"
diff --git a/glean/lang/rust-lsif/tests/Glean/Regression/RustLsif/Main.hs b/glean/lang/rust-lsif/tests/Glean/Regression/RustLsif/Main.hs
new file mode 100644
--- /dev/null
+++ b/glean/lang/rust-lsif/tests/Glean/Regression/RustLsif/Main.hs
@@ -0,0 +1,21 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module Glean.Regression.RustLsif.Main ( main ) where
+
+import System.Environment
+
+import Glean.Indexer.RustLsif as RustLsif
+import Glean.Regression.Snapshot
+import Glean.Regression.Snapshot.Driver
+
+main :: IO ()
+main = getArgs >>= \args -> withArgs (args ++ ["--root", path]) $
+    testMain (driverFromIndexer RustLsif.indexer)
+  where
+    path = "glean/lang/rust-lsif/tests/cases"
diff --git a/glean/lang/rust-scip/Glean/Indexer/RustScip.hs b/glean/lang/rust-scip/Glean/Indexer/RustScip.hs
--- a/glean/lang/rust-scip/Glean/Indexer/RustScip.hs
+++ b/glean/lang/rust-scip/Glean/Indexer/RustScip.hs
@@ -16,8 +16,9 @@
 import Glean.Indexer.SCIP ( derive )
 import Glean.SCIP.Driver as SCIP
 
-newtype RustScip = RustScip
+data RustScip = RustScip
   { rustAnalyzerBinary :: FilePath
+  , scipRustIndexer :: Maybe FilePath
   }
 
 options :: Parser RustScip
@@ -26,6 +27,9 @@
     long "rust-analyzer" <>
     value "rust-analyzer" <>
     help "path to the rust-analyzer binary"
+  scipRustIndexer <- optional (strOption $
+    long "rust-indexer" <>
+    help "Path to the rust indexer binary. If not provided, uses the haskell indexer instead")
   return RustScip{..}
 
 indexer :: Indexer RustScip
@@ -37,9 +41,11 @@
     val <- SCIP.runIndexer ScipIndexerParams {
                     scipBinary = rustAnalyzerBinary,
                     scipArgs = const [ "scip", "." ],
+                    scipOutDir = Nothing,
                     scipRoot = indexerRoot,
                     scipWritesLocal = True,
-                    scipLanguage = Just SCIP.Rust
+                    scipLanguage = Just SCIP.Rust,
+                    scipRustIndexer = scipRustIndexer
                  }
     sendJsonBatches backend repo (rustAnalyzerBinary <> "/scip") val
     derive backend repo
diff --git a/glean/lang/rust-scip/tests/Glean/Regression/RustScip/Main.hs b/glean/lang/rust-scip/tests/Glean/Regression/RustScip/Main.hs
new file mode 100644
--- /dev/null
+++ b/glean/lang/rust-scip/tests/Glean/Regression/RustScip/Main.hs
@@ -0,0 +1,22 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module Glean.Regression.RustScip.Main ( main ) where
+
+import System.Environment
+
+import Glean.Indexer.RustScip as RustScip
+import Glean.Regression.Snapshot
+import Glean.Regression.Snapshot.Driver
+
+main :: IO ()
+main = getArgs >>= \args -> withArgs (args ++ ["--root", path]) $
+    testMain (driverFromIndexer RustScip.indexer)
+  where
+    -- different query outputs so copy of the lsif index cases and queries
+    path = "glean/lang/rust-scip/tests/cases"
diff --git a/glean/lang/scip/Data/SCIP/Angle.hs b/glean/lang/scip/Data/SCIP/Angle.hs
--- a/glean/lang/scip/Data/SCIP/Angle.hs
+++ b/glean/lang/scip/Data/SCIP/Angle.hs
@@ -294,8 +294,25 @@
     fileRangeId <- nextId
     fileRange <- SCIP.predicateId "scip.FileRange" fileRangeId
       [ "file" .= fileId
-      , "range" .= decodeScipRange scipRange
+      , "range" .= fromMaybe
+          (error "decodeScipRange: got Nothing") (decodeScipRange scipRange)
       ]
+    enclosingRangePredicates <- case decodeScipRange scipEnclosingRangeRaw of
+      Nothing -> return []
+      Just scipEnclosingRange -> do
+        enclosingFileRangeId <- nextId
+        enclosingFileRange <-
+          SCIP.predicateId "scip.FileRange" enclosingFileRangeId
+            [ "file" .= fileId
+            , "range" .= scipEnclosingRange
+            ]
+        enclosingRangeId <- nextId
+        enclosingRange <-
+          SCIP.predicateId "scip.EnclosingRange" enclosingRangeId
+            [ "range" .= fileRangeId
+            , "enclosingRange" .= enclosingFileRangeId
+            ]
+        return (enclosingFileRange <> enclosingRange)
     let eSym = symbolFromString scipSymbol
     symbolFacts <- case eSym of
           Left err -> error (show err) -- Can't handle this symbol format
@@ -303,10 +320,11 @@
               fileRangeId
           Right Global{..} -> decodeGlobalOccurence scipSymbol symRoles
               fileRangeId descriptor
-    return (fileRange <> symbolFacts)
+    return (fileRange <> enclosingRangePredicates <> symbolFacts)
   where
     scipRange = occ ^. Scip.range
     scipSymbol = occ ^. Scip.symbol
+    scipEnclosingRangeRaw = occ ^. Scip.enclosingRange
     symRoles = toSymbolRole (occ ^. Scip.symbolRoles)
 
 decodeGlobalOccurence
@@ -420,14 +438,15 @@
 
 -- [startLine, startCharacter, endCharacter]`. The end line
 --  is inferred to have the same value as the start line.
-decodeScipRange :: [Int32] -> Aeson.Value
+decodeScipRange :: [Int32] -> Maybe Aeson.Value
+decodeScipRange [] = Nothing
 decodeScipRange [lineBegin,colBegin,colEnd] =
-  SCIP.toRange (SCIP.Range
+  Just $ SCIP.toRange (SCIP.Range
     (SCIP.Position (toNat lineBegin) (toNat colBegin))
     (SCIP.Position (toNat lineBegin) (toNat colEnd))) -- n.b
 -- : `[startLine, startCharacter, endLine, endCharacter]`
 decodeScipRange [lineBegin,colBegin,lineEnd,colEnd] =
-  SCIP.toRange (SCIP.Range
+  Just $ SCIP.toRange (SCIP.Range
     (SCIP.Position (toNat lineBegin) (toNat colBegin))
     (SCIP.Position (toNat lineEnd) (toNat colEnd)))
 decodeScipRange range = error $
diff --git a/glean/lang/scip/Glean/SCIP/Driver.hs b/glean/lang/scip/Glean/SCIP/Driver.hs
--- a/glean/lang/scip/Glean/SCIP/Driver.hs
+++ b/glean/lang/scip/Glean/SCIP/Driver.hs
@@ -24,6 +24,7 @@
 
   ) where
 
+import Data.Maybe ( fromMaybe )
 import Control.Monad
 import System.Directory
 import System.FilePath ( (</>), takeBaseName )
@@ -39,10 +40,12 @@
 data ScipIndexerParams = ScipIndexerParams
   { scipBinary :: FilePath
   , scipArgs :: FilePath -> [String]
+  , scipOutDir :: Maybe FilePath
   , scipRoot :: FilePath
   , scipWritesLocal :: Bool
      -- ^ e.g. rust-analyzer always writes index.scip to repoDir
   , scipLanguage :: Maybe LanguageId -- ^ a default language if known
+  , scipRustIndexer :: Maybe FilePath
   }
 
 -- | Run a generic SCIP-producing indexer, and convert to a Glean's scip.angle
@@ -50,14 +53,25 @@
 runIndexer :: ScipIndexerParams -> IO Aeson.Value
 runIndexer params@ScipIndexerParams{..} = do
   repoDir <- makeAbsolute scipRoot
-  withSystemTempDirectory "glean-scip" $ \scipDir -> do
+  withDirOrTmp scipOutDir $ \scipDir -> do
     let scipFile = scipDir </> "index.scip"
     runSCIPIndexer params { scipRoot = repoDir } scipFile
     when scipWritesLocal $ do
         copyFile (repoDir </> "index.scip") scipFile
         removeFile (repoDir </> "index.scip")
-    processSCIP scipLanguage False Nothing Nothing scipFile
+    case scipRustIndexer of
+      Nothing -> processSCIP scipLanguage False Nothing Nothing scipFile
+      Just rustIndexer -> do
+        let jsonPath = scipDir </> "index.json"
+        callProcess rustIndexer
+          ["--input", scipFile, "--infer-language", "--output", jsonPath]
+        mJson <- Aeson.decodeFileStrict jsonPath
+        return $ fromMaybe (error "rust indexer did not produce JSON") mJson
 
+withDirOrTmp :: Maybe FilePath -> (FilePath -> IO a) -> IO a
+withDirOrTmp Nothing f = withSystemTempDirectory "glean-scip" f
+withDirOrTmp (Just dir) f = withCurrentDirectory dir $ f dir
+
 -- | Run a SCIP indexer on a repository, put scip dump output into outputFile
 runSCIPIndexer :: ScipIndexerParams -> FilePath -> IO ()
 runSCIPIndexer ScipIndexerParams{..} outputFile =
@@ -77,4 +91,5 @@
   -> IO Aeson.Value
 processSCIP mlang inferLanguage mPathPrefix mStripPrefix scipFile = do
   logInfo $ "Using SCIP from " <> scipFile
-  scipToAngle mlang inferLanguage mPathPrefix mStripPrefix <$> B.readFile scipFile
+  scipToAngle mlang inferLanguage mPathPrefix mStripPrefix <$>
+    B.readFile scipFile
diff --git a/glean/lang/scip/indexer/Glean/Indexer/SCIP.hs b/glean/lang/scip/indexer/Glean/Indexer/SCIP.hs
--- a/glean/lang/scip/indexer/Glean/Indexer/SCIP.hs
+++ b/glean/lang/scip/indexer/Glean/Indexer/SCIP.hs
@@ -14,6 +14,10 @@
 import Options.Applicative
 import Data.Text ( Text )
 import Control.Monad ( forM_ )
+import Data.Maybe ( fromMaybe )
+import System.FilePath ( (</>) )
+import System.Process ( callProcess )
+import qualified Data.Aeson as Aeson
 
 import Glean.Derive
 import Glean.Indexer
@@ -23,19 +27,26 @@
 
 import qualified Glean
 import System.Directory (doesFileExist)
+import System.IO.Temp (withSystemTempDirectory)
 import Util.OptParse (maybeStrOption)
 
 -- | A generic SCIP indexer, for existing scip files
-newtype SCIP = SCIP
+data SCIP = SCIP
   { scipIndexFile :: Maybe FilePath
+  , scipToGlean :: Maybe FilePath
   }
   -- no options currently
 
 options :: Parser SCIP
 options =
-  SCIP <$> maybeStrOption (
-    long "input" <>
-    help "Optional path to a specific scip index file")
+  SCIP
+    <$> maybeStrOption (
+      long "input" <>
+      help "Optional path to a specific scip index file")
+    <*> maybeStrOption (
+      long "scip-to-glean" <>
+      help "Path to scip-to-glean indexer binary. If not provided, uses \
+           \the haskell indexer instead")
 
 -- | An indexer that just slurps an existing SCIP file. Usage:
 --
@@ -55,7 +66,14 @@
         if mFile
           then pure indexerRoot
           else error "Neither --input nor --root are scip files"
-    val <- SCIP.processSCIP Nothing False Nothing Nothing scipFile
+    val <- case scipToGlean of
+      Nothing -> SCIP.processSCIP Nothing False Nothing Nothing scipFile
+      Just rustIndexer -> withSystemTempDirectory "glean-scip" $ \tmpDir -> do
+        let jsonPath = tmpDir </> "index.json"
+        callProcess rustIndexer
+          ["--input", scipFile, "--infer-language", "--output", jsonPath]
+        mJson <- Aeson.decodeFileStrict jsonPath
+        return $ fromMaybe (error "rust indexer did not produce JSON") mJson
     sendJsonBatches backend repo "scip" val
     derive backend repo
   }
@@ -69,8 +87,10 @@
 -- Should correspond to stored predicates in scip.angle
 scipDerivedPredicates :: [Text]
 scipDerivedPredicates =
-  [ "scip.DefinitionLocation"
+  [ "scip.LowerCaseDisplayNameSymbol"
+  , "scip.DefinitionLocation"
   , "scip.ReferenceLocation"
   , "scip.SymbolDisplayName"
+  , "scip.EnclosedSymbol"
   , "scip.IsImplemented"
   ]
diff --git a/glean/lang/swift/Glean/Indexer/Swift.hs b/glean/lang/swift/Glean/Indexer/Swift.hs
--- a/glean/lang/swift/Glean/Indexer/Swift.hs
+++ b/glean/lang/swift/Glean/Indexer/Swift.hs
@@ -9,29 +9,40 @@
 {-# LANGUAGE ApplicativeDo #-}
 module Glean.Indexer.Swift ( indexer ) where
 
+import qualified Data.ByteString as BS
+import Data.Proxy ( Proxy(..) )
 import Options.Applicative
 
+import qualified Glean
 import Glean.Indexer
 import Glean.Indexer.External
 import Glean.Indexer.SCIP ( derive )
 import qualified Glean.SCIP.Driver as SCIP
-import System.FilePath (takeDirectory)
+import System.FilePath ( (</>), takeDirectory)
+import Glean.LocalOrRemote ( serializeInventory )
 
+import Thrift.Protocol (deserializeGen)
+import Thrift.Protocol.Compact (Compact)
 data Swift = Swift
   { scipGen :: FilePath
   , target :: String
+  , scipRustIndexer :: Maybe FilePath
   }
 
 options :: Parser Swift
 options = do
   scipGen <- strOption $
     long "scip-gen" <>
+    metavar "PATH" <>
     value "scip-gen" <>
-    help "path to an executable generating index.scip from swift code"
+    help "path to scip-gen binary"
   target <- strOption $
     long "target" <>
     value "target" <>
     help "target to build and index"
+  scipRustIndexer <- optional (strOption $
+    long "rust-indexer" <>
+    help "Path to the rust indexer binary. If not provided, uses the haskell indexer instead")
   return Swift{..}
 
 indexer :: Indexer Swift
@@ -39,20 +50,41 @@
   indexerShortName = "swift",
   indexerDescription = "Index Swift code",
   indexerOptParser = options,
-  indexerRun = \Swift{..} backend repo IndexerParams{..} -> do
+  indexerRun = \Swift{..} backend repo IndexerParams{ indexerOutput, .. } -> do
+    let tmpDir        = indexerOutput
+        inventoryFile = tmpDir </> "inventory.data"
+    serializeInventory backend repo >>= BS.writeFile inventoryFile
     val <- SCIP.runIndexer SCIP.ScipIndexerParams {
         scipBinary = scipGen,
         scipArgs = \outFile ->
            let outDir = takeDirectory outFile in
            [ "--output-dir", outDir
             , "--target", target
-            , "--swift-only"
             , "--output-type", "scip"
+            , "--inventory", inventoryFile
+            , "--isolation-dir", "index_store"
             , "--build-indexer" ],
+        scipOutDir = Just tmpDir,
         scipRoot = indexerRoot,
         scipWritesLocal = False,
-        scipLanguage = Just SCIP.Swift
+        scipLanguage = Just SCIP.Swift,
+        scipRustIndexer = scipRustIndexer
       }
     sendJsonBatches backend repo (scipGen <> "/scip") val
+    sendBatch backend repo (tmpDir </> "facts")
     derive backend repo
   }
+
+sendBatch ::
+  forall be. Glean.Backend be
+  => be
+  -> Glean.Repo
+  -> FilePath
+  -> IO ()
+sendBatch backend repo factFile = do
+    dat <- BS.readFile factFile
+    case deserializeGen (Proxy :: Proxy Compact) dat of
+      Left parseError -> error parseError
+      Right batch     -> do
+        _subst <- Glean.sendBatchAndWait backend repo batch
+        return ()
diff --git a/glean/lang/typescript/Glean/Indexer/Typescript.hs b/glean/lang/typescript/Glean/Indexer/Typescript.hs
--- a/glean/lang/typescript/Glean/Indexer/Typescript.hs
+++ b/glean/lang/typescript/Glean/Indexer/Typescript.hs
@@ -17,8 +17,9 @@
 
 import Glean.SCIP.Driver as SCIP
 
-newtype Typescript = Typescript
+data Typescript = Typescript
   { scipTypescriptBinary :: FilePath
+  , scipRustIndexer :: Maybe FilePath
   }
 
 options :: Parser Typescript
@@ -27,6 +28,9 @@
     long "scip-typescript" <>
     value "scip-typescript" <>
     help "path to the scip-typescipt binary"
+  scipRustIndexer <- optional (strOption $
+    long "rust-indexer" <>
+    help "Path to the rust indexer binary. If not provided, uses the haskell indexer instead")
   return Typescript{..}
 
 indexer :: Indexer Typescript
@@ -41,9 +45,11 @@
         scipArgs = \outFile ->
            [ "index", "--no-progress-bar"
            , "--cwd", indexerRoot, "--output", outFile ],
+        scipOutDir = Nothing,
         scipWritesLocal = False,
         scipRoot = indexerRoot,
-        scipLanguage = Just SCIP.TypeScript
+        scipLanguage = Just SCIP.TypeScript,
+        scipRustIndexer = scipRustIndexer
       }
     val <- SCIP.runIndexer params
     sendJsonBatches backend repo (scipTypescriptBinary <> "/scip") val
diff --git a/glean/lib/Glean/Util/ToAngle.hs b/glean/lib/Glean/Util/ToAngle.hs
--- a/glean/lib/Glean/Util/ToAngle.hs
+++ b/glean/lib/Glean/Util/ToAngle.hs
@@ -242,9 +242,127 @@
     Cxx.Declaration_objcMethod $ normalize x
   normalize (Cxx.Declaration_objcProperty x) =
     Cxx.Declaration_objcProperty $ normalize x
+  normalize (Cxx.Declaration_record_ x) =
+    Cxx.Declaration_record_ $ normalize x
+  normalize (Cxx.Declaration_enum_ x) =
+    Cxx.Declaration_enum_ $ normalize x
+  normalize (Cxx.Declaration_function_ x) =
+    Cxx.Declaration_function_ $ normalize x
   normalize Cxx.Declaration_EMPTY = error "unknown Declaration"
   normalize _ = error "expected Objc Declaration"
 
+instance Normalize Cxx.RecordDeclaration where
+  normalize (Cxx.RecordDeclaration x y) =
+    Cxx.RecordDeclaration (normalize x) (normalize y)
+
+instance Normalize Cxx.RecordDeclaration_key where
+  normalize (Cxx.RecordDeclaration_key x y z) =
+    Cxx.RecordDeclaration_key (normalize x) (normalize y) (normalize z)
+
+instance Normalize Cxx.EnumDeclaration where
+  normalize (Cxx.EnumDeclaration x y) =
+    Cxx.EnumDeclaration (normalize x) (normalize y)
+
+instance Normalize Cxx.EnumDeclaration_key where
+  normalize (Cxx.EnumDeclaration_key x y z t) =
+    Cxx.EnumDeclaration_key
+      (normalize x)
+      (normalize y)
+      (normalize z)
+      (normalize t)
+
+instance Normalize Cxx.FunctionDeclaration where
+  normalize (Cxx.FunctionDeclaration x y) =
+    Cxx.FunctionDeclaration (normalize x) (normalize y)
+
+instance Normalize Cxx.FunctionDeclaration_key where
+  normalize (Cxx.FunctionDeclaration_key x y z t) =
+    Cxx.FunctionDeclaration_key
+      (normalize x)
+      (normalize y)
+      (normalize z)
+      (normalize t)
+
+instance Normalize Cxx.QName where
+  normalize (Cxx.QName x y) = Cxx.QName (normalize x) (normalize y)
+
+instance Normalize Cxx.QName_key where
+  normalize (Cxx.QName_key x y) =
+    Cxx.QName_key (normalize x) (normalize y)
+
+instance Normalize Cxx.Scope where
+  normalize (Cxx.Scope_namespace_ x) = Cxx.Scope_namespace_ (normalize x)
+  normalize (Cxx.Scope_recordWithAccess x) =
+    Cxx.Scope_recordWithAccess (normalize x)
+  normalize (Cxx.Scope_global_ x) = Cxx.Scope_global_ x
+  normalize (Cxx.Scope_local x) = Cxx.Scope_local (normalize x)
+  normalize Cxx.Scope_EMPTY = error "unknown Scope"
+
+instance Normalize Cxx.Scope_recordWithAccess_ where
+  normalize (Cxx.Scope_recordWithAccess_ x y) =
+    Cxx.Scope_recordWithAccess_ (normalize x) (normalize y)
+
+instance Normalize Cxx.NamespaceQName where
+  normalize (Cxx.NamespaceQName x y) =
+    Cxx.NamespaceQName (normalize x) (normalize y)
+
+instance Normalize Cxx.NamespaceQName_key where
+  normalize (Cxx.NamespaceQName_key x y) =
+    Cxx.NamespaceQName_key (normalize x) (normalize y)
+
+instance Normalize Cxx.FunctionQName where
+  normalize (Cxx.FunctionQName x y) =
+    Cxx.FunctionQName (normalize x) (normalize y)
+
+instance Normalize Cxx.FunctionQName_key where
+  normalize (Cxx.FunctionQName_key x y) =
+    Cxx.FunctionQName_key (normalize x) (normalize y)
+
+instance Normalize Cxx.FunctionName where
+  normalize (Cxx.FunctionName x y) =
+    Cxx.FunctionName (normalize x) (normalize y)
+
+instance Normalize Cxx.FunctionName_key where
+  normalize (Cxx.FunctionName_key_name x) =
+    Cxx.FunctionName_key_name (normalize x)
+  normalize (Cxx.FunctionName_key_operator_ x) =
+    Cxx.FunctionName_key_operator_ (normalize x)
+  normalize (Cxx.FunctionName_key_literalOperator x) =
+    Cxx.FunctionName_key_literalOperator (normalize x)
+  normalize (Cxx.FunctionName_key_constructor x) =
+    Cxx.FunctionName_key_constructor x
+  normalize (Cxx.FunctionName_key_destructor x) =
+    Cxx.FunctionName_key_destructor x
+  normalize (Cxx.FunctionName_key_conversionOperator x) =
+    Cxx.FunctionName_key_conversionOperator (normalize x)
+  normalize Cxx.FunctionName_key_EMPTY = error "unknown FunctionName"
+
+instance Normalize Cxx.RecordKind where
+  normalize (Cxx.RecordKind_struct_ x) = Cxx.RecordKind_struct_ x
+  normalize (Cxx.RecordKind_class_ x) = Cxx.RecordKind_class_ x
+  normalize (Cxx.RecordKind_union_ x) = Cxx.RecordKind_union_ x
+  normalize Cxx.RecordKind_EMPTY = error "unknown RecordKind"
+
+instance Normalize Cxx.MethodSignature where
+  normalize (Cxx.MethodSignature x y z t) =
+    Cxx.MethodSignature
+      (normalize x)
+      (normalize y)
+      (normalize z)
+      (normalize t)
+
+instance Normalize Cxx.RefQualifier where
+  normalize Cxx.RefQualifier_None_ = Cxx.RefQualifier_None_
+  normalize Cxx.RefQualifier_LValue = Cxx.RefQualifier_LValue
+  normalize Cxx.RefQualifier_RValue = Cxx.RefQualifier_RValue
+  normalize (Cxx.RefQualifier__UNKNOWN _) = error "unknown RefQualifier"
+
+instance Normalize Cxx.Access where
+  normalize Cxx.Access_Public = Cxx.Access_Public
+  normalize Cxx.Access_Private = Cxx.Access_Private
+  normalize Cxx.Access_Protected = Cxx.Access_Protected
+  normalize (Cxx.Access__UNKNOWN _) = error "unknown Access"
+
 instance Normalize Cxx.ObjcContainerDeclaration where
   normalize (Cxx.ObjcContainerDeclaration x y) =
     Cxx.ObjcContainerDeclaration (normalize x) (normalize y)
@@ -336,6 +454,9 @@
   toAngleFull
       (Cxx.Declaration_objcProperty (Cxx.ObjcPropertyDeclaration _ (Just x))) =
     alt @"objcProperty" (toAngleFull x)
+  toAngleFull (Cxx.Declaration_record_ x) = alt @"record_" (mkKey x)
+  toAngleFull (Cxx.Declaration_enum_ x) = alt @"enum_" (mkKey x)
+  toAngleFull (Cxx.Declaration_function_ x) = alt @"function_" (mkKey x)
   toAngleFull Cxx.Declaration_EMPTY = error "unknown Declaration"
   toAngleFull _ = error "toAngleFull not implemented"
 
@@ -986,6 +1107,7 @@
 instance ToAngleFull Code.SymbolId where
   toAngleFull (Code.SymbolId_cxx x) = alt @"cxx" (toAngleFull x)
   toAngleFull (Code.SymbolId_scip x) = alt @"scip" (toAngleFull x)
+  toAngleFull (Code.SymbolId_swift x) = alt @"swift" (toAngleFull x)
   toAngleFull Code.SymbolId_EMPTY = error "unknown Code.SymbolId"
 
 instance ToAngleFull Scip.Symbol where
@@ -995,6 +1117,7 @@
 instance Normalize Code.SymbolId  where
   normalize (Code.SymbolId_cxx x) = Code.SymbolId_cxx (normalize x)
   normalize (Code.SymbolId_scip x) = Code.SymbolId_scip (normalize x)
+  normalize (Code.SymbolId_swift x) = Code.SymbolId_swift (normalize x)
   normalize Code.SymbolId_EMPTY = Code.SymbolId_EMPTY
 
 instance Normalize Scip.Symbol where
diff --git a/glean/lmdb/container-impl.cpp b/glean/lmdb/container-impl.cpp
new file mode 100644
--- /dev/null
+++ b/glean/lmdb/container-impl.cpp
@@ -0,0 +1,163 @@
+/*
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+#include "glean/lmdb/container-impl.h"
+#include "glean/lmdb/database-impl.h"
+#include "glean/lmdb/util.h"
+
+#include <fmt/core.h>
+#include <folly/ScopeGuard.h>
+
+namespace facebook {
+namespace glean {
+namespace lmdb {
+namespace impl {
+
+std::vector<const Family*> Family::families;
+
+const Family Family::admin("admin", 0);
+const Family Family::entities("entities", 0);
+const Family Family::keys("keys", MDB_DUPSORT);
+const Family Family::stats("stats", 0);
+const Family Family::meta("meta", 0);
+
+// Maps a unit's name to its UnitId
+// ownershipUnits: String -> UnitId
+const Family Family::ownershipUnits("ownershipUnits", 0);
+
+// Translates UnitId to its name. Dual of ownershipUnits.
+// ownershipUnitIds: UnitId -> String
+const Family Family::ownershipUnitIds("ownershipUnitIds", 0);
+
+// Append-only log of non-derived facts' ownership information.
+// Describes a map from UnitId to list of facts.
+// The key contains a tuple of UnitId and a monotonically incrementing counter.
+// The value is an interval map of fact ids.
+// ownershipRaw: (UnitId, nat) -> [Fid]
+const Family Family::ownershipRaw("ownershipRaw", 0, false);
+
+// Append-only log of derived facts' ownership information.
+// Describes a (Map Pid (Map Fid UsetId))
+// The key contains a tuple of Pid and a monotonically incrementing counter.
+// ownershipDerivedRaw: (Pid, nat) -> ( [Fid], [UsetId] )
+const Family Family::ownershipDerivedRaw("ownershipDerivedRaw", 0, false);
+
+// ownershipSets: UsetId -> (Operation, [UsetId])
+const Family Family::ownershipSets("ownershipSets", 0);
+
+// An interval map, mapping fact ids to UsetId.
+// factOwners: Fid -> UsetId
+const Family Family::factOwners("factOwners", 0, false);
+
+// Used to efficiently map fact ids to UsetIds
+// Contains:
+// - A page index at key INDEX_KEY with type [UsetId]
+// - A map from page prefix to a map from page suffix to UsetId
+//    prefix -> ([suffix], [UsetId])
+const Family Family::factOwnerPages("factOwnerPages", 0);
+
+ContainerImpl::ContainerImpl(const std::string& path, Mode m)
+    : db(nullptr, &mdb_env_close) {
+  mode = m;
+
+  unsigned int flags = (m == Mode::ReadOnly ? MDB_RDONLY : 0) | MDB_NOTLS;
+
+  MDB_env* db_ptr;
+  check(mdb_env_create(&db_ptr));
+  check(mdb_env_set_maxdbs(db_ptr, Family::count()));
+
+  // LMDB needs us to pre-set the memory map size, which determines
+  // the maximum size of the DB. Setting it to zero uses the mapsize
+  // when the DB was created, while setting it to a value smaller than
+  // the actual size of the DB causes LMDB to use the DB size - this
+  // is what we want for a read-only DB. For a read/write DB we have
+  // to pick a huge value, because the mapsize can only be increased
+  // if there are no transactions in progress, and we don't have a good
+  // way to do that aside from closing and re-opening the DB.
+  check(mdb_env_set_mapsize(
+      db_ptr, m == Mode::ReadOnly ? 1 : 1024 * 1024 * 1024 * 1024UL));
+
+  check(mdb_env_open(db_ptr, path.c_str(), flags, 0666));
+  SCOPE_FAIL {
+    mdb_env_close(db_ptr);
+  };
+
+  key_size = mdb_env_get_maxkeysize(db_ptr);
+  LOG(INFO) << folly::sformat("max key size: {}", key_size);
+
+  // open each subdb. Names and flags come from Family::families
+
+  {
+    Txn txn(db_ptr, mode == Mode::ReadOnly ? MDB_RDONLY : 0);
+    families.resize(Family::count());
+    for (size_t i = 0; i < Family::count(); i++) {
+      auto family = Family::family(i);
+      unsigned int familyFlags = family->flags;
+      if (mode != Mode::ReadOnly) {
+        familyFlags |= MDB_CREATE; // create it if it doesn't exist
+      }
+      check(mdb_dbi_open(
+          txn.ptr(), family->name, familyFlags, &families[family->index]));
+    }
+    txn.commit();
+  }
+
+  db.reset(db_ptr);
+}
+
+void ContainerImpl::close() noexcept {
+  if (db) {
+    mdb_env_close(db.release());
+  }
+}
+
+void ContainerImpl::requireOpen() const {
+  if (!db) {
+    rts::error("lmdb: database is closed");
+  }
+}
+
+MDB_dbi ContainerImpl::family(const Family& family) const {
+  assert(family.index < families.size());
+  return families[family.index];
+}
+
+void ContainerImpl::writeData(folly::ByteRange key, folly::ByteRange value) {
+  requireOpen();
+  auto writer = write();
+  writer.put(Family::meta, key, value);
+  writer.commit();
+}
+
+void ContainerImpl::optimize(bool compact) {
+  Txn txn = txn_write();
+  for (uint32_t i = 0; i < families.size(); i++) {
+    if (!Family::family(i)->keep) {
+      check(mdb_drop(txn.ptr(), families[i], 0 /* empty */));
+    }
+  }
+}
+
+std::unique_ptr<Database> ContainerImpl::openDatabase(
+    Id start,
+    rts::UsetId first_unit_id,
+    int32_t version) && {
+  return std::make_unique<DatabaseImpl>(
+      std::move(*this), start, first_unit_id, version);
+}
+
+void ContainerImpl::backup(const std::string& path) {
+  requireOpen();
+
+  check(mdb_env_copy2(db.get(), path.c_str(), MDB_CP_COMPACT));
+}
+
+} // namespace impl
+} // namespace lmdb
+} // namespace glean
+} // namespace facebook
diff --git a/glean/lmdb/container-impl.h b/glean/lmdb/container-impl.h
new file mode 100644
--- /dev/null
+++ b/glean/lmdb/container-impl.h
@@ -0,0 +1,188 @@
+/*
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+#pragma once
+
+#include "glean/lmdb/util.h"
+#include "glean/storage/db.h"
+#include "lmdb.h"
+
+namespace facebook {
+namespace glean {
+namespace lmdb {
+namespace impl {
+
+using namespace facebook::glean::db;
+
+struct Family {
+ private:
+  Family(const char* n, unsigned int flags_, bool keep_ = true)
+      : index(families.size()), name(n), flags(flags_), keep(keep_) {
+    families.push_back(this);
+  }
+
+  Family(const Family&) = delete;
+  Family& operator=(const Family&) = delete;
+
+  static std::vector<const Family*> families;
+
+ public:
+  size_t index;
+  const char* name;
+  unsigned int flags;
+
+  // Whether to keep this column family after the DB is complete. If
+  // keep = false, then the contents of the column family will be
+  // deleted before compaction.
+  bool keep = true;
+
+  static const Family admin;
+  static const Family entities;
+  static const Family keys;
+  static const Family stats;
+  static const Family meta;
+  static const Family ownershipUnits;
+  static const Family ownershipUnitIds;
+  static const Family ownershipRaw;
+  static const Family ownershipDerivedRaw;
+  static const Family ownershipSets;
+  static const Family factOwners;
+  static const Family factOwnerPages;
+
+  static size_t count() {
+    return families.size();
+  }
+
+  static const Family* FOLLY_NULLABLE family(const std::string& name) {
+    for (auto p : families) {
+      if (name == p->name) {
+        return p;
+      }
+    }
+    return nullptr;
+  }
+
+  static const Family* FOLLY_NULLABLE family(size_t i) {
+    return i < families.size() ? families[i] : nullptr;
+  }
+};
+
+/// A transaction-cursor pair
+struct Iterator : Cursor {
+  Iterator(Txn txn, MDB_dbi dbi)
+      : Cursor(txn.cursor(dbi)), txn_(std::move(txn)) {}
+
+ private:
+  Txn txn_;
+};
+
+struct ContainerImpl final : Container {
+  Mode mode;
+  std::unique_ptr<MDB_env, decltype(&mdb_env_close)> db;
+  std::vector<MDB_dbi> families;
+  size_t key_size;
+
+  using Family = impl::Family;
+  using Iterator = impl::Iterator;
+
+  ContainerImpl(const std::string& path, Mode m);
+
+  ContainerImpl(const ContainerImpl&) = delete;
+  ContainerImpl(ContainerImpl&& other) = default;
+  ContainerImpl& operator=(const ContainerImpl&) = delete;
+  ContainerImpl& operator=(ContainerImpl&&) = delete;
+
+  ~ContainerImpl() override {
+    close();
+  }
+
+  void close() noexcept override;
+
+  void requireOpen() const;
+
+  void backup(const std::string& path) override;
+  static void restore(const std::string& target, const std::string& source);
+
+  std::unique_ptr<Database>
+      openDatabase(Id start, rts::UsetId first_unit_id, int32_t version) &&
+      override;
+
+  void writeData(folly::ByteRange key, folly::ByteRange value) override;
+
+  bool readData(folly::ByteRange key, std::function<void(folly::ByteRange)> f)
+      override {
+    return get(Family::meta, key, f);
+  }
+
+  void optimize(bool compact) override;
+
+  MDB_dbi family(const Family& family) const;
+
+  Txn txn_write() {
+    return Txn(db.get());
+  };
+
+  Txn txn_read() {
+    return Txn(db.get(), MDB_RDONLY);
+  };
+
+  Iterator read(const Family& f) {
+    return Iterator(txn_read(), family(f));
+  }
+
+  template <typename F>
+  bool get(const Family& fam, folly::ByteRange key, F&& f) {
+    Txn txn(db.get(), MDB_RDONLY);
+    MDB_val val;
+    MDB_val k = mdbVal(key);
+    int s = mdb_get(txn.ptr(), family(fam), &k, &val);
+    if (s == MDB_SUCCESS) {
+      std::forward<F>(f)(byteRange(val));
+      return true;
+    } else if (s == MDB_NOTFOUND) {
+      return false;
+    } else {
+      check(s);
+      return false;
+    }
+  }
+
+  struct Writer {
+    Writer(ContainerImpl& c, unsigned int flags = 0)
+        : container_(c), txn(nullptr, &mdb_txn_abort) {
+      MDB_txn* t;
+      check(mdb_txn_begin(c.db.get(), NULL, flags, &t));
+      txn.reset(t);
+    }
+
+    void put(const Family& f, folly::ByteRange k, folly::ByteRange v) {
+      MDB_val key = mdbVal(k);
+      MDB_val val = mdbVal(v);
+      check(mdb_put(txn.get(), container_.family(f), &key, &val, 0));
+    }
+
+    void commit() {
+      if (txn) {
+        check(mdb_txn_commit(txn.release()));
+      }
+    }
+
+   private:
+    ContainerImpl& container_;
+    std::unique_ptr<MDB_txn, decltype(&mdb_txn_abort)> txn;
+  };
+
+  Writer write() {
+    return Writer(*this);
+  }
+};
+
+} // namespace impl
+} // namespace lmdb
+} // namespace glean
+} // namespace facebook
diff --git a/glean/lmdb/database-impl.cpp b/glean/lmdb/database-impl.cpp
new file mode 100644
--- /dev/null
+++ b/glean/lmdb/database-impl.cpp
@@ -0,0 +1,588 @@
+/*
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+#include "glean/lmdb/database-impl.h"
+#include "glean/lmdb/container-impl.h"
+
+#include "glean/rts/timer.h"
+
+namespace facebook {
+namespace glean {
+namespace lmdb {
+namespace impl {
+
+using namespace rts;
+
+const char* admin_names[] = {
+    "NEXT_ID",
+    "VERSION",
+    "STARTING_ID",
+    "FIRST_UNIT_ID",
+    "NEXT_UNIT_ID",
+    "ORPHAN_FACTS",
+};
+
+namespace {
+
+template <typename T, typename F>
+T initAdminValue(
+    ContainerImpl& container_,
+    AdminId id,
+    T def,
+    bool write,
+    F&& notFound) {
+  auto current = readAdminValue<T>(container_, id);
+  if (current.hasValue()) {
+    return *current;
+  } else {
+    notFound();
+    if (write) {
+      binary::Output key;
+      key.fixed(id);
+      binary::Output value;
+      value.fixed(def);
+      auto writer = container_.write();
+      writer.put(Family::admin, key.bytes(), value.bytes());
+      writer.commit();
+    }
+    return def;
+  }
+}
+
+} // namespace
+
+DatabaseImpl::DatabaseImpl(
+    ContainerImpl c,
+    Id start,
+    UsetId first_unit_id_,
+    int64_t version)
+    : DatabaseCommon(std::move(c)) {
+  starting_id = Id::fromWord(initAdminValue(
+      container_,
+      AdminId::STARTING_ID,
+      start.toWord(),
+      container_.mode == Mode::Create,
+      [] {}));
+
+  next_id = Id::fromWord(initAdminValue(
+      container_,
+      AdminId::NEXT_ID,
+      start.toWord(),
+      container_.mode == Mode::Create,
+      [mode = container_.mode] {
+        if (mode != Mode::Create) {
+          rts::error("corrupt database - missing NEXT_ID");
+        }
+      }));
+
+  first_unit_id = initAdminValue(
+      container_,
+      AdminId::FIRST_UNIT_ID,
+      first_unit_id_,
+      container_.mode == Mode::Create,
+      [] {
+        // TODO: later this should be an error, for now we have to be
+        // able to open old DBs.
+      });
+  VLOG(1) << folly::sformat("first_unit_id: {}", first_unit_id);
+
+  next_uset_id = initAdminValue(
+      container_,
+      AdminId::NEXT_UNIT_ID,
+      first_unit_id,
+      container_.mode == Mode::Create,
+      [] {
+        // TODO: later this should be an error, for now we have to be
+        // able to open old DBs.
+      });
+  VLOG(1) << folly::sformat("next_uset_id: {}", next_uset_id);
+
+  db_version = initAdminValue(
+      container_,
+      AdminId::VERSION,
+      version,
+      container_.mode == Mode::Create,
+      [] {});
+
+  if (db_version != version) {
+    rts::error("unexpected database version {}", db_version);
+  }
+
+  stats_.set(loadStats());
+
+  if (container_.mode != Mode::ReadOnly) {
+    // These are only used when writing
+    ownership_unit_counters = loadOwnershipUnitCounters();
+    ownership_derived_counters = loadOwnershipDerivedCounters();
+
+    // We only need usets_ for writable DBs, and it takes time and
+    // memory to load them so omit this for ReadOnly DBs.
+    usets_ = loadOwnershipSets();
+  }
+
+  // Enable the fact owner cache when the DB is read-only
+  if (container_.mode == Mode::ReadOnly) {
+    cacheOwnership();
+  }
+}
+
+rts::PredicateStats DatabaseImpl::loadStats() {
+  container_.requireOpen();
+  rts::PredicateStats stats;
+  auto iter = container_.read(Family::stats);
+
+  for (iter.seek_first(); iter.valid(); iter.next()) {
+    binary::Input key(iter.key());
+    stats[key.fixed<Pid>()] = fromBytes<MemoryStats>(iter.value());
+    assert(key.empty());
+  }
+  return stats;
+}
+
+namespace {
+
+rts::Fact::Ref decomposeFact(Id id, const folly::ByteRange data) {
+  binary::Input inp(data);
+  const auto ty = inp.packed<Pid>();
+  const auto key_size = inp.packed<uint32_t>();
+  return rts::Fact::Ref{id, ty, rts::Fact::Clause::from(inp.bytes(), key_size)};
+}
+
+} // namespace
+
+Id DatabaseImpl::idByKey(Pid type, folly::ByteRange key) {
+  if (count(type).high() == 0) {
+    return Id::invalid();
+  }
+
+  container_.requireOpen();
+  binary::Output k;
+  k.fixed(type);
+
+  Txn txn = container_.txn_read();
+  folly::ByteRange out;
+  size_t key_space = container_.key_size - sizeof(type);
+  if (key.size() <= key_space) {
+    k.put(key);
+    if (!txn.get(container_.family(Family::keys), k.bytes(), out)) {
+      return Id::invalid();
+    } else {
+      binary::Input value(out);
+      auto id = value.fixed<Id>();
+      assert(value.empty());
+      return id;
+    }
+  } else {
+    k.bytes(key.begin(), key_space);
+    auto iter = txn.cursor(container_.family(Family::keys));
+    iter.seek_key(k.bytes());
+    while (iter.valid()) {
+      binary::Input value(iter.value());
+      auto id = value.fixed<Id>();
+      assert(value.empty());
+      folly::ByteRange val;
+      [[maybe_unused]] auto found = lookupById(txn, id, val);
+      assert(found);
+      auto fact = decomposeFact(id, val);
+      if (key == fact.key()) {
+        return id;
+      }
+      iter.next_dup();
+    }
+    return Id::invalid();
+  }
+}
+
+Pid DatabaseImpl::typeById(Id id) {
+  container_.requireOpen();
+  folly::ByteRange val;
+  Txn txn = container_.txn_read();
+  if (lookupById(txn, id, val)) {
+    return binary::Input(val).packed<Pid>();
+  } else {
+    return Pid::invalid();
+  }
+}
+
+bool DatabaseImpl::factById(Id id, std::function<void(Pid, Fact::Clause)> f) {
+  container_.requireOpen();
+  folly::ByteRange val;
+  Txn txn = container_.txn_read();
+  if (lookupById(txn, id, val)) {
+    auto ref = decomposeFact(id, val);
+    f(ref.type, ref.clause);
+    return true;
+  } else {
+    return false;
+  }
+}
+
+bool DatabaseImpl::lookupById(Txn& txn, Id id, folly::ByteRange& val) {
+  if (id < startingId() || id >= firstFreeId()) {
+    return false;
+  }
+  binary::Output key;
+  key.nat(id.toWord());
+  return txn.get(container_.family(Family::entities), key.bytes(), val);
+}
+
+namespace {
+
+struct SeekIterator final : rts::FactIterator {
+  SeekIterator(
+      folly::ByteRange start,
+      size_t prefix_size,
+      Pid type,
+      Id start_id,
+      DatabaseImpl* db)
+      : lower_bound_({start.data(), start.data() + prefix_size}),
+        upper_bound_(
+            binary::lexicographicallyNext({start.data(), prefix_size})),
+        type_(type),
+        txn_(db->container_.txn_read()),
+        iter_(txn_.cursor(db->container_.family(Family::keys))),
+        db_(db) {
+    size_t key_space = db->container_.key_size;
+    if (start.size() > key_space && start_id) {
+      // When restarting an iterator, we can jump to the right place
+      // even if the key is larger than our max key size, because we
+      // know the value (the fact ID) and LMDB provides a way to jump
+      // to a particular key/value pair (MDB_GET_BOTH).
+      if (!iter_.seek_both({start.data(), key_space}, bytesOf(start_id))) {
+        rts::error("seek restart failed");
+      }
+    } else {
+      iter_.seek_key(start);
+    }
+  }
+
+  void next() override {
+    iter_.next();
+  }
+
+  Fact::Ref get(Demand demand) override {
+    big_key = {};
+    for (; iter_.valid(); iter_.next()) {
+      if (iter_.key() >= binary::byteRange(upper_bound_)) {
+        return Fact::Ref::invalid();
+      }
+      binary::Input key(iter_.key());
+      binary::Input value(iter_.value());
+      bool key_overflow = key.size() >= db_->container_.key_size;
+      [[maybe_unused]] auto ty = key.fixed<Pid>();
+      DCHECK_EQ(ty.toWord(), type_.toWord());
+      auto id = value.fixed<Id>();
+      assert(value.empty());
+      if (demand == KeyOnly && !key_overflow) {
+        return Fact::Ref{id, type_, Fact::Clause::fromKey(key.bytes())};
+      } else {
+        [[maybe_unused]] auto found = db_->lookupById(txn_, id, slice_);
+        assert(found);
+        auto fact = decomposeFact(id, slice_);
+        if (key_overflow) {
+          folly::ByteRange lower_bound_key_ =
+              binary::byteRange(lower_bound_).subpiece(sizeof(Pid));
+          if (lower_bound_.size() > db_->container_.key_size &&
+              fact.key() < lower_bound_key_) {
+            continue;
+          }
+          folly::ByteRange upper_bound_key_ =
+              binary::byteRange(upper_bound_).subpiece(sizeof(Pid));
+          if (upper_bound_.size() > db_->container_.key_size &&
+              fact.key() >= upper_bound_key_) {
+            continue;
+          }
+        }
+        return fact;
+      }
+    }
+    return Fact::Ref::invalid();
+  }
+
+  std::optional<Id> lower_bound() override {
+    return std::nullopt;
+  }
+  std::optional<Id> upper_bound() override {
+    return std::nullopt;
+  }
+
+  std::vector<unsigned char> lower_bound_;
+  std::vector<unsigned char> upper_bound_;
+  binary::Output big_key;
+  const Pid type_;
+  Txn txn_;
+  Cursor iter_;
+  DatabaseImpl* db_;
+  folly::ByteRange slice_;
+};
+
+} // namespace
+
+std::unique_ptr<rts::FactIterator> DatabaseImpl::seek(
+    Pid type,
+    folly::ByteRange prefix,
+    std::optional<rts::Fact::Ref> restart) {
+  if (count(type).high() == 0) {
+    return std::make_unique<EmptyIterator>();
+  }
+
+  container_.requireOpen();
+  binary::Output out;
+  out.fixed(type);
+  const auto type_size = out.size();
+  Id start_id = Id::invalid();
+
+  if (restart.has_value()) {
+    out.put(restart.value().clause.key());
+    start_id = restart.value().id;
+  } else {
+    out.put(prefix);
+  }
+  return std::make_unique<SeekIterator>(
+      out.bytes(), type_size + prefix.size(), type, start_id, this);
+}
+
+std::unique_ptr<rts::FactIterator> DatabaseImpl::seekWithinSection(
+    Pid type,
+    folly::ByteRange prefix,
+    Id from,
+    Id upto,
+    std::optional<rts::Fact::Ref> restart) {
+  if (upto <= startingId() || firstFreeId() <= from) {
+    return std::make_unique<EmptyIterator>();
+  }
+
+  return Section(this, from, upto).seek(type, prefix, restart);
+}
+
+namespace {
+
+template <typename Direction>
+struct EnumerateIterator final : rts::FactIterator {
+  explicit EnumerateIterator(Id start, Id bound, DatabaseImpl* db)
+      : bound_(bound),
+        txn_(db->container_.txn_read()),
+        iter_(txn_.cursor(db->container_.family(Family::entities))) {
+    EncodedNat st(start.toWord());
+    iter_.seek_key(st.byteRange());
+  }
+
+  void next() override {
+    iter_.seek_op(Direction::next);
+  }
+
+  Fact::Ref get(Demand /*unused*/) override {
+    if (iter_.valid()) {
+      Id id = Id::fromWord(
+          loadTrustedNat(
+              reinterpret_cast<const unsigned char*>(iter_.key().data()))
+              .first);
+      if (Direction::inside(id, bound_)) {
+        return decomposeFact(id, iter_.value());
+      }
+    }
+    return Fact::Ref::invalid();
+  }
+
+  std::optional<Id> lower_bound() override {
+    return std::nullopt;
+  }
+  std::optional<Id> upper_bound() override {
+    return std::nullopt;
+  }
+
+  Id bound_;
+  Txn txn_;
+  Cursor iter_;
+};
+
+struct Forward {
+  static std::pair<Id, Id>
+  bounds(Id from, Id upto, Id starting_id, Id next_id) {
+    if (from >= next_id || (upto && upto <= starting_id)) {
+      return {Id::invalid(), Id::invalid()};
+    } else {
+      return {
+          std::max(from, starting_id),
+          upto && upto <= next_id ? upto : next_id};
+    }
+  }
+
+  static bool inside(Id cur, Id bound) {
+    return cur < bound;
+  }
+  static inline constexpr auto next = MDB_NEXT;
+};
+
+struct Backward {
+  static std::pair<Id, Id>
+  bounds(Id from, Id downto, Id starting_id, Id next_id) {
+    if (downto >= next_id || (from && from <= starting_id)) {
+      return {Id::invalid(), Id::invalid()};
+    } else {
+      return {
+          (from && from <= next_id ? from : next_id) - 1,
+          std::max(downto, starting_id)};
+    }
+  }
+
+  static bool inside(Id cur, Id bound) {
+    return cur >= bound;
+  }
+  static inline constexpr auto next = MDB_PREV;
+};
+
+} // namespace
+
+template <typename Direction>
+std::unique_ptr<rts::FactIterator>
+makeEnumerateIterator(DatabaseImpl* db, Id from, Id to) {
+  db->container_.requireOpen();
+  const auto [start, bound] =
+      Direction::bounds(from, to, db->startingId(), db->firstFreeId());
+  if (!start) {
+    return std::make_unique<rts::EmptyIterator>();
+  } else {
+    return std::make_unique<EnumerateIterator<Direction>>(start, bound, db);
+  }
+}
+
+std::unique_ptr<rts::FactIterator> DatabaseImpl::enumerate(Id from, Id upto) {
+  return makeEnumerateIterator<Forward>(this, from, upto);
+}
+
+std::unique_ptr<rts::FactIterator> DatabaseImpl::enumerateBack(
+    Id from,
+    Id downto) {
+  return makeEnumerateIterator<Backward>(this, from, downto);
+}
+
+void DatabaseImpl::commit(rts::FactSet& facts) {
+  container_.requireOpen();
+
+  if (facts.empty()) {
+    return;
+  }
+
+  if (facts.startingId() < next_id) {
+    rts::error(
+        "batch inserted out of sequence ({} < {})",
+        facts.startingId(),
+        next_id);
+  }
+
+  auto writer = container_.write();
+
+  // NOTE: We do *not* support concurrent writes so we don't need to protect
+  // stats_ here because nothing should be able to replace it while we're
+  // running
+  const auto& old_stats = stats_.unprotected();
+  PredicateStats new_stats(old_stats);
+
+  for (auto iter = facts.enumerate(); auto fact = iter->get(); iter->next()) {
+    assert(fact.id >= next_id);
+
+    uint64_t mem = 0;
+    auto put = [&](const auto& family, const auto& key, const auto& value) {
+      writer.put(family, key, value);
+      mem += key.size();
+      mem += value.size();
+    };
+
+    {
+      binary::Output k;
+      k.nat(fact.id.toWord());
+      binary::Output v;
+      v.packed(fact.type);
+      v.packed(fact.clause.key_size);
+      v.put({fact.clause.data, fact.clause.size()});
+
+      put(Family::entities, k.bytes(), v.bytes());
+    }
+
+    {
+      binary::Output k;
+      binary::Output v;
+      k.fixed(fact.type);
+
+      auto key = fact.key();
+      size_t keySpace = container_.key_size - sizeof(fact.type);
+      if (key.size() > keySpace) {
+        k.bytes(key.begin(), keySpace);
+      } else {
+        k.put(key);
+      }
+      v.fixed(fact.id);
+
+      put(Family::keys, k.bytes(), v.bytes());
+    }
+
+    new_stats[fact.type] += MemoryStats::one(mem);
+  }
+
+  const auto first_free_id = facts.firstFreeId();
+  writer.put(Family::admin, bytesOf(AdminId::NEXT_ID), bytesOf(first_free_id));
+
+  for (const auto& x : new_stats) {
+    if (x.second != old_stats.get(x.first)) {
+      writer.put(Family::stats, bytesOf(x.first.toWord()), bytesOf(x.second));
+    }
+  }
+
+  writer.commit();
+  next_id = first_free_id;
+
+  stats_.set(std::move(new_stats));
+}
+
+rts::OwnershipStats DatabaseImpl::getOwnershipStats() {
+  uint64_t units_size, unit_ids_size, sets_size, owners_size, num_owners,
+      owner_pages_size, num_owner_pages;
+  MDB_stat stat;
+  Txn txn = container_.txn_read();
+
+  auto stat_db_size = [&](MDB_stat& stat) -> size_t {
+    return (size_t)stat.ms_psize *
+        (stat.ms_branch_pages + stat.ms_leaf_pages + stat.ms_overflow_pages);
+  };
+
+  mdb_stat(txn.ptr(), container_.family(Family::ownershipUnits), &stat);
+  units_size = stat_db_size(stat);
+
+  mdb_stat(txn.ptr(), container_.family(Family::ownershipUnitIds), &stat);
+  unit_ids_size = stat_db_size(stat);
+
+  mdb_stat(txn.ptr(), container_.family(Family::ownershipSets), &stat);
+  sets_size = stat_db_size(stat);
+
+  mdb_stat(txn.ptr(), container_.family(Family::factOwners), &stat);
+  num_owners = stat.ms_entries;
+  owners_size = stat_db_size(stat);
+
+  mdb_stat(txn.ptr(), container_.family(Family::factOwnerPages), &stat);
+  num_owner_pages = stat.ms_entries;
+  owner_pages_size = stat_db_size(stat);
+
+  OwnershipStats stats;
+  stats.num_units = nextUnitId() - first_unit_id; // accurate
+  stats.units_size = units_size + unit_ids_size; // estimate
+  stats.num_sets = next_uset_id - stats.num_units; // accurate
+  stats.sets_size = sets_size; // estimate
+  stats.num_owner_entries = num_owners + num_owner_pages; // estimate
+  stats.owners_size = owners_size + owner_pages_size; // estimate
+
+  auto orphans = readAdminValue<int64_t>(container_, AdminId::ORPHAN_FACTS);
+  stats.num_orphan_facts = orphans ? *orphans : -1;
+
+  return stats;
+}
+
+} // namespace impl
+} // namespace lmdb
+} // namespace glean
+} // namespace facebook
diff --git a/glean/lmdb/database-impl.h b/glean/lmdb/database-impl.h
new file mode 100644
--- /dev/null
+++ b/glean/lmdb/database-impl.h
@@ -0,0 +1,125 @@
+/*
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+#pragma once
+
+#include <folly/container/F14Map.h>
+
+#include "glean/rts/ownership/uset.h"
+
+#include "glean/storage/common.h"
+#include "glean/storage/stats.h"
+
+#include "glean/lmdb/container-impl.h"
+#include "glean/lmdb/glean_lmdb.h"
+#include "glean/lmdb/util.h"
+
+namespace facebook {
+namespace glean {
+namespace lmdb {
+namespace impl {
+
+using namespace facebook::glean::db;
+
+struct DatabaseImpl final : DatabaseCommon<ContainerImpl> {
+  int64_t db_version;
+  Id starting_id;
+  Id next_id;
+  AtomicPredicateStats stats_;
+
+  explicit DatabaseImpl(
+      ContainerImpl c,
+      Id start,
+      rts::UsetId first_unit_id,
+      int64_t version);
+
+  DatabaseImpl(const DatabaseImpl&) = delete;
+  DatabaseImpl& operator=(const DatabaseImpl&) = delete;
+  DatabaseImpl(DatabaseImpl&&) = delete;
+  DatabaseImpl& operator=(DatabaseImpl&&) = delete;
+
+  Container& container() noexcept override {
+    return container_;
+  }
+
+  void commit(rts::FactSet& facts) override;
+
+  /// Lookup implementation
+
+  Id idByKey(Pid type, folly::ByteRange key) override;
+  Pid typeById(Id id) override;
+  bool factById(Id id, std::function<void(Pid, rts::Fact::Clause)> f) override;
+
+  rts::Id startingId() const override {
+    return starting_id;
+  }
+
+  rts::Id firstFreeId() const override {
+    return next_id;
+  }
+
+  rts::Interval count(Pid pid) const override {
+    return stats_.count(pid);
+  }
+
+  std::unique_ptr<rts::FactIterator> enumerate(Id from, Id upto) override;
+  std::unique_ptr<rts::FactIterator> enumerateBack(Id from, Id downto) override;
+  std::unique_ptr<rts::FactIterator> seek(
+      Pid type,
+      folly::ByteRange prefix,
+      std::optional<rts::Fact::Ref> restart) override;
+  std::unique_ptr<rts::FactIterator> seekWithinSection(
+      Pid type,
+      folly::ByteRange prefix,
+      Id from,
+      Id upto,
+      std::optional<rts::Fact::Ref> restart) override;
+
+  /// stats
+
+  rts::PredicateStats loadStats();
+
+  rts::PredicateStats predicateStats() const override {
+    return stats_.get();
+  }
+
+  bool lookupById(Txn& txn, Id id, folly::ByteRange& val);
+  // returned memory is valid until txn is finished
+
+  /// Ownership (most of this is in common.h)
+
+  OwnershipStats getOwnershipStats() override;
+};
+
+extern const char* admin_names[];
+
+template <typename T>
+folly::Optional<T> readAdminValue(ContainerImpl& container_, AdminId id) {
+  container_.requireOpen();
+  folly::ByteRange val;
+  binary::Output key;
+  key.fixed(id);
+  auto txn = container_.txn_read();
+  if (txn.get(container_.family(Family::admin), key.bytes(), val)) {
+    binary::Input value(val);
+    auto result = value.fixed<T>();
+    if (!value.empty()) {
+      rts::error(
+          "corrupt database - invalid {}",
+          admin_names[static_cast<uint32_t>(id)]);
+    }
+    return result;
+  } else {
+    return {};
+  };
+}
+
+} // namespace impl
+} // namespace lmdb
+} // namespace glean
+} // namespace facebook
diff --git a/glean/lmdb/ffi.cpp b/glean/lmdb/ffi.cpp
new file mode 100644
--- /dev/null
+++ b/glean/lmdb/ffi.cpp
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+#ifdef OSS
+#include <cpp/memory.h> // @manual
+#include <cpp/wrap.h> // @manual
+#else
+#include <common/hs/util/cpp/memory.h>
+#include <common/hs/util/cpp/wrap.h>
+#endif
+#include "glean/lmdb/ffi.h"
+
+using namespace facebook::hs;
+
+namespace facebook {
+namespace glean {
+namespace lmdb {
+namespace c {
+extern "C" {
+
+const char*
+glean_lmdb_container_open(const char* path, int mode, Container** container) {
+  return ffi::wrap([=] {
+    *container = lmdb::open(path, static_cast<lmdb::Mode>(mode)).release();
+  });
+}
+
+const char* glean_lmdb_container_open_database(
+    Container* container,
+    glean_fact_id_t start,
+    uint32_t first_unit_id,
+    int64_t version,
+    Database** database) {
+  return ffi::wrap([=] {
+    *database = std::move(*container)
+                    .openDatabase(Id::fromThrift(start), first_unit_id, version)
+                    .release();
+  });
+}
+}
+} // namespace c
+} // namespace lmdb
+} // namespace glean
+} // namespace facebook
diff --git a/glean/lmdb/ffi.h b/glean/lmdb/ffi.h
new file mode 100644
--- /dev/null
+++ b/glean/lmdb/ffi.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+#pragma once
+
+#include "glean/lmdb/glean_lmdb.h"
+#include "glean/rts/ffi.h"
+#include "glean/storage/db.h"
+
+#ifdef __cplusplus
+namespace facebook {
+namespace glean {
+namespace lmdb {
+namespace c {
+using namespace facebook::glean::rts;
+using namespace facebook::glean::rts::c;
+using namespace facebook::glean::db;
+
+extern "C" {
+#endif
+
+typedef struct SharedCache SharedCache;
+
+const char*
+glean_lmdb_container_open(const char* path, int mode, Container** container);
+
+const char* glean_lmdb_container_open_database(
+    Container* container,
+    glean_fact_id_t start,
+    uint32_t first_unit_id,
+    int64_t version,
+    Database** db);
+
+#ifdef __cplusplus
+}
+}
+}
+}
+}
+#endif
diff --git a/glean/lmdb/glean_lmdb.cpp b/glean/lmdb/glean_lmdb.cpp
new file mode 100644
--- /dev/null
+++ b/glean/lmdb/glean_lmdb.cpp
@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+#include "glean/lmdb/glean_lmdb.h"
+#include "glean/lmdb/container-impl.h"
+
+namespace facebook {
+namespace glean {
+namespace lmdb {
+
+std::unique_ptr<Container> open(const std::string& path, Mode mode) {
+  return std::make_unique<impl::ContainerImpl>(path, mode);
+}
+
+} // namespace lmdb
+} // namespace glean
+} // namespace facebook
diff --git a/glean/lmdb/glean_lmdb.h b/glean/lmdb/glean_lmdb.h
new file mode 100644
--- /dev/null
+++ b/glean/lmdb/glean_lmdb.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+#pragma once
+
+#include "glean/storage/db.h"
+
+namespace facebook {
+namespace glean {
+namespace lmdb {
+
+using namespace facebook::glean::db;
+
+using rts::Id;
+using rts::Pid;
+
+std::unique_ptr<Container> open(const std::string& path, Mode mode);
+
+void restore(const std::string& target, const std::string& source);
+
+} // namespace lmdb
+} // namespace glean
+} // namespace facebook
diff --git a/glean/lmdb/util.h b/glean/lmdb/util.h
new file mode 100644
--- /dev/null
+++ b/glean/lmdb/util.h
@@ -0,0 +1,190 @@
+/*
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+#pragma once
+
+#include "glean/rts/binary.h"
+#include "glean/rts/error.h"
+#include "lmdb.h"
+
+namespace facebook {
+namespace glean {
+namespace lmdb {
+namespace impl {
+
+[[noreturn]] inline void error(int s) {
+  rts::error("lmdb: {}", mdb_strerror(s));
+}
+
+inline void check(int status) {
+  if (status != MDB_SUCCESS) {
+    error(status);
+  }
+}
+
+inline MDB_val mdbVal(folly::ByteRange r) {
+  return {r.size(), const_cast<unsigned char*>(r.data())};
+}
+
+inline folly::ByteRange byteRange(MDB_val v) {
+  return folly::ByteRange(
+      const_cast<const unsigned char*>(
+          reinterpret_cast<unsigned char*>(v.mv_data)),
+      v.mv_size);
+}
+
+struct Cursor;
+
+// A transaction, normally created by container.txn_read() or
+// container.txn_write().  For a read transaction you can just let it
+// go out of scope and mdb_txn_abort() will be called for you; for a
+// write transaction you should call txn.commit() at the end of
+// writing.
+
+struct Txn {
+  Txn(MDB_env* env, unsigned int flags = 0) : txn(nullptr, &mdb_txn_abort) {
+    MDB_txn* t;
+    check(mdb_txn_begin(env, NULL, flags, &t));
+    txn.reset(t);
+  }
+
+  bool get(MDB_dbi db, folly::ByteRange k, folly::ByteRange& v) {
+    MDB_val key = mdbVal(k);
+    MDB_val val;
+    int s = mdb_get(txn.get(), db, &key, &val);
+    if (s == MDB_SUCCESS) {
+      v = byteRange(val);
+      return true;
+    } else if (s == MDB_NOTFOUND) {
+      return false;
+    } else {
+      check(s);
+      return false;
+    }
+  }
+
+  void put(MDB_dbi db, folly::ByteRange k, folly::ByteRange v) {
+    MDB_val key = mdbVal(k), val = mdbVal(v);
+    check(mdb_put(txn.get(), db, &key, &val, 0));
+  }
+
+  Cursor cursor(MDB_dbi dbi);
+
+  MDB_txn* ptr() {
+    return txn.get();
+  }
+
+  void commit() {
+    if (txn) {
+      check(mdb_txn_commit(txn.release()));
+    }
+  }
+
+ private:
+  std::unique_ptr<MDB_txn, decltype(&mdb_txn_abort)> txn;
+};
+
+// A cursor for scanning DB entries, created by txn.cursor().
+
+struct Cursor {
+  Cursor(MDB_txn* txn, MDB_dbi dbi) : cursor(nullptr, &mdb_cursor_close) {
+    MDB_cursor* c;
+    check(mdb_cursor_open(txn, dbi, &c));
+    cursor.reset(c);
+  }
+
+  bool seek_first() {
+    return seek_op(MDB_FIRST);
+  }
+
+  bool seek_last() {
+    return seek_op(MDB_LAST);
+  }
+
+  bool seek_op(MDB_cursor_op op) {
+    int s = mdb_cursor_get(cursor.get(), &key_, &value_, op);
+    if (s == MDB_SUCCESS) {
+      valid_ = true;
+    } else if (s == MDB_NOTFOUND) {
+      valid_ = false;
+    } else {
+      check(s);
+    }
+    return valid_;
+  }
+
+  bool seek_key(folly::ByteRange key) {
+    key_ = mdbVal(key);
+    return seek_op(MDB_SET_RANGE);
+  }
+
+  // Seek to the greatest item less than or equal to the key
+  bool seek_key_lower(folly::ByteRange k) {
+    if (!seek_key(k)) {
+      return seek_last();
+    } else if (key() != k) {
+      return prev();
+    }
+    return true;
+  }
+
+  // only for MDB_DUPSORT
+  bool seek_both(folly::ByteRange key, folly::ByteRange value) {
+    key_ = mdbVal(key);
+    value_ = mdbVal(value);
+    if (seek_op(MDB_GET_BOTH)) {
+      // apparently doesn't set key/value, therefore we need:
+      return seek_op(MDB_GET_CURRENT);
+    } else {
+      return false;
+    }
+  }
+
+  bool next() {
+    return seek_op(MDB_NEXT);
+  }
+  bool next_dup() {
+    return seek_op(MDB_NEXT_DUP);
+  }
+
+  bool prev() {
+    return seek_op(MDB_PREV);
+  }
+  bool prev_dup() {
+    return seek_op(MDB_PREV_DUP);
+  }
+
+  bool valid() {
+    return valid_;
+  }
+
+  folly::ByteRange key() {
+    return byteRange(key_);
+  }
+  folly::ByteRange value() {
+    return byteRange(value_);
+  }
+
+  MDB_cursor* ptr() {
+    return cursor.get();
+  }
+
+ private:
+  std::unique_ptr<MDB_cursor, decltype(&mdb_cursor_close)> cursor;
+  MDB_val key_, value_;
+  bool valid_;
+};
+
+inline Cursor Txn::cursor(MDB_dbi dbi) {
+  return Cursor(txn.get(), dbi);
+}
+
+} // namespace impl
+} // namespace lmdb
+} // namespace glean
+} // namespace facebook
diff --git a/glean/rocksdb/container-impl.cpp b/glean/rocksdb/container-impl.cpp
--- a/glean/rocksdb/container-impl.cpp
+++ b/glean/rocksdb/container-impl.cpp
@@ -187,15 +187,14 @@
       if (auto family = Family::family(name)) {
         rocksdb::ColumnFamilyOptions opts(options);
         family->options(opts);
-        existing.push_back(rocksdb::ColumnFamilyDescriptor(name, opts));
+        existing.emplace_back(name, opts);
         ptrs.push_back(&families[family->index]);
       } else {
         rts::error("Unknown column family '{}'", name);
       }
     }
   }
-  existing.push_back(rocksdb::ColumnFamilyDescriptor(
-      rocksdb::kDefaultColumnFamilyName, options));
+  existing.emplace_back(rocksdb::kDefaultColumnFamilyName, options);
   ptrs.push_back(nullptr);
 
   std::vector<rocksdb::ColumnFamilyHandle*> hs;
@@ -264,22 +263,6 @@
 void ContainerImpl::writeData(folly::ByteRange key, folly::ByteRange value) {
   requireOpen();
   check(db->Put(writeOptions, family(Family::meta), slice(key), slice(value)));
-}
-
-bool ContainerImpl::readData(
-    folly::ByteRange key,
-    std::function<void(folly::ByteRange)> f) {
-  requireOpen();
-  rocksdb::PinnableSlice val;
-  auto s =
-      db->Get(rocksdb::ReadOptions(), family(Family::meta), slice(key), &val);
-  if (s.IsNotFound()) {
-    return false;
-  } else {
-    check(s);
-    f(byteRange(val));
-    return true;
-  }
 }
 
 void ContainerImpl::optimize(bool compact) {
diff --git a/glean/rocksdb/container-impl.h b/glean/rocksdb/container-impl.h
--- a/glean/rocksdb/container-impl.h
+++ b/glean/rocksdb/container-impl.h
@@ -32,6 +32,9 @@
 
   Family(const Family&) = delete;
   Family& operator=(const Family&) = delete;
+  ~Family() = default;
+  Family(Family&&) = delete;
+  Family& operator=(Family&&) = delete;
 
   static std::vector<const Family*> families;
 
@@ -76,6 +79,51 @@
   }
 };
 
+struct Iterator {
+  Iterator() {}
+
+  Iterator(rocksdb::DB* db, rocksdb::ColumnFamilyHandle* f)
+      : iter(db->NewIterator(rocksdb::ReadOptions(), f)) {
+    if (!iter) {
+      rts::error("rocksdb: couldn't allocate iterator");
+    }
+  }
+
+  void seek_first() {
+    iter->SeekToFirst();
+  }
+  void seek_last() {
+    iter->SeekToLast();
+  }
+  void seek_key(folly::ByteRange key) {
+    iter->Seek(slice(key));
+  }
+  void seek_key_lower(folly::ByteRange key) {
+    iter->SeekForPrev(slice(key));
+  };
+
+  void next() {
+    iter->Next();
+  }
+  void prev() {
+    iter->Prev();
+  }
+
+  bool valid() {
+    return iter->Valid();
+  }
+
+  folly::ByteRange key() {
+    return byteRange(iter->key());
+  }
+  folly::ByteRange value() {
+    return byteRange(iter->value());
+  }
+
+ private:
+  std::unique_ptr<rocksdb::Iterator> iter;
+};
+
 struct ContainerImpl final : Container {
   Mode mode;
   rocksdb::Options options;
@@ -84,6 +132,9 @@
   std::vector<rocksdb::ColumnFamilyHandle*> families;
   std::shared_ptr<rocksdb::Statistics> statistics;
 
+  using Family = impl::Family;
+  using Iterator = impl::Iterator;
+
   ContainerImpl(
       const std::string& path,
       Mode m,
@@ -111,11 +162,50 @@
   void writeData(folly::ByteRange key, folly::ByteRange value) override;
 
   bool readData(folly::ByteRange key, std::function<void(folly::ByteRange)> f)
-      override;
+      override {
+    return get(Family::meta, key, f);
+  }
 
   void optimize(bool compact) override;
 
   rocksdb::ColumnFamilyHandle* family(const Family& family) const;
+
+  Iterator read(const Family& f) {
+    return Iterator(db.get(), family(f));
+  }
+
+  template <typename F>
+  bool get(const Family& fam, folly::ByteRange key, F&& f) {
+    rocksdb::PinnableSlice val;
+    auto s = db->Get(rocksdb::ReadOptions(), family(fam), slice(key), &val);
+    if (s.IsNotFound()) {
+      return false;
+    } else {
+      check(s);
+      std::forward<F>(f)(byteRange(val));
+      return true;
+    }
+  }
+
+  struct Writer {
+    Writer(ContainerImpl& c, unsigned int flags = 0) : container_(c) {}
+
+    void put(const Family& f, folly::ByteRange k, folly::ByteRange v) {
+      check(batch.Put(container_.family(f), slice(k), slice(v)));
+    }
+
+    void commit() {
+      check(container_.db->Write(container_.writeOptions, &batch));
+    }
+
+   private:
+    ContainerImpl& container_;
+    rocksdb::WriteBatch batch;
+  };
+
+  Writer write() {
+    return Writer(*this);
+  }
 };
 
 } // namespace impl
diff --git a/glean/rocksdb/database-impl.cpp b/glean/rocksdb/database-impl.cpp
--- a/glean/rocksdb/database-impl.cpp
+++ b/glean/rocksdb/database-impl.cpp
@@ -63,7 +63,7 @@
     Id start,
     UsetId first_unit_id_,
     int64_t version)
-    : container_(std::move(c)) {
+    : DatabaseCommon<ContainerImpl>(std::move(c)) {
   starting_id = Id::fromWord(initAdminValue(
       container_,
       AdminId::STARTING_ID,
@@ -305,9 +305,10 @@
 
 } // namespace
 
-std::unique_ptr<rts::FactIterator>
-DatabaseImpl::seek(Pid type, folly::ByteRange start, size_t prefix_size) {
-  assert(prefix_size <= start.size());
+std::unique_ptr<rts::FactIterator> DatabaseImpl::seek(
+    Pid type,
+    folly::ByteRange prefix,
+    std::optional<rts::Fact::Ref> restart) {
   if (count(type).high() == 0) {
     return std::make_unique<EmptyIterator>();
   }
@@ -316,22 +317,28 @@
   binary::Output out;
   out.fixed(type);
   const auto type_size = out.size();
-  out.put(start);
+
+  if (restart.has_value()) {
+    auto fact = restart.value();
+    out.put(fact.clause.key());
+  } else {
+    out.put(prefix);
+  }
   return std::make_unique<SeekIterator>(
-      out.bytes(), type_size + prefix_size, type, this);
+      out.bytes(), type_size + prefix.size(), type, this);
 }
 
 std::unique_ptr<rts::FactIterator> DatabaseImpl::seekWithinSection(
     Pid type,
-    folly::ByteRange start,
-    size_t prefix_size,
+    folly::ByteRange prefix,
     Id from,
-    Id upto) {
+    Id upto,
+    std::optional<rts::Fact::Ref> restart) {
   if (upto <= startingId() || firstFreeId() <= from) {
     return std::make_unique<EmptyIterator>();
   }
 
-  return Section(this, from, upto).seek(type, start, prefix_size);
+  return Section(this, from, upto).seek(type, prefix, restart);
 }
 
 namespace {
@@ -373,10 +380,10 @@
   Fact::Ref get(Demand /*unused*/) override {
     return iter_->Valid()
         ? decomposeFact(
-              Id::fromWord(
-                  loadTrustedNat(reinterpret_cast<const unsigned char*>(
-                                     iter_->key().data()))
-                      .first),
+              Id::fromWord(loadTrustedNat(
+                               reinterpret_cast<const unsigned char*>(
+                                   iter_->key().data()))
+                               .first),
               iter_->value())
         : Fact::Ref::invalid();
   }
@@ -530,6 +537,52 @@
   next_id = first_free_id;
 
   stats_.set(std::move(new_stats));
+}
+
+rts::OwnershipStats DatabaseImpl::getOwnershipStats() {
+  rocksdb::Range range(toSlice(""), toSlice("\xff"));
+  uint64_t units_size, unit_ids_size, sets_size, owners_size, num_owners,
+      owner_pages_size, num_owner_pages;
+  auto& db = container_.db;
+  rocksdb::FlushOptions opts;
+  db->Flush(
+      opts,
+      {container_.family(Family::ownershipUnits),
+       container_.family(Family::ownershipUnitIds),
+       container_.family(Family::ownershipSets),
+       container_.family(Family::factOwners),
+       container_.family(Family::factOwnerPages)});
+  check(db->GetApproximateSizes(
+      container_.family(Family::ownershipUnits), &range, 1, &units_size));
+  check(db->GetApproximateSizes(
+      container_.family(Family::ownershipUnitIds), &range, 1, &unit_ids_size));
+  check(db->GetApproximateSizes(
+      container_.family(Family::ownershipSets), &range, 1, &sets_size));
+  db->GetIntProperty(
+      container_.family(Family::factOwners),
+      "rocksdb.estimate-num-keys",
+      &num_owners);
+  check(db->GetApproximateSizes(
+      container_.family(Family::factOwners), &range, 1, &owners_size));
+  db->GetIntProperty(
+      container_.family(Family::factOwnerPages),
+      "rocksdb.estimate-num-keys",
+      &num_owner_pages);
+  check(db->GetApproximateSizes(
+      container_.family(Family::factOwnerPages), &range, 1, &owner_pages_size));
+
+  OwnershipStats stats;
+  stats.num_units = nextUnitId() - first_unit_id; // accurate
+  stats.units_size = units_size + unit_ids_size; // estimate
+  stats.num_sets = next_uset_id - stats.num_units; // accurate
+  stats.sets_size = sets_size; // estimate
+  stats.num_owner_entries = num_owners + num_owner_pages; // estimate
+  stats.owners_size = owners_size + owner_pages_size; // estimate
+
+  auto orphans = readAdminValue<int64_t>(container_, AdminId::ORPHAN_FACTS);
+  stats.num_orphan_facts = orphans ? *orphans : -1;
+
+  return stats;
 }
 
 } // namespace impl
diff --git a/glean/rocksdb/database-impl.h b/glean/rocksdb/database-impl.h
--- a/glean/rocksdb/database-impl.h
+++ b/glean/rocksdb/database-impl.h
@@ -12,9 +12,11 @@
 
 #include "glean/rts/ownership/uset.h"
 
+#include "glean/storage/common.h"
+#include "glean/storage/stats.h"
+
 #include "glean/rocksdb/container-impl.h"
 #include "glean/rocksdb/rocksdb.h"
-#include "glean/rocksdb/stats.h"
 #include "glean/rocksdb/util.h"
 
 namespace facebook {
@@ -31,21 +33,12 @@
   ORPHAN_FACTS,
 };
 
-struct DatabaseImpl final : Database {
+struct DatabaseImpl final : DatabaseCommon<ContainerImpl> {
   int64_t db_version;
-  ContainerImpl container_;
   Id starting_id;
   Id next_id;
-  rts::UnitId first_unit_id;
-  rts::UsetId next_uset_id; // also next UnitId, since they share a namespace
   AtomicPredicateStats stats_;
-  std::vector<size_t> ownership_unit_counters;
-  folly::F14FastMap<uint64_t, size_t> ownership_derived_counters;
 
-  // Cached ownership sets, only used when writing.
-  // Note: must only be accessed under the write lock
-  std::unique_ptr<rts::Usets> usets_;
-
   explicit DatabaseImpl(
       ContainerImpl c,
       Id start,
@@ -56,6 +49,7 @@
   DatabaseImpl& operator=(const DatabaseImpl&) = delete;
   DatabaseImpl(DatabaseImpl&&) = delete;
   DatabaseImpl& operator=(DatabaseImpl&&) = delete;
+  ~DatabaseImpl() override = default;
 
   Container& container() noexcept override {
     return container_;
@@ -83,16 +77,16 @@
 
   std::unique_ptr<rts::FactIterator> enumerate(Id from, Id upto) override;
   std::unique_ptr<rts::FactIterator> enumerateBack(Id from, Id downto) override;
-  std::unique_ptr<rts::FactIterator>
-  seek(Pid type, folly::ByteRange start, size_t prefix_size) override;
+  std::unique_ptr<rts::FactIterator> seek(
+      Pid type,
+      folly::ByteRange prefix,
+      std::optional<rts::Fact::Ref> restart) override;
   std::unique_ptr<rts::FactIterator> seekWithinSection(
       Pid type,
-      folly::ByteRange start,
-      size_t prefix_size,
+      folly::ByteRange prefix,
       Id from,
-      Id upto) override;
-
-  rts::UsetId getOwner(Id id) override;
+      Id upto,
+      std::optional<rts::Fact::Ref> restart) override;
 
   /// stats
 
@@ -104,107 +98,9 @@
 
   bool lookupById(Id id, rocksdb::PinnableSlice& val) const;
 
-  std::vector<size_t> loadOwnershipUnitCounters();
-  folly::F14FastMap<uint64_t, size_t> loadOwnershipDerivedCounters();
-  std::unique_ptr<rts::Usets> loadOwnershipSets();
-
-  /// Ownership
-
-  folly::Optional<uint32_t> getUnitId(folly::ByteRange unit) override;
-  folly::Optional<std::string> getUnit(uint32_t unit_id) override;
-
-  void addOwnership(const std::vector<OwnershipSet>& ownership) override;
-
-  std::unique_ptr<rts::DerivedFactOwnershipIterator>
-  getDerivedFactOwnershipIterator(Pid pid) override;
-
-  std::unique_ptr<rts::OwnershipUnitIterator> getOwnershipUnitIterator()
-      override;
-
-  void storeOwnership(rts::ComputedOwnership& ownership) override;
-
-  std::unique_ptr<rts::Ownership> getOwnership() override;
-
-  void addDefineOwnership(rts::DefineOwnership& define) override;
-
-  // Cache for getOwner(Id)
-  //
-  // We start with an interval map stored in the factOwners column family. This
-  // is translated into a more efficient representation in factOwnerPages when
-  // the DB is finalized,
-  //
-  // The cache is split into pages each covering 2^PAGE_BITS Ids.
-  // The prefix of a page is Id >> PAGE_BITS.
-  //
-  // We're trying to trade-off:
-  //    - space overhead in the DB: group data into pages, and don't create
-  //      DB entries for empty pages.
-  //    - time to open a DB: the cache is populated lazily from the DB
-  //    - latency when the cache is cold: just one Get() to fetch a page
-  //    - as few DB lookups as possible: each lookup populates a whole page
-  //
-  // PageIndex
-  //    - stored as one blob in the DB, factOwnerPages["INDEX"]
-  //    - maps prefix -> maybe UsetId
-  //      - UsetId => all Ids in this page map to the same UsetId, which might
-  //      be INVALID_USET
-  //      - nothing => fetch the page
-  //    - the purpose of the index is to support the sparse interval maps we
-  //    will have in
-  //      stacked DBs. Otherwise we would need 250k entries in the PageStore for
-  //      a stacked DB where the base has 1B facts. With the index we just need
-  //      a 1MB index blob where a few of the pages will be populated.
-  //
-  // PageStore
-  //    - stored as prefix -> Page in the DB
-  //    - Each page is a table of intervals [(id1,set1), (id2,set2), ...],
-  //      split into two arrays because the IDs are 16 bits and we want that
-  //      array to be as compact as possible. See "struct Page" below.
-  //
-  // To find the UsetId for a given Id:
-  //    - look up the prefix in the index
-  //    - if the index contains a UsetId, that's the result
-  //    - otherwise fetch the Page for this prefix
-  //    - binary-search in the Page to find the correct interval
-
-  /// Enable the fact owner cache. This should only be called when the
-  // DB is read-only, and only after prepareFactOwnerCache().
-  void cacheOwnership() override;
-
-  /// Translate the data in factOwners into factOwnerPages. Do not call
-  // prepareFactOwnerCache() until the DB is complete.
-  void prepareFactOwnerCache() override;
-
-  struct FactOwnerCache {
-    static void prepare(ContainerImpl& container);
-    void enable(ContainerImpl& container);
-
-    // Lookup in the cache. Returns none if the cache is not enabled
-    std::optional<rts::UsetId> getOwner(ContainerImpl& container, Id id);
-
-   private:
-    struct Page {
-      std::vector<uint16_t> factIds;
-      std::vector<rts::UsetId> setIds;
-    };
-    static rts::UsetId lookup(const Page& page, Id id);
-    static std::unique_ptr<Page> readPage(
-        ContainerImpl& container,
-        uint64_t prefix);
-
-    struct Cache {
-      std::vector<rts::UsetId> index;
-      std::vector<std::unique_ptr<Page>> pages;
-
-      // tracks the memory usage of the cache
-      size_t size_;
-    };
-
-    // nullptr means the cache is disabled (while the DB is writable)
-    folly::Synchronized<std::unique_ptr<Cache>> cache_;
-  };
+  /// Ownership (most of this is in common.h)
 
-  FactOwnerCache factOwnerCache_;
+  OwnershipStats getOwnershipStats() override;
 };
 
 extern const char* admin_names[];
diff --git a/glean/rocksdb/ffi.cpp b/glean/rocksdb/ffi.cpp
--- a/glean/rocksdb/ffi.cpp
+++ b/glean/rocksdb/ffi.cpp
@@ -14,7 +14,6 @@
 #include <common/hs/util/cpp/wrap.h>
 #endif
 #include "glean/rocksdb/ffi.h"
-#include "glean/rocksdb/rocksdb.h"
 
 using namespace facebook::hs;
 
@@ -37,53 +36,11 @@
   ffi::free_(cache);
 }
 
-void glean_rocksdb_container_close(Container* container) {
-  container->close();
-}
-
-const char* glean_rocksdb_container_write_data(
-    Container* container,
-    const void* key,
-    size_t key_size,
-    const void* value,
-    size_t value_size) {
-  return ffi::wrap([=] {
-    container->writeData(
-        {static_cast<const unsigned char*>(key), key_size},
-        {static_cast<const unsigned char*>(value), value_size});
-  });
-}
-
-const char* glean_rocksdb_container_read_data(
-    Container* container,
-    const void* key,
-    size_t key_size,
-    void** value,
-    size_t* value_size,
-    unsigned char* found) {
-  return ffi::wrap([=] {
-    *found = container->readData(
-                 {static_cast<const unsigned char*>(key), key_size},
-                 [=](folly::ByteRange val) {
-                   auto bytes = ffi::clone_bytes(val);
-                   *value_size = bytes.size();
-                   *value = bytes.release();
-                 })
-        ? 1
-        : 0;
-  });
-}
-
-const char* glean_rocksdb_container_optimize(
-    Container* container,
-    bool compact) {
-  return ffi::wrap([=] { container->optimize(compact); });
-}
-
-const char* glean_rocksdb_container_backup(
-    Container* container,
-    const char* path) {
-  return ffi::wrap([=] { container->backup(path); });
+size_t glean_rocksdb_cache_capacity(SharedCache* cache) {
+  if (cache) {
+    return rocks::getCacheCapacity(cache->value);
+  }
+  return 0;
 }
 
 const char* glean_rocksdb_container_open(
@@ -105,9 +62,6 @@
                      .release();
   });
 }
-void glean_rocksdb_container_free(Container* container) {
-  ffi::free_(container);
-}
 
 const char* glean_rocksdb_container_open_database(
     Container* container,
@@ -121,124 +75,9 @@
                     .release();
   });
 }
-void glean_rocksdb_database_free(Database* db) {
-  ffi::free_(db);
-}
 
-Container* glean_rocksdb_database_container(Database* db) {
-  return &(db->container());
-}
-
-Lookup* glean_rocksdb_database_lookup(Database* db) {
-  return db;
-}
-
-const char* glean_rocksdb_commit(Database* db, FactSet* facts) {
-  return ffi::wrap([=] { db->commit(*facts); });
-}
-
-const char* glean_rocksdb_add_ownership(
-    Database* db,
-    size_t count,
-    const void** units,
-    const size_t* unit_sizes,
-    const int64_t** ids,
-    const size_t* id_sizes) {
-  return ffi::wrap([=] {
-    std::vector<Database::OwnershipSet> v;
-    v.reserve(count);
-    for (size_t i = 0; i < count; ++i) {
-      v.push_back(
-          {{static_cast<const unsigned char*>(units[i]), unit_sizes[i]},
-           {ids[i], id_sizes[i]}});
-    }
-    db->addOwnership(v);
-  });
-}
-
-const char* glean_rocksdb_get_ownership_unit_iterator(
-    Database* db,
-    OwnershipUnitIterator** iter) {
-  return ffi::wrap([=] { *iter = db->getOwnershipUnitIterator().release(); });
-}
-
-const char* glean_rocksdb_get_unit_id(
-    Database* db,
-    void* unit,
-    size_t unit_size,
-    uint64_t* unit_id) {
-  return ffi::wrap([=] {
-    auto res = db->getUnitId(folly::ByteRange(
-        reinterpret_cast<const unsigned char*>(unit), unit_size));
-    if (res.hasValue()) {
-      *unit_id = *res;
-    } else {
-      *unit_id = UINT64_MAX;
-    }
-  });
-}
-
-const char* glean_rocksdb_get_unit(
-    Database* db,
-    uint32_t unit_id,
-    void** unit,
-    size_t* unit_size) {
-  return ffi::wrap([=] {
-    auto res = db->getUnit(unit_id);
-    if (res.hasValue()) {
-      ffi::clone_bytes(*res).release_to(unit, unit_size);
-    } else {
-      *unit = nullptr;
-      *unit_size = 0;
-    }
-  });
-}
-
-const char* glean_rocksdb_database_predicateStats(
-    Database* db,
-    size_t* count,
-    int64_t** ids,
-    uint64_t** counts,
-    uint64_t** sizes) {
-  return ffi::wrap(
-      [=] { rts::marshal(db->predicateStats(), count, ids, counts, sizes); });
-}
-
 const char* glean_rocksdb_restore(const char* target, const char* source) {
   return ffi::wrap([=] { facebook::glean::rocks::restore(target, source); });
-}
-
-const char* glean_rocksdb_store_ownership(
-    Database* db,
-    ComputedOwnership* ownership) {
-  return ffi::wrap([=] { db->storeOwnership(*ownership); });
-}
-
-const char* glean_rocksdb_get_ownership(Database* db, Ownership** ownership) {
-  return ffi::wrap([=] { *ownership = db->getOwnership().release(); });
-}
-
-const char* glean_rocksdb_add_define_ownership(
-    Database* db,
-    DefineOwnership* define) {
-  return ffi::wrap([=] { db->addDefineOwnership(*define); });
-}
-
-const char* glean_rocksdb_get_derived_fact_ownership_iterator(
-    Database* db,
-    uint64_t pid,
-    DerivedFactOwnershipIterator** iter) {
-  return ffi::wrap([=] {
-    *iter = db->getDerivedFactOwnershipIterator(Pid::fromWord(pid)).release();
-  });
-}
-
-const char* glean_rocksdb_cache_ownership(Database* db) {
-  return ffi::wrap([=] { db->cacheOwnership(); });
-}
-
-const char* glean_rocksdb_prepare_fact_owner_cache(Database* db) {
-  return ffi::wrap([=] { db->prepareFactOwnerCache(); });
 }
 }
 } // namespace c
diff --git a/glean/rocksdb/ffi.h b/glean/rocksdb/ffi.h
--- a/glean/rocksdb/ffi.h
+++ b/glean/rocksdb/ffi.h
@@ -11,56 +11,28 @@
 #include "glean/rts/ffi.h"
 
 #ifdef __cplusplus
-namespace facebook {
-namespace glean {
-namespace rocks {
-#endif
-
-typedef struct Container Container;
-typedef struct Database Database;
-
-#ifdef __cplusplus
-}
-}
-}
-#endif
+#include "glean/rocksdb/rocksdb.h"
+#include "glean/storage/db.h"
 
-#ifdef __cplusplus
 namespace facebook {
 namespace glean {
 namespace rocks {
 namespace c {
 using namespace facebook::glean::rts;
 using namespace facebook::glean::rts::c;
+using namespace facebook::glean::db;
 
 extern "C" {
+#else
+typedef struct Container Container;
+typedef struct Database Database;
 #endif
 
 typedef struct SharedCache SharedCache;
 
 const char* glean_rocksdb_new_cache(size_t capacity, SharedCache** cache);
 void glean_rocksdb_free_cache(SharedCache* cache);
-
-void glean_rocksdb_container_close(Container* container);
-
-const char* glean_rocksdb_container_write_data(
-    Container* container,
-    const void* key,
-    size_t key_size,
-    const void* value,
-    size_t value_size);
-
-const char* glean_rocksdb_container_read_data(
-    Container* container,
-    const void* key,
-    size_t key_size,
-    void** value,
-    size_t* value_size,
-    unsigned char* found);
-
-const char* glean_rocksdb_container_optimize(Container* db, bool compact);
-
-const char* glean_rocksdb_container_backup(Container* db, const char* path);
+size_t glean_rocksdb_cache_capacity(SharedCache* cache);
 
 const char* glean_rocksdb_container_open(
     const char* path,
@@ -68,7 +40,6 @@
     bool cache_index_and_filter_blocks,
     SharedCache* cache,
     Container** container);
-void glean_rocksdb_container_free(Container* container);
 
 const char* glean_rocksdb_container_open_database(
     Container* container,
@@ -76,65 +47,8 @@
     uint32_t first_unit_id,
     int64_t version,
     Database** db);
-void glean_rocksdb_database_free(Database* db);
 
-Container* glean_rocksdb_database_container(Database* db);
-
-Lookup* glean_rocksdb_database_lookup(Database* db);
-
-const char* glean_rocksdb_commit(Database* db, FactSet* facts);
-
-const char* glean_rocksdb_add_ownership(
-    Database* db,
-    size_t count,
-    const void** units,
-    const size_t* unit_sizes,
-    const int64_t** ids,
-    const size_t* id_sizes);
-
-const char* glean_rocksdb_get_ownership_unit_iterator(
-    Database* db,
-    OwnershipUnitIterator** iter);
-
-const char* glean_rocksdb_get_unit_id(
-    Database* db,
-    void* unit,
-    size_t unit_size,
-    uint64_t* unit_id);
-
-const char* glean_rocksdb_get_unit(
-    Database* db,
-    uint32_t unit_id,
-    void** unit,
-    size_t* unit_size);
-
-const char* glean_rocksdb_database_predicateStats(
-    Database* db,
-    size_t* count,
-    int64_t** ids,
-    uint64_t** counts,
-    uint64_t** sizes);
-
 const char* glean_rocksdb_restore(const char* target, const char* source);
-
-const char* glean_rocksdb_store_ownership(
-    Database* db,
-    ComputedOwnership* ownership);
-
-const char* glean_rocksdb_get_ownership(Database* db, Ownership** ownership);
-
-const char* glean_rocksdb_add_define_ownership(
-    Database* db,
-    DefineOwnership* define);
-
-const char* glean_rocksdb_get_derived_fact_ownership_iterator(
-    Database* db,
-    uint64_t pid,
-    DerivedFactOwnershipIterator** iter);
-
-const char* glean_rocksdb_database_cache_ownership(Database* db);
-
-const char* glean_rocksdb_prepare_fact_owner_cache(Database* db);
 
 #ifdef __cplusplus
 }
diff --git a/glean/rocksdb/ownership.cpp b/glean/rocksdb/ownership.cpp
deleted file mode 100644
--- a/glean/rocksdb/ownership.cpp
+++ /dev/null
@@ -1,1045 +0,0 @@
-/*
- * Copyright (c) Meta Platforms, Inc. and affiliates.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-#ifdef OSS
-#include <cpp/memory.h> // @manual
-#else
-#include "common/hs/util/cpp/memory.h"
-#endif
-#include <glean/rts/ownership/uset.h>
-#include "glean/rocksdb/database-impl.h"
-#include "glean/rts/timer.h"
-
-namespace facebook {
-namespace glean {
-namespace rocks {
-namespace impl {
-
-using namespace rts;
-
-std::vector<size_t> DatabaseImpl::loadOwnershipUnitCounters() {
-  container_.requireOpen();
-  std::vector<size_t> result;
-
-  std::unique_ptr<rocksdb::Iterator> iter(container_.db->NewIterator(
-      rocksdb::ReadOptions(), container_.family(Family::ownershipRaw)));
-
-  if (!iter) {
-    rts::error("rocksdb: couldn't allocate iterator");
-  }
-
-  for (iter->SeekToFirst(); iter->Valid(); iter->Next()) {
-    binary::Input key(byteRange(iter->key()));
-    auto id = key.trustedNat();
-    if (id == first_unit_id + result.size()) {
-      result.push_back(1);
-    } else if (id + 1 == first_unit_id + result.size()) {
-      ++result.back();
-    } else {
-      rts::error("rocksdb: invalid ownershipUnits {} {}", id, result.size());
-    }
-  }
-
-  return result;
-}
-
-folly::F14FastMap<uint64_t, size_t>
-DatabaseImpl::loadOwnershipDerivedCounters() {
-  container_.requireOpen();
-  folly::F14FastMap<uint64_t, size_t> result;
-
-  std::unique_ptr<rocksdb::Iterator> iter(container_.db->NewIterator(
-      rocksdb::ReadOptions(), container_.family(Family::ownershipDerivedRaw)));
-
-  if (!iter) {
-    rts::error("rocksdb: couldn't allocate iterator");
-  }
-
-  for (iter->SeekToFirst(); iter->Valid(); iter->Next()) {
-    binary::Input key(byteRange(iter->key()));
-    auto pid = key.trustedNat();
-    const auto [i, _] = result.insert({pid, 0});
-    ++i->second;
-  }
-
-  VLOG(1) << "derived fact owners for " << result.size() << " pids";
-  return result;
-}
-
-namespace {
-
-void putOwnerSet(
-    ContainerImpl& container,
-    rocksdb::WriteBatch& batch,
-    UsetId id,
-    SetOp op,
-    const OwnerSet& set) {
-  binary::Output key;
-  key.nat(id);
-  binary::Output value;
-  value.nat(op);
-  serializeEliasFano(value, set);
-  check(batch.Put(
-      container.family(Family::ownershipSets), slice(key), slice(value)));
-}
-
-std::unique_ptr<rts::OwnershipSetIterator> getSetIterator(DatabaseImpl& db) {
-  struct SetIterator : rts::OwnershipSetIterator {
-    explicit SetIterator(
-        size_t first,
-        size_t size,
-        std::unique_ptr<rocksdb::Iterator> i)
-        : first_(first), size_(size), iter(std::move(i)) {}
-
-    folly::Optional<std::pair<UsetId, SetExpr<const OwnerSet*>>> get()
-        override {
-      if (!initial) {
-        iter->Next();
-      } else {
-        initial = false;
-      }
-      if (iter->Valid()) {
-        binary::Input key(byteRange(iter->key()));
-        auto usetid = key.trustedNat();
-        // EliasFano needs to be able to read 8 bytes past the end of
-        // the data, so we have to copy the bytes to add padding.
-        const size_t pad = 8;
-        bytes = hs::ffi::clone_array<uint8_t>(
-            reinterpret_cast<const uint8_t*>(iter->value().data()),
-            iter->value().size(),
-            pad);
-        binary::Input val(bytes.get(), iter->value().size());
-        exp.op = static_cast<SetOp>(val.trustedNat());
-        exp.set = deserializeEliasFano(val);
-        return std::pair<uint32_t, SetExpr<const OwnerSet*>>(
-            usetid, {exp.op, &exp.set});
-      } else {
-        return folly::none;
-      }
-    }
-
-    std::pair<size_t, size_t> sizes() const override {
-      return {first_, size_};
-    }
-
-    hs::ffi::malloced_array<uint8_t> bytes;
-    bool initial = true;
-    SetExpr<OwnerSet> exp;
-    size_t first_, size_;
-    std::unique_ptr<rocksdb::Iterator> iter;
-  };
-
-  std::unique_ptr<rocksdb::Iterator> iter(db.container_.db->NewIterator(
-      rocksdb::ReadOptions(), db.container_.family(Family::ownershipSets)));
-
-  if (!iter) {
-    rts::error("rocksdb: couldn't allocate ownership set iterator");
-  }
-
-  size_t first, last, size;
-
-  iter->SeekToLast();
-  if (!iter->Valid()) {
-    last = 0;
-  } else {
-    binary::Input key(byteRange(iter->key()));
-    last = key.trustedNat();
-  }
-
-  iter->SeekToFirst();
-  if (!iter->Valid()) {
-    first = db.next_uset_id;
-    size = 0;
-  } else {
-    binary::Input key(byteRange(iter->key()));
-    first = key.trustedNat();
-    size = last - first + 1;
-  }
-
-  return std::make_unique<SetIterator>(first, size, std::move(iter));
-}
-
-} // namespace
-
-std::unique_ptr<Usets> DatabaseImpl::loadOwnershipSets() {
-  auto t = makeAutoTimer("loadOwnershipSets");
-
-  auto iter = getSetIterator(*this);
-  auto pair = iter->sizes();
-  auto first = pair.first;
-  auto size = pair.second;
-
-  auto usets = std::make_unique<Usets>(first + size);
-
-  while (const auto pair = iter->get()) {
-    auto set = SetU32::fromEliasFano(*pair->second.set);
-    // paranoia: check the set contents make sense
-    set.foreach([first, size](UsetId id) {
-      if (id >= first + size) {
-        rts::error(
-            "invalid ownershipSets: id out of range: {} {} {}",
-            id,
-            first,
-            size);
-      }
-    });
-    auto p = usets->add(std::move(set), 0);
-    p->id = pair->first;
-  }
-  auto stats = usets->statistics();
-
-  LOG(INFO) << "loadOwnershipSets loaded " << stats.adds << " sets, "
-            << stats.bytes << " bytes";
-
-  return usets;
-}
-
-folly::Optional<uint32_t> DatabaseImpl::getUnitId(folly::ByteRange unit) {
-  rocksdb::PinnableSlice val;
-  auto s = container_.db->Get(
-      rocksdb::ReadOptions(),
-      container_.family(Family::ownershipUnits),
-      slice(unit),
-      &val);
-  if (!s.IsNotFound()) {
-    check(s);
-    assert(val.size() == sizeof(uint32_t));
-    return folly::loadUnaligned<uint32_t>(val.data());
-  } else {
-    return folly::none;
-  }
-}
-
-folly::Optional<std::string> DatabaseImpl::getUnit(uint32_t unit_id) {
-  rocksdb::PinnableSlice val;
-  EncodedNat key(unit_id);
-  auto s = container_.db->Get(
-      rocksdb::ReadOptions(),
-      container_.family(Family::ownershipUnitIds),
-      slice(key.byteRange()),
-      &val);
-  if (!s.IsNotFound()) {
-    check(s);
-    return val.ToString();
-  } else {
-    return folly::none;
-  }
-}
-
-// Called once per batch inside Store.commit.
-// Only function that can add new UnitIds to the DB.
-// Adds to
-//   - Family::ownershipUnits
-//   - Family::ownershipUnitIds
-//   - Family::ownershipRaw
-//   - Family::admin
-void DatabaseImpl::addOwnership(const std::vector<OwnershipSet>& ownership) {
-  container_.requireOpen();
-
-  if (ownership.empty()) {
-    return;
-  }
-
-  size_t new_count = 0;
-  std::vector<size_t> touched;
-  rocksdb::WriteBatch batch;
-
-  for (const auto& set : ownership) {
-    uint32_t unit_id;
-    auto res = getUnitId(set.unit);
-    if (res.hasValue()) {
-      unit_id = *res;
-      if (unit_id >= first_unit_id + ownership_unit_counters.size()) {
-        rts::error("inconsistent unit id {}", unit_id);
-      }
-      touched.push_back(unit_id);
-    } else {
-      unit_id = first_unit_id + ownership_unit_counters.size() + new_count;
-      check(batch.Put(
-          container_.family(Family::ownershipUnits),
-          slice(set.unit),
-          toSlice(unit_id)));
-      EncodedNat key(unit_id);
-      check(batch.Put(
-          container_.family(Family::ownershipUnitIds),
-          slice(key.byteRange()),
-          slice(set.unit)));
-      ++new_count;
-    }
-
-    binary::Output key;
-    key.nat(unit_id);
-    key.nat(
-        unit_id < first_unit_id + ownership_unit_counters.size()
-            ? ownership_unit_counters[unit_id - first_unit_id]
-            : 0);
-    check(batch.Put(
-        container_.family(Family::ownershipRaw),
-        slice(key),
-        rocksdb::Slice(
-            reinterpret_cast<const char*>(set.ids.data()),
-            set.ids.size() * sizeof(int64_t))));
-  }
-
-  if (new_count > 0) {
-    next_uset_id += new_count;
-    check(batch.Put(
-        container_.family(Family::admin),
-        toSlice(AdminId::NEXT_UNIT_ID),
-        toSlice(next_uset_id)));
-  }
-
-  check(container_.db->Write(container_.writeOptions, &batch));
-
-  for (auto i : touched) {
-    CHECK_LT(i, first_unit_id + ownership_unit_counters.size());
-    ++ownership_unit_counters[i - first_unit_id];
-  }
-  ownership_unit_counters.insert(ownership_unit_counters.end(), new_count, 1);
-  CHECK_EQ(next_uset_id, ownership_unit_counters.size() + first_unit_id);
-}
-
-std::unique_ptr<rts::DerivedFactOwnershipIterator>
-DatabaseImpl::getDerivedFactOwnershipIterator(Pid pid) {
-  struct DerivedFactIterator : rts::DerivedFactOwnershipIterator {
-    explicit DerivedFactIterator(Pid pid, std::unique_ptr<rocksdb::Iterator> i)
-        : pid_(pid), iter(std::move(i)) {}
-
-    folly::Optional<DerivedFactOwnership> get() override {
-      if (iter->Valid()) {
-        binary::Input key(byteRange(iter->key()));
-        auto pid = key.trustedNat();
-        if (pid != pid_.toWord()) {
-          return {};
-        }
-        const auto val = iter->value();
-        const size_t elts = val.size() / (sizeof(uint32_t) + sizeof(uint64_t));
-        const Id* ids = reinterpret_cast<const Id*>(val.data());
-        const UsetId* owners = reinterpret_cast<const UsetId*>(
-            val.data() + elts * sizeof(uint64_t));
-        iter->Next();
-        return rts::DerivedFactOwnership{{ids, elts}, {owners, elts}};
-      } else {
-        return folly::none;
-      }
-    }
-
-    Pid pid_;
-    std::unique_ptr<rocksdb::Iterator> iter;
-  };
-
-  std::unique_ptr<rocksdb::Iterator> iter(container_.db->NewIterator(
-      rocksdb::ReadOptions(), container_.family(Family::ownershipDerivedRaw)));
-
-  if (!iter) {
-    rts::error("rocksdb: couldn't allocate derived ownership iterator");
-  }
-
-  EncodedNat key(pid.toWord());
-  iter->Seek(slice(key.byteRange()));
-  return std::make_unique<DerivedFactIterator>(pid, std::move(iter));
-}
-
-std::unique_ptr<rts::OwnershipUnitIterator>
-DatabaseImpl::getOwnershipUnitIterator() {
-  struct UnitIterator : rts::OwnershipUnitIterator {
-    explicit UnitIterator(std::unique_ptr<rocksdb::Iterator> i)
-        : iter(std::move(i)) {}
-
-    folly::Optional<rts::OwnershipUnit> get() override {
-      if (iter->Valid()) {
-        binary::Input key(byteRange(iter->key()));
-        auto unit = key.trustedNat();
-        const auto val = iter->value();
-        iter->Next();
-        return rts::OwnershipUnit{
-            static_cast<uint32_t>(unit),
-            {reinterpret_cast<const OwnershipUnit::Ids*>(val.data()),
-             val.size() / sizeof(OwnershipUnit::Ids)}};
-      } else {
-        return {};
-      }
-    }
-
-    std::unique_ptr<rocksdb::Iterator> iter;
-  };
-  std::unique_ptr<rocksdb::Iterator> iter(container_.db->NewIterator(
-      rocksdb::ReadOptions(), container_.family(Family::ownershipRaw)));
-
-  if (!iter) {
-    rts::error("rocksdb: couldn't allocate ownership unit iterator");
-  }
-
-  iter->SeekToFirst();
-  return std::make_unique<UnitIterator>(std::move(iter));
-}
-
-void DatabaseImpl::storeOwnership(ComputedOwnership& ownership) {
-  container_.requireOpen();
-
-  if (ownership.sets_.size() > 0) {
-    auto t = makeAutoTimer("storeOwnership(sets)");
-    rocksdb::WriteBatch batch;
-
-    auto upper = ownership.sets_.getFirstId() + ownership.sets_.size();
-
-    auto serialized = ownership.sets_.toEliasFano(upper);
-    uint32_t id = ownership.sets_.getFirstId();
-    CHECK_GE(id, next_uset_id);
-
-    for (auto& exp : serialized) {
-      if ((id % 1000000) == 0) {
-        VLOG(1) << "storeOwnership: " << id;
-      }
-      putOwnerSet(container_, batch, id, exp.op, exp.set);
-      exp.set.free();
-      id++;
-    }
-
-    next_uset_id = upper;
-    check(batch.Put(
-        container_.family(Family::admin),
-        toSlice(AdminId::NEXT_UNIT_ID),
-        toSlice(next_uset_id)));
-
-    VLOG(1) << "storeOwnership: writing sets (" << ownership.sets_.size()
-            << ")";
-    check(container_.db->Write(container_.writeOptions, &batch));
-
-    if (usets_->size() == 0) {
-      // If usets_ is empty, then it will not have the correct firstId yet
-      usets_ = std::make_unique<Usets>(ownership.sets_.getFirstId());
-    }
-    usets_->append(std::move(ownership.sets_));
-  }
-
-  CHECK(usets_->size() == 0 || usets_->getNextId() == next_uset_id);
-  // TODO: better not add new units after storing sets, we should fail if that
-  // happens
-
-  if (ownership.facts_.size() > 0) {
-    auto t = makeAutoTimer("storeOwnership(facts)");
-
-    auto hasOwner = [&](EncodedNat key) -> bool {
-      rocksdb::PinnableSlice val;
-      auto s = container_.db->Get(
-          rocksdb::ReadOptions(),
-          container_.family(Family::factOwners),
-          slice(key.byteRange()),
-          &val);
-      if (!s.IsNotFound()) {
-        check(s);
-        return true;
-      } else {
-        return false;
-      }
-    };
-
-    rocksdb::WriteBatch batch;
-    for (uint64_t i = 0; i < ownership.facts_.size(); i++) {
-      auto id = ownership.facts_[i].first;
-      auto usetid = ownership.facts_[i].second;
-      EncodedNat key(id.toWord());
-      if (usetid != INVALID_USET || !hasOwner(key)) {
-        if (usetid != INVALID_USET) {
-          CHECK_LT(usetid, next_uset_id);
-        }
-        // This is an interval map, and we might be writing multiple sparse sets
-        // of intervals where the gaps are indicated by INVALID_USET. Therefore
-        // don't overwrite an existing owner with INVALID_USET.
-        EncodedNat val(usetid);
-        check(batch.Put(
-            container_.family(Family::factOwners),
-            slice(key.byteRange()),
-            slice(val.byteRange())));
-      }
-    }
-    VLOG(1) << "storeOwnership: writing facts: " << ownership.facts_.size()
-            << " intervals";
-    check(container_.db->Write(container_.writeOptions, &batch));
-  }
-}
-
-namespace {
-
-//
-// Wrapper around DatabaseImpl. Doesn't hold any extra data of its own.
-//
-struct StoredOwnership : Ownership {
-  explicit StoredOwnership(DatabaseImpl* db) : db_(db) {}
-
-  UsetId nextSetId() override {
-    return db_->next_uset_id;
-  }
-
-  UsetId lookupSet(Uset* uset) override {
-    if (!db_->usets_) {
-      rts::error("rocksdb: lookupSet on read-only DB");
-    } else {
-      auto existing = db_->usets_->lookup(uset);
-      if (existing) {
-        return existing->id;
-      } else {
-        return INVALID_USET;
-      }
-    }
-  }
-
-  folly::Optional<SetExpr<SetU32>> getUset(UsetId id) override {
-    rocksdb::PinnableSlice val;
-    EncodedNat key(id);
-    auto s = db_->container_.db->Get(
-        rocksdb::ReadOptions(),
-        db_->container_.family(Family::ownershipSets),
-        slice(key.byteRange()),
-        &val);
-    binary::Input inp(byteRange(val));
-    if (!s.IsNotFound()) {
-      check(s);
-      SetExpr<SetU32> exp;
-      exp.op = static_cast<SetOp>(inp.trustedNat());
-      exp.set = SetU32::fromEliasFano(deserializeEliasFano(inp));
-      return exp;
-    } else {
-      return folly::none;
-    }
-  }
-
-  std::unique_ptr<rts::OwnershipSetIterator> getSetIterator() override {
-    return impl::getSetIterator(*db_);
-  }
-
-  folly::Optional<UnitId> getUnitId(folly::ByteRange unit) override {
-    return db_->getUnitId(unit);
-  }
-
-  UnitId nextUnitId() {
-    std::unique_ptr<rocksdb::Iterator> iter(db_->container_.db->NewIterator(
-        rocksdb::ReadOptions(),
-        db_->container_.family(Family::ownershipUnitIds)));
-
-    if (!iter) {
-      rts::error("rocksdb: couldn't allocate ownershipUnitIds iterator");
-    }
-
-    size_t max_unit_id;
-
-    iter->SeekToLast();
-    if (!iter->Valid()) {
-      max_unit_id = db_->first_unit_id;
-    } else {
-      binary::Input key(byteRange(iter->key()));
-      max_unit_id = key.trustedNat();
-    }
-
-    return max_unit_id;
-  }
-
-  OwnershipStats getStats() override {
-    rocksdb::Range range(toSlice(""), toSlice("\xff"));
-    uint64_t units_size, unit_ids_size, sets_size, owners_size, num_owners,
-        owner_pages_size, num_owner_pages;
-    auto& db = db_->container_.db;
-    rocksdb::FlushOptions opts;
-    db->Flush(
-        opts,
-        {db_->container_.family(Family::ownershipUnits),
-         db_->container_.family(Family::ownershipUnitIds),
-         db_->container_.family(Family::ownershipSets),
-         db_->container_.family(Family::factOwners),
-         db_->container_.family(Family::factOwnerPages)});
-    check(db->GetApproximateSizes(
-        db_->container_.family(Family::ownershipUnits),
-        &range,
-        1,
-        &units_size));
-    check(db->GetApproximateSizes(
-        db_->container_.family(Family::ownershipUnitIds),
-        &range,
-        1,
-        &unit_ids_size));
-    check(db->GetApproximateSizes(
-        db_->container_.family(Family::ownershipSets), &range, 1, &sets_size));
-    db->GetIntProperty(
-        db_->container_.family(Family::factOwners),
-        "rocksdb.estimate-num-keys",
-        &num_owners);
-    check(db->GetApproximateSizes(
-        db_->container_.family(Family::factOwners), &range, 1, &owners_size));
-    db->GetIntProperty(
-        db_->container_.family(Family::factOwnerPages),
-        "rocksdb.estimate-num-keys",
-        &num_owner_pages);
-    check(db->GetApproximateSizes(
-        db_->container_.family(Family::factOwnerPages),
-        &range,
-        1,
-        &owner_pages_size));
-
-    OwnershipStats stats;
-    stats.num_units = nextUnitId() - db_->first_unit_id; // accurate
-    stats.units_size = units_size + unit_ids_size; // estimate
-    stats.num_sets = db_->next_uset_id - stats.num_units; // accurate
-    stats.sets_size = sets_size; // estimate
-    stats.num_owner_entries = num_owners + num_owner_pages; // estimate
-    stats.owners_size = owners_size + owner_pages_size; // estimate
-
-    auto orphans =
-        readAdminValue<int64_t>(db_->container_, AdminId::ORPHAN_FACTS);
-    stats.num_orphan_facts = orphans ? *orphans : -1;
-
-    return stats;
-  }
-
- private:
-  DatabaseImpl* db_;
-};
-
-} // namespace
-
-std::unique_ptr<rts::Ownership> DatabaseImpl::getOwnership() {
-  container_.requireOpen();
-  return std::make_unique<StoredOwnership>(this);
-}
-
-void DatabaseImpl::cacheOwnership() {
-  factOwnerCache_.enable(container_);
-}
-
-void DatabaseImpl::prepareFactOwnerCache() {
-  FactOwnerCache::prepare(container_);
-}
-
-UsetId DatabaseImpl::getOwner(Id id) {
-  auto cached = factOwnerCache_.getOwner(container_, id);
-
-  if (cached) {
-    return cached.value();
-  } else {
-    // cache is not enabled; fall back to reading from the DB.
-    std::unique_ptr<rocksdb::Iterator> iter(container_.db->NewIterator(
-        rocksdb::ReadOptions(), container_.family(Family::factOwners)));
-
-    EncodedNat key(id.toWord());
-    iter->SeekForPrev(slice(key.byteRange()));
-    if (iter->Valid()) {
-      binary::Input val(byteRange(iter->value()));
-      return val.trustedNat();
-    } else {
-      return INVALID_USET;
-    }
-  }
-}
-
-namespace {
-// key in factOwnerPages where we store the index
-static const std::string INDEX_KEY = "INDEX";
-
-// sentinel value in the index indicating that this prefix has a page in
-// factOwnerPages
-static const UsetId HAS_PAGE = SPECIAL_USET;
-
-// Note: this constant affects the data in the DB, so it can't be changed.
-static const size_t PAGE_BITS = 12;
-static const uint64_t PAGE_MASK = (1 << PAGE_BITS) - 1;
-} // namespace
-
-void DatabaseImpl::FactOwnerCache::enable(ContainerImpl& container) {
-  auto cache = cache_.ulock();
-  if (*cache) {
-    return;
-  }
-
-  rocksdb::PinnableSlice val;
-  auto s = container.db->Get(
-      rocksdb::ReadOptions(),
-      container.family(Family::factOwnerPages),
-      INDEX_KEY,
-      &val);
-  if (s.IsNotFound()) {
-    LOG(WARNING) << "cannot enable cache; missing INDEX";
-    // assume this is an old DB without factOwnerPages, we'll fall back
-    // to using factOwners.
-    return;
-  }
-
-  check(s);
-  CHECK_EQ(val.size() % sizeof(UsetId), 0);
-  size_t num = val.size() / sizeof(UsetId);
-  std::vector<UsetId> index(num);
-  const UsetId* start = reinterpret_cast<const UsetId*>(val.data());
-  std::copy(start, start + num, index.data());
-  size_t size = index.size() * sizeof(UsetId);
-  Cache content{
-      .index = std::move(index),
-      .pages = {},
-      .size_ = size,
-  };
-
-  VLOG(1) << folly::sformat("owner cache index: {} entries", num);
-
-  auto wcache = cache.moveFromUpgradeToWrite();
-  *wcache = std::make_unique<Cache>(std::move(content));
-}
-
-std::unique_ptr<DatabaseImpl::FactOwnerCache::Page>
-DatabaseImpl::FactOwnerCache::readPage(
-    ContainerImpl& container,
-    uint64_t prefix) {
-  rocksdb::PinnableSlice val;
-  auto s = container.db->Get(
-      rocksdb::ReadOptions(),
-      container.family(Family::factOwnerPages),
-      toSlice(prefix),
-      &val);
-  if (s.IsNotFound()) {
-    rts::error("missing page: {}", prefix);
-  } else {
-    check(s);
-  }
-
-  auto p = std::make_unique<FactOwnerCache::Page>();
-  size_t num = val.size() / (sizeof(int16_t) + sizeof(UsetId));
-  p->factIds.resize(num);
-  p->setIds.resize(num);
-  const uint16_t* ids = reinterpret_cast<const uint16_t*>(val.data());
-  const UsetId* sets =
-      reinterpret_cast<const UsetId*>(val.data() + num * sizeof(uint16_t));
-  std::copy(ids, ids + num, p->factIds.data());
-  std::copy(sets, sets + num, p->setIds.data());
-
-  return p;
-}
-
-UsetId DatabaseImpl::FactOwnerCache::lookup(
-    const DatabaseImpl::FactOwnerCache::Page& page,
-    Id id) {
-  // next binary-search on the content of the page to find the
-  // interval containing the desired fact ID.
-  uint32_t low, high, mid;
-  uint16_t ix = id.toWord() & PAGE_MASK;
-
-  low = 0;
-  high = page.factIds.size();
-
-  if (high == 0) {
-    rts::error("empty page");
-  }
-
-  // low is inclusive, high is exclusive
-  // low..high always contains an element that is <= id, if there is one
-  while (high - low > 1) {
-    mid = (high + low) / 2;
-    auto x = page.factIds[mid];
-    if (x == ix) {
-      return page.setIds[mid];
-    }
-    if (x < ix) {
-      low = mid;
-    } else {
-      high = mid;
-    }
-  }
-
-  if (page.factIds[low] <= ix) {
-    return page.setIds[low];
-  } else {
-    rts::error(
-        "missing lower bound, ix={} low={} prefix={}",
-        ix,
-        low,
-        id.toWord() >> PAGE_BITS);
-  }
-}
-
-std::optional<UsetId> DatabaseImpl::FactOwnerCache::getOwner(
-    ContainerImpl& container,
-    Id id) {
-  auto cachePtr = cache_.rlock();
-  auto cache = cachePtr->get();
-
-  if (!cache) {
-    return {};
-  }
-
-  // first find the right page
-  auto prefix = id.toWord() >> PAGE_BITS;
-
-  if (prefix >= cache->index.size()) {
-    // The DB may have no or partial ownership information, leading to a
-    // smaller than expected index, in which case the missing entries
-    // are facts with no ownership.
-    return INVALID_USET;
-  }
-  UsetId pageval = cache->index[prefix];
-  if (pageval != HAS_PAGE) {
-    return pageval;
-  }
-
-  const FactOwnerCache::Page* page;
-
-  // grab the Page from the cache, or read it from the DB
-  if (prefix < cache->pages.size() && cache->pages[prefix]) {
-    page = cache->pages[prefix].get();
-    cachePtr.unlock();
-  } else {
-    cachePtr.unlock();
-
-    auto p = FactOwnerCache::readPage(container, prefix);
-    auto wlock = cache_.wlock();
-    auto wcache = wlock->get();
-    auto size = wcache->size_;
-
-    if (prefix >= wcache->pages.size()) {
-      wcache->pages.resize(prefix + 1);
-    }
-    if (!wcache->pages[prefix]) {
-      wcache->size_ += p->factIds.size() * sizeof(uint16_t) +
-          p->setIds.size() * sizeof(UsetId) + sizeof(*p);
-      wcache->pages[prefix] = std::move(p);
-    }
-
-    VLOG(2) << "new page(" << prefix
-            << ") size = " << folly::prettyPrint(size, folly::PRETTY_BYTES_IEC);
-    page = wcache->pages[prefix].get();
-  }
-
-  return FactOwnerCache::lookup(*page, id);
-}
-
-void DatabaseImpl::FactOwnerCache::prepare(ContainerImpl& container) {
-  auto t = makeAutoTimer("prepareFactOwnerCache");
-
-  std::unique_ptr<rocksdb::Iterator> iter(container.db->NewIterator(
-      rocksdb::ReadOptions(), container.family(Family::factOwners)));
-
-  if (!iter) {
-    rts::error("rocksdb: couldn't allocate iterator");
-  }
-
-  iter->SeekToFirst();
-
-  std::vector<UsetId> index; // indexed by prefix
-  uint64_t prefix = 0; // prefix of the current page
-  UsetId set = INVALID_USET; // always the last set we saw
-  std::vector<uint16_t> ids; // in the current page
-  std::vector<UsetId> sets; // in the current page
-  size_t populated = 0; // for stats
-  int64_t orphaned = 0; // counts the orphan facts
-  rocksdb::WriteBatch batch;
-
-  auto writePage = [&]() {
-    if (ids.size() == 0) {
-      index.push_back(set);
-    } else {
-      index.push_back(HAS_PAGE);
-      binary::Output out;
-      out.bytes(ids.data(), ids.size() * sizeof(uint16_t));
-      out.bytes(sets.data(), sets.size() * sizeof(UsetId));
-      batch.Put(
-          container.family(Family::factOwnerPages),
-          toSlice(prefix),
-          slice(out));
-      ids.clear();
-      sets.clear();
-      populated++;
-    };
-  };
-
-  uint64_t prev = Id::lowest().toWord();
-  for (; iter->Valid(); iter->Next()) {
-    binary::Input key(byteRange(iter->key()));
-    uint64_t id = key.trustedNat();
-
-    uint64_t this_prefix = id >> PAGE_BITS;
-    uint16_t this_offset = id & PAGE_MASK;
-
-    if (this_prefix != prefix) {
-      for (; prefix < this_prefix; prefix++) {
-        writePage();
-      }
-    }
-    if (this_offset != 0 && ids.size() == 0) {
-      // fill in the lower bound with the previous set
-      ids.push_back(0);
-      sets.push_back(set);
-    }
-    if (set == INVALID_USET && id > prev) {
-      // track the number of orphaned facts
-      orphaned += id - prev;
-      VLOG(2) << folly::sformat("orphaned fact(s) {}-{}", prev, id - 1);
-    }
-
-    binary::Input val(byteRange(iter->value()));
-    set = val.trustedNat();
-    ids.push_back(this_offset);
-    sets.push_back(set);
-
-    prev = id;
-  }
-
-  // write the last page
-  writePage();
-
-  batch.Put(
-      container.family(Family::factOwnerPages),
-      INDEX_KEY,
-      slice(folly::ByteRange(
-          reinterpret_cast<const uint8_t*>(index.data()),
-          index.size() * sizeof(UsetId))));
-
-  t.logFormat(
-      "{} index entries, {} populated, {} orphans",
-      index.size(),
-      populated,
-      orphaned);
-
-  // record the number of orphaned facts, this will be fetched by ownershipStats
-  batch.Put(
-      container.family(Family::admin),
-      toSlice(AdminId::ORPHAN_FACTS),
-      toSlice(orphaned));
-
-  check(container.db->Write(container.writeOptions, &batch));
-}
-
-// Called once per batch. Can't be run in parallel.
-// Will add data into:
-// - Family::ownershipSets
-// - Family::ownershipDerivedRaw
-// - Family::admin
-void DatabaseImpl::addDefineOwnership(DefineOwnership& def) {
-  auto t = makeAutoTimer("addDefineOwnership");
-  container_.requireOpen();
-
-  VLOG(1) << "addDefineOwnership: " << def.usets_.size() << " sets";
-
-  // add new owner sets
-  if (def.newSets_.size() > 0) {
-    folly::F14FastMap<UsetId, UsetId> substitution;
-    auto subst = [&](uint32_t old) -> uint32_t {
-      auto n = substitution.find(old);
-      if (n == substitution.end()) {
-        return old;
-      } else {
-        return n->second;
-      }
-    };
-
-    rocksdb::WriteBatch batch;
-    size_t numNewSets = 0;
-
-    for (auto uset : def.newSets_) {
-      std::set<UsetId> s;
-      uset->exp.set.foreach([&](uint32_t elt) {
-        UsetId newelt = subst(elt);
-        if (newelt >= next_uset_id) {
-          rts::error(
-              "set id out of range: {} {} {}", newelt, next_uset_id, elt);
-        }
-        s.insert(newelt);
-      });
-      SetU32 set = SetU32::from(s);
-
-      auto newUset = std::make_unique<Uset>(std::move(set), uset->exp.op, 0);
-      auto p = newUset.get();
-      auto oldId = uset->id;
-      auto q = usets_->add(std::move(newUset));
-      if (p == q) {
-        usets_->promote(p);
-        assert(next_uset_id == p->id);
-        next_uset_id++;
-        auto ownerset = p->toEliasFano(next_uset_id);
-        putOwnerSet(container_, batch, p->id, ownerset.op, ownerset.set);
-        ownerset.set.free();
-        numNewSets++;
-      }
-      VLOG(2) << "rebased set " << oldId << " -> " << q->id;
-      substitution[oldId] = q->id;
-    }
-
-    if (numNewSets > 0) {
-      check(batch.Put(
-          container_.family(Family::admin),
-          toSlice(AdminId::NEXT_UNIT_ID),
-          toSlice(next_uset_id)));
-    }
-
-    VLOG(1) << "addDefineOwnership: writing sets (" << numNewSets << ")";
-    check(container_.db->Write(container_.writeOptions, &batch));
-
-    for (auto& [_, pred] : def.defines_) {
-      for (auto& owner : pred.owners_) {
-        owner = subst(owner);
-      }
-
-      for (auto& owner : pred.new_owners_) {
-        owner = subst(owner);
-      }
-    }
-  }
-
-  for (const auto& [pid, pred] : def) {
-    VLOG(1) << "addDefineOwnership: "
-            << pred.owners_.size() + pred.new_owners_.size()
-            << " owners, for pid " << pid.toWord();
-
-    // ownershipDerivedRaw :: (Pid,nat) -> vector<int64_t>
-    //
-    // Similarly to ownershipRaw, this is basically just an
-    // append-only log. The nat in the key is a per-Pid counter that
-    // we bump by one each time we add another batch of data for a
-    // Pid.
-
-    binary::Output key;
-    key.nat(pid.toWord());
-    const auto [it, _] = ownership_derived_counters.insert({pid.toWord(), 0});
-    key.nat(it->second++);
-
-    rocksdb::WriteBatch batch;
-
-    binary::Output val;
-
-    val.bytes(
-        pred.ids_.data(),
-        pred.ids_.size() *
-            sizeof(
-                std::remove_reference<decltype(pred.ids_)>::type::value_type));
-    val.bytes(
-        pred.new_ids_.data(),
-        pred.new_ids_.size() *
-            sizeof(std::remove_reference<
-                   decltype(pred.new_ids_)>::type::value_type));
-    val.bytes(
-        pred.owners_.data(),
-        pred.owners_.size() *
-            sizeof(std::remove_reference<
-                   decltype(pred.owners_)>::type::value_type));
-    val.bytes(
-        pred.new_owners_.data(),
-        pred.new_owners_.size() *
-            sizeof(std::remove_reference<
-                   decltype(pred.new_owners_)>::type::value_type));
-
-    check(batch.Put(
-        container_.family(Family::ownershipDerivedRaw),
-        slice(key),
-        slice(val)));
-
-    check(container_.db->Write(container_.writeOptions, &batch));
-
-    VLOG(1) << "addDefineOwnership wrote "
-            << pred.ids_.size() + pred.new_ids_.size() << " entries for pid "
-            << pid.toWord();
-  }
-}
-
-} // namespace impl
-} // namespace rocks
-} // namespace glean
-} // namespace facebook
diff --git a/glean/rocksdb/rocksdb.cpp b/glean/rocksdb/rocksdb.cpp
--- a/glean/rocksdb/rocksdb.cpp
+++ b/glean/rocksdb/rocksdb.cpp
@@ -7,6 +7,7 @@
  */
 
 #include "glean/rocksdb/rocksdb.h"
+#include <rocksdb/advanced_cache.h>
 #include "glean/rocksdb/container-impl.h"
 
 namespace facebook {
@@ -15,6 +16,13 @@
 
 std::shared_ptr<Cache> newCache(size_t capacity) {
   return rocksdb::NewLRUCache(capacity);
+}
+
+size_t getCacheCapacity(const std::shared_ptr<Cache>& cache) {
+  if (cache) {
+    return cache->GetCapacity();
+  }
+  return 0;
 }
 
 std::unique_ptr<Container> open(
diff --git a/glean/rocksdb/rocksdb.h b/glean/rocksdb/rocksdb.h
--- a/glean/rocksdb/rocksdb.h
+++ b/glean/rocksdb/rocksdb.h
@@ -15,6 +15,7 @@
 #include "glean/rts/ownership/derived.h"
 #include "glean/rts/stats.h"
 #include "glean/rts/store.h"
+#include "glean/storage/db.h"
 
 namespace rocksdb {
 class Cache;
@@ -25,86 +26,21 @@
 namespace glean {
 namespace rocks {
 
+using namespace facebook::glean::db;
+
 using rts::Id;
 using rts::Pid;
 
 using Cache = ::rocksdb::Cache;
 
 std::shared_ptr<Cache> newCache(size_t capacity);
-
-struct Database;
-
-/// A rocksdb container for storing facts
-struct Container {
-  virtual ~Container() {}
-
-  /// Close the 'Container' - accessing it afterwards isn't allowed.
-  virtual void close() noexcept = 0;
-
-  /// Write a key/value pair to the Container metadata.
-  virtual void writeData(folly::ByteRange key, folly::ByteRange value) = 0;
-
-  /// Lookup a key in the Container metadata.
-  virtual bool readData(
-      folly::ByteRange key,
-      std::function<void(folly::ByteRange)> f) = 0;
-
-  /// Optimise the container for reading
-  virtual void optimize(bool compact) = 0;
-
-  /// Backup the Container to the specified directory.
-  virtual void backup(const std::string& path) = 0;
-
-  /// Convert the Container to a full fact Database with the given
-  /// representation version - accessing the original Container afterwards isn't
-  /// allowed. If the database is being created, start is the starting fact id.
-  ///
-  /// The base Ownership passed in (if any) must not be destructed before the
-  /// Database.
-  virtual std::unique_ptr<Database>
-  openDatabase(Id start, rts::UsetId first_unit_id, int32_t version) && = 0;
-};
-
-enum class Mode { ReadOnly = 0, ReadWrite = 1, Create = 2 };
+size_t getCacheCapacity(const std::shared_ptr<Cache>& cache);
 
 std::unique_ptr<Container> open(
     const std::string& path,
     Mode mode,
     bool cache_index_and_filter_blocks,
     folly::Optional<std::shared_ptr<Cache>> cache);
-
-/// A rocksdb-based fact database
-struct Database : rts::Lookup {
-  virtual Container& container() noexcept = 0;
-
-  virtual rts::PredicateStats predicateStats() const = 0;
-
-  struct OwnershipSet {
-    folly::ByteRange unit;
-    folly::Range<const int64_t*> ids;
-    // This is a list of intervals [x1,x2, y1,y2, ...]
-    // representing the inclusive ranges x1..x2, y1..y2, ...
-  };
-
-  virtual void commit(rts::FactSet& facts) = 0;
-
-  virtual void addOwnership(const std::vector<OwnershipSet>& ownership) = 0;
-  virtual std::unique_ptr<rts::OwnershipUnitIterator>
-  getOwnershipUnitIterator() = 0;
-
-  virtual void addDefineOwnership(rts::DefineOwnership& def) = 0;
-  virtual std::unique_ptr<rts::DerivedFactOwnershipIterator>
-  getDerivedFactOwnershipIterator(Pid pid) = 0;
-
-  virtual folly::Optional<uint32_t> getUnitId(folly::ByteRange) = 0;
-  virtual folly::Optional<std::string> getUnit(uint32_t) = 0;
-
-  virtual void storeOwnership(rts::ComputedOwnership& ownership) = 0;
-  virtual std::unique_ptr<rts::Ownership> getOwnership() = 0;
-
-  virtual void cacheOwnership() = 0;
-  virtual void prepareFactOwnerCache() = 0;
-};
 
 void restore(const std::string& target, const std::string& source);
 
diff --git a/glean/rocksdb/stats.cpp b/glean/rocksdb/stats.cpp
deleted file mode 100644
--- a/glean/rocksdb/stats.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) Meta Platforms, Inc. and affiliates.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-#include "glean/rocksdb/stats.h"
-
-#include <folly/synchronization/Hazptr.h>
-
-namespace facebook {
-namespace glean {
-namespace rocks {
-
-struct AtomicPredicateStats::Impl {
-  // This needs to be protected by a hazard poiter for access. We support reads
-  // concurrent to a write but not concurrent writes and a write replaces the
-  // entire object so a hazptr is sufficient.
-  struct Holder : folly::hazptr_obj_base<Holder> {
-    PredicateStats stats;
-
-    explicit Holder(PredicateStats s) : stats(std::move(s)) {}
-  };
-
-  std::atomic<Holder*> holder = new Holder({});
-
-  // We have a separate cohort for each DB - the stats objects we create
-  // are local to the DB so they should be destroyed when the DB object is
-  // destroyed at the latest.
-  folly::hazptr_obj_cohort<> cohort;
-};
-
-AtomicPredicateStats::AtomicPredicateStats() : impl(std::make_unique<Impl>()) {}
-
-AtomicPredicateStats::~AtomicPredicateStats() {
-  delete impl->holder.load();
-}
-
-void AtomicPredicateStats::set(PredicateStats stats) {
-  auto p = new Impl::Holder(std::move(stats));
-  p->set_cohort_tag(&impl->cohort);
-  p = impl->holder.exchange(p);
-  if (p) {
-    p->retire();
-  }
-}
-
-const PredicateStats& AtomicPredicateStats::unprotected() const {
-  return impl->holder.load()->stats;
-}
-
-PredicateStats AtomicPredicateStats::get() const {
-  folly::hazptr_local<1> hptr;
-  return hptr[0].protect(impl->holder)->stats;
-}
-
-size_t AtomicPredicateStats::count(rts::Pid pid) const {
-  folly::hazptr_local<1> hptr;
-  if (auto stat = hptr[0].protect(impl->holder)->stats.get(pid)) {
-    return stat->count;
-  } else {
-    return {};
-  }
-}
-
-} // namespace rocks
-} // namespace glean
-} // namespace facebook
diff --git a/glean/rocksdb/stats.h b/glean/rocksdb/stats.h
deleted file mode 100644
--- a/glean/rocksdb/stats.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) Meta Platforms, Inc. and affiliates.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-#pragma once
-
-#include "glean/rts/densemap.h"
-#include "glean/rts/id.h"
-#include "glean/rts/stats.h"
-
-namespace facebook {
-namespace glean {
-namespace rocks {
-
-using PredicateStats = rts::DenseMap<rts::Pid, rts::MemoryStats>;
-
-/// Atomic access to predicate stats. This is completely encapsulated here
-/// mostly because including Hazptr.h needs RTTI, but we have to compile the
-/// rest of rocksdb.cpp with -fno-rtti because some pre-compiled RocksDB
-/// packages are compiled with -fno-rtti and otherwise we get linker errors.
-class AtomicPredicateStats {
- public:
-  AtomicPredicateStats();
-  ~AtomicPredicateStats();
-
-  void set(PredicateStats stats);
-  PredicateStats get() const;
-  size_t count(rts::Pid pid) const;
-
-  const PredicateStats& unprotected() const;
-
- private:
-  struct Impl;
-  std::unique_ptr<Impl> impl;
-};
-
-} // namespace rocks
-} // namespace glean
-} // namespace facebook
diff --git a/glean/rts/benchmarking/factblock.cpp b/glean/rts/benchmarking/factblock.cpp
--- a/glean/rts/benchmarking/factblock.cpp
+++ b/glean/rts/benchmarking/factblock.cpp
@@ -91,7 +91,7 @@
 
 bool FactBlock::seekToEach(Lookup& lookup) const {
   for (const auto fact : *this) {
-    auto iter = lookup.seek(fact.type, fact.key(), 0);
+    auto iter = lookup.seek(fact.type, fact.key());
     auto ref = iter->get(FactIterator::Demand::KeyOnly);
     if (ref.id != fact.id) {
       return false;
diff --git a/glean/rts/benchmarking/ffi.cpp b/glean/rts/benchmarking/ffi.cpp
--- a/glean/rts/benchmarking/ffi.cpp
+++ b/glean/rts/benchmarking/ffi.cpp
@@ -83,7 +83,7 @@
   return ffi::wrap([=] {
     size_t n = 0;
     for (size_t i = 0; i < pids_count; ++i) {
-      auto iter = lookup->seek(Pid::fromThrift(pids[i]), {}, 0);
+      auto iter = lookup->seek(Pid::fromThrift(pids[i]), {});
       while (auto ref = iter->get(FactIterator::Demand::KeyOnly)) {
         ++n;
         iter->next();
diff --git a/glean/rts/benchmarking/ffi.h b/glean/rts/benchmarking/ffi.h
--- a/glean/rts/benchmarking/ffi.h
+++ b/glean/rts/benchmarking/ffi.h
@@ -14,7 +14,7 @@
 namespace facebook::glean::rts::benchmarking {
 #endif
 
-// @lint-ignore-every CLANGTIDY facebook-hte-Typedef
+// @lint-ignore-every CLANGTIDY modernize-use-using
 typedef struct FactBlock FactBlock;
 
 #ifdef __cplusplus
diff --git a/glean/rts/bytecode/subroutine.cpp b/glean/rts/bytecode/subroutine.cpp
--- a/glean/rts/bytecode/subroutine.cpp
+++ b/glean/rts/bytecode/subroutine.cpp
@@ -383,8 +383,9 @@
   serialize::put(out, sub.code, serialize::AsBytes{});
   serialize::put(out, (uint64_t)(pc - sub.code.data()));
   serialize::put(out, sub.literals);
-  const folly::Range<const uint64_t*> locals{frame() + sub.inputs, sub.locals};
-  serialize::put(out, locals);
+  const folly::Range<const uint64_t*> localValues{
+      frame() + sub.inputs, sub.locals};
+  serialize::put(out, localValues);
   serialize::put(out, sub.inputs);
   const folly::Range<const binary::Output*> outputs{
       reinterpret_cast<const binary::Output*>(this + 1), sub.outputs};
diff --git a/glean/rts/bytecode/subroutine.h b/glean/rts/bytecode/subroutine.h
--- a/glean/rts/bytecode/subroutine.h
+++ b/glean/rts/bytecode/subroutine.h
@@ -87,9 +87,14 @@
       alignas(Activation) unsigned char buf[byteSize(sub)];
       struct Guard {
         Activation* ptr;
+        explicit Guard(Activation* p) : ptr(p) {}
         ~Guard() {
           ptr->~Activation();
         }
+        Guard(const Guard&) = delete;
+        Guard& operator=(const Guard&) = delete;
+        Guard(Guard&&) = delete;
+        Guard& operator=(Guard&&) = delete;
       };
       Guard guard{new (buf) Activation(sub, context)};
       return std::forward<F>(f)(*guard.ptr);
diff --git a/glean/rts/cache.cpp b/glean/rts/cache.cpp
--- a/glean/rts/cache.cpp
+++ b/glean/rts/cache.cpp
@@ -227,27 +227,27 @@
 
 std::unique_ptr<FactIterator> LookupCache::Anchor::seek(
     Pid type,
-    folly::ByteRange start,
-    size_t prefix_size) {
-  return base->seek(type, start, prefix_size);
+    folly::ByteRange prefix,
+    std::optional<Fact::Ref> restart) {
+  return base->seek(type, prefix, restart);
 }
 
 std::unique_ptr<FactIterator> LookupCache::Anchor::seekWithinSection(
     Pid type,
-    folly::ByteRange start,
-    size_t prefix_size,
+    folly::ByteRange prefix,
     Id from,
-    Id to) {
-  return base->seekWithinSection(type, start, prefix_size, from, to);
+    Id to,
+    std::optional<Fact::Ref> restart) {
+  return base->seekWithinSection(type, prefix, from, to, restart);
 }
 
 void LookupCache::insert(Fact::unique_ptr owned) {
   std::unique_lock<folly::SharedMutex> delete_write;
   Fact::intrusive_list dead;
-  performUpdate([&](Index& index, Storage& storage) {
-    insertOne(index, storage, std::move(owned), dead);
+  performUpdate([&](Index& windex, Storage& wstorage) {
+    insertOne(windex, wstorage, std::move(owned), dead);
     if (!dead.empty()) {
-      delete_write = std::unique_lock(index.delete_lock);
+      delete_write = std::unique_lock(windex.delete_lock);
     }
   });
   // Perform the actual deletions after we've released all locks on the index
@@ -258,8 +258,8 @@
 }
 
 void LookupCache::insertOne(
-    Index& index,
-    Storage& storage,
+    Index& windex,
+    Storage& wstorage,
     Fact::unique_ptr owned,
     Fact::intrusive_list& dead) {
   const auto size = owned->size();
@@ -271,8 +271,8 @@
   // check if we already have a fact with this id in the cache
   const Fact* existing = nullptr;
   {
-    auto o = index.ids.find(owned->id());
-    if (o != index.ids.end()) {
+    auto o = windex.ids.find(owned->id());
+    if (o != windex.ids.end()) {
       existing = *o;
     }
   }
@@ -282,7 +282,7 @@
     return;
   }
 
-  if (existing || storage.factBytes() + size > options.capacity) {
+  if (existing || wstorage.factBytes() + size > options.capacity) {
     // Do deferred LRU operations if we're going to evict or replace. We need
     // to do this even when replacing because the hit buffers might reference
     // the fact we're going to delete.
@@ -297,7 +297,7 @@
     // but we lose ordering across shards. It possible to fix this at the cost
     // of some performance but probably not worth doing.
     for (auto& t : touched) {
-      drain(storage, t);
+      drain(wstorage, t);
     }
 
     if (existing) {
@@ -306,31 +306,31 @@
       } else {
         ++stats->values[Stats::factById_deletes];
       }
-      deleteFromIndex(index, existing);
+      deleteFromIndex(windex, existing);
       // TODO: defer this, see comments in evict
-      auto fact = storage.release(existing);
+      auto fact = wstorage.release(existing);
       dead.push_back(*fact);
       // dead assumed ownership of the fact
       (void)fact.release();
     }
 
-    if (storage.factBytes() + size > options.capacity) {
+    if (wstorage.factBytes() + size > options.capacity) {
       // shrink cache to ~90% of capacity
       const auto wanted =
           options.capacity * 0.9 > size ? options.capacity * 0.9 - size : 0;
-      evict(index, storage, wanted, dead);
+      evict(windex, wstorage, wanted, dead);
     }
   }
 
-  const auto fact = storage.push_back(std::move(owned));
+  const auto fact = wstorage.push_back(std::move(owned));
 
   // For 'insert' (but not 'BulkStorage') we could unlock the storage here. It
   // doesn't matter, though, since nothing will really use it without getting a
   // lock for index first.
 
-  index.ids.insert(fact);
+  windex.ids.insert(fact);
   if (fact->tag() != TYPE) {
-    index.keys.insert(fact);
+    windex.keys.insert(fact);
   }
 }
 
diff --git a/glean/rts/cache.h b/glean/rts/cache.h
--- a/glean/rts/cache.h
+++ b/glean/rts/cache.h
@@ -11,6 +11,7 @@
 #include <folly/SharedMutex.h>
 #include <folly/Synchronized.h>
 #include <folly/ThreadCachedInt.h>
+#include <folly/system/HardwareConcurrency.h>
 #include <vector>
 
 #include "glean/rts/factset.h"
@@ -103,7 +104,7 @@
 
     /// Number of shards for Touched buffer - should typically be number of
     /// threads.
-    size_t shards = std::thread::hardware_concurrency();
+    size_t shards = folly::available_concurrency();
 
     /// How many hits to record locally before draining them to global buffer.
     size_t touched_buffer_size = 64 * 1024;
@@ -150,14 +151,14 @@
     }
 
     std::unique_ptr<FactIterator>
-    seek(Pid type, folly::ByteRange start, size_t prefix_size) override;
+    seek(Pid type, folly::ByteRange prefix, std::optional<Fact::Ref>) override;
 
     std::unique_ptr<FactIterator> seekWithinSection(
         Pid type,
-        folly::ByteRange start,
-        size_t prefix_size,
+        folly::ByteRange prefix,
         Id from,
-        Id to) override;
+        Id to,
+        std::optional<Fact::Ref>) override;
 
     UsetId getOwner(Id id) override {
       return base->getOwner(id);
diff --git a/glean/rts/define.cpp b/glean/rts/define.cpp
--- a/glean/rts/define.cpp
+++ b/glean/rts/define.cpp
@@ -88,11 +88,11 @@
       binary::Output out;
       uint64_t key_size;
       predicate->typecheck(rename, clause, out, key_size);
-      const auto clause = Fact::Clause::from(out.bytes(), key_size);
-      auto id = def.define(ty, clause, max_ref);
+      const auto typecheckedClause = Fact::Clause::from(out.bytes(), key_size);
+      auto id = def.define(ty, typecheckedClause, max_ref);
 
       if (!id) {
-        const auto real_id = def.idByKey(ty, clause.key());
+        const auto real_id = def.idByKey(ty, typecheckedClause.key());
         if (ignoreRedef) {
           id = real_id;
         } else {
diff --git a/glean/rts/factset.cpp b/glean/rts/factset.cpp
--- a/glean/rts/factset.cpp
+++ b/glean/rts/factset.cpp
@@ -7,6 +7,7 @@
  */
 
 #include "glean/rts/factset.h"
+#include "glean/rts/binary.h"
 
 namespace facebook {
 namespace glean {
@@ -242,14 +243,30 @@
   }
 }
 
+std::unique_ptr<FactIterator> FactSet::seek(
+    Pid type,
+    folly::ByteRange prefix,
+    std::optional<Fact::Ref> restart) {
+  if (restart.has_value()) {
+    auto id = restart.value().id;
+    if (id < facts.startingId() || id >= facts.startingId() + facts.size()) {
+      error("seek: restart Id not within set");
+    }
+    auto key = facts[id - facts.startingId()].clause.key();
+    return seek(type, key, prefix.size());
+  } else {
+    return seek(type, prefix, prefix.size());
+  }
+}
+
 std::unique_ptr<FactIterator> FactSet::seekWithinSection(
     Pid type,
-    folly::ByteRange start,
-    size_t prefix_size,
+    folly::ByteRange prefix,
     Id from,
-    Id to) {
+    Id to,
+    std::optional<Fact::Ref> restart) {
   if (from <= startingId() && firstFreeId() <= to) {
-    return seek(type, start, prefix_size);
+    return seek(type, prefix, restart);
   }
 
   // We have no use case for actually performing a bounded
diff --git a/glean/rts/factset.h b/glean/rts/factset.h
--- a/glean/rts/factset.h
+++ b/glean/rts/factset.h
@@ -233,14 +233,16 @@
     return begin() +
         (id <= facts.startingId()
              ? 0
-             : std::min(distance(facts.startingId(), id), facts.size()));
+             : std::min(
+                   distance(facts.startingId(), id), uint64_t(facts.size())));
   }
 
   const_iterator upper_bound(Id id) const {
     return begin() +
-        (id < facts.startingId()
-             ? 0
-             : std::min(distance(facts.startingId(), id) + 1, facts.size()));
+        (id < facts.startingId() ? 0
+                                 : std::min(
+                                       distance(facts.startingId(), id) + 1,
+                                       uint64_t(facts.size())));
   }
 
   /// Return the number of bytes occupied by facts.
@@ -284,14 +286,14 @@
   /// slow. The first call for each predicate will be especially slow as it will
   /// need to create an index.
   std::unique_ptr<FactIterator>
-  seek(Pid type, folly::ByteRange start, size_t prefix_size) override;
+  seek(Pid type, folly::ByteRange prefix, std::optional<Fact::Ref>) override;
 
   std::unique_ptr<FactIterator> seekWithinSection(
       Pid type,
-      folly::ByteRange start,
-      size_t prefix_size,
+      folly::ByteRange prefix,
       Id from,
-      Id to) override;
+      Id to,
+      std::optional<Fact::Ref>) override;
 
   UsetId getOwner(Id) override {
     return INVALID_USET;
@@ -350,6 +352,9 @@
   /// don't do seeks on FactSets.
   struct Index;
   OnDemand<Index> index;
+
+  std::unique_ptr<FactIterator>
+  seek(Pid type, folly::ByteRange start, size_t prefix_size);
 };
 
 } // namespace rts
diff --git a/glean/rts/ffi.cpp b/glean/rts/ffi.cpp
--- a/glean/rts/ffi.cpp
+++ b/glean/rts/ffi.cpp
@@ -80,12 +80,14 @@
     std::vector<rts::Predicate> predicates;
     predicates.reserve(count);
     for (size_t i = 0; i < count; ++i) {
-      predicates.push_back(rts::Predicate{
-          Pid::fromThrift(ids[i]),
-          std::string(static_cast<const char*>(name_ptrs[i]), name_sizes[i]),
-          versions[i],
-          typecheckers[i]->value,
-          traversals[i]->value});
+      predicates.push_back(
+          rts::Predicate{
+              Pid::fromThrift(ids[i]),
+              std::string(
+                  static_cast<const char*>(name_ptrs[i]), name_sizes[i]),
+              versions[i],
+              typecheckers[i]->value,
+              traversals[i]->value});
     }
     *inventory = new Inventory(std::move(predicates));
   });
@@ -120,8 +122,9 @@
     size_t size,
     Inventory** inventory) {
   return ffi::wrap([=] {
-    *inventory = new Inventory(Inventory::deserialize(
-        {reinterpret_cast<const unsigned char*>(data), size}));
+    *inventory = new Inventory(
+        Inventory::deserialize(
+            {reinterpret_cast<const unsigned char*>(data), size}));
   });
 }
 
@@ -835,8 +838,8 @@
     std::vector<std::string> literals;
     literals.reserve(literal_count);
     for (size_t i = 0; i < literal_count; ++i) {
-      literals.push_back(std::string(
-          static_cast<const char*>(literal_ptrs[i]), literal_sizes[i]));
+      literals.emplace_back(
+          static_cast<const char*>(literal_ptrs[i]), literal_sizes[i]);
     }
     *sub = new SharedSubroutine{std::make_shared<Subroutine>(Subroutine{
         std::vector<uint64_t>(code, code + code_size),
diff --git a/glean/rts/ffi.h b/glean/rts/ffi.h
--- a/glean/rts/ffi.h
+++ b/glean/rts/ffi.h
@@ -41,7 +41,7 @@
 namespace rts {
 #endif
 
-// @lint-ignore-every CLANGTIDY facebook-hte-Typedef
+// @lint-ignore-every CLANGTIDY modernize-use-using
 typedef struct Lookup Lookup;
 typedef struct Define Define;
 typedef struct FactSet FactSet;
diff --git a/glean/rts/id.h b/glean/rts/id.h
--- a/glean/rts/id.h
+++ b/glean/rts/id.h
@@ -31,9 +31,6 @@
 
   WordId() : val(0) {}
 
-  WordId(const WordId&) = default;
-  WordId& operator=(const WordId&) = default;
-
   static constexpr WordId invalid() {
     return WordId(INVALID_ID);
   }
diff --git a/glean/rts/inventory.h b/glean/rts/inventory.h
--- a/glean/rts/inventory.h
+++ b/glean/rts/inventory.h
@@ -35,8 +35,8 @@
   struct Rename : SetOps {
     explicit Rename(F&& rename_fun) : rename_fun(rename_fun) {}
 
-    Id rename(Id id, Pid type) const {
-      return rename_fun(id, type);
+    Id rename(Id fact_id, Pid type) const {
+      return rename_fun(fact_id, type);
     }
 
     F rename_fun;
diff --git a/glean/rts/lookup.cpp b/glean/rts/lookup.cpp
--- a/glean/rts/lookup.cpp
+++ b/glean/rts/lookup.cpp
@@ -17,103 +17,6 @@
   return object;
 }
 
-namespace {
-
-struct MergeIterator final : public FactIterator {
-  MergeIterator(
-      std::unique_ptr<FactIterator> l,
-      std::unique_ptr<FactIterator> r,
-      size_t pfxsize)
-      : left(std::move(l)),
-        right(std::move(r)),
-        current(nullptr),
-        prefix_size(pfxsize) {}
-
-  void next() override {
-    if (!current) {
-      get(KeyOnly);
-    }
-    current->next();
-    current = nullptr;
-  }
-
-  Fact::Ref get(Demand demand) override {
-    if (current) {
-      return current->get(demand);
-    } else {
-      auto l = tryGet(left, demand);
-      auto r = tryGet(right, demand);
-      if (l) {
-        if (r && suffix(r) < suffix(l)) {
-          current = right.get();
-          return r;
-        } else {
-          current = left.get();
-          return l;
-        }
-      } else {
-        current = right.get();
-        return r;
-      }
-    }
-  }
-
-  std::optional<Id> lower_bound() override {
-    auto l = left ? left->lower_bound() : std::nullopt;
-    auto r = right ? right->lower_bound() : std::nullopt;
-    if (!l) {
-      return r;
-    }
-    return r ? std::min(*l, *r) : l;
-  }
-
-  std::optional<Id> upper_bound() override {
-    auto l = left ? left->upper_bound() : std::nullopt;
-    auto r = right ? right->upper_bound() : std::nullopt;
-    if (!l) {
-      return r;
-    }
-    return r ? std::max(*l, *r) : l;
-  }
-
-  static Fact::Ref tryGet(std::unique_ptr<FactIterator>& iter, Demand demand) {
-    Fact::Ref ref;
-    if (iter) {
-      ref = iter->get(demand);
-      if (!ref) {
-        iter.reset();
-      }
-    }
-    return ref;
-  }
-
-  folly::ByteRange suffix(Fact::Ref ref) {
-    assert(prefix_size <= ref.key().size());
-    return {ref.key().begin() + prefix_size, ref.key().end()};
-  }
-
-  std::unique_ptr<FactIterator> left;
-  std::unique_ptr<FactIterator> right;
-  FactIterator* FOLLY_NULLABLE current;
-  const size_t prefix_size;
-};
-
-} // namespace
-
-std::unique_ptr<FactIterator> FactIterator::merge(
-    std::unique_ptr<FactIterator> left,
-    std::unique_ptr<FactIterator> right,
-    size_t prefix_size) {
-  if (left->get(Demand::KeyOnly)) {
-    return right->get(Demand::KeyOnly)
-        ? std::make_unique<MergeIterator>(
-              std::move(left), std::move(right), prefix_size)
-        : std::move(left);
-  } else {
-    return right;
-  }
-}
-
 std::unique_ptr<FactIterator> Section::enumerate(Id from, Id upto) {
   if (upto <= lowBoundary() || highBoundary() <= from) {
     return std::make_unique<EmptyIterator>();
@@ -134,8 +37,10 @@
   }
 }
 
-std::unique_ptr<FactIterator>
-Section::seek(Pid type, folly::ByteRange start, size_t prefix_size) {
+std::unique_ptr<FactIterator> Section::seek(
+    Pid type,
+    folly::ByteRange prefix,
+    std::optional<Fact::Ref> restart) {
   struct Iterator final : FactIterator {
     Iterator(std::unique_ptr<FactIterator> base, Id upto, Id from)
         : base_(std::move(base)), high_boundary_(upto), low_boundary_(from) {}
@@ -170,19 +75,19 @@
     Id low_boundary_;
   };
   return std::make_unique<Iterator>(
-      base()->seek(type, start, prefix_size), highBoundary(), lowBoundary());
+      base()->seek(type, prefix, restart), highBoundary(), lowBoundary());
 }
 
 std::unique_ptr<FactIterator> Section::seekWithinSection(
     Pid type,
-    folly::ByteRange start,
-    size_t prefix_size,
+    folly::ByteRange prefix,
     Id from,
-    Id upto) {
+    Id upto,
+    std::optional<Fact::Ref> restart) {
   if (from <= lowBoundary() && highBoundary() <= upto) {
-    return seek(type, start, prefix_size);
+    return seek(type, prefix, restart);
   } else {
-    return Section(base_, from, upto).seek(type, start, prefix_size);
+    return Section(base_, from, upto).seek(type, prefix, restart);
   }
 }
 
@@ -204,11 +109,11 @@
 
   Fact::Ref get(Demand demand) override {
     checked = true;
-    auto r = current->get();
+    auto r = current->get(demand);
     if (!r && other) {
       std::swap(current, other);
       other.reset();
-      r = current->get();
+      r = current->get(demand);
     }
     return r;
   }
diff --git a/glean/rts/lookup.h b/glean/rts/lookup.h
--- a/glean/rts/lookup.h
+++ b/glean/rts/lookup.h
@@ -40,11 +40,6 @@
   virtual std::optional<Id> lower_bound() = 0;
   virtual std::optional<Id> upper_bound() = 0;
 
-  static std::unique_ptr<FactIterator> merge(
-      std::unique_ptr<FactIterator> left,
-      std::unique_ptr<FactIterator> right,
-      size_t prefix_size);
-
   static std::unique_ptr<FactIterator> append(
       std::unique_ptr<FactIterator> left,
       std::unique_ptr<FactIterator> right);
@@ -127,23 +122,27 @@
       Id from = Id::invalid(),
       Id downto = Id::invalid()) = 0;
 
-  // Obtain a  prefix iterator for the given predicate. The iterator covers keys
-  // which begin with the first 'prefix_size' bytes of 'start', starting with
-  // the first key not lexicographically less than 'start', and produces facts
-  // in lexicographic order. In particular, setting 'prefix_size' to
-  // 'start.size()' iterates over all keys with the prefix 'start'.
-  virtual std::unique_ptr<FactIterator>
-  seek(Pid type, folly::ByteRange start, size_t prefix_size) = 0;
+  // Obtain a  prefix iterator for the given predicate. The iterator will return
+  // each key with the given prefix exactly once, in no specified order.
+  //
+  // If `restart` is non-empty, the fact must be within the iterator's
+  // range; the iterator will be positioned at the given fact.  This
+  // can be used to resume a previous iterator.
+  virtual std::unique_ptr<FactIterator> seek(
+      Pid type,
+      folly::ByteRange prefix,
+      std::optional<Fact::Ref> restart = {}) = 0;
 
   // Perform a seek on a section of the Lookup.
   // Results will have Ids within the range [from, utpto).
   // Facts can reference Ids outside of the specified range.
+  // See `seek()` for the meaning of `restart`.
   virtual std::unique_ptr<FactIterator> seekWithinSection(
       Pid type,
-      folly::ByteRange start,
-      size_t prefix_size,
+      folly::ByteRange prefix,
       Id from,
-      Id to) = 0;
+      Id to,
+      std::optional<Fact::Ref> restart = {}) = 0;
 
   virtual UsetId getOwner(Id id) = 0;
 };
@@ -183,12 +182,17 @@
     return std::make_unique<EmptyIterator>();
   }
 
-  std::unique_ptr<FactIterator> seek(Pid, folly::ByteRange, size_t) override {
+  std::unique_ptr<FactIterator>
+  seek(Pid, folly::ByteRange, std::optional<Fact::Ref>) override {
     return std::make_unique<EmptyIterator>();
   }
 
-  std::unique_ptr<FactIterator>
-  seekWithinSection(Pid, folly::ByteRange, size_t, Id, Id) override {
+  std::unique_ptr<FactIterator> seekWithinSection(
+      Pid,
+      folly::ByteRange,
+      Id,
+      Id,
+      std::optional<Fact::Ref>) override {
     return std::make_unique<EmptyIterator>();
   }
 
@@ -239,14 +243,14 @@
   std::unique_ptr<FactIterator> enumerateBack(Id from, Id downto) override;
 
   std::unique_ptr<FactIterator>
-  seek(Pid type, folly::ByteRange start, size_t prefix_size) override;
+  seek(Pid type, folly::ByteRange prefix, std::optional<Fact::Ref>) override;
 
   std::unique_ptr<FactIterator> seekWithinSection(
       Pid type,
-      folly::ByteRange start,
-      size_t prefix_size,
+      folly::ByteRange prefix,
       Id from,
-      Id to) override;
+      Id to,
+      std::optional<Fact::Ref>) override;
 
   UsetId getOwner(Id id) override {
     return isWithinBounds(id) ? base()->getOwner(id) : INVALID_USET;
diff --git a/glean/rts/nat.cpp b/glean/rts/nat.cpp
--- a/glean/rts/nat.cpp
+++ b/glean/rts/nat.cpp
@@ -197,7 +197,7 @@
   return decode<9>(b0, p);
 }
 
-std::pair<uint64_t, const unsigned char * FOLLY_NULLABLE> loadUntrustedNat(
+std::pair<uint64_t, const unsigned char* FOLLY_NULLABLE> loadUntrustedNat(
     const unsigned char* p,
     const unsigned char* e) {
   DECODER_LABELS(decoder);
diff --git a/glean/rts/nat.h b/glean/rts/nat.h
--- a/glean/rts/nat.h
+++ b/glean/rts/nat.h
@@ -137,7 +137,7 @@
 /// Check and decode an encoded nat and return the decoded number and a pointer
 /// to the first byte after the nat. The pointer will be NULL is the number is
 /// invalid of the buffer is too short.
-std::pair<uint64_t, const unsigned char * FOLLY_NULLABLE> loadUntrustedNat(
+std::pair<uint64_t, const unsigned char* FOLLY_NULLABLE> loadUntrustedNat(
     const unsigned char* p, // pointer to first byte
     const unsigned char* e // pointer to end of buffer
 );
diff --git a/glean/rts/ownership.cpp b/glean/rts/ownership.cpp
--- a/glean/rts/ownership.cpp
+++ b/glean/rts/ownership.cpp
@@ -7,7 +7,6 @@
  */
 
 #include "glean/rts/ownership.h"
-#include "glean/rts/factset.h"
 #include "glean/rts/inventory.h"
 #include "glean/rts/lookup.h"
 #include "glean/rts/ownership/setu32.h"
@@ -29,8 +28,6 @@
 
 #include <algorithm>
 #include <initializer_list>
-#include <limits>
-#include <type_traits>
 
 namespace facebook {
 namespace glean {
@@ -207,6 +204,7 @@
     Lookup* base_lookup) {
   struct Stats {
     Usets& usets;
+    const UsetsMerge::Cache::Stats& mergeStats;
     size_t local_facts = 0;
     size_t base_facts = 0;
     size_t owned_facts = 0;
@@ -227,6 +225,11 @@
     }
 
     void dump() {
+      VLOG(1) << folly::sformat(
+          "UsetsMergeCache: {} hits, {} misses, hit rate: {:.2f}%",
+          mergeStats.hits,
+          mergeStats.misses,
+          mergeStats.hitRate());
       auto ustats = usets.statistics();
       VLOG(1) << folly::sformat(
           "{} of {} facts ({} visited in base DBs), {} usets, {} promoted, {} bytes, {} adds, {} dups",
@@ -240,8 +243,8 @@
           ustats.dups);
     }
   };
-
-  Stats stats{usets};
+  UsetsMerge usetsMerge{usets};
+  Stats stats{usets, usetsMerge.statistics()};
 
   std::vector<Id> refs;
   const auto tracker = syscall([&refs](Id id, Pid) { refs.push_back(id); });
@@ -263,65 +266,53 @@
   auto processFact = [&, min_id](Fact::Ref fact) {
     // `set == nullptr` means that the fact doesn't have an ownership set - we
     // might want to make that an error eventually?
-    if (auto set = owner(fact.id)) {
+    if (auto set = owner(fact.id); set || usetsMerge.contains(fact.id)) {
+      auto merged = usetsMerge.addUsetAndMerge(fact.id, set);
+      owner(fact.id) = merged;
+      if (set) {
+        usets.drop(set);
+      }
+      set = merged;
+      usets.promote(set);
+
       // If the fact is in a base DB, then we record its owner as (set || X)
       // where X is the existing owner of the fact. We only propagate `set`,
       // not `X`, to the facts it refers to.
       if (fact.id < min_id) {
         auto base_owner = base_lookup->getOwner(fact.id);
         if (base_owner != INVALID_USET) {
-          auto merged = usets.merge(SetU32::from({base_owner}), set);
-          usets.promote(merged);
-          owner(fact.id) = merged;
+          auto mergedWithBase = usets.merge(SetU32::from({base_owner}), set);
+          usets.promote(mergedWithBase);
+          owner(fact.id) = mergedWithBase;
         }
       }
 
-      usets.promote(set);
-
       // Collect all references to facts
       const auto* predicate = inventory.lookupPredicate(fact.type);
       assert(predicate);
       predicate->traverse(tracker, fact.clause);
 
-      // For each fact we reference, add our ownership set to what we've
-      // computed for it so far. Use the `link` field to avoid computing the
-      // same set union multiple times.
-      //
-      // TODO: Try adding a fixed-size LRU (or LFU?) cache for set unions?
-      std::vector<Uset*> touched;
-      for (const auto id : refs) {
-        auto& me = owner(id);
-        if (me == nullptr) {
-          // The fact didn't have ownership info before, assign the set to it.
-          me = set;
-          usets.use(me, 1);
-        } else if (const auto added = static_cast<Uset*>(me->link())) {
-          // The fact did have ownership info and we've already computed the
-          // union for that particular set.
-          usets.use(added);
-          usets.drop(me);
-          me = added;
-        } else {
-          // Compute the union.
-          const auto p = usets.merge(me, set);
-          me->link(p);
-          touched.push_back(me);
-          me = p;
-        }
-      }
+      for (const auto ref : refs) {
+        usetsMerge.addUset(ref, set);
 
-      // Reset the link fields. Note that we always add 1 refcount for sets we
-      // store in `touched` (to avoid having dangling references there) so drop
-      // it here.
-      for (const auto p : touched) {
-        p->link(nullptr);
-        usets.drop(p);
+        // Do the merge earlier if the used space is greater than 1 GB to free
+        // the memory
+        constexpr size_t ONE_GB = 1ULL << 30;
+        if (usetsMerge.bytes() > ONE_GB) {
+          auto factIds = usetsMerge.factIds();
+          for (const auto factId : factIds) {
+            auto& me = owner(factId);
+            auto result = usetsMerge.addUsetAndMerge(factId, me);
+            if (me) {
+              usets.drop(me);
+            }
+            me = result;
+          }
+        }
       }
 
-      touched.clear();
-      // TODO: We can drop the current's fact ownership info here - could shrink
-      // the vector.
-      // facts.shrink(fact.id);
+      // TODO: We can drop the current's fact ownership info here - could
+      // shrink the vector. facts.shrink(fact.id);
       stats.bumpOwned();
     }
   };
@@ -359,15 +350,18 @@
   auto executor = folly::getGlobalCPUExecutor();
 
   folly::Future<folly::Unit> fetcher = folly::via(executor, [&]() {
-    auto pageOf = [](Id id) {
-      return Id::fromWord((id.toWord() / pageSize) * pageSize);
+    auto pageOf = [](Id id) -> uint64_t {
+      return (id.toWord() / pageSize) * pageSize;
     };
-    Id last = pageOf(lookup.firstFreeId() - 1);
-    Id first = pageOf(lookup.startingId());
-    for (Id id = last;; id -= pageSize) {
-      VLOG(1) << folly::sformat("fetching page: {}", id.toWord());
-      queue.blockingWrite(fetchPage(id, id + pageSize));
-      if (id == first) {
+    Id start = lookup.startingId();
+    Id last = lookup.firstFreeId() - 1;
+    uint64_t first = pageOf(start);
+    for (uint64_t page = pageOf(last);; page -= pageSize) {
+      VLOG(1) << folly::sformat("fetching page: {}", page);
+      queue.blockingWrite(fetchPage(
+          (page == first) ? start : Id::fromWord(page),
+          Id::fromWord(page + pageSize)));
+      if (page == first) {
         break;
       }
     }
@@ -411,6 +405,7 @@
   }
 
   stats.dump();
+  usetsMerge.clear();
 }
 } // namespace
 
@@ -481,7 +476,7 @@
   // TODO: use a more suitable representation for the sparse ownership
   std::vector<std::pair<uint64_t, Uset*>> order;
   for (auto& pr : flattened.sparse) {
-    order.push_back(pr);
+    order.emplace_back(pr);
   }
   std::sort(order.begin(), order.end());
   Id prev = Id::lowest() - 1;
diff --git a/glean/rts/ownership.h b/glean/rts/ownership.h
--- a/glean/rts/ownership.h
+++ b/glean/rts/ownership.h
@@ -32,7 +32,12 @@
 OwnerSet deserializeEliasFano(binary::Input& in);
 
 struct OwnershipSetIterator {
-  virtual ~OwnershipSetIterator() {}
+  OwnershipSetIterator() = default;
+  virtual ~OwnershipSetIterator() = default;
+  OwnershipSetIterator(const OwnershipSetIterator&) = delete;
+  OwnershipSetIterator& operator=(const OwnershipSetIterator&) = delete;
+  OwnershipSetIterator(OwnershipSetIterator&&) = delete;
+  OwnershipSetIterator& operator=(OwnershipSetIterator&&) = delete;
   virtual std::pair<size_t, size_t> sizes() const = 0;
   virtual folly::Optional<std::pair<UsetId, SetExpr<const OwnerSet*>>>
   get() = 0;
@@ -55,7 +60,12 @@
 // Interface for reading ownership data.
 //
 struct Ownership {
-  virtual ~Ownership() {}
+  Ownership() = default;
+  virtual ~Ownership() = default;
+  Ownership(const Ownership&) = delete;
+  Ownership& operator=(const Ownership&) = delete;
+  Ownership(Ownership&&) = delete;
+  Ownership& operator=(Ownership&&) = delete;
 
   // Iterate through all the ownership expressions
   virtual std::unique_ptr<OwnershipSetIterator> getSetIterator() = 0;
@@ -114,7 +124,12 @@
 };
 
 struct OwnershipUnitIterator {
-  virtual ~OwnershipUnitIterator() {}
+  OwnershipUnitIterator() = default;
+  virtual ~OwnershipUnitIterator() = default;
+  OwnershipUnitIterator(const OwnershipUnitIterator&) = delete;
+  OwnershipUnitIterator& operator=(const OwnershipUnitIterator&) = delete;
+  OwnershipUnitIterator(OwnershipUnitIterator&&) = delete;
+  OwnershipUnitIterator& operator=(OwnershipUnitIterator&&) = delete;
 
   // `OwnershipUnit`s are expected to be produced in strictly
   // ascending order of `unit`.
diff --git a/glean/rts/ownership/derived.h b/glean/rts/ownership/derived.h
--- a/glean/rts/ownership/derived.h
+++ b/glean/rts/ownership/derived.h
@@ -68,7 +68,14 @@
 };
 
 struct DerivedFactOwnershipIterator {
-  virtual ~DerivedFactOwnershipIterator() {}
+  virtual ~DerivedFactOwnershipIterator() = default;
+  DerivedFactOwnershipIterator() = default;
+  DerivedFactOwnershipIterator(const DerivedFactOwnershipIterator&) = delete;
+  DerivedFactOwnershipIterator& operator=(const DerivedFactOwnershipIterator&) =
+      delete;
+  DerivedFactOwnershipIterator(DerivedFactOwnershipIterator&&) = delete;
+  DerivedFactOwnershipIterator& operator=(DerivedFactOwnershipIterator&&) =
+      delete;
 
   // Note: the result is only valid until the next call to get()
   virtual folly::Optional<DerivedFactOwnership> get() = 0;
@@ -83,7 +90,13 @@
     DerivedFactOwnershipIterator* iter);
 
 struct DerivedDependencyIterator {
-  virtual ~DerivedDependencyIterator() {}
+  virtual ~DerivedDependencyIterator() = default;
+  DerivedDependencyIterator() = default;
+  DerivedDependencyIterator(const DerivedDependencyIterator&) = delete;
+  DerivedDependencyIterator& operator=(const DerivedDependencyIterator&) =
+      delete;
+  DerivedDependencyIterator(DerivedDependencyIterator&&) = delete;
+  DerivedDependencyIterator& operator=(DerivedDependencyIterator&&) = delete;
   virtual folly::Optional<std::pair<std::vector<Id>, std::vector<Id>>>
   get() = 0;
 };
diff --git a/glean/rts/ownership/slice.h b/glean/rts/ownership/slice.h
--- a/glean/rts/ownership/slice.h
+++ b/glean/rts/ownership/slice.h
@@ -10,6 +10,8 @@
 
 #include <boost/dynamic_bitset.hpp>
 
+#include <folly/Utility.h>
+
 #include "glean/rts/fact.h"
 #include "glean/rts/lookup.h"
 #include "glean/rts/ownership.h"
@@ -125,8 +127,8 @@
 // each Lookup in the stack.
 //
 template <typename Slice>
-struct Sliced : Lookup {
-  ~Sliced() override {}
+struct Sliced : Lookup, folly::NonCopyableNonMovable {
+  ~Sliced() override = default;
 
   Sliced(Lookup* base, Slice slice) : base_(base), slice_(std::move(slice)) {}
 
@@ -172,21 +174,23 @@
     });
   }
 
-  std::unique_ptr<FactIterator>
-  seek(Pid type, folly::ByteRange start, size_t prefix_size) override {
-    return FactIterator::filter(
-        base_->seek(type, start, prefix_size),
-        [&](Id id) { return slice_.visible(base_->getOwner(id)); });
+  std::unique_ptr<FactIterator> seek(
+      Pid type,
+      folly::ByteRange prefix,
+      std::optional<Fact::Ref> restart) override {
+    return FactIterator::filter(base_->seek(type, prefix, restart), [&](Id id) {
+      return slice_.visible(base_->getOwner(id));
+    });
   }
 
   std::unique_ptr<FactIterator> seekWithinSection(
       Pid type,
-      folly::ByteRange start,
-      size_t prefix_size,
+      folly::ByteRange prefix,
       Id from,
-      Id to) override {
+      Id to,
+      std::optional<Fact::Ref> restart) override {
     return FactIterator::filter(
-        base_->seekWithinSection(type, start, prefix_size, from, to),
+        base_->seekWithinSection(type, prefix, from, to, restart),
         [&](Id id) { return slice_.visible(base_->getOwner(id)); });
   }
 
diff --git a/glean/rts/ownership/triearray.h b/glean/rts/ownership/triearray.h
--- a/glean/rts/ownership/triearray.h
+++ b/glean/rts/ownership/triearray.h
@@ -14,8 +14,8 @@
 #include "glean/rts/ownership.h"
 #include "glean/rts/ownership/pool.h"
 
+#include <array>
 #include <cstdint>
-#include <queue>
 #include <vector>
 
 namespace facebook {
@@ -23,18 +23,38 @@
 namespace rts {
 
 /**
- * A datastructure which maps ranges of Ids to values. The current
- * implementation is a hack which only supports Ids which fit in 32 bits.
+ * A datastructure which maps ranges of Ids to values.
  *
  * The implementation is a bit trie with a large initial fanout (64k) and then a
- * smaller inner fanout (16), giving a maximum depth of 4 (for 32-bit values).
+ * smaller inner fanout (16), giving a maximum depth of 4 within each 32-bit
+ * page.
  *
+ * To support 64-bit keys while optimizing for the common case:
+ * - Pages 0 to NUM_PREALLOCATED_PAGES-1 are stored in a fixed array for fast
+ *   direct access (no hash lookup)
+ * - Higher pages are stored in a sparse map and allocated on demand
+ *
+ * Memory usage and performance:
+ *
+ *   | NUM_PREALLOCATED_PAGES | Key range covered | Memory (pages array) |
+ *   |------------------------|-------------------|----------------------|
+ *   | 1                      | 0 to 2^32-1       | 512 KB               |
+ *   | 4                      | 0 to 2^34-1       | 2 MB                 |
+ *   | 16                     | 0 to 2^36-1       | 8 MB                 |
+ *
+ * Keys within the preallocated range use direct array indexing.
+ * Keys beyond that range incur one hash map lookup per operation.
+ *
  * This should most likely be switched to some form of Patricia tree.
  */
 template <typename T>
 class TrieArray {
  public:
-  TrieArray() : trees_(new ForestN<FANOUT_TOP>(Tree::null())) {}
+  TrieArray() {
+    for (auto& page : pages_) {
+      page = std::make_unique<ForestN<FANOUT_TOP>>(Tree::null());
+    }
+  }
 
   /**
    * Insert a sorted sequence of non-overlapping Id ranges by combining the
@@ -65,9 +85,6 @@
     minkey_ = std::min(minkey_, start->start.toWord());
     maxkey_ = std::max(maxkey_, finish[-1].finish.toWord());
 
-    // only 32-bit keys are supported; this property is assumed later
-    CHECK(maxkey_ <= std::numeric_limits<uint32_t>::max());
-
     // During insertion if we are replacing all references of an existing value,
     // we want to do that in a single operation so that get() can reuse
     // the memory for the old value.
@@ -214,11 +231,22 @@
  private:
   static constexpr size_t FANOUT_TOP = 65536;
   static constexpr size_t FANOUT = 16;
-  static constexpr size_t BLOCK =
-      (size_t(std::numeric_limits<uint32_t>::max()) + 1) / FANOUT_TOP;
+  // Each page covers 2^32 keys; page 0 is the common case (32-bit keys)
+  static constexpr uint64_t PAGE_SIZE = uint64_t(1) << 32;
+  // BLOCK = 2^32 / 2^16 = 2^16 (optimized for 32-bit keys)
+  static constexpr size_t BLOCK = PAGE_SIZE / FANOUT_TOP;
 
+  // Number of pages to preallocate in a fixed array for fast direct access.
+  // Increase this if the common key range exceeds the current coverage:
+  //   - 1 page  covers keys 0 to 2^32-1  (512 KB memory)
+  //   - 4 pages covers keys 0 to 2^34-1  (2 MB memory)
+  //   - 16 pages covers keys 0 to 2^36-1 (8 MB memory)
+  // Keys beyond NUM_PREALLOCATED_PAGES * 2^32 will use the overflow_ hash map,
+  // which adds one hash lookup per operation.
+  static constexpr size_t NUM_PREALLOCATED_PAGES = 4;
+
   static constexpr size_t blockSize(uint8_t level) {
-    auto size = BLOCK;
+    size_t size = BLOCK;
     while (level != 0) {
       size /= FANOUT;
       --level;
@@ -226,6 +254,16 @@
     return size;
   }
 
+  // Split a key into page number (high 32 bits) and offset within page
+  static std::pair<uint32_t, uint32_t> pageOf(uint64_t key) {
+    return {static_cast<uint32_t>(key >> 32), static_cast<uint32_t>(key)};
+  }
+
+  // Within a page, get block index and offset within block
+  static std::pair<uint32_t, uint32_t> location(uint32_t key_in_page) {
+    return {key_in_page / BLOCK, key_in_page % BLOCK};
+  }
+
   template <uint32_t N>
   struct ForestN;
   using Forest = ForestN<FANOUT>;
@@ -301,11 +339,6 @@
     }
   };
 
-  static std::pair<uint64_t, uint64_t> location(uint64_t key) {
-    assert(key <= std::numeric_limits<uint32_t>::max());
-    return {key / BLOCK, key % BLOCK};
-  }
-
   template <typename F>
   void traverse(F&& f) {
     if (minkey_ <= maxkey_) {
@@ -320,19 +353,45 @@
   // the tree to become a forest in which case `traverse` will descend into it.
   template <typename F>
   void traverse(uint64_t start, uint64_t size, F&& f) {
-    auto [first_block, first_index] = location(start);
-    auto [last_block, last_index] = location(start + (size - 1));
+    auto [first_page, first_key_in_page] = pageOf(start);
+    auto [last_page, last_key_in_page] = pageOf(start + (size - 1));
 
     uint64_t key = start;
+    uint32_t page = first_page;
+    do {
+      auto* forest = getOrCreatePage(page);
+
+      uint32_t page_start = (page == first_page) ? first_key_in_page : 0;
+      uint32_t page_end = (page == last_page)
+          ? last_key_in_page
+          : std::numeric_limits<uint32_t>::max();
+      uint64_t page_size = uint64_t(page_end) - page_start + 1;
+
+      traversePage(forest, key, page_start, page_size, f);
+      key += page_size;
+    } while (page++ != last_page);
+  }
+
+  template <typename F>
+  void traversePage(
+      ForestN<FANOUT_TOP>* forest,
+      uint64_t key,
+      uint32_t start,
+      uint64_t size,
+      F&& f) {
+    auto [first_block, first_index] = location(start);
+    auto [last_block, last_index] =
+        location(static_cast<uint32_t>(start + (size - 1)));
+
     while (first_block < last_block) {
       const auto n = BLOCK - first_index;
-      traverse<0>(trees_->at(first_block), key, first_index, n, f);
+      traverse<0>(forest->at(first_block), key, first_index, n, f);
       key += n;
       ++first_block;
       first_index = 0;
     }
     traverse<0>(
-        trees_->at(first_block),
+        forest->at(first_block),
         key,
         first_index,
         last_index - first_index + 1,
@@ -362,7 +421,35 @@
     }
   }
 
-  std::unique_ptr<ForestN<FANOUT_TOP>> trees_;
+  // Get the forest for a page, creating it if needed (for insertion)
+  ForestN<FANOUT_TOP>* getOrCreatePage(uint32_t page) {
+    if (page < NUM_PREALLOCATED_PAGES) {
+      return pages_[page].get();
+    }
+    auto& p = overflow_[page];
+    if (!p) {
+      p = std::make_unique<ForestN<FANOUT_TOP>>(Tree::null());
+    }
+    return p.get();
+  }
+
+  // Get the forest for a page (for read-only access)
+  ForestN<FANOUT_TOP>* getPage(uint32_t page) const {
+    if (page < NUM_PREALLOCATED_PAGES) {
+      return pages_[page].get();
+    }
+    auto it = overflow_.find(page);
+    return it != overflow_.end() ? it->second.get() : nullptr;
+  }
+
+  // Preallocated pages for fast direct access (covers keys 0 to
+  // NUM_PREALLOCATED_PAGES * 2^32 - 1)
+  std::array<std::unique_ptr<ForestN<FANOUT_TOP>>, NUM_PREALLOCATED_PAGES>
+      pages_;
+  // Higher pages - sparse allocation for 64-bit key support beyond the
+  // preallocated range
+  mutable folly::F14FastMap<uint32_t, std::unique_ptr<ForestN<FANOUT_TOP>>>
+      overflow_;
   Pool<Forest> pool_;
   uint64_t minkey_ = std::numeric_limits<uint64_t>::max();
   uint64_t maxkey_ = 0;
diff --git a/glean/rts/ownership/uset.h b/glean/rts/ownership/uset.h
--- a/glean/rts/ownership/uset.h
+++ b/glean/rts/ownership/uset.h
@@ -8,9 +8,11 @@
 
 #pragma once
 
+#include "glean/rts/id.h"
 #include "glean/rts/ownership/setu32.h"
 
 #include <folly/Hash.h>
+#include <folly/container/F14Map.h>
 #include <folly/container/F14Set.h>
 #include <vector>
 
@@ -130,6 +132,9 @@
     std::swap(usets, other.usets);
     stats = other.stats;
   }
+  Usets(const Usets&) = delete;
+  Usets& operator=(const Usets&) = delete;
+  Usets& operator=(Usets&&) = delete;
 
   ~Usets() {
     // We can't delete the Usets before destroying the `usets` map because
@@ -287,6 +292,204 @@
   Stats stats;
   const UsetId firstId;
   UsetId nextId;
+};
+
+constexpr size_t USETS_MERGE_CACHE_SIZE = 10000;
+struct UsetsMerge {
+  struct CacheKey {
+    Uset* a;
+    Uset* b;
+
+    CacheKey(Uset* x, Uset* y) {
+      // Normalize as order doesn't matter. (A∪B = B∪A)
+      a = (x < y) ? x : y;
+      b = (x < y) ? y : x;
+    }
+
+    bool operator==(const CacheKey& o) const {
+      return (a == o.a && b == o.b);
+    }
+
+    size_t hash() const {
+      return folly::hash::hash_combine(a->hash, b->hash);
+    }
+  };
+
+  struct CacheKeyHash {
+    size_t operator()(const CacheKey& k) const {
+      return k.hash();
+    }
+  };
+
+  // Very simple bounded cache with approximate LRU by dividing into
+  // semi-spaces (new,old). If new fills up, old is discarded and new is
+  // moved into old. Both semi-spaces are used for fulfilling lookups.
+  struct Cache {
+    using Map = folly::F14FastMap<CacheKey, Uset*, CacheKeyHash>;
+
+    struct Stats {
+      size_t hits = 0;
+      size_t misses = 0;
+
+      double hitRate() const {
+        size_t total = hits + misses;
+        return total > 0 ? (hits * 100.0 / total) : 0.0;
+      }
+    };
+
+   private:
+    Map new_cache;
+    Map old_cache;
+    Usets& usets;
+    size_t max_size;
+    Stats stats;
+
+    void evictOldCache() {
+      for (auto& [key, value] : old_cache) {
+        usets.drop(key.a);
+        usets.drop(key.b);
+        usets.drop(value);
+      }
+      old_cache.clear();
+    }
+
+   public:
+    Cache(size_t max_size, Usets& usets) : usets(usets), max_size(max_size) {}
+
+    Uset* find(const CacheKey& key) {
+      auto it = new_cache.find(key);
+      if (it != new_cache.end()) {
+        stats.hits += 1;
+        return it->second;
+      }
+      it = old_cache.find(key);
+      if (it != old_cache.end()) {
+        stats.hits += 1;
+        return it->second;
+      }
+      stats.misses += 1;
+      return nullptr;
+    }
+
+    void insert(const CacheKey& key, Uset* value) {
+      if (new_cache.size() >= max_size) {
+        evictOldCache();
+        std::swap(old_cache, new_cache);
+      }
+      new_cache.insert({key, value});
+      usets.use(key.a);
+      usets.use(key.b);
+      usets.use(value);
+    }
+
+    const Stats& statistics() const {
+      return stats;
+    }
+
+    void clear() {
+      evictOldCache();
+      std::swap(old_cache, new_cache);
+      evictOldCache();
+    }
+  };
+
+ private:
+  Usets& usets;
+  Cache cache{USETS_MERGE_CACHE_SIZE, usets};
+
+  // Map from fact id to the vector of corresponding usets that have to be
+  // merged. A vector can contain duplicates, but it still performs better than
+  // set
+  folly::F14FastMap<Id, std::vector<Uset*>> refs;
+  size_t usets_count = 0;
+
+  Uset* mergeUsets(std::vector<Uset*>& setsToMerge) {
+    CHECK(!setsToMerge.empty());
+    if (setsToMerge.size() == 1) {
+      return setsToMerge[0];
+    }
+
+    while (setsToMerge.size() > 1) {
+      size_t numPairs = setsToMerge.size() / 2;
+      std::vector<Uset*> result(numPairs + (setsToMerge.size() % 2), nullptr);
+
+      for (size_t i = 0; i < numPairs; ++i) {
+        result[i] = merge(setsToMerge[i * 2], setsToMerge[i * 2 + 1]);
+      }
+
+      if (setsToMerge.size() % 2 == 1) {
+        result[numPairs] = setsToMerge.back();
+      }
+
+      setsToMerge.swap(result);
+    }
+
+    return setsToMerge[0];
+  }
+
+  Uset* merge(Uset* setA, Uset* setB) {
+    CacheKey key(setA, setB);
+    if (auto* cached = cache.find(key)) {
+      usets.use(cached);
+      usets.drop(setA);
+      usets.drop(setB);
+      return cached;
+    }
+    Uset* merged = usets.merge(setA, setB);
+    cache.insert(key, merged);
+    usets.drop(setA);
+    usets.drop(setB);
+    return merged;
+  }
+
+ public:
+  explicit UsetsMerge(Usets& usets_) : usets(usets_) {}
+
+  void addUset(Id factId, Uset* uset) {
+    refs[factId].push_back(uset);
+    usets.use(uset);
+    usets_count += 1;
+  }
+
+  Uset* addUsetAndMerge(Id factId, Uset* uset) {
+    if (uset) {
+      addUset(factId, uset);
+    }
+
+    auto factUsets = refs[factId];
+    usets_count -= factUsets.size();
+    auto merged = mergeUsets(factUsets);
+    refs.erase(factId);
+
+    return merged;
+  }
+
+  size_t bytes() const {
+    return refs.getAllocatedMemorySize() + usets_count * sizeof(Uset*);
+  }
+
+  const Cache::Stats& statistics() const {
+    return cache.statistics();
+  }
+
+  auto factIds() const {
+    std::vector<Id> factIds;
+    factIds.reserve(refs.size());
+    for (const auto& [key, _] : refs) {
+      factIds.push_back(key);
+    }
+    return factIds;
+  }
+
+  bool contains(Id factId) {
+    return refs.contains(factId);
+  }
+
+  void clear() {
+    cache.clear();
+    refs.clear();
+    usets_count = 0;
+  }
 };
 
 } // namespace rts
diff --git a/glean/rts/query.cpp b/glean/rts/query.cpp
--- a/glean/rts/query.cpp
+++ b/glean/rts/query.cpp
@@ -157,9 +157,9 @@
       Id id,
       binary::Output* key,
       binary::Output* val,
-      Pid pid,
+      Pid factPid,
       bool rec) {
-    recordResult(id, key, val, pid, rec);
+    recordResult(id, key, val, factPid, rec);
   }
 
   //
@@ -266,12 +266,8 @@
   const folly::ByteRange key(key_begin, key_end);
   auto token = iters.size();
   DVLOG(5) << "seek(" << type.toWord() << ") = " << token;
-  iters.emplace_back(Iter{
-      facts.seek(type, key, key.size()),
-      type,
-      Id::invalid(),
-      key.size(),
-      true});
+  iters.emplace_back(
+      Iter{facts.seek(type, key), type, Id::invalid(), key.size(), true});
   return static_cast<uint64_t>(token);
 };
 
@@ -284,12 +280,13 @@
   const folly::ByteRange key(key_begin, key_end);
   auto token = iters.size();
   DVLOG(5) << "seekWithinSection(" << type.toWord() << ") = " << token;
-  iters.emplace_back(Iter{
-      facts.seekWithinSection(type, key, key.size(), from, upto),
-      type,
-      Id::invalid(),
-      key.size(),
-      true});
+  iters.emplace_back(
+      Iter{
+          facts.seekWithinSection(type, key, from, upto),
+          type,
+          Id::invalid(),
+          key.size(),
+          true});
   return static_cast<uint64_t>(token);
 };
 
@@ -354,9 +351,9 @@
     binary::Output* kout,
     binary::Output* vout) {
   DVLOG(5) << "lookupKeyValue(" << fid.toWord() << ")";
-  Pid pid;
+  Pid factPid;
   facts.factById(fid, [&](Pid pid_, auto clause) {
-    pid = pid_;
+    factPid = pid_;
     if (kout) {
       *kout = binary::Output();
       kout->put(clause.key());
@@ -366,7 +363,7 @@
       vout->put(clause.value());
     }
   });
-  return pid;
+  return factPid;
 };
 
 Id QueryExecutor::newDerivedFact(
@@ -438,10 +435,10 @@
   return out;
 };
 
-void QueryExecutor::nestedFact(Id id, Pid pid) {
+void QueryExecutor::nestedFact(Id id, Pid factPid) {
   DVLOG(5) << "nestedFact: " << id.toWord();
   if (depth == Depth::ExpandPartial &&
-      expandPids.find(pid) == expandPids.end()) {
+      expandPids.find(factPid) == expandPids.end()) {
     return;
   }
   auto added = nested_results_added.insert(id.toWord());
@@ -454,11 +451,11 @@
     Id id,
     binary::Output* key,
     binary::Output* val,
-    Pid pid,
+    Pid factPid,
     bool rec) {
   assert(id != Id::invalid());
   result_ids.emplace_back(id.toWord());
-  result_pids.emplace_back(pid.toWord());
+  result_pids.emplace_back(factPid.toWord());
   result_keys.emplace_back(key ? key->string() : "");
   result_values.emplace_back(val ? val->string() : "");
   DVLOG(5) << "result added (" << id.toWord() << ")";
@@ -481,21 +478,21 @@
             *traverse, syscalls<&QueryExecutor::nestedFact>(*this), clause);
         ;
       } else {
-        auto predicate = inventory.lookupPredicate(pid);
+        auto predicate = inventory.lookupPredicate(factPid);
         if (!predicate) {
-          error("unknown pid: {}", pid.toWord());
+          error("unknown pid: {}", factPid.toWord());
         }
         predicate->traverse(
             syscalls<&QueryExecutor::nestedFact>(*this), clause);
       }
     }
     while (nested_result_pending.size() > 0) {
-      auto id = nested_result_pending[nested_result_pending.size() - 1];
+      auto nestedId = nested_result_pending[nested_result_pending.size() - 1];
       nested_result_pending.pop_back();
-      facts.factById(id, [&](Pid pid_, auto clause) {
+      facts.factById(nestedId, [&](Pid pid_, auto clause) {
         inventory.lookupPredicate(pid_)->traverse(
             syscalls<&QueryExecutor::nestedFact>(*this), clause);
-        nested_result_ids.emplace_back(id.toWord());
+        nested_result_ids.emplace_back(nestedId.toWord());
         nested_result_pids.emplace_back(pid_.toWord());
         auto key = binary::mkString(clause.key());
         auto val = binary::mkString(clause.value());
@@ -672,29 +669,29 @@
         serialize::get(in, lower_bound);
         serialize::get(in, upper_bound);
 
-        std::string keyBuf;
         bool found = facts.factById(id, [&](auto pid, Fact::Clause clause) {
+          Fact::Ref ref{id, pid, clause};
+          auto key = clause.key();
+          folly::ByteRange prefix{key.data(), key.data() + prefixSize};
           if (pid != type) {
             error("restart iter fact has wrong type");
           }
-          keyBuf = binary::mkString(clause.key());
+          if (lower_bound.has_value() && upper_bound.has_value()) {
+            auto from = lower_bound.value();
+            auto to = upper_bound.value();
+            iter = facts.seekWithinSection(type, prefix, from, to, ref);
+          } else {
+            iter = facts.seek(type, prefix, ref);
+          }
+          auto res = iter->get(FactIterator::KeyOnly);
+          if (!res || res.key() != key) {
+            error("restart iter didn't find a key");
+          }
+          assert(id == res.id);
         });
         if (!found) {
           error("restart iter fact not found");
         }
-        const auto key = binary::byteRange(keyBuf);
-        if (lower_bound.has_value() && upper_bound.has_value()) {
-          auto from = lower_bound.value();
-          auto to = upper_bound.value();
-          iter = facts.seekWithinSection(type, key, prefixSize, from, to);
-        } else {
-          iter = facts.seek(type, key, prefixSize);
-        }
-        auto res = iter->get(FactIterator::KeyOnly);
-        if (!res || res.key() != key) {
-          error("restart iter didn't find a key");
-        }
-        id = res.id;
         result.prefix_size = prefixSize;
         result.first = first;
       } else {
diff --git a/glean/rts/serialize.h b/glean/rts/serialize.h
--- a/glean/rts/serialize.h
+++ b/glean/rts/serialize.h
@@ -22,6 +22,16 @@
 inline void put(binary::Output& o, uint64_t i) {
   o.nat(i);
 }
+// Note [size_t differences]:
+// Since size_t != uint64_t on macOS, we will have a whole lot of headaches if
+// we don't define an overload so code serializing size_ts just works, but we
+// can't do it on Linux because it will be duplicated. I don't think I can fix
+// this with a template.
+#if __APPLE__
+inline void put(binary::Output& o, size_t i) {
+  o.nat(i);
+}
+#endif
 inline void put(binary::Output& o, uint32_t i) {
   o.nat(i);
 }
@@ -105,6 +115,12 @@
 inline void get(binary::Input& i, uint64_t& r) {
   r = i.untrustedNat();
 }
+// See Note [size_t differences].
+#if __APPLE__
+inline void get(binary::Input& i, size_t& r) {
+  r = i.untrustedNat();
+}
+#endif
 inline void get(binary::Input& i, uint32_t& r) {
   r = i.untrustedNat();
 }
@@ -212,10 +228,6 @@
 template <>
 Type typeOf<Nat>() {
   return NatTy;
-}
-template <>
-Type typeOf<Binary>() {
-  return BinaryTy;
 }
 template <>
 Type typeOf<String>() {
diff --git a/glean/rts/set.cpp b/glean/rts/set.cpp
--- a/glean/rts/set.cpp
+++ b/glean/rts/set.cpp
@@ -21,7 +21,7 @@
 namespace rts {
 
 SetOps::SetToken SetOps::newSet() {
-  sets.emplace_back(BytestringSet());
+  sets.emplace_back();
   set_sizes.emplace_back(0);
   return sets.size() - 1;
 }
@@ -54,7 +54,7 @@
 }
 
 SetOps::SetToken SetOps::newWordSet() {
-  wordsets.emplace_back(WordSet());
+  wordsets.emplace_back();
   return wordsets.size() - 1;
 }
 
diff --git a/glean/rts/stacked.h b/glean/rts/stacked.h
--- a/glean/rts/stacked.h
+++ b/glean/rts/stacked.h
@@ -77,29 +77,51 @@
     }
   }
 
-  std::unique_ptr<FactIterator>
-  seek(Pid type, folly::ByteRange start, size_t prefix_size) override {
-    return FactIterator::merge(
-        base->seekWithinSection(type, start, prefix_size, Id::invalid(), mid),
-        stacked->seek(type, start, prefix_size),
-        prefix_size);
+  std::unique_ptr<FactIterator> seek(
+      Pid type,
+      folly::ByteRange prefix,
+      std::optional<Fact::Ref> restart) override {
+    if (restart.has_value()) {
+      auto id = restart.value().id;
+      if (id < mid) {
+        return FactIterator::append(
+            base->seekWithinSection(type, prefix, Id::invalid(), mid, restart),
+            stacked->seek(type, prefix));
+      } else {
+        return stacked->seek(type, prefix, restart);
+      }
+    } else {
+      return FactIterator::append(
+          base->seekWithinSection(type, prefix, Id::invalid(), mid),
+          stacked->seek(type, prefix));
+    }
   }
 
   std::unique_ptr<FactIterator> seekWithinSection(
       Pid type,
-      folly::ByteRange start,
-      size_t prefix_size,
+      folly::ByteRange prefix,
       Id from,
-      Id to) override {
+      Id to,
+      std::optional<Fact::Ref> restart) override {
     if (to <= mid) {
-      return base->seekWithinSection(type, start, prefix_size, from, to);
+      return base->seekWithinSection(type, prefix, from, to, restart);
     } else if (mid <= from) {
-      return stacked->seekWithinSection(type, start, prefix_size, from, to);
+      return stacked->seekWithinSection(type, prefix, from, to, restart);
     } else {
-      return FactIterator::merge(
-          base->seekWithinSection(type, start, prefix_size, from, mid),
-          stacked->seekWithinSection(type, start, prefix_size, mid, to),
-          prefix_size);
+      if (restart.has_value()) {
+        auto id = restart.value().id;
+        if (id < mid) {
+          return FactIterator::append(
+              base->seekWithinSection(type, prefix, from, mid, restart),
+              stacked->seekWithinSection(type, prefix, mid, to));
+        } else {
+          return stacked->seekWithinSection(type, prefix, mid, to, restart);
+        }
+      } else {
+        return FactIterator::append(
+            base->seekWithinSection(type, prefix, from, mid),
+            stacked->seekWithinSection(type, prefix, mid, to));
+      }
     }
   }
 
diff --git a/glean/rts/store.h b/glean/rts/store.h
--- a/glean/rts/store.h
+++ b/glean/rts/store.h
@@ -11,11 +11,13 @@
 #include "glean/rts/fact.h"
 #include "glean/rts/lookup.h"
 
+#include <folly/Utility.h>
+
 namespace facebook {
 namespace glean {
 namespace rts {
 
-struct Store {
+struct Store : folly::NonCopyableNonMovable {
   /// Insert a new fact into the set if it doesn't conflict with existing
   /// facts. The return value indicates whether the fact was new.
   ///
@@ -27,7 +29,7 @@
   /// Inserting the same fact twice is fine.
   virtual void insert(Fact::Ref fact) = 0;
 
-  virtual ~Store() {}
+  virtual ~Store() = default;
 };
 
 inline void copyFacts(Store& store, Lookup& lookup) {
diff --git a/glean/rts/substitution.h b/glean/rts/substitution.h
--- a/glean/rts/substitution.h
+++ b/glean/rts/substitution.h
@@ -80,8 +80,9 @@
     return !(*this == other);
   }
 
-  void with(const std::function<void(Id base, const std::vector<Id>& items)>&
-                fun) const {
+  void with(
+      const std::function<void(Id base, const std::vector<Id>& items)>& fun)
+      const {
     fun(base, items);
   }
 
diff --git a/glean/rts/tests/LookupInvariants.cpp b/glean/rts/tests/LookupInvariants.cpp
--- a/glean/rts/tests/LookupInvariants.cpp
+++ b/glean/rts/tests/LookupInvariants.cpp
@@ -182,20 +182,19 @@
    ***********************************************************************/
   for (const auto& p : keys) {
     const auto type = p.first;
-    auto s = p.second.begin();
-    const auto e = p.second.end();
-    for (auto iter = lookup.seek(type, {}, 0); auto ref = iter->get();
+    const auto typeFacts = p.second;
+    int num = 0;
+    for (auto iter = lookup.seek(type, {}); auto ref = iter->get();
          iter->next()) {
-      CHECK(s != e);
       CHECK_EQ(ref.type, type);
-      CHECK_EQ(ref.id, s->second.first);
-      CHECK_EQ(ref.key().str(), s->first.str());
-      CHECK_EQ(ref.value().str(), s->second.second.str());
+      const auto& factPair = typeFacts.at(ref.key());
+      CHECK(factPair.first == ref.id);
+      CHECK_EQ(ref.value().str(), factPair.second.str());
       // check that resuming seeks works
-      CHECK_EQ(lookup.seek(type, ref.key(), 0)->get().id, ref.id);
-      ++s;
+      CHECK_EQ(lookup.seek(type, {}, ref)->get().id, ref.id);
+      num++;
     }
-    CHECK(s == e);
+    CHECK_EQ(num, typeFacts.size());
   }
 
   // TODO: prefix seeks
diff --git a/glean/schema/cpp/schema.h b/glean/schema/cpp/schema.h
new file mode 100644
--- /dev/null
+++ b/glean/schema/cpp/schema.h
@@ -0,0 +1,28466 @@
+#pragma once
+// @generated
+// Glean.Schema.Gen.Cpp definitions for fbcode/glean/lang/clang/schema.h
+// by //glean/hs:predicates using --cpp
+
+#include <tuple>
+#include <boost/variant.hpp>
+#include "glean/cpp/glean.h"
+
+
+
+namespace facebook {
+
+namespace glean {
+
+namespace cpp {
+
+namespace schema {
+
+constexpr int version = 1;
+
+namespace Sys {
+
+struct Blob;
+
+} // namespace Sys
+
+namespace Src {
+
+struct RelByteSpan;
+
+struct Range;
+
+struct RangeContains;
+
+struct PackedByteSpansGroup;
+
+struct Loc;
+
+enum class Language;
+
+enum class IndexFailureReason;
+
+struct IndexFailure;
+
+struct FileLines;
+
+struct FileLanguage;
+
+struct FileDigest;
+
+struct File;
+
+struct ByteSpan;
+
+struct ByteSpanContains;
+
+struct FileLocation;
+
+struct ByteRange;
+
+} // namespace Src
+
+namespace Search {
+
+namespace Python {
+
+struct QueryToScopeCase;
+
+struct PythonNameCase;
+
+} // namespace Python
+
+namespace Pp {
+
+struct SearchByName;
+
+} // namespace Pp
+
+namespace Java {
+
+struct QueryToScopeCase;
+
+struct NameCase;
+
+} // namespace Java
+
+namespace Hack {
+
+struct QueryToScopeCase;
+
+struct HackNameCase;
+
+struct HackInAutoImportedNamespace;
+
+} // namespace Hack
+
+namespace Flow {
+
+struct TypeDeclarationAsDeclaration;
+
+struct QueryToScopeCase;
+
+struct FlowModuleNameCase;
+
+} // namespace Flow
+
+namespace Cxx {
+
+struct QueryToQNameCase;
+
+struct QueryToNSQNameCase;
+
+struct CxxRecordCase;
+
+struct CxxNamespaceCase;
+
+} // namespace Cxx
+
+namespace Anglelang {
+
+struct NameLowerCase;
+
+} // namespace Anglelang
+
+} // namespace Search
+
+namespace Scip {
+
+enum class TextEncoding;
+
+struct SymbolName;
+
+struct SymbolDocumentation;
+
+struct SymbolDisplayName;
+
+struct Symbol;
+
+struct SomeEntity;
+
+struct ReferenceTarget;
+
+struct Reference;
+
+enum class ProtocolVersion;
+
+struct Location;
+
+struct LocalName;
+
+struct IsImplemented;
+
+struct IsImplementation;
+
+struct Entity;
+
+struct EntityDefinition;
+
+struct EntityLocation;
+
+struct EntityUses;
+
+struct FileEntityXRefLocation;
+
+struct ResolveLocation;
+
+struct SearchBySymbol;
+
+struct Documentation;
+
+struct DisplayNameSymbol;
+
+struct DisplayName;
+
+struct DefinitionUses;
+
+struct DefinitionName;
+
+struct DefinitionDocumentation;
+
+struct Definition;
+
+} // namespace Scip
+
+namespace Python {
+
+namespace Branches {
+
+struct Root;
+
+struct FileToRoot;
+
+struct DirectXRefByFile;
+
+} // namespace Branches
+
+struct XRefsViaNameByTarget;
+
+struct XRefsViaName;
+
+struct XRefViaName;
+
+struct XRefsViaNameByFile;
+
+struct VariableDeclaration;
+
+struct VariableBySName;
+
+struct TypeInfo;
+
+struct Type;
+
+struct StringLiteral;
+
+struct SearchVariableByName;
+
+struct SearchVariableByLowerCaseName;
+
+struct SearchModuleByName;
+
+struct SearchModuleByLowerCaseName;
+
+struct SearchMethodByName;
+
+struct SearchMethodByLowerCaseName;
+
+struct SearchFunctionByName;
+
+struct SearchFunctionByLowerCaseName;
+
+struct SearchFieldByName;
+
+struct SearchFieldByLowerCaseName;
+
+struct SearchClassByName;
+
+struct SearchClassByLowerCaseName;
+
+struct SNameToName;
+
+struct SName;
+
+struct ResolveOriginalName;
+
+struct Parameter;
+
+struct NameToSName;
+
+struct Name;
+
+struct ModuleDefinition;
+
+struct ModuleBySName;
+
+struct Module;
+
+struct MethodOverrides;
+
+struct MethodOverriden;
+
+struct MethodByLocalNameStr;
+
+struct ImportStatementByAsSName;
+
+struct ImportStatementByAsName;
+
+struct ImportStatement;
+
+struct ImportStarsByFile;
+
+struct ImportStarStatement;
+
+struct ImportStarLocation;
+
+struct FunctionDeclaration;
+
+struct FunctionBySName;
+
+struct DerivedClassToBase;
+
+struct Definition;
+
+struct DefinitionLocation;
+
+struct DefinitionsByFile;
+
+struct IsTopLevelDefinition;
+
+struct DeclarationContainer;
+
+struct FunctionDefinition;
+
+struct VariableDefinition;
+
+struct Declaration;
+
+struct DeclarationDefinition;
+
+struct DeclarationDocstring;
+
+struct DeclarationLocation;
+
+struct DeclarationReference;
+
+struct DeclarationToName;
+
+struct DeclarationUses;
+
+struct DeclarationWithLocalName;
+
+struct DeclarationWithName;
+
+struct DeclarationWithSName;
+
+struct DeclarationsByFile;
+
+struct DefinitionDeclaration;
+
+struct DirectXRef;
+
+struct DirectXRefsByFile;
+
+struct IsAbstract;
+
+struct IsTopLevelDeclaration;
+
+struct NonImportDeclaration;
+
+struct SNameWithDeclaration;
+
+} // namespace Python
+
+namespace Yaml {
+
+struct XRefViaName;
+
+struct XRefsByFile;
+
+} // namespace Yaml
+
+namespace Python {
+
+struct Contains;
+
+struct ContainingTopLevelDeclaration;
+
+struct ContainedByTopLevelDeclaration;
+
+struct ContainedBy;
+
+struct ClassDefinition;
+
+struct ClassDeclaration;
+
+struct ClassBySName;
+
+struct CalleeToCaller;
+
+struct BaseClassToDerived;
+
+struct Argument;
+
+struct CallArgument;
+
+struct FileCall;
+
+} // namespace Python
+
+namespace Pp1 {
+
+struct Use;
+
+struct Undef;
+
+struct Macro;
+
+struct Include;
+
+struct DefineUse;
+
+struct DefineLowerCase;
+
+struct Define;
+
+} // namespace Pp1
+
+namespace Lsif {
+
+namespace Types {
+
+struct ToolInfo;
+
+} // namespace Types
+
+} // namespace Lsif
+
+namespace Scip {
+
+struct Metadata;
+
+} // namespace Scip
+
+namespace Lsif {
+
+namespace Types {
+
+enum class SymbolKind;
+
+} // namespace Types
+
+} // namespace Lsif
+
+namespace Scip {
+
+struct EntityKind;
+
+struct SearchByNameKind;
+
+struct SymbolKind;
+
+} // namespace Scip
+
+namespace Lsif {
+
+namespace Types {
+
+struct RangeSpan;
+
+struct ToSrcRange;
+
+} // namespace Types
+
+} // namespace Lsif
+
+namespace Scip {
+
+struct DefinitionLocation;
+
+struct FileRange;
+
+struct FileXLangSymbolRef;
+
+struct ReferenceLocation;
+
+} // namespace Scip
+
+namespace Lsif {
+
+namespace Types {
+
+enum class LanguageId;
+
+} // namespace Types
+
+} // namespace Lsif
+
+namespace Scip {
+
+struct FileLanguage;
+
+struct TagDefinition;
+
+} // namespace Scip
+
+namespace Lsif {
+
+namespace Types {
+
+struct FromSrcRange;
+
+} // namespace Types
+
+struct SomeEntity;
+
+struct Reference;
+
+struct Range;
+
+struct ProjectDocument;
+
+struct Project;
+
+struct PackageInformation;
+
+struct NameLowerCase;
+
+struct NameDefinition;
+
+struct Name;
+
+struct MonikerSymbolKind;
+
+struct MonikerScheme;
+
+enum class MonikerKind;
+
+struct MonikerId;
+
+struct MonikerDefinition;
+
+struct Moniker;
+
+struct Metadata;
+
+struct Location;
+
+struct HoverText;
+
+struct HoverContent;
+
+struct Entity;
+
+struct EntityDefinition;
+
+struct EntityKind;
+
+struct EntityLocation;
+
+struct EntityUses;
+
+struct FileEntityXRefLocation;
+
+struct ResolveLocation;
+
+struct SearchByExactLocation;
+
+struct SearchByExactLocationAndName;
+
+struct SearchByMoniker;
+
+struct SearchByName;
+
+struct SearchNonLocalByLocation;
+
+struct TagDefinition;
+
+struct Document;
+
+struct DefinitionUse;
+
+struct DefinitionMoniker;
+
+struct DefinitionLocation;
+
+struct DefinitionKind;
+
+struct DefinitionHover;
+
+struct Definition;
+
+struct Declaration;
+
+} // namespace Lsif
+
+namespace Kotlin {
+
+namespace Alpha {
+
+struct VariableParent;
+
+struct VariableDeclaration;
+
+struct TypeArg;
+
+struct Type;
+
+struct DeclarationLocation;
+
+struct Declaration;
+
+struct DeclarationFileLocation;
+
+struct ExtendsDeclaration;
+
+struct FileDeclarations;
+
+struct MethodDeclaration;
+
+struct ParentDeclaration;
+
+} // namespace Alpha
+
+} // namespace Kotlin
+
+namespace Search {
+
+namespace Kotlin {
+
+struct SearchByQName;
+
+} // namespace Kotlin
+
+} // namespace Search
+
+namespace Symbolid {
+
+namespace Kotlin {
+
+struct LookupDeclaration;
+
+struct LookupMethodDeclaration;
+
+} // namespace Kotlin
+
+} // namespace Symbolid
+
+namespace Kotlin {
+
+namespace Alpha {
+
+struct ContainsDeclaration;
+
+struct ClassMember;
+
+struct ClassDeclaration;
+
+} // namespace Alpha
+
+} // namespace Kotlin
+
+namespace Javakotlin {
+
+namespace Alpha {
+
+struct Type;
+
+struct QName;
+
+struct Path;
+
+struct NameLowerCase;
+
+struct Name;
+
+struct MethodName;
+
+} // namespace Alpha
+
+} // namespace Javakotlin
+
+namespace Java {
+
+namespace Alpha {
+
+struct XRefTarget;
+
+struct XRefFile;
+
+struct XRef;
+
+struct Wildcard;
+
+struct TypeVar;
+
+struct TypeParam;
+
+struct TypeOfTypeArgs;
+
+struct TypeArg;
+
+struct PrimitiveType;
+
+struct PackageDeclaration;
+
+struct ObjectType;
+
+enum class Modifier;
+
+struct ParameterDeclaration;
+
+struct InterfaceInheritance;
+
+struct Inheritance;
+
+struct ImportDeclaration;
+
+struct FileXRefs;
+
+struct ExecutableDefinition;
+
+struct ExecutableDefnLocation;
+
+struct LocalDeclaration;
+
+struct Definition;
+
+struct DefinitionLocation;
+
+struct EnumDeclaration;
+
+struct FieldDeclaration;
+
+struct InterfaceDeclaration;
+
+struct MethodDeclaration;
+
+struct Declaration;
+
+struct DeclarationAnnotations;
+
+struct DeclarationComment;
+
+struct DeclarationLocation;
+
+struct DeclarationType;
+
+struct DeclarationUses;
+
+struct DeclarationXRefTarget;
+
+struct ExtendedByDeclaration;
+
+struct ExtendsDeclaration;
+
+struct FileDeclarations;
+
+struct ParentDeclaration;
+
+struct QNameToDefinition;
+
+struct XRefOfType;
+
+struct XRefTargetDeclaration;
+
+} // namespace Alpha
+
+} // namespace Java
+
+namespace Search {
+
+namespace Java {
+
+struct SearchByQName;
+
+} // namespace Java
+
+} // namespace Search
+
+namespace Symbolid {
+
+namespace Java {
+
+struct LookupDeclaration;
+
+struct LookupMethodDeclaration;
+
+} // namespace Java
+
+} // namespace Symbolid
+
+namespace Java {
+
+namespace Alpha {
+
+struct DeclOfExecutableDefn;
+
+struct DeclOfDefn;
+
+struct ContainsDeclaration;
+
+struct ConstructorDeclaration;
+
+struct ClassDeclaration;
+
+struct BaseType;
+
+struct Type;
+
+struct ArrayType;
+
+struct Annotation;
+
+struct AnnotatedClass;
+
+} // namespace Alpha
+
+} // namespace Java
+
+namespace Indexer {
+
+struct Config;
+
+} // namespace Indexer
+
+namespace Hs {
+
+struct ValBind;
+
+struct UnitName;
+
+struct TypeSynDecl;
+
+struct TypeFamilyDecl;
+
+struct TypeArg;
+
+struct TyVarBind;
+
+enum class TupleSort;
+
+struct TyConSort;
+
+struct TyCon;
+
+enum class Specificity;
+
+struct SourceModule;
+
+struct SigDecl;
+
+struct RefTarget;
+
+enum class RefKind;
+
+struct RefSpan;
+
+struct XRef;
+
+struct RecordFieldDecl;
+
+struct PatSynDecl;
+
+struct PatBind;
+
+struct OccNameLowerCase;
+
+enum class Namespace;
+
+struct OccName;
+
+struct NameSort;
+
+struct Name;
+
+struct ModuleSource;
+
+struct ModuleName;
+
+struct ModuleDeclarations;
+
+struct Module;
+
+struct MethDecl;
+
+struct LitType;
+
+struct InstanceDecl;
+
+struct InstanceBindToDecl;
+
+struct InstanceBind;
+
+struct FileXRefs;
+
+struct DeclarationLocation;
+
+struct Declaration;
+
+struct DeclarationOfName;
+
+struct DeclarationSpan;
+
+struct DataDecl;
+
+struct ConstrDecl;
+
+struct ClassDecl;
+
+struct ArgFlag;
+
+struct Type;
+
+} // namespace Hs
+
+namespace Hack {
+
+enum class Visibility;
+
+enum class Variance;
+
+struct UserAttribute;
+
+struct TypedefDeclaration;
+
+enum class TypeConstKind;
+
+struct TypeConstDefinition;
+
+struct Type;
+
+struct TraitDeclaration;
+
+struct StringLiteral;
+
+struct SearchTypedefByLowerCaseName;
+
+struct SearchTypeConstByLowerCaseName;
+
+struct SearchTraitByLowerCaseName;
+
+struct SearchPropertyByLowerCaseName;
+
+struct SearchNamespaceByLowerCaseName;
+
+struct SearchModuleByLowerCaseName;
+
+struct SearchMethodByLowerCaseName;
+
+struct SearchInterfaceByLowerCaseName;
+
+struct SearchGlobalConstByLowerCaseName;
+
+struct SearchFunctionByLowerCaseName;
+
+struct SearchEnumeratorByLowerCaseName;
+
+struct SearchEnumByLowerCaseName;
+
+struct SearchClassConstByLowerCaseName;
+
+struct SearchClassByLowerCaseName;
+
+enum class ReifyKind;
+
+enum class ReadonlyKind;
+
+struct QName;
+
+struct PropertyDefinition;
+
+struct Parameter;
+
+struct Signature;
+
+struct Occurrence;
+
+struct NamespaceQName;
+
+struct NamespaceDeclaration;
+
+struct NameLowerCase;
+
+struct Name;
+
+struct ModuleMembership;
+
+struct ModuleDefinition;
+
+struct ModuleDeclaration;
+
+struct MethodOverrides;
+
+struct MethodOverridden;
+
+struct MethodOccurrence;
+
+struct InterfaceDeclaration;
+
+struct IndexerInputsHash;
+
+struct GlobalNamespaceAlias;
+
+struct GlobalConstDefinition;
+
+struct GlobalConstDeclaration;
+
+struct FunctionDeclaration;
+
+struct FieldClassConst;
+
+struct ShapeKV;
+
+struct Hint;
+
+struct Enumerator;
+
+struct EnumDefinition;
+
+struct EnumDeclaration;
+
+struct Definition;
+
+struct Context_;
+
+struct ContainerDeclaration;
+
+struct ContainerDeclarationQName;
+
+struct ContainerParent;
+
+struct Declaration;
+
+struct DeclarationComment;
+
+struct DeclarationLocation;
+
+struct DeclarationName;
+
+struct DeclarationNamespace;
+
+struct DeclarationSource;
+
+struct DeclarationSpan;
+
+struct DeclarationTarget;
+
+struct FileDeclarations;
+
+struct MemberCluster;
+
+struct ModuleChild;
+
+struct ModuleParent;
+
+struct NamespaceMember;
+
+struct SearchClassByName;
+
+struct SearchClassConstByName;
+
+struct SearchEnumByName;
+
+struct SearchEnumeratorByName;
+
+struct SearchFunctionByName;
+
+struct SearchGlobalConstByName;
+
+struct SearchInterfaceByName;
+
+struct SearchMethodByName;
+
+struct SearchModuleByName;
+
+struct SearchNamespaceByName;
+
+struct SearchPropertyByName;
+
+struct SearchTraitByName;
+
+struct SearchTypeConstByName;
+
+struct SearchTypedefByName;
+
+struct XRefTarget;
+
+struct TargetUses;
+
+struct TargetUsesAbs;
+
+struct XRef;
+
+struct FileXRefs;
+
+struct TypeInfo;
+
+} // namespace Hack
+
+namespace Search {
+
+namespace Hack {
+
+struct SearchByName;
+
+struct SearchFunctionInNamespace;
+
+struct SearchGlobalConstInNamespace;
+
+struct SearchInContainer;
+
+struct SearchInContainerNoProperty;
+
+struct SearchInContainerOrEnum;
+
+struct SearchInContainerOrEnumNoProperty;
+
+struct SearchInEnum;
+
+struct SearchInNamespace;
+
+struct SearchModule;
+
+struct SearchNamespace;
+
+struct SearchNamespacedDecl;
+
+struct SearchPropertyInContainer;
+
+struct SearchTypeInNamespace;
+
+} // namespace Hack
+
+} // namespace Search
+
+namespace Hack {
+
+struct InheritedMembers;
+
+struct MethodDeclaration;
+
+struct PropertyDeclaration;
+
+struct TypeConstDeclaration;
+
+struct ContainerChild;
+
+enum class ConstraintKind;
+
+struct Constraint;
+
+struct TypeParameter;
+
+struct FunctionDefinition;
+
+struct InterfaceDefinition;
+
+struct MethodDefinition;
+
+struct TraitDefinition;
+
+struct TypedefDefinition;
+
+struct ClassDefinition;
+
+struct ClassDeclaration;
+
+struct ClassConstDefinition;
+
+struct ClassConstDeclaration;
+
+struct AttributeToDefinition;
+
+struct AttributeToDeclaration;
+
+struct AttributeHasParameter;
+
+struct Argument;
+
+struct CallArgument;
+
+struct FileCall;
+
+} // namespace Hack
+
+namespace Graphql {
+
+struct VariableDef;
+
+struct Value;
+
+struct UnionTypeDef;
+
+struct SelectionSet;
+
+struct ScalarTypeDef;
+
+enum class OperationKind;
+
+struct Operation;
+
+struct ObjectTypeDef;
+
+struct NameLowerCase;
+
+struct InterfaceTypeDef;
+
+struct InputValueDef;
+
+struct InputObjectTypeDef;
+
+struct InlineFragment;
+
+struct FragmentSpread;
+
+struct Fragment;
+
+struct FieldDef;
+
+struct Field;
+
+struct EnumTypeDef;
+
+enum class DirectiveDefLocation;
+
+struct DirectiveDef;
+
+struct Directive;
+
+struct Declaration;
+
+struct DeclarationLocation;
+
+struct DeclarationName;
+
+struct DeclarationUses;
+
+struct FileDeclarations;
+
+struct SearchByName;
+
+struct XRef;
+
+struct FileXRefs;
+
+struct DeclHasName;
+
+struct BelongToConfig;
+
+struct Argument;
+
+} // namespace Graphql
+
+namespace Glean {
+
+namespace Test {
+
+struct nothingTest;
+
+struct WrappedStringPair;
+
+struct ViaStringPair;
+
+struct Unbound2;
+
+struct Unbound;
+
+struct TreeToTree;
+
+struct Tree;
+
+struct Sum_;
+
+struct StringPairBox;
+
+struct StringPair;
+
+struct StoredRevStringPairWithRev;
+
+struct StoredRevStringPairWithA;
+
+struct StoredRevStringPairSum;
+
+struct StoredRevStringPair;
+
+struct StoredDualStringPair;
+
+struct SkipRevEdge;
+
+struct SameString;
+
+struct RevStringPairs;
+
+struct RevStringPairRec;
+
+struct RevStringPair;
+
+struct RevRevStringPair;
+
+struct RevEdge;
+
+struct ReflStringPair;
+
+struct RefRef;
+
+struct Ref;
+
+struct Qux;
+
+struct Predicate_0;
+
+struct NodePair;
+
+struct Node;
+
+struct Name;
+
+struct MatchOneAlt;
+
+struct LeftOr2;
+
+struct LeftOr;
+
+struct KeyValue;
+
+struct IsThree;
+
+struct IsParent;
+
+struct IsGlean;
+
+struct FooToFoo;
+
+struct Foo;
+
+struct Expr;
+
+enum class Enum_;
+
+struct Rec;
+
+struct EmptyStoredStringPair;
+
+struct EmptyPred;
+
+struct EdgeWrapper;
+
+struct EdgeSum;
+
+struct EdgeFromNotA;
+
+struct Edge;
+
+struct DualStringPair;
+
+struct DerivedKeyValue2;
+
+struct DerivedKeyValue;
+
+struct Bar;
+
+enum class KitchenSink_enum_;
+
+struct KitchenSink;
+
+struct Predicate_;
+
+} // namespace Test
+
+} // namespace Glean
+
+namespace Gencode {
+
+enum class GenCodeVariant;
+
+struct GenCodeSignature;
+
+struct GenCodeCommand;
+
+struct GenCodeClass;
+
+struct GenCodeBySource;
+
+struct GenCode;
+
+} // namespace Gencode
+
+namespace Flow {
+
+struct XRef;
+
+struct TypeImportDeclaration;
+
+struct TypeExport;
+
+struct TypeDeclarationReference;
+
+struct TypeDeclarationInfo;
+
+struct TypeDeclaration;
+
+struct Type;
+
+struct StringToFileModule;
+
+struct SourceOfTypeExport;
+
+struct SourceOfExport;
+
+struct SomeDeclaration;
+
+struct SomeEntity;
+
+} // namespace Flow
+
+namespace Search {
+
+namespace Flow {
+
+struct FlowSearchByNameNonImport;
+
+} // namespace Flow
+
+} // namespace Search
+
+namespace Flow {
+
+struct SearchTypeDeclarationByName;
+
+struct SearchTypeDeclarationByLowerCaseName;
+
+struct SearchTypeByModuleExport;
+
+struct SearchModuleByLowerCaseName;
+
+struct SearchMemberDeclarationByName;
+
+struct SearchMemberDeclarationByLowerCaseName;
+
+struct SearchDeclarationByName;
+
+struct SearchDeclarationByLowerCaseName;
+
+struct SearchByNameModule;
+
+struct SearchByName;
+
+struct SearchByModuleName;
+
+struct SearchByModule;
+
+struct SearchByFileModule;
+
+struct Range;
+
+struct Name;
+
+struct ModuleTypeExport;
+
+struct ModuleNameLowerCase;
+
+struct ModuleLocationByFile;
+
+struct ModuleLocation;
+
+struct ModuleExport;
+
+struct ModuleDoc;
+
+struct ModuleContains;
+
+struct ModuleComments;
+
+struct Module;
+
+struct MemberDeclarationReference;
+
+struct MemberDeclarationInfo;
+
+struct MemberDeclaration;
+
+struct LocalDeclarationReference;
+
+struct ImportDeclaration;
+
+struct FlowXRefDeclInfo;
+
+struct FlowTypeImportXRef;
+
+struct FlowTypeExportLocation;
+
+struct FlowTypeEntityImportUses;
+
+struct FlowSameModule;
+
+struct FlowModuleNamespaceXRef;
+
+struct FlowImportXRef;
+
+struct FlowExportLocation;
+
+struct FlowEntityUsesAll;
+
+struct FlowEntityImportUses;
+
+struct FlowCompatibleExport;
+
+struct FileXRef;
+
+struct FileOfStringModule;
+
+struct FileDeclaration;
+
+struct Export;
+
+struct Documentation;
+
+struct DeclarationUses;
+
+struct DeclarationSignature;
+
+struct DeclarationNameSpan;
+
+struct DeclarationLocation;
+
+struct DeclarationInfo;
+
+struct Declaration;
+
+} // namespace Flow
+
+namespace Fbthrift {
+
+struct XRefTarget;
+
+struct TypedConst;
+
+struct TypedConstT;
+
+struct UnionFieldVal;
+
+struct UnionVal;
+
+struct TypeDefType;
+
+struct Target;
+
+struct StructuredAnnotation;
+
+struct StructFieldValValue;
+
+struct StructFieldVal;
+
+struct StructVal;
+
+struct ServiceParent;
+
+struct ServiceName;
+
+struct ServiceInteractionFunctions;
+
+struct ServiceDefinition;
+
+struct ServiceChild;
+
+struct SearchByName;
+
+struct ResultSink;
+
+enum class Qualifier;
+
+struct QualName;
+
+enum class PrimitiveType;
+
+struct PackageName;
+
+struct Package;
+
+struct NamespaceValue;
+
+struct NamespaceName;
+
+struct Namespace;
+
+enum class NamedKind;
+
+struct NamedType;
+
+struct NamedDecl;
+
+struct NameLowerCase;
+
+struct MapType;
+
+struct Loc;
+
+struct XRef;
+
+struct KeyValue;
+
+struct InteractionName;
+
+struct InteractionDefinition;
+
+struct IntegerLiteral;
+
+struct Identifier;
+
+struct FunctionName;
+
+struct FloatLiteral;
+
+struct Literal;
+
+struct FileXRefs;
+
+struct File;
+
+enum class FieldKind;
+
+struct FieldSpecification;
+
+struct StructType;
+
+struct UnqualField;
+
+struct UnionType;
+
+struct FieldDecl;
+
+struct ExceptionVal;
+
+struct ExceptionType;
+
+struct ExceptionSpecName;
+
+struct ExceptionSpecification;
+
+struct ResultStream;
+
+struct TypeDefException;
+
+struct ExceptionName;
+
+struct EnumerationType;
+
+struct EnumValueDef;
+
+struct EnumValue;
+
+struct EnumVal;
+
+struct DeclarationComment;
+
+struct DeclarationFile;
+
+struct DeclarationMember;
+
+struct DeclarationName;
+
+struct DeclarationNameSpan;
+
+struct DeclarationUses;
+
+struct FileDeclaration;
+
+struct FunctionDeclarationName;
+
+} // namespace Fbthrift
+
+namespace Hack {
+
+struct HackToThrift;
+
+struct ThriftToHack;
+
+} // namespace Hack
+
+namespace Fbthrift {
+
+struct ContainerType;
+
+struct TypeSpecification;
+
+struct ConstantDefinition;
+
+struct Constant;
+
+} // namespace Fbthrift
+
+namespace Erlang {
+
+struct NameLowerCase;
+
+struct Fqn;
+
+struct FunctionDeclaration;
+
+struct XRefViaFqn;
+
+struct XRefsViaFqnByFile;
+
+struct DeclarationComment;
+
+struct Declaration;
+
+struct DeclarationLocation;
+
+struct DeclarationReference;
+
+struct DeclarationToFqn;
+
+struct DeclarationUses;
+
+struct DeclarationWithFqn;
+
+struct DeclarationsByFile;
+
+struct SearchByName;
+
+} // namespace Erlang
+
+namespace Dyn {
+
+enum class Usage;
+
+struct ObserverIdentifier;
+
+struct Observer;
+
+struct Environment;
+
+struct EntityDynamicReference;
+
+} // namespace Dyn
+
+namespace Digest {
+
+struct Digest;
+
+struct FileDigest;
+
+} // namespace Digest
+
+namespace Glass {
+
+struct FileMetadata;
+
+struct FileInfo;
+
+} // namespace Glass
+
+namespace Dataswarm {
+
+struct TableDeclaration;
+
+struct TableColumnDeclaration;
+
+struct SubqueryDeclaration;
+
+struct SubqueryColumnDeclaration;
+
+struct MacroDeclaration;
+
+struct Declaration;
+
+struct DeclarationLocation;
+
+struct DeclarationName;
+
+struct XRef;
+
+struct XRefsByFile;
+
+} // namespace Dataswarm
+
+namespace Cxx1 {
+
+struct XRefVia;
+
+struct VariableLowerCase;
+
+struct UsingDirective;
+
+struct UsingDeclaration;
+
+struct TypeAliasLowerCase;
+
+enum class TypeAliasKind;
+
+struct TypeAliasDeclaration;
+
+struct Type;
+
+struct TranslationUnitXRefs;
+
+struct TranslationUnitTrace;
+
+struct TranslationUnitIncludeTree;
+
+struct Trace;
+
+enum class RefQualifier;
+
+struct RecordUnionLowerCase;
+
+struct RecordStructLowerCase;
+
+struct RecordDerived;
+
+struct RecordClassLowerCase;
+
+struct PpEntity;
+
+struct Parameter;
+
+struct Signature;
+
+struct PPDefineLocation;
+
+struct ObjcSelectorSlot;
+
+struct ObjcSelector;
+
+enum class ObjcPropertyKind;
+
+struct ObjcPropertyImplementation;
+
+struct ObjcPropertyIVar;
+
+struct ObjcMethodDefinition;
+
+struct ObjcMethodDeclarationName;
+
+struct ObjcInterfaceToImplementation;
+
+struct ObjcImplements;
+
+struct ObjcIVar;
+
+struct ObjcContainerInterfaceLowerCase;
+
+struct ObjcContainerInheritance;
+
+struct ObjcContainerDefinition;
+
+struct ObjcContainerDeclarationInterface;
+
+struct ObjcContainerBase;
+
+struct ObjcCategoryId;
+
+struct ObjcContainerId;
+
+struct ObjcContainerDeclaration;
+
+struct ObjcMethodDeclaration;
+
+struct ObjcPropertyDeclaration;
+
+struct ObjContainerIdName;
+
+struct NamespaceTarget;
+
+struct NamespaceQName;
+
+struct NamespaceLowerCase;
+
+struct NamespaceDefinition;
+
+struct NamespaceDeclarationName;
+
+struct NamespaceDeclarationByName;
+
+struct NamespaceDeclaration;
+
+struct NamespaceAliasDeclaration;
+
+struct Name;
+
+struct MethodSignature;
+
+struct MethodOverrides;
+
+struct MethodOverridden;
+
+struct MaybeIncludeTree;
+
+enum class LocalVariableKind;
+
+enum class LocalVariableAttribute;
+
+struct LocalVariable;
+
+struct IncludeTreeTranslationUnit;
+
+struct IncludeTreeParent;
+
+struct IncludeTree;
+
+struct IncludeTrace;
+
+struct PPEvent;
+
+struct PPTrace;
+
+enum class GlobalVariableKind;
+
+enum class GlobalVariableAttribute;
+
+struct GlobalVariable;
+
+struct FunctionLowerCase;
+
+struct FunctionDefinition;
+
+struct FunctionDeclarationNameString;
+
+struct FunctionDeclarationName;
+
+struct FunctionDeclaration;
+
+struct FunctionDeclAttribute;
+
+struct FunctionAttribute;
+
+struct From;
+
+struct FileXRefs;
+
+struct FilePPUseXRefs;
+
+struct FilePPUseTraceXRefs;
+
+struct FilePPTraceXRefs;
+
+struct Field;
+
+struct VariableKind;
+
+struct VariableDeclaration;
+
+struct EnumeratorLowerCase;
+
+struct EnumeratorInEnum;
+
+struct EnumeratorByName;
+
+struct Enumerator;
+
+struct EnumLowerCase;
+
+struct EnumDefinition;
+
+struct EnumDeclaration;
+
+struct DefinitionEntity;
+
+struct DefnInRecord;
+
+struct Declaration;
+
+struct DeclarationComment;
+
+struct DeclarationInTrace;
+
+struct DeclarationLocationName;
+
+struct DeclarationLocationNameSpan;
+
+struct DeclarationNameSpan;
+
+struct DeclarationSources;
+
+struct DeclarationSrcRange;
+
+struct DeclarationTargets;
+
+struct DeclarationToUSR;
+
+struct Declarations;
+
+struct DefToBaseDecl;
+
+struct MangledNameHashToDeclaration;
+
+struct Same;
+
+struct USRToDeclaration;
+
+struct XRefTarget;
+
+struct FixedXRef;
+
+struct FileXRefMap;
+
+struct SpellingXRef;
+
+struct TargetUses;
+
+struct ThriftToCxx;
+
+struct XRefIndirectTarget;
+
+struct XRefTargets;
+
+} // namespace Cxx1
+
+namespace Symbolid {
+
+namespace Cxx {
+
+struct LookupNamespaceDeclaration;
+
+} // namespace Cxx
+
+} // namespace Symbolid
+
+namespace Cxx1 {
+
+struct DeclToFamily;
+
+struct DeclInRecord;
+
+struct DeclInObjcContainer;
+
+struct DeclFamilyOf;
+
+struct DeclFamily;
+
+struct CxxToThrift;
+
+struct Attribute;
+
+enum class Access;
+
+struct RecordBase;
+
+struct RecordDefinition;
+
+} // namespace Cxx1
+
+namespace Csharp {
+
+enum class Variance;
+
+enum class UnityPackageType;
+
+struct UnityPackageToProject;
+
+struct UnityPackage;
+
+enum class UnityAssemblyType;
+
+struct UnityProjectSource;
+
+struct TypeParameter;
+
+struct SourceFileToProject;
+
+struct SolutionToProject;
+
+struct Solution;
+
+enum class RefKind;
+
+struct ProjectToSourceFile;
+
+struct ProjectToSolution;
+
+struct ProjectSource;
+
+struct Project;
+
+struct Namespace;
+
+struct NamedType;
+
+struct NameLowerCase;
+
+struct Name;
+
+enum class MethodKind;
+
+struct MethodInvocationExpression;
+
+struct MemberAccessExpression;
+
+struct MSBuildProjectSource;
+
+struct Location;
+
+struct MemberAccessLocation;
+
+struct MethodInvocationLocation;
+
+struct Implements;
+
+struct FunctionPointerType;
+
+struct FullName;
+
+enum class Accessibility;
+
+struct Class;
+
+struct Interface;
+
+struct Record;
+
+struct Struct;
+
+struct AType;
+
+struct ArrayType;
+
+struct Definition;
+
+struct DefinitionLocation;
+
+struct DefinitionLocationName;
+
+struct FileDefinitions;
+
+struct FileEntityXRefs;
+
+struct SearchByName;
+
+struct Field;
+
+struct Local;
+
+struct Method;
+
+struct ObjectCreationLocation;
+
+struct Parameter;
+
+struct PointerType;
+
+struct Property;
+
+struct TypeLocation;
+
+} // namespace Csharp
+
+namespace Codemarkup {
+
+namespace Yaml {
+
+struct YamlDataAvailable;
+
+} // namespace Yaml
+
+namespace Types {
+
+enum class Visibility;
+
+enum class SymbolKind;
+
+} // namespace Types
+
+} // namespace Codemarkup
+
+namespace Search {
+
+namespace Code {
+
+struct CxxNameLowerCase;
+
+struct FlowNameLowerCase;
+
+struct HackNameLowerCase;
+
+struct PythonNameLowerCase;
+
+} // namespace Code
+
+} // namespace Search
+
+namespace Codemarkup {
+
+namespace Types {
+
+struct SymbolInfo;
+
+struct RangeSpan;
+
+struct RangeSpanContains;
+
+struct Modifiers;
+
+enum class Modifier;
+
+struct Location;
+
+struct XRefLocation;
+
+} // namespace Types
+
+namespace Search {
+
+enum class SearchCase;
+
+} // namespace Search
+
+namespace Scip {
+
+struct LsifKindToKind;
+
+struct FileXLangSymbolRefs;
+
+} // namespace Scip
+
+namespace Python {
+
+struct NonImportPythonDeclarationKind;
+
+struct NonImportPythonDeclarationInfo;
+
+struct ConvertLabel;
+
+} // namespace Python
+
+namespace Pp {
+
+struct PpIncludeXRefLocations;
+
+} // namespace Pp
+
+namespace Lsif {
+
+struct LsifKindToKind;
+
+} // namespace Lsif
+
+namespace Hack {
+
+enum class RequiredRelation;
+
+struct HackInheritedEntities;
+
+struct HackEnumInheritedMembers;
+
+struct FromHackVisibility;
+
+} // namespace Hack
+
+namespace Flow {
+
+struct FlowDocumentationSpan;
+
+struct FlowDeclarationDocumentation;
+
+} // namespace Flow
+
+namespace Cxx {
+
+struct FromCxxVisibility;
+
+struct CxxFileEntityXMapVariableXRefDeclLocations;
+
+struct CxxDeclarationModifiers;
+
+struct CxxDeclVisibility;
+
+struct CxxDeclKind;
+
+struct CxxDeclInfo;
+
+struct CxxDataAvailable;
+
+} // namespace Cxx
+
+enum class SearchStyle;
+
+enum class RelationType;
+
+struct IndexedFile;
+
+struct EntityDataAvailable;
+
+} // namespace Codemarkup
+
+namespace Code {
+
+namespace Scip {
+
+struct Entity;
+
+} // namespace Scip
+
+} // namespace Code
+
+namespace Codemarkup {
+
+namespace Scip {
+
+struct EntityInfo;
+
+struct ScipEntityDocumentation;
+
+struct ScipEntityLocation;
+
+struct ScipEntityUses;
+
+struct ScipFileEntityXRefLocations;
+
+struct ScipResolveLocation;
+
+} // namespace Scip
+
+} // namespace Codemarkup
+
+namespace Code {
+
+namespace Python {
+
+struct Entity;
+
+} // namespace Python
+
+} // namespace Code
+
+namespace Codemarkup {
+
+namespace Python {
+
+struct PythonContainsChildEntity;
+
+struct PythonContainsParentEntity;
+
+struct PythonEntityComments;
+
+struct PythonEntityInfo;
+
+struct PythonEntityKind;
+
+struct PythonEntityLocation;
+
+struct PythonEntityModuleName;
+
+struct PythonEntityUses;
+
+struct PythonExtendsChildEntity;
+
+struct PythonExtendsParentEntity;
+
+struct PythonFileEntityXRefLocations;
+
+struct PythonModifiers;
+
+struct PythonResolveLocation;
+
+struct PythonVisibility;
+
+} // namespace Python
+
+} // namespace Codemarkup
+
+namespace Code {
+
+namespace Python {
+
+struct Annotations;
+
+} // namespace Python
+
+} // namespace Code
+
+namespace Codemarkup {
+
+namespace Python {
+
+struct PythonAnnotation;
+
+} // namespace Python
+
+} // namespace Codemarkup
+
+namespace Code {
+
+namespace Pp {
+
+struct Entity;
+
+} // namespace Pp
+
+} // namespace Code
+
+namespace Codemarkup {
+
+namespace Pp {
+
+struct PPEntityLocation;
+
+struct PpEntityInfo;
+
+struct PpEntityKind;
+
+struct PpEntityTraceXRefLocations;
+
+struct PpEntityUses;
+
+struct PpFileEntityXRefLocations;
+
+struct PpResolveLocation;
+
+struct PpResolveTraceLocation;
+
+} // namespace Pp
+
+} // namespace Codemarkup
+
+namespace Code {
+
+namespace Lsif {
+
+struct Entity;
+
+} // namespace Lsif
+
+} // namespace Code
+
+namespace Codemarkup {
+
+namespace Lsif {
+
+struct EntityInfo;
+
+struct LsifEntityLocation;
+
+struct LsifEntityModuleName;
+
+struct LsifEntityUses;
+
+struct LsifFileEntityXRefLocations;
+
+struct LsifResolveLocation;
+
+} // namespace Lsif
+
+} // namespace Codemarkup
+
+namespace Code {
+
+namespace Kotlin {
+
+struct Entity;
+
+} // namespace Kotlin
+
+} // namespace Code
+
+namespace Codemarkup {
+
+namespace Kotlin {
+
+struct KotlinContainsChildEntity;
+
+struct KotlinContainsParentEntity;
+
+struct KotlinEntityKind;
+
+struct KotlinEntityLocation;
+
+struct KotlinEntityUses;
+
+struct KotlinExtendsParentEntity;
+
+struct KotlinFileEntityXRefLocations;
+
+struct KotlinResolveLocation;
+
+} // namespace Kotlin
+
+} // namespace Codemarkup
+
+namespace Code {
+
+namespace Java {
+
+struct Entity;
+
+} // namespace Java
+
+} // namespace Code
+
+namespace Codemarkup {
+
+namespace Java {
+
+struct JavaContainsChildEntity;
+
+struct JavaContainsParentEntity;
+
+struct JavaEntityDocumentation;
+
+struct JavaEntityKind;
+
+struct JavaEntityLocation;
+
+struct JavaEntityUses;
+
+struct JavaExtendsChildEntity;
+
+struct JavaExtendsParentEntity;
+
+struct JavaModifiers;
+
+struct JavaResolveLocation;
+
+struct JavaVisibility;
+
+struct JavalFileEntityXRefLocations;
+
+} // namespace Java
+
+} // namespace Codemarkup
+
+namespace Code {
+
+namespace Java {
+
+struct Annotations;
+
+} // namespace Java
+
+} // namespace Code
+
+namespace Codemarkup {
+
+namespace Java {
+
+struct JavaAnnotation;
+
+} // namespace Java
+
+} // namespace Codemarkup
+
+namespace Code {
+
+namespace Hs {
+
+struct Entity;
+
+} // namespace Hs
+
+} // namespace Code
+
+namespace Codemarkup {
+
+namespace Haskell {
+
+struct HaskellContainsChildEntity;
+
+struct HaskellContainsParentEntity;
+
+struct HaskellEntityLocation;
+
+struct HaskellEntityUses;
+
+struct HaskellFileEntityXRefLocations;
+
+struct HaskellResolveLocation;
+
+} // namespace Haskell
+
+} // namespace Codemarkup
+
+namespace Search {
+
+namespace Hs {
+
+struct SearchByLowerCaseName;
+
+struct SearchByName;
+
+} // namespace Hs
+
+} // namespace Search
+
+namespace Code {
+
+namespace Hack {
+
+struct Entity;
+
+} // namespace Hack
+
+} // namespace Code
+
+namespace Codemarkup {
+
+namespace Hack {
+
+struct EntityHasHideFromDocsAttr;
+
+struct HackContainsChildEntity;
+
+struct HackContainsParentEntity;
+
+struct HackEntityDocumentation;
+
+struct HackEntityInfo;
+
+struct HackEntityKind;
+
+struct HackEntityLocation;
+
+struct HackEntityModuleName;
+
+struct HackEntitySource;
+
+struct HackEntityUses;
+
+struct HackExtendsChildEntity;
+
+struct HackExtendsParentEntity;
+
+struct HackExtendsParentEntityConcise;
+
+struct HackFileEntityXRefLocations;
+
+struct HackFileEntityXRefSpans;
+
+struct HackModifiers;
+
+struct HackRequiredConstraint;
+
+struct HackResolveLocation;
+
+struct HackVisibility;
+
+} // namespace Hack
+
+} // namespace Codemarkup
+
+namespace Code {
+
+namespace Hack {
+
+struct Annotations;
+
+} // namespace Hack
+
+} // namespace Code
+
+namespace Codemarkup {
+
+namespace Hack {
+
+struct HackAnnotation;
+
+} // namespace Hack
+
+} // namespace Codemarkup
+
+namespace Code {
+
+namespace Graphql {
+
+struct Entity;
+
+} // namespace Graphql
+
+} // namespace Code
+
+namespace Codemarkup {
+
+namespace Graphql {
+
+struct GraphQLEntityKind;
+
+struct GraphQLEntityLocation;
+
+struct GraphQLEntityUses;
+
+struct GraphQLFileEntityXRefLocations;
+
+struct GraphQLResolveLocation;
+
+} // namespace Graphql
+
+} // namespace Codemarkup
+
+namespace Code {
+
+namespace Flow {
+
+struct Entity;
+
+} // namespace Flow
+
+} // namespace Code
+
+namespace Codemarkup {
+
+namespace Flow {
+
+struct FlowContainsChildEntity;
+
+struct FlowContainsParentEntity;
+
+struct FlowEntityDocumentation;
+
+struct FlowEntityKind;
+
+struct FlowEntityLocation;
+
+struct FlowEntityModuleName;
+
+struct FlowEntityUses;
+
+struct FlowFileEntityXRefLocations;
+
+struct FlowFileImportDeclEntityXRefLocations;
+
+struct FlowFileReferenceEntityXRefLocations;
+
+struct FlowResolveLocation;
+
+} // namespace Flow
+
+} // namespace Codemarkup
+
+namespace Code {
+
+namespace Fbthrift {
+
+struct Entity;
+
+} // namespace Fbthrift
+
+} // namespace Code
+
+namespace Codemarkup {
+
+namespace Fbthrift {
+
+struct FbthriftEntityDocumentation;
+
+struct FbthriftEntityUses;
+
+struct ThriftContainsChildEntity;
+
+struct ThriftContainsParentEntity;
+
+struct ThriftEntityKind;
+
+struct ThriftEntityLocation;
+
+struct ThriftExtendsChildEntity;
+
+struct ThriftExtendsParentEntity;
+
+struct ThriftFileEntityXRefLocations;
+
+struct ThriftResolveLocation;
+
+} // namespace Fbthrift
+
+} // namespace Codemarkup
+
+namespace Code {
+
+namespace Fbthrift {
+
+struct Annotations;
+
+} // namespace Fbthrift
+
+namespace Erlang {
+
+struct Entity;
+
+} // namespace Erlang
+
+} // namespace Code
+
+namespace Codemarkup {
+
+namespace Erlang {
+
+struct ErlangEntityDocumentation;
+
+struct ErlangEntityInfo;
+
+struct ErlangEntityKind;
+
+struct ErlangEntityLocation;
+
+struct ErlangEntityUses;
+
+struct ErlangFileEntityXRefLocations;
+
+struct ErlangResolveLocation;
+
+} // namespace Erlang
+
+} // namespace Codemarkup
+
+namespace Search {
+
+namespace Erlang {
+
+struct SearchByFQN;
+
+struct SearchByName;
+
+} // namespace Erlang
+
+} // namespace Search
+
+namespace Code {
+
+namespace Dataswarm {
+
+struct Entity;
+
+} // namespace Dataswarm
+
+} // namespace Code
+
+namespace Codemarkup {
+
+namespace Dataswarm {
+
+struct DataswarmFileEntityXRefLocations;
+
+} // namespace Dataswarm
+
+} // namespace Codemarkup
+
+namespace Code {
+
+namespace Cxx {
+
+struct ObjcMethodEntity;
+
+struct ObjcSelectorSlotEntity;
+
+struct Definition;
+
+struct Entity;
+
+} // namespace Cxx
+
+} // namespace Code
+
+namespace Codemarkup {
+
+namespace Cxx {
+
+struct CxxContainsChildEntity;
+
+struct CxxContainsParentEntity;
+
+struct CxxDeclToDefXRefTargetLocation;
+
+struct CxxDeclarationContainsChild;
+
+struct CxxDeclarationContainsParent;
+
+struct CxxDeclarationExtendsChild;
+
+struct CxxDeclarationExtendsParent;
+
+struct CxxDeclarationSource;
+
+struct CxxDefToDeclFamilyXRefTargetLocation;
+
+struct CxxEntityDocumentation;
+
+struct CxxEntityInfo;
+
+struct CxxEntityKind;
+
+struct CxxEntityLocation;
+
+struct CxxEntityMangledNameHash;
+
+struct CxxEntitySource;
+
+struct CxxEntityUSR;
+
+struct CxxEntityUses;
+
+struct CxxExtendsChildEntity;
+
+struct CxxExtendsParentEntity;
+
+struct CxxFileEntitySpellingXRefLocations;
+
+struct CxxFileEntityTraceDeclToDefXRefLocations;
+
+struct CxxFileEntityXMapFixedXRefLocations;
+
+struct CxxFileEntityXMapVariableXRefDeclToDefs;
+
+struct CxxFileEntityXRefLocations;
+
+struct CxxFindDefinitionOfEntity;
+
+struct CxxModifiers;
+
+struct CxxNamespaceDeclarationContainsChild;
+
+struct CxxResolveDeclarationToEntity;
+
+struct CxxResolveLocation;
+
+struct CxxResolveTraceLocation;
+
+struct CxxVisibility;
+
+struct CxxXRefTargetLocation;
+
+struct EntityToXRefTarget;
+
+struct SymbolToEntity;
+
+struct XRefTargetToEntity;
+
+} // namespace Cxx
+
+} // namespace Codemarkup
+
+namespace Glean {
+
+namespace Test {
+
+struct Entity;
+
+} // namespace Test
+
+} // namespace Glean
+
+namespace Search {
+
+namespace Code {
+
+struct CxxPreferDefinitions;
+
+} // namespace Code
+
+namespace Kind {
+
+namespace Cxx {
+
+struct SearchObjcInterface;
+
+} // namespace Cxx
+
+} // namespace Kind
+
+} // namespace Search
+
+namespace Symbolid {
+
+namespace Cxx {
+
+struct DefinitionOfDecl;
+
+struct LookupNamespaceDefinition;
+
+} // namespace Cxx
+
+} // namespace Symbolid
+
+namespace Codemarkup {
+
+namespace Cxx {
+
+struct CxxDefinitionContainsChild;
+
+struct CxxDefinitionContainsParent;
+
+struct CxxDefinitionExtendsChild;
+
+struct CxxDefinitionExtendsParent;
+
+struct CxxDefinitionModifiers;
+
+struct CxxDefnVisibility;
+
+struct CxxEntityDefinitionBase;
+
+} // namespace Cxx
+
+} // namespace Codemarkup
+
+namespace Search {
+
+namespace Cxx {
+
+struct DeclIsDefn;
+
+} // namespace Cxx
+
+} // namespace Search
+
+namespace Code {
+
+namespace Cxx {
+
+struct DeclToDef;
+
+struct Annotations;
+
+} // namespace Cxx
+
+} // namespace Code
+
+namespace Codemarkup {
+
+namespace Cxx {
+
+struct CxxAnnotation;
+
+} // namespace Cxx
+
+} // namespace Codemarkup
+
+namespace Code {
+
+namespace Csharp {
+
+struct Entity;
+
+} // namespace Csharp
+
+} // namespace Code
+
+namespace Codemarkup {
+
+namespace Csharp {
+
+struct CSharpEntityKind;
+
+struct CSharpEntityLocation;
+
+struct CSharpEntityUses;
+
+struct CSharpFileEntityXRefLocations;
+
+struct CSharpResolveLocation;
+
+} // namespace Csharp
+
+} // namespace Codemarkup
+
+namespace Code {
+
+namespace Buck {
+
+struct Entity;
+
+} // namespace Buck
+
+} // namespace Code
+
+namespace Codemarkup {
+
+namespace Buck {
+
+struct BuckEntityKind;
+
+struct BuckEntityLocation;
+
+struct BuckEntityUses;
+
+struct BuckFileEntityXRefLocations;
+
+struct BuckResolveLocation;
+
+} // namespace Buck
+
+} // namespace Codemarkup
+
+namespace Search {
+
+namespace Buck {
+
+struct SearchByFQN;
+
+struct SearchDefinition;
+
+struct SearchFile;
+
+} // namespace Buck
+
+} // namespace Search
+
+namespace Code {
+
+struct SymbolId;
+
+enum class Language;
+
+struct EntityLanguageSCIP;
+
+struct EntityLanguageLSIF;
+
+struct Annotations;
+
+} // namespace Code
+
+namespace Cxx1 {
+
+struct FunctionName;
+
+struct RecordKind;
+
+struct RecordDeclaration;
+
+struct Scope;
+
+struct DeclarationScope;
+
+struct EnumDeclarationByName;
+
+struct FunctionDeclarationByNameScope;
+
+struct FunctionQName;
+
+struct QName;
+
+struct RecordDeclarationClass;
+
+struct RecordDeclarationStruct;
+
+struct RecordDeclarationUnion;
+
+struct TypeAliasDeclarationByName;
+
+struct VariableDeclarationNonLocalByName;
+
+} // namespace Cxx1
+
+namespace Search {
+
+namespace Cxx {
+
+struct QueryToScopeCase;
+
+} // namespace Cxx
+
+namespace Kind {
+
+namespace Cxx {
+
+struct SearchClass;
+
+struct SearchEnum;
+
+struct SearchEnumerator;
+
+struct SearchFunction;
+
+struct SearchNamespace;
+
+struct SearchStruct;
+
+struct SearchTypeAlias;
+
+struct SearchUnion;
+
+struct SearchVariable;
+
+} // namespace Cxx
+
+} // namespace Kind
+
+} // namespace Search
+
+namespace Symbolid {
+
+namespace Cxx {
+
+struct LookupDeclaration;
+
+struct LookupDefinition;
+
+struct LookupEnumerator;
+
+struct LookupFunctionDeclaration;
+
+struct LookupFunctionDefinition;
+
+struct LookupFunctionSignatureDeclaration;
+
+struct LookupFunctionSignatureDefinition;
+
+struct LookupFunctionSignatureQualifierDeclaration;
+
+struct LookupFunctionSignatureQualifierDefinition;
+
+} // namespace Cxx
+
+} // namespace Symbolid
+
+namespace Fbthrift {
+
+struct ResultType;
+
+struct FunctionSpecification;
+
+} // namespace Fbthrift
+
+namespace Buck {
+
+struct XRefDestination;
+
+struct XRef;
+
+struct Type;
+
+struct TranslationUnit;
+
+struct TargetUses;
+
+struct TargetSourcesBaseModule;
+
+struct TargetSources;
+
+struct TargetOuts;
+
+struct TargetOut;
+
+struct TargetMode;
+
+struct TargetLocation;
+
+struct TargetLinkWhole;
+
+struct TargetIndexerName;
+
+struct TargetIndexer;
+
+struct TargetHash;
+
+struct TargetCallByCallExpr;
+
+struct TargetCall;
+
+struct TargetByType;
+
+struct TargetAttribute;
+
+struct Target;
+
+struct SourceFileLocation;
+
+struct SearchByLocalName;
+
+struct RuleKey;
+
+struct Platform;
+
+struct Owner;
+
+struct OutsTarget;
+
+struct OutputLabel;
+
+struct OutTarget;
+
+struct LocatorWithLabel;
+
+struct LocatorReverseDeps;
+
+struct LocatorReverseDep;
+
+struct Locator;
+
+struct LocalNameLowerCase;
+
+struct LocalName;
+
+struct Labels;
+
+struct Label;
+
+struct IndexerName;
+
+struct FileXRefs;
+
+struct FileToTarget;
+
+struct FileTarget;
+
+struct FileResolved;
+
+struct FileEntity;
+
+struct FileDefinition;
+
+struct File;
+
+struct FailureSources;
+
+enum class FailureReason;
+
+struct IndexFailureX;
+
+struct DestinationUses;
+
+struct Dependency;
+
+struct TargetDependencies;
+
+struct DefinitionLocation;
+
+struct Definition;
+
+struct Consumer;
+
+struct CallName;
+
+struct CallExpr;
+
+struct CallArgument;
+
+struct AttributeName;
+
+struct AttributeMapping;
+
+struct AttributeValue;
+
+struct ArgumentMapping;
+
+struct ArgumentValue;
+
+} // namespace Buck
+
+namespace Anglelang {
+
+struct TypeDecl;
+
+struct Name;
+
+struct Field;
+
+struct Type;
+
+struct EvolveDecl;
+
+enum class DeriveInfo;
+
+struct DerivingDecl;
+
+struct PredicateDecl;
+
+struct Declaration;
+
+struct DeclarationLocation;
+
+struct DeclarationToName;
+
+struct SchemaDecl;
+
+struct XRefTarget;
+
+struct TargetUses;
+
+struct XRef;
+
+struct FileXRefs;
+
+} // namespace Anglelang
+
+namespace Code {
+
+namespace Anglelang {
+
+struct Entity;
+
+} // namespace Anglelang
+
+struct Entity;
+
+struct Argument;
+
+struct CallArgument;
+
+} // namespace Code
+
+namespace Codemarkup {
+
+namespace Hack {
+
+struct ConvertCallArguments;
+
+struct ConvertMaybeCallArguments;
+
+} // namespace Hack
+
+namespace Python {
+
+struct ConvertCallArguments;
+
+struct PythonFileCall;
+
+} // namespace Python
+
+namespace Hack {
+
+struct ConvertArgument;
+
+} // namespace Hack
+
+namespace Python {
+
+struct ConvertArgument;
+
+} // namespace Python
+
+} // namespace Codemarkup
+
+namespace Code {
+
+struct EntityLanguage;
+
+struct IdlEntity;
+
+} // namespace Code
+
+namespace Codemarkup {
+
+namespace Cxx {
+
+struct CxxEntityIdl;
+
+} // namespace Cxx
+
+namespace Hack {
+
+struct HackEntityIdl;
+
+} // namespace Hack
+
+namespace Yaml {
+
+struct YamlFileEntityXLangXRefLocations;
+
+} // namespace Yaml
+
+struct ChildEntity;
+
+struct ContainsChildEntity;
+
+struct ContainsParentEntity;
+
+struct EntityComments;
+
+struct EntityInfo;
+
+struct EntityIsDefinition;
+
+struct EntityKind;
+
+struct EntityLocation;
+
+struct EntityModifiers;
+
+struct EntityModuleName;
+
+struct EntityReferences;
+
+struct EntitySource;
+
+struct EntityToAnnotations;
+
+struct EntityUses;
+
+struct EntityVisibility;
+
+struct ExtendsChildEntity;
+
+struct ExtendsParentEntity;
+
+struct ExtendsParentEntityConcise;
+
+struct FileCall;
+
+struct FileEntityDigest;
+
+struct FileEntityInfos;
+
+struct FileEntityKinds;
+
+struct FileEntityLocations;
+
+struct FileEntityXRefInfos;
+
+struct FileEntityXRefKinds;
+
+struct FileEntityXRefLocations;
+
+struct FileEntityXRefRangeSpans;
+
+struct FindEntityDefinition;
+
+struct GeneratedEntityToIdlEntity;
+
+struct GenericEntity;
+
+struct FileXRefsGenericEntities;
+
+struct ParentEntity;
+
+struct SearchRelatedEntities;
+
+struct ReferencingEntity;
+
+struct ResolveLocation;
+
+struct SearchInheritedEntities;
+
+struct SymbolToEntity;
+
+namespace Cxx {
+
+struct CxxFileEntityIdl;
+
+struct CxxIdlEntityUses;
+
+} // namespace Cxx
+
+namespace Hack {
+
+struct ConvertCallee;
+
+struct ConvertCalleeForFileCall;
+
+struct ConvertStaticType;
+
+struct HackFileCall;
+
+struct HackIdlEntityUses;
+
+} // namespace Hack
+
+namespace Search {
+
+struct EntityLocationAndKind;
+
+struct SearchByName;
+
+struct SearchByScope;
+
+} // namespace Search
+
+} // namespace Codemarkup
+
+namespace Dyn {
+
+struct EntityUsage;
+
+} // namespace Dyn
+
+namespace Search {
+
+namespace Code {
+
+struct AngleSearchByLowerCaseName;
+
+struct AngleSearchByName;
+
+struct BuckSearchByLocalNameFact;
+
+struct BuckSearchByLowerCaseName;
+
+struct BuckSearchByName;
+
+struct CSharpSearchByLowerCaseName;
+
+struct CSharpSearchByName;
+
+struct CxxSearchByLowerCaseNameKindAndScopeFact;
+
+struct CxxSearchByLowerCaseScopeAndKind;
+
+struct CxxSearchByNameKindAndScopeFact;
+
+struct CxxSearchByScopeAndKind;
+
+struct ErlangSearchByLowerCaseName;
+
+struct ErlangSearchByName;
+
+struct FbthriftSearchByNameFact;
+
+struct FlowSearchByLowerCaseNameKindAndScopeFact;
+
+struct FlowSearchByLowerCaseScopeAndKind;
+
+struct FlowSearchByNameKindAndScopeFact;
+
+struct FlowSearchByScopeAndKind;
+
+struct GraphQLSearchByLowerCaseName;
+
+struct GraphQLSearchByName;
+
+struct HackSearchByLowerCaseNameAndKind;
+
+struct HackSearchByLowerCaseScopeAndKind;
+
+struct HackSearchByNameAndKind;
+
+struct HackSearchByNameKindWithNamespace;
+
+struct HackSearchByNameKindWithQName;
+
+struct HackSearchByScopeAndKind;
+
+struct HackSearchByScopeWithNameKinds;
+
+struct HsSearchByLowerCaseName;
+
+struct HsSearchByName;
+
+struct JavaSearchByLowerCaseName;
+
+struct JavaSearchByLowerCaseScope;
+
+struct JavaSearchByName;
+
+struct JavaSearchByNameWithFact;
+
+struct JavaSearchByScope;
+
+struct JavaSearchByScopeWithName;
+
+struct KotlinSearchByLowerCaseName;
+
+struct KotlinSearchByLowerCaseScope;
+
+struct KotlinSearchByName;
+
+struct KotlinSearchByNameWithFact;
+
+struct KotlinSearchByScope;
+
+struct KotlinSearchByScopeWithName;
+
+struct LsifSearchByLowerCaseName;
+
+struct LsifSearchByName;
+
+struct PpSearchByLowerCaseNameKind;
+
+struct PpSearchByNameKind;
+
+struct PythonSearchByLowerCaseNameKindAndScopeFact;
+
+struct PythonSearchByLowerCaseScopeAndKind;
+
+struct PythonSearchByNameKindAndScopeFact;
+
+struct PythonSearchByScopeAndKind;
+
+struct RustSearchByNameAndKind;
+
+struct SearchByLowerCaseNameAndLanguage;
+
+struct SearchByLowerCaseNameKindAndLanguage;
+
+struct SearchByLowerCaseScope;
+
+struct SearchByLowerCaseScopeAndKind;
+
+struct SearchByNameAndLanguage;
+
+struct SearchByNameKindAndLanguage;
+
+struct SearchByScope;
+
+struct SearchByScopeAndKind;
+
+struct ThriftSearchByLowerCaseName;
+
+struct ThriftSearchByName;
+
+} // namespace Code
+
+} // namespace Search
+
+namespace Codemarkup {
+
+namespace Anglelang {
+
+struct AngleEntityLocation;
+
+struct AngleEntityUses;
+
+struct AngleFileEntityXRefLocations;
+
+struct AngleResolveLocation;
+
+} // namespace Anglelang
+
+} // namespace Codemarkup
+
+namespace Search {
+
+namespace Anglelang {
+
+struct SearchByName;
+
+} // namespace Anglelang
+
+} // namespace Search
+
+namespace Sys {
+
+struct Blob : Predicate<std::vector<uint8_t>> {
+  static const char* GLEAN_name() {
+    return "sys.Blob";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct Blob
+
+} // namespace Sys
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Src::RelByteSpan> {
+  using Type = Tuple<Nat, Nat>;
+};
+
+
+namespace schema {
+
+namespace Src {
+
+struct RelByteSpan {
+  uint64_t offset;
+  uint64_t length;
+
+  bool operator==(const RelByteSpan& other) const {
+    return std::tie(offset,length)
+             == std::tie(other.offset,other.length);
+  }
+  bool operator!=(const RelByteSpan& other) const {
+    return std::tie(offset,length)
+             != std::tie(other.offset,other.length);
+  }
+  bool operator<(const RelByteSpan& other) const {
+    return std::tie(offset,length)
+             < std::tie(other.offset,other.length);
+  }
+  bool operator<=(const RelByteSpan& other) const {
+    return std::tie(offset,length)
+             <= std::tie(other.offset,other.length);
+  }
+  bool operator>(const RelByteSpan& other) const {
+    return std::tie(offset,length)
+             > std::tie(other.offset,other.length);
+  }
+  bool operator>=(const RelByteSpan& other) const {
+    return std::tie(offset,length)
+             >= std::tie(other.offset,other.length);
+  }
+  void outputRepr(Output<Repr<RelByteSpan>> out) const {
+    outputValue(out, std::make_tuple(offset, length));
+  }
+}; // struct RelByteSpan
+
+} // namespace Src
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Src::Range> {
+  using Type = Tuple<facebook::glean::cpp::schema::Src::File, Nat, Nat, Nat, Nat>;
+};
+
+
+namespace schema {
+
+namespace Src {
+
+struct Range {
+  Fact<File> file;
+  uint64_t lineBegin;
+  uint64_t columnBegin;
+  uint64_t lineEnd;
+  uint64_t columnEnd;
+
+  bool operator==(const Range& other) const {
+    return std::tie(file,lineBegin,columnBegin,lineEnd,columnEnd)
+             == std::tie(other.file,other.lineBegin,other.columnBegin,other.lineEnd,other.columnEnd);
+  }
+  bool operator!=(const Range& other) const {
+    return std::tie(file,lineBegin,columnBegin,lineEnd,columnEnd)
+             != std::tie(other.file,other.lineBegin,other.columnBegin,other.lineEnd,other.columnEnd);
+  }
+  bool operator<(const Range& other) const {
+    return std::tie(file,lineBegin,columnBegin,lineEnd,columnEnd)
+             < std::tie(other.file,other.lineBegin,other.columnBegin,other.lineEnd,other.columnEnd);
+  }
+  bool operator<=(const Range& other) const {
+    return std::tie(file,lineBegin,columnBegin,lineEnd,columnEnd)
+             <= std::tie(other.file,other.lineBegin,other.columnBegin,other.lineEnd,other.columnEnd);
+  }
+  bool operator>(const Range& other) const {
+    return std::tie(file,lineBegin,columnBegin,lineEnd,columnEnd)
+             > std::tie(other.file,other.lineBegin,other.columnBegin,other.lineEnd,other.columnEnd);
+  }
+  bool operator>=(const Range& other) const {
+    return std::tie(file,lineBegin,columnBegin,lineEnd,columnEnd)
+             >= std::tie(other.file,other.lineBegin,other.columnBegin,other.lineEnd,other.columnEnd);
+  }
+  void outputRepr(Output<Repr<Range>> out) const {
+    outputValue(out, std::make_tuple(file, lineBegin, columnBegin, lineEnd, columnEnd));
+  }
+}; // struct Range
+
+struct RangeContains : Predicate<std::tuple<Range, Range>> {
+  static const char* GLEAN_name() {
+    return "src.RangeContains";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct RangeContains
+
+} // namespace Src
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Src::PackedByteSpansGroup> {
+  using Type = Tuple<Nat, Array<Nat>>;
+};
+
+
+namespace schema {
+
+namespace Src {
+
+struct PackedByteSpansGroup {
+  uint64_t length;
+  std::vector<uint64_t> offsets;
+
+  bool operator==(const PackedByteSpansGroup& other) const {
+    return std::tie(length,offsets)
+             == std::tie(other.length,other.offsets);
+  }
+  bool operator!=(const PackedByteSpansGroup& other) const {
+    return std::tie(length,offsets)
+             != std::tie(other.length,other.offsets);
+  }
+  bool operator<(const PackedByteSpansGroup& other) const {
+    return std::tie(length,offsets)
+             < std::tie(other.length,other.offsets);
+  }
+  bool operator<=(const PackedByteSpansGroup& other) const {
+    return std::tie(length,offsets)
+             <= std::tie(other.length,other.offsets);
+  }
+  bool operator>(const PackedByteSpansGroup& other) const {
+    return std::tie(length,offsets)
+             > std::tie(other.length,other.offsets);
+  }
+  bool operator>=(const PackedByteSpansGroup& other) const {
+    return std::tie(length,offsets)
+             >= std::tie(other.length,other.offsets);
+  }
+  void outputRepr(Output<Repr<PackedByteSpansGroup>> out) const {
+    outputValue(out, std::make_tuple(length, offsets));
+  }
+}; // struct PackedByteSpansGroup
+
+using PackedByteSpans = std::vector<PackedByteSpansGroup>;
+
+} // namespace Src
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Src::Loc> {
+  using Type = Tuple<facebook::glean::cpp::schema::Src::File, Nat, Nat>;
+};
+
+
+namespace schema {
+
+namespace Src {
+
+struct Loc {
+  Fact<File> file;
+  uint64_t line;
+  uint64_t column;
+
+  bool operator==(const Loc& other) const {
+    return std::tie(file,line,column)
+             == std::tie(other.file,other.line,other.column);
+  }
+  bool operator!=(const Loc& other) const {
+    return std::tie(file,line,column)
+             != std::tie(other.file,other.line,other.column);
+  }
+  bool operator<(const Loc& other) const {
+    return std::tie(file,line,column)
+             < std::tie(other.file,other.line,other.column);
+  }
+  bool operator<=(const Loc& other) const {
+    return std::tie(file,line,column)
+             <= std::tie(other.file,other.line,other.column);
+  }
+  bool operator>(const Loc& other) const {
+    return std::tie(file,line,column)
+             > std::tie(other.file,other.line,other.column);
+  }
+  bool operator>=(const Loc& other) const {
+    return std::tie(file,line,column)
+             >= std::tie(other.file,other.line,other.column);
+  }
+  void outputRepr(Output<Repr<Loc>> out) const {
+    outputValue(out, std::make_tuple(file, line, column));
+  }
+}; // struct Loc
+
+} // namespace Src
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Src::Language> {
+  using Type = Enum<11>;
+};
+
+
+namespace schema {
+
+namespace Src {
+
+enum class Language { Buck, C, Cpp, Hack, Haskell, ObjC, ObjCpp, Python, Thrift, Java, GraphQL };
+
+} // namespace Src
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Src::IndexFailureReason> {
+  using Type = Enum<4>;
+};
+
+
+namespace schema {
+
+namespace Src {
+
+enum class IndexFailureReason { CompileError, BuildSystemError, Unclassified, DiscoveryError };
+
+struct IndexFailure : Predicate<std::tuple<Fact<File>, IndexFailureReason, std::string>> {
+  static const char* GLEAN_name() {
+    return "src.IndexFailure";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct IndexFailure
+
+struct FileLines : Predicate<std::tuple<Fact<File>, std::vector<uint64_t>, bool, bool>> {
+  static const char* GLEAN_name() {
+    return "src.FileLines";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct FileLines
+
+struct FileLanguage : Predicate<std::tuple<Fact<File>, Language>> {
+  static const char* GLEAN_name() {
+    return "src.FileLanguage";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct FileLanguage
+
+struct FileDigest : Predicate<Fact<File>, std::string> {
+  static const char* GLEAN_name() {
+    return "src.FileDigest";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct FileDigest
+
+struct File : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "src.File";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct File
+
+} // namespace Src
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Src::ByteSpan> {
+  using Type = Tuple<Nat, Nat>;
+};
+
+
+namespace schema {
+
+namespace Src {
+
+struct ByteSpan {
+  uint64_t start;
+  uint64_t length;
+
+  bool operator==(const ByteSpan& other) const {
+    return std::tie(start,length)
+             == std::tie(other.start,other.length);
+  }
+  bool operator!=(const ByteSpan& other) const {
+    return std::tie(start,length)
+             != std::tie(other.start,other.length);
+  }
+  bool operator<(const ByteSpan& other) const {
+    return std::tie(start,length)
+             < std::tie(other.start,other.length);
+  }
+  bool operator<=(const ByteSpan& other) const {
+    return std::tie(start,length)
+             <= std::tie(other.start,other.length);
+  }
+  bool operator>(const ByteSpan& other) const {
+    return std::tie(start,length)
+             > std::tie(other.start,other.length);
+  }
+  bool operator>=(const ByteSpan& other) const {
+    return std::tie(start,length)
+             >= std::tie(other.start,other.length);
+  }
+  void outputRepr(Output<Repr<ByteSpan>> out) const {
+    outputValue(out, std::make_tuple(start, length));
+  }
+}; // struct ByteSpan
+
+struct ByteSpanContains : Predicate<std::tuple<ByteSpan, ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "src.ByteSpanContains";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct ByteSpanContains
+
+} // namespace Src
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Src::FileLocation> {
+  using Type = Tuple<facebook::glean::cpp::schema::Src::File, Repr<facebook::glean::cpp::schema::Src::ByteSpan>>;
+};
+
+
+namespace schema {
+
+namespace Src {
+
+struct FileLocation {
+  Fact<File> file;
+  ByteSpan span;
+
+  bool operator==(const FileLocation& other) const {
+    return std::tie(file,span)
+             == std::tie(other.file,other.span);
+  }
+  bool operator!=(const FileLocation& other) const {
+    return std::tie(file,span)
+             != std::tie(other.file,other.span);
+  }
+  bool operator<(const FileLocation& other) const {
+    return std::tie(file,span)
+             < std::tie(other.file,other.span);
+  }
+  bool operator<=(const FileLocation& other) const {
+    return std::tie(file,span)
+             <= std::tie(other.file,other.span);
+  }
+  bool operator>(const FileLocation& other) const {
+    return std::tie(file,span)
+             > std::tie(other.file,other.span);
+  }
+  bool operator>=(const FileLocation& other) const {
+    return std::tie(file,span)
+             >= std::tie(other.file,other.span);
+  }
+  void outputRepr(Output<Repr<FileLocation>> out) const {
+    outputValue(out, std::make_tuple(file, span));
+  }
+}; // struct FileLocation
+
+} // namespace Src
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Src::ByteRange> {
+  using Type = Tuple<Nat, Nat>;
+};
+
+
+namespace schema {
+
+namespace Src {
+
+struct ByteRange {
+  uint64_t begin;
+  uint64_t end;
+
+  bool operator==(const ByteRange& other) const {
+    return std::tie(begin,end)
+             == std::tie(other.begin,other.end);
+  }
+  bool operator!=(const ByteRange& other) const {
+    return std::tie(begin,end)
+             != std::tie(other.begin,other.end);
+  }
+  bool operator<(const ByteRange& other) const {
+    return std::tie(begin,end)
+             < std::tie(other.begin,other.end);
+  }
+  bool operator<=(const ByteRange& other) const {
+    return std::tie(begin,end)
+             <= std::tie(other.begin,other.end);
+  }
+  bool operator>(const ByteRange& other) const {
+    return std::tie(begin,end)
+             > std::tie(other.begin,other.end);
+  }
+  bool operator>=(const ByteRange& other) const {
+    return std::tie(begin,end)
+             >= std::tie(other.begin,other.end);
+  }
+  void outputRepr(Output<Repr<ByteRange>> out) const {
+    outputValue(out, std::make_tuple(begin, end));
+  }
+}; // struct ByteRange
+
+} // namespace Src
+
+namespace Search {
+
+namespace Python {
+
+struct QueryToScopeCase : Predicate<std::tuple<std::vector<std::string>, bool, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<facebook::glean::cpp::schema::Python::SName>>>>> {
+  static const char* GLEAN_name() {
+    return "search.python.QueryToScopeCase";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct QueryToScopeCase
+
+struct PythonNameCase : Predicate<std::tuple<bool, std::string, Fact<facebook::glean::cpp::schema::Python::Name>>> {
+  static const char* GLEAN_name() {
+    return "search.python.PythonNameCase";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct PythonNameCase
+
+} // namespace Python
+
+namespace Pp {
+
+struct SearchByName : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Pp1::Macro>, Fact<facebook::glean::cpp::schema::Pp1::Define>>> {
+  static const char* GLEAN_name() {
+    return "search.pp.SearchByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct SearchByName
+
+} // namespace Pp
+
+namespace Java {
+
+struct QueryToScopeCase : Predicate<std::tuple<std::vector<std::string>, bool, Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::Path>>> {
+  static const char* GLEAN_name() {
+    return "search.java.QueryToScopeCase";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct QueryToScopeCase
+
+struct NameCase : Predicate<std::tuple<bool, std::string, Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::Name>>> {
+  static const char* GLEAN_name() {
+    return "search.java.NameCase";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct NameCase
+
+} // namespace Java
+
+namespace Hack {
+
+struct QueryToScopeCase : Predicate<std::tuple<std::vector<std::string>, bool, Fact<facebook::glean::cpp::schema::Hack::Name>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<facebook::glean::cpp::schema::Hack::NamespaceQName>>>>> {
+  static const char* GLEAN_name() {
+    return "search.hack.QueryToScopeCase";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 7;
+  }
+}; // struct QueryToScopeCase
+
+struct HackNameCase : Predicate<std::tuple<bool, std::string, Fact<facebook::glean::cpp::schema::Hack::Name>>> {
+  static const char* GLEAN_name() {
+    return "search.hack.HackNameCase";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 7;
+  }
+}; // struct HackNameCase
+
+struct HackInAutoImportedNamespace : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Hack::Name>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<facebook::glean::cpp::schema::Hack::NamespaceQName>>>>> {
+  static const char* GLEAN_name() {
+    return "search.hack.HackInAutoImportedNamespace";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 7;
+  }
+}; // struct HackInAutoImportedNamespace
+
+} // namespace Hack
+
+namespace Flow {
+
+struct TypeDeclarationAsDeclaration : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Flow::TypeDeclaration>, Fact<facebook::glean::cpp::schema::Flow::Declaration>>> {
+  static const char* GLEAN_name() {
+    return "search.flow.TypeDeclarationAsDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct TypeDeclarationAsDeclaration
+
+struct QueryToScopeCase : Predicate<std::tuple<std::vector<std::string>, bool, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<facebook::glean::cpp::schema::Flow::Module>>>>> {
+  static const char* GLEAN_name() {
+    return "search.flow.QueryToScopeCase";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct QueryToScopeCase
+
+struct FlowModuleNameCase : Predicate<std::tuple<bool, std::string, Fact<facebook::glean::cpp::schema::Flow::Module>>> {
+  static const char* GLEAN_name() {
+    return "search.flow.FlowModuleNameCase";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct FlowModuleNameCase
+
+} // namespace Flow
+
+namespace Cxx {
+
+struct QueryToQNameCase : Predicate<std::tuple<std::vector<std::string>, bool, Fact<facebook::glean::cpp::schema::Cxx1::QName>>> {
+  static const char* GLEAN_name() {
+    return "search.cxx.QueryToQNameCase";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct QueryToQNameCase
+
+struct QueryToNSQNameCase : Predicate<std::tuple<std::vector<std::string>, bool, Fact<facebook::glean::cpp::schema::Cxx1::NamespaceQName>>> {
+  static const char* GLEAN_name() {
+    return "search.cxx.QueryToNSQNameCase";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct QueryToNSQNameCase
+
+struct CxxRecordCase : Predicate<std::tuple<bool, std::string, Fact<facebook::glean::cpp::schema::Cxx1::Name>>> {
+  static const char* GLEAN_name() {
+    return "search.cxx.CxxRecordCase";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct CxxRecordCase
+
+struct CxxNamespaceCase : Predicate<std::tuple<bool, std::string, Fact<facebook::glean::cpp::schema::Cxx1::Name>>> {
+  static const char* GLEAN_name() {
+    return "search.cxx.CxxNamespaceCase";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct CxxNamespaceCase
+
+} // namespace Cxx
+
+namespace Anglelang {
+
+struct NameLowerCase : Predicate<std::tuple<std::string, Fact<facebook::glean::cpp::schema::Anglelang::Name>>> {
+  static const char* GLEAN_name() {
+    return "search.anglelang.NameLowerCase";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct NameLowerCase
+
+} // namespace Anglelang
+
+} // namespace Search
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Scip::TextEncoding> {
+  using Type = Enum<3>;
+};
+
+
+namespace schema {
+
+namespace Scip {
+
+enum class TextEncoding { UnspecifiedTextEncoding, UTF8, UTF16 };
+
+struct SymbolName : Predicate<std::tuple<Fact<Symbol>, Fact<LocalName>>> {
+  static const char* GLEAN_name() {
+    return "scip.SymbolName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct SymbolName
+
+struct SymbolDocumentation : Predicate<std::tuple<Fact<Symbol>, Fact<Documentation>>> {
+  static const char* GLEAN_name() {
+    return "scip.SymbolDocumentation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct SymbolDocumentation
+
+struct SymbolDisplayName : Predicate<std::tuple<Fact<Symbol>, Fact<DisplayName>>> {
+  static const char* GLEAN_name() {
+    return "scip.SymbolDisplayName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct SymbolDisplayName
+
+struct Symbol : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "scip.Symbol";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct Symbol
+
+} // namespace Scip
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Scip::SomeEntity> {
+  using Type = Tuple<facebook::glean::cpp::schema::Scip::Definition>;
+};
+
+
+namespace schema {
+
+namespace Scip {
+
+struct SomeEntity {
+  Fact<Definition> defn;
+
+  bool operator==(const SomeEntity& other) const {
+    return std::tie(defn)
+             == std::tie(other.defn);
+  }
+  bool operator!=(const SomeEntity& other) const {
+    return std::tie(defn)
+             != std::tie(other.defn);
+  }
+  bool operator<(const SomeEntity& other) const {
+    return std::tie(defn)
+             < std::tie(other.defn);
+  }
+  bool operator<=(const SomeEntity& other) const {
+    return std::tie(defn)
+             <= std::tie(other.defn);
+  }
+  bool operator>(const SomeEntity& other) const {
+    return std::tie(defn)
+             > std::tie(other.defn);
+  }
+  bool operator>=(const SomeEntity& other) const {
+    return std::tie(defn)
+             >= std::tie(other.defn);
+  }
+  void outputRepr(Output<Repr<SomeEntity>> out) const {
+    outputValue(out, std::make_tuple(defn));
+  }
+}; // struct SomeEntity
+
+struct ReferenceTarget : Predicate<std::tuple<Fact<Reference>, Fact<Definition>>> {
+  static const char* GLEAN_name() {
+    return "scip.ReferenceTarget";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct ReferenceTarget
+
+struct Reference : Predicate<std::tuple<Fact<Symbol>, Fact<FileRange>>> {
+  static const char* GLEAN_name() {
+    return "scip.Reference";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct Reference
+
+} // namespace Scip
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Scip::ProtocolVersion> {
+  using Type = Enum<1>;
+};
+
+
+namespace schema {
+
+namespace Scip {
+
+enum class ProtocolVersion { UnspecifiedProtocolVersion };
+
+} // namespace Scip
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Scip::Location> {
+  using Type = Tuple<facebook::glean::cpp::schema::Src::File, Repr<facebook::glean::cpp::schema::Src::Range>, String>;
+};
+
+
+namespace schema {
+
+namespace Scip {
+
+struct Location {
+  Fact<facebook::glean::cpp::schema::Src::File> file;
+  facebook::glean::cpp::schema::Src::Range location;
+  std::string name;
+
+  bool operator==(const Location& other) const {
+    return std::tie(file,location,name)
+             == std::tie(other.file,other.location,other.name);
+  }
+  bool operator!=(const Location& other) const {
+    return std::tie(file,location,name)
+             != std::tie(other.file,other.location,other.name);
+  }
+  bool operator<(const Location& other) const {
+    return std::tie(file,location,name)
+             < std::tie(other.file,other.location,other.name);
+  }
+  bool operator<=(const Location& other) const {
+    return std::tie(file,location,name)
+             <= std::tie(other.file,other.location,other.name);
+  }
+  bool operator>(const Location& other) const {
+    return std::tie(file,location,name)
+             > std::tie(other.file,other.location,other.name);
+  }
+  bool operator>=(const Location& other) const {
+    return std::tie(file,location,name)
+             >= std::tie(other.file,other.location,other.name);
+  }
+  void outputRepr(Output<Repr<Location>> out) const {
+    outputValue(out, std::make_tuple(file, location, name));
+  }
+}; // struct Location
+
+struct LocalName : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "scip.LocalName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct LocalName
+
+struct IsImplemented : Predicate<std::tuple<Fact<Symbol>, Fact<Symbol>>> {
+  static const char* GLEAN_name() {
+    return "scip.IsImplemented";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct IsImplemented
+
+struct IsImplementation : Predicate<std::tuple<Fact<Symbol>, Fact<Symbol>>> {
+  static const char* GLEAN_name() {
+    return "scip.IsImplementation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct IsImplementation
+
+} // namespace Scip
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Scip::Entity> {
+  using Type = Sum<Repr<facebook::glean::cpp::schema::Scip::SomeEntity>, Repr<facebook::glean::cpp::schema::Scip::SomeEntity>, Repr<facebook::glean::cpp::schema::Scip::SomeEntity>, Repr<facebook::glean::cpp::schema::Scip::SomeEntity>, Repr<facebook::glean::cpp::schema::Scip::SomeEntity>, Repr<facebook::glean::cpp::schema::Scip::SomeEntity>>;
+};
+
+
+namespace schema {
+
+namespace Scip {
+
+struct Entity {
+  boost::variant<Alt<0, SomeEntity>, Alt<1, SomeEntity>, Alt<2, SomeEntity>, Alt<3, SomeEntity>, Alt<4, SomeEntity>, Alt<5, SomeEntity>> GLEAN_value;
+
+  static Entity rust(const SomeEntity& a) {
+    return Entity{Alt<0, SomeEntity>(a)};
+  }
+  static Entity go(const SomeEntity& a) {
+    return Entity{Alt<1, SomeEntity>(a)};
+  }
+  static Entity typescript(const SomeEntity& a) {
+    return Entity{Alt<2, SomeEntity>(a)};
+  }
+  static Entity java(const SomeEntity& a) {
+    return Entity{Alt<3, SomeEntity>(a)};
+  }
+  static Entity kotlin(const SomeEntity& a) {
+    return Entity{Alt<4, SomeEntity>(a)};
+  }
+  static Entity swift(const SomeEntity& a) {
+    return Entity{Alt<5, SomeEntity>(a)};
+  }
+
+  bool operator==(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Entity>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Entity
+
+struct EntityDefinition : Predicate<std::tuple<Entity, Fact<Definition>>> {
+  static const char* GLEAN_name() {
+    return "scip.EntityDefinition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct EntityDefinition
+
+struct EntityLocation : Predicate<std::tuple<Entity, Location>> {
+  static const char* GLEAN_name() {
+    return "scip.EntityLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct EntityLocation
+
+struct EntityUses : Predicate<std::tuple<Entity, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::Range>> {
+  static const char* GLEAN_name() {
+    return "scip.EntityUses";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct EntityUses
+
+struct FileEntityXRefLocation : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::Range, Location, Entity>> {
+  static const char* GLEAN_name() {
+    return "scip.FileEntityXRefLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct FileEntityXRefLocation
+
+struct ResolveLocation : Predicate<std::tuple<Location, Entity>> {
+  static const char* GLEAN_name() {
+    return "scip.ResolveLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct ResolveLocation
+
+struct SearchBySymbol : Predicate<std::tuple<Fact<Symbol>, Entity>> {
+  static const char* GLEAN_name() {
+    return "scip.SearchBySymbol";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct SearchBySymbol
+
+struct Documentation : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "scip.Documentation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct Documentation
+
+struct DisplayNameSymbol : Predicate<std::tuple<Fact<DisplayName>, Fact<Symbol>>> {
+  static const char* GLEAN_name() {
+    return "scip.DisplayNameSymbol";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct DisplayNameSymbol
+
+struct DisplayName : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "scip.DisplayName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct DisplayName
+
+struct DefinitionUses : Predicate<std::tuple<Fact<Definition>, Fact<Reference>>> {
+  static const char* GLEAN_name() {
+    return "scip.DefinitionUses";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct DefinitionUses
+
+struct DefinitionName : Predicate<std::tuple<Fact<Definition>, Fact<LocalName>>> {
+  static const char* GLEAN_name() {
+    return "scip.DefinitionName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct DefinitionName
+
+struct DefinitionDocumentation : Predicate<std::tuple<Fact<Definition>, Fact<Documentation>>> {
+  static const char* GLEAN_name() {
+    return "scip.DefinitionDocumentation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct DefinitionDocumentation
+
+struct Definition : Predicate<std::tuple<Fact<Symbol>, Fact<FileRange>>> {
+  static const char* GLEAN_name() {
+    return "scip.Definition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct Definition
+
+} // namespace Scip
+
+namespace Python {
+
+namespace Branches {
+
+struct Root : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "python.branches.Root";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct Root
+
+struct FileToRoot : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, Fact<Root>>> {
+  static const char* GLEAN_name() {
+    return "python.branches.FileToRoot";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct FileToRoot
+
+struct DirectXRefByFile : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, Fact<facebook::glean::cpp::schema::Python::DeclarationLocation>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "python.branches.DirectXRefByFile";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct DirectXRefByFile
+
+} // namespace Branches
+
+struct XRefsViaNameByTarget : Predicate<std::tuple<Fact<Name>, Fact<facebook::glean::cpp::schema::Src::File>, std::vector<facebook::glean::cpp::schema::Src::ByteSpan>>> {
+  static const char* GLEAN_name() {
+    return "python.XRefsViaNameByTarget";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct XRefsViaNameByTarget
+
+struct XRefsViaName : Predicate<std::tuple<Fact<Name>, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "python.XRefsViaName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct XRefsViaName
+
+} // namespace Python
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Python::XRefViaName> {
+  using Type = Tuple<facebook::glean::cpp::schema::Python::Name, Repr<facebook::glean::cpp::schema::Src::ByteSpan>>;
+};
+
+
+namespace schema {
+
+namespace Python {
+
+struct XRefViaName {
+  Fact<Name> target;
+  facebook::glean::cpp::schema::Src::ByteSpan source;
+
+  bool operator==(const XRefViaName& other) const {
+    return std::tie(target,source)
+             == std::tie(other.target,other.source);
+  }
+  bool operator!=(const XRefViaName& other) const {
+    return std::tie(target,source)
+             != std::tie(other.target,other.source);
+  }
+  bool operator<(const XRefViaName& other) const {
+    return std::tie(target,source)
+             < std::tie(other.target,other.source);
+  }
+  bool operator<=(const XRefViaName& other) const {
+    return std::tie(target,source)
+             <= std::tie(other.target,other.source);
+  }
+  bool operator>(const XRefViaName& other) const {
+    return std::tie(target,source)
+             > std::tie(other.target,other.source);
+  }
+  bool operator>=(const XRefViaName& other) const {
+    return std::tie(target,source)
+             >= std::tie(other.target,other.source);
+  }
+  void outputRepr(Output<Repr<XRefViaName>> out) const {
+    outputValue(out, std::make_tuple(target, source));
+  }
+}; // struct XRefViaName
+
+struct XRefsViaNameByFile : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, std::vector<XRefViaName>>> {
+  static const char* GLEAN_name() {
+    return "python.XRefsViaNameByFile";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct XRefsViaNameByFile
+
+struct VariableDeclaration : Predicate<std::tuple<Fact<Name>>> {
+  static const char* GLEAN_name() {
+    return "python.VariableDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct VariableDeclaration
+
+struct VariableBySName : Predicate<Fact<SName>, Fact<VariableDeclaration>> {
+  static const char* GLEAN_name() {
+    return "python.VariableBySName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct VariableBySName
+
+} // namespace Python
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Python::TypeInfo> {
+  using Type = Tuple<facebook::glean::cpp::schema::Python::Type, Array<Repr<facebook::glean::cpp::schema::Python::XRefViaName>>>;
+};
+
+
+namespace schema {
+
+namespace Python {
+
+struct TypeInfo {
+  Fact<Type> displayType;
+  std::vector<XRefViaName> xrefs;
+
+  bool operator==(const TypeInfo& other) const {
+    return std::tie(displayType,xrefs)
+             == std::tie(other.displayType,other.xrefs);
+  }
+  bool operator!=(const TypeInfo& other) const {
+    return std::tie(displayType,xrefs)
+             != std::tie(other.displayType,other.xrefs);
+  }
+  bool operator<(const TypeInfo& other) const {
+    return std::tie(displayType,xrefs)
+             < std::tie(other.displayType,other.xrefs);
+  }
+  bool operator<=(const TypeInfo& other) const {
+    return std::tie(displayType,xrefs)
+             <= std::tie(other.displayType,other.xrefs);
+  }
+  bool operator>(const TypeInfo& other) const {
+    return std::tie(displayType,xrefs)
+             > std::tie(other.displayType,other.xrefs);
+  }
+  bool operator>=(const TypeInfo& other) const {
+    return std::tie(displayType,xrefs)
+             >= std::tie(other.displayType,other.xrefs);
+  }
+  void outputRepr(Output<Repr<TypeInfo>> out) const {
+    outputValue(out, std::make_tuple(displayType, xrefs));
+  }
+}; // struct TypeInfo
+
+struct Type : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "python.Type";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct Type
+
+struct StringLiteral : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "python.StringLiteral";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct StringLiteral
+
+struct SearchVariableByName : Predicate<std::tuple<std::string, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<SName>>>, Fact<VariableDeclaration>>> {
+  static const char* GLEAN_name() {
+    return "python.SearchVariableByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct SearchVariableByName
+
+struct SearchVariableByLowerCaseName : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "python.SearchVariableByLowerCaseName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct SearchVariableByLowerCaseName
+
+struct SearchModuleByName : Predicate<std::tuple<std::string, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<SName>>>, Fact<Module>>> {
+  static const char* GLEAN_name() {
+    return "python.SearchModuleByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct SearchModuleByName
+
+struct SearchModuleByLowerCaseName : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "python.SearchModuleByLowerCaseName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct SearchModuleByLowerCaseName
+
+struct SearchMethodByName : Predicate<std::tuple<std::string, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<SName>>>, Fact<FunctionDeclaration>>> {
+  static const char* GLEAN_name() {
+    return "python.SearchMethodByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct SearchMethodByName
+
+struct SearchMethodByLowerCaseName : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "python.SearchMethodByLowerCaseName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct SearchMethodByLowerCaseName
+
+struct SearchFunctionByName : Predicate<std::tuple<std::string, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<SName>>>, Fact<FunctionDeclaration>>> {
+  static const char* GLEAN_name() {
+    return "python.SearchFunctionByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct SearchFunctionByName
+
+struct SearchFunctionByLowerCaseName : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "python.SearchFunctionByLowerCaseName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct SearchFunctionByLowerCaseName
+
+struct SearchFieldByName : Predicate<std::tuple<std::string, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<SName>>>, Fact<VariableDeclaration>>> {
+  static const char* GLEAN_name() {
+    return "python.SearchFieldByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct SearchFieldByName
+
+struct SearchFieldByLowerCaseName : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "python.SearchFieldByLowerCaseName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct SearchFieldByLowerCaseName
+
+struct SearchClassByName : Predicate<std::tuple<std::string, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<SName>>>, Fact<ClassDeclaration>>> {
+  static const char* GLEAN_name() {
+    return "python.SearchClassByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct SearchClassByName
+
+struct SearchClassByLowerCaseName : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "python.SearchClassByLowerCaseName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct SearchClassByLowerCaseName
+
+struct SNameToName : Predicate<Fact<SName>, Fact<Name>> {
+  static const char* GLEAN_name() {
+    return "python.SNameToName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct SNameToName
+
+struct SName : Predicate<std::tuple<Fact<Name>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<SName>>>>> {
+  static const char* GLEAN_name() {
+    return "python.SName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct SName
+
+struct ResolveOriginalName : Predicate<std::tuple<Fact<Name>, Fact<Name>>> {
+  static const char* GLEAN_name() {
+    return "python.ResolveOriginalName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct ResolveOriginalName
+
+} // namespace Python
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Python::Parameter> {
+  using Type = Tuple<facebook::glean::cpp::schema::Python::Name, Maybe<Repr<facebook::glean::cpp::schema::Python::TypeInfo>>, Maybe<String>>;
+};
+
+
+namespace schema {
+
+namespace Python {
+
+struct Parameter {
+  Fact<Name> name;
+  boost::variant<Alt<0, std::tuple<>>, Alt<1, TypeInfo>> typeInfo;
+  boost::variant<Alt<0, std::tuple<>>, Alt<1, std::string>> value;
+
+  bool operator==(const Parameter& other) const {
+    return std::tie(name,typeInfo,value)
+             == std::tie(other.name,other.typeInfo,other.value);
+  }
+  bool operator!=(const Parameter& other) const {
+    return std::tie(name,typeInfo,value)
+             != std::tie(other.name,other.typeInfo,other.value);
+  }
+  bool operator<(const Parameter& other) const {
+    return std::tie(name,typeInfo,value)
+             < std::tie(other.name,other.typeInfo,other.value);
+  }
+  bool operator<=(const Parameter& other) const {
+    return std::tie(name,typeInfo,value)
+             <= std::tie(other.name,other.typeInfo,other.value);
+  }
+  bool operator>(const Parameter& other) const {
+    return std::tie(name,typeInfo,value)
+             > std::tie(other.name,other.typeInfo,other.value);
+  }
+  bool operator>=(const Parameter& other) const {
+    return std::tie(name,typeInfo,value)
+             >= std::tie(other.name,other.typeInfo,other.value);
+  }
+  void outputRepr(Output<Repr<Parameter>> out) const {
+    outputValue(out, std::make_tuple(name, typeInfo, value));
+  }
+}; // struct Parameter
+
+struct NameToSName : Predicate<Fact<Name>, Fact<SName>> {
+  static const char* GLEAN_name() {
+    return "python.NameToSName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct NameToSName
+
+struct Name : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "python.Name";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct Name
+
+struct ModuleDefinition : Predicate<std::tuple<Fact<Module>>> {
+  static const char* GLEAN_name() {
+    return "python.ModuleDefinition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct ModuleDefinition
+
+struct ModuleBySName : Predicate<Fact<SName>, Fact<Module>> {
+  static const char* GLEAN_name() {
+    return "python.ModuleBySName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct ModuleBySName
+
+struct Module : Predicate<std::tuple<Fact<Name>>> {
+  static const char* GLEAN_name() {
+    return "python.Module";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct Module
+
+struct MethodOverrides : Predicate<std::tuple<Fact<FunctionDeclaration>, Fact<FunctionDeclaration>>> {
+  static const char* GLEAN_name() {
+    return "python.MethodOverrides";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct MethodOverrides
+
+struct MethodOverriden : Predicate<std::tuple<Fact<FunctionDeclaration>, Fact<FunctionDeclaration>>> {
+  static const char* GLEAN_name() {
+    return "python.MethodOverriden";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct MethodOverriden
+
+struct MethodByLocalNameStr : Predicate<std::tuple<Fact<ClassDeclaration>, std::string, Fact<FunctionDeclaration>>> {
+  static const char* GLEAN_name() {
+    return "python.MethodByLocalNameStr";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct MethodByLocalNameStr
+
+struct ImportStatementByAsSName : Predicate<std::tuple<Fact<SName>, Fact<ImportStatement>>> {
+  static const char* GLEAN_name() {
+    return "python.ImportStatementByAsSName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct ImportStatementByAsSName
+
+struct ImportStatementByAsName : Predicate<std::tuple<Fact<Name>, Fact<ImportStatement>>> {
+  static const char* GLEAN_name() {
+    return "python.ImportStatementByAsName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct ImportStatementByAsName
+
+struct ImportStatement : Predicate<std::tuple<Fact<Name>, Fact<Name>>> {
+  static const char* GLEAN_name() {
+    return "python.ImportStatement";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct ImportStatement
+
+struct ImportStarsByFile : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan, Fact<ImportStarStatement>>> {
+  static const char* GLEAN_name() {
+    return "python.ImportStarsByFile";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct ImportStarsByFile
+
+struct ImportStarStatement : Predicate<std::tuple<Fact<Name>, Fact<Module>>> {
+  static const char* GLEAN_name() {
+    return "python.ImportStarStatement";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct ImportStarStatement
+
+struct ImportStarLocation : Predicate<std::tuple<Fact<ImportStarStatement>, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "python.ImportStarLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct ImportStarLocation
+
+struct FunctionDeclaration : Predicate<std::tuple<Fact<Name>>> {
+  static const char* GLEAN_name() {
+    return "python.FunctionDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct FunctionDeclaration
+
+struct FunctionBySName : Predicate<Fact<SName>, Fact<FunctionDeclaration>> {
+  static const char* GLEAN_name() {
+    return "python.FunctionBySName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct FunctionBySName
+
+struct DerivedClassToBase : Predicate<std::tuple<Fact<ClassDeclaration>, Fact<ClassDeclaration>>> {
+  static const char* GLEAN_name() {
+    return "python.DerivedClassToBase";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct DerivedClassToBase
+
+} // namespace Python
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Python::Definition> {
+  using Type = Sum<facebook::glean::cpp::schema::Python::ClassDefinition, facebook::glean::cpp::schema::Python::FunctionDefinition, facebook::glean::cpp::schema::Python::VariableDefinition, facebook::glean::cpp::schema::Python::ModuleDefinition>;
+};
+
+
+namespace schema {
+
+namespace Python {
+
+struct Definition {
+  boost::variant<Alt<0, Fact<ClassDefinition>>, Alt<1, Fact<FunctionDefinition>>, Alt<2, Fact<VariableDefinition>>, Alt<3, Fact<ModuleDefinition>>> GLEAN_value;
+
+  static Definition cls(const Fact<ClassDefinition>& a) {
+    return Definition{Alt<0, Fact<ClassDefinition>>(a)};
+  }
+  static Definition func(const Fact<FunctionDefinition>& a) {
+    return Definition{Alt<1, Fact<FunctionDefinition>>(a)};
+  }
+  static Definition variable(const Fact<VariableDefinition>& a) {
+    return Definition{Alt<2, Fact<VariableDefinition>>(a)};
+  }
+  static Definition module(const Fact<ModuleDefinition>& a) {
+    return Definition{Alt<3, Fact<ModuleDefinition>>(a)};
+  }
+
+  bool operator==(const Definition& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Definition& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Definition& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Definition& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Definition& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Definition& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Definition>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Definition
+
+struct DefinitionLocation : Predicate<std::tuple<Definition, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "python.DefinitionLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct DefinitionLocation
+
+struct DefinitionsByFile : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan, Definition>> {
+  static const char* GLEAN_name() {
+    return "python.DefinitionsByFile";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct DefinitionsByFile
+
+struct IsTopLevelDefinition : Predicate<Definition> {
+  static const char* GLEAN_name() {
+    return "python.IsTopLevelDefinition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct IsTopLevelDefinition
+
+using Decorator = std::string;
+
+} // namespace Python
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Python::DeclarationContainer> {
+  using Type = Sum<facebook::glean::cpp::schema::Python::Module, facebook::glean::cpp::schema::Python::ClassDeclaration, facebook::glean::cpp::schema::Python::FunctionDeclaration>;
+};
+
+
+namespace schema {
+
+namespace Python {
+
+struct DeclarationContainer {
+  boost::variant<Alt<0, Fact<Module>>, Alt<1, Fact<ClassDeclaration>>, Alt<2, Fact<FunctionDeclaration>>> GLEAN_value;
+
+  static DeclarationContainer module(const Fact<Module>& a) {
+    return DeclarationContainer{Alt<0, Fact<Module>>(a)};
+  }
+  static DeclarationContainer cls(const Fact<ClassDeclaration>& a) {
+    return DeclarationContainer{Alt<1, Fact<ClassDeclaration>>(a)};
+  }
+  static DeclarationContainer func(const Fact<FunctionDeclaration>& a) {
+    return DeclarationContainer{Alt<2, Fact<FunctionDeclaration>>(a)};
+  }
+
+  bool operator==(const DeclarationContainer& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const DeclarationContainer& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const DeclarationContainer& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const DeclarationContainer& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const DeclarationContainer& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const DeclarationContainer& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<DeclarationContainer>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct DeclarationContainer
+
+struct FunctionDefinition : Predicate<std::tuple<Fact<FunctionDeclaration>, bool, boost::variant<Alt<0, std::tuple<>>, Alt<1, TypeInfo>>, std::vector<Parameter>, boost::variant<Alt<0, std::tuple<>>, Alt<1, std::vector<Parameter>>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, std::vector<Parameter>>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Parameter>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Parameter>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, std::vector<Decorator>>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, DeclarationContainer>>>> {
+  static const char* GLEAN_name() {
+    return "python.FunctionDefinition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct FunctionDefinition
+
+struct VariableDefinition : Predicate<std::tuple<Fact<VariableDeclaration>, boost::variant<Alt<0, std::tuple<>>, Alt<1, TypeInfo>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, DeclarationContainer>>>> {
+  static const char* GLEAN_name() {
+    return "python.VariableDefinition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct VariableDefinition
+
+} // namespace Python
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Python::Declaration> {
+  using Type = Sum<facebook::glean::cpp::schema::Python::ClassDeclaration, facebook::glean::cpp::schema::Python::FunctionDeclaration, facebook::glean::cpp::schema::Python::VariableDeclaration, facebook::glean::cpp::schema::Python::ImportStatement, facebook::glean::cpp::schema::Python::Module>;
+};
+
+
+namespace schema {
+
+namespace Python {
+
+struct Declaration {
+  boost::variant<Alt<0, Fact<ClassDeclaration>>, Alt<1, Fact<FunctionDeclaration>>, Alt<2, Fact<VariableDeclaration>>, Alt<3, Fact<ImportStatement>>, Alt<4, Fact<Module>>> GLEAN_value;
+
+  static Declaration cls(const Fact<ClassDeclaration>& a) {
+    return Declaration{Alt<0, Fact<ClassDeclaration>>(a)};
+  }
+  static Declaration func(const Fact<FunctionDeclaration>& a) {
+    return Declaration{Alt<1, Fact<FunctionDeclaration>>(a)};
+  }
+  static Declaration variable(const Fact<VariableDeclaration>& a) {
+    return Declaration{Alt<2, Fact<VariableDeclaration>>(a)};
+  }
+  static Declaration imp(const Fact<ImportStatement>& a) {
+    return Declaration{Alt<3, Fact<ImportStatement>>(a)};
+  }
+  static Declaration module(const Fact<Module>& a) {
+    return Declaration{Alt<4, Fact<Module>>(a)};
+  }
+
+  bool operator==(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Declaration>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Declaration
+
+struct DeclarationDefinition : Predicate<std::tuple<Declaration, Definition>> {
+  static const char* GLEAN_name() {
+    return "python.DeclarationDefinition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct DeclarationDefinition
+
+struct DeclarationDocstring : Predicate<std::tuple<Declaration, facebook::glean::cpp::schema::Src::ByteSpan, std::string>> {
+  static const char* GLEAN_name() {
+    return "python.DeclarationDocstring";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct DeclarationDocstring
+
+struct DeclarationLocation : Predicate<std::tuple<Declaration, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "python.DeclarationLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct DeclarationLocation
+
+struct DeclarationReference : Predicate<std::tuple<Declaration, Declaration>> {
+  static const char* GLEAN_name() {
+    return "python.DeclarationReference";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct DeclarationReference
+
+struct DeclarationToName : Predicate<Declaration, Fact<Name>> {
+  static const char* GLEAN_name() {
+    return "python.DeclarationToName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct DeclarationToName
+
+struct DeclarationUses : Predicate<std::tuple<Declaration, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "python.DeclarationUses";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct DeclarationUses
+
+struct DeclarationWithLocalName : Predicate<std::tuple<Fact<Name>, Declaration>> {
+  static const char* GLEAN_name() {
+    return "python.DeclarationWithLocalName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct DeclarationWithLocalName
+
+struct DeclarationWithName : Predicate<std::tuple<Fact<Name>, Declaration>> {
+  static const char* GLEAN_name() {
+    return "python.DeclarationWithName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct DeclarationWithName
+
+struct DeclarationWithSName : Predicate<std::tuple<Fact<SName>, Declaration>> {
+  static const char* GLEAN_name() {
+    return "python.DeclarationWithSName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct DeclarationWithSName
+
+struct DeclarationsByFile : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan, Declaration>> {
+  static const char* GLEAN_name() {
+    return "python.DeclarationsByFile";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct DeclarationsByFile
+
+struct DefinitionDeclaration : Predicate<std::tuple<Definition, Declaration>> {
+  static const char* GLEAN_name() {
+    return "python.DefinitionDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct DefinitionDeclaration
+
+} // namespace Python
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Python::DirectXRef> {
+  using Type = Tuple<Repr<facebook::glean::cpp::schema::Python::Declaration>, Repr<facebook::glean::cpp::schema::Src::ByteSpan>>;
+};
+
+
+namespace schema {
+
+namespace Python {
+
+struct DirectXRef {
+  Declaration target;
+  facebook::glean::cpp::schema::Src::ByteSpan source;
+
+  bool operator==(const DirectXRef& other) const {
+    return std::tie(target,source)
+             == std::tie(other.target,other.source);
+  }
+  bool operator!=(const DirectXRef& other) const {
+    return std::tie(target,source)
+             != std::tie(other.target,other.source);
+  }
+  bool operator<(const DirectXRef& other) const {
+    return std::tie(target,source)
+             < std::tie(other.target,other.source);
+  }
+  bool operator<=(const DirectXRef& other) const {
+    return std::tie(target,source)
+             <= std::tie(other.target,other.source);
+  }
+  bool operator>(const DirectXRef& other) const {
+    return std::tie(target,source)
+             > std::tie(other.target,other.source);
+  }
+  bool operator>=(const DirectXRef& other) const {
+    return std::tie(target,source)
+             >= std::tie(other.target,other.source);
+  }
+  void outputRepr(Output<Repr<DirectXRef>> out) const {
+    outputValue(out, std::make_tuple(target, source));
+  }
+}; // struct DirectXRef
+
+struct DirectXRefsByFile : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, DirectXRef>> {
+  static const char* GLEAN_name() {
+    return "python.DirectXRefsByFile";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct DirectXRefsByFile
+
+struct IsAbstract : Predicate<Declaration> {
+  static const char* GLEAN_name() {
+    return "python.IsAbstract";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct IsAbstract
+
+struct IsTopLevelDeclaration : Predicate<Declaration> {
+  static const char* GLEAN_name() {
+    return "python.IsTopLevelDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct IsTopLevelDeclaration
+
+struct NonImportDeclaration : Predicate<Declaration> {
+  static const char* GLEAN_name() {
+    return "python.NonImportDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct NonImportDeclaration
+
+struct SNameWithDeclaration : Predicate<std::tuple<Declaration, Fact<SName>>> {
+  static const char* GLEAN_name() {
+    return "python.SNameWithDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct SNameWithDeclaration
+
+} // namespace Python
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Yaml::XRefViaName> {
+  using Type = Tuple<facebook::glean::cpp::schema::Python::Name, Repr<facebook::glean::cpp::schema::Src::ByteSpan>, Maybe<Repr<facebook::glean::cpp::schema::Python::Declaration>>>;
+};
+
+
+namespace schema {
+
+namespace Yaml {
+
+struct XRefViaName {
+  Fact<facebook::glean::cpp::schema::Python::Name> target;
+  facebook::glean::cpp::schema::Src::ByteSpan source;
+  boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Python::Declaration>> decl;
+
+  bool operator==(const XRefViaName& other) const {
+    return std::tie(target,source,decl)
+             == std::tie(other.target,other.source,other.decl);
+  }
+  bool operator!=(const XRefViaName& other) const {
+    return std::tie(target,source,decl)
+             != std::tie(other.target,other.source,other.decl);
+  }
+  bool operator<(const XRefViaName& other) const {
+    return std::tie(target,source,decl)
+             < std::tie(other.target,other.source,other.decl);
+  }
+  bool operator<=(const XRefViaName& other) const {
+    return std::tie(target,source,decl)
+             <= std::tie(other.target,other.source,other.decl);
+  }
+  bool operator>(const XRefViaName& other) const {
+    return std::tie(target,source,decl)
+             > std::tie(other.target,other.source,other.decl);
+  }
+  bool operator>=(const XRefViaName& other) const {
+    return std::tie(target,source,decl)
+             >= std::tie(other.target,other.source,other.decl);
+  }
+  void outputRepr(Output<Repr<XRefViaName>> out) const {
+    outputValue(out, std::make_tuple(target, source, decl));
+  }
+}; // struct XRefViaName
+
+struct XRefsByFile : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, std::vector<XRefViaName>>> {
+  static const char* GLEAN_name() {
+    return "yaml.XRefsByFile";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct XRefsByFile
+
+} // namespace Yaml
+
+namespace Python {
+
+struct Contains : Predicate<std::tuple<Declaration, Declaration>> {
+  static const char* GLEAN_name() {
+    return "python.Contains";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct Contains
+
+struct ContainingTopLevelDeclaration : Predicate<std::tuple<Declaration, Declaration>> {
+  static const char* GLEAN_name() {
+    return "python.ContainingTopLevelDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct ContainingTopLevelDeclaration
+
+struct ContainedByTopLevelDeclaration : Predicate<std::tuple<Declaration, Declaration>> {
+  static const char* GLEAN_name() {
+    return "python.ContainedByTopLevelDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct ContainedByTopLevelDeclaration
+
+struct ContainedBy : Predicate<std::tuple<Declaration, Declaration>> {
+  static const char* GLEAN_name() {
+    return "python.ContainedBy";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct ContainedBy
+
+struct ClassDefinition : Predicate<std::tuple<Fact<ClassDeclaration>, boost::variant<Alt<0, std::tuple<>>, Alt<1, std::vector<Fact<ClassDeclaration>>>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, std::vector<Parameter>>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, std::vector<Decorator>>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, DeclarationContainer>>>> {
+  static const char* GLEAN_name() {
+    return "python.ClassDefinition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct ClassDefinition
+
+struct ClassDeclaration : Predicate<std::tuple<Fact<Name>, boost::variant<Alt<0, std::tuple<>>, Alt<1, std::vector<Fact<Name>>>>>> {
+  static const char* GLEAN_name() {
+    return "python.ClassDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct ClassDeclaration
+
+struct ClassBySName : Predicate<Fact<SName>, Fact<ClassDeclaration>> {
+  static const char* GLEAN_name() {
+    return "python.ClassBySName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct ClassBySName
+
+struct CalleeToCaller : Predicate<std::tuple<Fact<Name>, Fact<Name>>> {
+  static const char* GLEAN_name() {
+    return "python.CalleeToCaller";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CalleeToCaller
+
+struct BaseClassToDerived : Predicate<std::tuple<Fact<ClassDeclaration>, Fact<ClassDeclaration>>> {
+  static const char* GLEAN_name() {
+    return "python.BaseClassToDerived";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct BaseClassToDerived
+
+} // namespace Python
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Python::Argument> {
+  using Type = Sum<facebook::glean::cpp::schema::Python::StringLiteral>;
+};
+
+
+namespace schema {
+
+namespace Python {
+
+struct Argument {
+  boost::variant<Alt<0, Fact<StringLiteral>>> GLEAN_value;
+
+  static Argument lit(const Fact<StringLiteral>& a) {
+    return Argument{Alt<0, Fact<StringLiteral>>(a)};
+  }
+
+  bool operator==(const Argument& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Argument& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Argument& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Argument& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Argument& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Argument& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Argument>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Argument
+
+} // namespace Python
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Python::CallArgument> {
+  using Type = Tuple<Maybe<facebook::glean::cpp::schema::Python::Name>, Repr<facebook::glean::cpp::schema::Src::ByteSpan>, Maybe<Repr<facebook::glean::cpp::schema::Python::Argument>>>;
+};
+
+
+namespace schema {
+
+namespace Python {
+
+struct CallArgument {
+  boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Name>>> label;
+  facebook::glean::cpp::schema::Src::ByteSpan span;
+  boost::variant<Alt<0, std::tuple<>>, Alt<1, Argument>> argument;
+
+  bool operator==(const CallArgument& other) const {
+    return std::tie(label,span,argument)
+             == std::tie(other.label,other.span,other.argument);
+  }
+  bool operator!=(const CallArgument& other) const {
+    return std::tie(label,span,argument)
+             != std::tie(other.label,other.span,other.argument);
+  }
+  bool operator<(const CallArgument& other) const {
+    return std::tie(label,span,argument)
+             < std::tie(other.label,other.span,other.argument);
+  }
+  bool operator<=(const CallArgument& other) const {
+    return std::tie(label,span,argument)
+             <= std::tie(other.label,other.span,other.argument);
+  }
+  bool operator>(const CallArgument& other) const {
+    return std::tie(label,span,argument)
+             > std::tie(other.label,other.span,other.argument);
+  }
+  bool operator>=(const CallArgument& other) const {
+    return std::tie(label,span,argument)
+             >= std::tie(other.label,other.span,other.argument);
+  }
+  void outputRepr(Output<Repr<CallArgument>> out) const {
+    outputValue(out, std::make_tuple(label, span, argument));
+  }
+}; // struct CallArgument
+
+struct FileCall : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan, std::vector<CallArgument>>> {
+  static const char* GLEAN_name() {
+    return "python.FileCall";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct FileCall
+
+} // namespace Python
+
+namespace Pp1 {
+
+struct Use : Predicate<std::tuple<Fact<Macro>, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Src::Loc>>, bool, facebook::glean::cpp::schema::Src::Range, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "pp1.Use";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct Use
+
+struct Undef : Predicate<std::tuple<Fact<Macro>, facebook::glean::cpp::schema::Src::Range>> {
+  static const char* GLEAN_name() {
+    return "pp1.Undef";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct Undef
+
+struct Macro : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "pp1.Macro";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct Macro
+
+struct Include : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::Range, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "pp1.Include";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct Include
+
+struct DefineUse : Predicate<std::tuple<Fact<Define>, Fact<Use>>> {
+  static const char* GLEAN_name() {
+    return "pp1.DefineUse";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct DefineUse
+
+struct DefineLowerCase : Predicate<std::tuple<std::string, Fact<Define>>> {
+  static const char* GLEAN_name() {
+    return "pp1.DefineLowerCase";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct DefineLowerCase
+
+struct Define : Predicate<std::tuple<Fact<Macro>, facebook::glean::cpp::schema::Src::Range>> {
+  static const char* GLEAN_name() {
+    return "pp1.Define";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct Define
+
+} // namespace Pp1
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Lsif::Types::ToolInfo> {
+  using Type = Tuple<String, Array<String>, Maybe<String>>;
+};
+
+
+namespace schema {
+
+namespace Lsif {
+
+namespace Types {
+
+struct ToolInfo {
+  std::string toolName;
+  std::vector<std::string> toolArgs;
+  boost::variant<Alt<0, std::tuple<>>, Alt<1, std::string>> version;
+
+  bool operator==(const ToolInfo& other) const {
+    return std::tie(toolName,toolArgs,version)
+             == std::tie(other.toolName,other.toolArgs,other.version);
+  }
+  bool operator!=(const ToolInfo& other) const {
+    return std::tie(toolName,toolArgs,version)
+             != std::tie(other.toolName,other.toolArgs,other.version);
+  }
+  bool operator<(const ToolInfo& other) const {
+    return std::tie(toolName,toolArgs,version)
+             < std::tie(other.toolName,other.toolArgs,other.version);
+  }
+  bool operator<=(const ToolInfo& other) const {
+    return std::tie(toolName,toolArgs,version)
+             <= std::tie(other.toolName,other.toolArgs,other.version);
+  }
+  bool operator>(const ToolInfo& other) const {
+    return std::tie(toolName,toolArgs,version)
+             > std::tie(other.toolName,other.toolArgs,other.version);
+  }
+  bool operator>=(const ToolInfo& other) const {
+    return std::tie(toolName,toolArgs,version)
+             >= std::tie(other.toolName,other.toolArgs,other.version);
+  }
+  void outputRepr(Output<Repr<ToolInfo>> out) const {
+    outputValue(out, std::make_tuple(toolName, toolArgs, version));
+  }
+}; // struct ToolInfo
+
+} // namespace Types
+
+} // namespace Lsif
+
+namespace Scip {
+
+struct Metadata : Predicate<std::tuple<ProtocolVersion, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Lsif::Types::ToolInfo>>, std::string, TextEncoding>> {
+  static const char* GLEAN_name() {
+    return "scip.Metadata";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct Metadata
+
+} // namespace Scip
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Lsif::Types::SymbolKind> {
+  using Type = Enum<27>;
+};
+
+
+namespace schema {
+
+namespace Lsif {
+
+namespace Types {
+
+enum class SymbolKind { File, Module, Namespace, Package, Class_, Method, Property, Field, Constructor, Enum_, Interface, Function, Variable, Constant, String, Number, Boolean, Array_, Object_, Key, Null, EnumMember, Struct, Event, Operator, TypeParameter, Unknown };
+
+} // namespace Types
+
+} // namespace Lsif
+
+namespace Scip {
+
+struct EntityKind : Predicate<std::tuple<Entity, facebook::glean::cpp::schema::Lsif::Types::SymbolKind>> {
+  static const char* GLEAN_name() {
+    return "scip.EntityKind";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct EntityKind
+
+struct SearchByNameKind : Predicate<std::tuple<std::string, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Lsif::Types::SymbolKind>>, Entity>> {
+  static const char* GLEAN_name() {
+    return "scip.SearchByNameKind";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct SearchByNameKind
+
+struct SymbolKind : Predicate<std::tuple<Fact<Symbol>, facebook::glean::cpp::schema::Lsif::Types::SymbolKind>> {
+  static const char* GLEAN_name() {
+    return "scip.SymbolKind";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct SymbolKind
+
+} // namespace Scip
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Lsif::Types::RangeSpan> {
+  using Type = Tuple<Nat, Nat, Nat, Nat>;
+};
+
+
+namespace schema {
+
+namespace Lsif {
+
+namespace Types {
+
+struct RangeSpan {
+  uint64_t lineBegin;
+  uint64_t columnBegin;
+  uint64_t lineEnd;
+  uint64_t columnEnd;
+
+  bool operator==(const RangeSpan& other) const {
+    return std::tie(lineBegin,columnBegin,lineEnd,columnEnd)
+             == std::tie(other.lineBegin,other.columnBegin,other.lineEnd,other.columnEnd);
+  }
+  bool operator!=(const RangeSpan& other) const {
+    return std::tie(lineBegin,columnBegin,lineEnd,columnEnd)
+             != std::tie(other.lineBegin,other.columnBegin,other.lineEnd,other.columnEnd);
+  }
+  bool operator<(const RangeSpan& other) const {
+    return std::tie(lineBegin,columnBegin,lineEnd,columnEnd)
+             < std::tie(other.lineBegin,other.columnBegin,other.lineEnd,other.columnEnd);
+  }
+  bool operator<=(const RangeSpan& other) const {
+    return std::tie(lineBegin,columnBegin,lineEnd,columnEnd)
+             <= std::tie(other.lineBegin,other.columnBegin,other.lineEnd,other.columnEnd);
+  }
+  bool operator>(const RangeSpan& other) const {
+    return std::tie(lineBegin,columnBegin,lineEnd,columnEnd)
+             > std::tie(other.lineBegin,other.columnBegin,other.lineEnd,other.columnEnd);
+  }
+  bool operator>=(const RangeSpan& other) const {
+    return std::tie(lineBegin,columnBegin,lineEnd,columnEnd)
+             >= std::tie(other.lineBegin,other.columnBegin,other.lineEnd,other.columnEnd);
+  }
+  void outputRepr(Output<Repr<RangeSpan>> out) const {
+    outputValue(out, std::make_tuple(lineBegin, columnBegin, lineEnd, columnEnd));
+  }
+}; // struct RangeSpan
+
+struct ToSrcRange : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, RangeSpan, facebook::glean::cpp::schema::Src::Range>> {
+  static const char* GLEAN_name() {
+    return "lsif.types.ToSrcRange";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct ToSrcRange
+
+} // namespace Types
+
+} // namespace Lsif
+
+namespace Scip {
+
+struct DefinitionLocation : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Lsif::Types::RangeSpan, Fact<Definition>>> {
+  static const char* GLEAN_name() {
+    return "scip.DefinitionLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct DefinitionLocation
+
+struct FileRange : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Lsif::Types::RangeSpan>> {
+  static const char* GLEAN_name() {
+    return "scip.FileRange";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct FileRange
+
+struct FileXLangSymbolRef : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Lsif::Types::RangeSpan, Fact<Symbol>>> {
+  static const char* GLEAN_name() {
+    return "scip.FileXLangSymbolRef";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct FileXLangSymbolRef
+
+struct ReferenceLocation : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Lsif::Types::RangeSpan, Fact<Reference>>> {
+  static const char* GLEAN_name() {
+    return "scip.ReferenceLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct ReferenceLocation
+
+} // namespace Scip
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Lsif::Types::LanguageId> {
+  using Type = Enum<59>;
+};
+
+
+namespace schema {
+
+namespace Lsif {
+
+namespace Types {
+
+enum class LanguageId { ABAP, WindowsBat, BibTeX, Clojure, Coffeescript, C, Cpp, CSharp, CSS, Diff, Dart, Dockerfile, Elixir, Erlang, FSharp, Git, Go, Groovy, Handlebars, Haskell, HTML, Ini, Java, JavaScript, JavaScriptReact, JSON, LaTeX, Less, Lua, Makefile, Markdown, ObjectiveC, ObjectiveCpp, Perl, Perl6, PHP, Powershell, Pug, Python, R, Razor, Ruby, Rust, SCSS, Scala, ShaderLab, Shell, SQL, Swift, TypeScript, TypeScriptReact, TeX, VisualBasic, XML, XSL, YAML, UnknownLanguage, Kotlin, OCaml };
+
+} // namespace Types
+
+} // namespace Lsif
+
+namespace Scip {
+
+struct FileLanguage : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Lsif::Types::LanguageId>> {
+  static const char* GLEAN_name() {
+    return "scip.FileLanguage";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct FileLanguage
+
+struct TagDefinition : Predicate<std::tuple<facebook::glean::cpp::schema::Lsif::Types::LanguageId, Fact<Definition>, Entity>> {
+  static const char* GLEAN_name() {
+    return "scip.TagDefinition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct TagDefinition
+
+} // namespace Scip
+
+namespace Lsif {
+
+namespace Types {
+
+struct FromSrcRange : Predicate<std::tuple<facebook::glean::cpp::schema::Src::Range, Fact<facebook::glean::cpp::schema::Src::File>, RangeSpan>> {
+  static const char* GLEAN_name() {
+    return "lsif.types.FromSrcRange";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct FromSrcRange
+
+} // namespace Types
+
+} // namespace Lsif
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Lsif::SomeEntity> {
+  using Type = Sum<facebook::glean::cpp::schema::Lsif::Declaration, facebook::glean::cpp::schema::Lsif::DefinitionMoniker>;
+};
+
+
+namespace schema {
+
+namespace Lsif {
+
+struct SomeEntity {
+  boost::variant<Alt<0, Fact<Declaration>>, Alt<1, Fact<DefinitionMoniker>>> GLEAN_value;
+
+  static SomeEntity decl(const Fact<Declaration>& a) {
+    return SomeEntity{Alt<0, Fact<Declaration>>(a)};
+  }
+  static SomeEntity defn(const Fact<DefinitionMoniker>& a) {
+    return SomeEntity{Alt<1, Fact<DefinitionMoniker>>(a)};
+  }
+
+  bool operator==(const SomeEntity& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const SomeEntity& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const SomeEntity& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const SomeEntity& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const SomeEntity& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const SomeEntity& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<SomeEntity>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct SomeEntity
+
+struct Reference : Predicate<std::tuple<Fact<Document>, Fact<Range>, Fact<Definition>>> {
+  static const char* GLEAN_name() {
+    return "lsif.Reference";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct Reference
+
+struct Range : Predicate<std::tuple<facebook::glean::cpp::schema::Lsif::Types::RangeSpan, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Lsif::Types::RangeSpan>>, Fact<Name>>> {
+  static const char* GLEAN_name() {
+    return "lsif.Range";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct Range
+
+struct ProjectDocument : Predicate<std::tuple<Fact<Document>, Fact<Project>>> {
+  static const char* GLEAN_name() {
+    return "lsif.ProjectDocument";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct ProjectDocument
+
+struct Project : Predicate<std::tuple<facebook::glean::cpp::schema::Lsif::Types::LanguageId>> {
+  static const char* GLEAN_name() {
+    return "lsif.Project";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct Project
+
+struct PackageInformation : Predicate<std::tuple<std::string, std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "lsif.PackageInformation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct PackageInformation
+
+struct NameLowerCase : Predicate<std::tuple<std::string, Fact<Name>>> {
+  static const char* GLEAN_name() {
+    return "lsif.NameLowerCase";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct NameLowerCase
+
+struct NameDefinition : Predicate<std::tuple<Fact<Name>, Fact<DefinitionMoniker>>> {
+  static const char* GLEAN_name() {
+    return "lsif.NameDefinition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct NameDefinition
+
+struct Name : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "lsif.Name";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct Name
+
+struct MonikerSymbolKind : Predicate<std::tuple<Fact<Moniker>, facebook::glean::cpp::schema::Lsif::Types::SymbolKind>> {
+  static const char* GLEAN_name() {
+    return "lsif.MonikerSymbolKind";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct MonikerSymbolKind
+
+struct MonikerScheme : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "lsif.MonikerScheme";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct MonikerScheme
+
+} // namespace Lsif
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Lsif::MonikerKind> {
+  using Type = Enum<4>;
+};
+
+
+namespace schema {
+
+namespace Lsif {
+
+enum class MonikerKind { Export, Local, Import, Implementation };
+
+struct MonikerId : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "lsif.MonikerId";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct MonikerId
+
+struct MonikerDefinition : Predicate<std::tuple<Fact<MonikerId>, Fact<Moniker>, Fact<Definition>>> {
+  static const char* GLEAN_name() {
+    return "lsif.MonikerDefinition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct MonikerDefinition
+
+struct Moniker : Predicate<std::tuple<MonikerKind, Fact<MonikerScheme>, Fact<MonikerId>>> {
+  static const char* GLEAN_name() {
+    return "lsif.Moniker";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct Moniker
+
+struct Metadata : Predicate<std::tuple<std::string, std::string, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Lsif::Types::ToolInfo>>>> {
+  static const char* GLEAN_name() {
+    return "lsif.Metadata";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct Metadata
+
+} // namespace Lsif
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Lsif::Location> {
+  using Type = Tuple<String, facebook::glean::cpp::schema::Src::File, Repr<facebook::glean::cpp::schema::Src::Range>>;
+};
+
+
+namespace schema {
+
+namespace Lsif {
+
+struct Location {
+  std::string name;
+  Fact<facebook::glean::cpp::schema::Src::File> file;
+  facebook::glean::cpp::schema::Src::Range location;
+
+  bool operator==(const Location& other) const {
+    return std::tie(name,file,location)
+             == std::tie(other.name,other.file,other.location);
+  }
+  bool operator!=(const Location& other) const {
+    return std::tie(name,file,location)
+             != std::tie(other.name,other.file,other.location);
+  }
+  bool operator<(const Location& other) const {
+    return std::tie(name,file,location)
+             < std::tie(other.name,other.file,other.location);
+  }
+  bool operator<=(const Location& other) const {
+    return std::tie(name,file,location)
+             <= std::tie(other.name,other.file,other.location);
+  }
+  bool operator>(const Location& other) const {
+    return std::tie(name,file,location)
+             > std::tie(other.name,other.file,other.location);
+  }
+  bool operator>=(const Location& other) const {
+    return std::tie(name,file,location)
+             >= std::tie(other.name,other.file,other.location);
+  }
+  void outputRepr(Output<Repr<Location>> out) const {
+    outputValue(out, std::make_tuple(name, file, location));
+  }
+}; // struct Location
+
+struct HoverText : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "lsif.HoverText";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct HoverText
+
+struct HoverContent : Predicate<std::tuple<Fact<HoverText>, facebook::glean::cpp::schema::Lsif::Types::LanguageId>> {
+  static const char* GLEAN_name() {
+    return "lsif.HoverContent";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct HoverContent
+
+} // namespace Lsif
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Lsif::Entity> {
+  using Type = Sum<Repr<facebook::glean::cpp::schema::Lsif::SomeEntity>, Repr<facebook::glean::cpp::schema::Lsif::SomeEntity>, Repr<facebook::glean::cpp::schema::Lsif::SomeEntity>, Repr<facebook::glean::cpp::schema::Lsif::SomeEntity>, Repr<facebook::glean::cpp::schema::Lsif::SomeEntity>, Repr<facebook::glean::cpp::schema::Lsif::SomeEntity>, Repr<facebook::glean::cpp::schema::Lsif::SomeEntity>, Repr<facebook::glean::cpp::schema::Lsif::SomeEntity>, Repr<facebook::glean::cpp::schema::Lsif::SomeEntity>, Repr<facebook::glean::cpp::schema::Lsif::SomeEntity>, Repr<facebook::glean::cpp::schema::Lsif::SomeEntity>, Repr<facebook::glean::cpp::schema::Lsif::SomeEntity>>;
+};
+
+
+namespace schema {
+
+namespace Lsif {
+
+struct Entity {
+  boost::variant<Alt<0, SomeEntity>, Alt<1, SomeEntity>, Alt<2, SomeEntity>, Alt<3, SomeEntity>, Alt<4, SomeEntity>, Alt<5, SomeEntity>, Alt<6, SomeEntity>, Alt<7, SomeEntity>, Alt<8, SomeEntity>, Alt<9, SomeEntity>, Alt<10, SomeEntity>, Alt<11, SomeEntity>> GLEAN_value;
+
+  static Entity erlang(const SomeEntity& a) {
+    return Entity{Alt<0, SomeEntity>(a)};
+  }
+  static Entity fsharp(const SomeEntity& a) {
+    return Entity{Alt<1, SomeEntity>(a)};
+  }
+  static Entity go(const SomeEntity& a) {
+    return Entity{Alt<2, SomeEntity>(a)};
+  }
+  static Entity haskell(const SomeEntity& a) {
+    return Entity{Alt<3, SomeEntity>(a)};
+  }
+  static Entity java(const SomeEntity& a) {
+    return Entity{Alt<4, SomeEntity>(a)};
+  }
+  static Entity kotlin(const SomeEntity& a) {
+    return Entity{Alt<5, SomeEntity>(a)};
+  }
+  static Entity ocaml(const SomeEntity& a) {
+    return Entity{Alt<6, SomeEntity>(a)};
+  }
+  static Entity python(const SomeEntity& a) {
+    return Entity{Alt<7, SomeEntity>(a)};
+  }
+  static Entity rust(const SomeEntity& a) {
+    return Entity{Alt<8, SomeEntity>(a)};
+  }
+  static Entity scala(const SomeEntity& a) {
+    return Entity{Alt<9, SomeEntity>(a)};
+  }
+  static Entity swift(const SomeEntity& a) {
+    return Entity{Alt<10, SomeEntity>(a)};
+  }
+  static Entity typescript(const SomeEntity& a) {
+    return Entity{Alt<11, SomeEntity>(a)};
+  }
+
+  bool operator==(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Entity>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Entity
+
+struct EntityDefinition : Predicate<std::tuple<Entity, Fact<DefinitionMoniker>>> {
+  static const char* GLEAN_name() {
+    return "lsif.EntityDefinition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct EntityDefinition
+
+struct EntityKind : Predicate<std::tuple<Entity, facebook::glean::cpp::schema::Lsif::Types::SymbolKind>> {
+  static const char* GLEAN_name() {
+    return "lsif.EntityKind";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct EntityKind
+
+struct EntityLocation : Predicate<std::tuple<Entity, Location>> {
+  static const char* GLEAN_name() {
+    return "lsif.EntityLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct EntityLocation
+
+struct EntityUses : Predicate<std::tuple<Entity, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::Range>> {
+  static const char* GLEAN_name() {
+    return "lsif.EntityUses";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct EntityUses
+
+struct FileEntityXRefLocation : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::Range, Location, Entity>> {
+  static const char* GLEAN_name() {
+    return "lsif.FileEntityXRefLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct FileEntityXRefLocation
+
+struct ResolveLocation : Predicate<std::tuple<Location, Entity>> {
+  static const char* GLEAN_name() {
+    return "lsif.ResolveLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct ResolveLocation
+
+struct SearchByExactLocation : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Lsif::Types::RangeSpan, Entity>> {
+  static const char* GLEAN_name() {
+    return "lsif.SearchByExactLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct SearchByExactLocation
+
+struct SearchByExactLocationAndName : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, Fact<Name>, facebook::glean::cpp::schema::Lsif::Types::RangeSpan, Entity>> {
+  static const char* GLEAN_name() {
+    return "lsif.SearchByExactLocationAndName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct SearchByExactLocationAndName
+
+struct SearchByMoniker : Predicate<std::tuple<Fact<MonikerId>, Entity>> {
+  static const char* GLEAN_name() {
+    return "lsif.SearchByMoniker";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct SearchByMoniker
+
+struct SearchByName : Predicate<std::tuple<Fact<Name>, Entity>> {
+  static const char* GLEAN_name() {
+    return "lsif.SearchByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct SearchByName
+
+struct SearchNonLocalByLocation : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, Fact<Name>, Entity>> {
+  static const char* GLEAN_name() {
+    return "lsif.SearchNonLocalByLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct SearchNonLocalByLocation
+
+struct TagDefinition : Predicate<std::tuple<facebook::glean::cpp::schema::Lsif::Types::LanguageId, Fact<DefinitionMoniker>, Entity>> {
+  static const char* GLEAN_name() {
+    return "lsif.TagDefinition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct TagDefinition
+
+struct Document : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Lsif::Types::LanguageId>> {
+  static const char* GLEAN_name() {
+    return "lsif.Document";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct Document
+
+struct DefinitionUse : Predicate<std::tuple<Fact<Definition>, Fact<Document>, Fact<Range>>> {
+  static const char* GLEAN_name() {
+    return "lsif.DefinitionUse";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct DefinitionUse
+
+struct DefinitionMoniker : Predicate<std::tuple<Fact<Definition>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Moniker>>>>> {
+  static const char* GLEAN_name() {
+    return "lsif.DefinitionMoniker";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct DefinitionMoniker
+
+struct DefinitionLocation : Predicate<std::tuple<Fact<Definition>, Location>> {
+  static const char* GLEAN_name() {
+    return "lsif.DefinitionLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct DefinitionLocation
+
+struct DefinitionKind : Predicate<std::tuple<Fact<Definition>, facebook::glean::cpp::schema::Lsif::Types::SymbolKind>> {
+  static const char* GLEAN_name() {
+    return "lsif.DefinitionKind";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct DefinitionKind
+
+struct DefinitionHover : Predicate<std::tuple<Fact<Definition>, Fact<HoverContent>>> {
+  static const char* GLEAN_name() {
+    return "lsif.DefinitionHover";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct DefinitionHover
+
+struct Definition : Predicate<std::tuple<Fact<Document>, Fact<Range>>> {
+  static const char* GLEAN_name() {
+    return "lsif.Definition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct Definition
+
+struct Declaration : Predicate<std::tuple<Fact<Document>, Fact<Range>>> {
+  static const char* GLEAN_name() {
+    return "lsif.Declaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct Declaration
+
+} // namespace Lsif
+
+namespace Kotlin {
+
+namespace Alpha {
+
+struct VariableParent : Predicate<std::tuple<Fact<VariableDeclaration>, Fact<MethodDeclaration>>> {
+  static const char* GLEAN_name() {
+    return "kotlin.alpha.VariableParent";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct VariableParent
+
+struct VariableDeclaration : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::QName>, Fact<Type>, Fact<DeclarationLocation>>> {
+  static const char* GLEAN_name() {
+    return "kotlin.alpha.VariableDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct VariableDeclaration
+
+struct TypeArg : Predicate<std::tuple<Fact<Type>>> {
+  static const char* GLEAN_name() {
+    return "kotlin.alpha.TypeArg";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct TypeArg
+
+struct Type : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::Type>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<DeclarationLocation>>>, std::vector<Fact<TypeArg>>, bool>> {
+  static const char* GLEAN_name() {
+    return "kotlin.alpha.Type";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct Type
+
+struct DeclarationLocation : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "kotlin.alpha.DeclarationLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct DeclarationLocation
+
+} // namespace Alpha
+
+} // namespace Kotlin
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Kotlin::Alpha::Declaration> {
+  using Type = Sum<facebook::glean::cpp::schema::Kotlin::Alpha::ClassDeclaration, facebook::glean::cpp::schema::Kotlin::Alpha::MethodDeclaration, facebook::glean::cpp::schema::Kotlin::Alpha::VariableDeclaration>;
+};
+
+
+namespace schema {
+
+namespace Kotlin {
+
+namespace Alpha {
+
+struct Declaration {
+  boost::variant<Alt<0, Fact<ClassDeclaration>>, Alt<1, Fact<MethodDeclaration>>, Alt<2, Fact<VariableDeclaration>>> GLEAN_value;
+
+  static Declaration class_(const Fact<ClassDeclaration>& a) {
+    return Declaration{Alt<0, Fact<ClassDeclaration>>(a)};
+  }
+  static Declaration method(const Fact<MethodDeclaration>& a) {
+    return Declaration{Alt<1, Fact<MethodDeclaration>>(a)};
+  }
+  static Declaration variable(const Fact<VariableDeclaration>& a) {
+    return Declaration{Alt<2, Fact<VariableDeclaration>>(a)};
+  }
+
+  bool operator==(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Declaration>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Declaration
+
+struct DeclarationFileLocation : Predicate<std::tuple<Declaration, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan, std::string>> {
+  static const char* GLEAN_name() {
+    return "kotlin.alpha.DeclarationFileLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct DeclarationFileLocation
+
+struct ExtendsDeclaration : Predicate<std::tuple<Declaration, Declaration>> {
+  static const char* GLEAN_name() {
+    return "kotlin.alpha.ExtendsDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct ExtendsDeclaration
+
+struct FileDeclarations : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, Declaration>> {
+  static const char* GLEAN_name() {
+    return "kotlin.alpha.FileDeclarations";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct FileDeclarations
+
+struct MethodDeclaration : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::MethodName>, std::vector<Fact<VariableDeclaration>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Type>>>, facebook::glean::cpp::schema::Src::Loc, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<DeclarationLocation>>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Declaration>>>> {
+  static const char* GLEAN_name() {
+    return "kotlin.alpha.MethodDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct MethodDeclaration
+
+struct ParentDeclaration : Predicate<std::tuple<Declaration, Declaration>> {
+  static const char* GLEAN_name() {
+    return "kotlin.alpha.ParentDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct ParentDeclaration
+
+} // namespace Alpha
+
+} // namespace Kotlin
+
+namespace Search {
+
+namespace Kotlin {
+
+struct SearchByQName : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::QName>, facebook::glean::cpp::schema::Kotlin::Alpha::Declaration>> {
+  static const char* GLEAN_name() {
+    return "search.kotlin.SearchByQName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct SearchByQName
+
+} // namespace Kotlin
+
+} // namespace Search
+
+namespace Symbolid {
+
+namespace Kotlin {
+
+struct LookupDeclaration : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::QName>, facebook::glean::cpp::schema::Kotlin::Alpha::Declaration>> {
+  static const char* GLEAN_name() {
+    return "symbolid.kotlin.LookupDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct LookupDeclaration
+
+struct LookupMethodDeclaration : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::MethodName>, facebook::glean::cpp::schema::Kotlin::Alpha::Declaration>> {
+  static const char* GLEAN_name() {
+    return "symbolid.kotlin.LookupMethodDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct LookupMethodDeclaration
+
+} // namespace Kotlin
+
+} // namespace Symbolid
+
+namespace Kotlin {
+
+namespace Alpha {
+
+struct ContainsDeclaration : Predicate<std::tuple<Declaration, Declaration>> {
+  static const char* GLEAN_name() {
+    return "kotlin.alpha.ContainsDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct ContainsDeclaration
+
+struct ClassMember : Predicate<std::tuple<Fact<ClassDeclaration>, Fact<MethodDeclaration>>> {
+  static const char* GLEAN_name() {
+    return "kotlin.alpha.ClassMember";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct ClassMember
+
+struct ClassDeclaration : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::QName>, std::vector<Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::QName>>, Fact<DeclarationLocation>>> {
+  static const char* GLEAN_name() {
+    return "kotlin.alpha.ClassDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct ClassDeclaration
+
+} // namespace Alpha
+
+} // namespace Kotlin
+
+namespace Javakotlin {
+
+namespace Alpha {
+
+struct Type : Predicate<boost::variant<Alt<0, std::string>, Alt<1, Fact<Path>>, Alt<2, Fact<Type>>>> {
+  static const char* GLEAN_name() {
+    return "javakotlin.alpha.Type";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct Type
+
+struct QName : Predicate<std::tuple<Fact<Name>, Fact<Path>>> {
+  static const char* GLEAN_name() {
+    return "javakotlin.alpha.QName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct QName
+
+struct Path : Predicate<std::tuple<Fact<Name>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Path>>>>> {
+  static const char* GLEAN_name() {
+    return "javakotlin.alpha.Path";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct Path
+
+struct NameLowerCase : Predicate<std::tuple<std::string, Fact<Name>>> {
+  static const char* GLEAN_name() {
+    return "javakotlin.alpha.NameLowerCase";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct NameLowerCase
+
+struct Name : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "javakotlin.alpha.Name";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct Name
+
+struct MethodName : Predicate<std::tuple<Fact<QName>, std::vector<Fact<Type>>>> {
+  static const char* GLEAN_name() {
+    return "javakotlin.alpha.MethodName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct MethodName
+
+} // namespace Alpha
+
+} // namespace Javakotlin
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Java::Alpha::XRefTarget> {
+  using Type = Sum<facebook::glean::cpp::schema::Javakotlin::Alpha::QName, facebook::glean::cpp::schema::Javakotlin::Alpha::MethodName, facebook::glean::cpp::schema::Javakotlin::Alpha::MethodName, facebook::glean::cpp::schema::Javakotlin::Alpha::QName>;
+};
+
+
+namespace schema {
+
+namespace Java {
+
+namespace Alpha {
+
+struct XRefTarget {
+  boost::variant<Alt<0, Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::QName>>, Alt<1, Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::MethodName>>, Alt<2, Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::MethodName>>, Alt<3, Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::QName>>> GLEAN_value;
+
+  static XRefTarget definition_(const Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::QName>& a) {
+    return XRefTarget{Alt<0, Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::QName>>(a)};
+  }
+  static XRefTarget ctor_(const Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::MethodName>& a) {
+    return XRefTarget{Alt<1, Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::MethodName>>(a)};
+  }
+  static XRefTarget method_(const Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::MethodName>& a) {
+    return XRefTarget{Alt<2, Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::MethodName>>(a)};
+  }
+  static XRefTarget field_(const Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::QName>& a) {
+    return XRefTarget{Alt<3, Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::QName>>(a)};
+  }
+
+  bool operator==(const XRefTarget& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const XRefTarget& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const XRefTarget& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const XRefTarget& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const XRefTarget& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const XRefTarget& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<XRefTarget>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct XRefTarget
+
+struct XRefFile : Predicate<std::tuple<Fact<XRef>, Fact<facebook::glean::cpp::schema::Src::File>>> {
+  static const char* GLEAN_name() {
+    return "java.alpha.XRefFile";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct XRefFile
+
+struct XRef : Predicate<std::tuple<XRefTarget, std::vector<facebook::glean::cpp::schema::Src::ByteSpan>>> {
+  static const char* GLEAN_name() {
+    return "java.alpha.XRef";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct XRef
+
+} // namespace Alpha
+
+} // namespace Java
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Java::Alpha::Wildcard> {
+  using Type = Sum<facebook::glean::cpp::schema::Java::Alpha::Type, facebook::glean::cpp::schema::Java::Alpha::Type, Bool>;
+};
+
+
+namespace schema {
+
+namespace Java {
+
+namespace Alpha {
+
+struct Wildcard {
+  boost::variant<Alt<0, Fact<Type>>, Alt<1, Fact<Type>>, Alt<2, bool>> GLEAN_value;
+
+  static Wildcard extends_(const Fact<Type>& a) {
+    return Wildcard{Alt<0, Fact<Type>>(a)};
+  }
+  static Wildcard super_(const Fact<Type>& a) {
+    return Wildcard{Alt<1, Fact<Type>>(a)};
+  }
+  static Wildcard unbounded(const bool& a) {
+    return Wildcard{Alt<2, bool>(a)};
+  }
+
+  bool operator==(const Wildcard& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Wildcard& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Wildcard& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Wildcard& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Wildcard& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Wildcard& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Wildcard>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Wildcard
+
+struct TypeVar : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::Name>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "java.alpha.TypeVar";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct TypeVar
+
+struct TypeParam : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::Name>, std::vector<Fact<Type>>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "java.alpha.TypeParam";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct TypeParam
+
+struct TypeOfTypeArgs : Predicate<std::tuple<Fact<Type>, Fact<Type>>> {
+  static const char* GLEAN_name() {
+    return "java.alpha.TypeOfTypeArgs";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct TypeOfTypeArgs
+
+struct TypeArg : Predicate<boost::variant<Alt<0, Fact<Type>>, Alt<1, Wildcard>>> {
+  static const char* GLEAN_name() {
+    return "java.alpha.TypeArg";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct TypeArg
+
+struct PrimitiveType : Predicate<std::tuple<std::string>> {
+  static const char* GLEAN_name() {
+    return "java.alpha.PrimitiveType";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct PrimitiveType
+
+struct PackageDeclaration : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::Name>, std::vector<Fact<Annotation>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::Path>>>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "java.alpha.PackageDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct PackageDeclaration
+
+struct ObjectType : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::QName>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "java.alpha.ObjectType";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct ObjectType
+
+} // namespace Alpha
+
+} // namespace Java
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Java::Alpha::Modifier> {
+  using Type = Enum<12>;
+};
+
+
+namespace schema {
+
+namespace Java {
+
+namespace Alpha {
+
+enum class Modifier { abstract_, default_, final_, native_, private_, protected_, public_, static_, strictfp_, synchronized_, transient_, volatile_ };
+
+struct ParameterDeclaration : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::QName>, Fact<Type>, std::vector<Fact<Annotation>>, std::vector<Modifier>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "java.alpha.ParameterDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct ParameterDeclaration
+
+struct InterfaceInheritance : Predicate<std::tuple<Fact<Type>, Fact<ClassDeclaration>>> {
+  static const char* GLEAN_name() {
+    return "java.alpha.InterfaceInheritance";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct InterfaceInheritance
+
+struct Inheritance : Predicate<std::tuple<Fact<Type>, Fact<ClassDeclaration>>> {
+  static const char* GLEAN_name() {
+    return "java.alpha.Inheritance";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct Inheritance
+
+struct ImportDeclaration : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::Name>, bool, boost::variant<Alt<0, std::tuple<>>, Alt<1, std::string>>, Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::Path>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "java.alpha.ImportDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct ImportDeclaration
+
+struct FileXRefs : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, std::vector<Fact<XRef>>>> {
+  static const char* GLEAN_name() {
+    return "java.alpha.FileXRefs";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct FileXRefs
+
+} // namespace Alpha
+
+} // namespace Java
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Java::Alpha::ExecutableDefinition> {
+  using Type = Sum<facebook::glean::cpp::schema::Java::Alpha::ConstructorDeclaration, facebook::glean::cpp::schema::Java::Alpha::MethodDeclaration>;
+};
+
+
+namespace schema {
+
+namespace Java {
+
+namespace Alpha {
+
+struct ExecutableDefinition {
+  boost::variant<Alt<0, Fact<ConstructorDeclaration>>, Alt<1, Fact<MethodDeclaration>>> GLEAN_value;
+
+  static ExecutableDefinition constructor(const Fact<ConstructorDeclaration>& a) {
+    return ExecutableDefinition{Alt<0, Fact<ConstructorDeclaration>>(a)};
+  }
+  static ExecutableDefinition method(const Fact<MethodDeclaration>& a) {
+    return ExecutableDefinition{Alt<1, Fact<MethodDeclaration>>(a)};
+  }
+
+  bool operator==(const ExecutableDefinition& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const ExecutableDefinition& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const ExecutableDefinition& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const ExecutableDefinition& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const ExecutableDefinition& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const ExecutableDefinition& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<ExecutableDefinition>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct ExecutableDefinition
+
+struct ExecutableDefnLocation : Predicate<std::tuple<ExecutableDefinition, std::string, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "java.alpha.ExecutableDefnLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct ExecutableDefnLocation
+
+struct LocalDeclaration : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::QName>, Fact<Type>, std::vector<Fact<Annotation>>, std::vector<Modifier>, ExecutableDefinition, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "java.alpha.LocalDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct LocalDeclaration
+
+} // namespace Alpha
+
+} // namespace Java
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Java::Alpha::Definition> {
+  using Type = Sum<facebook::glean::cpp::schema::Java::Alpha::ClassDeclaration, facebook::glean::cpp::schema::Java::Alpha::InterfaceDeclaration, facebook::glean::cpp::schema::Java::Alpha::EnumDeclaration>;
+};
+
+
+namespace schema {
+
+namespace Java {
+
+namespace Alpha {
+
+struct Definition {
+  boost::variant<Alt<0, Fact<ClassDeclaration>>, Alt<1, Fact<InterfaceDeclaration>>, Alt<2, Fact<EnumDeclaration>>> GLEAN_value;
+
+  static Definition class_(const Fact<ClassDeclaration>& a) {
+    return Definition{Alt<0, Fact<ClassDeclaration>>(a)};
+  }
+  static Definition interface_(const Fact<InterfaceDeclaration>& a) {
+    return Definition{Alt<1, Fact<InterfaceDeclaration>>(a)};
+  }
+  static Definition enum_(const Fact<EnumDeclaration>& a) {
+    return Definition{Alt<2, Fact<EnumDeclaration>>(a)};
+  }
+
+  bool operator==(const Definition& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Definition& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Definition& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Definition& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Definition& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Definition& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Definition>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Definition
+
+struct DefinitionLocation : Predicate<std::tuple<Definition, std::string, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "java.alpha.DefinitionLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct DefinitionLocation
+
+struct EnumDeclaration : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::QName>, std::vector<Fact<Annotation>>, std::vector<Modifier>, std::vector<Fact<Type>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Definition>>, facebook::glean::cpp::schema::Src::ByteSpan, Fact<facebook::glean::cpp::schema::Src::File>>> {
+  static const char* GLEAN_name() {
+    return "java.alpha.EnumDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct EnumDeclaration
+
+struct FieldDeclaration : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::QName>, Fact<Type>, std::vector<Fact<Annotation>>, std::vector<Modifier>, Definition, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "java.alpha.FieldDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct FieldDeclaration
+
+struct InterfaceDeclaration : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::QName>, std::vector<Fact<Annotation>>, std::vector<Modifier>, std::vector<Fact<Type>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Definition>>, std::vector<Fact<TypeParam>>, facebook::glean::cpp::schema::Src::ByteSpan, Fact<facebook::glean::cpp::schema::Src::File>>> {
+  static const char* GLEAN_name() {
+    return "java.alpha.InterfaceDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct InterfaceDeclaration
+
+struct MethodDeclaration : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::MethodName>, std::vector<Fact<ParameterDeclaration>>, Fact<Type>, std::vector<Fact<Annotation>>, std::vector<Modifier>, std::vector<Fact<TypeParam>>, std::vector<Fact<Type>>, Definition, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "java.alpha.MethodDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct MethodDeclaration
+
+} // namespace Alpha
+
+} // namespace Java
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Java::Alpha::Declaration> {
+  using Type = Sum<facebook::glean::cpp::schema::Java::Alpha::ParameterDeclaration, facebook::glean::cpp::schema::Java::Alpha::LocalDeclaration, facebook::glean::cpp::schema::Java::Alpha::FieldDeclaration, facebook::glean::cpp::schema::Java::Alpha::ConstructorDeclaration, facebook::glean::cpp::schema::Java::Alpha::MethodDeclaration, facebook::glean::cpp::schema::Java::Alpha::InterfaceDeclaration, facebook::glean::cpp::schema::Java::Alpha::ClassDeclaration, facebook::glean::cpp::schema::Java::Alpha::EnumDeclaration>;
+};
+
+
+namespace schema {
+
+namespace Java {
+
+namespace Alpha {
+
+struct Declaration {
+  boost::variant<Alt<0, Fact<ParameterDeclaration>>, Alt<1, Fact<LocalDeclaration>>, Alt<2, Fact<FieldDeclaration>>, Alt<3, Fact<ConstructorDeclaration>>, Alt<4, Fact<MethodDeclaration>>, Alt<5, Fact<InterfaceDeclaration>>, Alt<6, Fact<ClassDeclaration>>, Alt<7, Fact<EnumDeclaration>>> GLEAN_value;
+
+  static Declaration param(const Fact<ParameterDeclaration>& a) {
+    return Declaration{Alt<0, Fact<ParameterDeclaration>>(a)};
+  }
+  static Declaration local(const Fact<LocalDeclaration>& a) {
+    return Declaration{Alt<1, Fact<LocalDeclaration>>(a)};
+  }
+  static Declaration field(const Fact<FieldDeclaration>& a) {
+    return Declaration{Alt<2, Fact<FieldDeclaration>>(a)};
+  }
+  static Declaration ctor(const Fact<ConstructorDeclaration>& a) {
+    return Declaration{Alt<3, Fact<ConstructorDeclaration>>(a)};
+  }
+  static Declaration method(const Fact<MethodDeclaration>& a) {
+    return Declaration{Alt<4, Fact<MethodDeclaration>>(a)};
+  }
+  static Declaration interface_(const Fact<InterfaceDeclaration>& a) {
+    return Declaration{Alt<5, Fact<InterfaceDeclaration>>(a)};
+  }
+  static Declaration class_(const Fact<ClassDeclaration>& a) {
+    return Declaration{Alt<6, Fact<ClassDeclaration>>(a)};
+  }
+  static Declaration enum_(const Fact<EnumDeclaration>& a) {
+    return Declaration{Alt<7, Fact<EnumDeclaration>>(a)};
+  }
+
+  bool operator==(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Declaration>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Declaration
+
+struct DeclarationAnnotations : Predicate<std::tuple<Declaration, std::vector<Fact<Annotation>>>> {
+  static const char* GLEAN_name() {
+    return "java.alpha.DeclarationAnnotations";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct DeclarationAnnotations
+
+struct DeclarationComment : Predicate<std::tuple<Declaration, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "java.alpha.DeclarationComment";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct DeclarationComment
+
+struct DeclarationLocation : Predicate<std::tuple<Declaration, std::string, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "java.alpha.DeclarationLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct DeclarationLocation
+
+struct DeclarationType : Predicate<std::tuple<Declaration, Fact<Type>>> {
+  static const char* GLEAN_name() {
+    return "java.alpha.DeclarationType";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct DeclarationType
+
+struct DeclarationUses : Predicate<std::tuple<Declaration, Fact<facebook::glean::cpp::schema::Src::File>, std::vector<facebook::glean::cpp::schema::Src::ByteSpan>>> {
+  static const char* GLEAN_name() {
+    return "java.alpha.DeclarationUses";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct DeclarationUses
+
+struct DeclarationXRefTarget : Predicate<std::tuple<Declaration, XRefTarget>> {
+  static const char* GLEAN_name() {
+    return "java.alpha.DeclarationXRefTarget";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct DeclarationXRefTarget
+
+struct ExtendedByDeclaration : Predicate<std::tuple<Declaration, Declaration>> {
+  static const char* GLEAN_name() {
+    return "java.alpha.ExtendedByDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct ExtendedByDeclaration
+
+struct ExtendsDeclaration : Predicate<std::tuple<Declaration, Declaration>> {
+  static const char* GLEAN_name() {
+    return "java.alpha.ExtendsDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct ExtendsDeclaration
+
+struct FileDeclarations : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, Declaration>> {
+  static const char* GLEAN_name() {
+    return "java.alpha.FileDeclarations";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct FileDeclarations
+
+struct ParentDeclaration : Predicate<std::tuple<Declaration, Declaration>> {
+  static const char* GLEAN_name() {
+    return "java.alpha.ParentDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct ParentDeclaration
+
+struct QNameToDefinition : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::QName>, Declaration>> {
+  static const char* GLEAN_name() {
+    return "java.alpha.QNameToDefinition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct QNameToDefinition
+
+struct XRefOfType : Predicate<std::tuple<Fact<Type>, Declaration, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "java.alpha.XRefOfType";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct XRefOfType
+
+struct XRefTargetDeclaration : Predicate<std::tuple<XRefTarget, Declaration>> {
+  static const char* GLEAN_name() {
+    return "java.alpha.XRefTargetDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct XRefTargetDeclaration
+
+} // namespace Alpha
+
+} // namespace Java
+
+namespace Search {
+
+namespace Java {
+
+struct SearchByQName : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::QName>, facebook::glean::cpp::schema::Java::Alpha::Declaration>> {
+  static const char* GLEAN_name() {
+    return "search.java.SearchByQName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct SearchByQName
+
+} // namespace Java
+
+} // namespace Search
+
+namespace Symbolid {
+
+namespace Java {
+
+struct LookupDeclaration : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::QName>, facebook::glean::cpp::schema::Java::Alpha::Declaration>> {
+  static const char* GLEAN_name() {
+    return "symbolid.java.LookupDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct LookupDeclaration
+
+struct LookupMethodDeclaration : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::MethodName>, facebook::glean::cpp::schema::Java::Alpha::Declaration>> {
+  static const char* GLEAN_name() {
+    return "symbolid.java.LookupMethodDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct LookupMethodDeclaration
+
+} // namespace Java
+
+} // namespace Symbolid
+
+namespace Java {
+
+namespace Alpha {
+
+struct DeclOfExecutableDefn : Predicate<std::tuple<ExecutableDefinition, Declaration>> {
+  static const char* GLEAN_name() {
+    return "java.alpha.DeclOfExecutableDefn";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct DeclOfExecutableDefn
+
+struct DeclOfDefn : Predicate<std::tuple<Definition, Declaration>> {
+  static const char* GLEAN_name() {
+    return "java.alpha.DeclOfDefn";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct DeclOfDefn
+
+struct ContainsDeclaration : Predicate<std::tuple<Declaration, Declaration>> {
+  static const char* GLEAN_name() {
+    return "java.alpha.ContainsDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct ContainsDeclaration
+
+struct ConstructorDeclaration : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::MethodName>, std::vector<Fact<ParameterDeclaration>>, std::vector<Fact<Annotation>>, std::vector<Modifier>, std::vector<Fact<TypeParam>>, std::vector<Fact<Type>>, Definition, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "java.alpha.ConstructorDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct ConstructorDeclaration
+
+struct ClassDeclaration : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::QName>, std::vector<Modifier>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Type>>>, std::vector<Fact<Type>>, std::vector<Fact<Annotation>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Definition>>, std::vector<Fact<TypeParam>>, facebook::glean::cpp::schema::Src::ByteSpan, Fact<facebook::glean::cpp::schema::Src::File>>> {
+  static const char* GLEAN_name() {
+    return "java.alpha.ClassDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct ClassDeclaration
+
+} // namespace Alpha
+
+} // namespace Java
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Java::Alpha::BaseType> {
+  using Type = Sum<facebook::glean::cpp::schema::Java::Alpha::ObjectType, facebook::glean::cpp::schema::Java::Alpha::PrimitiveType, facebook::glean::cpp::schema::Java::Alpha::TypeVar, facebook::glean::cpp::schema::Java::Alpha::ArrayType>;
+};
+
+
+namespace schema {
+
+namespace Java {
+
+namespace Alpha {
+
+struct BaseType {
+  boost::variant<Alt<0, Fact<ObjectType>>, Alt<1, Fact<PrimitiveType>>, Alt<2, Fact<TypeVar>>, Alt<3, Fact<ArrayType>>> GLEAN_value;
+
+  static BaseType object(const Fact<ObjectType>& a) {
+    return BaseType{Alt<0, Fact<ObjectType>>(a)};
+  }
+  static BaseType primitive(const Fact<PrimitiveType>& a) {
+    return BaseType{Alt<1, Fact<PrimitiveType>>(a)};
+  }
+  static BaseType variable(const Fact<TypeVar>& a) {
+    return BaseType{Alt<2, Fact<TypeVar>>(a)};
+  }
+  static BaseType array(const Fact<ArrayType>& a) {
+    return BaseType{Alt<3, Fact<ArrayType>>(a)};
+  }
+
+  bool operator==(const BaseType& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const BaseType& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const BaseType& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const BaseType& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const BaseType& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const BaseType& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<BaseType>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct BaseType
+
+struct Type : Predicate<std::tuple<BaseType, std::vector<Fact<TypeArg>>, Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::Type>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "java.alpha.Type";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct Type
+
+struct ArrayType : Predicate<std::tuple<Fact<Type>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "java.alpha.ArrayType";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct ArrayType
+
+struct Annotation : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::QName>, Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::MethodName>, boost::variant<Alt<0, std::tuple<>>, Alt<1, std::string>>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "java.alpha.Annotation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct Annotation
+
+struct AnnotatedClass : Predicate<std::tuple<Fact<Annotation>, Fact<ClassDeclaration>>> {
+  static const char* GLEAN_name() {
+    return "java.alpha.AnnotatedClass";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct AnnotatedClass
+
+} // namespace Alpha
+
+} // namespace Java
+
+namespace Indexer {
+
+struct Config : Predicate<std::string, std::string> {
+  static const char* GLEAN_name() {
+    return "indexer.Config";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct Config
+
+} // namespace Indexer
+
+namespace Hs {
+
+struct ValBind : Predicate<std::tuple<Fact<Name>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Type>>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<SigDecl>>>>> {
+  static const char* GLEAN_name() {
+    return "hs.ValBind";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct ValBind
+
+struct UnitName : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "hs.UnitName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct UnitName
+
+struct TypeSynDecl : Predicate<std::tuple<Fact<Name>>> {
+  static const char* GLEAN_name() {
+    return "hs.TypeSynDecl";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct TypeSynDecl
+
+struct TypeFamilyDecl : Predicate<std::tuple<Fact<Name>>> {
+  static const char* GLEAN_name() {
+    return "hs.TypeFamilyDecl";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct TypeFamilyDecl
+
+} // namespace Hs
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Hs::TypeArg> {
+  using Type = Tuple<Bool, facebook::glean::cpp::schema::Hs::Type>;
+};
+
+
+namespace schema {
+
+namespace Hs {
+
+struct TypeArg {
+  bool visible;
+  Fact<Type> ty;
+
+  bool operator==(const TypeArg& other) const {
+    return std::tie(visible,ty)
+             == std::tie(other.visible,other.ty);
+  }
+  bool operator!=(const TypeArg& other) const {
+    return std::tie(visible,ty)
+             != std::tie(other.visible,other.ty);
+  }
+  bool operator<(const TypeArg& other) const {
+    return std::tie(visible,ty)
+             < std::tie(other.visible,other.ty);
+  }
+  bool operator<=(const TypeArg& other) const {
+    return std::tie(visible,ty)
+             <= std::tie(other.visible,other.ty);
+  }
+  bool operator>(const TypeArg& other) const {
+    return std::tie(visible,ty)
+             > std::tie(other.visible,other.ty);
+  }
+  bool operator>=(const TypeArg& other) const {
+    return std::tie(visible,ty)
+             >= std::tie(other.visible,other.ty);
+  }
+  void outputRepr(Output<Repr<TypeArg>> out) const {
+    outputValue(out, std::make_tuple(visible, ty));
+  }
+}; // struct TypeArg
+
+struct TyVarBind : Predicate<std::tuple<Fact<Name>>> {
+  static const char* GLEAN_name() {
+    return "hs.TyVarBind";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct TyVarBind
+
+using TyVar = std::string;
+
+} // namespace Hs
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Hs::TupleSort> {
+  using Type = Enum<3>;
+};
+
+
+namespace schema {
+
+namespace Hs {
+
+enum class TupleSort { boxed, unboxed, constraint };
+
+} // namespace Hs
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Hs::TyConSort> {
+  using Type = Sum<Tuple<>, Tuple<Nat, Repr<facebook::glean::cpp::schema::Hs::TupleSort>>, Tuple<Nat>, Tuple<>>;
+};
+
+
+namespace schema {
+
+namespace Hs {
+
+struct TyConSort {
+  boost::variant<Alt<0, std::tuple<>>, Alt<1, std::tuple<uint64_t, TupleSort>>, Alt<2, std::tuple<uint64_t>>, Alt<3, std::tuple<>>> GLEAN_value;
+
+  static TyConSort normal() {
+    return TyConSort{Alt<0, std::tuple<>>(std::make_tuple())};
+  }
+  static TyConSort tuple(const uint64_t& arity, const TupleSort& sort) {
+    return TyConSort{Alt<1, std::tuple<uint64_t, TupleSort>>(std::make_tuple(arity, sort))};
+  }
+  static TyConSort sum(const uint64_t& arity) {
+    return TyConSort{Alt<2, std::tuple<uint64_t>>(std::make_tuple(arity))};
+  }
+  static TyConSort equality() {
+    return TyConSort{Alt<3, std::tuple<>>(std::make_tuple())};
+  }
+
+  bool operator==(const TyConSort& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const TyConSort& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const TyConSort& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const TyConSort& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const TyConSort& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const TyConSort& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<TyConSort>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct TyConSort
+
+struct TyCon : Predicate<std::tuple<Fact<Name>, TyConSort, bool>> {
+  static const char* GLEAN_name() {
+    return "hs.TyCon";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct TyCon
+
+} // namespace Hs
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Hs::Specificity> {
+  using Type = Enum<2>;
+};
+
+
+namespace schema {
+
+namespace Hs {
+
+enum class Specificity { inferred, specified };
+
+struct SourceModule : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, Fact<Module>>> {
+  static const char* GLEAN_name() {
+    return "hs.SourceModule";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct SourceModule
+
+struct SigDecl : Predicate<std::tuple<Fact<Name>, facebook::glean::cpp::schema::Src::FileLocation>> {
+  static const char* GLEAN_name() {
+    return "hs.SigDecl";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct SigDecl
+
+} // namespace Hs
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Hs::RefTarget> {
+  using Type = Sum<facebook::glean::cpp::schema::Hs::Name, facebook::glean::cpp::schema::Hs::ModuleName>;
+};
+
+
+namespace schema {
+
+namespace Hs {
+
+struct RefTarget {
+  boost::variant<Alt<0, Fact<Name>>, Alt<1, Fact<ModuleName>>> GLEAN_value;
+
+  static RefTarget name(const Fact<Name>& a) {
+    return RefTarget{Alt<0, Fact<Name>>(a)};
+  }
+  static RefTarget modName(const Fact<ModuleName>& a) {
+    return RefTarget{Alt<1, Fact<ModuleName>>(a)};
+  }
+
+  bool operator==(const RefTarget& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const RefTarget& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const RefTarget& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const RefTarget& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const RefTarget& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const RefTarget& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<RefTarget>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct RefTarget
+
+} // namespace Hs
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Hs::RefKind> {
+  using Type = Enum<5>;
+};
+
+
+namespace schema {
+
+namespace Hs {
+
+enum class RefKind { importref, exportref, coderef, tydecl, instbind };
+
+} // namespace Hs
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Hs::RefSpan> {
+  using Type = Tuple<Repr<facebook::glean::cpp::schema::Hs::RefKind>, Repr<facebook::glean::cpp::schema::Src::ByteSpan>>;
+};
+
+
+namespace schema {
+
+namespace Hs {
+
+struct RefSpan {
+  RefKind kind;
+  facebook::glean::cpp::schema::Src::ByteSpan span;
+
+  bool operator==(const RefSpan& other) const {
+    return std::tie(kind,span)
+             == std::tie(other.kind,other.span);
+  }
+  bool operator!=(const RefSpan& other) const {
+    return std::tie(kind,span)
+             != std::tie(other.kind,other.span);
+  }
+  bool operator<(const RefSpan& other) const {
+    return std::tie(kind,span)
+             < std::tie(other.kind,other.span);
+  }
+  bool operator<=(const RefSpan& other) const {
+    return std::tie(kind,span)
+             <= std::tie(other.kind,other.span);
+  }
+  bool operator>(const RefSpan& other) const {
+    return std::tie(kind,span)
+             > std::tie(other.kind,other.span);
+  }
+  bool operator>=(const RefSpan& other) const {
+    return std::tie(kind,span)
+             >= std::tie(other.kind,other.span);
+  }
+  void outputRepr(Output<Repr<RefSpan>> out) const {
+    outputValue(out, std::make_tuple(kind, span));
+  }
+}; // struct RefSpan
+
+struct XRef : Predicate<std::tuple<RefTarget, Fact<facebook::glean::cpp::schema::Src::File>, std::vector<RefSpan>>> {
+  static const char* GLEAN_name() {
+    return "hs.XRef";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct XRef
+
+struct RecordFieldDecl : Predicate<std::tuple<Fact<Name>, Fact<Name>>> {
+  static const char* GLEAN_name() {
+    return "hs.RecordFieldDecl";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct RecordFieldDecl
+
+struct PatSynDecl : Predicate<std::tuple<Fact<Name>>> {
+  static const char* GLEAN_name() {
+    return "hs.PatSynDecl";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct PatSynDecl
+
+struct PatBind : Predicate<std::tuple<Fact<Name>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Type>>>>> {
+  static const char* GLEAN_name() {
+    return "hs.PatBind";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct PatBind
+
+struct OccNameLowerCase : Predicate<std::tuple<std::string, Fact<OccName>>> {
+  static const char* GLEAN_name() {
+    return "hs.OccNameLowerCase";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct OccNameLowerCase
+
+} // namespace Hs
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Hs::Namespace> {
+  using Type = Enum<4>;
+};
+
+
+namespace schema {
+
+namespace Hs {
+
+enum class Namespace { var_, datacon, tyvar, tycon };
+
+struct OccName : Predicate<std::tuple<std::string, Namespace>> {
+  static const char* GLEAN_name() {
+    return "hs.OccName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct OccName
+
+} // namespace Hs
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Hs::NameSort> {
+  using Type = Sum<Tuple<>, Repr<facebook::glean::cpp::schema::Src::ByteSpan>>;
+};
+
+
+namespace schema {
+
+namespace Hs {
+
+struct NameSort {
+  boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Src::ByteSpan>> GLEAN_value;
+
+  static NameSort external() {
+    return NameSort{Alt<0, std::tuple<>>(std::make_tuple())};
+  }
+  static NameSort internal(const facebook::glean::cpp::schema::Src::ByteSpan& a) {
+    return NameSort{Alt<1, facebook::glean::cpp::schema::Src::ByteSpan>(a)};
+  }
+
+  bool operator==(const NameSort& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const NameSort& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const NameSort& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const NameSort& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const NameSort& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const NameSort& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<NameSort>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct NameSort
+
+struct Name : Predicate<std::tuple<Fact<OccName>, Fact<Module>, NameSort>> {
+  static const char* GLEAN_name() {
+    return "hs.Name";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct Name
+
+struct ModuleSource : Predicate<std::tuple<Fact<Module>, Fact<facebook::glean::cpp::schema::Src::File>>> {
+  static const char* GLEAN_name() {
+    return "hs.ModuleSource";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct ModuleSource
+
+struct ModuleName : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "hs.ModuleName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct ModuleName
+
+struct ModuleDeclarations : Predicate<std::tuple<Fact<Module>, std::set<Fact<Name>>, std::set<Fact<Name>>>> {
+  static const char* GLEAN_name() {
+    return "hs.ModuleDeclarations";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct ModuleDeclarations
+
+struct Module : Predicate<std::tuple<Fact<ModuleName>, Fact<UnitName>>> {
+  static const char* GLEAN_name() {
+    return "hs.Module";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct Module
+
+struct MethDecl : Predicate<std::tuple<Fact<Name>, Fact<Name>>> {
+  static const char* GLEAN_name() {
+    return "hs.MethDecl";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct MethDecl
+
+struct LitType : Predicate<boost::variant<Alt<0, uint64_t>, Alt<1, std::string>, Alt<2, uint64_t>>> {
+  static const char* GLEAN_name() {
+    return "hs.LitType";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct LitType
+
+struct InstanceDecl : Predicate<std::tuple<std::vector<Fact<InstanceBind>>, facebook::glean::cpp::schema::Src::FileLocation>> {
+  static const char* GLEAN_name() {
+    return "hs.InstanceDecl";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct InstanceDecl
+
+struct InstanceBindToDecl : Predicate<std::tuple<Fact<InstanceBind>, boost::variant<Alt<0, Fact<InstanceDecl>>, Alt<1, Fact<ClassDecl>>>>> {
+  static const char* GLEAN_name() {
+    return "hs.InstanceBindToDecl";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct InstanceBindToDecl
+
+struct InstanceBind : Predicate<std::tuple<Fact<Name>, facebook::glean::cpp::schema::Src::FileLocation>> {
+  static const char* GLEAN_name() {
+    return "hs.InstanceBind";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct InstanceBind
+
+struct FileXRefs : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, std::vector<Fact<XRef>>>> {
+  static const char* GLEAN_name() {
+    return "hs.FileXRefs";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct FileXRefs
+
+struct DeclarationLocation : Predicate<std::tuple<Fact<Name>, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "hs.DeclarationLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct DeclarationLocation
+
+} // namespace Hs
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Hs::Declaration> {
+  using Type = Sum<facebook::glean::cpp::schema::Hs::ValBind, facebook::glean::cpp::schema::Hs::TypeFamilyDecl, facebook::glean::cpp::schema::Hs::TypeSynDecl, facebook::glean::cpp::schema::Hs::DataDecl, facebook::glean::cpp::schema::Hs::ConstrDecl, facebook::glean::cpp::schema::Hs::PatSynDecl, facebook::glean::cpp::schema::Hs::ClassDecl, facebook::glean::cpp::schema::Hs::MethDecl, facebook::glean::cpp::schema::Hs::InstanceDecl, facebook::glean::cpp::schema::Hs::PatBind, facebook::glean::cpp::schema::Hs::TyVarBind, facebook::glean::cpp::schema::Hs::RecordFieldDecl, facebook::glean::cpp::schema::Hs::SigDecl>;
+};
+
+
+namespace schema {
+
+namespace Hs {
+
+struct Declaration {
+  boost::variant<Alt<0, Fact<ValBind>>, Alt<1, Fact<TypeFamilyDecl>>, Alt<2, Fact<TypeSynDecl>>, Alt<3, Fact<DataDecl>>, Alt<4, Fact<ConstrDecl>>, Alt<5, Fact<PatSynDecl>>, Alt<6, Fact<ClassDecl>>, Alt<7, Fact<MethDecl>>, Alt<8, Fact<InstanceDecl>>, Alt<9, Fact<PatBind>>, Alt<10, Fact<TyVarBind>>, Alt<11, Fact<RecordFieldDecl>>, Alt<12, Fact<SigDecl>>> GLEAN_value;
+
+  static Declaration val(const Fact<ValBind>& a) {
+    return Declaration{Alt<0, Fact<ValBind>>(a)};
+  }
+  static Declaration typeFamily(const Fact<TypeFamilyDecl>& a) {
+    return Declaration{Alt<1, Fact<TypeFamilyDecl>>(a)};
+  }
+  static Declaration type_(const Fact<TypeSynDecl>& a) {
+    return Declaration{Alt<2, Fact<TypeSynDecl>>(a)};
+  }
+  static Declaration data(const Fact<DataDecl>& a) {
+    return Declaration{Alt<3, Fact<DataDecl>>(a)};
+  }
+  static Declaration con(const Fact<ConstrDecl>& a) {
+    return Declaration{Alt<4, Fact<ConstrDecl>>(a)};
+  }
+  static Declaration patSyn(const Fact<PatSynDecl>& a) {
+    return Declaration{Alt<5, Fact<PatSynDecl>>(a)};
+  }
+  static Declaration class_(const Fact<ClassDecl>& a) {
+    return Declaration{Alt<6, Fact<ClassDecl>>(a)};
+  }
+  static Declaration method(const Fact<MethDecl>& a) {
+    return Declaration{Alt<7, Fact<MethDecl>>(a)};
+  }
+  static Declaration instance(const Fact<InstanceDecl>& a) {
+    return Declaration{Alt<8, Fact<InstanceDecl>>(a)};
+  }
+  static Declaration patBind(const Fact<PatBind>& a) {
+    return Declaration{Alt<9, Fact<PatBind>>(a)};
+  }
+  static Declaration tyVarBind(const Fact<TyVarBind>& a) {
+    return Declaration{Alt<10, Fact<TyVarBind>>(a)};
+  }
+  static Declaration field(const Fact<RecordFieldDecl>& a) {
+    return Declaration{Alt<11, Fact<RecordFieldDecl>>(a)};
+  }
+  static Declaration sig(const Fact<SigDecl>& a) {
+    return Declaration{Alt<12, Fact<SigDecl>>(a)};
+  }
+
+  bool operator==(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Declaration>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Declaration
+
+struct DeclarationOfName : Predicate<std::tuple<Fact<Name>, Declaration>> {
+  static const char* GLEAN_name() {
+    return "hs.DeclarationOfName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct DeclarationOfName
+
+struct DeclarationSpan : Predicate<std::tuple<Declaration, facebook::glean::cpp::schema::Src::FileLocation>> {
+  static const char* GLEAN_name() {
+    return "hs.DeclarationSpan";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct DeclarationSpan
+
+struct DataDecl : Predicate<std::tuple<Fact<Name>, std::vector<Fact<ConstrDecl>>>> {
+  static const char* GLEAN_name() {
+    return "hs.DataDecl";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct DataDecl
+
+struct ConstrDecl : Predicate<std::tuple<Fact<Name>, Fact<Name>, std::vector<Fact<RecordFieldDecl>>>> {
+  static const char* GLEAN_name() {
+    return "hs.ConstrDecl";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct ConstrDecl
+
+struct ClassDecl : Predicate<std::tuple<Fact<Name>, std::vector<Fact<MethDecl>>, std::vector<Fact<InstanceBind>>>> {
+  static const char* GLEAN_name() {
+    return "hs.ClassDecl";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct ClassDecl
+
+} // namespace Hs
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Hs::ArgFlag> {
+  using Type = Sum<Repr<facebook::glean::cpp::schema::Hs::Specificity>, Tuple<>>;
+};
+
+
+namespace schema {
+
+namespace Hs {
+
+struct ArgFlag {
+  boost::variant<Alt<0, Specificity>, Alt<1, std::tuple<>>> GLEAN_value;
+
+  static ArgFlag invisible(const Specificity& a) {
+    return ArgFlag{Alt<0, Specificity>(a)};
+  }
+  static ArgFlag requird() {
+    return ArgFlag{Alt<1, std::tuple<>>(std::make_tuple())};
+  }
+
+  bool operator==(const ArgFlag& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const ArgFlag& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const ArgFlag& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const ArgFlag& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const ArgFlag& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const ArgFlag& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<ArgFlag>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct ArgFlag
+
+struct Type : Predicate<boost::variant<Alt<0, TyVar>, Alt<1, std::tuple<Fact<Type>, std::vector<TypeArg>>>, Alt<2, std::tuple<Fact<TyCon>, std::vector<TypeArg>>>, Alt<3, std::tuple<TyVar, Fact<Type>, ArgFlag, Fact<Type>>>, Alt<4, std::tuple<Fact<Type>, Fact<Type>, Fact<Type>>>, Alt<5, std::tuple<Fact<Type>, Fact<Type>>>, Alt<6, Fact<LitType>>, Alt<7, Fact<Type>>, Alt<8, std::tuple<>>>> {
+  static const char* GLEAN_name() {
+    return "hs.Type";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct Type
+
+} // namespace Hs
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Hack::Visibility> {
+  using Type = Enum<4>;
+};
+
+
+namespace schema {
+
+namespace Hack {
+
+enum class Visibility { Private, Protected, Public, Internal };
+
+} // namespace Hack
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Hack::Variance> {
+  using Type = Enum<3>;
+};
+
+
+namespace schema {
+
+namespace Hack {
+
+enum class Variance { Contravariant, Covariant, Invariant };
+
+struct UserAttribute : Predicate<std::tuple<Fact<Name>, std::vector<std::string>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<QName>>>>> {
+  static const char* GLEAN_name() {
+    return "hack.UserAttribute";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct UserAttribute
+
+struct TypedefDeclaration : Predicate<std::tuple<Fact<QName>>> {
+  static const char* GLEAN_name() {
+    return "hack.TypedefDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct TypedefDeclaration
+
+} // namespace Hack
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Hack::TypeConstKind> {
+  using Type = Enum<3>;
+};
+
+
+namespace schema {
+
+namespace Hack {
+
+enum class TypeConstKind { Abstract, Concrete, PartiallyAbstract };
+
+struct TypeConstDefinition : Predicate<std::tuple<Fact<TypeConstDeclaration>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Type>>>, TypeConstKind, std::vector<Fact<UserAttribute>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<TypeInfo>>>>> {
+  static const char* GLEAN_name() {
+    return "hack.TypeConstDefinition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct TypeConstDefinition
+
+struct Type : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "hack.Type";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct Type
+
+struct TraitDeclaration : Predicate<std::tuple<Fact<QName>>> {
+  static const char* GLEAN_name() {
+    return "hack.TraitDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct TraitDeclaration
+
+struct StringLiteral : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "hack.StringLiteral";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct StringLiteral
+
+struct SearchTypedefByLowerCaseName : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "hack.SearchTypedefByLowerCaseName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct SearchTypedefByLowerCaseName
+
+struct SearchTypeConstByLowerCaseName : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "hack.SearchTypeConstByLowerCaseName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct SearchTypeConstByLowerCaseName
+
+struct SearchTraitByLowerCaseName : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "hack.SearchTraitByLowerCaseName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct SearchTraitByLowerCaseName
+
+struct SearchPropertyByLowerCaseName : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "hack.SearchPropertyByLowerCaseName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct SearchPropertyByLowerCaseName
+
+struct SearchNamespaceByLowerCaseName : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "hack.SearchNamespaceByLowerCaseName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct SearchNamespaceByLowerCaseName
+
+struct SearchModuleByLowerCaseName : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "hack.SearchModuleByLowerCaseName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct SearchModuleByLowerCaseName
+
+struct SearchMethodByLowerCaseName : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "hack.SearchMethodByLowerCaseName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct SearchMethodByLowerCaseName
+
+struct SearchInterfaceByLowerCaseName : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "hack.SearchInterfaceByLowerCaseName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct SearchInterfaceByLowerCaseName
+
+struct SearchGlobalConstByLowerCaseName : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "hack.SearchGlobalConstByLowerCaseName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct SearchGlobalConstByLowerCaseName
+
+struct SearchFunctionByLowerCaseName : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "hack.SearchFunctionByLowerCaseName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct SearchFunctionByLowerCaseName
+
+struct SearchEnumeratorByLowerCaseName : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "hack.SearchEnumeratorByLowerCaseName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct SearchEnumeratorByLowerCaseName
+
+struct SearchEnumByLowerCaseName : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "hack.SearchEnumByLowerCaseName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct SearchEnumByLowerCaseName
+
+struct SearchClassConstByLowerCaseName : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "hack.SearchClassConstByLowerCaseName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct SearchClassConstByLowerCaseName
+
+struct SearchClassByLowerCaseName : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "hack.SearchClassByLowerCaseName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct SearchClassByLowerCaseName
+
+} // namespace Hack
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Hack::ReifyKind> {
+  using Type = Enum<3>;
+};
+
+
+namespace schema {
+
+namespace Hack {
+
+enum class ReifyKind { Erased, Reified, SoftReified };
+
+} // namespace Hack
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Hack::ReadonlyKind> {
+  using Type = Enum<1>;
+};
+
+
+namespace schema {
+
+namespace Hack {
+
+enum class ReadonlyKind { Readonly };
+
+struct QName : Predicate<std::tuple<Fact<Name>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<NamespaceQName>>>>> {
+  static const char* GLEAN_name() {
+    return "hack.QName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct QName
+
+struct PropertyDefinition : Predicate<std::tuple<Fact<PropertyDeclaration>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Type>>>, Visibility, bool, bool, bool, std::vector<Fact<UserAttribute>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<TypeInfo>>>>> {
+  static const char* GLEAN_name() {
+    return "hack.PropertyDefinition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct PropertyDefinition
+
+} // namespace Hack
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Hack::Parameter> {
+  using Type = Tuple<facebook::glean::cpp::schema::Hack::Name, Maybe<facebook::glean::cpp::schema::Hack::Type>, Bool, Bool, Maybe<String>, Array<facebook::glean::cpp::schema::Hack::UserAttribute>, Maybe<facebook::glean::cpp::schema::Hack::TypeInfo>, Maybe<Repr<facebook::glean::cpp::schema::Hack::ReadonlyKind>>>;
+};
+
+
+namespace schema {
+
+namespace Hack {
+
+struct Parameter {
+  Fact<Name> name;
+  boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Type>>> type;
+  bool isInout;
+  bool isVariadic;
+  boost::variant<Alt<0, std::tuple<>>, Alt<1, std::string>> defaultValue;
+  std::vector<Fact<UserAttribute>> attributes;
+  boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<TypeInfo>>> typeInfo;
+  boost::variant<Alt<0, std::tuple<>>, Alt<1, ReadonlyKind>> readonly;
+
+  bool operator==(const Parameter& other) const {
+    return std::tie(name,type,isInout,isVariadic,defaultValue,attributes,typeInfo,readonly)
+             == std::tie(other.name,other.type,other.isInout,other.isVariadic,other.defaultValue,other.attributes,other.typeInfo,other.readonly);
+  }
+  bool operator!=(const Parameter& other) const {
+    return std::tie(name,type,isInout,isVariadic,defaultValue,attributes,typeInfo,readonly)
+             != std::tie(other.name,other.type,other.isInout,other.isVariadic,other.defaultValue,other.attributes,other.typeInfo,other.readonly);
+  }
+  bool operator<(const Parameter& other) const {
+    return std::tie(name,type,isInout,isVariadic,defaultValue,attributes,typeInfo,readonly)
+             < std::tie(other.name,other.type,other.isInout,other.isVariadic,other.defaultValue,other.attributes,other.typeInfo,other.readonly);
+  }
+  bool operator<=(const Parameter& other) const {
+    return std::tie(name,type,isInout,isVariadic,defaultValue,attributes,typeInfo,readonly)
+             <= std::tie(other.name,other.type,other.isInout,other.isVariadic,other.defaultValue,other.attributes,other.typeInfo,other.readonly);
+  }
+  bool operator>(const Parameter& other) const {
+    return std::tie(name,type,isInout,isVariadic,defaultValue,attributes,typeInfo,readonly)
+             > std::tie(other.name,other.type,other.isInout,other.isVariadic,other.defaultValue,other.attributes,other.typeInfo,other.readonly);
+  }
+  bool operator>=(const Parameter& other) const {
+    return std::tie(name,type,isInout,isVariadic,defaultValue,attributes,typeInfo,readonly)
+             >= std::tie(other.name,other.type,other.isInout,other.isVariadic,other.defaultValue,other.attributes,other.typeInfo,other.readonly);
+  }
+  void outputRepr(Output<Repr<Parameter>> out) const {
+    outputValue(out, std::make_tuple(name, type, isInout, isVariadic, defaultValue, attributes, typeInfo, readonly));
+  }
+}; // struct Parameter
+
+struct Signature : Predicate<std::tuple<boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Type>>>, std::vector<Parameter>, boost::variant<Alt<0, std::tuple<>>, Alt<1, std::vector<Fact<Context_>>>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<TypeInfo>>>>> {
+  static const char* GLEAN_name() {
+    return "hack.Signature";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct Signature
+
+} // namespace Hack
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Hack::Occurrence> {
+  using Type = Sum<facebook::glean::cpp::schema::Hack::MethodOccurrence>;
+};
+
+
+namespace schema {
+
+namespace Hack {
+
+struct Occurrence {
+  boost::variant<Alt<0, Fact<MethodOccurrence>>> GLEAN_value;
+
+  static Occurrence method(const Fact<MethodOccurrence>& a) {
+    return Occurrence{Alt<0, Fact<MethodOccurrence>>(a)};
+  }
+
+  bool operator==(const Occurrence& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Occurrence& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Occurrence& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Occurrence& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Occurrence& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Occurrence& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Occurrence>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Occurrence
+
+struct NamespaceQName : Predicate<std::tuple<Fact<Name>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<NamespaceQName>>>>> {
+  static const char* GLEAN_name() {
+    return "hack.NamespaceQName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct NamespaceQName
+
+struct NamespaceDeclaration : Predicate<std::tuple<Fact<NamespaceQName>>> {
+  static const char* GLEAN_name() {
+    return "hack.NamespaceDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct NamespaceDeclaration
+
+struct NameLowerCase : Predicate<std::tuple<std::string, Fact<Name>>> {
+  static const char* GLEAN_name() {
+    return "hack.NameLowerCase";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct NameLowerCase
+
+struct Name : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "hack.Name";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct Name
+
+} // namespace Hack
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Hack::ModuleMembership> {
+  using Type = Tuple<facebook::glean::cpp::schema::Hack::ModuleDeclaration, Bool>;
+};
+
+
+namespace schema {
+
+namespace Hack {
+
+struct ModuleMembership {
+  Fact<ModuleDeclaration> declaration;
+  bool internal;
+
+  bool operator==(const ModuleMembership& other) const {
+    return std::tie(declaration,internal)
+             == std::tie(other.declaration,other.internal);
+  }
+  bool operator!=(const ModuleMembership& other) const {
+    return std::tie(declaration,internal)
+             != std::tie(other.declaration,other.internal);
+  }
+  bool operator<(const ModuleMembership& other) const {
+    return std::tie(declaration,internal)
+             < std::tie(other.declaration,other.internal);
+  }
+  bool operator<=(const ModuleMembership& other) const {
+    return std::tie(declaration,internal)
+             <= std::tie(other.declaration,other.internal);
+  }
+  bool operator>(const ModuleMembership& other) const {
+    return std::tie(declaration,internal)
+             > std::tie(other.declaration,other.internal);
+  }
+  bool operator>=(const ModuleMembership& other) const {
+    return std::tie(declaration,internal)
+             >= std::tie(other.declaration,other.internal);
+  }
+  void outputRepr(Output<Repr<ModuleMembership>> out) const {
+    outputValue(out, std::make_tuple(declaration, internal));
+  }
+}; // struct ModuleMembership
+
+struct ModuleDefinition : Predicate<std::tuple<Fact<ModuleDeclaration>, std::vector<Fact<UserAttribute>>>> {
+  static const char* GLEAN_name() {
+    return "hack.ModuleDefinition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct ModuleDefinition
+
+struct ModuleDeclaration : Predicate<std::tuple<Fact<Name>>> {
+  static const char* GLEAN_name() {
+    return "hack.ModuleDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct ModuleDeclaration
+
+struct MethodOverrides : Predicate<std::tuple<Fact<MethodDeclaration>, Fact<MethodDeclaration>, boost::variant<Alt<0, std::tuple<>>, Alt<1, bool>>>> {
+  static const char* GLEAN_name() {
+    return "hack.MethodOverrides";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct MethodOverrides
+
+struct MethodOverridden : Predicate<std::tuple<Fact<MethodDeclaration>, Fact<MethodDeclaration>, boost::variant<Alt<0, std::tuple<>>, Alt<1, bool>>>> {
+  static const char* GLEAN_name() {
+    return "hack.MethodOverridden";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct MethodOverridden
+
+struct MethodOccurrence : Predicate<std::tuple<Fact<Name>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Name>>>>> {
+  static const char* GLEAN_name() {
+    return "hack.MethodOccurrence";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct MethodOccurrence
+
+struct InterfaceDeclaration : Predicate<std::tuple<Fact<QName>>> {
+  static const char* GLEAN_name() {
+    return "hack.InterfaceDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct InterfaceDeclaration
+
+struct IndexerInputsHash : Predicate<std::string, std::vector<uint8_t>> {
+  static const char* GLEAN_name() {
+    return "hack.IndexerInputsHash";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct IndexerInputsHash
+
+struct GlobalNamespaceAlias : Predicate<std::tuple<Fact<Name>, Fact<NamespaceQName>>> {
+  static const char* GLEAN_name() {
+    return "hack.GlobalNamespaceAlias";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct GlobalNamespaceAlias
+
+struct GlobalConstDefinition : Predicate<std::tuple<Fact<GlobalConstDeclaration>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Type>>>, std::string, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<TypeInfo>>>>> {
+  static const char* GLEAN_name() {
+    return "hack.GlobalConstDefinition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct GlobalConstDefinition
+
+struct GlobalConstDeclaration : Predicate<std::tuple<Fact<QName>>> {
+  static const char* GLEAN_name() {
+    return "hack.GlobalConstDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct GlobalConstDeclaration
+
+struct FunctionDeclaration : Predicate<std::tuple<Fact<QName>>> {
+  static const char* GLEAN_name() {
+    return "hack.FunctionDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct FunctionDeclaration
+
+} // namespace Hack
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Hack::FieldClassConst> {
+  using Type = Tuple<facebook::glean::cpp::schema::Hack::QName, facebook::glean::cpp::schema::Hack::Name>;
+};
+
+
+namespace schema {
+
+namespace Hack {
+
+struct FieldClassConst {
+  Fact<QName> container;
+  Fact<Name> name;
+
+  bool operator==(const FieldClassConst& other) const {
+    return std::tie(container,name)
+             == std::tie(other.container,other.name);
+  }
+  bool operator!=(const FieldClassConst& other) const {
+    return std::tie(container,name)
+             != std::tie(other.container,other.name);
+  }
+  bool operator<(const FieldClassConst& other) const {
+    return std::tie(container,name)
+             < std::tie(other.container,other.name);
+  }
+  bool operator<=(const FieldClassConst& other) const {
+    return std::tie(container,name)
+             <= std::tie(other.container,other.name);
+  }
+  bool operator>(const FieldClassConst& other) const {
+    return std::tie(container,name)
+             > std::tie(other.container,other.name);
+  }
+  bool operator>=(const FieldClassConst& other) const {
+    return std::tie(container,name)
+             >= std::tie(other.container,other.name);
+  }
+  void outputRepr(Output<Repr<FieldClassConst>> out) const {
+    outputValue(out, std::make_tuple(container, name));
+  }
+}; // struct FieldClassConst
+
+} // namespace Hack
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Hack::ShapeKV> {
+  using Type = Tuple<Sum<String, String, Repr<facebook::glean::cpp::schema::Hack::FieldClassConst>>, facebook::glean::cpp::schema::Hack::Hint, Bool>;
+};
+
+
+namespace schema {
+
+namespace Hack {
+
+struct ShapeKV {
+  boost::variant<Alt<0, std::string>, Alt<1, std::string>, Alt<2, FieldClassConst>> key;
+  Fact<Hint> value;
+  bool opt;
+
+  bool operator==(const ShapeKV& other) const {
+    return std::tie(key,value,opt)
+             == std::tie(other.key,other.value,other.opt);
+  }
+  bool operator!=(const ShapeKV& other) const {
+    return std::tie(key,value,opt)
+             != std::tie(other.key,other.value,other.opt);
+  }
+  bool operator<(const ShapeKV& other) const {
+    return std::tie(key,value,opt)
+             < std::tie(other.key,other.value,other.opt);
+  }
+  bool operator<=(const ShapeKV& other) const {
+    return std::tie(key,value,opt)
+             <= std::tie(other.key,other.value,other.opt);
+  }
+  bool operator>(const ShapeKV& other) const {
+    return std::tie(key,value,opt)
+             > std::tie(other.key,other.value,other.opt);
+  }
+  bool operator>=(const ShapeKV& other) const {
+    return std::tie(key,value,opt)
+             >= std::tie(other.key,other.value,other.opt);
+  }
+  void outputRepr(Output<Repr<ShapeKV>> out) const {
+    outputValue(out, std::make_tuple(key, value, opt));
+  }
+}; // struct ShapeKV
+
+struct Hint : Predicate<boost::variant<Alt<0, std::tuple<Fact<QName>, std::vector<Fact<Hint>>>>, Alt<1, Fact<Hint>>, Alt<2, Fact<Hint>>, Alt<3, std::tuple<std::vector<Fact<Hint>>, std::vector<Fact<Hint>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Hint>>>>>, Alt<4, Fact<Hint>>, Alt<5, std::tuple<bool, std::vector<ShapeKV>>>, Alt<6, Fact<Hint>>, Alt<7, std::vector<Fact<Hint>>>, Alt<8, std::vector<Fact<Hint>>>, Alt<9, std::tuple<boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Hint>>>, Fact<Hint>>>, Alt<10, Fact<Type>>, Alt<11, std::string>, Alt<12, std::string>, Alt<13, std::tuple<>>, Alt<14, std::tuple<>>, Alt<15, std::tuple<>>, Alt<16, std::tuple<>>, Alt<17, std::tuple<>>, Alt<18, std::tuple<>>, Alt<19, Fact<Type>>>> {
+  static const char* GLEAN_name() {
+    return "hack.Hint";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct Hint
+
+struct Enumerator : Predicate<std::tuple<Fact<Name>, Fact<EnumDeclaration>>> {
+  static const char* GLEAN_name() {
+    return "hack.Enumerator";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct Enumerator
+
+struct EnumDefinition : Predicate<std::tuple<Fact<EnumDeclaration>, Fact<Type>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<TypeInfo>>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Type>>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<TypeInfo>>>, std::vector<Fact<Enumerator>>, std::vector<Fact<UserAttribute>>, std::vector<Fact<EnumDeclaration>>, bool, boost::variant<Alt<0, std::tuple<>>, Alt<1, ModuleMembership>>>> {
+  static const char* GLEAN_name() {
+    return "hack.EnumDefinition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct EnumDefinition
+
+struct EnumDeclaration : Predicate<std::tuple<Fact<QName>>> {
+  static const char* GLEAN_name() {
+    return "hack.EnumDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct EnumDeclaration
+
+} // namespace Hack
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Hack::Definition> {
+  using Type = Sum<facebook::glean::cpp::schema::Hack::ClassDefinition, facebook::glean::cpp::schema::Hack::ClassConstDefinition, facebook::glean::cpp::schema::Hack::EnumDefinition, facebook::glean::cpp::schema::Hack::FunctionDefinition, facebook::glean::cpp::schema::Hack::GlobalConstDefinition, facebook::glean::cpp::schema::Hack::InterfaceDefinition, facebook::glean::cpp::schema::Hack::TraitDefinition, facebook::glean::cpp::schema::Hack::MethodDefinition, facebook::glean::cpp::schema::Hack::PropertyDefinition, facebook::glean::cpp::schema::Hack::TypeConstDefinition, facebook::glean::cpp::schema::Hack::TypedefDefinition, facebook::glean::cpp::schema::Hack::ModuleDefinition>;
+};
+
+
+namespace schema {
+
+namespace Hack {
+
+struct Definition {
+  boost::variant<Alt<0, Fact<ClassDefinition>>, Alt<1, Fact<ClassConstDefinition>>, Alt<2, Fact<EnumDefinition>>, Alt<3, Fact<FunctionDefinition>>, Alt<4, Fact<GlobalConstDefinition>>, Alt<5, Fact<InterfaceDefinition>>, Alt<6, Fact<TraitDefinition>>, Alt<7, Fact<MethodDefinition>>, Alt<8, Fact<PropertyDefinition>>, Alt<9, Fact<TypeConstDefinition>>, Alt<10, Fact<TypedefDefinition>>, Alt<11, Fact<ModuleDefinition>>> GLEAN_value;
+
+  static Definition class_(const Fact<ClassDefinition>& a) {
+    return Definition{Alt<0, Fact<ClassDefinition>>(a)};
+  }
+  static Definition classConst(const Fact<ClassConstDefinition>& a) {
+    return Definition{Alt<1, Fact<ClassConstDefinition>>(a)};
+  }
+  static Definition enum_(const Fact<EnumDefinition>& a) {
+    return Definition{Alt<2, Fact<EnumDefinition>>(a)};
+  }
+  static Definition function_(const Fact<FunctionDefinition>& a) {
+    return Definition{Alt<3, Fact<FunctionDefinition>>(a)};
+  }
+  static Definition globalConst(const Fact<GlobalConstDefinition>& a) {
+    return Definition{Alt<4, Fact<GlobalConstDefinition>>(a)};
+  }
+  static Definition interface_(const Fact<InterfaceDefinition>& a) {
+    return Definition{Alt<5, Fact<InterfaceDefinition>>(a)};
+  }
+  static Definition trait(const Fact<TraitDefinition>& a) {
+    return Definition{Alt<6, Fact<TraitDefinition>>(a)};
+  }
+  static Definition method(const Fact<MethodDefinition>& a) {
+    return Definition{Alt<7, Fact<MethodDefinition>>(a)};
+  }
+  static Definition property_(const Fact<PropertyDefinition>& a) {
+    return Definition{Alt<8, Fact<PropertyDefinition>>(a)};
+  }
+  static Definition typeConst(const Fact<TypeConstDefinition>& a) {
+    return Definition{Alt<9, Fact<TypeConstDefinition>>(a)};
+  }
+  static Definition typedef_(const Fact<TypedefDefinition>& a) {
+    return Definition{Alt<10, Fact<TypedefDefinition>>(a)};
+  }
+  static Definition module(const Fact<ModuleDefinition>& a) {
+    return Definition{Alt<11, Fact<ModuleDefinition>>(a)};
+  }
+
+  bool operator==(const Definition& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Definition& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Definition& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Definition& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Definition& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Definition& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Definition>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Definition
+
+struct Context_ : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "hack.Context_";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct Context_
+
+} // namespace Hack
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Hack::ContainerDeclaration> {
+  using Type = Sum<facebook::glean::cpp::schema::Hack::ClassDeclaration, facebook::glean::cpp::schema::Hack::EnumDeclaration, facebook::glean::cpp::schema::Hack::InterfaceDeclaration, facebook::glean::cpp::schema::Hack::TraitDeclaration>;
+};
+
+
+namespace schema {
+
+namespace Hack {
+
+struct ContainerDeclaration {
+  boost::variant<Alt<0, Fact<ClassDeclaration>>, Alt<1, Fact<EnumDeclaration>>, Alt<2, Fact<InterfaceDeclaration>>, Alt<3, Fact<TraitDeclaration>>> GLEAN_value;
+
+  static ContainerDeclaration class_(const Fact<ClassDeclaration>& a) {
+    return ContainerDeclaration{Alt<0, Fact<ClassDeclaration>>(a)};
+  }
+  static ContainerDeclaration enum_(const Fact<EnumDeclaration>& a) {
+    return ContainerDeclaration{Alt<1, Fact<EnumDeclaration>>(a)};
+  }
+  static ContainerDeclaration interface_(const Fact<InterfaceDeclaration>& a) {
+    return ContainerDeclaration{Alt<2, Fact<InterfaceDeclaration>>(a)};
+  }
+  static ContainerDeclaration trait(const Fact<TraitDeclaration>& a) {
+    return ContainerDeclaration{Alt<3, Fact<TraitDeclaration>>(a)};
+  }
+
+  bool operator==(const ContainerDeclaration& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const ContainerDeclaration& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const ContainerDeclaration& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const ContainerDeclaration& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const ContainerDeclaration& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const ContainerDeclaration& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<ContainerDeclaration>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct ContainerDeclaration
+
+struct ContainerDeclarationQName : Predicate<ContainerDeclaration, Fact<QName>> {
+  static const char* GLEAN_name() {
+    return "hack.ContainerDeclarationQName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct ContainerDeclarationQName
+
+struct ContainerParent : Predicate<std::tuple<ContainerDeclaration, ContainerDeclaration>> {
+  static const char* GLEAN_name() {
+    return "hack.ContainerParent";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct ContainerParent
+
+} // namespace Hack
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Hack::Declaration> {
+  using Type = Sum<facebook::glean::cpp::schema::Hack::ClassConstDeclaration, Repr<facebook::glean::cpp::schema::Hack::ContainerDeclaration>, facebook::glean::cpp::schema::Hack::Enumerator, facebook::glean::cpp::schema::Hack::FunctionDeclaration, facebook::glean::cpp::schema::Hack::GlobalConstDeclaration, facebook::glean::cpp::schema::Hack::NamespaceDeclaration, facebook::glean::cpp::schema::Hack::MethodDeclaration, facebook::glean::cpp::schema::Hack::PropertyDeclaration, facebook::glean::cpp::schema::Hack::TypeConstDeclaration, facebook::glean::cpp::schema::Hack::TypedefDeclaration, facebook::glean::cpp::schema::Hack::ModuleDeclaration>;
+};
+
+
+namespace schema {
+
+namespace Hack {
+
+struct Declaration {
+  boost::variant<Alt<0, Fact<ClassConstDeclaration>>, Alt<1, ContainerDeclaration>, Alt<2, Fact<Enumerator>>, Alt<3, Fact<FunctionDeclaration>>, Alt<4, Fact<GlobalConstDeclaration>>, Alt<5, Fact<NamespaceDeclaration>>, Alt<6, Fact<MethodDeclaration>>, Alt<7, Fact<PropertyDeclaration>>, Alt<8, Fact<TypeConstDeclaration>>, Alt<9, Fact<TypedefDeclaration>>, Alt<10, Fact<ModuleDeclaration>>> GLEAN_value;
+
+  static Declaration classConst(const Fact<ClassConstDeclaration>& a) {
+    return Declaration{Alt<0, Fact<ClassConstDeclaration>>(a)};
+  }
+  static Declaration container(const ContainerDeclaration& a) {
+    return Declaration{Alt<1, ContainerDeclaration>(a)};
+  }
+  static Declaration enumerator(const Fact<Enumerator>& a) {
+    return Declaration{Alt<2, Fact<Enumerator>>(a)};
+  }
+  static Declaration function_(const Fact<FunctionDeclaration>& a) {
+    return Declaration{Alt<3, Fact<FunctionDeclaration>>(a)};
+  }
+  static Declaration globalConst(const Fact<GlobalConstDeclaration>& a) {
+    return Declaration{Alt<4, Fact<GlobalConstDeclaration>>(a)};
+  }
+  static Declaration namespace_(const Fact<NamespaceDeclaration>& a) {
+    return Declaration{Alt<5, Fact<NamespaceDeclaration>>(a)};
+  }
+  static Declaration method(const Fact<MethodDeclaration>& a) {
+    return Declaration{Alt<6, Fact<MethodDeclaration>>(a)};
+  }
+  static Declaration property_(const Fact<PropertyDeclaration>& a) {
+    return Declaration{Alt<7, Fact<PropertyDeclaration>>(a)};
+  }
+  static Declaration typeConst(const Fact<TypeConstDeclaration>& a) {
+    return Declaration{Alt<8, Fact<TypeConstDeclaration>>(a)};
+  }
+  static Declaration typedef_(const Fact<TypedefDeclaration>& a) {
+    return Declaration{Alt<9, Fact<TypedefDeclaration>>(a)};
+  }
+  static Declaration module(const Fact<ModuleDeclaration>& a) {
+    return Declaration{Alt<10, Fact<ModuleDeclaration>>(a)};
+  }
+
+  bool operator==(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Declaration>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Declaration
+
+struct DeclarationComment : Predicate<std::tuple<Declaration, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "hack.DeclarationComment";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct DeclarationComment
+
+struct DeclarationLocation : Predicate<std::tuple<Declaration, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "hack.DeclarationLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct DeclarationLocation
+
+struct DeclarationName : Predicate<Declaration, Fact<Name>> {
+  static const char* GLEAN_name() {
+    return "hack.DeclarationName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct DeclarationName
+
+struct DeclarationNamespace : Predicate<std::tuple<Declaration, Fact<NamespaceQName>>> {
+  static const char* GLEAN_name() {
+    return "hack.DeclarationNamespace";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct DeclarationNamespace
+
+struct DeclarationSource : Predicate<std::tuple<Declaration, Declaration>> {
+  static const char* GLEAN_name() {
+    return "hack.DeclarationSource";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct DeclarationSource
+
+struct DeclarationSpan : Predicate<std::tuple<Declaration, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "hack.DeclarationSpan";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct DeclarationSpan
+
+struct DeclarationTarget : Predicate<std::tuple<Declaration, Declaration>> {
+  static const char* GLEAN_name() {
+    return "hack.DeclarationTarget";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct DeclarationTarget
+
+struct FileDeclarations : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, std::vector<Declaration>>> {
+  static const char* GLEAN_name() {
+    return "hack.FileDeclarations";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct FileDeclarations
+
+struct MemberCluster : Predicate<std::tuple<std::vector<Declaration>>> {
+  static const char* GLEAN_name() {
+    return "hack.MemberCluster";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct MemberCluster
+
+struct ModuleChild : Predicate<std::tuple<Fact<ModuleDeclaration>, Declaration>> {
+  static const char* GLEAN_name() {
+    return "hack.ModuleChild";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct ModuleChild
+
+struct ModuleParent : Predicate<std::tuple<Declaration, Fact<ModuleDeclaration>>> {
+  static const char* GLEAN_name() {
+    return "hack.ModuleParent";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct ModuleParent
+
+struct NamespaceMember : Predicate<std::tuple<Fact<NamespaceQName>, Declaration>> {
+  static const char* GLEAN_name() {
+    return "hack.NamespaceMember";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct NamespaceMember
+
+struct SearchClassByName : Predicate<std::tuple<std::string, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<NamespaceQName>>>, Declaration>> {
+  static const char* GLEAN_name() {
+    return "hack.SearchClassByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct SearchClassByName
+
+struct SearchClassConstByName : Predicate<std::tuple<std::string, Fact<QName>, Declaration>> {
+  static const char* GLEAN_name() {
+    return "hack.SearchClassConstByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct SearchClassConstByName
+
+struct SearchEnumByName : Predicate<std::tuple<std::string, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<NamespaceQName>>>, Declaration>> {
+  static const char* GLEAN_name() {
+    return "hack.SearchEnumByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct SearchEnumByName
+
+struct SearchEnumeratorByName : Predicate<std::tuple<std::string, Fact<QName>, Declaration>> {
+  static const char* GLEAN_name() {
+    return "hack.SearchEnumeratorByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct SearchEnumeratorByName
+
+struct SearchFunctionByName : Predicate<std::tuple<std::string, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<NamespaceQName>>>, Declaration>> {
+  static const char* GLEAN_name() {
+    return "hack.SearchFunctionByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct SearchFunctionByName
+
+struct SearchGlobalConstByName : Predicate<std::tuple<std::string, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<NamespaceQName>>>, Declaration>> {
+  static const char* GLEAN_name() {
+    return "hack.SearchGlobalConstByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct SearchGlobalConstByName
+
+struct SearchInterfaceByName : Predicate<std::tuple<std::string, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<NamespaceQName>>>, Declaration>> {
+  static const char* GLEAN_name() {
+    return "hack.SearchInterfaceByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct SearchInterfaceByName
+
+struct SearchMethodByName : Predicate<std::tuple<std::string, Fact<QName>, Declaration>> {
+  static const char* GLEAN_name() {
+    return "hack.SearchMethodByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct SearchMethodByName
+
+struct SearchModuleByName : Predicate<std::tuple<std::string, Declaration>> {
+  static const char* GLEAN_name() {
+    return "hack.SearchModuleByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct SearchModuleByName
+
+struct SearchNamespaceByName : Predicate<std::tuple<std::string, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<NamespaceQName>>>, Declaration>> {
+  static const char* GLEAN_name() {
+    return "hack.SearchNamespaceByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct SearchNamespaceByName
+
+struct SearchPropertyByName : Predicate<std::tuple<std::string, Fact<QName>, Declaration>> {
+  static const char* GLEAN_name() {
+    return "hack.SearchPropertyByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct SearchPropertyByName
+
+struct SearchTraitByName : Predicate<std::tuple<std::string, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<NamespaceQName>>>, Declaration>> {
+  static const char* GLEAN_name() {
+    return "hack.SearchTraitByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct SearchTraitByName
+
+struct SearchTypeConstByName : Predicate<std::tuple<std::string, Fact<QName>, Declaration>> {
+  static const char* GLEAN_name() {
+    return "hack.SearchTypeConstByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct SearchTypeConstByName
+
+struct SearchTypedefByName : Predicate<std::tuple<std::string, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<NamespaceQName>>>, Declaration>> {
+  static const char* GLEAN_name() {
+    return "hack.SearchTypedefByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct SearchTypedefByName
+
+} // namespace Hack
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Hack::XRefTarget> {
+  using Type = Sum<Repr<facebook::glean::cpp::schema::Hack::Declaration>, Repr<facebook::glean::cpp::schema::Hack::Occurrence>>;
+};
+
+
+namespace schema {
+
+namespace Hack {
+
+struct XRefTarget {
+  boost::variant<Alt<0, Declaration>, Alt<1, Occurrence>> GLEAN_value;
+
+  static XRefTarget declaration(const Declaration& a) {
+    return XRefTarget{Alt<0, Declaration>(a)};
+  }
+  static XRefTarget occurrence(const Occurrence& a) {
+    return XRefTarget{Alt<1, Occurrence>(a)};
+  }
+
+  bool operator==(const XRefTarget& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const XRefTarget& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const XRefTarget& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const XRefTarget& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const XRefTarget& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const XRefTarget& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<XRefTarget>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct XRefTarget
+
+struct TargetUses : Predicate<std::tuple<XRefTarget, Fact<facebook::glean::cpp::schema::Src::File>, std::vector<facebook::glean::cpp::schema::Src::RelByteSpan>>> {
+  static const char* GLEAN_name() {
+    return "hack.TargetUses";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct TargetUses
+
+struct TargetUsesAbs : Predicate<std::tuple<XRefTarget, Fact<facebook::glean::cpp::schema::Src::File>, std::vector<facebook::glean::cpp::schema::Src::ByteSpan>>> {
+  static const char* GLEAN_name() {
+    return "hack.TargetUsesAbs";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct TargetUsesAbs
+
+} // namespace Hack
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Hack::XRef> {
+  using Type = Tuple<Repr<facebook::glean::cpp::schema::Hack::XRefTarget>, Array<Repr<facebook::glean::cpp::schema::Src::RelByteSpan>>>;
+};
+
+
+namespace schema {
+
+namespace Hack {
+
+struct XRef {
+  XRefTarget target;
+  std::vector<facebook::glean::cpp::schema::Src::RelByteSpan> ranges;
+
+  bool operator==(const XRef& other) const {
+    return std::tie(target,ranges)
+             == std::tie(other.target,other.ranges);
+  }
+  bool operator!=(const XRef& other) const {
+    return std::tie(target,ranges)
+             != std::tie(other.target,other.ranges);
+  }
+  bool operator<(const XRef& other) const {
+    return std::tie(target,ranges)
+             < std::tie(other.target,other.ranges);
+  }
+  bool operator<=(const XRef& other) const {
+    return std::tie(target,ranges)
+             <= std::tie(other.target,other.ranges);
+  }
+  bool operator>(const XRef& other) const {
+    return std::tie(target,ranges)
+             > std::tie(other.target,other.ranges);
+  }
+  bool operator>=(const XRef& other) const {
+    return std::tie(target,ranges)
+             >= std::tie(other.target,other.ranges);
+  }
+  void outputRepr(Output<Repr<XRef>> out) const {
+    outputValue(out, std::make_tuple(target, ranges));
+  }
+}; // struct XRef
+
+struct FileXRefs : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, std::set<XRef>>> {
+  static const char* GLEAN_name() {
+    return "hack.FileXRefs";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct FileXRefs
+
+struct TypeInfo : Predicate<std::tuple<Fact<Type>, std::vector<XRef>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Hint>>>>> {
+  static const char* GLEAN_name() {
+    return "hack.TypeInfo";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct TypeInfo
+
+} // namespace Hack
+
+namespace Search {
+
+namespace Hack {
+
+struct SearchByName : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Hack::Name>, facebook::glean::cpp::schema::Hack::Declaration>> {
+  static const char* GLEAN_name() {
+    return "search.hack.SearchByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 7;
+  }
+}; // struct SearchByName
+
+struct SearchFunctionInNamespace : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Hack::Name>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<facebook::glean::cpp::schema::Hack::NamespaceQName>>>, facebook::glean::cpp::schema::Hack::Declaration>> {
+  static const char* GLEAN_name() {
+    return "search.hack.SearchFunctionInNamespace";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 7;
+  }
+}; // struct SearchFunctionInNamespace
+
+struct SearchGlobalConstInNamespace : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Hack::Name>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<facebook::glean::cpp::schema::Hack::NamespaceQName>>>, facebook::glean::cpp::schema::Hack::Declaration>> {
+  static const char* GLEAN_name() {
+    return "search.hack.SearchGlobalConstInNamespace";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 7;
+  }
+}; // struct SearchGlobalConstInNamespace
+
+struct SearchInContainer : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Hack::Name>, Fact<facebook::glean::cpp::schema::Hack::Name>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<facebook::glean::cpp::schema::Hack::NamespaceQName>>>, facebook::glean::cpp::schema::Hack::Declaration>> {
+  static const char* GLEAN_name() {
+    return "search.hack.SearchInContainer";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 7;
+  }
+}; // struct SearchInContainer
+
+struct SearchInContainerNoProperty : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Hack::Name>, Fact<facebook::glean::cpp::schema::Hack::Name>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<facebook::glean::cpp::schema::Hack::NamespaceQName>>>, facebook::glean::cpp::schema::Hack::Declaration>> {
+  static const char* GLEAN_name() {
+    return "search.hack.SearchInContainerNoProperty";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 7;
+  }
+}; // struct SearchInContainerNoProperty
+
+struct SearchInContainerOrEnum : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Hack::Name>, Fact<facebook::glean::cpp::schema::Hack::Name>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<facebook::glean::cpp::schema::Hack::NamespaceQName>>>, facebook::glean::cpp::schema::Hack::Declaration>> {
+  static const char* GLEAN_name() {
+    return "search.hack.SearchInContainerOrEnum";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 7;
+  }
+}; // struct SearchInContainerOrEnum
+
+struct SearchInContainerOrEnumNoProperty : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Hack::Name>, Fact<facebook::glean::cpp::schema::Hack::Name>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<facebook::glean::cpp::schema::Hack::NamespaceQName>>>, facebook::glean::cpp::schema::Hack::Declaration>> {
+  static const char* GLEAN_name() {
+    return "search.hack.SearchInContainerOrEnumNoProperty";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 7;
+  }
+}; // struct SearchInContainerOrEnumNoProperty
+
+struct SearchInEnum : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Hack::Name>, Fact<facebook::glean::cpp::schema::Hack::Name>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<facebook::glean::cpp::schema::Hack::NamespaceQName>>>, facebook::glean::cpp::schema::Hack::Declaration>> {
+  static const char* GLEAN_name() {
+    return "search.hack.SearchInEnum";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 7;
+  }
+}; // struct SearchInEnum
+
+struct SearchInNamespace : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Hack::Name>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<facebook::glean::cpp::schema::Hack::NamespaceQName>>>, facebook::glean::cpp::schema::Hack::Declaration>> {
+  static const char* GLEAN_name() {
+    return "search.hack.SearchInNamespace";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 7;
+  }
+}; // struct SearchInNamespace
+
+struct SearchModule : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Hack::Name>, facebook::glean::cpp::schema::Hack::Declaration>> {
+  static const char* GLEAN_name() {
+    return "search.hack.SearchModule";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 7;
+  }
+}; // struct SearchModule
+
+struct SearchNamespace : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Hack::Name>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<facebook::glean::cpp::schema::Hack::NamespaceQName>>>, facebook::glean::cpp::schema::Hack::Declaration>> {
+  static const char* GLEAN_name() {
+    return "search.hack.SearchNamespace";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 7;
+  }
+}; // struct SearchNamespace
+
+struct SearchNamespacedDecl : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Hack::Name>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<facebook::glean::cpp::schema::Hack::NamespaceQName>>>, facebook::glean::cpp::schema::Hack::Declaration>> {
+  static const char* GLEAN_name() {
+    return "search.hack.SearchNamespacedDecl";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 7;
+  }
+}; // struct SearchNamespacedDecl
+
+struct SearchPropertyInContainer : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Hack::Name>, Fact<facebook::glean::cpp::schema::Hack::Name>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<facebook::glean::cpp::schema::Hack::NamespaceQName>>>, facebook::glean::cpp::schema::Hack::Declaration>> {
+  static const char* GLEAN_name() {
+    return "search.hack.SearchPropertyInContainer";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 7;
+  }
+}; // struct SearchPropertyInContainer
+
+struct SearchTypeInNamespace : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Hack::Name>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<facebook::glean::cpp::schema::Hack::NamespaceQName>>>, facebook::glean::cpp::schema::Hack::Declaration>> {
+  static const char* GLEAN_name() {
+    return "search.hack.SearchTypeInNamespace";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 7;
+  }
+}; // struct SearchTypeInNamespace
+
+} // namespace Hack
+
+} // namespace Search
+
+namespace Hack {
+
+struct InheritedMembers : Predicate<std::tuple<ContainerDeclaration, std::vector<Fact<MemberCluster>>>> {
+  static const char* GLEAN_name() {
+    return "hack.InheritedMembers";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct InheritedMembers
+
+struct MethodDeclaration : Predicate<std::tuple<Fact<Name>, ContainerDeclaration>> {
+  static const char* GLEAN_name() {
+    return "hack.MethodDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct MethodDeclaration
+
+struct PropertyDeclaration : Predicate<std::tuple<Fact<Name>, ContainerDeclaration>> {
+  static const char* GLEAN_name() {
+    return "hack.PropertyDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct PropertyDeclaration
+
+struct TypeConstDeclaration : Predicate<std::tuple<Fact<Name>, ContainerDeclaration>> {
+  static const char* GLEAN_name() {
+    return "hack.TypeConstDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct TypeConstDeclaration
+
+struct ContainerChild : Predicate<std::tuple<ContainerDeclaration, ContainerDeclaration>> {
+  static const char* GLEAN_name() {
+    return "hack.ContainerChild";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct ContainerChild
+
+} // namespace Hack
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Hack::ConstraintKind> {
+  using Type = Enum<3>;
+};
+
+
+namespace schema {
+
+namespace Hack {
+
+enum class ConstraintKind { As, Equal, Super };
+
+} // namespace Hack
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Hack::Constraint> {
+  using Type = Tuple<Repr<facebook::glean::cpp::schema::Hack::ConstraintKind>, facebook::glean::cpp::schema::Hack::Type, Maybe<facebook::glean::cpp::schema::Hack::TypeInfo>>;
+};
+
+
+namespace schema {
+
+namespace Hack {
+
+struct Constraint {
+  ConstraintKind constraintKind;
+  Fact<Type> type;
+  boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<TypeInfo>>> typeInfo;
+
+  bool operator==(const Constraint& other) const {
+    return std::tie(constraintKind,type,typeInfo)
+             == std::tie(other.constraintKind,other.type,other.typeInfo);
+  }
+  bool operator!=(const Constraint& other) const {
+    return std::tie(constraintKind,type,typeInfo)
+             != std::tie(other.constraintKind,other.type,other.typeInfo);
+  }
+  bool operator<(const Constraint& other) const {
+    return std::tie(constraintKind,type,typeInfo)
+             < std::tie(other.constraintKind,other.type,other.typeInfo);
+  }
+  bool operator<=(const Constraint& other) const {
+    return std::tie(constraintKind,type,typeInfo)
+             <= std::tie(other.constraintKind,other.type,other.typeInfo);
+  }
+  bool operator>(const Constraint& other) const {
+    return std::tie(constraintKind,type,typeInfo)
+             > std::tie(other.constraintKind,other.type,other.typeInfo);
+  }
+  bool operator>=(const Constraint& other) const {
+    return std::tie(constraintKind,type,typeInfo)
+             >= std::tie(other.constraintKind,other.type,other.typeInfo);
+  }
+  void outputRepr(Output<Repr<Constraint>> out) const {
+    outputValue(out, std::make_tuple(constraintKind, type, typeInfo));
+  }
+}; // struct Constraint
+
+} // namespace Hack
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Hack::TypeParameter> {
+  using Type = Tuple<facebook::glean::cpp::schema::Hack::Name, Repr<facebook::glean::cpp::schema::Hack::Variance>, Repr<facebook::glean::cpp::schema::Hack::ReifyKind>, Array<Repr<facebook::glean::cpp::schema::Hack::Constraint>>, Array<facebook::glean::cpp::schema::Hack::UserAttribute>>;
+};
+
+
+namespace schema {
+
+namespace Hack {
+
+struct TypeParameter {
+  Fact<Name> name;
+  Variance variance;
+  ReifyKind reifyKind;
+  std::vector<Constraint> constraints;
+  std::vector<Fact<UserAttribute>> attributes;
+
+  bool operator==(const TypeParameter& other) const {
+    return std::tie(name,variance,reifyKind,constraints,attributes)
+             == std::tie(other.name,other.variance,other.reifyKind,other.constraints,other.attributes);
+  }
+  bool operator!=(const TypeParameter& other) const {
+    return std::tie(name,variance,reifyKind,constraints,attributes)
+             != std::tie(other.name,other.variance,other.reifyKind,other.constraints,other.attributes);
+  }
+  bool operator<(const TypeParameter& other) const {
+    return std::tie(name,variance,reifyKind,constraints,attributes)
+             < std::tie(other.name,other.variance,other.reifyKind,other.constraints,other.attributes);
+  }
+  bool operator<=(const TypeParameter& other) const {
+    return std::tie(name,variance,reifyKind,constraints,attributes)
+             <= std::tie(other.name,other.variance,other.reifyKind,other.constraints,other.attributes);
+  }
+  bool operator>(const TypeParameter& other) const {
+    return std::tie(name,variance,reifyKind,constraints,attributes)
+             > std::tie(other.name,other.variance,other.reifyKind,other.constraints,other.attributes);
+  }
+  bool operator>=(const TypeParameter& other) const {
+    return std::tie(name,variance,reifyKind,constraints,attributes)
+             >= std::tie(other.name,other.variance,other.reifyKind,other.constraints,other.attributes);
+  }
+  void outputRepr(Output<Repr<TypeParameter>> out) const {
+    outputValue(out, std::make_tuple(name, variance, reifyKind, constraints, attributes));
+  }
+}; // struct TypeParameter
+
+struct FunctionDefinition : Predicate<std::tuple<Fact<FunctionDeclaration>, Fact<Signature>, bool, std::vector<Fact<UserAttribute>>, std::vector<TypeParameter>, boost::variant<Alt<0, std::tuple<>>, Alt<1, ModuleMembership>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, ReadonlyKind>>>> {
+  static const char* GLEAN_name() {
+    return "hack.FunctionDefinition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct FunctionDefinition
+
+struct InterfaceDefinition : Predicate<std::tuple<Fact<InterfaceDeclaration>, std::vector<Declaration>, std::vector<Fact<InterfaceDeclaration>>, std::vector<Fact<UserAttribute>>, std::vector<TypeParameter>, std::vector<Fact<ClassDeclaration>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, ModuleMembership>>>> {
+  static const char* GLEAN_name() {
+    return "hack.InterfaceDefinition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct InterfaceDefinition
+
+struct MethodDefinition : Predicate<std::tuple<Fact<MethodDeclaration>, Fact<Signature>, Visibility, bool, bool, bool, bool, std::vector<Fact<UserAttribute>>, std::vector<TypeParameter>, boost::variant<Alt<0, std::tuple<>>, Alt<1, bool>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, ReadonlyKind>>>> {
+  static const char* GLEAN_name() {
+    return "hack.MethodDefinition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct MethodDefinition
+
+struct TraitDefinition : Predicate<std::tuple<Fact<TraitDeclaration>, std::vector<Declaration>, std::vector<Fact<InterfaceDeclaration>>, std::vector<Fact<TraitDeclaration>>, std::vector<Fact<UserAttribute>>, std::vector<TypeParameter>, std::vector<Fact<ClassDeclaration>>, std::vector<Fact<InterfaceDeclaration>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, ModuleMembership>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, std::vector<Fact<ClassDeclaration>>>>>> {
+  static const char* GLEAN_name() {
+    return "hack.TraitDefinition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct TraitDefinition
+
+struct TypedefDefinition : Predicate<std::tuple<Fact<TypedefDeclaration>, bool, std::vector<Fact<UserAttribute>>, std::vector<TypeParameter>, boost::variant<Alt<0, std::tuple<>>, Alt<1, ModuleMembership>>>> {
+  static const char* GLEAN_name() {
+    return "hack.TypedefDefinition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct TypedefDefinition
+
+struct ClassDefinition : Predicate<std::tuple<Fact<ClassDeclaration>, bool, bool, std::vector<Declaration>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<ClassDeclaration>>>, std::vector<Fact<InterfaceDeclaration>>, std::vector<Fact<TraitDeclaration>>, std::vector<Fact<UserAttribute>>, std::vector<TypeParameter>, boost::variant<Alt<0, std::tuple<>>, Alt<1, ModuleMembership>>>> {
+  static const char* GLEAN_name() {
+    return "hack.ClassDefinition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct ClassDefinition
+
+struct ClassDeclaration : Predicate<std::tuple<Fact<QName>>> {
+  static const char* GLEAN_name() {
+    return "hack.ClassDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct ClassDeclaration
+
+struct ClassConstDefinition : Predicate<std::tuple<Fact<ClassConstDeclaration>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Type>>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, std::string>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<TypeInfo>>>>> {
+  static const char* GLEAN_name() {
+    return "hack.ClassConstDefinition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct ClassConstDefinition
+
+struct ClassConstDeclaration : Predicate<std::tuple<Fact<Name>, ContainerDeclaration>> {
+  static const char* GLEAN_name() {
+    return "hack.ClassConstDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct ClassConstDeclaration
+
+struct AttributeToDefinition : Predicate<std::tuple<Fact<UserAttribute>, Definition>> {
+  static const char* GLEAN_name() {
+    return "hack.AttributeToDefinition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct AttributeToDefinition
+
+struct AttributeToDeclaration : Predicate<std::tuple<Fact<UserAttribute>, Declaration, Fact<facebook::glean::cpp::schema::Src::File>>> {
+  static const char* GLEAN_name() {
+    return "hack.AttributeToDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct AttributeToDeclaration
+
+struct AttributeHasParameter : Predicate<std::tuple<Fact<Name>, std::string, Fact<UserAttribute>>> {
+  static const char* GLEAN_name() {
+    return "hack.AttributeHasParameter";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct AttributeHasParameter
+
+} // namespace Hack
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Hack::Argument> {
+  using Type = Sum<facebook::glean::cpp::schema::Hack::StringLiteral, Repr<facebook::glean::cpp::schema::Hack::XRefTarget>>;
+};
+
+
+namespace schema {
+
+namespace Hack {
+
+struct Argument {
+  boost::variant<Alt<0, Fact<StringLiteral>>, Alt<1, XRefTarget>> GLEAN_value;
+
+  static Argument lit(const Fact<StringLiteral>& a) {
+    return Argument{Alt<0, Fact<StringLiteral>>(a)};
+  }
+  static Argument xref(const XRefTarget& a) {
+    return Argument{Alt<1, XRefTarget>(a)};
+  }
+
+  bool operator==(const Argument& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Argument& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Argument& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Argument& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Argument& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Argument& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Argument>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Argument
+
+} // namespace Hack
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Hack::CallArgument> {
+  using Type = Tuple<Repr<facebook::glean::cpp::schema::Src::RelByteSpan>, Maybe<Repr<facebook::glean::cpp::schema::Hack::Argument>>>;
+};
+
+
+namespace schema {
+
+namespace Hack {
+
+struct CallArgument {
+  facebook::glean::cpp::schema::Src::RelByteSpan span;
+  boost::variant<Alt<0, std::tuple<>>, Alt<1, Argument>> argument;
+
+  bool operator==(const CallArgument& other) const {
+    return std::tie(span,argument)
+             == std::tie(other.span,other.argument);
+  }
+  bool operator!=(const CallArgument& other) const {
+    return std::tie(span,argument)
+             != std::tie(other.span,other.argument);
+  }
+  bool operator<(const CallArgument& other) const {
+    return std::tie(span,argument)
+             < std::tie(other.span,other.argument);
+  }
+  bool operator<=(const CallArgument& other) const {
+    return std::tie(span,argument)
+             <= std::tie(other.span,other.argument);
+  }
+  bool operator>(const CallArgument& other) const {
+    return std::tie(span,argument)
+             > std::tie(other.span,other.argument);
+  }
+  bool operator>=(const CallArgument& other) const {
+    return std::tie(span,argument)
+             >= std::tie(other.span,other.argument);
+  }
+  void outputRepr(Output<Repr<CallArgument>> out) const {
+    outputValue(out, std::make_tuple(span, argument));
+  }
+}; // struct CallArgument
+
+struct FileCall : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan, std::vector<CallArgument>, boost::variant<Alt<0, std::tuple<>>, Alt<1, XRefTarget>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, CallArgument>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Declaration>>, std::set<XRefTarget>>> {
+  static const char* GLEAN_name() {
+    return "hack.FileCall";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct FileCall
+
+} // namespace Hack
+
+namespace Graphql {
+
+struct VariableDef : Predicate<std::tuple<Fact<Value>, Fact<Value>, std::vector<Fact<Directive>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Value>>>>> {
+  static const char* GLEAN_name() {
+    return "graphql.VariableDef";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct VariableDef
+
+struct Value : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "graphql.Value";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct Value
+
+struct UnionTypeDef : Predicate<std::tuple<Fact<Value>, std::vector<Fact<Value>>, std::vector<Fact<Directive>>>> {
+  static const char* GLEAN_name() {
+    return "graphql.UnionTypeDef";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct UnionTypeDef
+
+} // namespace Graphql
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Graphql::SelectionSet> {
+  using Type = Tuple<Array<facebook::glean::cpp::schema::Graphql::Field>, Array<facebook::glean::cpp::schema::Graphql::InlineFragment>, Array<facebook::glean::cpp::schema::Graphql::FragmentSpread>>;
+};
+
+
+namespace schema {
+
+namespace Graphql {
+
+struct SelectionSet {
+  std::vector<Fact<Field>> fields;
+  std::vector<Fact<InlineFragment>> inlineFragments;
+  std::vector<Fact<FragmentSpread>> fragmentSpreads;
+
+  bool operator==(const SelectionSet& other) const {
+    return std::tie(fields,inlineFragments,fragmentSpreads)
+             == std::tie(other.fields,other.inlineFragments,other.fragmentSpreads);
+  }
+  bool operator!=(const SelectionSet& other) const {
+    return std::tie(fields,inlineFragments,fragmentSpreads)
+             != std::tie(other.fields,other.inlineFragments,other.fragmentSpreads);
+  }
+  bool operator<(const SelectionSet& other) const {
+    return std::tie(fields,inlineFragments,fragmentSpreads)
+             < std::tie(other.fields,other.inlineFragments,other.fragmentSpreads);
+  }
+  bool operator<=(const SelectionSet& other) const {
+    return std::tie(fields,inlineFragments,fragmentSpreads)
+             <= std::tie(other.fields,other.inlineFragments,other.fragmentSpreads);
+  }
+  bool operator>(const SelectionSet& other) const {
+    return std::tie(fields,inlineFragments,fragmentSpreads)
+             > std::tie(other.fields,other.inlineFragments,other.fragmentSpreads);
+  }
+  bool operator>=(const SelectionSet& other) const {
+    return std::tie(fields,inlineFragments,fragmentSpreads)
+             >= std::tie(other.fields,other.inlineFragments,other.fragmentSpreads);
+  }
+  void outputRepr(Output<Repr<SelectionSet>> out) const {
+    outputValue(out, std::make_tuple(fields, inlineFragments, fragmentSpreads));
+  }
+}; // struct SelectionSet
+
+struct ScalarTypeDef : Predicate<std::tuple<Fact<Value>, std::vector<Fact<Directive>>>> {
+  static const char* GLEAN_name() {
+    return "graphql.ScalarTypeDef";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct ScalarTypeDef
+
+} // namespace Graphql
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Graphql::OperationKind> {
+  using Type = Enum<3>;
+};
+
+
+namespace schema {
+
+namespace Graphql {
+
+enum class OperationKind { QUERY, MUTATION, SUBSCRIPTION };
+
+struct Operation : Predicate<std::tuple<Fact<Value>, OperationKind, std::vector<Fact<Directive>>, std::vector<Fact<VariableDef>>, SelectionSet, facebook::glean::cpp::schema::Src::FileLocation>> {
+  static const char* GLEAN_name() {
+    return "graphql.Operation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct Operation
+
+struct ObjectTypeDef : Predicate<std::tuple<Fact<Value>, std::vector<Fact<Value>>, std::vector<Fact<FieldDef>>, std::vector<Fact<Directive>>>> {
+  static const char* GLEAN_name() {
+    return "graphql.ObjectTypeDef";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct ObjectTypeDef
+
+using Name = Fact<Value>;
+
+struct NameLowerCase : Predicate<std::tuple<std::string, Name>> {
+  static const char* GLEAN_name() {
+    return "graphql.NameLowerCase";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct NameLowerCase
+
+struct InterfaceTypeDef : Predicate<std::tuple<Fact<Value>, std::vector<Fact<FieldDef>>, std::vector<Fact<Directive>>>> {
+  static const char* GLEAN_name() {
+    return "graphql.InterfaceTypeDef";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct InterfaceTypeDef
+
+struct InputValueDef : Predicate<std::tuple<Fact<Value>, Fact<Value>, std::vector<Fact<Directive>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Value>>>>> {
+  static const char* GLEAN_name() {
+    return "graphql.InputValueDef";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct InputValueDef
+
+struct InputObjectTypeDef : Predicate<std::tuple<Fact<Value>, std::vector<Fact<InputValueDef>>, std::vector<Fact<Directive>>>> {
+  static const char* GLEAN_name() {
+    return "graphql.InputObjectTypeDef";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct InputObjectTypeDef
+
+struct InlineFragment : Predicate<std::tuple<Fact<Value>, std::vector<Fact<Directive>>, SelectionSet, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Value>>>>> {
+  static const char* GLEAN_name() {
+    return "graphql.InlineFragment";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct InlineFragment
+
+struct FragmentSpread : Predicate<std::tuple<Fact<Value>, facebook::glean::cpp::schema::Src::FileLocation, std::vector<Fact<Argument>>, std::vector<Fact<Directive>>>> {
+  static const char* GLEAN_name() {
+    return "graphql.FragmentSpread";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct FragmentSpread
+
+struct Fragment : Predicate<std::tuple<Fact<Value>, Fact<Value>, std::vector<Fact<VariableDef>>, std::vector<Fact<Directive>>, SelectionSet, facebook::glean::cpp::schema::Src::FileLocation>> {
+  static const char* GLEAN_name() {
+    return "graphql.Fragment";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct Fragment
+
+struct FieldDef : Predicate<std::tuple<Fact<Value>, Fact<Value>, std::vector<Fact<InputValueDef>>, std::vector<Fact<Directive>>>> {
+  static const char* GLEAN_name() {
+    return "graphql.FieldDef";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct FieldDef
+
+struct Field : Predicate<std::tuple<Fact<Value>, Fact<Value>, std::vector<Fact<Directive>>, SelectionSet, std::vector<Fact<Argument>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Value>>>, facebook::glean::cpp::schema::Src::FileLocation>> {
+  static const char* GLEAN_name() {
+    return "graphql.Field";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct Field
+
+struct EnumTypeDef : Predicate<std::tuple<Fact<Value>, std::vector<Fact<Value>>, std::vector<Fact<Directive>>>> {
+  static const char* GLEAN_name() {
+    return "graphql.EnumTypeDef";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct EnumTypeDef
+
+} // namespace Graphql
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Graphql::DirectiveDefLocation> {
+  using Type = Enum<18>;
+};
+
+
+namespace schema {
+
+namespace Graphql {
+
+enum class DirectiveDefLocation { QUERY, MUTATION, SUBSCRIPTION, FIELD, FRAGMENT_DEFINITION, FRAGMENT_SPREAD, INLINE_FRAGMENT, SCHEMA, SCALAR, OBJECT, FIELD_DEFINITION, ARGUMENT_DEFINITION, INTERFACE, UNION, ENUM, ENUM_VALUE, INPUT_OBJECT, INPUT_FIELD_DEFINITION };
+
+struct DirectiveDef : Predicate<std::tuple<Fact<Value>, std::vector<Fact<InputValueDef>>, std::vector<DirectiveDefLocation>>> {
+  static const char* GLEAN_name() {
+    return "graphql.DirectiveDef";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct DirectiveDef
+
+struct Directive : Predicate<std::tuple<Fact<Value>, std::vector<Fact<Argument>>>> {
+  static const char* GLEAN_name() {
+    return "graphql.Directive";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct Directive
+
+} // namespace Graphql
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Graphql::Declaration> {
+  using Type = Sum<facebook::glean::cpp::schema::Graphql::Operation, facebook::glean::cpp::schema::Graphql::Fragment, facebook::glean::cpp::schema::Graphql::FieldDef, facebook::glean::cpp::schema::Graphql::EnumTypeDef, facebook::glean::cpp::schema::Graphql::DirectiveDef>;
+};
+
+
+namespace schema {
+
+namespace Graphql {
+
+struct Declaration {
+  boost::variant<Alt<0, Fact<Operation>>, Alt<1, Fact<Fragment>>, Alt<2, Fact<FieldDef>>, Alt<3, Fact<EnumTypeDef>>, Alt<4, Fact<DirectiveDef>>> GLEAN_value;
+
+  static Declaration operation_(const Fact<Operation>& a) {
+    return Declaration{Alt<0, Fact<Operation>>(a)};
+  }
+  static Declaration fragment_(const Fact<Fragment>& a) {
+    return Declaration{Alt<1, Fact<Fragment>>(a)};
+  }
+  static Declaration field_(const Fact<FieldDef>& a) {
+    return Declaration{Alt<2, Fact<FieldDef>>(a)};
+  }
+  static Declaration enum_(const Fact<EnumTypeDef>& a) {
+    return Declaration{Alt<3, Fact<EnumTypeDef>>(a)};
+  }
+  static Declaration directive_(const Fact<DirectiveDef>& a) {
+    return Declaration{Alt<4, Fact<DirectiveDef>>(a)};
+  }
+
+  bool operator==(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Declaration>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Declaration
+
+struct DeclarationLocation : Predicate<std::tuple<Declaration, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "graphql.DeclarationLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct DeclarationLocation
+
+struct DeclarationName : Predicate<Declaration, Fact<Value>> {
+  static const char* GLEAN_name() {
+    return "graphql.DeclarationName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct DeclarationName
+
+struct DeclarationUses : Predicate<std::tuple<Declaration, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "graphql.DeclarationUses";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct DeclarationUses
+
+struct FileDeclarations : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan, Declaration>> {
+  static const char* GLEAN_name() {
+    return "graphql.FileDeclarations";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct FileDeclarations
+
+struct SearchByName : Predicate<std::tuple<Name, Declaration>> {
+  static const char* GLEAN_name() {
+    return "graphql.SearchByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct SearchByName
+
+} // namespace Graphql
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Graphql::XRef> {
+  using Type = Tuple<Repr<facebook::glean::cpp::schema::Graphql::Declaration>, Repr<facebook::glean::cpp::schema::Src::ByteSpan>>;
+};
+
+
+namespace schema {
+
+namespace Graphql {
+
+struct XRef {
+  Declaration decl;
+  facebook::glean::cpp::schema::Src::ByteSpan span;
+
+  bool operator==(const XRef& other) const {
+    return std::tie(decl,span)
+             == std::tie(other.decl,other.span);
+  }
+  bool operator!=(const XRef& other) const {
+    return std::tie(decl,span)
+             != std::tie(other.decl,other.span);
+  }
+  bool operator<(const XRef& other) const {
+    return std::tie(decl,span)
+             < std::tie(other.decl,other.span);
+  }
+  bool operator<=(const XRef& other) const {
+    return std::tie(decl,span)
+             <= std::tie(other.decl,other.span);
+  }
+  bool operator>(const XRef& other) const {
+    return std::tie(decl,span)
+             > std::tie(other.decl,other.span);
+  }
+  bool operator>=(const XRef& other) const {
+    return std::tie(decl,span)
+             >= std::tie(other.decl,other.span);
+  }
+  void outputRepr(Output<Repr<XRef>> out) const {
+    outputValue(out, std::make_tuple(decl, span));
+  }
+}; // struct XRef
+
+struct FileXRefs : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, XRef>> {
+  static const char* GLEAN_name() {
+    return "graphql.FileXRefs";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct FileXRefs
+
+struct DeclHasName : Predicate<std::tuple<Declaration, Fact<Value>>> {
+  static const char* GLEAN_name() {
+    return "graphql.DeclHasName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct DeclHasName
+
+struct BelongToConfig : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, Fact<Value>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Value>>>>> {
+  static const char* GLEAN_name() {
+    return "graphql.BelongToConfig";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct BelongToConfig
+
+struct Argument : Predicate<std::tuple<Fact<Value>, Fact<Value>>> {
+  static const char* GLEAN_name() {
+    return "graphql.Argument";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct Argument
+
+} // namespace Graphql
+
+namespace Glean {
+
+namespace Test {
+
+struct nothingTest : Predicate<std::tuple<boost::variant<Alt<0, std::tuple<>>, Alt<1, std::string>>, uint64_t>> {
+  static const char* GLEAN_name() {
+    return "glean.test.nothingTest";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct nothingTest
+
+} // namespace Test
+
+} // namespace Glean
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Glean::Test::WrappedStringPair> {
+  using Type = Tuple<facebook::glean::cpp::schema::Glean::Test::StringPair>;
+};
+
+
+namespace schema {
+
+namespace Glean {
+
+namespace Test {
+
+struct WrappedStringPair {
+  Fact<StringPair> wrapped;
+
+  bool operator==(const WrappedStringPair& other) const {
+    return std::tie(wrapped)
+             == std::tie(other.wrapped);
+  }
+  bool operator!=(const WrappedStringPair& other) const {
+    return std::tie(wrapped)
+             != std::tie(other.wrapped);
+  }
+  bool operator<(const WrappedStringPair& other) const {
+    return std::tie(wrapped)
+             < std::tie(other.wrapped);
+  }
+  bool operator<=(const WrappedStringPair& other) const {
+    return std::tie(wrapped)
+             <= std::tie(other.wrapped);
+  }
+  bool operator>(const WrappedStringPair& other) const {
+    return std::tie(wrapped)
+             > std::tie(other.wrapped);
+  }
+  bool operator>=(const WrappedStringPair& other) const {
+    return std::tie(wrapped)
+             >= std::tie(other.wrapped);
+  }
+  void outputRepr(Output<Repr<WrappedStringPair>> out) const {
+    outputValue(out, std::make_tuple(wrapped));
+  }
+}; // struct WrappedStringPair
+
+struct ViaStringPair : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "glean.test.ViaStringPair";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct ViaStringPair
+
+struct Unbound2 : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "glean.test.Unbound2";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct Unbound2
+
+struct Unbound : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "glean.test.Unbound";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct Unbound
+
+struct TreeToTree : Predicate<Fact<Tree>, Fact<Tree>> {
+  static const char* GLEAN_name() {
+    return "glean.test.TreeToTree";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct TreeToTree
+
+struct Tree : Predicate<std::tuple<Fact<Node>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Tree>>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Tree>>>>> {
+  static const char* GLEAN_name() {
+    return "glean.test.Tree";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct Tree
+
+} // namespace Test
+
+} // namespace Glean
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Glean::Test::Sum_> {
+  using Type = Sum<Byte, Nat, Bool>;
+};
+
+
+namespace schema {
+
+namespace Glean {
+
+namespace Test {
+
+struct Sum_ {
+  boost::variant<Alt<0, uint8_t>, Alt<1, uint64_t>, Alt<2, bool>> GLEAN_value;
+
+  static Sum_ mon(const uint8_t& a) {
+    return Sum_{Alt<0, uint8_t>(a)};
+  }
+  static Sum_ tue(const uint64_t& a) {
+    return Sum_{Alt<1, uint64_t>(a)};
+  }
+  static Sum_ wed(const bool& a) {
+    return Sum_{Alt<2, bool>(a)};
+  }
+
+  bool operator==(const Sum_& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Sum_& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Sum_& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Sum_& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Sum_& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Sum_& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Sum_>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Sum_
+
+struct StringPairBox : Predicate<std::tuple<Fact<StringPair>>> {
+  static const char* GLEAN_name() {
+    return "glean.test.StringPairBox";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct StringPairBox
+
+struct StringPair : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "glean.test.StringPair";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct StringPair
+
+struct StoredRevStringPairWithRev : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "glean.test.StoredRevStringPairWithRev";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct StoredRevStringPairWithRev
+
+struct StoredRevStringPairWithA : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "glean.test.StoredRevStringPairWithA";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct StoredRevStringPairWithA
+
+struct StoredRevStringPairSum : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "glean.test.StoredRevStringPairSum";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct StoredRevStringPairSum
+
+struct StoredRevStringPair : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "glean.test.StoredRevStringPair";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct StoredRevStringPair
+
+struct StoredDualStringPair : Predicate<std::tuple<Fact<StringPair>, Fact<StringPair>>> {
+  static const char* GLEAN_name() {
+    return "glean.test.StoredDualStringPair";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct StoredDualStringPair
+
+struct SkipRevEdge : Predicate<std::tuple<Fact<Node>, Fact<Node>>> {
+  static const char* GLEAN_name() {
+    return "glean.test.SkipRevEdge";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct SkipRevEdge
+
+struct SameString : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "glean.test.SameString";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct SameString
+
+struct RevStringPairs : Predicate<std::tuple<std::string, Fact<RevStringPair>>> {
+  static const char* GLEAN_name() {
+    return "glean.test.RevStringPairs";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct RevStringPairs
+
+struct RevStringPairRec : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "glean.test.RevStringPairRec";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct RevStringPairRec
+
+struct RevStringPair : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "glean.test.RevStringPair";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct RevStringPair
+
+struct RevRevStringPair : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "glean.test.RevRevStringPair";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct RevRevStringPair
+
+struct RevEdge : Predicate<std::tuple<Fact<Node>, Fact<Node>>> {
+  static const char* GLEAN_name() {
+    return "glean.test.RevEdge";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct RevEdge
+
+struct ReflStringPair : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "glean.test.ReflStringPair";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct ReflStringPair
+
+struct RefRef : Predicate<Fact<Ref>> {
+  static const char* GLEAN_name() {
+    return "glean.test.RefRef";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct RefRef
+
+struct Ref : Predicate<Fact<Predicate_>> {
+  static const char* GLEAN_name() {
+    return "glean.test.Ref";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct Ref
+
+struct Qux : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "glean.test.Qux";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct Qux
+
+struct Predicate_0 : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "glean.test.Predicate";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 0;
+  }
+}; // struct Predicate_0
+
+struct NodePair : Predicate<std::tuple<Fact<Node>, Fact<Node>>> {
+  static const char* GLEAN_name() {
+    return "glean.test.NodePair";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct NodePair
+
+struct Node : Predicate<std::tuple<std::string>> {
+  static const char* GLEAN_name() {
+    return "glean.test.Node";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct Node
+
+struct Name : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "glean.test.Name";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct Name
+
+struct MatchOneAlt : Predicate<std::tuple<Sum_, uint64_t>> {
+  static const char* GLEAN_name() {
+    return "glean.test.MatchOneAlt";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct MatchOneAlt
+
+struct LeftOr2 : Predicate<std::tuple<std::string, uint64_t>> {
+  static const char* GLEAN_name() {
+    return "glean.test.LeftOr2";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct LeftOr2
+
+struct LeftOr : Predicate<std::tuple<std::string, uint64_t>> {
+  static const char* GLEAN_name() {
+    return "glean.test.LeftOr";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct LeftOr
+
+struct KeyValue : Predicate<std::tuple<std::string, uint64_t>, std::tuple<uint64_t, std::string>> {
+  static const char* GLEAN_name() {
+    return "glean.test.KeyValue";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct KeyValue
+
+struct IsThree : Predicate<uint64_t> {
+  static const char* GLEAN_name() {
+    return "glean.test.IsThree";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct IsThree
+
+struct IsParent : Predicate<Fact<Node>> {
+  static const char* GLEAN_name() {
+    return "glean.test.IsParent";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct IsParent
+
+struct IsGlean : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "glean.test.IsGlean";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct IsGlean
+
+struct FooToFoo : Predicate<Fact<Foo>, Fact<Foo>> {
+  static const char* GLEAN_name() {
+    return "glean.test.FooToFoo";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct FooToFoo
+
+struct Foo : Predicate<std::string, Fact<Bar>> {
+  static const char* GLEAN_name() {
+    return "glean.test.Foo";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct Foo
+
+struct Expr : Predicate<boost::variant<Alt<0, Fact<Name>>, Alt<1, uint64_t>, Alt<2, Fact<Name>>, Alt<3, std::tuple<Fact<Expr>, Fact<Expr>>>, Alt<4, std::tuple<Fact<Name>, Fact<Expr>>>>> {
+  static const char* GLEAN_name() {
+    return "glean.test.Expr";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct Expr
+
+} // namespace Test
+
+} // namespace Glean
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Glean::Test::Enum_> {
+  using Type = Enum<3>;
+};
+
+
+namespace schema {
+
+namespace Glean {
+
+namespace Test {
+
+enum class Enum_ { red, green, blue };
+
+} // namespace Test
+
+} // namespace Glean
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Glean::Test::Rec> {
+  using Type = Tuple<Repr<facebook::glean::cpp::schema::Glean::Test::Enum_>, Repr<facebook::glean::cpp::schema::Glean::Test::Sum_>>;
+};
+
+
+namespace schema {
+
+namespace Glean {
+
+namespace Test {
+
+struct Rec {
+  Enum_ alpha;
+  Sum_ beta;
+
+  bool operator==(const Rec& other) const {
+    return std::tie(alpha,beta)
+             == std::tie(other.alpha,other.beta);
+  }
+  bool operator!=(const Rec& other) const {
+    return std::tie(alpha,beta)
+             != std::tie(other.alpha,other.beta);
+  }
+  bool operator<(const Rec& other) const {
+    return std::tie(alpha,beta)
+             < std::tie(other.alpha,other.beta);
+  }
+  bool operator<=(const Rec& other) const {
+    return std::tie(alpha,beta)
+             <= std::tie(other.alpha,other.beta);
+  }
+  bool operator>(const Rec& other) const {
+    return std::tie(alpha,beta)
+             > std::tie(other.alpha,other.beta);
+  }
+  bool operator>=(const Rec& other) const {
+    return std::tie(alpha,beta)
+             >= std::tie(other.alpha,other.beta);
+  }
+  void outputRepr(Output<Repr<Rec>> out) const {
+    outputValue(out, std::make_tuple(alpha, beta));
+  }
+}; // struct Rec
+
+struct EmptyStoredStringPair : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "glean.test.EmptyStoredStringPair";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct EmptyStoredStringPair
+
+struct EmptyPred : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "glean.test.EmptyPred";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct EmptyPred
+
+struct EdgeWrapper : Predicate<std::tuple<Fact<Edge>>> {
+  static const char* GLEAN_name() {
+    return "glean.test.EdgeWrapper";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct EdgeWrapper
+
+} // namespace Test
+
+} // namespace Glean
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Glean::Test::EdgeSum> {
+  using Type = Sum<facebook::glean::cpp::schema::Glean::Test::EdgeWrapper, facebook::glean::cpp::schema::Glean::Test::EdgeWrapper>;
+};
+
+
+namespace schema {
+
+namespace Glean {
+
+namespace Test {
+
+struct EdgeSum {
+  boost::variant<Alt<0, Fact<EdgeWrapper>>, Alt<1, Fact<EdgeWrapper>>> GLEAN_value;
+
+  static EdgeSum fst(const Fact<EdgeWrapper>& a) {
+    return EdgeSum{Alt<0, Fact<EdgeWrapper>>(a)};
+  }
+  static EdgeSum snd(const Fact<EdgeWrapper>& a) {
+    return EdgeSum{Alt<1, Fact<EdgeWrapper>>(a)};
+  }
+
+  bool operator==(const EdgeSum& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const EdgeSum& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const EdgeSum& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const EdgeSum& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const EdgeSum& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const EdgeSum& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<EdgeSum>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct EdgeSum
+
+struct EdgeFromNotA : Predicate<Fact<Edge>> {
+  static const char* GLEAN_name() {
+    return "glean.test.EdgeFromNotA";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct EdgeFromNotA
+
+struct Edge : Predicate<std::tuple<Fact<Node>, Fact<Node>>> {
+  static const char* GLEAN_name() {
+    return "glean.test.Edge";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct Edge
+
+struct DualStringPair : Predicate<std::tuple<Fact<StringPair>, Fact<StringPair>>> {
+  static const char* GLEAN_name() {
+    return "glean.test.DualStringPair";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct DualStringPair
+
+struct DerivedKeyValue2 : Predicate<std::tuple<std::string, uint64_t>, std::tuple<uint64_t, std::string>> {
+  static const char* GLEAN_name() {
+    return "glean.test.DerivedKeyValue2";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct DerivedKeyValue2
+
+struct DerivedKeyValue : Predicate<std::tuple<std::string, uint64_t, uint64_t, std::string>> {
+  static const char* GLEAN_name() {
+    return "glean.test.DerivedKeyValue";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct DerivedKeyValue
+
+struct Bar : Predicate<std::string, Fact<Qux>> {
+  static const char* GLEAN_name() {
+    return "glean.test.Bar";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct Bar
+
+using ArrayString = std::vector<std::string>;
+
+using ArrayNat = std::vector<uint64_t>;
+
+using ArrayByte = std::vector<uint8_t>;
+
+using ArrayBool = std::vector<bool>;
+
+enum class KitchenSink_enum_ { e, f, g };
+
+} // namespace Test
+
+} // namespace Glean
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Glean::Test::KitchenSink_enum_> {
+  using Type = Enum<3>;
+};
+
+
+template<> struct Repr_<facebook::glean::cpp::schema::Glean::Test::KitchenSink> {
+  using Type = Tuple<Byte, Nat, Bool, String, facebook::glean::cpp::schema::Sys::Blob, Maybe<Tuple<>>, Tuple<Byte, Nat>, Sum<facebook::glean::cpp::schema::Glean::Test::Predicate_, facebook::glean::cpp::schema::Sys::Blob>, Enum<3>, Repr<facebook::glean::cpp::schema::Glean::Test::Rec>, Repr<facebook::glean::cpp::schema::Glean::Test::Sum_>, Repr<facebook::glean::cpp::schema::Glean::Test::Enum_>, Array<Byte>, Array<Nat>, Array<Bool>, Array<String>, Array<facebook::glean::cpp::schema::Glean::Test::Predicate_>, Array<Repr<facebook::glean::cpp::schema::Glean::Test::Rec>>, Array<Repr<facebook::glean::cpp::schema::Glean::Test::Sum_>>, Array<Repr<facebook::glean::cpp::schema::Glean::Test::Enum_>>, Array<Repr<facebook::glean::cpp::schema::Glean::Test::ArrayByte>>, Array<Repr<facebook::glean::cpp::schema::Glean::Test::ArrayNat>>, Array<Repr<facebook::glean::cpp::schema::Glean::Test::ArrayBool>>, Array<Repr<facebook::glean::cpp::schema::Glean::Test::ArrayString>>, Set<Nat>, Set<String>, Set<facebook::glean::cpp::schema::Glean::Test::Predicate_>>;
+};
+
+
+namespace schema {
+
+namespace Glean {
+
+namespace Test {
+
+struct KitchenSink {
+  uint8_t byt;
+  uint64_t nat;
+  bool bool_;
+  std::string string_;
+  Fact<facebook::glean::cpp::schema::Sys::Blob> pred;
+  boost::variant<Alt<0, std::tuple<>>, Alt<1, std::tuple<>>> maybe_;
+  std::tuple<uint8_t, uint64_t> record_;
+  boost::variant<Alt<0, Fact<Predicate_>>, Alt<1, Fact<facebook::glean::cpp::schema::Sys::Blob>>> sum_;
+  KitchenSink_enum_ enum_;
+  Rec named_record_;
+  Sum_ named_sum_;
+  Enum_ named_enum_;
+  std::vector<uint8_t> array_of_byte;
+  std::vector<uint64_t> array_of_nat;
+  std::vector<bool> array_of_bool;
+  std::vector<std::string> array_of_string;
+  std::vector<Fact<Predicate_>> array_of_pred;
+  std::vector<Rec> array_of_named_record;
+  std::vector<Sum_> array_of_named_sum;
+  std::vector<Enum_> array_of_named_enum;
+  std::vector<ArrayByte> array2_of_byte;
+  std::vector<ArrayNat> array2_of_nat;
+  std::vector<ArrayBool> array2_of_bool;
+  std::vector<ArrayString> array2_of_string;
+  std::set<uint64_t> set_of_nat;
+  std::set<std::string> set_of_string;
+  std::set<Fact<Predicate_>> set_of_pred;
+
+  bool operator==(const KitchenSink& other) const {
+    return std::tie(byt,nat,bool_,string_,pred,maybe_,record_,sum_,enum_,named_record_,named_sum_,named_enum_,array_of_byte,array_of_nat,array_of_bool,array_of_string,array_of_pred,array_of_named_record,array_of_named_sum,array_of_named_enum,array2_of_byte,array2_of_nat,array2_of_bool,array2_of_string,set_of_nat,set_of_string,set_of_pred)
+             == std::tie(other.byt,other.nat,other.bool_,other.string_,other.pred,other.maybe_,other.record_,other.sum_,other.enum_,other.named_record_,other.named_sum_,other.named_enum_,other.array_of_byte,other.array_of_nat,other.array_of_bool,other.array_of_string,other.array_of_pred,other.array_of_named_record,other.array_of_named_sum,other.array_of_named_enum,other.array2_of_byte,other.array2_of_nat,other.array2_of_bool,other.array2_of_string,other.set_of_nat,other.set_of_string,other.set_of_pred);
+  }
+  bool operator!=(const KitchenSink& other) const {
+    return std::tie(byt,nat,bool_,string_,pred,maybe_,record_,sum_,enum_,named_record_,named_sum_,named_enum_,array_of_byte,array_of_nat,array_of_bool,array_of_string,array_of_pred,array_of_named_record,array_of_named_sum,array_of_named_enum,array2_of_byte,array2_of_nat,array2_of_bool,array2_of_string,set_of_nat,set_of_string,set_of_pred)
+             != std::tie(other.byt,other.nat,other.bool_,other.string_,other.pred,other.maybe_,other.record_,other.sum_,other.enum_,other.named_record_,other.named_sum_,other.named_enum_,other.array_of_byte,other.array_of_nat,other.array_of_bool,other.array_of_string,other.array_of_pred,other.array_of_named_record,other.array_of_named_sum,other.array_of_named_enum,other.array2_of_byte,other.array2_of_nat,other.array2_of_bool,other.array2_of_string,other.set_of_nat,other.set_of_string,other.set_of_pred);
+  }
+  bool operator<(const KitchenSink& other) const {
+    return std::tie(byt,nat,bool_,string_,pred,maybe_,record_,sum_,enum_,named_record_,named_sum_,named_enum_,array_of_byte,array_of_nat,array_of_bool,array_of_string,array_of_pred,array_of_named_record,array_of_named_sum,array_of_named_enum,array2_of_byte,array2_of_nat,array2_of_bool,array2_of_string,set_of_nat,set_of_string,set_of_pred)
+             < std::tie(other.byt,other.nat,other.bool_,other.string_,other.pred,other.maybe_,other.record_,other.sum_,other.enum_,other.named_record_,other.named_sum_,other.named_enum_,other.array_of_byte,other.array_of_nat,other.array_of_bool,other.array_of_string,other.array_of_pred,other.array_of_named_record,other.array_of_named_sum,other.array_of_named_enum,other.array2_of_byte,other.array2_of_nat,other.array2_of_bool,other.array2_of_string,other.set_of_nat,other.set_of_string,other.set_of_pred);
+  }
+  bool operator<=(const KitchenSink& other) const {
+    return std::tie(byt,nat,bool_,string_,pred,maybe_,record_,sum_,enum_,named_record_,named_sum_,named_enum_,array_of_byte,array_of_nat,array_of_bool,array_of_string,array_of_pred,array_of_named_record,array_of_named_sum,array_of_named_enum,array2_of_byte,array2_of_nat,array2_of_bool,array2_of_string,set_of_nat,set_of_string,set_of_pred)
+             <= std::tie(other.byt,other.nat,other.bool_,other.string_,other.pred,other.maybe_,other.record_,other.sum_,other.enum_,other.named_record_,other.named_sum_,other.named_enum_,other.array_of_byte,other.array_of_nat,other.array_of_bool,other.array_of_string,other.array_of_pred,other.array_of_named_record,other.array_of_named_sum,other.array_of_named_enum,other.array2_of_byte,other.array2_of_nat,other.array2_of_bool,other.array2_of_string,other.set_of_nat,other.set_of_string,other.set_of_pred);
+  }
+  bool operator>(const KitchenSink& other) const {
+    return std::tie(byt,nat,bool_,string_,pred,maybe_,record_,sum_,enum_,named_record_,named_sum_,named_enum_,array_of_byte,array_of_nat,array_of_bool,array_of_string,array_of_pred,array_of_named_record,array_of_named_sum,array_of_named_enum,array2_of_byte,array2_of_nat,array2_of_bool,array2_of_string,set_of_nat,set_of_string,set_of_pred)
+             > std::tie(other.byt,other.nat,other.bool_,other.string_,other.pred,other.maybe_,other.record_,other.sum_,other.enum_,other.named_record_,other.named_sum_,other.named_enum_,other.array_of_byte,other.array_of_nat,other.array_of_bool,other.array_of_string,other.array_of_pred,other.array_of_named_record,other.array_of_named_sum,other.array_of_named_enum,other.array2_of_byte,other.array2_of_nat,other.array2_of_bool,other.array2_of_string,other.set_of_nat,other.set_of_string,other.set_of_pred);
+  }
+  bool operator>=(const KitchenSink& other) const {
+    return std::tie(byt,nat,bool_,string_,pred,maybe_,record_,sum_,enum_,named_record_,named_sum_,named_enum_,array_of_byte,array_of_nat,array_of_bool,array_of_string,array_of_pred,array_of_named_record,array_of_named_sum,array_of_named_enum,array2_of_byte,array2_of_nat,array2_of_bool,array2_of_string,set_of_nat,set_of_string,set_of_pred)
+             >= std::tie(other.byt,other.nat,other.bool_,other.string_,other.pred,other.maybe_,other.record_,other.sum_,other.enum_,other.named_record_,other.named_sum_,other.named_enum_,other.array_of_byte,other.array_of_nat,other.array_of_bool,other.array_of_string,other.array_of_pred,other.array_of_named_record,other.array_of_named_sum,other.array_of_named_enum,other.array2_of_byte,other.array2_of_nat,other.array2_of_bool,other.array2_of_string,other.set_of_nat,other.set_of_string,other.set_of_pred);
+  }
+  void outputRepr(Output<Repr<KitchenSink>> out) const {
+    outputValue(out, std::make_tuple(byt, nat, bool_, string_, pred, maybe_, record_, sum_, enum_, named_record_, named_sum_, named_enum_, array_of_byte, array_of_nat, array_of_bool, array_of_string, array_of_pred, array_of_named_record, array_of_named_sum, array_of_named_enum, array2_of_byte, array2_of_nat, array2_of_bool, array2_of_string, set_of_nat, set_of_string, set_of_pred));
+  }
+}; // struct KitchenSink
+
+struct Predicate_ : Predicate<KitchenSink> {
+  static const char* GLEAN_name() {
+    return "glean.test.Predicate";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct Predicate_
+
+} // namespace Test
+
+} // namespace Glean
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Gencode::GenCodeVariant> {
+  using Type = Enum<2>;
+};
+
+
+namespace schema {
+
+namespace Gencode {
+
+enum class GenCodeVariant { Full, Partial };
+
+struct GenCodeSignature : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "gencode.GenCodeSignature";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct GenCodeSignature
+
+struct GenCodeCommand : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "gencode.GenCodeCommand";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct GenCodeCommand
+
+struct GenCodeClass : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "gencode.GenCodeClass";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct GenCodeClass
+
+struct GenCodeBySource : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, Fact<facebook::glean::cpp::schema::Src::File>>> {
+  static const char* GLEAN_name() {
+    return "gencode.GenCodeBySource";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct GenCodeBySource
+
+struct GenCode : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, GenCodeVariant, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<facebook::glean::cpp::schema::Src::File>>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<GenCodeCommand>>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<GenCodeClass>>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<GenCodeSignature>>>>> {
+  static const char* GLEAN_name() {
+    return "gencode.GenCode";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct GenCode
+
+} // namespace Gencode
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Flow::XRef> {
+  using Type = Sum<facebook::glean::cpp::schema::Flow::LocalDeclarationReference, facebook::glean::cpp::schema::Flow::MemberDeclarationReference, facebook::glean::cpp::schema::Flow::TypeDeclarationReference>;
+};
+
+
+namespace schema {
+
+namespace Flow {
+
+struct XRef {
+  boost::variant<Alt<0, Fact<LocalDeclarationReference>>, Alt<1, Fact<MemberDeclarationReference>>, Alt<2, Fact<TypeDeclarationReference>>> GLEAN_value;
+
+  static XRef localRef(const Fact<LocalDeclarationReference>& a) {
+    return XRef{Alt<0, Fact<LocalDeclarationReference>>(a)};
+  }
+  static XRef memberRef(const Fact<MemberDeclarationReference>& a) {
+    return XRef{Alt<1, Fact<MemberDeclarationReference>>(a)};
+  }
+  static XRef typeRef(const Fact<TypeDeclarationReference>& a) {
+    return XRef{Alt<2, Fact<TypeDeclarationReference>>(a)};
+  }
+
+  bool operator==(const XRef& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const XRef& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const XRef& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const XRef& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const XRef& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const XRef& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<XRef>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct XRef
+
+struct TypeImportDeclaration : Predicate<std::tuple<Fact<TypeDeclaration>, boost::variant<Alt<0, Fact<ModuleTypeExport>>, Alt<1, Fact<ModuleExport>>, Alt<2, Fact<Module>>>>> {
+  static const char* GLEAN_name() {
+    return "flow.TypeImportDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct TypeImportDeclaration
+
+struct TypeExport : Predicate<boost::variant<Alt<0, Fact<Name>>, Alt<1, Fact<Module>>>> {
+  static const char* GLEAN_name() {
+    return "flow.TypeExport";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct TypeExport
+
+struct TypeDeclarationReference : Predicate<std::tuple<Fact<TypeDeclaration>, Fact<Range>>> {
+  static const char* GLEAN_name() {
+    return "flow.TypeDeclarationReference";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct TypeDeclarationReference
+
+struct TypeDeclarationInfo : Predicate<std::tuple<Fact<TypeDeclaration>, Fact<Type>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Documentation>>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Range>>>>> {
+  static const char* GLEAN_name() {
+    return "flow.TypeDeclarationInfo";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct TypeDeclarationInfo
+
+struct TypeDeclaration : Predicate<std::tuple<Fact<Name>, Fact<Range>>> {
+  static const char* GLEAN_name() {
+    return "flow.TypeDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct TypeDeclaration
+
+struct Type : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "flow.Type";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct Type
+
+struct StringToFileModule : Predicate<std::tuple<std::string, Fact<facebook::glean::cpp::schema::Src::File>>> {
+  static const char* GLEAN_name() {
+    return "flow.StringToFileModule";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct StringToFileModule
+
+struct SourceOfTypeExport : Predicate<std::tuple<Fact<ModuleTypeExport>, boost::variant<Alt<0, Fact<TypeDeclaration>>, Alt<1, Fact<ModuleTypeExport>>, Alt<2, Fact<Module>>>>> {
+  static const char* GLEAN_name() {
+    return "flow.SourceOfTypeExport";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct SourceOfTypeExport
+
+struct SourceOfExport : Predicate<std::tuple<Fact<ModuleExport>, boost::variant<Alt<0, Fact<Declaration>>, Alt<1, Fact<MemberDeclaration>>, Alt<2, Fact<ModuleExport>>, Alt<3, Fact<Module>>>>> {
+  static const char* GLEAN_name() {
+    return "flow.SourceOfExport";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct SourceOfExport
+
+} // namespace Flow
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Flow::SomeDeclaration> {
+  using Type = Sum<facebook::glean::cpp::schema::Flow::Declaration, facebook::glean::cpp::schema::Flow::MemberDeclaration, facebook::glean::cpp::schema::Flow::TypeDeclaration>;
+};
+
+
+namespace schema {
+
+namespace Flow {
+
+struct SomeDeclaration {
+  boost::variant<Alt<0, Fact<Declaration>>, Alt<1, Fact<MemberDeclaration>>, Alt<2, Fact<TypeDeclaration>>> GLEAN_value;
+
+  static SomeDeclaration localDecl(const Fact<Declaration>& a) {
+    return SomeDeclaration{Alt<0, Fact<Declaration>>(a)};
+  }
+  static SomeDeclaration memberDecl(const Fact<MemberDeclaration>& a) {
+    return SomeDeclaration{Alt<1, Fact<MemberDeclaration>>(a)};
+  }
+  static SomeDeclaration typeDecl(const Fact<TypeDeclaration>& a) {
+    return SomeDeclaration{Alt<2, Fact<TypeDeclaration>>(a)};
+  }
+
+  bool operator==(const SomeDeclaration& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const SomeDeclaration& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const SomeDeclaration& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const SomeDeclaration& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const SomeDeclaration& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const SomeDeclaration& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<SomeDeclaration>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct SomeDeclaration
+
+} // namespace Flow
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Flow::SomeEntity> {
+  using Type = Sum<Repr<facebook::glean::cpp::schema::Flow::SomeDeclaration>, facebook::glean::cpp::schema::Flow::Module>;
+};
+
+
+namespace schema {
+
+namespace Flow {
+
+struct SomeEntity {
+  boost::variant<Alt<0, SomeDeclaration>, Alt<1, Fact<Module>>> GLEAN_value;
+
+  static SomeEntity decl(const SomeDeclaration& a) {
+    return SomeEntity{Alt<0, SomeDeclaration>(a)};
+  }
+  static SomeEntity module_(const Fact<Module>& a) {
+    return SomeEntity{Alt<1, Fact<Module>>(a)};
+  }
+
+  bool operator==(const SomeEntity& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const SomeEntity& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const SomeEntity& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const SomeEntity& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const SomeEntity& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const SomeEntity& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<SomeEntity>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct SomeEntity
+
+} // namespace Flow
+
+namespace Search {
+
+namespace Flow {
+
+struct FlowSearchByNameNonImport : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Flow::Name>, facebook::glean::cpp::schema::Flow::SomeDeclaration>> {
+  static const char* GLEAN_name() {
+    return "search.flow.FlowSearchByNameNonImport";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct FlowSearchByNameNonImport
+
+} // namespace Flow
+
+} // namespace Search
+
+namespace Flow {
+
+struct SearchTypeDeclarationByName : Predicate<std::tuple<std::string, Fact<Module>, Fact<TypeDeclaration>>> {
+  static const char* GLEAN_name() {
+    return "flow.SearchTypeDeclarationByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct SearchTypeDeclarationByName
+
+struct SearchTypeDeclarationByLowerCaseName : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "flow.SearchTypeDeclarationByLowerCaseName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct SearchTypeDeclarationByLowerCaseName
+
+struct SearchTypeByModuleExport : Predicate<std::tuple<std::string, Fact<Name>, SomeDeclaration>> {
+  static const char* GLEAN_name() {
+    return "flow.SearchTypeByModuleExport";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct SearchTypeByModuleExport
+
+struct SearchModuleByLowerCaseName : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "flow.SearchModuleByLowerCaseName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct SearchModuleByLowerCaseName
+
+struct SearchMemberDeclarationByName : Predicate<std::tuple<std::string, Fact<Module>, Fact<MemberDeclaration>>> {
+  static const char* GLEAN_name() {
+    return "flow.SearchMemberDeclarationByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct SearchMemberDeclarationByName
+
+struct SearchMemberDeclarationByLowerCaseName : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "flow.SearchMemberDeclarationByLowerCaseName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct SearchMemberDeclarationByLowerCaseName
+
+struct SearchDeclarationByName : Predicate<std::tuple<std::string, Fact<Module>, Fact<Declaration>>> {
+  static const char* GLEAN_name() {
+    return "flow.SearchDeclarationByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct SearchDeclarationByName
+
+struct SearchDeclarationByLowerCaseName : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "flow.SearchDeclarationByLowerCaseName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct SearchDeclarationByLowerCaseName
+
+struct SearchByNameModule : Predicate<std::tuple<std::string, Fact<Module>>> {
+  static const char* GLEAN_name() {
+    return "flow.SearchByNameModule";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct SearchByNameModule
+
+struct SearchByName : Predicate<std::tuple<Fact<Name>, SomeDeclaration>> {
+  static const char* GLEAN_name() {
+    return "flow.SearchByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct SearchByName
+
+struct SearchByModuleName : Predicate<std::tuple<std::string, Fact<Module>>> {
+  static const char* GLEAN_name() {
+    return "flow.SearchByModuleName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct SearchByModuleName
+
+struct SearchByModule : Predicate<std::tuple<std::string, Fact<Name>, SomeDeclaration>> {
+  static const char* GLEAN_name() {
+    return "flow.SearchByModule";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct SearchByModule
+
+struct SearchByFileModule : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, Fact<Name>, SomeDeclaration>> {
+  static const char* GLEAN_name() {
+    return "flow.SearchByFileModule";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct SearchByFileModule
+
+struct Range : Predicate<std::tuple<Fact<Module>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "flow.Range";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct Range
+
+struct Name : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "flow.Name";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct Name
+
+struct ModuleTypeExport : Predicate<std::tuple<Fact<Module>, Fact<TypeExport>>> {
+  static const char* GLEAN_name() {
+    return "flow.ModuleTypeExport";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct ModuleTypeExport
+
+struct ModuleNameLowerCase : Predicate<std::tuple<std::string, Fact<Module>>> {
+  static const char* GLEAN_name() {
+    return "flow.ModuleNameLowerCase";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct ModuleNameLowerCase
+
+struct ModuleLocationByFile : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, Fact<Module>, facebook::glean::cpp::schema::Src::ByteSpan, std::string>> {
+  static const char* GLEAN_name() {
+    return "flow.ModuleLocationByFile";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct ModuleLocationByFile
+
+struct ModuleLocation : Predicate<std::tuple<Fact<Module>, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan, std::string>> {
+  static const char* GLEAN_name() {
+    return "flow.ModuleLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct ModuleLocation
+
+struct ModuleExport : Predicate<std::tuple<Fact<Module>, Fact<Export>>> {
+  static const char* GLEAN_name() {
+    return "flow.ModuleExport";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct ModuleExport
+
+struct ModuleDoc : Predicate<std::tuple<Fact<Documentation>, Fact<facebook::glean::cpp::schema::Src::File>>> {
+  static const char* GLEAN_name() {
+    return "flow.ModuleDoc";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct ModuleDoc
+
+struct ModuleContains : Predicate<std::tuple<Fact<Module>, SomeDeclaration>> {
+  static const char* GLEAN_name() {
+    return "flow.ModuleContains";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct ModuleContains
+
+struct ModuleComments : Predicate<std::tuple<Fact<Module>, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "flow.ModuleComments";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct ModuleComments
+
+struct Module : Predicate<boost::variant<Alt<0, Fact<facebook::glean::cpp::schema::Src::File>>, Alt<1, std::tuple<>>, Alt<2, std::string>, Alt<3, std::tuple<>>, Alt<4, std::string>>> {
+  static const char* GLEAN_name() {
+    return "flow.Module";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct Module
+
+struct MemberDeclarationReference : Predicate<std::tuple<Fact<MemberDeclaration>, Fact<Range>>> {
+  static const char* GLEAN_name() {
+    return "flow.MemberDeclarationReference";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct MemberDeclarationReference
+
+struct MemberDeclarationInfo : Predicate<std::tuple<Fact<MemberDeclaration>, Fact<Type>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Documentation>>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Range>>>>> {
+  static const char* GLEAN_name() {
+    return "flow.MemberDeclarationInfo";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct MemberDeclarationInfo
+
+struct MemberDeclaration : Predicate<std::tuple<Fact<Name>, Fact<Range>>> {
+  static const char* GLEAN_name() {
+    return "flow.MemberDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct MemberDeclaration
+
+struct LocalDeclarationReference : Predicate<std::tuple<Fact<Declaration>, Fact<Range>>> {
+  static const char* GLEAN_name() {
+    return "flow.LocalDeclarationReference";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct LocalDeclarationReference
+
+struct ImportDeclaration : Predicate<std::tuple<Fact<Declaration>, boost::variant<Alt<0, Fact<ModuleExport>>, Alt<1, Fact<Module>>>>> {
+  static const char* GLEAN_name() {
+    return "flow.ImportDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct ImportDeclaration
+
+struct FlowXRefDeclInfo : Predicate<std::tuple<XRef, Fact<Range>, Fact<Name>, Fact<Range>, SomeDeclaration>> {
+  static const char* GLEAN_name() {
+    return "flow.FlowXRefDeclInfo";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct FlowXRefDeclInfo
+
+struct FlowTypeImportXRef : Predicate<std::tuple<Fact<TypeDeclaration>, SomeEntity, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "flow.FlowTypeImportXRef";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct FlowTypeImportXRef
+
+struct FlowTypeExportLocation : Predicate<std::tuple<Fact<ModuleTypeExport>, SomeEntity, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "flow.FlowTypeExportLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct FlowTypeExportLocation
+
+struct FlowTypeEntityImportUses : Predicate<std::tuple<SomeEntity, Fact<TypeDeclaration>>> {
+  static const char* GLEAN_name() {
+    return "flow.FlowTypeEntityImportUses";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct FlowTypeEntityImportUses
+
+struct FlowSameModule : Predicate<std::tuple<Fact<Module>, Fact<Module>>> {
+  static const char* GLEAN_name() {
+    return "flow.FlowSameModule";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct FlowSameModule
+
+struct FlowModuleNamespaceXRef : Predicate<std::tuple<Fact<Declaration>, SomeEntity, Fact<facebook::glean::cpp::schema::Src::File>>> {
+  static const char* GLEAN_name() {
+    return "flow.FlowModuleNamespaceXRef";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct FlowModuleNamespaceXRef
+
+struct FlowImportXRef : Predicate<std::tuple<Fact<Declaration>, SomeEntity, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "flow.FlowImportXRef";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct FlowImportXRef
+
+struct FlowExportLocation : Predicate<std::tuple<Fact<Module>, Fact<Export>, SomeEntity, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "flow.FlowExportLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct FlowExportLocation
+
+struct FlowEntityUsesAll : Predicate<std::tuple<SomeEntity, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "flow.FlowEntityUsesAll";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct FlowEntityUsesAll
+
+struct FlowEntityImportUses : Predicate<std::tuple<SomeEntity, Fact<Declaration>>> {
+  static const char* GLEAN_name() {
+    return "flow.FlowEntityImportUses";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct FlowEntityImportUses
+
+struct FlowCompatibleExport : Predicate<std::tuple<Fact<Export>, Fact<Export>>> {
+  static const char* GLEAN_name() {
+    return "flow.FlowCompatibleExport";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct FlowCompatibleExport
+
+struct FileXRef : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, XRef>> {
+  static const char* GLEAN_name() {
+    return "flow.FileXRef";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct FileXRef
+
+struct FileOfStringModule : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, std::string>> {
+  static const char* GLEAN_name() {
+    return "flow.FileOfStringModule";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct FileOfStringModule
+
+struct FileDeclaration : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, SomeDeclaration>> {
+  static const char* GLEAN_name() {
+    return "flow.FileDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct FileDeclaration
+
+struct Export : Predicate<boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Name>>, Alt<2, Fact<Name>>, Alt<3, std::tuple<>>, Alt<4, Fact<Module>>>> {
+  static const char* GLEAN_name() {
+    return "flow.Export";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct Export
+
+struct Documentation : Predicate<Fact<Range>> {
+  static const char* GLEAN_name() {
+    return "flow.Documentation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct Documentation
+
+struct DeclarationUses : Predicate<std::tuple<SomeDeclaration, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "flow.DeclarationUses";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct DeclarationUses
+
+struct DeclarationSignature : Predicate<std::tuple<SomeDeclaration, std::string>> {
+  static const char* GLEAN_name() {
+    return "flow.DeclarationSignature";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct DeclarationSignature
+
+struct DeclarationNameSpan : Predicate<std::tuple<SomeDeclaration, Fact<Name>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "flow.DeclarationNameSpan";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct DeclarationNameSpan
+
+struct DeclarationLocation : Predicate<std::tuple<SomeDeclaration, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "flow.DeclarationLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct DeclarationLocation
+
+struct DeclarationInfo : Predicate<std::tuple<Fact<Declaration>, Fact<Type>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Documentation>>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Range>>>>> {
+  static const char* GLEAN_name() {
+    return "flow.DeclarationInfo";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct DeclarationInfo
+
+struct Declaration : Predicate<std::tuple<Fact<Name>, Fact<Range>>> {
+  static const char* GLEAN_name() {
+    return "flow.Declaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct Declaration
+
+} // namespace Flow
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Fbthrift::XRefTarget> {
+  using Type = Sum<facebook::glean::cpp::schema::Fbthrift::File, facebook::glean::cpp::schema::Fbthrift::NamedDecl, facebook::glean::cpp::schema::Fbthrift::ExceptionName, facebook::glean::cpp::schema::Fbthrift::ServiceName, facebook::glean::cpp::schema::Fbthrift::Constant, facebook::glean::cpp::schema::Fbthrift::EnumValue, facebook::glean::cpp::schema::Fbthrift::FunctionName, facebook::glean::cpp::schema::Fbthrift::FieldDecl>;
+};
+
+
+namespace schema {
+
+namespace Fbthrift {
+
+struct XRefTarget {
+  boost::variant<Alt<0, Fact<File>>, Alt<1, Fact<NamedDecl>>, Alt<2, Fact<ExceptionName>>, Alt<3, Fact<ServiceName>>, Alt<4, Fact<Constant>>, Alt<5, Fact<EnumValue>>, Alt<6, Fact<FunctionName>>, Alt<7, Fact<FieldDecl>>> GLEAN_value;
+
+  static XRefTarget include_(const Fact<File>& a) {
+    return XRefTarget{Alt<0, Fact<File>>(a)};
+  }
+  static XRefTarget named(const Fact<NamedDecl>& a) {
+    return XRefTarget{Alt<1, Fact<NamedDecl>>(a)};
+  }
+  static XRefTarget exception_(const Fact<ExceptionName>& a) {
+    return XRefTarget{Alt<2, Fact<ExceptionName>>(a)};
+  }
+  static XRefTarget service_(const Fact<ServiceName>& a) {
+    return XRefTarget{Alt<3, Fact<ServiceName>>(a)};
+  }
+  static XRefTarget constant(const Fact<Constant>& a) {
+    return XRefTarget{Alt<4, Fact<Constant>>(a)};
+  }
+  static XRefTarget enumValue(const Fact<EnumValue>& a) {
+    return XRefTarget{Alt<5, Fact<EnumValue>>(a)};
+  }
+  static XRefTarget function_(const Fact<FunctionName>& a) {
+    return XRefTarget{Alt<6, Fact<FunctionName>>(a)};
+  }
+  static XRefTarget field(const Fact<FieldDecl>& a) {
+    return XRefTarget{Alt<7, Fact<FieldDecl>>(a)};
+  }
+
+  bool operator==(const XRefTarget& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const XRefTarget& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const XRefTarget& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const XRefTarget& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const XRefTarget& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const XRefTarget& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<XRefTarget>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct XRefTarget
+
+} // namespace Fbthrift
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Fbthrift::TypedConst> {
+  using Type = Sum<facebook::glean::cpp::schema::Fbthrift::Literal, facebook::glean::cpp::schema::Fbthrift::Constant>;
+};
+
+
+namespace schema {
+
+namespace Fbthrift {
+
+struct TypedConst {
+  boost::variant<Alt<0, Fact<Literal>>, Alt<1, Fact<Constant>>> GLEAN_value;
+
+  static TypedConst literal(const Fact<Literal>& a) {
+    return TypedConst{Alt<0, Fact<Literal>>(a)};
+  }
+  static TypedConst identifier(const Fact<Constant>& a) {
+    return TypedConst{Alt<1, Fact<Constant>>(a)};
+  }
+
+  bool operator==(const TypedConst& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const TypedConst& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const TypedConst& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const TypedConst& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const TypedConst& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const TypedConst& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<TypedConst>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct TypedConst
+
+} // namespace Fbthrift
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Fbthrift::TypedConstT> {
+  using Type = Tuple<Repr<facebook::glean::cpp::schema::Fbthrift::TypedConst>, facebook::glean::cpp::schema::Fbthrift::TypeSpecification>;
+};
+
+
+namespace schema {
+
+namespace Fbthrift {
+
+struct TypedConstT {
+  TypedConst const_;
+  Fact<TypeSpecification> type_;
+
+  bool operator==(const TypedConstT& other) const {
+    return std::tie(const_,type_)
+             == std::tie(other.const_,other.type_);
+  }
+  bool operator!=(const TypedConstT& other) const {
+    return std::tie(const_,type_)
+             != std::tie(other.const_,other.type_);
+  }
+  bool operator<(const TypedConstT& other) const {
+    return std::tie(const_,type_)
+             < std::tie(other.const_,other.type_);
+  }
+  bool operator<=(const TypedConstT& other) const {
+    return std::tie(const_,type_)
+             <= std::tie(other.const_,other.type_);
+  }
+  bool operator>(const TypedConstT& other) const {
+    return std::tie(const_,type_)
+             > std::tie(other.const_,other.type_);
+  }
+  bool operator>=(const TypedConstT& other) const {
+    return std::tie(const_,type_)
+             >= std::tie(other.const_,other.type_);
+  }
+  void outputRepr(Output<Repr<TypedConstT>> out) const {
+    outputValue(out, std::make_tuple(const_, type_));
+  }
+}; // struct TypedConstT
+
+} // namespace Fbthrift
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Fbthrift::UnionFieldVal> {
+  using Type = Tuple<facebook::glean::cpp::schema::Fbthrift::Identifier, Repr<facebook::glean::cpp::schema::Fbthrift::TypedConstT>>;
+};
+
+
+namespace schema {
+
+namespace Fbthrift {
+
+struct UnionFieldVal {
+  Fact<Identifier> name;
+  TypedConstT value;
+
+  bool operator==(const UnionFieldVal& other) const {
+    return std::tie(name,value)
+             == std::tie(other.name,other.value);
+  }
+  bool operator!=(const UnionFieldVal& other) const {
+    return std::tie(name,value)
+             != std::tie(other.name,other.value);
+  }
+  bool operator<(const UnionFieldVal& other) const {
+    return std::tie(name,value)
+             < std::tie(other.name,other.value);
+  }
+  bool operator<=(const UnionFieldVal& other) const {
+    return std::tie(name,value)
+             <= std::tie(other.name,other.value);
+  }
+  bool operator>(const UnionFieldVal& other) const {
+    return std::tie(name,value)
+             > std::tie(other.name,other.value);
+  }
+  bool operator>=(const UnionFieldVal& other) const {
+    return std::tie(name,value)
+             >= std::tie(other.name,other.value);
+  }
+  void outputRepr(Output<Repr<UnionFieldVal>> out) const {
+    outputValue(out, std::make_tuple(name, value));
+  }
+}; // struct UnionFieldVal
+
+struct UnionVal : Predicate<std::tuple<UnionFieldVal>> {
+  static const char* GLEAN_name() {
+    return "fbthrift.UnionVal";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct UnionVal
+
+struct TypeDefType : Predicate<std::tuple<Fact<QualName>, Fact<TypeSpecification>, std::vector<Fact<StructuredAnnotation>>>> {
+  static const char* GLEAN_name() {
+    return "fbthrift.TypeDefType";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct TypeDefType
+
+} // namespace Fbthrift
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Fbthrift::Target> {
+  using Type = Tuple<Repr<facebook::glean::cpp::schema::Fbthrift::XRefTarget>>;
+};
+
+
+namespace schema {
+
+namespace Fbthrift {
+
+struct Target {
+  XRefTarget target;
+
+  bool operator==(const Target& other) const {
+    return std::tie(target)
+             == std::tie(other.target);
+  }
+  bool operator!=(const Target& other) const {
+    return std::tie(target)
+             != std::tie(other.target);
+  }
+  bool operator<(const Target& other) const {
+    return std::tie(target)
+             < std::tie(other.target);
+  }
+  bool operator<=(const Target& other) const {
+    return std::tie(target)
+             <= std::tie(other.target);
+  }
+  bool operator>(const Target& other) const {
+    return std::tie(target)
+             > std::tie(other.target);
+  }
+  bool operator>=(const Target& other) const {
+    return std::tie(target)
+             >= std::tie(other.target);
+  }
+  void outputRepr(Output<Repr<Target>> out) const {
+    outputValue(out, std::make_tuple(target));
+  }
+}; // struct Target
+
+struct StructuredAnnotation : Predicate<std::tuple<Fact<TypeSpecification>, Fact<StructVal>>> {
+  static const char* GLEAN_name() {
+    return "fbthrift.StructuredAnnotation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct StructuredAnnotation
+
+} // namespace Fbthrift
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Fbthrift::StructFieldValValue> {
+  using Type = Sum<Repr<facebook::glean::cpp::schema::Fbthrift::TypedConstT>, facebook::glean::cpp::schema::Fbthrift::TypeSpecification, Repr<facebook::glean::cpp::schema::Fbthrift::TypedConstT>, Tuple<>>;
+};
+
+
+namespace schema {
+
+namespace Fbthrift {
+
+struct StructFieldValValue {
+  boost::variant<Alt<0, TypedConstT>, Alt<1, Fact<TypeSpecification>>, Alt<2, TypedConstT>, Alt<3, std::tuple<>>> GLEAN_value;
+
+  static StructFieldValValue val(const TypedConstT& a) {
+    return StructFieldValValue{Alt<0, TypedConstT>(a)};
+  }
+  static StructFieldValValue default_(const Fact<TypeSpecification>& a) {
+    return StructFieldValValue{Alt<1, Fact<TypeSpecification>>(a)};
+  }
+  static StructFieldValValue just(const TypedConstT& a) {
+    return StructFieldValValue{Alt<2, TypedConstT>(a)};
+  }
+  static StructFieldValValue nothing() {
+    return StructFieldValValue{Alt<3, std::tuple<>>(std::make_tuple())};
+  }
+
+  bool operator==(const StructFieldValValue& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const StructFieldValValue& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const StructFieldValValue& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const StructFieldValValue& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const StructFieldValValue& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const StructFieldValValue& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<StructFieldValValue>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct StructFieldValValue
+
+} // namespace Fbthrift
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Fbthrift::StructFieldVal> {
+  using Type = Tuple<facebook::glean::cpp::schema::Fbthrift::Identifier, Repr<facebook::glean::cpp::schema::Fbthrift::StructFieldValValue>>;
+};
+
+
+namespace schema {
+
+namespace Fbthrift {
+
+struct StructFieldVal {
+  Fact<Identifier> name;
+  StructFieldValValue value;
+
+  bool operator==(const StructFieldVal& other) const {
+    return std::tie(name,value)
+             == std::tie(other.name,other.value);
+  }
+  bool operator!=(const StructFieldVal& other) const {
+    return std::tie(name,value)
+             != std::tie(other.name,other.value);
+  }
+  bool operator<(const StructFieldVal& other) const {
+    return std::tie(name,value)
+             < std::tie(other.name,other.value);
+  }
+  bool operator<=(const StructFieldVal& other) const {
+    return std::tie(name,value)
+             <= std::tie(other.name,other.value);
+  }
+  bool operator>(const StructFieldVal& other) const {
+    return std::tie(name,value)
+             > std::tie(other.name,other.value);
+  }
+  bool operator>=(const StructFieldVal& other) const {
+    return std::tie(name,value)
+             >= std::tie(other.name,other.value);
+  }
+  void outputRepr(Output<Repr<StructFieldVal>> out) const {
+    outputValue(out, std::make_tuple(name, value));
+  }
+}; // struct StructFieldVal
+
+struct StructVal : Predicate<std::tuple<std::vector<StructFieldVal>>> {
+  static const char* GLEAN_name() {
+    return "fbthrift.StructVal";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct StructVal
+
+struct ServiceParent : Predicate<std::tuple<Fact<ServiceName>, Fact<ServiceName>>> {
+  static const char* GLEAN_name() {
+    return "fbthrift.ServiceParent";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct ServiceParent
+
+struct ServiceName : Predicate<std::tuple<Fact<QualName>>> {
+  static const char* GLEAN_name() {
+    return "fbthrift.ServiceName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct ServiceName
+
+struct ServiceInteractionFunctions : Predicate<std::tuple<Fact<ServiceName>, Fact<FunctionSpecification>>> {
+  static const char* GLEAN_name() {
+    return "fbthrift.ServiceInteractionFunctions";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct ServiceInteractionFunctions
+
+struct ServiceDefinition : Predicate<std::tuple<Fact<ServiceName>, std::vector<Fact<FunctionSpecification>>, std::vector<Fact<StructuredAnnotation>>, std::vector<Fact<InteractionName>>>> {
+  static const char* GLEAN_name() {
+    return "fbthrift.ServiceDefinition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct ServiceDefinition
+
+struct ServiceChild : Predicate<std::tuple<Fact<ServiceName>, Fact<ServiceName>>> {
+  static const char* GLEAN_name() {
+    return "fbthrift.ServiceChild";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct ServiceChild
+
+struct SearchByName : Predicate<std::tuple<Fact<Identifier>, Fact<QualName>>> {
+  static const char* GLEAN_name() {
+    return "fbthrift.SearchByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct SearchByName
+
+} // namespace Fbthrift
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Fbthrift::ResultSink> {
+  using Type = Tuple<facebook::glean::cpp::schema::Fbthrift::TypeSpecification, Maybe<facebook::glean::cpp::schema::Fbthrift::TypeSpecification>, Maybe<facebook::glean::cpp::schema::Fbthrift::TypeSpecification>>;
+};
+
+
+namespace schema {
+
+namespace Fbthrift {
+
+struct ResultSink {
+  Fact<TypeSpecification> type_;
+  boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<TypeSpecification>>> firstResponse;
+  boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<TypeSpecification>>> finalResponse;
+
+  bool operator==(const ResultSink& other) const {
+    return std::tie(type_,firstResponse,finalResponse)
+             == std::tie(other.type_,other.firstResponse,other.finalResponse);
+  }
+  bool operator!=(const ResultSink& other) const {
+    return std::tie(type_,firstResponse,finalResponse)
+             != std::tie(other.type_,other.firstResponse,other.finalResponse);
+  }
+  bool operator<(const ResultSink& other) const {
+    return std::tie(type_,firstResponse,finalResponse)
+             < std::tie(other.type_,other.firstResponse,other.finalResponse);
+  }
+  bool operator<=(const ResultSink& other) const {
+    return std::tie(type_,firstResponse,finalResponse)
+             <= std::tie(other.type_,other.firstResponse,other.finalResponse);
+  }
+  bool operator>(const ResultSink& other) const {
+    return std::tie(type_,firstResponse,finalResponse)
+             > std::tie(other.type_,other.firstResponse,other.finalResponse);
+  }
+  bool operator>=(const ResultSink& other) const {
+    return std::tie(type_,firstResponse,finalResponse)
+             >= std::tie(other.type_,other.firstResponse,other.finalResponse);
+  }
+  void outputRepr(Output<Repr<ResultSink>> out) const {
+    outputValue(out, std::make_tuple(type_, firstResponse, finalResponse));
+  }
+}; // struct ResultSink
+
+} // namespace Fbthrift
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Fbthrift::Qualifier> {
+  using Type = Enum<3>;
+};
+
+
+namespace schema {
+
+namespace Fbthrift {
+
+enum class Qualifier { default_, optional_, required_ };
+
+struct QualName : Predicate<std::tuple<Fact<File>, Fact<Identifier>>> {
+  static const char* GLEAN_name() {
+    return "fbthrift.QualName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct QualName
+
+} // namespace Fbthrift
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Fbthrift::PrimitiveType> {
+  using Type = Enum<9>;
+};
+
+
+namespace schema {
+
+namespace Fbthrift {
+
+enum class PrimitiveType { bool_, byte_, i16_, i32_, i64_, float_, double_, binary_, string_ };
+
+struct PackageName : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "fbthrift.PackageName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct PackageName
+
+struct Package : Predicate<std::tuple<Fact<File>, Fact<PackageName>>> {
+  static const char* GLEAN_name() {
+    return "fbthrift.Package";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct Package
+
+struct NamespaceValue : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "fbthrift.NamespaceValue";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct NamespaceValue
+
+struct NamespaceName : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "fbthrift.NamespaceName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct NamespaceName
+
+struct Namespace : Predicate<std::tuple<Fact<File>, Fact<NamespaceName>, Fact<NamespaceValue>, bool>> {
+  static const char* GLEAN_name() {
+    return "fbthrift.Namespace";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct Namespace
+
+} // namespace Fbthrift
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Fbthrift::NamedKind> {
+  using Type = Enum<4>;
+};
+
+
+namespace schema {
+
+namespace Fbthrift {
+
+enum class NamedKind { typedef_, enum_, struct_, union_ };
+
+} // namespace Fbthrift
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Fbthrift::NamedType> {
+  using Type = Tuple<facebook::glean::cpp::schema::Fbthrift::QualName, Repr<facebook::glean::cpp::schema::Fbthrift::NamedKind>>;
+};
+
+
+namespace schema {
+
+namespace Fbthrift {
+
+struct NamedType {
+  Fact<QualName> name;
+  NamedKind kind;
+
+  bool operator==(const NamedType& other) const {
+    return std::tie(name,kind)
+             == std::tie(other.name,other.kind);
+  }
+  bool operator!=(const NamedType& other) const {
+    return std::tie(name,kind)
+             != std::tie(other.name,other.kind);
+  }
+  bool operator<(const NamedType& other) const {
+    return std::tie(name,kind)
+             < std::tie(other.name,other.kind);
+  }
+  bool operator<=(const NamedType& other) const {
+    return std::tie(name,kind)
+             <= std::tie(other.name,other.kind);
+  }
+  bool operator>(const NamedType& other) const {
+    return std::tie(name,kind)
+             > std::tie(other.name,other.kind);
+  }
+  bool operator>=(const NamedType& other) const {
+    return std::tie(name,kind)
+             >= std::tie(other.name,other.kind);
+  }
+  void outputRepr(Output<Repr<NamedType>> out) const {
+    outputValue(out, std::make_tuple(name, kind));
+  }
+}; // struct NamedType
+
+struct NamedDecl : Predicate<std::tuple<NamedType>> {
+  static const char* GLEAN_name() {
+    return "fbthrift.NamedDecl";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct NamedDecl
+
+struct NameLowerCase : Predicate<std::tuple<std::string, Fact<Identifier>>> {
+  static const char* GLEAN_name() {
+    return "fbthrift.NameLowerCase";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct NameLowerCase
+
+} // namespace Fbthrift
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Fbthrift::MapType> {
+  using Type = Tuple<facebook::glean::cpp::schema::Fbthrift::TypeSpecification, facebook::glean::cpp::schema::Fbthrift::TypeSpecification>;
+};
+
+
+namespace schema {
+
+namespace Fbthrift {
+
+struct MapType {
+  Fact<TypeSpecification> key_;
+  Fact<TypeSpecification> value;
+
+  bool operator==(const MapType& other) const {
+    return std::tie(key_,value)
+             == std::tie(other.key_,other.value);
+  }
+  bool operator!=(const MapType& other) const {
+    return std::tie(key_,value)
+             != std::tie(other.key_,other.value);
+  }
+  bool operator<(const MapType& other) const {
+    return std::tie(key_,value)
+             < std::tie(other.key_,other.value);
+  }
+  bool operator<=(const MapType& other) const {
+    return std::tie(key_,value)
+             <= std::tie(other.key_,other.value);
+  }
+  bool operator>(const MapType& other) const {
+    return std::tie(key_,value)
+             > std::tie(other.key_,other.value);
+  }
+  bool operator>=(const MapType& other) const {
+    return std::tie(key_,value)
+             >= std::tie(other.key_,other.value);
+  }
+  void outputRepr(Output<Repr<MapType>> out) const {
+    outputValue(out, std::make_tuple(key_, value));
+  }
+}; // struct MapType
+
+} // namespace Fbthrift
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Fbthrift::Loc> {
+  using Type = Tuple<Nat, Nat, Nat, Nat>;
+};
+
+
+namespace schema {
+
+namespace Fbthrift {
+
+struct Loc {
+  uint64_t startLine;
+  uint64_t startCol;
+  uint64_t endLine;
+  uint64_t endCol;
+
+  bool operator==(const Loc& other) const {
+    return std::tie(startLine,startCol,endLine,endCol)
+             == std::tie(other.startLine,other.startCol,other.endLine,other.endCol);
+  }
+  bool operator!=(const Loc& other) const {
+    return std::tie(startLine,startCol,endLine,endCol)
+             != std::tie(other.startLine,other.startCol,other.endLine,other.endCol);
+  }
+  bool operator<(const Loc& other) const {
+    return std::tie(startLine,startCol,endLine,endCol)
+             < std::tie(other.startLine,other.startCol,other.endLine,other.endCol);
+  }
+  bool operator<=(const Loc& other) const {
+    return std::tie(startLine,startCol,endLine,endCol)
+             <= std::tie(other.startLine,other.startCol,other.endLine,other.endCol);
+  }
+  bool operator>(const Loc& other) const {
+    return std::tie(startLine,startCol,endLine,endCol)
+             > std::tie(other.startLine,other.startCol,other.endLine,other.endCol);
+  }
+  bool operator>=(const Loc& other) const {
+    return std::tie(startLine,startCol,endLine,endCol)
+             >= std::tie(other.startLine,other.startCol,other.endLine,other.endCol);
+  }
+  void outputRepr(Output<Repr<Loc>> out) const {
+    outputValue(out, std::make_tuple(startLine, startCol, endLine, endCol));
+  }
+}; // struct Loc
+
+} // namespace Fbthrift
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Fbthrift::XRef> {
+  using Type = Tuple<Repr<facebook::glean::cpp::schema::Fbthrift::Loc>, Repr<facebook::glean::cpp::schema::Fbthrift::XRefTarget>>;
+};
+
+
+namespace schema {
+
+namespace Fbthrift {
+
+struct XRef {
+  Loc locRef;
+  XRefTarget target;
+
+  bool operator==(const XRef& other) const {
+    return std::tie(locRef,target)
+             == std::tie(other.locRef,other.target);
+  }
+  bool operator!=(const XRef& other) const {
+    return std::tie(locRef,target)
+             != std::tie(other.locRef,other.target);
+  }
+  bool operator<(const XRef& other) const {
+    return std::tie(locRef,target)
+             < std::tie(other.locRef,other.target);
+  }
+  bool operator<=(const XRef& other) const {
+    return std::tie(locRef,target)
+             <= std::tie(other.locRef,other.target);
+  }
+  bool operator>(const XRef& other) const {
+    return std::tie(locRef,target)
+             > std::tie(other.locRef,other.target);
+  }
+  bool operator>=(const XRef& other) const {
+    return std::tie(locRef,target)
+             >= std::tie(other.locRef,other.target);
+  }
+  void outputRepr(Output<Repr<XRef>> out) const {
+    outputValue(out, std::make_tuple(locRef, target));
+  }
+}; // struct XRef
+
+} // namespace Fbthrift
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Fbthrift::KeyValue> {
+  using Type = Tuple<Repr<facebook::glean::cpp::schema::Fbthrift::TypedConst>, Repr<facebook::glean::cpp::schema::Fbthrift::TypedConst>>;
+};
+
+
+namespace schema {
+
+namespace Fbthrift {
+
+struct KeyValue {
+  TypedConst key;
+  TypedConst value;
+
+  bool operator==(const KeyValue& other) const {
+    return std::tie(key,value)
+             == std::tie(other.key,other.value);
+  }
+  bool operator!=(const KeyValue& other) const {
+    return std::tie(key,value)
+             != std::tie(other.key,other.value);
+  }
+  bool operator<(const KeyValue& other) const {
+    return std::tie(key,value)
+             < std::tie(other.key,other.value);
+  }
+  bool operator<=(const KeyValue& other) const {
+    return std::tie(key,value)
+             <= std::tie(other.key,other.value);
+  }
+  bool operator>(const KeyValue& other) const {
+    return std::tie(key,value)
+             > std::tie(other.key,other.value);
+  }
+  bool operator>=(const KeyValue& other) const {
+    return std::tie(key,value)
+             >= std::tie(other.key,other.value);
+  }
+  void outputRepr(Output<Repr<KeyValue>> out) const {
+    outputValue(out, std::make_tuple(key, value));
+  }
+}; // struct KeyValue
+
+struct InteractionName : Predicate<std::tuple<Fact<QualName>>> {
+  static const char* GLEAN_name() {
+    return "fbthrift.InteractionName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct InteractionName
+
+struct InteractionDefinition : Predicate<std::tuple<Fact<InteractionName>, std::vector<Fact<FunctionSpecification>>, std::vector<Fact<StructuredAnnotation>>>> {
+  static const char* GLEAN_name() {
+    return "fbthrift.InteractionDefinition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct InteractionDefinition
+
+} // namespace Fbthrift
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Fbthrift::IntegerLiteral> {
+  using Type = Tuple<Bool, Nat>;
+};
+
+
+namespace schema {
+
+namespace Fbthrift {
+
+struct IntegerLiteral {
+  bool isNonNegative;
+  uint64_t absValue;
+
+  bool operator==(const IntegerLiteral& other) const {
+    return std::tie(isNonNegative,absValue)
+             == std::tie(other.isNonNegative,other.absValue);
+  }
+  bool operator!=(const IntegerLiteral& other) const {
+    return std::tie(isNonNegative,absValue)
+             != std::tie(other.isNonNegative,other.absValue);
+  }
+  bool operator<(const IntegerLiteral& other) const {
+    return std::tie(isNonNegative,absValue)
+             < std::tie(other.isNonNegative,other.absValue);
+  }
+  bool operator<=(const IntegerLiteral& other) const {
+    return std::tie(isNonNegative,absValue)
+             <= std::tie(other.isNonNegative,other.absValue);
+  }
+  bool operator>(const IntegerLiteral& other) const {
+    return std::tie(isNonNegative,absValue)
+             > std::tie(other.isNonNegative,other.absValue);
+  }
+  bool operator>=(const IntegerLiteral& other) const {
+    return std::tie(isNonNegative,absValue)
+             >= std::tie(other.isNonNegative,other.absValue);
+  }
+  void outputRepr(Output<Repr<IntegerLiteral>> out) const {
+    outputValue(out, std::make_tuple(isNonNegative, absValue));
+  }
+}; // struct IntegerLiteral
+
+struct Identifier : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "fbthrift.Identifier";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct Identifier
+
+struct FunctionName : Predicate<std::tuple<Fact<ServiceName>, Fact<Identifier>>> {
+  static const char* GLEAN_name() {
+    return "fbthrift.FunctionName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct FunctionName
+
+} // namespace Fbthrift
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Fbthrift::FloatLiteral> {
+  using Type = Tuple<Bool, Bool, Nat, Nat>;
+};
+
+
+namespace schema {
+
+namespace Fbthrift {
+
+struct FloatLiteral {
+  bool isNaN;
+  bool isPositive;
+  uint64_t exponent;
+  uint64_t significand;
+
+  bool operator==(const FloatLiteral& other) const {
+    return std::tie(isNaN,isPositive,exponent,significand)
+             == std::tie(other.isNaN,other.isPositive,other.exponent,other.significand);
+  }
+  bool operator!=(const FloatLiteral& other) const {
+    return std::tie(isNaN,isPositive,exponent,significand)
+             != std::tie(other.isNaN,other.isPositive,other.exponent,other.significand);
+  }
+  bool operator<(const FloatLiteral& other) const {
+    return std::tie(isNaN,isPositive,exponent,significand)
+             < std::tie(other.isNaN,other.isPositive,other.exponent,other.significand);
+  }
+  bool operator<=(const FloatLiteral& other) const {
+    return std::tie(isNaN,isPositive,exponent,significand)
+             <= std::tie(other.isNaN,other.isPositive,other.exponent,other.significand);
+  }
+  bool operator>(const FloatLiteral& other) const {
+    return std::tie(isNaN,isPositive,exponent,significand)
+             > std::tie(other.isNaN,other.isPositive,other.exponent,other.significand);
+  }
+  bool operator>=(const FloatLiteral& other) const {
+    return std::tie(isNaN,isPositive,exponent,significand)
+             >= std::tie(other.isNaN,other.isPositive,other.exponent,other.significand);
+  }
+  void outputRepr(Output<Repr<FloatLiteral>> out) const {
+    outputValue(out, std::make_tuple(isNaN, isPositive, exponent, significand));
+  }
+}; // struct FloatLiteral
+
+struct Literal : Predicate<boost::variant<Alt<0, IntegerLiteral>, Alt<1, IntegerLiteral>, Alt<2, IntegerLiteral>, Alt<3, IntegerLiteral>, Alt<4, FloatLiteral>, Alt<5, FloatLiteral>, Alt<6, bool>, Alt<7, std::string>, Alt<8, std::vector<uint8_t>>, Alt<9, std::vector<TypedConst>>, Alt<10, std::vector<TypedConst>>, Alt<11, std::vector<KeyValue>>, Alt<12, Fact<Literal>>, Alt<13, Fact<StructVal>>, Alt<14, Fact<ExceptionVal>>, Alt<15, Fact<UnionVal>>, Alt<16, Fact<EnumVal>>>> {
+  static const char* GLEAN_name() {
+    return "fbthrift.Literal";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct Literal
+
+struct FileXRefs : Predicate<std::tuple<Fact<File>, std::vector<XRef>>> {
+  static const char* GLEAN_name() {
+    return "fbthrift.FileXRefs";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct FileXRefs
+
+struct File : Predicate<Fact<facebook::glean::cpp::schema::Src::File>> {
+  static const char* GLEAN_name() {
+    return "fbthrift.File";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct File
+
+} // namespace Fbthrift
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Fbthrift::FieldKind> {
+  using Type = Enum<3>;
+};
+
+
+namespace schema {
+
+namespace Fbthrift {
+
+enum class FieldKind { struct_, union_, exception_ };
+
+using FieldId = IntegerLiteral;
+
+} // namespace Fbthrift
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Fbthrift::FieldSpecification> {
+  using Type = Tuple<Repr<facebook::glean::cpp::schema::Fbthrift::FieldId>, Repr<facebook::glean::cpp::schema::Fbthrift::Qualifier>, facebook::glean::cpp::schema::Fbthrift::TypeSpecification, facebook::glean::cpp::schema::Fbthrift::Identifier, Maybe<Repr<facebook::glean::cpp::schema::Fbthrift::TypedConst>>, Array<facebook::glean::cpp::schema::Fbthrift::StructuredAnnotation>>;
+};
+
+
+namespace schema {
+
+namespace Fbthrift {
+
+struct FieldSpecification {
+  FieldId id;
+  Qualifier qualifier;
+  Fact<TypeSpecification> type_;
+  Fact<Identifier> name;
+  boost::variant<Alt<0, std::tuple<>>, Alt<1, TypedConst>> value;
+  std::vector<Fact<StructuredAnnotation>> structuredAnnotations;
+
+  bool operator==(const FieldSpecification& other) const {
+    return std::tie(id,qualifier,type_,name,value,structuredAnnotations)
+             == std::tie(other.id,other.qualifier,other.type_,other.name,other.value,other.structuredAnnotations);
+  }
+  bool operator!=(const FieldSpecification& other) const {
+    return std::tie(id,qualifier,type_,name,value,structuredAnnotations)
+             != std::tie(other.id,other.qualifier,other.type_,other.name,other.value,other.structuredAnnotations);
+  }
+  bool operator<(const FieldSpecification& other) const {
+    return std::tie(id,qualifier,type_,name,value,structuredAnnotations)
+             < std::tie(other.id,other.qualifier,other.type_,other.name,other.value,other.structuredAnnotations);
+  }
+  bool operator<=(const FieldSpecification& other) const {
+    return std::tie(id,qualifier,type_,name,value,structuredAnnotations)
+             <= std::tie(other.id,other.qualifier,other.type_,other.name,other.value,other.structuredAnnotations);
+  }
+  bool operator>(const FieldSpecification& other) const {
+    return std::tie(id,qualifier,type_,name,value,structuredAnnotations)
+             > std::tie(other.id,other.qualifier,other.type_,other.name,other.value,other.structuredAnnotations);
+  }
+  bool operator>=(const FieldSpecification& other) const {
+    return std::tie(id,qualifier,type_,name,value,structuredAnnotations)
+             >= std::tie(other.id,other.qualifier,other.type_,other.name,other.value,other.structuredAnnotations);
+  }
+  void outputRepr(Output<Repr<FieldSpecification>> out) const {
+    outputValue(out, std::make_tuple(id, qualifier, type_, name, value, structuredAnnotations));
+  }
+}; // struct FieldSpecification
+
+struct StructType : Predicate<std::tuple<Fact<QualName>, std::vector<FieldSpecification>, std::vector<Fact<StructuredAnnotation>>>> {
+  static const char* GLEAN_name() {
+    return "fbthrift.StructType";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct StructType
+
+} // namespace Fbthrift
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Fbthrift::UnqualField> {
+  using Type = Tuple<Repr<facebook::glean::cpp::schema::Fbthrift::FieldId>, facebook::glean::cpp::schema::Fbthrift::TypeSpecification, facebook::glean::cpp::schema::Fbthrift::Identifier, Array<facebook::glean::cpp::schema::Fbthrift::StructuredAnnotation>>;
+};
+
+
+namespace schema {
+
+namespace Fbthrift {
+
+struct UnqualField {
+  FieldId id;
+  Fact<TypeSpecification> type_;
+  Fact<Identifier> name;
+  std::vector<Fact<StructuredAnnotation>> structuredAnnotations;
+
+  bool operator==(const UnqualField& other) const {
+    return std::tie(id,type_,name,structuredAnnotations)
+             == std::tie(other.id,other.type_,other.name,other.structuredAnnotations);
+  }
+  bool operator!=(const UnqualField& other) const {
+    return std::tie(id,type_,name,structuredAnnotations)
+             != std::tie(other.id,other.type_,other.name,other.structuredAnnotations);
+  }
+  bool operator<(const UnqualField& other) const {
+    return std::tie(id,type_,name,structuredAnnotations)
+             < std::tie(other.id,other.type_,other.name,other.structuredAnnotations);
+  }
+  bool operator<=(const UnqualField& other) const {
+    return std::tie(id,type_,name,structuredAnnotations)
+             <= std::tie(other.id,other.type_,other.name,other.structuredAnnotations);
+  }
+  bool operator>(const UnqualField& other) const {
+    return std::tie(id,type_,name,structuredAnnotations)
+             > std::tie(other.id,other.type_,other.name,other.structuredAnnotations);
+  }
+  bool operator>=(const UnqualField& other) const {
+    return std::tie(id,type_,name,structuredAnnotations)
+             >= std::tie(other.id,other.type_,other.name,other.structuredAnnotations);
+  }
+  void outputRepr(Output<Repr<UnqualField>> out) const {
+    outputValue(out, std::make_tuple(id, type_, name, structuredAnnotations));
+  }
+}; // struct UnqualField
+
+struct UnionType : Predicate<std::tuple<Fact<QualName>, std::vector<UnqualField>, std::vector<Fact<StructuredAnnotation>>>> {
+  static const char* GLEAN_name() {
+    return "fbthrift.UnionType";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct UnionType
+
+struct FieldDecl : Predicate<std::tuple<Fact<QualName>, FieldKind, Fact<Identifier>>> {
+  static const char* GLEAN_name() {
+    return "fbthrift.FieldDecl";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct FieldDecl
+
+struct ExceptionVal : Predicate<Fact<StructVal>> {
+  static const char* GLEAN_name() {
+    return "fbthrift.ExceptionVal";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct ExceptionVal
+
+struct ExceptionType : Predicate<std::tuple<Fact<QualName>, std::vector<FieldSpecification>, std::vector<Fact<StructuredAnnotation>>>> {
+  static const char* GLEAN_name() {
+    return "fbthrift.ExceptionType";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct ExceptionType
+
+} // namespace Fbthrift
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Fbthrift::ExceptionSpecName> {
+  using Type = Sum<facebook::glean::cpp::schema::Fbthrift::ExceptionName, facebook::glean::cpp::schema::Fbthrift::TypeDefException>;
+};
+
+
+namespace schema {
+
+namespace Fbthrift {
+
+struct ExceptionSpecName {
+  boost::variant<Alt<0, Fact<ExceptionName>>, Alt<1, Fact<TypeDefException>>> GLEAN_value;
+
+  static ExceptionSpecName simple(const Fact<ExceptionName>& a) {
+    return ExceptionSpecName{Alt<0, Fact<ExceptionName>>(a)};
+  }
+  static ExceptionSpecName typedef_(const Fact<TypeDefException>& a) {
+    return ExceptionSpecName{Alt<1, Fact<TypeDefException>>(a)};
+  }
+
+  bool operator==(const ExceptionSpecName& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const ExceptionSpecName& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const ExceptionSpecName& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const ExceptionSpecName& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const ExceptionSpecName& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const ExceptionSpecName& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<ExceptionSpecName>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct ExceptionSpecName
+
+} // namespace Fbthrift
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Fbthrift::ExceptionSpecification> {
+  using Type = Tuple<Repr<facebook::glean::cpp::schema::Fbthrift::FieldId>, Repr<facebook::glean::cpp::schema::Fbthrift::ExceptionSpecName>, facebook::glean::cpp::schema::Fbthrift::Identifier, Array<facebook::glean::cpp::schema::Fbthrift::StructuredAnnotation>>;
+};
+
+
+namespace schema {
+
+namespace Fbthrift {
+
+struct ExceptionSpecification {
+  FieldId id;
+  ExceptionSpecName type_;
+  Fact<Identifier> name;
+  std::vector<Fact<StructuredAnnotation>> structuredAnnotations;
+
+  bool operator==(const ExceptionSpecification& other) const {
+    return std::tie(id,type_,name,structuredAnnotations)
+             == std::tie(other.id,other.type_,other.name,other.structuredAnnotations);
+  }
+  bool operator!=(const ExceptionSpecification& other) const {
+    return std::tie(id,type_,name,structuredAnnotations)
+             != std::tie(other.id,other.type_,other.name,other.structuredAnnotations);
+  }
+  bool operator<(const ExceptionSpecification& other) const {
+    return std::tie(id,type_,name,structuredAnnotations)
+             < std::tie(other.id,other.type_,other.name,other.structuredAnnotations);
+  }
+  bool operator<=(const ExceptionSpecification& other) const {
+    return std::tie(id,type_,name,structuredAnnotations)
+             <= std::tie(other.id,other.type_,other.name,other.structuredAnnotations);
+  }
+  bool operator>(const ExceptionSpecification& other) const {
+    return std::tie(id,type_,name,structuredAnnotations)
+             > std::tie(other.id,other.type_,other.name,other.structuredAnnotations);
+  }
+  bool operator>=(const ExceptionSpecification& other) const {
+    return std::tie(id,type_,name,structuredAnnotations)
+             >= std::tie(other.id,other.type_,other.name,other.structuredAnnotations);
+  }
+  void outputRepr(Output<Repr<ExceptionSpecification>> out) const {
+    outputValue(out, std::make_tuple(id, type_, name, structuredAnnotations));
+  }
+}; // struct ExceptionSpecification
+
+} // namespace Fbthrift
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Fbthrift::ResultStream> {
+  using Type = Tuple<Maybe<facebook::glean::cpp::schema::Fbthrift::TypeSpecification>, facebook::glean::cpp::schema::Fbthrift::TypeSpecification, Array<Repr<facebook::glean::cpp::schema::Fbthrift::ExceptionSpecification>>>;
+};
+
+
+namespace schema {
+
+namespace Fbthrift {
+
+struct ResultStream {
+  boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<TypeSpecification>>> response;
+  Fact<TypeSpecification> stream_;
+  std::vector<ExceptionSpecification> throws_;
+
+  bool operator==(const ResultStream& other) const {
+    return std::tie(response,stream_,throws_)
+             == std::tie(other.response,other.stream_,other.throws_);
+  }
+  bool operator!=(const ResultStream& other) const {
+    return std::tie(response,stream_,throws_)
+             != std::tie(other.response,other.stream_,other.throws_);
+  }
+  bool operator<(const ResultStream& other) const {
+    return std::tie(response,stream_,throws_)
+             < std::tie(other.response,other.stream_,other.throws_);
+  }
+  bool operator<=(const ResultStream& other) const {
+    return std::tie(response,stream_,throws_)
+             <= std::tie(other.response,other.stream_,other.throws_);
+  }
+  bool operator>(const ResultStream& other) const {
+    return std::tie(response,stream_,throws_)
+             > std::tie(other.response,other.stream_,other.throws_);
+  }
+  bool operator>=(const ResultStream& other) const {
+    return std::tie(response,stream_,throws_)
+             >= std::tie(other.response,other.stream_,other.throws_);
+  }
+  void outputRepr(Output<Repr<ResultStream>> out) const {
+    outputValue(out, std::make_tuple(response, stream_, throws_));
+  }
+}; // struct ResultStream
+
+struct TypeDefException : Predicate<std::tuple<Fact<NamedDecl>, ExceptionSpecName>> {
+  static const char* GLEAN_name() {
+    return "fbthrift.TypeDefException";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct TypeDefException
+
+struct ExceptionName : Predicate<std::tuple<Fact<QualName>>> {
+  static const char* GLEAN_name() {
+    return "fbthrift.ExceptionName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct ExceptionName
+
+struct EnumerationType : Predicate<std::tuple<Fact<QualName>, std::vector<Fact<EnumValueDef>>, std::vector<Fact<StructuredAnnotation>>>> {
+  static const char* GLEAN_name() {
+    return "fbthrift.EnumerationType";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct EnumerationType
+
+struct EnumValueDef : Predicate<std::tuple<Fact<EnumValue>, IntegerLiteral, std::vector<Fact<StructuredAnnotation>>>> {
+  static const char* GLEAN_name() {
+    return "fbthrift.EnumValueDef";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct EnumValueDef
+
+struct EnumValue : Predicate<std::tuple<NamedType, Fact<Identifier>>> {
+  static const char* GLEAN_name() {
+    return "fbthrift.EnumValue";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct EnumValue
+
+struct EnumVal : Predicate<std::tuple<Fact<QualName>>> {
+  static const char* GLEAN_name() {
+    return "fbthrift.EnumVal";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct EnumVal
+
+using Declaration = XRefTarget;
+
+struct DeclarationComment : Predicate<std::tuple<Declaration, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "fbthrift.DeclarationComment";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct DeclarationComment
+
+struct DeclarationFile : Predicate<std::tuple<Declaration, Fact<File>>> {
+  static const char* GLEAN_name() {
+    return "fbthrift.DeclarationFile";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct DeclarationFile
+
+struct DeclarationMember : Predicate<std::tuple<Fact<QualName>, Fact<Identifier>, Declaration>> {
+  static const char* GLEAN_name() {
+    return "fbthrift.DeclarationMember";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct DeclarationMember
+
+struct DeclarationName : Predicate<std::tuple<Fact<QualName>, Declaration>> {
+  static const char* GLEAN_name() {
+    return "fbthrift.DeclarationName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct DeclarationName
+
+struct DeclarationNameSpan : Predicate<std::tuple<Declaration, Fact<Identifier>, Fact<File>, Loc>> {
+  static const char* GLEAN_name() {
+    return "fbthrift.DeclarationNameSpan";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct DeclarationNameSpan
+
+struct DeclarationUses : Predicate<std::tuple<Declaration, Fact<facebook::glean::cpp::schema::Src::File>, Loc>> {
+  static const char* GLEAN_name() {
+    return "fbthrift.DeclarationUses";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct DeclarationUses
+
+struct FileDeclaration : Predicate<std::tuple<Fact<File>, Declaration>> {
+  static const char* GLEAN_name() {
+    return "fbthrift.FileDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct FileDeclaration
+
+struct FunctionDeclarationName : Predicate<std::tuple<Fact<QualName>, Fact<Identifier>, Declaration>> {
+  static const char* GLEAN_name() {
+    return "fbthrift.FunctionDeclarationName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct FunctionDeclarationName
+
+} // namespace Fbthrift
+
+namespace Hack {
+
+struct HackToThrift : Predicate<std::tuple<Declaration, facebook::glean::cpp::schema::Fbthrift::Declaration>> {
+  static const char* GLEAN_name() {
+    return "hack.HackToThrift";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct HackToThrift
+
+struct ThriftToHack : Predicate<std::tuple<facebook::glean::cpp::schema::Fbthrift::Declaration, Declaration>> {
+  static const char* GLEAN_name() {
+    return "hack.ThriftToHack";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct ThriftToHack
+
+} // namespace Hack
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Fbthrift::ContainerType> {
+  using Type = Sum<facebook::glean::cpp::schema::Fbthrift::TypeSpecification, facebook::glean::cpp::schema::Fbthrift::TypeSpecification, Repr<facebook::glean::cpp::schema::Fbthrift::MapType>>;
+};
+
+
+namespace schema {
+
+namespace Fbthrift {
+
+struct ContainerType {
+  boost::variant<Alt<0, Fact<TypeSpecification>>, Alt<1, Fact<TypeSpecification>>, Alt<2, MapType>> GLEAN_value;
+
+  static ContainerType list_(const Fact<TypeSpecification>& a) {
+    return ContainerType{Alt<0, Fact<TypeSpecification>>(a)};
+  }
+  static ContainerType set_(const Fact<TypeSpecification>& a) {
+    return ContainerType{Alt<1, Fact<TypeSpecification>>(a)};
+  }
+  static ContainerType map_(const MapType& a) {
+    return ContainerType{Alt<2, MapType>(a)};
+  }
+
+  bool operator==(const ContainerType& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const ContainerType& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const ContainerType& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const ContainerType& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const ContainerType& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const ContainerType& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<ContainerType>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct ContainerType
+
+struct TypeSpecification : Predicate<boost::variant<Alt<0, PrimitiveType>, Alt<1, ContainerType>, Alt<2, NamedType>>> {
+  static const char* GLEAN_name() {
+    return "fbthrift.TypeSpecification";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct TypeSpecification
+
+struct ConstantDefinition : Predicate<std::tuple<Fact<Constant>, TypedConstT>> {
+  static const char* GLEAN_name() {
+    return "fbthrift.ConstantDefinition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct ConstantDefinition
+
+struct Constant : Predicate<std::tuple<Fact<QualName>>> {
+  static const char* GLEAN_name() {
+    return "fbthrift.Constant";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct Constant
+
+} // namespace Fbthrift
+
+namespace Erlang {
+
+struct NameLowerCase : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "erlang.NameLowerCase";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct NameLowerCase
+
+} // namespace Erlang
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Erlang::Fqn> {
+  using Type = Tuple<String, String, Nat>;
+};
+
+
+namespace schema {
+
+namespace Erlang {
+
+struct Fqn {
+  std::string module;
+  std::string name;
+  uint64_t arity;
+
+  bool operator==(const Fqn& other) const {
+    return std::tie(module,name,arity)
+             == std::tie(other.module,other.name,other.arity);
+  }
+  bool operator!=(const Fqn& other) const {
+    return std::tie(module,name,arity)
+             != std::tie(other.module,other.name,other.arity);
+  }
+  bool operator<(const Fqn& other) const {
+    return std::tie(module,name,arity)
+             < std::tie(other.module,other.name,other.arity);
+  }
+  bool operator<=(const Fqn& other) const {
+    return std::tie(module,name,arity)
+             <= std::tie(other.module,other.name,other.arity);
+  }
+  bool operator>(const Fqn& other) const {
+    return std::tie(module,name,arity)
+             > std::tie(other.module,other.name,other.arity);
+  }
+  bool operator>=(const Fqn& other) const {
+    return std::tie(module,name,arity)
+             >= std::tie(other.module,other.name,other.arity);
+  }
+  void outputRepr(Output<Repr<Fqn>> out) const {
+    outputValue(out, std::make_tuple(module, name, arity));
+  }
+}; // struct Fqn
+
+struct FunctionDeclaration : Predicate<std::tuple<Fqn, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "erlang.FunctionDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct FunctionDeclaration
+
+} // namespace Erlang
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Erlang::XRefViaFqn> {
+  using Type = Tuple<Repr<facebook::glean::cpp::schema::Erlang::Fqn>, Repr<facebook::glean::cpp::schema::Src::ByteSpan>>;
+};
+
+
+namespace schema {
+
+namespace Erlang {
+
+struct XRefViaFqn {
+  Fqn target;
+  facebook::glean::cpp::schema::Src::ByteSpan source;
+
+  bool operator==(const XRefViaFqn& other) const {
+    return std::tie(target,source)
+             == std::tie(other.target,other.source);
+  }
+  bool operator!=(const XRefViaFqn& other) const {
+    return std::tie(target,source)
+             != std::tie(other.target,other.source);
+  }
+  bool operator<(const XRefViaFqn& other) const {
+    return std::tie(target,source)
+             < std::tie(other.target,other.source);
+  }
+  bool operator<=(const XRefViaFqn& other) const {
+    return std::tie(target,source)
+             <= std::tie(other.target,other.source);
+  }
+  bool operator>(const XRefViaFqn& other) const {
+    return std::tie(target,source)
+             > std::tie(other.target,other.source);
+  }
+  bool operator>=(const XRefViaFqn& other) const {
+    return std::tie(target,source)
+             >= std::tie(other.target,other.source);
+  }
+  void outputRepr(Output<Repr<XRefViaFqn>> out) const {
+    outputValue(out, std::make_tuple(target, source));
+  }
+}; // struct XRefViaFqn
+
+struct XRefsViaFqnByFile : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, std::vector<XRefViaFqn>>> {
+  static const char* GLEAN_name() {
+    return "erlang.XRefsViaFqnByFile";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct XRefsViaFqnByFile
+
+struct DeclarationComment : Predicate<std::tuple<Fact<FunctionDeclaration>, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan, boost::variant<Alt<0, std::tuple<>>, Alt<1, std::string>>>> {
+  static const char* GLEAN_name() {
+    return "erlang.DeclarationComment";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct DeclarationComment
+
+} // namespace Erlang
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Erlang::Declaration> {
+  using Type = Sum<facebook::glean::cpp::schema::Erlang::FunctionDeclaration>;
+};
+
+
+namespace schema {
+
+namespace Erlang {
+
+struct Declaration {
+  boost::variant<Alt<0, Fact<FunctionDeclaration>>> GLEAN_value;
+
+  static Declaration func(const Fact<FunctionDeclaration>& a) {
+    return Declaration{Alt<0, Fact<FunctionDeclaration>>(a)};
+  }
+
+  bool operator==(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Declaration>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Declaration
+
+struct DeclarationLocation : Predicate<std::tuple<Declaration, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "erlang.DeclarationLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct DeclarationLocation
+
+struct DeclarationReference : Predicate<std::tuple<Declaration, Declaration>> {
+  static const char* GLEAN_name() {
+    return "erlang.DeclarationReference";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct DeclarationReference
+
+struct DeclarationToFqn : Predicate<Declaration, Fqn> {
+  static const char* GLEAN_name() {
+    return "erlang.DeclarationToFqn";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct DeclarationToFqn
+
+struct DeclarationUses : Predicate<std::tuple<Declaration, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "erlang.DeclarationUses";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct DeclarationUses
+
+struct DeclarationWithFqn : Predicate<std::tuple<Fqn, Declaration>> {
+  static const char* GLEAN_name() {
+    return "erlang.DeclarationWithFqn";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct DeclarationWithFqn
+
+struct DeclarationsByFile : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan, Declaration>> {
+  static const char* GLEAN_name() {
+    return "erlang.DeclarationsByFile";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct DeclarationsByFile
+
+struct SearchByName : Predicate<std::tuple<std::string, Declaration>> {
+  static const char* GLEAN_name() {
+    return "erlang.SearchByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct SearchByName
+
+} // namespace Erlang
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Dyn::Usage> {
+  using Type = Enum<3>;
+};
+
+
+namespace schema {
+
+namespace Dyn {
+
+enum class Usage { Unused, Enumerated, Used };
+
+struct ObserverIdentifier : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "dyn.ObserverIdentifier";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct ObserverIdentifier
+
+} // namespace Dyn
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Dyn::Observer> {
+  using Type = Sum<facebook::glean::cpp::schema::Dyn::ObserverIdentifier, facebook::glean::cpp::schema::Dyn::ObserverIdentifier>;
+};
+
+
+namespace schema {
+
+namespace Dyn {
+
+struct Observer {
+  boost::variant<Alt<0, Fact<ObserverIdentifier>>, Alt<1, Fact<ObserverIdentifier>>> GLEAN_value;
+
+  static Observer symbol(const Fact<ObserverIdentifier>& a) {
+    return Observer{Alt<0, Fact<ObserverIdentifier>>(a)};
+  }
+  static Observer other(const Fact<ObserverIdentifier>& a) {
+    return Observer{Alt<1, Fact<ObserverIdentifier>>(a)};
+  }
+
+  bool operator==(const Observer& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Observer& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Observer& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Observer& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Observer& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Observer& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Observer>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Observer
+
+struct Environment : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "dyn.Environment";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct Environment
+
+struct EntityDynamicReference : Predicate<std::tuple<Fact<EntityUsage>, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "dyn.EntityDynamicReference";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct EntityDynamicReference
+
+} // namespace Dyn
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Digest::Digest> {
+  using Type = Tuple<String, Nat>;
+};
+
+
+namespace schema {
+
+namespace Digest {
+
+struct Digest {
+  std::string hash;
+  uint64_t size;
+
+  bool operator==(const Digest& other) const {
+    return std::tie(hash,size)
+             == std::tie(other.hash,other.size);
+  }
+  bool operator!=(const Digest& other) const {
+    return std::tie(hash,size)
+             != std::tie(other.hash,other.size);
+  }
+  bool operator<(const Digest& other) const {
+    return std::tie(hash,size)
+             < std::tie(other.hash,other.size);
+  }
+  bool operator<=(const Digest& other) const {
+    return std::tie(hash,size)
+             <= std::tie(other.hash,other.size);
+  }
+  bool operator>(const Digest& other) const {
+    return std::tie(hash,size)
+             > std::tie(other.hash,other.size);
+  }
+  bool operator>=(const Digest& other) const {
+    return std::tie(hash,size)
+             >= std::tie(other.hash,other.size);
+  }
+  void outputRepr(Output<Repr<Digest>> out) const {
+    outputValue(out, std::make_tuple(hash, size));
+  }
+}; // struct Digest
+
+struct FileDigest : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, Digest>> {
+  static const char* GLEAN_name() {
+    return "digest.FileDigest";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct FileDigest
+
+} // namespace Digest
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Glass::FileMetadata> {
+  using Type = Tuple<Bool, Maybe<facebook::glean::cpp::schema::Src::FileLines>, Maybe<Repr<facebook::glean::cpp::schema::Digest::Digest>>, Maybe<facebook::glean::cpp::schema::Src::IndexFailure>>;
+};
+
+
+namespace schema {
+
+namespace Glass {
+
+struct FileMetadata {
+  bool indexed;
+  boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<facebook::glean::cpp::schema::Src::FileLines>>> offsets;
+  boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Digest::Digest>> digest;
+  boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<facebook::glean::cpp::schema::Src::IndexFailure>>> indexFailure;
+
+  bool operator==(const FileMetadata& other) const {
+    return std::tie(indexed,offsets,digest,indexFailure)
+             == std::tie(other.indexed,other.offsets,other.digest,other.indexFailure);
+  }
+  bool operator!=(const FileMetadata& other) const {
+    return std::tie(indexed,offsets,digest,indexFailure)
+             != std::tie(other.indexed,other.offsets,other.digest,other.indexFailure);
+  }
+  bool operator<(const FileMetadata& other) const {
+    return std::tie(indexed,offsets,digest,indexFailure)
+             < std::tie(other.indexed,other.offsets,other.digest,other.indexFailure);
+  }
+  bool operator<=(const FileMetadata& other) const {
+    return std::tie(indexed,offsets,digest,indexFailure)
+             <= std::tie(other.indexed,other.offsets,other.digest,other.indexFailure);
+  }
+  bool operator>(const FileMetadata& other) const {
+    return std::tie(indexed,offsets,digest,indexFailure)
+             > std::tie(other.indexed,other.offsets,other.digest,other.indexFailure);
+  }
+  bool operator>=(const FileMetadata& other) const {
+    return std::tie(indexed,offsets,digest,indexFailure)
+             >= std::tie(other.indexed,other.offsets,other.digest,other.indexFailure);
+  }
+  void outputRepr(Output<Repr<FileMetadata>> out) const {
+    outputValue(out, std::make_tuple(indexed, offsets, digest, indexFailure));
+  }
+}; // struct FileMetadata
+
+struct FileInfo : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, FileMetadata>> {
+  static const char* GLEAN_name() {
+    return "glass.FileInfo";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct FileInfo
+
+} // namespace Glass
+
+namespace Dataswarm {
+
+struct TableDeclaration : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "dataswarm.TableDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct TableDeclaration
+
+struct TableColumnDeclaration : Predicate<std::tuple<std::string, std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "dataswarm.TableColumnDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct TableColumnDeclaration
+
+struct SubqueryDeclaration : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "dataswarm.SubqueryDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct SubqueryDeclaration
+
+struct SubqueryColumnDeclaration : Predicate<std::tuple<std::string, std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "dataswarm.SubqueryColumnDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct SubqueryColumnDeclaration
+
+struct MacroDeclaration : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "dataswarm.MacroDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct MacroDeclaration
+
+} // namespace Dataswarm
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Dataswarm::Declaration> {
+  using Type = Sum<facebook::glean::cpp::schema::Dataswarm::MacroDeclaration, facebook::glean::cpp::schema::Dataswarm::TableDeclaration, facebook::glean::cpp::schema::Dataswarm::SubqueryDeclaration, facebook::glean::cpp::schema::Dataswarm::TableColumnDeclaration, facebook::glean::cpp::schema::Dataswarm::SubqueryColumnDeclaration>;
+};
+
+
+namespace schema {
+
+namespace Dataswarm {
+
+struct Declaration {
+  boost::variant<Alt<0, Fact<MacroDeclaration>>, Alt<1, Fact<TableDeclaration>>, Alt<2, Fact<SubqueryDeclaration>>, Alt<3, Fact<TableColumnDeclaration>>, Alt<4, Fact<SubqueryColumnDeclaration>>> GLEAN_value;
+
+  static Declaration macro(const Fact<MacroDeclaration>& a) {
+    return Declaration{Alt<0, Fact<MacroDeclaration>>(a)};
+  }
+  static Declaration table(const Fact<TableDeclaration>& a) {
+    return Declaration{Alt<1, Fact<TableDeclaration>>(a)};
+  }
+  static Declaration subquery(const Fact<SubqueryDeclaration>& a) {
+    return Declaration{Alt<2, Fact<SubqueryDeclaration>>(a)};
+  }
+  static Declaration table_column(const Fact<TableColumnDeclaration>& a) {
+    return Declaration{Alt<3, Fact<TableColumnDeclaration>>(a)};
+  }
+  static Declaration subquery_column(const Fact<SubqueryColumnDeclaration>& a) {
+    return Declaration{Alt<4, Fact<SubqueryColumnDeclaration>>(a)};
+  }
+
+  bool operator==(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Declaration>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Declaration
+
+struct DeclarationLocation : Predicate<std::tuple<Declaration, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "dataswarm.DeclarationLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct DeclarationLocation
+
+struct DeclarationName : Predicate<std::tuple<Declaration, std::string>> {
+  static const char* GLEAN_name() {
+    return "dataswarm.DeclarationName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct DeclarationName
+
+} // namespace Dataswarm
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Dataswarm::XRef> {
+  using Type = Tuple<Repr<facebook::glean::cpp::schema::Dataswarm::Declaration>, Repr<facebook::glean::cpp::schema::Src::ByteSpan>>;
+};
+
+
+namespace schema {
+
+namespace Dataswarm {
+
+struct XRef {
+  Declaration target;
+  facebook::glean::cpp::schema::Src::ByteSpan source;
+
+  bool operator==(const XRef& other) const {
+    return std::tie(target,source)
+             == std::tie(other.target,other.source);
+  }
+  bool operator!=(const XRef& other) const {
+    return std::tie(target,source)
+             != std::tie(other.target,other.source);
+  }
+  bool operator<(const XRef& other) const {
+    return std::tie(target,source)
+             < std::tie(other.target,other.source);
+  }
+  bool operator<=(const XRef& other) const {
+    return std::tie(target,source)
+             <= std::tie(other.target,other.source);
+  }
+  bool operator>(const XRef& other) const {
+    return std::tie(target,source)
+             > std::tie(other.target,other.source);
+  }
+  bool operator>=(const XRef& other) const {
+    return std::tie(target,source)
+             >= std::tie(other.target,other.source);
+  }
+  void outputRepr(Output<Repr<XRef>> out) const {
+    outputValue(out, std::make_tuple(target, source));
+  }
+}; // struct XRef
+
+struct XRefsByFile : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, std::vector<XRef>>> {
+  static const char* GLEAN_name() {
+    return "dataswarm.XRefsByFile";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct XRefsByFile
+
+} // namespace Dataswarm
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Cxx1::XRefVia> {
+  using Type = Sum<facebook::glean::cpp::schema::Cxx1::UsingDeclaration, facebook::glean::cpp::schema::Cxx1::UsingDirective, facebook::glean::cpp::schema::Pp1::Use>;
+};
+
+
+namespace schema {
+
+namespace Cxx1 {
+
+struct XRefVia {
+  boost::variant<Alt<0, Fact<UsingDeclaration>>, Alt<1, Fact<UsingDirective>>, Alt<2, Fact<facebook::glean::cpp::schema::Pp1::Use>>> GLEAN_value;
+
+  static XRefVia usingDeclaration(const Fact<UsingDeclaration>& a) {
+    return XRefVia{Alt<0, Fact<UsingDeclaration>>(a)};
+  }
+  static XRefVia usingDirective(const Fact<UsingDirective>& a) {
+    return XRefVia{Alt<1, Fact<UsingDirective>>(a)};
+  }
+  static XRefVia macro(const Fact<facebook::glean::cpp::schema::Pp1::Use>& a) {
+    return XRefVia{Alt<2, Fact<facebook::glean::cpp::schema::Pp1::Use>>(a)};
+  }
+
+  bool operator==(const XRefVia& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const XRefVia& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const XRefVia& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const XRefVia& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const XRefVia& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const XRefVia& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<XRefVia>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct XRefVia
+
+struct VariableLowerCase : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "cxx1.VariableLowerCase";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct VariableLowerCase
+
+struct UsingDirective : Predicate<std::tuple<Fact<QName>, facebook::glean::cpp::schema::Src::Range>> {
+  static const char* GLEAN_name() {
+    return "cxx1.UsingDirective";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct UsingDirective
+
+struct UsingDeclaration : Predicate<std::tuple<Fact<FunctionQName>, facebook::glean::cpp::schema::Src::Range>> {
+  static const char* GLEAN_name() {
+    return "cxx1.UsingDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct UsingDeclaration
+
+using USR = std::string;
+
+struct TypeAliasLowerCase : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "cxx1.TypeAliasLowerCase";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct TypeAliasLowerCase
+
+} // namespace Cxx1
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Cxx1::TypeAliasKind> {
+  using Type = Enum<2>;
+};
+
+
+namespace schema {
+
+namespace Cxx1 {
+
+enum class TypeAliasKind { Typedef, Using };
+
+struct TypeAliasDeclaration : Predicate<std::tuple<Fact<QName>, Fact<Type>, TypeAliasKind, facebook::glean::cpp::schema::Src::Range>> {
+  static const char* GLEAN_name() {
+    return "cxx1.TypeAliasDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct TypeAliasDeclaration
+
+struct Type : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "cxx1.Type";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct Type
+
+struct TranslationUnitXRefs : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Buck::TranslationUnit>, std::vector<Fact<FileXRefs>>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.TranslationUnitXRefs";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct TranslationUnitXRefs
+
+struct TranslationUnitTrace : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Buck::TranslationUnit>, Fact<Trace>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.TranslationUnitTrace";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct TranslationUnitTrace
+
+struct TranslationUnitIncludeTree : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Buck::TranslationUnit>, Fact<IncludeTree>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.TranslationUnitIncludeTree";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct TranslationUnitIncludeTree
+
+struct Trace : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, Fact<Declarations>, Fact<PPTrace>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.Trace";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct Trace
+
+} // namespace Cxx1
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Cxx1::RefQualifier> {
+  using Type = Enum<3>;
+};
+
+
+namespace schema {
+
+namespace Cxx1 {
+
+enum class RefQualifier { None_, LValue, RValue };
+
+struct RecordUnionLowerCase : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "cxx1.RecordUnionLowerCase";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct RecordUnionLowerCase
+
+struct RecordStructLowerCase : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "cxx1.RecordStructLowerCase";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct RecordStructLowerCase
+
+struct RecordDerived : Predicate<std::tuple<Fact<RecordDeclaration>, Fact<RecordDeclaration>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.RecordDerived";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct RecordDerived
+
+struct RecordClassLowerCase : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "cxx1.RecordClassLowerCase";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct RecordClassLowerCase
+
+} // namespace Cxx1
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Cxx1::PpEntity> {
+  using Type = Sum<facebook::glean::cpp::schema::Pp1::Define, facebook::glean::cpp::schema::Pp1::Undef, facebook::glean::cpp::schema::Src::File>;
+};
+
+
+namespace schema {
+
+namespace Cxx1 {
+
+struct PpEntity {
+  boost::variant<Alt<0, Fact<facebook::glean::cpp::schema::Pp1::Define>>, Alt<1, Fact<facebook::glean::cpp::schema::Pp1::Undef>>, Alt<2, Fact<facebook::glean::cpp::schema::Src::File>>> GLEAN_value;
+
+  static PpEntity define(const Fact<facebook::glean::cpp::schema::Pp1::Define>& a) {
+    return PpEntity{Alt<0, Fact<facebook::glean::cpp::schema::Pp1::Define>>(a)};
+  }
+  static PpEntity undef(const Fact<facebook::glean::cpp::schema::Pp1::Undef>& a) {
+    return PpEntity{Alt<1, Fact<facebook::glean::cpp::schema::Pp1::Undef>>(a)};
+  }
+  static PpEntity include_(const Fact<facebook::glean::cpp::schema::Src::File>& a) {
+    return PpEntity{Alt<2, Fact<facebook::glean::cpp::schema::Src::File>>(a)};
+  }
+
+  bool operator==(const PpEntity& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const PpEntity& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const PpEntity& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const PpEntity& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const PpEntity& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const PpEntity& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<PpEntity>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct PpEntity
+
+} // namespace Cxx1
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Cxx1::Parameter> {
+  using Type = Tuple<facebook::glean::cpp::schema::Cxx1::Name, facebook::glean::cpp::schema::Cxx1::Type>;
+};
+
+
+namespace schema {
+
+namespace Cxx1 {
+
+struct Parameter {
+  Fact<Name> name;
+  Fact<Type> type;
+
+  bool operator==(const Parameter& other) const {
+    return std::tie(name,type)
+             == std::tie(other.name,other.type);
+  }
+  bool operator!=(const Parameter& other) const {
+    return std::tie(name,type)
+             != std::tie(other.name,other.type);
+  }
+  bool operator<(const Parameter& other) const {
+    return std::tie(name,type)
+             < std::tie(other.name,other.type);
+  }
+  bool operator<=(const Parameter& other) const {
+    return std::tie(name,type)
+             <= std::tie(other.name,other.type);
+  }
+  bool operator>(const Parameter& other) const {
+    return std::tie(name,type)
+             > std::tie(other.name,other.type);
+  }
+  bool operator>=(const Parameter& other) const {
+    return std::tie(name,type)
+             >= std::tie(other.name,other.type);
+  }
+  void outputRepr(Output<Repr<Parameter>> out) const {
+    outputValue(out, std::make_tuple(name, type));
+  }
+}; // struct Parameter
+
+struct Signature : Predicate<std::tuple<Fact<Type>, std::vector<Parameter>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.Signature";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct Signature
+
+struct PPDefineLocation : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Pp1::Define>, std::string, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::Range>> {
+  static const char* GLEAN_name() {
+    return "cxx1.PPDefineLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct PPDefineLocation
+
+using Operator = std::string;
+
+} // namespace Cxx1
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Cxx1::ObjcSelectorSlot> {
+  using Type = Tuple<facebook::glean::cpp::schema::Cxx1::ObjcMethodDeclaration, Nat>;
+};
+
+
+namespace schema {
+
+namespace Cxx1 {
+
+struct ObjcSelectorSlot {
+  Fact<ObjcMethodDeclaration> objcMethod;
+  uint64_t index;
+
+  bool operator==(const ObjcSelectorSlot& other) const {
+    return std::tie(objcMethod,index)
+             == std::tie(other.objcMethod,other.index);
+  }
+  bool operator!=(const ObjcSelectorSlot& other) const {
+    return std::tie(objcMethod,index)
+             != std::tie(other.objcMethod,other.index);
+  }
+  bool operator<(const ObjcSelectorSlot& other) const {
+    return std::tie(objcMethod,index)
+             < std::tie(other.objcMethod,other.index);
+  }
+  bool operator<=(const ObjcSelectorSlot& other) const {
+    return std::tie(objcMethod,index)
+             <= std::tie(other.objcMethod,other.index);
+  }
+  bool operator>(const ObjcSelectorSlot& other) const {
+    return std::tie(objcMethod,index)
+             > std::tie(other.objcMethod,other.index);
+  }
+  bool operator>=(const ObjcSelectorSlot& other) const {
+    return std::tie(objcMethod,index)
+             >= std::tie(other.objcMethod,other.index);
+  }
+  void outputRepr(Output<Repr<ObjcSelectorSlot>> out) const {
+    outputValue(out, std::make_tuple(objcMethod, index));
+  }
+}; // struct ObjcSelectorSlot
+
+struct ObjcSelector : Predicate<std::vector<std::string>> {
+  static const char* GLEAN_name() {
+    return "cxx1.ObjcSelector";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct ObjcSelector
+
+} // namespace Cxx1
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Cxx1::ObjcPropertyKind> {
+  using Type = Enum<2>;
+};
+
+
+namespace schema {
+
+namespace Cxx1 {
+
+enum class ObjcPropertyKind { Synthesize, Dynamic };
+
+struct ObjcPropertyImplementation : Predicate<std::tuple<Fact<ObjcPropertyDeclaration>, ObjcPropertyKind, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Name>>>, facebook::glean::cpp::schema::Src::Range>> {
+  static const char* GLEAN_name() {
+    return "cxx1.ObjcPropertyImplementation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct ObjcPropertyImplementation
+
+struct ObjcPropertyIVar : Predicate<std::tuple<Fact<ObjcPropertyDeclaration>, Fact<VariableDeclaration>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.ObjcPropertyIVar";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct ObjcPropertyIVar
+
+struct ObjcMethodDefinition : Predicate<Fact<ObjcMethodDeclaration>> {
+  static const char* GLEAN_name() {
+    return "cxx1.ObjcMethodDefinition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct ObjcMethodDefinition
+
+struct ObjcMethodDeclarationName : Predicate<std::tuple<Fact<ObjcMethodDeclaration>, Fact<Name>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.ObjcMethodDeclarationName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct ObjcMethodDeclarationName
+
+struct ObjcInterfaceToImplementation : Predicate<std::tuple<Fact<ObjcContainerDeclaration>, Fact<ObjcContainerDeclaration>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.ObjcInterfaceToImplementation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct ObjcInterfaceToImplementation
+
+struct ObjcImplements : Predicate<std::tuple<Fact<ObjcContainerDeclaration>, Fact<ObjcContainerDeclaration>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.ObjcImplements";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct ObjcImplements
+
+} // namespace Cxx1
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Cxx1::ObjcIVar> {
+  using Type = Tuple<Bool, Maybe<Nat>>;
+};
+
+
+namespace schema {
+
+namespace Cxx1 {
+
+struct ObjcIVar {
+  bool synthesize;
+  boost::variant<Alt<0, std::tuple<>>, Alt<1, uint64_t>> bitsize;
+
+  bool operator==(const ObjcIVar& other) const {
+    return std::tie(synthesize,bitsize)
+             == std::tie(other.synthesize,other.bitsize);
+  }
+  bool operator!=(const ObjcIVar& other) const {
+    return std::tie(synthesize,bitsize)
+             != std::tie(other.synthesize,other.bitsize);
+  }
+  bool operator<(const ObjcIVar& other) const {
+    return std::tie(synthesize,bitsize)
+             < std::tie(other.synthesize,other.bitsize);
+  }
+  bool operator<=(const ObjcIVar& other) const {
+    return std::tie(synthesize,bitsize)
+             <= std::tie(other.synthesize,other.bitsize);
+  }
+  bool operator>(const ObjcIVar& other) const {
+    return std::tie(synthesize,bitsize)
+             > std::tie(other.synthesize,other.bitsize);
+  }
+  bool operator>=(const ObjcIVar& other) const {
+    return std::tie(synthesize,bitsize)
+             >= std::tie(other.synthesize,other.bitsize);
+  }
+  void outputRepr(Output<Repr<ObjcIVar>> out) const {
+    outputValue(out, std::make_tuple(synthesize, bitsize));
+  }
+}; // struct ObjcIVar
+
+struct ObjcContainerInterfaceLowerCase : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "cxx1.ObjcContainerInterfaceLowerCase";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct ObjcContainerInterfaceLowerCase
+
+struct ObjcContainerInheritance : Predicate<std::tuple<Fact<ObjcContainerDeclaration>, Fact<ObjcContainerDeclaration>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.ObjcContainerInheritance";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct ObjcContainerInheritance
+
+struct ObjcContainerDefinition : Predicate<std::tuple<Fact<ObjcContainerDeclaration>, std::vector<Fact<ObjcContainerDeclaration>>, Fact<Declarations>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.ObjcContainerDefinition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct ObjcContainerDefinition
+
+struct ObjcContainerDeclarationInterface : Predicate<std::tuple<std::string, Fact<ObjcContainerDeclaration>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.ObjcContainerDeclarationInterface";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct ObjcContainerDeclarationInterface
+
+struct ObjcContainerBase : Predicate<std::tuple<Fact<ObjcContainerDeclaration>, Fact<ObjcContainerDeclaration>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.ObjcContainerBase";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct ObjcContainerBase
+
+} // namespace Cxx1
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Cxx1::ObjcCategoryId> {
+  using Type = Tuple<facebook::glean::cpp::schema::Cxx1::Name, facebook::glean::cpp::schema::Cxx1::Name>;
+};
+
+
+namespace schema {
+
+namespace Cxx1 {
+
+struct ObjcCategoryId {
+  Fact<Name> className;
+  Fact<Name> categoryName;
+
+  bool operator==(const ObjcCategoryId& other) const {
+    return std::tie(className,categoryName)
+             == std::tie(other.className,other.categoryName);
+  }
+  bool operator!=(const ObjcCategoryId& other) const {
+    return std::tie(className,categoryName)
+             != std::tie(other.className,other.categoryName);
+  }
+  bool operator<(const ObjcCategoryId& other) const {
+    return std::tie(className,categoryName)
+             < std::tie(other.className,other.categoryName);
+  }
+  bool operator<=(const ObjcCategoryId& other) const {
+    return std::tie(className,categoryName)
+             <= std::tie(other.className,other.categoryName);
+  }
+  bool operator>(const ObjcCategoryId& other) const {
+    return std::tie(className,categoryName)
+             > std::tie(other.className,other.categoryName);
+  }
+  bool operator>=(const ObjcCategoryId& other) const {
+    return std::tie(className,categoryName)
+             >= std::tie(other.className,other.categoryName);
+  }
+  void outputRepr(Output<Repr<ObjcCategoryId>> out) const {
+    outputValue(out, std::make_tuple(className, categoryName));
+  }
+}; // struct ObjcCategoryId
+
+} // namespace Cxx1
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Cxx1::ObjcContainerId> {
+  using Type = Sum<facebook::glean::cpp::schema::Cxx1::Name, facebook::glean::cpp::schema::Cxx1::Name, Repr<facebook::glean::cpp::schema::Cxx1::ObjcCategoryId>, facebook::glean::cpp::schema::Cxx1::Name, facebook::glean::cpp::schema::Cxx1::Name, Repr<facebook::glean::cpp::schema::Cxx1::ObjcCategoryId>>;
+};
+
+
+namespace schema {
+
+namespace Cxx1 {
+
+struct ObjcContainerId {
+  boost::variant<Alt<0, Fact<Name>>, Alt<1, Fact<Name>>, Alt<2, ObjcCategoryId>, Alt<3, Fact<Name>>, Alt<4, Fact<Name>>, Alt<5, ObjcCategoryId>> GLEAN_value;
+
+  static ObjcContainerId protocol(const Fact<Name>& a) {
+    return ObjcContainerId{Alt<0, Fact<Name>>(a)};
+  }
+  static ObjcContainerId interface_(const Fact<Name>& a) {
+    return ObjcContainerId{Alt<1, Fact<Name>>(a)};
+  }
+  static ObjcContainerId categoryInterface(const ObjcCategoryId& a) {
+    return ObjcContainerId{Alt<2, ObjcCategoryId>(a)};
+  }
+  static ObjcContainerId extensionInterface(const Fact<Name>& a) {
+    return ObjcContainerId{Alt<3, Fact<Name>>(a)};
+  }
+  static ObjcContainerId implementation(const Fact<Name>& a) {
+    return ObjcContainerId{Alt<4, Fact<Name>>(a)};
+  }
+  static ObjcContainerId categoryImplementation(const ObjcCategoryId& a) {
+    return ObjcContainerId{Alt<5, ObjcCategoryId>(a)};
+  }
+
+  bool operator==(const ObjcContainerId& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const ObjcContainerId& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const ObjcContainerId& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const ObjcContainerId& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const ObjcContainerId& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const ObjcContainerId& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<ObjcContainerId>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct ObjcContainerId
+
+struct ObjcContainerDeclaration : Predicate<std::tuple<ObjcContainerId, facebook::glean::cpp::schema::Src::Range>> {
+  static const char* GLEAN_name() {
+    return "cxx1.ObjcContainerDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct ObjcContainerDeclaration
+
+struct ObjcMethodDeclaration : Predicate<std::tuple<Fact<ObjcSelector>, std::vector<facebook::glean::cpp::schema::Src::FileLocation>, ObjcContainerId, Fact<Signature>, bool, bool, bool, facebook::glean::cpp::schema::Src::Range>> {
+  static const char* GLEAN_name() {
+    return "cxx1.ObjcMethodDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct ObjcMethodDeclaration
+
+struct ObjcPropertyDeclaration : Predicate<std::tuple<Fact<Name>, ObjcContainerId, Fact<Type>, bool, bool, bool, bool, facebook::glean::cpp::schema::Src::Range>> {
+  static const char* GLEAN_name() {
+    return "cxx1.ObjcPropertyDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct ObjcPropertyDeclaration
+
+struct ObjContainerIdName : Predicate<std::tuple<ObjcContainerId, Fact<Name>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.ObjContainerIdName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct ObjContainerIdName
+
+} // namespace Cxx1
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Cxx1::NamespaceTarget> {
+  using Type = Sum<facebook::glean::cpp::schema::Cxx1::NamespaceDeclaration, facebook::glean::cpp::schema::Cxx1::NamespaceAliasDeclaration>;
+};
+
+
+namespace schema {
+
+namespace Cxx1 {
+
+struct NamespaceTarget {
+  boost::variant<Alt<0, Fact<NamespaceDeclaration>>, Alt<1, Fact<NamespaceAliasDeclaration>>> GLEAN_value;
+
+  static NamespaceTarget namespace_(const Fact<NamespaceDeclaration>& a) {
+    return NamespaceTarget{Alt<0, Fact<NamespaceDeclaration>>(a)};
+  }
+  static NamespaceTarget namespaceAlias(const Fact<NamespaceAliasDeclaration>& a) {
+    return NamespaceTarget{Alt<1, Fact<NamespaceAliasDeclaration>>(a)};
+  }
+
+  bool operator==(const NamespaceTarget& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const NamespaceTarget& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const NamespaceTarget& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const NamespaceTarget& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const NamespaceTarget& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const NamespaceTarget& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<NamespaceTarget>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct NamespaceTarget
+
+struct NamespaceQName : Predicate<std::tuple<boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Name>>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<NamespaceQName>>>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.NamespaceQName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct NamespaceQName
+
+struct NamespaceLowerCase : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "cxx1.NamespaceLowerCase";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct NamespaceLowerCase
+
+struct NamespaceDefinition : Predicate<std::tuple<Fact<NamespaceDeclaration>, Fact<Declarations>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.NamespaceDefinition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct NamespaceDefinition
+
+struct NamespaceDeclarationName : Predicate<std::tuple<Fact<NamespaceQName>, Fact<Name>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.NamespaceDeclarationName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct NamespaceDeclarationName
+
+struct NamespaceDeclarationByName : Predicate<std::tuple<std::string, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<NamespaceQName>>>, Fact<NamespaceDeclaration>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.NamespaceDeclarationByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct NamespaceDeclarationByName
+
+struct NamespaceDeclaration : Predicate<std::tuple<Fact<NamespaceQName>, facebook::glean::cpp::schema::Src::Range>> {
+  static const char* GLEAN_name() {
+    return "cxx1.NamespaceDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct NamespaceDeclaration
+
+struct NamespaceAliasDeclaration : Predicate<std::tuple<Fact<NamespaceQName>, NamespaceTarget, facebook::glean::cpp::schema::Src::Range>> {
+  static const char* GLEAN_name() {
+    return "cxx1.NamespaceAliasDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct NamespaceAliasDeclaration
+
+struct Name : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "cxx1.Name";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct Name
+
+} // namespace Cxx1
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Cxx1::MethodSignature> {
+  using Type = Tuple<Bool, Bool, Bool, Repr<facebook::glean::cpp::schema::Cxx1::RefQualifier>>;
+};
+
+
+namespace schema {
+
+namespace Cxx1 {
+
+struct MethodSignature {
+  bool isVirtual;
+  bool isConst;
+  bool isVolatile;
+  RefQualifier refQualifier;
+
+  bool operator==(const MethodSignature& other) const {
+    return std::tie(isVirtual,isConst,isVolatile,refQualifier)
+             == std::tie(other.isVirtual,other.isConst,other.isVolatile,other.refQualifier);
+  }
+  bool operator!=(const MethodSignature& other) const {
+    return std::tie(isVirtual,isConst,isVolatile,refQualifier)
+             != std::tie(other.isVirtual,other.isConst,other.isVolatile,other.refQualifier);
+  }
+  bool operator<(const MethodSignature& other) const {
+    return std::tie(isVirtual,isConst,isVolatile,refQualifier)
+             < std::tie(other.isVirtual,other.isConst,other.isVolatile,other.refQualifier);
+  }
+  bool operator<=(const MethodSignature& other) const {
+    return std::tie(isVirtual,isConst,isVolatile,refQualifier)
+             <= std::tie(other.isVirtual,other.isConst,other.isVolatile,other.refQualifier);
+  }
+  bool operator>(const MethodSignature& other) const {
+    return std::tie(isVirtual,isConst,isVolatile,refQualifier)
+             > std::tie(other.isVirtual,other.isConst,other.isVolatile,other.refQualifier);
+  }
+  bool operator>=(const MethodSignature& other) const {
+    return std::tie(isVirtual,isConst,isVolatile,refQualifier)
+             >= std::tie(other.isVirtual,other.isConst,other.isVolatile,other.refQualifier);
+  }
+  void outputRepr(Output<Repr<MethodSignature>> out) const {
+    outputValue(out, std::make_tuple(isVirtual, isConst, isVolatile, refQualifier));
+  }
+}; // struct MethodSignature
+
+struct MethodOverrides : Predicate<std::tuple<Fact<FunctionDeclaration>, Fact<FunctionDeclaration>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.MethodOverrides";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct MethodOverrides
+
+struct MethodOverridden : Predicate<std::tuple<Fact<FunctionDeclaration>, Fact<FunctionDeclaration>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.MethodOverridden";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct MethodOverridden
+
+} // namespace Cxx1
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Cxx1::MaybeIncludeTree> {
+  using Type = Tuple<Maybe<facebook::glean::cpp::schema::Cxx1::IncludeTree>>;
+};
+
+
+namespace schema {
+
+namespace Cxx1 {
+
+struct MaybeIncludeTree {
+  boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<IncludeTree>>> tree;
+
+  bool operator==(const MaybeIncludeTree& other) const {
+    return std::tie(tree)
+             == std::tie(other.tree);
+  }
+  bool operator!=(const MaybeIncludeTree& other) const {
+    return std::tie(tree)
+             != std::tie(other.tree);
+  }
+  bool operator<(const MaybeIncludeTree& other) const {
+    return std::tie(tree)
+             < std::tie(other.tree);
+  }
+  bool operator<=(const MaybeIncludeTree& other) const {
+    return std::tie(tree)
+             <= std::tie(other.tree);
+  }
+  bool operator>(const MaybeIncludeTree& other) const {
+    return std::tie(tree)
+             > std::tie(other.tree);
+  }
+  bool operator>=(const MaybeIncludeTree& other) const {
+    return std::tie(tree)
+             >= std::tie(other.tree);
+  }
+  void outputRepr(Output<Repr<MaybeIncludeTree>> out) const {
+    outputValue(out, std::make_tuple(tree));
+  }
+}; // struct MaybeIncludeTree
+
+using MangledNameHash = std::string;
+
+} // namespace Cxx1
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Cxx1::LocalVariableKind> {
+  using Type = Enum<3>;
+};
+
+
+namespace schema {
+
+namespace Cxx1 {
+
+enum class LocalVariableKind { SimpleVariable, StaticVariable, Parameter };
+
+} // namespace Cxx1
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Cxx1::LocalVariableAttribute> {
+  using Type = Enum<2>;
+};
+
+
+namespace schema {
+
+namespace Cxx1 {
+
+enum class LocalVariableAttribute { Plain, Constexpr };
+
+} // namespace Cxx1
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Cxx1::LocalVariable> {
+  using Type = Tuple<Repr<facebook::glean::cpp::schema::Cxx1::LocalVariableKind>, Repr<facebook::glean::cpp::schema::Cxx1::LocalVariableAttribute>>;
+};
+
+
+namespace schema {
+
+namespace Cxx1 {
+
+struct LocalVariable {
+  LocalVariableKind kind;
+  LocalVariableAttribute attribute;
+
+  bool operator==(const LocalVariable& other) const {
+    return std::tie(kind,attribute)
+             == std::tie(other.kind,other.attribute);
+  }
+  bool operator!=(const LocalVariable& other) const {
+    return std::tie(kind,attribute)
+             != std::tie(other.kind,other.attribute);
+  }
+  bool operator<(const LocalVariable& other) const {
+    return std::tie(kind,attribute)
+             < std::tie(other.kind,other.attribute);
+  }
+  bool operator<=(const LocalVariable& other) const {
+    return std::tie(kind,attribute)
+             <= std::tie(other.kind,other.attribute);
+  }
+  bool operator>(const LocalVariable& other) const {
+    return std::tie(kind,attribute)
+             > std::tie(other.kind,other.attribute);
+  }
+  bool operator>=(const LocalVariable& other) const {
+    return std::tie(kind,attribute)
+             >= std::tie(other.kind,other.attribute);
+  }
+  void outputRepr(Output<Repr<LocalVariable>> out) const {
+    outputValue(out, std::make_tuple(kind, attribute));
+  }
+}; // struct LocalVariable
+
+using LiteralOperator = std::string;
+
+struct IncludeTreeTranslationUnit : Predicate<std::tuple<Fact<IncludeTree>, Fact<facebook::glean::cpp::schema::Buck::TranslationUnit>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.IncludeTreeTranslationUnit";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct IncludeTreeTranslationUnit
+
+struct IncludeTreeParent : Predicate<std::tuple<Fact<IncludeTree>, Fact<IncludeTree>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.IncludeTreeParent";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct IncludeTreeParent
+
+struct IncludeTree : Predicate<std::tuple<Fact<Trace>, std::vector<MaybeIncludeTree>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.IncludeTree";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct IncludeTree
+
+} // namespace Cxx1
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Cxx1::IncludeTrace> {
+  using Type = Tuple<facebook::glean::cpp::schema::Pp1::Include, Maybe<facebook::glean::cpp::schema::Cxx1::Trace>>;
+};
+
+
+namespace schema {
+
+namespace Cxx1 {
+
+struct IncludeTrace {
+  Fact<facebook::glean::cpp::schema::Pp1::Include> include_;
+  boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Trace>>> trace;
+
+  bool operator==(const IncludeTrace& other) const {
+    return std::tie(include_,trace)
+             == std::tie(other.include_,other.trace);
+  }
+  bool operator!=(const IncludeTrace& other) const {
+    return std::tie(include_,trace)
+             != std::tie(other.include_,other.trace);
+  }
+  bool operator<(const IncludeTrace& other) const {
+    return std::tie(include_,trace)
+             < std::tie(other.include_,other.trace);
+  }
+  bool operator<=(const IncludeTrace& other) const {
+    return std::tie(include_,trace)
+             <= std::tie(other.include_,other.trace);
+  }
+  bool operator>(const IncludeTrace& other) const {
+    return std::tie(include_,trace)
+             > std::tie(other.include_,other.trace);
+  }
+  bool operator>=(const IncludeTrace& other) const {
+    return std::tie(include_,trace)
+             >= std::tie(other.include_,other.trace);
+  }
+  void outputRepr(Output<Repr<IncludeTrace>> out) const {
+    outputValue(out, std::make_tuple(include_, trace));
+  }
+}; // struct IncludeTrace
+
+} // namespace Cxx1
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Cxx1::PPEvent> {
+  using Type = Sum<Repr<facebook::glean::cpp::schema::Cxx1::IncludeTrace>, facebook::glean::cpp::schema::Pp1::Define, facebook::glean::cpp::schema::Pp1::Undef, facebook::glean::cpp::schema::Pp1::Use>;
+};
+
+
+namespace schema {
+
+namespace Cxx1 {
+
+struct PPEvent {
+  boost::variant<Alt<0, IncludeTrace>, Alt<1, Fact<facebook::glean::cpp::schema::Pp1::Define>>, Alt<2, Fact<facebook::glean::cpp::schema::Pp1::Undef>>, Alt<3, Fact<facebook::glean::cpp::schema::Pp1::Use>>> GLEAN_value;
+
+  static PPEvent include_(const IncludeTrace& a) {
+    return PPEvent{Alt<0, IncludeTrace>(a)};
+  }
+  static PPEvent define(const Fact<facebook::glean::cpp::schema::Pp1::Define>& a) {
+    return PPEvent{Alt<1, Fact<facebook::glean::cpp::schema::Pp1::Define>>(a)};
+  }
+  static PPEvent undef(const Fact<facebook::glean::cpp::schema::Pp1::Undef>& a) {
+    return PPEvent{Alt<2, Fact<facebook::glean::cpp::schema::Pp1::Undef>>(a)};
+  }
+  static PPEvent use(const Fact<facebook::glean::cpp::schema::Pp1::Use>& a) {
+    return PPEvent{Alt<3, Fact<facebook::glean::cpp::schema::Pp1::Use>>(a)};
+  }
+
+  bool operator==(const PPEvent& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const PPEvent& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const PPEvent& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const PPEvent& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const PPEvent& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const PPEvent& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<PPEvent>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct PPEvent
+
+struct PPTrace : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, std::vector<PPEvent>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.PPTrace";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct PPTrace
+
+} // namespace Cxx1
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Cxx1::GlobalVariableKind> {
+  using Type = Enum<3>;
+};
+
+
+namespace schema {
+
+namespace Cxx1 {
+
+enum class GlobalVariableKind { SimpleVariable, StaticVariable, StaticMember };
+
+} // namespace Cxx1
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Cxx1::GlobalVariableAttribute> {
+  using Type = Enum<3>;
+};
+
+
+namespace schema {
+
+namespace Cxx1 {
+
+enum class GlobalVariableAttribute { Plain, Inline, Constexpr };
+
+} // namespace Cxx1
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Cxx1::GlobalVariable> {
+  using Type = Tuple<Repr<facebook::glean::cpp::schema::Cxx1::GlobalVariableKind>, Repr<facebook::glean::cpp::schema::Cxx1::GlobalVariableAttribute>, Bool>;
+};
+
+
+namespace schema {
+
+namespace Cxx1 {
+
+struct GlobalVariable {
+  GlobalVariableKind kind;
+  GlobalVariableAttribute attribute;
+  bool definition;
+
+  bool operator==(const GlobalVariable& other) const {
+    return std::tie(kind,attribute,definition)
+             == std::tie(other.kind,other.attribute,other.definition);
+  }
+  bool operator!=(const GlobalVariable& other) const {
+    return std::tie(kind,attribute,definition)
+             != std::tie(other.kind,other.attribute,other.definition);
+  }
+  bool operator<(const GlobalVariable& other) const {
+    return std::tie(kind,attribute,definition)
+             < std::tie(other.kind,other.attribute,other.definition);
+  }
+  bool operator<=(const GlobalVariable& other) const {
+    return std::tie(kind,attribute,definition)
+             <= std::tie(other.kind,other.attribute,other.definition);
+  }
+  bool operator>(const GlobalVariable& other) const {
+    return std::tie(kind,attribute,definition)
+             > std::tie(other.kind,other.attribute,other.definition);
+  }
+  bool operator>=(const GlobalVariable& other) const {
+    return std::tie(kind,attribute,definition)
+             >= std::tie(other.kind,other.attribute,other.definition);
+  }
+  void outputRepr(Output<Repr<GlobalVariable>> out) const {
+    outputValue(out, std::make_tuple(kind, attribute, definition));
+  }
+}; // struct GlobalVariable
+
+struct FunctionLowerCase : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "cxx1.FunctionLowerCase";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct FunctionLowerCase
+
+struct FunctionDefinition : Predicate<std::tuple<Fact<FunctionDeclaration>, bool>> {
+  static const char* GLEAN_name() {
+    return "cxx1.FunctionDefinition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct FunctionDefinition
+
+struct FunctionDeclarationNameString : Predicate<std::tuple<Fact<FunctionName>, std::string>> {
+  static const char* GLEAN_name() {
+    return "cxx1.FunctionDeclarationNameString";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct FunctionDeclarationNameString
+
+struct FunctionDeclarationName : Predicate<std::tuple<Fact<FunctionName>, Fact<Name>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.FunctionDeclarationName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct FunctionDeclarationName
+
+struct FunctionDeclaration : Predicate<std::tuple<Fact<FunctionQName>, Fact<Signature>, boost::variant<Alt<0, std::tuple<>>, Alt<1, MethodSignature>>, facebook::glean::cpp::schema::Src::Range>> {
+  static const char* GLEAN_name() {
+    return "cxx1.FunctionDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct FunctionDeclaration
+
+struct FunctionDeclAttribute : Predicate<std::tuple<Fact<FunctionDeclaration>, Fact<Attribute>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.FunctionDeclAttribute";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct FunctionDeclAttribute
+
+struct FunctionAttribute : Predicate<std::tuple<Fact<Attribute>, Fact<FunctionDeclaration>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.FunctionAttribute";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct FunctionAttribute
+
+} // namespace Cxx1
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Cxx1::From> {
+  using Type = Tuple<Repr<facebook::glean::cpp::schema::Src::PackedByteSpans>, Repr<facebook::glean::cpp::schema::Src::PackedByteSpans>, Repr<facebook::glean::cpp::schema::Src::PackedByteSpans>>;
+};
+
+
+namespace schema {
+
+namespace Cxx1 {
+
+struct From {
+  facebook::glean::cpp::schema::Src::PackedByteSpans spans;
+  facebook::glean::cpp::schema::Src::PackedByteSpans expansions;
+  facebook::glean::cpp::schema::Src::PackedByteSpans spellings;
+
+  bool operator==(const From& other) const {
+    return std::tie(spans,expansions,spellings)
+             == std::tie(other.spans,other.expansions,other.spellings);
+  }
+  bool operator!=(const From& other) const {
+    return std::tie(spans,expansions,spellings)
+             != std::tie(other.spans,other.expansions,other.spellings);
+  }
+  bool operator<(const From& other) const {
+    return std::tie(spans,expansions,spellings)
+             < std::tie(other.spans,other.expansions,other.spellings);
+  }
+  bool operator<=(const From& other) const {
+    return std::tie(spans,expansions,spellings)
+             <= std::tie(other.spans,other.expansions,other.spellings);
+  }
+  bool operator>(const From& other) const {
+    return std::tie(spans,expansions,spellings)
+             > std::tie(other.spans,other.expansions,other.spellings);
+  }
+  bool operator>=(const From& other) const {
+    return std::tie(spans,expansions,spellings)
+             >= std::tie(other.spans,other.expansions,other.spellings);
+  }
+  void outputRepr(Output<Repr<From>> out) const {
+    outputValue(out, std::make_tuple(spans, expansions, spellings));
+  }
+}; // struct From
+
+struct FileXRefs : Predicate<std::tuple<Fact<FileXRefMap>, std::vector<Fact<XRefTargets>>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.FileXRefs";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct FileXRefs
+
+struct FilePPUseXRefs : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::Range, Fact<facebook::glean::cpp::schema::Pp1::Define>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.FilePPUseXRefs";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct FilePPUseXRefs
+
+struct FilePPUseTraceXRefs : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, Fact<Trace>, facebook::glean::cpp::schema::Src::Range, Fact<facebook::glean::cpp::schema::Pp1::Define>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.FilePPUseTraceXRefs";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct FilePPUseTraceXRefs
+
+struct FilePPTraceXRefs : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, Fact<Trace>, facebook::glean::cpp::schema::Src::Range, PpEntity, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "cxx1.FilePPTraceXRefs";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct FilePPTraceXRefs
+
+} // namespace Cxx1
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Cxx1::Field> {
+  using Type = Tuple<Bool, Maybe<Nat>>;
+};
+
+
+namespace schema {
+
+namespace Cxx1 {
+
+struct Field {
+  bool mutable_;
+  boost::variant<Alt<0, std::tuple<>>, Alt<1, uint64_t>> bitsize;
+
+  bool operator==(const Field& other) const {
+    return std::tie(mutable_,bitsize)
+             == std::tie(other.mutable_,other.bitsize);
+  }
+  bool operator!=(const Field& other) const {
+    return std::tie(mutable_,bitsize)
+             != std::tie(other.mutable_,other.bitsize);
+  }
+  bool operator<(const Field& other) const {
+    return std::tie(mutable_,bitsize)
+             < std::tie(other.mutable_,other.bitsize);
+  }
+  bool operator<=(const Field& other) const {
+    return std::tie(mutable_,bitsize)
+             <= std::tie(other.mutable_,other.bitsize);
+  }
+  bool operator>(const Field& other) const {
+    return std::tie(mutable_,bitsize)
+             > std::tie(other.mutable_,other.bitsize);
+  }
+  bool operator>=(const Field& other) const {
+    return std::tie(mutable_,bitsize)
+             >= std::tie(other.mutable_,other.bitsize);
+  }
+  void outputRepr(Output<Repr<Field>> out) const {
+    outputValue(out, std::make_tuple(mutable_, bitsize));
+  }
+}; // struct Field
+
+} // namespace Cxx1
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Cxx1::VariableKind> {
+  using Type = Sum<Repr<facebook::glean::cpp::schema::Cxx1::GlobalVariable>, Repr<facebook::glean::cpp::schema::Cxx1::LocalVariable>, Repr<facebook::glean::cpp::schema::Cxx1::Field>, Repr<facebook::glean::cpp::schema::Cxx1::ObjcIVar>>;
+};
+
+
+namespace schema {
+
+namespace Cxx1 {
+
+struct VariableKind {
+  boost::variant<Alt<0, GlobalVariable>, Alt<1, LocalVariable>, Alt<2, Field>, Alt<3, ObjcIVar>> GLEAN_value;
+
+  static VariableKind global_(const GlobalVariable& a) {
+    return VariableKind{Alt<0, GlobalVariable>(a)};
+  }
+  static VariableKind local(const LocalVariable& a) {
+    return VariableKind{Alt<1, LocalVariable>(a)};
+  }
+  static VariableKind field(const Field& a) {
+    return VariableKind{Alt<2, Field>(a)};
+  }
+  static VariableKind ivar(const ObjcIVar& a) {
+    return VariableKind{Alt<3, ObjcIVar>(a)};
+  }
+
+  bool operator==(const VariableKind& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const VariableKind& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const VariableKind& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const VariableKind& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const VariableKind& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const VariableKind& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<VariableKind>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct VariableKind
+
+struct VariableDeclaration : Predicate<std::tuple<Fact<QName>, Fact<Type>, VariableKind, facebook::glean::cpp::schema::Src::Range>> {
+  static const char* GLEAN_name() {
+    return "cxx1.VariableDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct VariableDeclaration
+
+struct EnumeratorLowerCase : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "cxx1.EnumeratorLowerCase";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct EnumeratorLowerCase
+
+struct EnumeratorInEnum : Predicate<std::tuple<Fact<Enumerator>, Fact<EnumDefinition>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.EnumeratorInEnum";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct EnumeratorInEnum
+
+struct EnumeratorByName : Predicate<std::tuple<std::string, Fact<Enumerator>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.EnumeratorByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct EnumeratorByName
+
+struct Enumerator : Predicate<std::tuple<Fact<Name>, Fact<EnumDeclaration>, facebook::glean::cpp::schema::Src::Range>> {
+  static const char* GLEAN_name() {
+    return "cxx1.Enumerator";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct Enumerator
+
+struct EnumLowerCase : Predicate<std::tuple<std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "cxx1.EnumLowerCase";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct EnumLowerCase
+
+struct EnumDefinition : Predicate<std::tuple<Fact<EnumDeclaration>, std::vector<Fact<Enumerator>>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.EnumDefinition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct EnumDefinition
+
+struct EnumDeclaration : Predicate<std::tuple<Fact<QName>, bool, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Type>>>, facebook::glean::cpp::schema::Src::Range>> {
+  static const char* GLEAN_name() {
+    return "cxx1.EnumDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct EnumDeclaration
+
+} // namespace Cxx1
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Cxx1::DefinitionEntity> {
+  using Type = Sum<facebook::glean::cpp::schema::Cxx1::RecordDefinition, facebook::glean::cpp::schema::Cxx1::FunctionDefinition, facebook::glean::cpp::schema::Cxx1::EnumDefinition, facebook::glean::cpp::schema::Cxx1::ObjcMethodDefinition, facebook::glean::cpp::schema::Cxx1::ObjcContainerDefinition, facebook::glean::cpp::schema::Cxx1::VariableDeclaration, facebook::glean::cpp::schema::Cxx1::NamespaceDefinition>;
+};
+
+
+namespace schema {
+
+namespace Cxx1 {
+
+struct DefinitionEntity {
+  boost::variant<Alt<0, Fact<RecordDefinition>>, Alt<1, Fact<FunctionDefinition>>, Alt<2, Fact<EnumDefinition>>, Alt<3, Fact<ObjcMethodDefinition>>, Alt<4, Fact<ObjcContainerDefinition>>, Alt<5, Fact<VariableDeclaration>>, Alt<6, Fact<NamespaceDefinition>>> GLEAN_value;
+
+  static DefinitionEntity record_(const Fact<RecordDefinition>& a) {
+    return DefinitionEntity{Alt<0, Fact<RecordDefinition>>(a)};
+  }
+  static DefinitionEntity function_(const Fact<FunctionDefinition>& a) {
+    return DefinitionEntity{Alt<1, Fact<FunctionDefinition>>(a)};
+  }
+  static DefinitionEntity enum_(const Fact<EnumDefinition>& a) {
+    return DefinitionEntity{Alt<2, Fact<EnumDefinition>>(a)};
+  }
+  static DefinitionEntity objcMethod(const Fact<ObjcMethodDefinition>& a) {
+    return DefinitionEntity{Alt<3, Fact<ObjcMethodDefinition>>(a)};
+  }
+  static DefinitionEntity objcContainer(const Fact<ObjcContainerDefinition>& a) {
+    return DefinitionEntity{Alt<4, Fact<ObjcContainerDefinition>>(a)};
+  }
+  static DefinitionEntity variable(const Fact<VariableDeclaration>& a) {
+    return DefinitionEntity{Alt<5, Fact<VariableDeclaration>>(a)};
+  }
+  static DefinitionEntity namespace_(const Fact<NamespaceDefinition>& a) {
+    return DefinitionEntity{Alt<6, Fact<NamespaceDefinition>>(a)};
+  }
+
+  bool operator==(const DefinitionEntity& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const DefinitionEntity& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const DefinitionEntity& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const DefinitionEntity& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const DefinitionEntity& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const DefinitionEntity& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<DefinitionEntity>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct DefinitionEntity
+
+struct DefnInRecord : Predicate<std::tuple<DefinitionEntity, Fact<RecordDefinition>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.DefnInRecord";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct DefnInRecord
+
+} // namespace Cxx1
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Cxx1::Declaration> {
+  using Type = Sum<facebook::glean::cpp::schema::Cxx1::NamespaceDeclaration, facebook::glean::cpp::schema::Cxx1::UsingDeclaration, facebook::glean::cpp::schema::Cxx1::UsingDirective, facebook::glean::cpp::schema::Cxx1::RecordDeclaration, facebook::glean::cpp::schema::Cxx1::EnumDeclaration, facebook::glean::cpp::schema::Cxx1::FunctionDeclaration, facebook::glean::cpp::schema::Cxx1::VariableDeclaration, facebook::glean::cpp::schema::Cxx1::ObjcContainerDeclaration, facebook::glean::cpp::schema::Cxx1::ObjcMethodDeclaration, facebook::glean::cpp::schema::Cxx1::ObjcPropertyDeclaration, facebook::glean::cpp::schema::Cxx1::TypeAliasDeclaration, facebook::glean::cpp::schema::Cxx1::NamespaceAliasDeclaration>;
+};
+
+
+namespace schema {
+
+namespace Cxx1 {
+
+struct Declaration {
+  boost::variant<Alt<0, Fact<NamespaceDeclaration>>, Alt<1, Fact<UsingDeclaration>>, Alt<2, Fact<UsingDirective>>, Alt<3, Fact<RecordDeclaration>>, Alt<4, Fact<EnumDeclaration>>, Alt<5, Fact<FunctionDeclaration>>, Alt<6, Fact<VariableDeclaration>>, Alt<7, Fact<ObjcContainerDeclaration>>, Alt<8, Fact<ObjcMethodDeclaration>>, Alt<9, Fact<ObjcPropertyDeclaration>>, Alt<10, Fact<TypeAliasDeclaration>>, Alt<11, Fact<NamespaceAliasDeclaration>>> GLEAN_value;
+
+  static Declaration namespace_(const Fact<NamespaceDeclaration>& a) {
+    return Declaration{Alt<0, Fact<NamespaceDeclaration>>(a)};
+  }
+  static Declaration usingDeclaration(const Fact<UsingDeclaration>& a) {
+    return Declaration{Alt<1, Fact<UsingDeclaration>>(a)};
+  }
+  static Declaration usingDirective(const Fact<UsingDirective>& a) {
+    return Declaration{Alt<2, Fact<UsingDirective>>(a)};
+  }
+  static Declaration record_(const Fact<RecordDeclaration>& a) {
+    return Declaration{Alt<3, Fact<RecordDeclaration>>(a)};
+  }
+  static Declaration enum_(const Fact<EnumDeclaration>& a) {
+    return Declaration{Alt<4, Fact<EnumDeclaration>>(a)};
+  }
+  static Declaration function_(const Fact<FunctionDeclaration>& a) {
+    return Declaration{Alt<5, Fact<FunctionDeclaration>>(a)};
+  }
+  static Declaration variable(const Fact<VariableDeclaration>& a) {
+    return Declaration{Alt<6, Fact<VariableDeclaration>>(a)};
+  }
+  static Declaration objcContainer(const Fact<ObjcContainerDeclaration>& a) {
+    return Declaration{Alt<7, Fact<ObjcContainerDeclaration>>(a)};
+  }
+  static Declaration objcMethod(const Fact<ObjcMethodDeclaration>& a) {
+    return Declaration{Alt<8, Fact<ObjcMethodDeclaration>>(a)};
+  }
+  static Declaration objcProperty(const Fact<ObjcPropertyDeclaration>& a) {
+    return Declaration{Alt<9, Fact<ObjcPropertyDeclaration>>(a)};
+  }
+  static Declaration typeAlias(const Fact<TypeAliasDeclaration>& a) {
+    return Declaration{Alt<10, Fact<TypeAliasDeclaration>>(a)};
+  }
+  static Declaration namespaceAlias(const Fact<NamespaceAliasDeclaration>& a) {
+    return Declaration{Alt<11, Fact<NamespaceAliasDeclaration>>(a)};
+  }
+
+  bool operator==(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Declaration>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Declaration
+
+struct DeclarationComment : Predicate<std::tuple<Declaration, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "cxx1.DeclarationComment";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct DeclarationComment
+
+struct DeclarationInTrace : Predicate<std::tuple<Declaration, Fact<Trace>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.DeclarationInTrace";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct DeclarationInTrace
+
+struct DeclarationLocationName : Predicate<std::tuple<Declaration, facebook::glean::cpp::schema::Src::Range, std::string>> {
+  static const char* GLEAN_name() {
+    return "cxx1.DeclarationLocationName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct DeclarationLocationName
+
+struct DeclarationLocationNameSpan : Predicate<std::tuple<Declaration, facebook::glean::cpp::schema::Src::Range, std::string, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "cxx1.DeclarationLocationNameSpan";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct DeclarationLocationNameSpan
+
+struct DeclarationNameSpan : Predicate<std::tuple<Declaration, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "cxx1.DeclarationNameSpan";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct DeclarationNameSpan
+
+struct DeclarationSources : Predicate<std::tuple<Declaration, std::vector<Declaration>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.DeclarationSources";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct DeclarationSources
+
+struct DeclarationSrcRange : Predicate<std::tuple<Declaration, facebook::glean::cpp::schema::Src::Range>> {
+  static const char* GLEAN_name() {
+    return "cxx1.DeclarationSrcRange";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct DeclarationSrcRange
+
+struct DeclarationTargets : Predicate<std::tuple<Declaration, std::vector<Declaration>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.DeclarationTargets";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct DeclarationTargets
+
+struct DeclarationToUSR : Predicate<std::tuple<Declaration, USR>> {
+  static const char* GLEAN_name() {
+    return "cxx1.DeclarationToUSR";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct DeclarationToUSR
+
+struct Declarations : Predicate<std::vector<Declaration>> {
+  static const char* GLEAN_name() {
+    return "cxx1.Declarations";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct Declarations
+
+struct DefToBaseDecl : Predicate<std::tuple<DefinitionEntity, Declaration>> {
+  static const char* GLEAN_name() {
+    return "cxx1.DefToBaseDecl";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct DefToBaseDecl
+
+struct MangledNameHashToDeclaration : Predicate<std::tuple<MangledNameHash, Declaration>> {
+  static const char* GLEAN_name() {
+    return "cxx1.MangledNameHashToDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct MangledNameHashToDeclaration
+
+struct Same : Predicate<std::tuple<Declaration, Declaration>> {
+  static const char* GLEAN_name() {
+    return "cxx1.Same";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct Same
+
+struct USRToDeclaration : Predicate<std::tuple<USR, Declaration>> {
+  static const char* GLEAN_name() {
+    return "cxx1.USRToDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct USRToDeclaration
+
+} // namespace Cxx1
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Cxx1::XRefTarget> {
+  using Type = Sum<Repr<facebook::glean::cpp::schema::Cxx1::Declaration>, facebook::glean::cpp::schema::Cxx1::Enumerator, facebook::glean::cpp::schema::Cxx1::ObjcSelector, Repr<facebook::glean::cpp::schema::Cxx1::ObjcSelectorSlot>, Repr<facebook::glean::cpp::schema::Src::Loc>, facebook::glean::cpp::schema::Cxx1::XRefIndirectTarget>;
+};
+
+
+namespace schema {
+
+namespace Cxx1 {
+
+struct XRefTarget {
+  boost::variant<Alt<0, Declaration>, Alt<1, Fact<Enumerator>>, Alt<2, Fact<ObjcSelector>>, Alt<3, ObjcSelectorSlot>, Alt<4, facebook::glean::cpp::schema::Src::Loc>, Alt<5, Fact<XRefIndirectTarget>>> GLEAN_value;
+
+  static XRefTarget declaration(const Declaration& a) {
+    return XRefTarget{Alt<0, Declaration>(a)};
+  }
+  static XRefTarget enumerator(const Fact<Enumerator>& a) {
+    return XRefTarget{Alt<1, Fact<Enumerator>>(a)};
+  }
+  static XRefTarget objcSelector(const Fact<ObjcSelector>& a) {
+    return XRefTarget{Alt<2, Fact<ObjcSelector>>(a)};
+  }
+  static XRefTarget objcSelectorSlot(const ObjcSelectorSlot& a) {
+    return XRefTarget{Alt<3, ObjcSelectorSlot>(a)};
+  }
+  static XRefTarget unknown(const facebook::glean::cpp::schema::Src::Loc& a) {
+    return XRefTarget{Alt<4, facebook::glean::cpp::schema::Src::Loc>(a)};
+  }
+  static XRefTarget indirect(const Fact<XRefIndirectTarget>& a) {
+    return XRefTarget{Alt<5, Fact<XRefIndirectTarget>>(a)};
+  }
+
+  bool operator==(const XRefTarget& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const XRefTarget& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const XRefTarget& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const XRefTarget& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const XRefTarget& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const XRefTarget& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<XRefTarget>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct XRefTarget
+
+} // namespace Cxx1
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Cxx1::FixedXRef> {
+  using Type = Tuple<Repr<facebook::glean::cpp::schema::Cxx1::XRefTarget>, Repr<facebook::glean::cpp::schema::Cxx1::From>>;
+};
+
+
+namespace schema {
+
+namespace Cxx1 {
+
+struct FixedXRef {
+  XRefTarget target;
+  From from;
+
+  bool operator==(const FixedXRef& other) const {
+    return std::tie(target,from)
+             == std::tie(other.target,other.from);
+  }
+  bool operator!=(const FixedXRef& other) const {
+    return std::tie(target,from)
+             != std::tie(other.target,other.from);
+  }
+  bool operator<(const FixedXRef& other) const {
+    return std::tie(target,from)
+             < std::tie(other.target,other.from);
+  }
+  bool operator<=(const FixedXRef& other) const {
+    return std::tie(target,from)
+             <= std::tie(other.target,other.from);
+  }
+  bool operator>(const FixedXRef& other) const {
+    return std::tie(target,from)
+             > std::tie(other.target,other.from);
+  }
+  bool operator>=(const FixedXRef& other) const {
+    return std::tie(target,from)
+             >= std::tie(other.target,other.from);
+  }
+  void outputRepr(Output<Repr<FixedXRef>> out) const {
+    outputValue(out, std::make_tuple(target, from));
+  }
+}; // struct FixedXRef
+
+struct FileXRefMap : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, std::vector<FixedXRef>, std::vector<From>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.FileXRefMap";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct FileXRefMap
+
+struct SpellingXRef : Predicate<std::tuple<facebook::glean::cpp::schema::Src::FileLocation, XRefTarget>> {
+  static const char* GLEAN_name() {
+    return "cxx1.SpellingXRef";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct SpellingXRef
+
+struct TargetUses : Predicate<std::tuple<XRefTarget, Fact<facebook::glean::cpp::schema::Src::File>, From>> {
+  static const char* GLEAN_name() {
+    return "cxx1.TargetUses";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct TargetUses
+
+struct ThriftToCxx : Predicate<std::tuple<facebook::glean::cpp::schema::Fbthrift::Declaration, XRefTarget>> {
+  static const char* GLEAN_name() {
+    return "cxx1.ThriftToCxx";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct ThriftToCxx
+
+struct XRefIndirectTarget : Predicate<std::tuple<XRefVia, XRefTarget>> {
+  static const char* GLEAN_name() {
+    return "cxx1.XRefIndirectTarget";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct XRefIndirectTarget
+
+struct XRefTargets : Predicate<std::vector<XRefTarget>> {
+  static const char* GLEAN_name() {
+    return "cxx1.XRefTargets";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct XRefTargets
+
+} // namespace Cxx1
+
+namespace Symbolid {
+
+namespace Cxx {
+
+struct LookupNamespaceDeclaration : Predicate<std::tuple<boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<facebook::glean::cpp::schema::Cxx1::Name>>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<facebook::glean::cpp::schema::Cxx1::NamespaceQName>>>, facebook::glean::cpp::schema::Cxx1::Declaration>> {
+  static const char* GLEAN_name() {
+    return "symbolid.cxx.LookupNamespaceDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct LookupNamespaceDeclaration
+
+} // namespace Cxx
+
+} // namespace Symbolid
+
+namespace Cxx1 {
+
+struct DeclToFamily : Predicate<std::tuple<Declaration, Fact<DeclFamily>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.DeclToFamily";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct DeclToFamily
+
+struct DeclInRecord : Predicate<std::tuple<Declaration, Fact<RecordDefinition>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.DeclInRecord";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct DeclInRecord
+
+struct DeclInObjcContainer : Predicate<std::tuple<Declaration, Fact<ObjcContainerDefinition>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.DeclInObjcContainer";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct DeclInObjcContainer
+
+struct DeclFamilyOf : Predicate<std::tuple<Declaration, Declaration>> {
+  static const char* GLEAN_name() {
+    return "cxx1.DeclFamilyOf";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct DeclFamilyOf
+
+struct DeclFamily : Predicate<std::vector<Declaration>> {
+  static const char* GLEAN_name() {
+    return "cxx1.DeclFamily";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct DeclFamily
+
+struct CxxToThrift : Predicate<std::tuple<XRefTarget, facebook::glean::cpp::schema::Fbthrift::Declaration>> {
+  static const char* GLEAN_name() {
+    return "cxx1.CxxToThrift";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct CxxToThrift
+
+struct Attribute : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "cxx1.Attribute";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct Attribute
+
+} // namespace Cxx1
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Cxx1::Access> {
+  using Type = Enum<3>;
+};
+
+
+namespace schema {
+
+namespace Cxx1 {
+
+enum class Access { Public, Protected, Private };
+
+} // namespace Cxx1
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Cxx1::RecordBase> {
+  using Type = Tuple<facebook::glean::cpp::schema::Cxx1::RecordDeclaration, Repr<facebook::glean::cpp::schema::Cxx1::Access>, Bool>;
+};
+
+
+namespace schema {
+
+namespace Cxx1 {
+
+struct RecordBase {
+  Fact<RecordDeclaration> base;
+  Access access;
+  bool isVirtual;
+
+  bool operator==(const RecordBase& other) const {
+    return std::tie(base,access,isVirtual)
+             == std::tie(other.base,other.access,other.isVirtual);
+  }
+  bool operator!=(const RecordBase& other) const {
+    return std::tie(base,access,isVirtual)
+             != std::tie(other.base,other.access,other.isVirtual);
+  }
+  bool operator<(const RecordBase& other) const {
+    return std::tie(base,access,isVirtual)
+             < std::tie(other.base,other.access,other.isVirtual);
+  }
+  bool operator<=(const RecordBase& other) const {
+    return std::tie(base,access,isVirtual)
+             <= std::tie(other.base,other.access,other.isVirtual);
+  }
+  bool operator>(const RecordBase& other) const {
+    return std::tie(base,access,isVirtual)
+             > std::tie(other.base,other.access,other.isVirtual);
+  }
+  bool operator>=(const RecordBase& other) const {
+    return std::tie(base,access,isVirtual)
+             >= std::tie(other.base,other.access,other.isVirtual);
+  }
+  void outputRepr(Output<Repr<RecordBase>> out) const {
+    outputValue(out, std::make_tuple(base, access, isVirtual));
+  }
+}; // struct RecordBase
+
+struct RecordDefinition : Predicate<std::tuple<Fact<RecordDeclaration>, std::vector<RecordBase>, Fact<Declarations>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.RecordDefinition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct RecordDefinition
+
+} // namespace Cxx1
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Csharp::Variance> {
+  using Type = Enum<3>;
+};
+
+
+namespace schema {
+
+namespace Csharp {
+
+enum class Variance { In, None_, Out };
+
+} // namespace Csharp
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Csharp::UnityPackageType> {
+  using Type = Enum<9>;
+};
+
+
+namespace schema {
+
+namespace Csharp {
+
+enum class UnityPackageType { Undefined, ThirdParty, Core, Runtime, Modules, Worlds, Apps, Clones, TestPackages };
+
+struct UnityPackageToProject : Predicate<std::tuple<Fact<UnityPackage>, Fact<Project>>> {
+  static const char* GLEAN_name() {
+    return "csharp.UnityPackageToProject";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct UnityPackageToProject
+
+struct UnityPackage : Predicate<std::tuple<UnityPackageType, std::string>> {
+  static const char* GLEAN_name() {
+    return "csharp.UnityPackage";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct UnityPackage
+
+} // namespace Csharp
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Csharp::UnityAssemblyType> {
+  using Type = Enum<7>;
+};
+
+
+namespace schema {
+
+namespace Csharp {
+
+enum class UnityAssemblyType { Package, Editor, Tests, TestsEditor, UnitTests, Internal, AllApis };
+
+struct UnityProjectSource : Predicate<std::tuple<std::string, Fact<UnityPackage>, UnityAssemblyType, Fact<facebook::glean::cpp::schema::Src::File>>> {
+  static const char* GLEAN_name() {
+    return "csharp.UnityProjectSource";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct UnityProjectSource
+
+struct TypeParameter : Predicate<std::tuple<Fact<Name>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Variance>>, bool, bool, bool>> {
+  static const char* GLEAN_name() {
+    return "csharp.TypeParameter";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct TypeParameter
+
+struct SourceFileToProject : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, Fact<Project>>> {
+  static const char* GLEAN_name() {
+    return "csharp.SourceFileToProject";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct SourceFileToProject
+
+struct SolutionToProject : Predicate<std::tuple<Fact<Solution>, Fact<Project>>> {
+  static const char* GLEAN_name() {
+    return "csharp.SolutionToProject";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct SolutionToProject
+
+struct Solution : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>>> {
+  static const char* GLEAN_name() {
+    return "csharp.Solution";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct Solution
+
+} // namespace Csharp
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Csharp::RefKind> {
+  using Type = Enum<5>;
+};
+
+
+namespace schema {
+
+namespace Csharp {
+
+enum class RefKind { In, None_, Out, Ref, RefReadOnly };
+
+struct ProjectToSourceFile : Predicate<std::tuple<Fact<Project>, Fact<facebook::glean::cpp::schema::Src::File>>> {
+  static const char* GLEAN_name() {
+    return "csharp.ProjectToSourceFile";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct ProjectToSourceFile
+
+struct ProjectToSolution : Predicate<std::tuple<Fact<Project>, Fact<Solution>>> {
+  static const char* GLEAN_name() {
+    return "csharp.ProjectToSolution";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct ProjectToSolution
+
+} // namespace Csharp
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Csharp::ProjectSource> {
+  using Type = Sum<facebook::glean::cpp::schema::Csharp::UnityProjectSource, facebook::glean::cpp::schema::Csharp::MSBuildProjectSource>;
+};
+
+
+namespace schema {
+
+namespace Csharp {
+
+struct ProjectSource {
+  boost::variant<Alt<0, Fact<UnityProjectSource>>, Alt<1, Fact<MSBuildProjectSource>>> GLEAN_value;
+
+  static ProjectSource unityProjectSource(const Fact<UnityProjectSource>& a) {
+    return ProjectSource{Alt<0, Fact<UnityProjectSource>>(a)};
+  }
+  static ProjectSource msbuildProjectSource(const Fact<MSBuildProjectSource>& a) {
+    return ProjectSource{Alt<1, Fact<MSBuildProjectSource>>(a)};
+  }
+
+  bool operator==(const ProjectSource& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const ProjectSource& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const ProjectSource& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const ProjectSource& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const ProjectSource& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const ProjectSource& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<ProjectSource>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct ProjectSource
+
+struct Project : Predicate<std::tuple<ProjectSource, boost::variant<Alt<0, std::tuple<>>, Alt<1, std::string>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, std::string>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, std::string>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, std::string>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, std::string>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, std::string>>>> {
+  static const char* GLEAN_name() {
+    return "csharp.Project";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct Project
+
+struct Namespace : Predicate<std::tuple<Fact<Name>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Namespace>>>>> {
+  static const char* GLEAN_name() {
+    return "csharp.Namespace";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct Namespace
+
+} // namespace Csharp
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Csharp::NamedType> {
+  using Type = Sum<facebook::glean::cpp::schema::Csharp::Class, facebook::glean::cpp::schema::Csharp::Interface, facebook::glean::cpp::schema::Csharp::Record, facebook::glean::cpp::schema::Csharp::Struct>;
+};
+
+
+namespace schema {
+
+namespace Csharp {
+
+struct NamedType {
+  boost::variant<Alt<0, Fact<Class>>, Alt<1, Fact<Interface>>, Alt<2, Fact<Record>>, Alt<3, Fact<Struct>>> GLEAN_value;
+
+  static NamedType class_(const Fact<Class>& a) {
+    return NamedType{Alt<0, Fact<Class>>(a)};
+  }
+  static NamedType interface_(const Fact<Interface>& a) {
+    return NamedType{Alt<1, Fact<Interface>>(a)};
+  }
+  static NamedType record_(const Fact<Record>& a) {
+    return NamedType{Alt<2, Fact<Record>>(a)};
+  }
+  static NamedType struct_(const Fact<Struct>& a) {
+    return NamedType{Alt<3, Fact<Struct>>(a)};
+  }
+
+  bool operator==(const NamedType& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const NamedType& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const NamedType& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const NamedType& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const NamedType& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const NamedType& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<NamedType>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct NamedType
+
+struct NameLowerCase : Predicate<std::tuple<std::string, Fact<Name>>> {
+  static const char* GLEAN_name() {
+    return "csharp.NameLowerCase";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct NameLowerCase
+
+struct Name : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "csharp.Name";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct Name
+
+} // namespace Csharp
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Csharp::MethodKind> {
+  using Type = Enum<21>;
+};
+
+
+namespace schema {
+
+namespace Csharp {
+
+enum class MethodKind { AnonymousFunction, BuiltinOperator, Constructor, Conversion, DeclareMethod, DelegateInvoke, Destructor, EventAdd, EventRaise, EventRemove, ExplicitInterfaceImplementation, FunctionPointerSignature, LambdaMethod, LocalFunction, Ordinary, PropertyGet, PropertySet, ReducedExtension, SharedConstructor, StaticConstructor, UserDefinedOperator };
+
+} // namespace Csharp
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Csharp::MethodInvocationExpression> {
+  using Type = Tuple<facebook::glean::cpp::schema::Csharp::MemberAccessLocation>;
+};
+
+
+namespace schema {
+
+namespace Csharp {
+
+struct MethodInvocationExpression {
+  Fact<MemberAccessLocation> memberAccess;
+
+  bool operator==(const MethodInvocationExpression& other) const {
+    return std::tie(memberAccess)
+             == std::tie(other.memberAccess);
+  }
+  bool operator!=(const MethodInvocationExpression& other) const {
+    return std::tie(memberAccess)
+             != std::tie(other.memberAccess);
+  }
+  bool operator<(const MethodInvocationExpression& other) const {
+    return std::tie(memberAccess)
+             < std::tie(other.memberAccess);
+  }
+  bool operator<=(const MethodInvocationExpression& other) const {
+    return std::tie(memberAccess)
+             <= std::tie(other.memberAccess);
+  }
+  bool operator>(const MethodInvocationExpression& other) const {
+    return std::tie(memberAccess)
+             > std::tie(other.memberAccess);
+  }
+  bool operator>=(const MethodInvocationExpression& other) const {
+    return std::tie(memberAccess)
+             >= std::tie(other.memberAccess);
+  }
+  void outputRepr(Output<Repr<MethodInvocationExpression>> out) const {
+    outputValue(out, std::make_tuple(memberAccess));
+  }
+}; // struct MethodInvocationExpression
+
+} // namespace Csharp
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Csharp::MemberAccessExpression> {
+  using Type = Sum<facebook::glean::cpp::schema::Csharp::Local, facebook::glean::cpp::schema::Csharp::Parameter, facebook::glean::cpp::schema::Csharp::Field, facebook::glean::cpp::schema::Csharp::Property, facebook::glean::cpp::schema::Csharp::Method>;
+};
+
+
+namespace schema {
+
+namespace Csharp {
+
+struct MemberAccessExpression {
+  boost::variant<Alt<0, Fact<Local>>, Alt<1, Fact<Parameter>>, Alt<2, Fact<Field>>, Alt<3, Fact<Property>>, Alt<4, Fact<Method>>> GLEAN_value;
+
+  static MemberAccessExpression local(const Fact<Local>& a) {
+    return MemberAccessExpression{Alt<0, Fact<Local>>(a)};
+  }
+  static MemberAccessExpression parameter(const Fact<Parameter>& a) {
+    return MemberAccessExpression{Alt<1, Fact<Parameter>>(a)};
+  }
+  static MemberAccessExpression field(const Fact<Field>& a) {
+    return MemberAccessExpression{Alt<2, Fact<Field>>(a)};
+  }
+  static MemberAccessExpression property(const Fact<Property>& a) {
+    return MemberAccessExpression{Alt<3, Fact<Property>>(a)};
+  }
+  static MemberAccessExpression method(const Fact<Method>& a) {
+    return MemberAccessExpression{Alt<4, Fact<Method>>(a)};
+  }
+
+  bool operator==(const MemberAccessExpression& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const MemberAccessExpression& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const MemberAccessExpression& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const MemberAccessExpression& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const MemberAccessExpression& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const MemberAccessExpression& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<MemberAccessExpression>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct MemberAccessExpression
+
+struct MSBuildProjectSource : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>>> {
+  static const char* GLEAN_name() {
+    return "csharp.MSBuildProjectSource";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct MSBuildProjectSource
+
+} // namespace Csharp
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Csharp::Location> {
+  using Type = Tuple<Repr<facebook::glean::cpp::schema::Src::FileLocation>, facebook::glean::cpp::schema::Src::FileLines>;
+};
+
+
+namespace schema {
+
+namespace Csharp {
+
+struct Location {
+  facebook::glean::cpp::schema::Src::FileLocation fileLocation;
+  Fact<facebook::glean::cpp::schema::Src::FileLines> fileLines;
+
+  bool operator==(const Location& other) const {
+    return std::tie(fileLocation,fileLines)
+             == std::tie(other.fileLocation,other.fileLines);
+  }
+  bool operator!=(const Location& other) const {
+    return std::tie(fileLocation,fileLines)
+             != std::tie(other.fileLocation,other.fileLines);
+  }
+  bool operator<(const Location& other) const {
+    return std::tie(fileLocation,fileLines)
+             < std::tie(other.fileLocation,other.fileLines);
+  }
+  bool operator<=(const Location& other) const {
+    return std::tie(fileLocation,fileLines)
+             <= std::tie(other.fileLocation,other.fileLines);
+  }
+  bool operator>(const Location& other) const {
+    return std::tie(fileLocation,fileLines)
+             > std::tie(other.fileLocation,other.fileLines);
+  }
+  bool operator>=(const Location& other) const {
+    return std::tie(fileLocation,fileLines)
+             >= std::tie(other.fileLocation,other.fileLines);
+  }
+  void outputRepr(Output<Repr<Location>> out) const {
+    outputValue(out, std::make_tuple(fileLocation, fileLines));
+  }
+}; // struct Location
+
+struct MemberAccessLocation : Predicate<std::tuple<MemberAccessExpression, Location>> {
+  static const char* GLEAN_name() {
+    return "csharp.MemberAccessLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct MemberAccessLocation
+
+struct MethodInvocationLocation : Predicate<std::tuple<Fact<Method>, Location, boost::variant<Alt<0, std::tuple<>>, Alt<1, MethodInvocationExpression>>>> {
+  static const char* GLEAN_name() {
+    return "csharp.MethodInvocationLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct MethodInvocationLocation
+
+struct Implements : Predicate<std::tuple<NamedType, Fact<Interface>>> {
+  static const char* GLEAN_name() {
+    return "csharp.Implements";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct Implements
+
+struct FunctionPointerType : Predicate<std::tuple<Fact<FullName>, Fact<Method>>> {
+  static const char* GLEAN_name() {
+    return "csharp.FunctionPointerType";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct FunctionPointerType
+
+struct FullName : Predicate<std::tuple<Fact<Name>, Fact<Namespace>>> {
+  static const char* GLEAN_name() {
+    return "csharp.FullName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct FullName
+
+} // namespace Csharp
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Csharp::Accessibility> {
+  using Type = Enum<10>;
+};
+
+
+namespace schema {
+
+namespace Csharp {
+
+enum class Accessibility { Friend, Internal, NotApplicable, Private, Protected, ProtectedAndFriend, ProtectedAndInternal, ProtectedOrFriend, ProtectedOrInternal, Public };
+
+struct Class : Predicate<std::tuple<Fact<FullName>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Class>>>, std::vector<Fact<TypeParameter>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, NamedType>>, Accessibility, bool, bool, bool>> {
+  static const char* GLEAN_name() {
+    return "csharp.Class";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct Class
+
+struct Interface : Predicate<std::tuple<Fact<FullName>, std::vector<Fact<TypeParameter>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, NamedType>>, Accessibility, bool>> {
+  static const char* GLEAN_name() {
+    return "csharp.Interface";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct Interface
+
+struct Record : Predicate<std::tuple<Fact<FullName>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Record>>>, std::vector<Fact<TypeParameter>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, NamedType>>, Accessibility, bool, bool>> {
+  static const char* GLEAN_name() {
+    return "csharp.Record";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct Record
+
+struct Struct : Predicate<std::tuple<Fact<FullName>, std::vector<Fact<TypeParameter>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, NamedType>>, Accessibility>> {
+  static const char* GLEAN_name() {
+    return "csharp.Struct";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct Struct
+
+} // namespace Csharp
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Csharp::AType> {
+  using Type = Sum<facebook::glean::cpp::schema::Csharp::ArrayType, Repr<facebook::glean::cpp::schema::Csharp::NamedType>, facebook::glean::cpp::schema::Csharp::FunctionPointerType, facebook::glean::cpp::schema::Csharp::PointerType, facebook::glean::cpp::schema::Csharp::TypeParameter>;
+};
+
+
+namespace schema {
+
+namespace Csharp {
+
+struct AType {
+  boost::variant<Alt<0, Fact<ArrayType>>, Alt<1, NamedType>, Alt<2, Fact<FunctionPointerType>>, Alt<3, Fact<PointerType>>, Alt<4, Fact<TypeParameter>>> GLEAN_value;
+
+  static AType arrayType(const Fact<ArrayType>& a) {
+    return AType{Alt<0, Fact<ArrayType>>(a)};
+  }
+  static AType namedType(const NamedType& a) {
+    return AType{Alt<1, NamedType>(a)};
+  }
+  static AType functionPointerType(const Fact<FunctionPointerType>& a) {
+    return AType{Alt<2, Fact<FunctionPointerType>>(a)};
+  }
+  static AType pointerType(const Fact<PointerType>& a) {
+    return AType{Alt<3, Fact<PointerType>>(a)};
+  }
+  static AType typeParameter(const Fact<TypeParameter>& a) {
+    return AType{Alt<4, Fact<TypeParameter>>(a)};
+  }
+
+  bool operator==(const AType& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const AType& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const AType& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const AType& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const AType& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const AType& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<AType>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct AType
+
+struct ArrayType : Predicate<std::tuple<AType, uint8_t>> {
+  static const char* GLEAN_name() {
+    return "csharp.ArrayType";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct ArrayType
+
+} // namespace Csharp
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Csharp::Definition> {
+  using Type = Sum<Repr<facebook::glean::cpp::schema::Csharp::AType>, facebook::glean::cpp::schema::Csharp::Method, facebook::glean::cpp::schema::Csharp::Field, facebook::glean::cpp::schema::Csharp::Parameter, facebook::glean::cpp::schema::Csharp::TypeParameter, facebook::glean::cpp::schema::Csharp::Local, facebook::glean::cpp::schema::Csharp::Property>;
+};
+
+
+namespace schema {
+
+namespace Csharp {
+
+struct Definition {
+  boost::variant<Alt<0, AType>, Alt<1, Fact<Method>>, Alt<2, Fact<Field>>, Alt<3, Fact<Parameter>>, Alt<4, Fact<TypeParameter>>, Alt<5, Fact<Local>>, Alt<6, Fact<Property>>> GLEAN_value;
+
+  static Definition type(const AType& a) {
+    return Definition{Alt<0, AType>(a)};
+  }
+  static Definition method(const Fact<Method>& a) {
+    return Definition{Alt<1, Fact<Method>>(a)};
+  }
+  static Definition field(const Fact<Field>& a) {
+    return Definition{Alt<2, Fact<Field>>(a)};
+  }
+  static Definition parameter(const Fact<Parameter>& a) {
+    return Definition{Alt<3, Fact<Parameter>>(a)};
+  }
+  static Definition typeParameter(const Fact<TypeParameter>& a) {
+    return Definition{Alt<4, Fact<TypeParameter>>(a)};
+  }
+  static Definition local(const Fact<Local>& a) {
+    return Definition{Alt<5, Fact<Local>>(a)};
+  }
+  static Definition property(const Fact<Property>& a) {
+    return Definition{Alt<6, Fact<Property>>(a)};
+  }
+
+  bool operator==(const Definition& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Definition& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Definition& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Definition& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Definition& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Definition& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Definition>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Definition
+
+struct DefinitionLocation : Predicate<std::tuple<Definition, Location>> {
+  static const char* GLEAN_name() {
+    return "csharp.DefinitionLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct DefinitionLocation
+
+struct DefinitionLocationName : Predicate<std::tuple<Definition, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan, std::string>> {
+  static const char* GLEAN_name() {
+    return "csharp.DefinitionLocationName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct DefinitionLocationName
+
+struct FileDefinitions : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, Definition>> {
+  static const char* GLEAN_name() {
+    return "csharp.FileDefinitions";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct FileDefinitions
+
+struct FileEntityXRefs : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan, Definition>> {
+  static const char* GLEAN_name() {
+    return "csharp.FileEntityXRefs";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct FileEntityXRefs
+
+struct SearchByName : Predicate<std::tuple<Fact<Name>, Definition>> {
+  static const char* GLEAN_name() {
+    return "csharp.SearchByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct SearchByName
+
+struct Field : Predicate<std::tuple<Fact<Name>, AType, NamedType, Accessibility, bool, bool, bool>> {
+  static const char* GLEAN_name() {
+    return "csharp.Field";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct Field
+
+struct Local : Predicate<std::tuple<Fact<Name>, AType, Fact<Method>, RefKind, bool>> {
+  static const char* GLEAN_name() {
+    return "csharp.Local";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct Local
+
+struct Method : Predicate<std::tuple<Fact<Name>, NamedType, std::vector<Fact<TypeParameter>>, std::vector<Fact<Parameter>>, bool, AType, Accessibility>> {
+  static const char* GLEAN_name() {
+    return "csharp.Method";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct Method
+
+struct ObjectCreationLocation : Predicate<std::tuple<AType, Fact<Method>, Location>> {
+  static const char* GLEAN_name() {
+    return "csharp.ObjectCreationLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct ObjectCreationLocation
+
+struct Parameter : Predicate<std::tuple<Fact<Name>, AType, RefKind, bool, bool, bool>> {
+  static const char* GLEAN_name() {
+    return "csharp.Parameter";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct Parameter
+
+struct PointerType : Predicate<std::tuple<AType>> {
+  static const char* GLEAN_name() {
+    return "csharp.PointerType";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct PointerType
+
+struct Property : Predicate<std::tuple<Fact<Name>, NamedType, AType, std::vector<Fact<Parameter>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Method>>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Method>>>, bool, bool>> {
+  static const char* GLEAN_name() {
+    return "csharp.Property";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct Property
+
+struct TypeLocation : Predicate<std::tuple<AType, Location>> {
+  static const char* GLEAN_name() {
+    return "csharp.TypeLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct TypeLocation
+
+} // namespace Csharp
+
+namespace Codemarkup {
+
+namespace Yaml {
+
+struct YamlDataAvailable : Predicate<Fact<facebook::glean::cpp::schema::Src::File>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.yaml.YamlDataAvailable";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct YamlDataAvailable
+
+} // namespace Yaml
+
+} // namespace Codemarkup
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Codemarkup::Types::Visibility> {
+  using Type = Enum<4>;
+};
+
+
+namespace schema {
+
+namespace Codemarkup {
+
+namespace Types {
+
+enum class Visibility { Public, Protected, Private, Internal };
+
+} // namespace Types
+
+} // namespace Codemarkup
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind> {
+  using Type = Enum<34>;
+};
+
+
+namespace schema {
+
+namespace Codemarkup {
+
+namespace Types {
+
+enum class SymbolKind { Package, Type, Value, File, Module, Namespace, Class_, Method, Property, Field, Constructor, Enum_, Interface, Function, Variable, Constant, String, Number, Boolean, Array_, Object_, Key, Null, Enumerator, Struct, Event, Operator, TypeParameter, Union, Macro, Trait, Fragment, Operation, Directive };
+
+} // namespace Types
+
+} // namespace Codemarkup
+
+namespace Search {
+
+namespace Code {
+
+struct CxxNameLowerCase : Predicate<std::tuple<std::string, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>>, std::string>> {
+  static const char* GLEAN_name() {
+    return "search.code.CxxNameLowerCase";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct CxxNameLowerCase
+
+struct FlowNameLowerCase : Predicate<std::tuple<std::string, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>>, std::string>> {
+  static const char* GLEAN_name() {
+    return "search.code.FlowNameLowerCase";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct FlowNameLowerCase
+
+struct HackNameLowerCase : Predicate<std::tuple<std::string, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>>, std::string>> {
+  static const char* GLEAN_name() {
+    return "search.code.HackNameLowerCase";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct HackNameLowerCase
+
+struct PythonNameLowerCase : Predicate<std::tuple<std::string, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>>, std::string>> {
+  static const char* GLEAN_name() {
+    return "search.code.PythonNameLowerCase";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct PythonNameLowerCase
+
+} // namespace Code
+
+} // namespace Search
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Codemarkup::Types::SymbolInfo> {
+  using Type = Tuple<Repr<facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>, Bool>;
+};
+
+
+namespace schema {
+
+namespace Codemarkup {
+
+namespace Types {
+
+struct SymbolInfo {
+  SymbolKind kind;
+  bool isAbstract;
+
+  bool operator==(const SymbolInfo& other) const {
+    return std::tie(kind,isAbstract)
+             == std::tie(other.kind,other.isAbstract);
+  }
+  bool operator!=(const SymbolInfo& other) const {
+    return std::tie(kind,isAbstract)
+             != std::tie(other.kind,other.isAbstract);
+  }
+  bool operator<(const SymbolInfo& other) const {
+    return std::tie(kind,isAbstract)
+             < std::tie(other.kind,other.isAbstract);
+  }
+  bool operator<=(const SymbolInfo& other) const {
+    return std::tie(kind,isAbstract)
+             <= std::tie(other.kind,other.isAbstract);
+  }
+  bool operator>(const SymbolInfo& other) const {
+    return std::tie(kind,isAbstract)
+             > std::tie(other.kind,other.isAbstract);
+  }
+  bool operator>=(const SymbolInfo& other) const {
+    return std::tie(kind,isAbstract)
+             >= std::tie(other.kind,other.isAbstract);
+  }
+  void outputRepr(Output<Repr<SymbolInfo>> out) const {
+    outputValue(out, std::make_tuple(kind, isAbstract));
+  }
+}; // struct SymbolInfo
+
+} // namespace Types
+
+} // namespace Codemarkup
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Codemarkup::Types::RangeSpan> {
+  using Type = Sum<Repr<facebook::glean::cpp::schema::Src::ByteSpan>, Repr<facebook::glean::cpp::schema::Src::Range>>;
+};
+
+
+namespace schema {
+
+namespace Codemarkup {
+
+namespace Types {
+
+struct RangeSpan {
+  boost::variant<Alt<0, facebook::glean::cpp::schema::Src::ByteSpan>, Alt<1, facebook::glean::cpp::schema::Src::Range>> GLEAN_value;
+
+  static RangeSpan span(const facebook::glean::cpp::schema::Src::ByteSpan& a) {
+    return RangeSpan{Alt<0, facebook::glean::cpp::schema::Src::ByteSpan>(a)};
+  }
+  static RangeSpan range(const facebook::glean::cpp::schema::Src::Range& a) {
+    return RangeSpan{Alt<1, facebook::glean::cpp::schema::Src::Range>(a)};
+  }
+
+  bool operator==(const RangeSpan& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const RangeSpan& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const RangeSpan& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const RangeSpan& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const RangeSpan& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const RangeSpan& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<RangeSpan>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct RangeSpan
+
+struct RangeSpanContains : Predicate<std::tuple<RangeSpan, RangeSpan>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.types.RangeSpanContains";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct RangeSpanContains
+
+} // namespace Types
+
+} // namespace Codemarkup
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Codemarkup::Types::Modifiers> {
+  using Type = Tuple<Bool, Bool, Bool, Bool, Bool, Bool, Bool, Bool, Bool, Bool>;
+};
+
+
+namespace schema {
+
+namespace Codemarkup {
+
+namespace Types {
+
+struct Modifiers {
+  bool isAbstract;
+  bool isFinal;
+  bool isAsync;
+  bool isStatic;
+  bool isReadonly;
+  bool isConst;
+  bool isMutable;
+  bool isVolatile;
+  bool isVirtual;
+  bool isInline;
+
+  bool operator==(const Modifiers& other) const {
+    return std::tie(isAbstract,isFinal,isAsync,isStatic,isReadonly,isConst,isMutable,isVolatile,isVirtual,isInline)
+             == std::tie(other.isAbstract,other.isFinal,other.isAsync,other.isStatic,other.isReadonly,other.isConst,other.isMutable,other.isVolatile,other.isVirtual,other.isInline);
+  }
+  bool operator!=(const Modifiers& other) const {
+    return std::tie(isAbstract,isFinal,isAsync,isStatic,isReadonly,isConst,isMutable,isVolatile,isVirtual,isInline)
+             != std::tie(other.isAbstract,other.isFinal,other.isAsync,other.isStatic,other.isReadonly,other.isConst,other.isMutable,other.isVolatile,other.isVirtual,other.isInline);
+  }
+  bool operator<(const Modifiers& other) const {
+    return std::tie(isAbstract,isFinal,isAsync,isStatic,isReadonly,isConst,isMutable,isVolatile,isVirtual,isInline)
+             < std::tie(other.isAbstract,other.isFinal,other.isAsync,other.isStatic,other.isReadonly,other.isConst,other.isMutable,other.isVolatile,other.isVirtual,other.isInline);
+  }
+  bool operator<=(const Modifiers& other) const {
+    return std::tie(isAbstract,isFinal,isAsync,isStatic,isReadonly,isConst,isMutable,isVolatile,isVirtual,isInline)
+             <= std::tie(other.isAbstract,other.isFinal,other.isAsync,other.isStatic,other.isReadonly,other.isConst,other.isMutable,other.isVolatile,other.isVirtual,other.isInline);
+  }
+  bool operator>(const Modifiers& other) const {
+    return std::tie(isAbstract,isFinal,isAsync,isStatic,isReadonly,isConst,isMutable,isVolatile,isVirtual,isInline)
+             > std::tie(other.isAbstract,other.isFinal,other.isAsync,other.isStatic,other.isReadonly,other.isConst,other.isMutable,other.isVolatile,other.isVirtual,other.isInline);
+  }
+  bool operator>=(const Modifiers& other) const {
+    return std::tie(isAbstract,isFinal,isAsync,isStatic,isReadonly,isConst,isMutable,isVolatile,isVirtual,isInline)
+             >= std::tie(other.isAbstract,other.isFinal,other.isAsync,other.isStatic,other.isReadonly,other.isConst,other.isMutable,other.isVolatile,other.isVirtual,other.isInline);
+  }
+  void outputRepr(Output<Repr<Modifiers>> out) const {
+    outputValue(out, std::make_tuple(isAbstract, isFinal, isAsync, isStatic, isReadonly, isConst, isMutable, isVolatile, isVirtual, isInline));
+  }
+}; // struct Modifiers
+
+} // namespace Types
+
+} // namespace Codemarkup
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Codemarkup::Types::Modifier> {
+  using Type = Enum<10>;
+};
+
+
+namespace schema {
+
+namespace Codemarkup {
+
+namespace Types {
+
+enum class Modifier { Abstract, Final, Async, Static, Readonly, Const, Mutable, Volatile, Virtual, Inline };
+
+} // namespace Types
+
+} // namespace Codemarkup
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Codemarkup::Types::Location> {
+  using Type = Tuple<String, facebook::glean::cpp::schema::Src::File, Repr<facebook::glean::cpp::schema::Codemarkup::Types::RangeSpan>, Maybe<Repr<facebook::glean::cpp::schema::Src::FileLocation>>>;
+};
+
+
+namespace schema {
+
+namespace Codemarkup {
+
+namespace Types {
+
+struct Location {
+  std::string name;
+  Fact<facebook::glean::cpp::schema::Src::File> file;
+  RangeSpan location;
+  boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Src::FileLocation>> destination;
+
+  bool operator==(const Location& other) const {
+    return std::tie(name,file,location,destination)
+             == std::tie(other.name,other.file,other.location,other.destination);
+  }
+  bool operator!=(const Location& other) const {
+    return std::tie(name,file,location,destination)
+             != std::tie(other.name,other.file,other.location,other.destination);
+  }
+  bool operator<(const Location& other) const {
+    return std::tie(name,file,location,destination)
+             < std::tie(other.name,other.file,other.location,other.destination);
+  }
+  bool operator<=(const Location& other) const {
+    return std::tie(name,file,location,destination)
+             <= std::tie(other.name,other.file,other.location,other.destination);
+  }
+  bool operator>(const Location& other) const {
+    return std::tie(name,file,location,destination)
+             > std::tie(other.name,other.file,other.location,other.destination);
+  }
+  bool operator>=(const Location& other) const {
+    return std::tie(name,file,location,destination)
+             >= std::tie(other.name,other.file,other.location,other.destination);
+  }
+  void outputRepr(Output<Repr<Location>> out) const {
+    outputValue(out, std::make_tuple(name, file, location, destination));
+  }
+}; // struct Location
+
+} // namespace Types
+
+} // namespace Codemarkup
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Codemarkup::Types::XRefLocation> {
+  using Type = Tuple<Repr<facebook::glean::cpp::schema::Codemarkup::Types::Location>, Repr<facebook::glean::cpp::schema::Codemarkup::Types::RangeSpan>>;
+};
+
+
+namespace schema {
+
+namespace Codemarkup {
+
+namespace Types {
+
+struct XRefLocation {
+  Location target;
+  RangeSpan source;
+
+  bool operator==(const XRefLocation& other) const {
+    return std::tie(target,source)
+             == std::tie(other.target,other.source);
+  }
+  bool operator!=(const XRefLocation& other) const {
+    return std::tie(target,source)
+             != std::tie(other.target,other.source);
+  }
+  bool operator<(const XRefLocation& other) const {
+    return std::tie(target,source)
+             < std::tie(other.target,other.source);
+  }
+  bool operator<=(const XRefLocation& other) const {
+    return std::tie(target,source)
+             <= std::tie(other.target,other.source);
+  }
+  bool operator>(const XRefLocation& other) const {
+    return std::tie(target,source)
+             > std::tie(other.target,other.source);
+  }
+  bool operator>=(const XRefLocation& other) const {
+    return std::tie(target,source)
+             >= std::tie(other.target,other.source);
+  }
+  void outputRepr(Output<Repr<XRefLocation>> out) const {
+    outputValue(out, std::make_tuple(target, source));
+  }
+}; // struct XRefLocation
+
+} // namespace Types
+
+} // namespace Codemarkup
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Codemarkup::Search::SearchCase> {
+  using Type = Enum<2>;
+};
+
+
+namespace schema {
+
+namespace Codemarkup {
+
+namespace Search {
+
+enum class SearchCase { Sensitive, Insensitive };
+
+} // namespace Search
+
+namespace Scip {
+
+struct LsifKindToKind : Predicate<std::tuple<facebook::glean::cpp::schema::Lsif::Types::SymbolKind, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.scip.LsifKindToKind";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct LsifKindToKind
+
+struct FileXLangSymbolRefs : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Codemarkup::Types::RangeSpan, Fact<facebook::glean::cpp::schema::Scip::Symbol>>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.scip.FileXLangSymbolRefs";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct FileXLangSymbolRefs
+
+} // namespace Scip
+
+namespace Python {
+
+struct NonImportPythonDeclarationKind : Predicate<std::tuple<facebook::glean::cpp::schema::Python::Declaration, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.python.NonImportPythonDeclarationKind";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct NonImportPythonDeclarationKind
+
+struct NonImportPythonDeclarationInfo : Predicate<std::tuple<facebook::glean::cpp::schema::Python::Declaration, facebook::glean::cpp::schema::Codemarkup::Types::SymbolInfo>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.python.NonImportPythonDeclarationInfo";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct NonImportPythonDeclarationInfo
+
+struct ConvertLabel : Predicate<std::tuple<boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<facebook::glean::cpp::schema::Python::Name>>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, std::string>>>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.python.ConvertLabel";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct ConvertLabel
+
+} // namespace Python
+
+namespace Pp {
+
+struct PpIncludeXRefLocations : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Cxx1::PPTrace>, facebook::glean::cpp::schema::Src::Range, Fact<facebook::glean::cpp::schema::Src::File>>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.pp.PpIncludeXRefLocations";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct PpIncludeXRefLocations
+
+} // namespace Pp
+
+namespace Lsif {
+
+struct LsifKindToKind : Predicate<std::tuple<facebook::glean::cpp::schema::Lsif::Types::SymbolKind, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.lsif.LsifKindToKind";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct LsifKindToKind
+
+} // namespace Lsif
+
+} // namespace Codemarkup
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Codemarkup::Hack::RequiredRelation> {
+  using Type = Enum<3>;
+};
+
+
+namespace schema {
+
+namespace Codemarkup {
+
+namespace Hack {
+
+enum class RequiredRelation { implements_, extends_, class_ };
+
+struct HackInheritedEntities : Predicate<std::tuple<facebook::glean::cpp::schema::Hack::ContainerDeclaration, facebook::glean::cpp::schema::Hack::Declaration>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.hack.HackInheritedEntities";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct HackInheritedEntities
+
+struct HackEnumInheritedMembers : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Hack::MethodDeclaration>>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.hack.HackEnumInheritedMembers";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct HackEnumInheritedMembers
+
+struct FromHackVisibility : Predicate<std::tuple<facebook::glean::cpp::schema::Hack::Visibility, facebook::glean::cpp::schema::Codemarkup::Types::Visibility>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.hack.FromHackVisibility";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct FromHackVisibility
+
+} // namespace Hack
+
+namespace Flow {
+
+struct FlowDocumentationSpan : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Flow::Documentation>, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.flow.FlowDocumentationSpan";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct FlowDocumentationSpan
+
+struct FlowDeclarationDocumentation : Predicate<std::tuple<facebook::glean::cpp::schema::Flow::SomeDeclaration, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.flow.FlowDeclarationDocumentation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct FlowDeclarationDocumentation
+
+} // namespace Flow
+
+namespace Cxx {
+
+struct FromCxxVisibility : Predicate<std::tuple<facebook::glean::cpp::schema::Cxx1::Access, facebook::glean::cpp::schema::Codemarkup::Types::Visibility>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.FromCxxVisibility";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct FromCxxVisibility
+
+struct CxxFileEntityXMapVariableXRefDeclLocations : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Cxx1::FileXRefs>, facebook::glean::cpp::schema::Cxx1::Declaration, facebook::glean::cpp::schema::Codemarkup::Types::Location>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxFileEntityXMapVariableXRefDeclLocations";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxFileEntityXMapVariableXRefDeclLocations
+
+struct CxxDeclarationModifiers : Predicate<std::tuple<facebook::glean::cpp::schema::Cxx1::Declaration, facebook::glean::cpp::schema::Codemarkup::Types::Modifiers>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxDeclarationModifiers";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxDeclarationModifiers
+
+struct CxxDeclVisibility : Predicate<std::tuple<facebook::glean::cpp::schema::Cxx1::Declaration, facebook::glean::cpp::schema::Codemarkup::Types::Visibility>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxDeclVisibility";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxDeclVisibility
+
+struct CxxDeclKind : Predicate<std::tuple<facebook::glean::cpp::schema::Cxx1::Declaration, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxDeclKind";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxDeclKind
+
+struct CxxDeclInfo : Predicate<std::tuple<facebook::glean::cpp::schema::Cxx1::Declaration, facebook::glean::cpp::schema::Codemarkup::Types::SymbolInfo>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxDeclInfo";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxDeclInfo
+
+struct CxxDataAvailable : Predicate<Fact<facebook::glean::cpp::schema::Src::File>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxDataAvailable";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxDataAvailable
+
+} // namespace Cxx
+
+} // namespace Codemarkup
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Codemarkup::SearchStyle> {
+  using Type = Enum<2>;
+};
+
+
+namespace schema {
+
+namespace Codemarkup {
+
+enum class SearchStyle { ShowAll, HideUninteresting };
+
+} // namespace Codemarkup
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Codemarkup::RelationType> {
+  using Type = Enum<7>;
+};
+
+
+namespace schema {
+
+namespace Codemarkup {
+
+enum class RelationType { ExtendsParentOfChild, ExtendsChildOfParent, ContainsChildOfParent, ContainsParentOfChild, RequireExtendsParentOfChild, RequireImplementsParentOfChild, RequireClassParentOfChild };
+
+struct IndexedFile : Predicate<Fact<facebook::glean::cpp::schema::Src::File>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.IndexedFile";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 30;
+  }
+}; // struct IndexedFile
+
+struct EntityDataAvailable : Predicate<Fact<facebook::glean::cpp::schema::Src::File>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.EntityDataAvailable";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 30;
+  }
+}; // struct EntityDataAvailable
+
+} // namespace Codemarkup
+
+namespace Code {
+
+namespace Scip {
+
+using SymbolId = Fact<facebook::glean::cpp::schema::Scip::Symbol>;
+
+} // namespace Scip
+
+} // namespace Code
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Code::Scip::Entity> {
+  using Type = Sum<Repr<facebook::glean::cpp::schema::Scip::SomeEntity>, Repr<facebook::glean::cpp::schema::Scip::SomeEntity>, Repr<facebook::glean::cpp::schema::Scip::SomeEntity>, Repr<facebook::glean::cpp::schema::Scip::SomeEntity>, Repr<facebook::glean::cpp::schema::Scip::SomeEntity>, Repr<facebook::glean::cpp::schema::Scip::SomeEntity>>;
+};
+
+
+namespace schema {
+
+namespace Code {
+
+namespace Scip {
+
+struct Entity {
+  boost::variant<Alt<0, facebook::glean::cpp::schema::Scip::SomeEntity>, Alt<1, facebook::glean::cpp::schema::Scip::SomeEntity>, Alt<2, facebook::glean::cpp::schema::Scip::SomeEntity>, Alt<3, facebook::glean::cpp::schema::Scip::SomeEntity>, Alt<4, facebook::glean::cpp::schema::Scip::SomeEntity>, Alt<5, facebook::glean::cpp::schema::Scip::SomeEntity>> GLEAN_value;
+
+  static Entity rust(const facebook::glean::cpp::schema::Scip::SomeEntity& a) {
+    return Entity{Alt<0, facebook::glean::cpp::schema::Scip::SomeEntity>(a)};
+  }
+  static Entity go(const facebook::glean::cpp::schema::Scip::SomeEntity& a) {
+    return Entity{Alt<1, facebook::glean::cpp::schema::Scip::SomeEntity>(a)};
+  }
+  static Entity typescript(const facebook::glean::cpp::schema::Scip::SomeEntity& a) {
+    return Entity{Alt<2, facebook::glean::cpp::schema::Scip::SomeEntity>(a)};
+  }
+  static Entity java(const facebook::glean::cpp::schema::Scip::SomeEntity& a) {
+    return Entity{Alt<3, facebook::glean::cpp::schema::Scip::SomeEntity>(a)};
+  }
+  static Entity kotlin(const facebook::glean::cpp::schema::Scip::SomeEntity& a) {
+    return Entity{Alt<4, facebook::glean::cpp::schema::Scip::SomeEntity>(a)};
+  }
+  static Entity swift(const facebook::glean::cpp::schema::Scip::SomeEntity& a) {
+    return Entity{Alt<5, facebook::glean::cpp::schema::Scip::SomeEntity>(a)};
+  }
+
+  bool operator==(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Entity>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Entity
+
+} // namespace Scip
+
+} // namespace Code
+
+namespace Codemarkup {
+
+namespace Scip {
+
+struct EntityInfo : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Scip::Entity, facebook::glean::cpp::schema::Codemarkup::Types::SymbolInfo>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.scip.EntityInfo";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct EntityInfo
+
+struct ScipEntityDocumentation : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Scip::Entity, Fact<facebook::glean::cpp::schema::Scip::Documentation>>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.scip.ScipEntityDocumentation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct ScipEntityDocumentation
+
+struct ScipEntityLocation : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Scip::Entity, facebook::glean::cpp::schema::Codemarkup::Types::Location>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.scip.ScipEntityLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct ScipEntityLocation
+
+struct ScipEntityUses : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Scip::Entity, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::Range>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.scip.ScipEntityUses";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct ScipEntityUses
+
+struct ScipFileEntityXRefLocations : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Codemarkup::Types::XRefLocation, facebook::glean::cpp::schema::Code::Scip::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.scip.ScipFileEntityXRefLocations";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct ScipFileEntityXRefLocations
+
+struct ScipResolveLocation : Predicate<std::tuple<facebook::glean::cpp::schema::Codemarkup::Types::Location, facebook::glean::cpp::schema::Code::Scip::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.scip.ScipResolveLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct ScipResolveLocation
+
+} // namespace Scip
+
+} // namespace Codemarkup
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Code::Python::Entity> {
+  using Type = Sum<Repr<facebook::glean::cpp::schema::Python::Declaration>>;
+};
+
+
+namespace schema {
+
+namespace Code {
+
+namespace Python {
+
+struct Entity {
+  boost::variant<Alt<0, facebook::glean::cpp::schema::Python::Declaration>> GLEAN_value;
+
+  static Entity decl(const facebook::glean::cpp::schema::Python::Declaration& a) {
+    return Entity{Alt<0, facebook::glean::cpp::schema::Python::Declaration>(a)};
+  }
+
+  bool operator==(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Entity>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Entity
+
+} // namespace Python
+
+} // namespace Code
+
+namespace Codemarkup {
+
+namespace Python {
+
+struct PythonContainsChildEntity : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Python::Entity, facebook::glean::cpp::schema::Code::Python::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.python.PythonContainsChildEntity";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct PythonContainsChildEntity
+
+struct PythonContainsParentEntity : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Python::Entity, facebook::glean::cpp::schema::Code::Python::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.python.PythonContainsParentEntity";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct PythonContainsParentEntity
+
+struct PythonEntityComments : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Python::Entity, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan, boost::variant<Alt<0, std::tuple<>>, Alt<1, std::string>>>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.python.PythonEntityComments";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct PythonEntityComments
+
+struct PythonEntityInfo : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Python::Entity, facebook::glean::cpp::schema::Codemarkup::Types::SymbolInfo>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.python.PythonEntityInfo";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct PythonEntityInfo
+
+struct PythonEntityKind : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Python::Entity, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.python.PythonEntityKind";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct PythonEntityKind
+
+struct PythonEntityLocation : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Python::Entity, facebook::glean::cpp::schema::Codemarkup::Types::Location>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.python.PythonEntityLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct PythonEntityLocation
+
+struct PythonEntityModuleName : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Python::Entity, std::string>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.python.PythonEntityModuleName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct PythonEntityModuleName
+
+struct PythonEntityUses : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Python::Entity, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.python.PythonEntityUses";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct PythonEntityUses
+
+struct PythonExtendsChildEntity : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Python::Entity, facebook::glean::cpp::schema::Code::Python::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.python.PythonExtendsChildEntity";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct PythonExtendsChildEntity
+
+struct PythonExtendsParentEntity : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Python::Entity, facebook::glean::cpp::schema::Code::Python::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.python.PythonExtendsParentEntity";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct PythonExtendsParentEntity
+
+struct PythonFileEntityXRefLocations : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Codemarkup::Types::XRefLocation, facebook::glean::cpp::schema::Code::Python::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.python.PythonFileEntityXRefLocations";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct PythonFileEntityXRefLocations
+
+struct PythonModifiers : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Python::Entity, facebook::glean::cpp::schema::Codemarkup::Types::Modifiers>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.python.PythonModifiers";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct PythonModifiers
+
+struct PythonResolveLocation : Predicate<std::tuple<facebook::glean::cpp::schema::Codemarkup::Types::Location, facebook::glean::cpp::schema::Code::Python::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.python.PythonResolveLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct PythonResolveLocation
+
+struct PythonVisibility : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Python::Entity, facebook::glean::cpp::schema::Codemarkup::Types::Visibility>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.python.PythonVisibility";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct PythonVisibility
+
+} // namespace Python
+
+} // namespace Codemarkup
+
+namespace Code {
+
+namespace Python {
+
+using CallArgument = facebook::glean::cpp::schema::Python::CallArgument;
+
+} // namespace Python
+
+} // namespace Code
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Code::Python::Annotations> {
+  using Type = Sum<Array<Repr<facebook::glean::cpp::schema::Python::Decorator>>>;
+};
+
+
+namespace schema {
+
+namespace Code {
+
+namespace Python {
+
+struct Annotations {
+  boost::variant<Alt<0, std::vector<facebook::glean::cpp::schema::Python::Decorator>>> GLEAN_value;
+
+  static Annotations decorators(const std::vector<facebook::glean::cpp::schema::Python::Decorator>& a) {
+    return Annotations{Alt<0, std::vector<facebook::glean::cpp::schema::Python::Decorator>>(a)};
+  }
+
+  bool operator==(const Annotations& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Annotations& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Annotations& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Annotations& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Annotations& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Annotations& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Annotations>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Annotations
+
+} // namespace Python
+
+} // namespace Code
+
+namespace Codemarkup {
+
+namespace Python {
+
+struct PythonAnnotation : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Python::Entity, facebook::glean::cpp::schema::Code::Python::Annotations>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.python.PythonAnnotation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct PythonAnnotation
+
+} // namespace Python
+
+} // namespace Codemarkup
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Code::Pp::Entity> {
+  using Type = Sum<facebook::glean::cpp::schema::Pp1::Define, facebook::glean::cpp::schema::Pp1::Undef, facebook::glean::cpp::schema::Src::File>;
+};
+
+
+namespace schema {
+
+namespace Code {
+
+namespace Pp {
+
+struct Entity {
+  boost::variant<Alt<0, Fact<facebook::glean::cpp::schema::Pp1::Define>>, Alt<1, Fact<facebook::glean::cpp::schema::Pp1::Undef>>, Alt<2, Fact<facebook::glean::cpp::schema::Src::File>>> GLEAN_value;
+
+  static Entity define(const Fact<facebook::glean::cpp::schema::Pp1::Define>& a) {
+    return Entity{Alt<0, Fact<facebook::glean::cpp::schema::Pp1::Define>>(a)};
+  }
+  static Entity undef(const Fact<facebook::glean::cpp::schema::Pp1::Undef>& a) {
+    return Entity{Alt<1, Fact<facebook::glean::cpp::schema::Pp1::Undef>>(a)};
+  }
+  static Entity include_(const Fact<facebook::glean::cpp::schema::Src::File>& a) {
+    return Entity{Alt<2, Fact<facebook::glean::cpp::schema::Src::File>>(a)};
+  }
+
+  bool operator==(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Entity>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Entity
+
+} // namespace Pp
+
+} // namespace Code
+
+namespace Codemarkup {
+
+namespace Pp {
+
+struct PPEntityLocation : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Pp::Entity, facebook::glean::cpp::schema::Codemarkup::Types::Location>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.pp.PPEntityLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct PPEntityLocation
+
+struct PpEntityInfo : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Pp::Entity, facebook::glean::cpp::schema::Codemarkup::Types::SymbolInfo>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.pp.PpEntityInfo";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct PpEntityInfo
+
+struct PpEntityKind : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Pp::Entity, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.pp.PpEntityKind";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct PpEntityKind
+
+struct PpEntityTraceXRefLocations : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Cxx1::Trace>, facebook::glean::cpp::schema::Codemarkup::Types::XRefLocation, facebook::glean::cpp::schema::Code::Pp::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.pp.PpEntityTraceXRefLocations";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct PpEntityTraceXRefLocations
+
+struct PpEntityUses : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Pp::Entity, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.pp.PpEntityUses";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct PpEntityUses
+
+struct PpFileEntityXRefLocations : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Codemarkup::Types::XRefLocation, facebook::glean::cpp::schema::Code::Pp::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.pp.PpFileEntityXRefLocations";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct PpFileEntityXRefLocations
+
+struct PpResolveLocation : Predicate<std::tuple<facebook::glean::cpp::schema::Codemarkup::Types::Location, facebook::glean::cpp::schema::Code::Pp::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.pp.PpResolveLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct PpResolveLocation
+
+struct PpResolveTraceLocation : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Cxx1::Trace>, facebook::glean::cpp::schema::Codemarkup::Types::Location, facebook::glean::cpp::schema::Code::Pp::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.pp.PpResolveTraceLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct PpResolveTraceLocation
+
+} // namespace Pp
+
+} // namespace Codemarkup
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Code::Lsif::Entity> {
+  using Type = Sum<Repr<facebook::glean::cpp::schema::Lsif::SomeEntity>, Repr<facebook::glean::cpp::schema::Lsif::SomeEntity>, Repr<facebook::glean::cpp::schema::Lsif::SomeEntity>, Repr<facebook::glean::cpp::schema::Lsif::SomeEntity>, Repr<facebook::glean::cpp::schema::Lsif::SomeEntity>, Repr<facebook::glean::cpp::schema::Lsif::SomeEntity>, Repr<facebook::glean::cpp::schema::Lsif::SomeEntity>, Repr<facebook::glean::cpp::schema::Lsif::SomeEntity>, Repr<facebook::glean::cpp::schema::Lsif::SomeEntity>, Repr<facebook::glean::cpp::schema::Lsif::SomeEntity>, Repr<facebook::glean::cpp::schema::Lsif::SomeEntity>, Repr<facebook::glean::cpp::schema::Lsif::SomeEntity>>;
+};
+
+
+namespace schema {
+
+namespace Code {
+
+namespace Lsif {
+
+struct Entity {
+  boost::variant<Alt<0, facebook::glean::cpp::schema::Lsif::SomeEntity>, Alt<1, facebook::glean::cpp::schema::Lsif::SomeEntity>, Alt<2, facebook::glean::cpp::schema::Lsif::SomeEntity>, Alt<3, facebook::glean::cpp::schema::Lsif::SomeEntity>, Alt<4, facebook::glean::cpp::schema::Lsif::SomeEntity>, Alt<5, facebook::glean::cpp::schema::Lsif::SomeEntity>, Alt<6, facebook::glean::cpp::schema::Lsif::SomeEntity>, Alt<7, facebook::glean::cpp::schema::Lsif::SomeEntity>, Alt<8, facebook::glean::cpp::schema::Lsif::SomeEntity>, Alt<9, facebook::glean::cpp::schema::Lsif::SomeEntity>, Alt<10, facebook::glean::cpp::schema::Lsif::SomeEntity>, Alt<11, facebook::glean::cpp::schema::Lsif::SomeEntity>> GLEAN_value;
+
+  static Entity erlang(const facebook::glean::cpp::schema::Lsif::SomeEntity& a) {
+    return Entity{Alt<0, facebook::glean::cpp::schema::Lsif::SomeEntity>(a)};
+  }
+  static Entity fsharp(const facebook::glean::cpp::schema::Lsif::SomeEntity& a) {
+    return Entity{Alt<1, facebook::glean::cpp::schema::Lsif::SomeEntity>(a)};
+  }
+  static Entity go(const facebook::glean::cpp::schema::Lsif::SomeEntity& a) {
+    return Entity{Alt<2, facebook::glean::cpp::schema::Lsif::SomeEntity>(a)};
+  }
+  static Entity haskell(const facebook::glean::cpp::schema::Lsif::SomeEntity& a) {
+    return Entity{Alt<3, facebook::glean::cpp::schema::Lsif::SomeEntity>(a)};
+  }
+  static Entity java(const facebook::glean::cpp::schema::Lsif::SomeEntity& a) {
+    return Entity{Alt<4, facebook::glean::cpp::schema::Lsif::SomeEntity>(a)};
+  }
+  static Entity kotlin(const facebook::glean::cpp::schema::Lsif::SomeEntity& a) {
+    return Entity{Alt<5, facebook::glean::cpp::schema::Lsif::SomeEntity>(a)};
+  }
+  static Entity ocaml(const facebook::glean::cpp::schema::Lsif::SomeEntity& a) {
+    return Entity{Alt<6, facebook::glean::cpp::schema::Lsif::SomeEntity>(a)};
+  }
+  static Entity python(const facebook::glean::cpp::schema::Lsif::SomeEntity& a) {
+    return Entity{Alt<7, facebook::glean::cpp::schema::Lsif::SomeEntity>(a)};
+  }
+  static Entity rust(const facebook::glean::cpp::schema::Lsif::SomeEntity& a) {
+    return Entity{Alt<8, facebook::glean::cpp::schema::Lsif::SomeEntity>(a)};
+  }
+  static Entity scala(const facebook::glean::cpp::schema::Lsif::SomeEntity& a) {
+    return Entity{Alt<9, facebook::glean::cpp::schema::Lsif::SomeEntity>(a)};
+  }
+  static Entity swift(const facebook::glean::cpp::schema::Lsif::SomeEntity& a) {
+    return Entity{Alt<10, facebook::glean::cpp::schema::Lsif::SomeEntity>(a)};
+  }
+  static Entity typescript(const facebook::glean::cpp::schema::Lsif::SomeEntity& a) {
+    return Entity{Alt<11, facebook::glean::cpp::schema::Lsif::SomeEntity>(a)};
+  }
+
+  bool operator==(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Entity>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Entity
+
+} // namespace Lsif
+
+} // namespace Code
+
+namespace Codemarkup {
+
+namespace Lsif {
+
+struct EntityInfo : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Lsif::Entity, facebook::glean::cpp::schema::Codemarkup::Types::SymbolInfo>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.lsif.EntityInfo";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct EntityInfo
+
+struct LsifEntityLocation : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Lsif::Entity, facebook::glean::cpp::schema::Codemarkup::Types::Location>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.lsif.LsifEntityLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct LsifEntityLocation
+
+struct LsifEntityModuleName : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Lsif::Entity, std::string>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.lsif.LsifEntityModuleName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct LsifEntityModuleName
+
+struct LsifEntityUses : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Lsif::Entity, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::Range>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.lsif.LsifEntityUses";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct LsifEntityUses
+
+struct LsifFileEntityXRefLocations : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Codemarkup::Types::XRefLocation, facebook::glean::cpp::schema::Code::Lsif::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.lsif.LsifFileEntityXRefLocations";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct LsifFileEntityXRefLocations
+
+struct LsifResolveLocation : Predicate<std::tuple<facebook::glean::cpp::schema::Codemarkup::Types::Location, facebook::glean::cpp::schema::Code::Lsif::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.lsif.LsifResolveLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 3;
+  }
+}; // struct LsifResolveLocation
+
+} // namespace Lsif
+
+} // namespace Codemarkup
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Code::Kotlin::Entity> {
+  using Type = Sum<Repr<facebook::glean::cpp::schema::Kotlin::Alpha::Declaration>>;
+};
+
+
+namespace schema {
+
+namespace Code {
+
+namespace Kotlin {
+
+struct Entity {
+  boost::variant<Alt<0, facebook::glean::cpp::schema::Kotlin::Alpha::Declaration>> GLEAN_value;
+
+  static Entity decl(const facebook::glean::cpp::schema::Kotlin::Alpha::Declaration& a) {
+    return Entity{Alt<0, facebook::glean::cpp::schema::Kotlin::Alpha::Declaration>(a)};
+  }
+
+  bool operator==(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Entity>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Entity
+
+} // namespace Kotlin
+
+} // namespace Code
+
+namespace Codemarkup {
+
+namespace Kotlin {
+
+struct KotlinContainsChildEntity : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Kotlin::Entity, facebook::glean::cpp::schema::Code::Kotlin::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.kotlin.KotlinContainsChildEntity";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct KotlinContainsChildEntity
+
+struct KotlinContainsParentEntity : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Kotlin::Entity, facebook::glean::cpp::schema::Code::Kotlin::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.kotlin.KotlinContainsParentEntity";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct KotlinContainsParentEntity
+
+struct KotlinEntityKind : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Kotlin::Entity, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.kotlin.KotlinEntityKind";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct KotlinEntityKind
+
+struct KotlinEntityLocation : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Kotlin::Entity, facebook::glean::cpp::schema::Codemarkup::Types::Location>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.kotlin.KotlinEntityLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct KotlinEntityLocation
+
+struct KotlinEntityUses : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Kotlin::Entity, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.kotlin.KotlinEntityUses";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct KotlinEntityUses
+
+struct KotlinExtendsParentEntity : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Kotlin::Entity, facebook::glean::cpp::schema::Code::Kotlin::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.kotlin.KotlinExtendsParentEntity";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct KotlinExtendsParentEntity
+
+struct KotlinFileEntityXRefLocations : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Codemarkup::Types::XRefLocation, facebook::glean::cpp::schema::Code::Kotlin::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.kotlin.KotlinFileEntityXRefLocations";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct KotlinFileEntityXRefLocations
+
+struct KotlinResolveLocation : Predicate<std::tuple<facebook::glean::cpp::schema::Codemarkup::Types::Location, facebook::glean::cpp::schema::Code::Kotlin::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.kotlin.KotlinResolveLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct KotlinResolveLocation
+
+} // namespace Kotlin
+
+} // namespace Codemarkup
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Code::Java::Entity> {
+  using Type = Sum<Repr<facebook::glean::cpp::schema::Java::Alpha::Declaration>>;
+};
+
+
+namespace schema {
+
+namespace Code {
+
+namespace Java {
+
+struct Entity {
+  boost::variant<Alt<0, facebook::glean::cpp::schema::Java::Alpha::Declaration>> GLEAN_value;
+
+  static Entity decl(const facebook::glean::cpp::schema::Java::Alpha::Declaration& a) {
+    return Entity{Alt<0, facebook::glean::cpp::schema::Java::Alpha::Declaration>(a)};
+  }
+
+  bool operator==(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Entity>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Entity
+
+} // namespace Java
+
+} // namespace Code
+
+namespace Codemarkup {
+
+namespace Java {
+
+struct JavaContainsChildEntity : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Java::Entity, facebook::glean::cpp::schema::Code::Java::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.java.JavaContainsChildEntity";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct JavaContainsChildEntity
+
+struct JavaContainsParentEntity : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Java::Entity, facebook::glean::cpp::schema::Code::Java::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.java.JavaContainsParentEntity";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct JavaContainsParentEntity
+
+struct JavaEntityDocumentation : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Java::Entity, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.java.JavaEntityDocumentation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct JavaEntityDocumentation
+
+struct JavaEntityKind : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Java::Entity, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.java.JavaEntityKind";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct JavaEntityKind
+
+struct JavaEntityLocation : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Java::Entity, facebook::glean::cpp::schema::Codemarkup::Types::Location>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.java.JavaEntityLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct JavaEntityLocation
+
+struct JavaEntityUses : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Java::Entity, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.java.JavaEntityUses";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct JavaEntityUses
+
+struct JavaExtendsChildEntity : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Java::Entity, facebook::glean::cpp::schema::Code::Java::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.java.JavaExtendsChildEntity";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct JavaExtendsChildEntity
+
+struct JavaExtendsParentEntity : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Java::Entity, facebook::glean::cpp::schema::Code::Java::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.java.JavaExtendsParentEntity";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct JavaExtendsParentEntity
+
+struct JavaModifiers : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Java::Entity, facebook::glean::cpp::schema::Codemarkup::Types::Modifiers>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.java.JavaModifiers";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct JavaModifiers
+
+struct JavaResolveLocation : Predicate<std::tuple<facebook::glean::cpp::schema::Codemarkup::Types::Location, facebook::glean::cpp::schema::Code::Java::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.java.JavaResolveLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct JavaResolveLocation
+
+struct JavaVisibility : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Java::Entity, facebook::glean::cpp::schema::Codemarkup::Types::Visibility>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.java.JavaVisibility";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct JavaVisibility
+
+struct JavalFileEntityXRefLocations : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Codemarkup::Types::XRefLocation, facebook::glean::cpp::schema::Code::Java::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.java.JavalFileEntityXRefLocations";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct JavalFileEntityXRefLocations
+
+} // namespace Java
+
+} // namespace Codemarkup
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Code::Java::Annotations> {
+  using Type = Sum<Array<facebook::glean::cpp::schema::Java::Alpha::Annotation>>;
+};
+
+
+namespace schema {
+
+namespace Code {
+
+namespace Java {
+
+struct Annotations {
+  boost::variant<Alt<0, std::vector<Fact<facebook::glean::cpp::schema::Java::Alpha::Annotation>>>> GLEAN_value;
+
+  static Annotations annotations(const std::vector<Fact<facebook::glean::cpp::schema::Java::Alpha::Annotation>>& a) {
+    return Annotations{Alt<0, std::vector<Fact<facebook::glean::cpp::schema::Java::Alpha::Annotation>>>(a)};
+  }
+
+  bool operator==(const Annotations& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Annotations& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Annotations& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Annotations& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Annotations& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Annotations& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Annotations>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Annotations
+
+} // namespace Java
+
+} // namespace Code
+
+namespace Codemarkup {
+
+namespace Java {
+
+struct JavaAnnotation : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Java::Entity, facebook::glean::cpp::schema::Code::Java::Annotations>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.java.JavaAnnotation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct JavaAnnotation
+
+} // namespace Java
+
+} // namespace Codemarkup
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Code::Hs::Entity> {
+  using Type = Sum<facebook::glean::cpp::schema::Hs::Name, facebook::glean::cpp::schema::Hs::Module>;
+};
+
+
+namespace schema {
+
+namespace Code {
+
+namespace Hs {
+
+struct Entity {
+  boost::variant<Alt<0, Fact<facebook::glean::cpp::schema::Hs::Name>>, Alt<1, Fact<facebook::glean::cpp::schema::Hs::Module>>> GLEAN_value;
+
+  static Entity name(const Fact<facebook::glean::cpp::schema::Hs::Name>& a) {
+    return Entity{Alt<0, Fact<facebook::glean::cpp::schema::Hs::Name>>(a)};
+  }
+  static Entity mod(const Fact<facebook::glean::cpp::schema::Hs::Module>& a) {
+    return Entity{Alt<1, Fact<facebook::glean::cpp::schema::Hs::Module>>(a)};
+  }
+
+  bool operator==(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Entity>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Entity
+
+} // namespace Hs
+
+} // namespace Code
+
+namespace Codemarkup {
+
+namespace Haskell {
+
+struct HaskellContainsChildEntity : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Hs::Entity, facebook::glean::cpp::schema::Code::Hs::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.haskell.HaskellContainsChildEntity";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct HaskellContainsChildEntity
+
+struct HaskellContainsParentEntity : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Hs::Entity, facebook::glean::cpp::schema::Code::Hs::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.haskell.HaskellContainsParentEntity";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct HaskellContainsParentEntity
+
+struct HaskellEntityLocation : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Hs::Entity, facebook::glean::cpp::schema::Codemarkup::Types::Location>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.haskell.HaskellEntityLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct HaskellEntityLocation
+
+struct HaskellEntityUses : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Hs::Entity, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.haskell.HaskellEntityUses";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct HaskellEntityUses
+
+struct HaskellFileEntityXRefLocations : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Codemarkup::Types::XRefLocation, facebook::glean::cpp::schema::Code::Hs::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.haskell.HaskellFileEntityXRefLocations";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct HaskellFileEntityXRefLocations
+
+struct HaskellResolveLocation : Predicate<std::tuple<facebook::glean::cpp::schema::Codemarkup::Types::Location, facebook::glean::cpp::schema::Code::Hs::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.haskell.HaskellResolveLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct HaskellResolveLocation
+
+} // namespace Haskell
+
+} // namespace Codemarkup
+
+namespace Search {
+
+namespace Hs {
+
+struct SearchByLowerCaseName : Predicate<std::tuple<std::string, facebook::glean::cpp::schema::Code::Hs::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.hs.SearchByLowerCaseName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 9;
+  }
+}; // struct SearchByLowerCaseName
+
+struct SearchByName : Predicate<std::tuple<std::string, facebook::glean::cpp::schema::Code::Hs::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.hs.SearchByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 9;
+  }
+}; // struct SearchByName
+
+} // namespace Hs
+
+} // namespace Search
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Code::Hack::Entity> {
+  using Type = Sum<Repr<facebook::glean::cpp::schema::Hack::Declaration>>;
+};
+
+
+namespace schema {
+
+namespace Code {
+
+namespace Hack {
+
+struct Entity {
+  boost::variant<Alt<0, facebook::glean::cpp::schema::Hack::Declaration>> GLEAN_value;
+
+  static Entity decl(const facebook::glean::cpp::schema::Hack::Declaration& a) {
+    return Entity{Alt<0, facebook::glean::cpp::schema::Hack::Declaration>(a)};
+  }
+
+  bool operator==(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Entity>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Entity
+
+} // namespace Hack
+
+} // namespace Code
+
+namespace Codemarkup {
+
+namespace Hack {
+
+struct EntityHasHideFromDocsAttr : Predicate<facebook::glean::cpp::schema::Code::Hack::Entity> {
+  static const char* GLEAN_name() {
+    return "codemarkup.hack.EntityHasHideFromDocsAttr";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct EntityHasHideFromDocsAttr
+
+struct HackContainsChildEntity : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Hack::Entity, facebook::glean::cpp::schema::Code::Hack::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.hack.HackContainsChildEntity";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct HackContainsChildEntity
+
+struct HackContainsParentEntity : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Hack::Entity, facebook::glean::cpp::schema::Code::Hack::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.hack.HackContainsParentEntity";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct HackContainsParentEntity
+
+struct HackEntityDocumentation : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Hack::Entity, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.hack.HackEntityDocumentation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct HackEntityDocumentation
+
+struct HackEntityInfo : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Hack::Entity, facebook::glean::cpp::schema::Codemarkup::Types::SymbolInfo>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.hack.HackEntityInfo";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct HackEntityInfo
+
+struct HackEntityKind : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Hack::Entity, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.hack.HackEntityKind";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct HackEntityKind
+
+struct HackEntityLocation : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Hack::Entity, facebook::glean::cpp::schema::Codemarkup::Types::Location>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.hack.HackEntityLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct HackEntityLocation
+
+struct HackEntityModuleName : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Hack::Entity, std::string>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.hack.HackEntityModuleName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct HackEntityModuleName
+
+struct HackEntitySource : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Hack::Entity, facebook::glean::cpp::schema::Code::Hack::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.hack.HackEntitySource";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct HackEntitySource
+
+struct HackEntityUses : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Hack::Entity, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.hack.HackEntityUses";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct HackEntityUses
+
+struct HackExtendsChildEntity : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Hack::Entity, facebook::glean::cpp::schema::Code::Hack::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.hack.HackExtendsChildEntity";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct HackExtendsChildEntity
+
+struct HackExtendsParentEntity : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Hack::Entity, facebook::glean::cpp::schema::Code::Hack::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.hack.HackExtendsParentEntity";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct HackExtendsParentEntity
+
+struct HackExtendsParentEntityConcise : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Hack::Entity, facebook::glean::cpp::schema::Code::Hack::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.hack.HackExtendsParentEntityConcise";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct HackExtendsParentEntityConcise
+
+struct HackFileEntityXRefLocations : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Codemarkup::Types::XRefLocation, facebook::glean::cpp::schema::Code::Hack::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.hack.HackFileEntityXRefLocations";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct HackFileEntityXRefLocations
+
+struct HackFileEntityXRefSpans : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan, facebook::glean::cpp::schema::Code::Hack::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.hack.HackFileEntityXRefSpans";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct HackFileEntityXRefSpans
+
+struct HackModifiers : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Hack::Entity, facebook::glean::cpp::schema::Codemarkup::Types::Modifiers>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.hack.HackModifiers";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct HackModifiers
+
+struct HackRequiredConstraint : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Hack::Entity, RequiredRelation, facebook::glean::cpp::schema::Code::Hack::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.hack.HackRequiredConstraint";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct HackRequiredConstraint
+
+struct HackResolveLocation : Predicate<std::tuple<facebook::glean::cpp::schema::Codemarkup::Types::Location, facebook::glean::cpp::schema::Code::Hack::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.hack.HackResolveLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct HackResolveLocation
+
+struct HackVisibility : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Hack::Entity, facebook::glean::cpp::schema::Codemarkup::Types::Visibility>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.hack.HackVisibility";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct HackVisibility
+
+} // namespace Hack
+
+} // namespace Codemarkup
+
+namespace Code {
+
+namespace Hack {
+
+using CallArgument = facebook::glean::cpp::schema::Hack::CallArgument;
+
+} // namespace Hack
+
+} // namespace Code
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Code::Hack::Annotations> {
+  using Type = Sum<Array<facebook::glean::cpp::schema::Hack::UserAttribute>>;
+};
+
+
+namespace schema {
+
+namespace Code {
+
+namespace Hack {
+
+struct Annotations {
+  boost::variant<Alt<0, std::vector<Fact<facebook::glean::cpp::schema::Hack::UserAttribute>>>> GLEAN_value;
+
+  static Annotations attributes(const std::vector<Fact<facebook::glean::cpp::schema::Hack::UserAttribute>>& a) {
+    return Annotations{Alt<0, std::vector<Fact<facebook::glean::cpp::schema::Hack::UserAttribute>>>(a)};
+  }
+
+  bool operator==(const Annotations& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Annotations& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Annotations& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Annotations& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Annotations& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Annotations& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Annotations>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Annotations
+
+} // namespace Hack
+
+} // namespace Code
+
+namespace Codemarkup {
+
+namespace Hack {
+
+struct HackAnnotation : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Hack::Entity, facebook::glean::cpp::schema::Code::Hack::Annotations>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.hack.HackAnnotation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct HackAnnotation
+
+} // namespace Hack
+
+} // namespace Codemarkup
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Code::Graphql::Entity> {
+  using Type = Sum<Repr<facebook::glean::cpp::schema::Graphql::Declaration>>;
+};
+
+
+namespace schema {
+
+namespace Code {
+
+namespace Graphql {
+
+struct Entity {
+  boost::variant<Alt<0, facebook::glean::cpp::schema::Graphql::Declaration>> GLEAN_value;
+
+  static Entity decl(const facebook::glean::cpp::schema::Graphql::Declaration& a) {
+    return Entity{Alt<0, facebook::glean::cpp::schema::Graphql::Declaration>(a)};
+  }
+
+  bool operator==(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Entity>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Entity
+
+} // namespace Graphql
+
+} // namespace Code
+
+namespace Codemarkup {
+
+namespace Graphql {
+
+struct GraphQLEntityKind : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Graphql::Entity, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.graphql.GraphQLEntityKind";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct GraphQLEntityKind
+
+struct GraphQLEntityLocation : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Graphql::Entity, facebook::glean::cpp::schema::Codemarkup::Types::Location>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.graphql.GraphQLEntityLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct GraphQLEntityLocation
+
+struct GraphQLEntityUses : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Graphql::Entity, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.graphql.GraphQLEntityUses";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct GraphQLEntityUses
+
+struct GraphQLFileEntityXRefLocations : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Codemarkup::Types::XRefLocation, facebook::glean::cpp::schema::Code::Graphql::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.graphql.GraphQLFileEntityXRefLocations";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct GraphQLFileEntityXRefLocations
+
+struct GraphQLResolveLocation : Predicate<std::tuple<facebook::glean::cpp::schema::Codemarkup::Types::Location, facebook::glean::cpp::schema::Code::Graphql::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.graphql.GraphQLResolveLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct GraphQLResolveLocation
+
+} // namespace Graphql
+
+} // namespace Codemarkup
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Code::Flow::Entity> {
+  using Type = Sum<Repr<facebook::glean::cpp::schema::Flow::SomeDeclaration>, facebook::glean::cpp::schema::Flow::Module>;
+};
+
+
+namespace schema {
+
+namespace Code {
+
+namespace Flow {
+
+struct Entity {
+  boost::variant<Alt<0, facebook::glean::cpp::schema::Flow::SomeDeclaration>, Alt<1, Fact<facebook::glean::cpp::schema::Flow::Module>>> GLEAN_value;
+
+  static Entity decl(const facebook::glean::cpp::schema::Flow::SomeDeclaration& a) {
+    return Entity{Alt<0, facebook::glean::cpp::schema::Flow::SomeDeclaration>(a)};
+  }
+  static Entity module_(const Fact<facebook::glean::cpp::schema::Flow::Module>& a) {
+    return Entity{Alt<1, Fact<facebook::glean::cpp::schema::Flow::Module>>(a)};
+  }
+
+  bool operator==(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Entity>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Entity
+
+} // namespace Flow
+
+} // namespace Code
+
+namespace Codemarkup {
+
+namespace Flow {
+
+struct FlowContainsChildEntity : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Flow::Entity, facebook::glean::cpp::schema::Code::Flow::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.flow.FlowContainsChildEntity";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct FlowContainsChildEntity
+
+struct FlowContainsParentEntity : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Flow::Entity, facebook::glean::cpp::schema::Code::Flow::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.flow.FlowContainsParentEntity";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct FlowContainsParentEntity
+
+struct FlowEntityDocumentation : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Flow::Entity, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.flow.FlowEntityDocumentation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct FlowEntityDocumentation
+
+struct FlowEntityKind : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Flow::Entity, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.flow.FlowEntityKind";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct FlowEntityKind
+
+struct FlowEntityLocation : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Flow::Entity, facebook::glean::cpp::schema::Codemarkup::Types::Location>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.flow.FlowEntityLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct FlowEntityLocation
+
+struct FlowEntityModuleName : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Flow::Entity, std::string>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.flow.FlowEntityModuleName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct FlowEntityModuleName
+
+struct FlowEntityUses : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Flow::Entity, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.flow.FlowEntityUses";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct FlowEntityUses
+
+struct FlowFileEntityXRefLocations : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Codemarkup::Types::XRefLocation, facebook::glean::cpp::schema::Code::Flow::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.flow.FlowFileEntityXRefLocations";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct FlowFileEntityXRefLocations
+
+struct FlowFileImportDeclEntityXRefLocations : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Codemarkup::Types::XRefLocation, facebook::glean::cpp::schema::Code::Flow::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.flow.FlowFileImportDeclEntityXRefLocations";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct FlowFileImportDeclEntityXRefLocations
+
+struct FlowFileReferenceEntityXRefLocations : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Codemarkup::Types::XRefLocation, facebook::glean::cpp::schema::Code::Flow::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.flow.FlowFileReferenceEntityXRefLocations";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct FlowFileReferenceEntityXRefLocations
+
+struct FlowResolveLocation : Predicate<std::tuple<facebook::glean::cpp::schema::Codemarkup::Types::Location, facebook::glean::cpp::schema::Code::Flow::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.flow.FlowResolveLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct FlowResolveLocation
+
+} // namespace Flow
+
+} // namespace Codemarkup
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Code::Fbthrift::Entity> {
+  using Type = Sum<Repr<facebook::glean::cpp::schema::Fbthrift::Declaration>>;
+};
+
+
+namespace schema {
+
+namespace Code {
+
+namespace Fbthrift {
+
+struct Entity {
+  boost::variant<Alt<0, facebook::glean::cpp::schema::Fbthrift::Declaration>> GLEAN_value;
+
+  static Entity decl(const facebook::glean::cpp::schema::Fbthrift::Declaration& a) {
+    return Entity{Alt<0, facebook::glean::cpp::schema::Fbthrift::Declaration>(a)};
+  }
+
+  bool operator==(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Entity>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Entity
+
+} // namespace Fbthrift
+
+} // namespace Code
+
+namespace Codemarkup {
+
+namespace Fbthrift {
+
+struct FbthriftEntityDocumentation : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Fbthrift::Entity, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.fbthrift.FbthriftEntityDocumentation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct FbthriftEntityDocumentation
+
+struct FbthriftEntityUses : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Fbthrift::Entity, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::Range>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.fbthrift.FbthriftEntityUses";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct FbthriftEntityUses
+
+struct ThriftContainsChildEntity : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Fbthrift::Entity, facebook::glean::cpp::schema::Code::Fbthrift::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.fbthrift.ThriftContainsChildEntity";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct ThriftContainsChildEntity
+
+struct ThriftContainsParentEntity : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Fbthrift::Entity, facebook::glean::cpp::schema::Code::Fbthrift::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.fbthrift.ThriftContainsParentEntity";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct ThriftContainsParentEntity
+
+struct ThriftEntityKind : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Fbthrift::Entity, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.fbthrift.ThriftEntityKind";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct ThriftEntityKind
+
+struct ThriftEntityLocation : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Fbthrift::Entity, facebook::glean::cpp::schema::Codemarkup::Types::Location>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.fbthrift.ThriftEntityLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct ThriftEntityLocation
+
+struct ThriftExtendsChildEntity : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Fbthrift::Entity, facebook::glean::cpp::schema::Code::Fbthrift::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.fbthrift.ThriftExtendsChildEntity";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct ThriftExtendsChildEntity
+
+struct ThriftExtendsParentEntity : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Fbthrift::Entity, facebook::glean::cpp::schema::Code::Fbthrift::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.fbthrift.ThriftExtendsParentEntity";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct ThriftExtendsParentEntity
+
+struct ThriftFileEntityXRefLocations : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Codemarkup::Types::XRefLocation, facebook::glean::cpp::schema::Code::Fbthrift::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.fbthrift.ThriftFileEntityXRefLocations";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct ThriftFileEntityXRefLocations
+
+struct ThriftResolveLocation : Predicate<std::tuple<facebook::glean::cpp::schema::Codemarkup::Types::Location, facebook::glean::cpp::schema::Code::Fbthrift::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.fbthrift.ThriftResolveLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct ThriftResolveLocation
+
+} // namespace Fbthrift
+
+} // namespace Codemarkup
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Code::Fbthrift::Annotations> {
+  using Type = Sum<Array<facebook::glean::cpp::schema::Fbthrift::StructuredAnnotation>>;
+};
+
+
+namespace schema {
+
+namespace Code {
+
+namespace Fbthrift {
+
+struct Annotations {
+  boost::variant<Alt<0, std::vector<Fact<facebook::glean::cpp::schema::Fbthrift::StructuredAnnotation>>>> GLEAN_value;
+
+  static Annotations annotations(const std::vector<Fact<facebook::glean::cpp::schema::Fbthrift::StructuredAnnotation>>& a) {
+    return Annotations{Alt<0, std::vector<Fact<facebook::glean::cpp::schema::Fbthrift::StructuredAnnotation>>>(a)};
+  }
+
+  bool operator==(const Annotations& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Annotations& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Annotations& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Annotations& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Annotations& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Annotations& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Annotations>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Annotations
+
+} // namespace Fbthrift
+
+} // namespace Code
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Code::Erlang::Entity> {
+  using Type = Sum<Repr<facebook::glean::cpp::schema::Erlang::Declaration>>;
+};
+
+
+namespace schema {
+
+namespace Code {
+
+namespace Erlang {
+
+struct Entity {
+  boost::variant<Alt<0, facebook::glean::cpp::schema::Erlang::Declaration>> GLEAN_value;
+
+  static Entity decl(const facebook::glean::cpp::schema::Erlang::Declaration& a) {
+    return Entity{Alt<0, facebook::glean::cpp::schema::Erlang::Declaration>(a)};
+  }
+
+  bool operator==(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Entity>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Entity
+
+} // namespace Erlang
+
+} // namespace Code
+
+namespace Codemarkup {
+
+namespace Erlang {
+
+struct ErlangEntityDocumentation : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Erlang::Entity, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan, boost::variant<Alt<0, std::tuple<>>, Alt<1, std::string>>>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.erlang.ErlangEntityDocumentation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct ErlangEntityDocumentation
+
+struct ErlangEntityInfo : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Erlang::Entity, facebook::glean::cpp::schema::Codemarkup::Types::SymbolInfo>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.erlang.ErlangEntityInfo";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct ErlangEntityInfo
+
+struct ErlangEntityKind : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Erlang::Entity, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.erlang.ErlangEntityKind";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct ErlangEntityKind
+
+struct ErlangEntityLocation : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Erlang::Entity, facebook::glean::cpp::schema::Codemarkup::Types::Location>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.erlang.ErlangEntityLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct ErlangEntityLocation
+
+struct ErlangEntityUses : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Erlang::Entity, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.erlang.ErlangEntityUses";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct ErlangEntityUses
+
+struct ErlangFileEntityXRefLocations : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Codemarkup::Types::XRefLocation, facebook::glean::cpp::schema::Code::Erlang::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.erlang.ErlangFileEntityXRefLocations";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct ErlangFileEntityXRefLocations
+
+struct ErlangResolveLocation : Predicate<std::tuple<facebook::glean::cpp::schema::Codemarkup::Types::Location, facebook::glean::cpp::schema::Code::Erlang::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.erlang.ErlangResolveLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct ErlangResolveLocation
+
+} // namespace Erlang
+
+} // namespace Codemarkup
+
+namespace Search {
+
+namespace Erlang {
+
+struct SearchByFQN : Predicate<std::tuple<std::string, std::string, uint64_t, facebook::glean::cpp::schema::Code::Erlang::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.erlang.SearchByFQN";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct SearchByFQN
+
+struct SearchByName : Predicate<std::tuple<std::string, facebook::glean::cpp::schema::Code::Erlang::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.erlang.SearchByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct SearchByName
+
+} // namespace Erlang
+
+} // namespace Search
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Code::Dataswarm::Entity> {
+  using Type = Tuple<Repr<facebook::glean::cpp::schema::Dataswarm::Declaration>>;
+};
+
+
+namespace schema {
+
+namespace Code {
+
+namespace Dataswarm {
+
+struct Entity {
+  facebook::glean::cpp::schema::Dataswarm::Declaration decl;
+
+  bool operator==(const Entity& other) const {
+    return std::tie(decl)
+             == std::tie(other.decl);
+  }
+  bool operator!=(const Entity& other) const {
+    return std::tie(decl)
+             != std::tie(other.decl);
+  }
+  bool operator<(const Entity& other) const {
+    return std::tie(decl)
+             < std::tie(other.decl);
+  }
+  bool operator<=(const Entity& other) const {
+    return std::tie(decl)
+             <= std::tie(other.decl);
+  }
+  bool operator>(const Entity& other) const {
+    return std::tie(decl)
+             > std::tie(other.decl);
+  }
+  bool operator>=(const Entity& other) const {
+    return std::tie(decl)
+             >= std::tie(other.decl);
+  }
+  void outputRepr(Output<Repr<Entity>> out) const {
+    outputValue(out, std::make_tuple(decl));
+  }
+}; // struct Entity
+
+} // namespace Dataswarm
+
+} // namespace Code
+
+namespace Codemarkup {
+
+namespace Dataswarm {
+
+struct DataswarmFileEntityXRefLocations : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Codemarkup::Types::XRefLocation, facebook::glean::cpp::schema::Code::Dataswarm::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.dataswarm.DataswarmFileEntityXRefLocations";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct DataswarmFileEntityXRefLocations
+
+} // namespace Dataswarm
+
+} // namespace Codemarkup
+
+namespace Code {
+
+namespace Cxx {
+
+using SymbolId = facebook::glean::cpp::schema::Cxx1::USR;
+
+} // namespace Cxx
+
+} // namespace Code
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Code::Cxx::ObjcMethodEntity> {
+  using Type = Sum<facebook::glean::cpp::schema::Cxx1::ObjcMethodDeclaration, facebook::glean::cpp::schema::Cxx1::ObjcMethodDefinition>;
+};
+
+
+namespace schema {
+
+namespace Code {
+
+namespace Cxx {
+
+struct ObjcMethodEntity {
+  boost::variant<Alt<0, Fact<facebook::glean::cpp::schema::Cxx1::ObjcMethodDeclaration>>, Alt<1, Fact<facebook::glean::cpp::schema::Cxx1::ObjcMethodDefinition>>> GLEAN_value;
+
+  static ObjcMethodEntity decl(const Fact<facebook::glean::cpp::schema::Cxx1::ObjcMethodDeclaration>& a) {
+    return ObjcMethodEntity{Alt<0, Fact<facebook::glean::cpp::schema::Cxx1::ObjcMethodDeclaration>>(a)};
+  }
+  static ObjcMethodEntity defn(const Fact<facebook::glean::cpp::schema::Cxx1::ObjcMethodDefinition>& a) {
+    return ObjcMethodEntity{Alt<1, Fact<facebook::glean::cpp::schema::Cxx1::ObjcMethodDefinition>>(a)};
+  }
+
+  bool operator==(const ObjcMethodEntity& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const ObjcMethodEntity& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const ObjcMethodEntity& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const ObjcMethodEntity& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const ObjcMethodEntity& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const ObjcMethodEntity& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<ObjcMethodEntity>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct ObjcMethodEntity
+
+} // namespace Cxx
+
+} // namespace Code
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Code::Cxx::ObjcSelectorSlotEntity> {
+  using Type = Tuple<Repr<facebook::glean::cpp::schema::Code::Cxx::ObjcMethodEntity>, Nat>;
+};
+
+
+namespace schema {
+
+namespace Code {
+
+namespace Cxx {
+
+struct ObjcSelectorSlotEntity {
+  ObjcMethodEntity objcMethod;
+  uint64_t index;
+
+  bool operator==(const ObjcSelectorSlotEntity& other) const {
+    return std::tie(objcMethod,index)
+             == std::tie(other.objcMethod,other.index);
+  }
+  bool operator!=(const ObjcSelectorSlotEntity& other) const {
+    return std::tie(objcMethod,index)
+             != std::tie(other.objcMethod,other.index);
+  }
+  bool operator<(const ObjcSelectorSlotEntity& other) const {
+    return std::tie(objcMethod,index)
+             < std::tie(other.objcMethod,other.index);
+  }
+  bool operator<=(const ObjcSelectorSlotEntity& other) const {
+    return std::tie(objcMethod,index)
+             <= std::tie(other.objcMethod,other.index);
+  }
+  bool operator>(const ObjcSelectorSlotEntity& other) const {
+    return std::tie(objcMethod,index)
+             > std::tie(other.objcMethod,other.index);
+  }
+  bool operator>=(const ObjcSelectorSlotEntity& other) const {
+    return std::tie(objcMethod,index)
+             >= std::tie(other.objcMethod,other.index);
+  }
+  void outputRepr(Output<Repr<ObjcSelectorSlotEntity>> out) const {
+    outputValue(out, std::make_tuple(objcMethod, index));
+  }
+}; // struct ObjcSelectorSlotEntity
+
+} // namespace Cxx
+
+} // namespace Code
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Code::Cxx::Definition> {
+  using Type = Sum<facebook::glean::cpp::schema::Cxx1::RecordDefinition, facebook::glean::cpp::schema::Cxx1::FunctionDefinition, facebook::glean::cpp::schema::Cxx1::EnumDefinition, facebook::glean::cpp::schema::Cxx1::ObjcMethodDefinition, facebook::glean::cpp::schema::Cxx1::ObjcContainerDefinition, facebook::glean::cpp::schema::Cxx1::VariableDeclaration, facebook::glean::cpp::schema::Cxx1::NamespaceDefinition>;
+};
+
+
+namespace schema {
+
+namespace Code {
+
+namespace Cxx {
+
+struct Definition {
+  boost::variant<Alt<0, Fact<facebook::glean::cpp::schema::Cxx1::RecordDefinition>>, Alt<1, Fact<facebook::glean::cpp::schema::Cxx1::FunctionDefinition>>, Alt<2, Fact<facebook::glean::cpp::schema::Cxx1::EnumDefinition>>, Alt<3, Fact<facebook::glean::cpp::schema::Cxx1::ObjcMethodDefinition>>, Alt<4, Fact<facebook::glean::cpp::schema::Cxx1::ObjcContainerDefinition>>, Alt<5, Fact<facebook::glean::cpp::schema::Cxx1::VariableDeclaration>>, Alt<6, Fact<facebook::glean::cpp::schema::Cxx1::NamespaceDefinition>>> GLEAN_value;
+
+  static Definition record_(const Fact<facebook::glean::cpp::schema::Cxx1::RecordDefinition>& a) {
+    return Definition{Alt<0, Fact<facebook::glean::cpp::schema::Cxx1::RecordDefinition>>(a)};
+  }
+  static Definition function_(const Fact<facebook::glean::cpp::schema::Cxx1::FunctionDefinition>& a) {
+    return Definition{Alt<1, Fact<facebook::glean::cpp::schema::Cxx1::FunctionDefinition>>(a)};
+  }
+  static Definition enum_(const Fact<facebook::glean::cpp::schema::Cxx1::EnumDefinition>& a) {
+    return Definition{Alt<2, Fact<facebook::glean::cpp::schema::Cxx1::EnumDefinition>>(a)};
+  }
+  static Definition objcMethod(const Fact<facebook::glean::cpp::schema::Cxx1::ObjcMethodDefinition>& a) {
+    return Definition{Alt<3, Fact<facebook::glean::cpp::schema::Cxx1::ObjcMethodDefinition>>(a)};
+  }
+  static Definition objcContainer(const Fact<facebook::glean::cpp::schema::Cxx1::ObjcContainerDefinition>& a) {
+    return Definition{Alt<4, Fact<facebook::glean::cpp::schema::Cxx1::ObjcContainerDefinition>>(a)};
+  }
+  static Definition variable(const Fact<facebook::glean::cpp::schema::Cxx1::VariableDeclaration>& a) {
+    return Definition{Alt<5, Fact<facebook::glean::cpp::schema::Cxx1::VariableDeclaration>>(a)};
+  }
+  static Definition namespace_(const Fact<facebook::glean::cpp::schema::Cxx1::NamespaceDefinition>& a) {
+    return Definition{Alt<6, Fact<facebook::glean::cpp::schema::Cxx1::NamespaceDefinition>>(a)};
+  }
+
+  bool operator==(const Definition& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Definition& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Definition& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Definition& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Definition& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Definition& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Definition>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Definition
+
+} // namespace Cxx
+
+} // namespace Code
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Code::Cxx::Entity> {
+  using Type = Sum<Repr<facebook::glean::cpp::schema::Cxx1::Declaration>, Repr<facebook::glean::cpp::schema::Code::Cxx::Definition>, facebook::glean::cpp::schema::Cxx1::Enumerator, Repr<facebook::glean::cpp::schema::Code::Cxx::ObjcSelectorSlotEntity>>;
+};
+
+
+namespace schema {
+
+namespace Code {
+
+namespace Cxx {
+
+struct Entity {
+  boost::variant<Alt<0, facebook::glean::cpp::schema::Cxx1::Declaration>, Alt<1, Definition>, Alt<2, Fact<facebook::glean::cpp::schema::Cxx1::Enumerator>>, Alt<3, ObjcSelectorSlotEntity>> GLEAN_value;
+
+  static Entity decl(const facebook::glean::cpp::schema::Cxx1::Declaration& a) {
+    return Entity{Alt<0, facebook::glean::cpp::schema::Cxx1::Declaration>(a)};
+  }
+  static Entity defn(const Definition& a) {
+    return Entity{Alt<1, Definition>(a)};
+  }
+  static Entity enumerator(const Fact<facebook::glean::cpp::schema::Cxx1::Enumerator>& a) {
+    return Entity{Alt<2, Fact<facebook::glean::cpp::schema::Cxx1::Enumerator>>(a)};
+  }
+  static Entity objcSelectorSlot(const ObjcSelectorSlotEntity& a) {
+    return Entity{Alt<3, ObjcSelectorSlotEntity>(a)};
+  }
+
+  bool operator==(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Entity>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Entity
+
+} // namespace Cxx
+
+} // namespace Code
+
+namespace Codemarkup {
+
+namespace Cxx {
+
+struct CxxContainsChildEntity : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Cxx::Entity, facebook::glean::cpp::schema::Code::Cxx::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxContainsChildEntity";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxContainsChildEntity
+
+struct CxxContainsParentEntity : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Cxx::Entity, facebook::glean::cpp::schema::Code::Cxx::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxContainsParentEntity";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxContainsParentEntity
+
+struct CxxDeclToDefXRefTargetLocation : Predicate<std::tuple<facebook::glean::cpp::schema::Cxx1::Declaration, facebook::glean::cpp::schema::Code::Cxx::Entity, facebook::glean::cpp::schema::Codemarkup::Types::Location>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxDeclToDefXRefTargetLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxDeclToDefXRefTargetLocation
+
+struct CxxDeclarationContainsChild : Predicate<std::tuple<facebook::glean::cpp::schema::Cxx1::Declaration, facebook::glean::cpp::schema::Code::Cxx::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxDeclarationContainsChild";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxDeclarationContainsChild
+
+struct CxxDeclarationContainsParent : Predicate<std::tuple<facebook::glean::cpp::schema::Cxx1::Declaration, facebook::glean::cpp::schema::Code::Cxx::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxDeclarationContainsParent";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxDeclarationContainsParent
+
+struct CxxDeclarationExtendsChild : Predicate<std::tuple<facebook::glean::cpp::schema::Cxx1::Declaration, facebook::glean::cpp::schema::Code::Cxx::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxDeclarationExtendsChild";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxDeclarationExtendsChild
+
+struct CxxDeclarationExtendsParent : Predicate<std::tuple<facebook::glean::cpp::schema::Cxx1::Declaration, facebook::glean::cpp::schema::Code::Cxx::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxDeclarationExtendsParent";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxDeclarationExtendsParent
+
+struct CxxDeclarationSource : Predicate<std::tuple<facebook::glean::cpp::schema::Cxx1::Declaration, facebook::glean::cpp::schema::Code::Cxx::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxDeclarationSource";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxDeclarationSource
+
+struct CxxDefToDeclFamilyXRefTargetLocation : Predicate<std::tuple<facebook::glean::cpp::schema::Cxx1::Declaration, facebook::glean::cpp::schema::Code::Cxx::Entity, facebook::glean::cpp::schema::Codemarkup::Types::Location>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxDefToDeclFamilyXRefTargetLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxDefToDeclFamilyXRefTargetLocation
+
+struct CxxEntityDocumentation : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Cxx::Entity, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxEntityDocumentation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxEntityDocumentation
+
+struct CxxEntityInfo : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Cxx::Entity, facebook::glean::cpp::schema::Codemarkup::Types::SymbolInfo>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxEntityInfo";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxEntityInfo
+
+struct CxxEntityKind : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Cxx::Entity, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxEntityKind";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxEntityKind
+
+struct CxxEntityLocation : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Cxx::Entity, facebook::glean::cpp::schema::Codemarkup::Types::Location>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxEntityLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxEntityLocation
+
+struct CxxEntityMangledNameHash : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Cxx::Entity, facebook::glean::cpp::schema::Cxx1::MangledNameHash>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxEntityMangledNameHash";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxEntityMangledNameHash
+
+struct CxxEntitySource : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Cxx::Entity, facebook::glean::cpp::schema::Code::Cxx::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxEntitySource";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxEntitySource
+
+struct CxxEntityUSR : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Cxx::Entity, facebook::glean::cpp::schema::Cxx1::USR>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxEntityUSR";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxEntityUSR
+
+struct CxxEntityUses : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Cxx::Entity, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxEntityUses";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxEntityUses
+
+struct CxxExtendsChildEntity : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Cxx::Entity, facebook::glean::cpp::schema::Code::Cxx::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxExtendsChildEntity";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxExtendsChildEntity
+
+struct CxxExtendsParentEntity : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Cxx::Entity, facebook::glean::cpp::schema::Code::Cxx::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxExtendsParentEntity";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxExtendsParentEntity
+
+struct CxxFileEntitySpellingXRefLocations : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Codemarkup::Types::XRefLocation, facebook::glean::cpp::schema::Code::Cxx::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxFileEntitySpellingXRefLocations";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxFileEntitySpellingXRefLocations
+
+struct CxxFileEntityTraceDeclToDefXRefLocations : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, Fact<facebook::glean::cpp::schema::Cxx1::Trace>, facebook::glean::cpp::schema::Codemarkup::Types::XRefLocation, facebook::glean::cpp::schema::Code::Cxx::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxFileEntityTraceDeclToDefXRefLocations";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxFileEntityTraceDeclToDefXRefLocations
+
+struct CxxFileEntityXMapFixedXRefLocations : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Cxx1::FileXRefs>, facebook::glean::cpp::schema::Codemarkup::Types::XRefLocation, facebook::glean::cpp::schema::Code::Cxx::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxFileEntityXMapFixedXRefLocations";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxFileEntityXMapFixedXRefLocations
+
+struct CxxFileEntityXMapVariableXRefDeclToDefs : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Cxx1::FileXRefs>, facebook::glean::cpp::schema::Cxx1::Declaration, facebook::glean::cpp::schema::Code::Cxx::Entity, facebook::glean::cpp::schema::Codemarkup::Types::Location>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxFileEntityXMapVariableXRefDeclToDefs";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxFileEntityXMapVariableXRefDeclToDefs
+
+struct CxxFileEntityXRefLocations : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Codemarkup::Types::XRefLocation, facebook::glean::cpp::schema::Code::Cxx::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxFileEntityXRefLocations";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxFileEntityXRefLocations
+
+struct CxxFindDefinitionOfEntity : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Cxx::Entity, facebook::glean::cpp::schema::Code::Cxx::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxFindDefinitionOfEntity";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxFindDefinitionOfEntity
+
+struct CxxModifiers : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Cxx::Entity, facebook::glean::cpp::schema::Codemarkup::Types::Modifiers>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxModifiers";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxModifiers
+
+struct CxxNamespaceDeclarationContainsChild : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Cxx1::NamespaceDeclaration>, facebook::glean::cpp::schema::Code::Cxx::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxNamespaceDeclarationContainsChild";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxNamespaceDeclarationContainsChild
+
+struct CxxResolveDeclarationToEntity : Predicate<std::tuple<facebook::glean::cpp::schema::Cxx1::Declaration, facebook::glean::cpp::schema::Code::Cxx::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxResolveDeclarationToEntity";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxResolveDeclarationToEntity
+
+struct CxxResolveLocation : Predicate<std::tuple<facebook::glean::cpp::schema::Codemarkup::Types::Location, facebook::glean::cpp::schema::Code::Cxx::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxResolveLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxResolveLocation
+
+struct CxxResolveTraceLocation : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Cxx1::Trace>, facebook::glean::cpp::schema::Codemarkup::Types::Location, facebook::glean::cpp::schema::Code::Cxx::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxResolveTraceLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxResolveTraceLocation
+
+struct CxxVisibility : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Cxx::Entity, facebook::glean::cpp::schema::Codemarkup::Types::Visibility>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxVisibility";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxVisibility
+
+struct CxxXRefTargetLocation : Predicate<std::tuple<facebook::glean::cpp::schema::Cxx1::XRefTarget, facebook::glean::cpp::schema::Code::Cxx::Entity, facebook::glean::cpp::schema::Codemarkup::Types::Location>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxXRefTargetLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxXRefTargetLocation
+
+struct EntityToXRefTarget : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Cxx::Entity, facebook::glean::cpp::schema::Cxx1::XRefTarget>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.EntityToXRefTarget";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct EntityToXRefTarget
+
+struct SymbolToEntity : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Cxx::SymbolId, facebook::glean::cpp::schema::Code::Cxx::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.SymbolToEntity";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct SymbolToEntity
+
+struct XRefTargetToEntity : Predicate<std::tuple<facebook::glean::cpp::schema::Cxx1::XRefTarget, facebook::glean::cpp::schema::Code::Cxx::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.XRefTargetToEntity";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct XRefTargetToEntity
+
+} // namespace Cxx
+
+} // namespace Codemarkup
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Glean::Test::Entity> {
+  using Type = Sum<Repr<facebook::glean::cpp::schema::Code::Cxx::Entity>, facebook::glean::cpp::schema::Pp1::Define>;
+};
+
+
+namespace schema {
+
+namespace Glean {
+
+namespace Test {
+
+struct Entity {
+  boost::variant<Alt<0, facebook::glean::cpp::schema::Code::Cxx::Entity>, Alt<1, Fact<facebook::glean::cpp::schema::Pp1::Define>>> GLEAN_value;
+
+  static Entity cxx(const facebook::glean::cpp::schema::Code::Cxx::Entity& a) {
+    return Entity{Alt<0, facebook::glean::cpp::schema::Code::Cxx::Entity>(a)};
+  }
+  static Entity pp(const Fact<facebook::glean::cpp::schema::Pp1::Define>& a) {
+    return Entity{Alt<1, Fact<facebook::glean::cpp::schema::Pp1::Define>>(a)};
+  }
+
+  bool operator==(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Entity>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Entity
+
+} // namespace Test
+
+} // namespace Glean
+
+namespace Search {
+
+namespace Code {
+
+struct CxxPreferDefinitions : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Cxx::Entity, facebook::glean::cpp::schema::Code::Cxx::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.CxxPreferDefinitions";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct CxxPreferDefinitions
+
+} // namespace Code
+
+namespace Kind {
+
+namespace Cxx {
+
+struct SearchObjcInterface : Predicate<std::tuple<std::string, facebook::glean::cpp::schema::Code::Cxx::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.kind.cxx.SearchObjcInterface";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct SearchObjcInterface
+
+} // namespace Cxx
+
+} // namespace Kind
+
+} // namespace Search
+
+namespace Symbolid {
+
+namespace Cxx {
+
+struct DefinitionOfDecl : Predicate<std::tuple<facebook::glean::cpp::schema::Cxx1::Declaration, facebook::glean::cpp::schema::Code::Cxx::Entity>> {
+  static const char* GLEAN_name() {
+    return "symbolid.cxx.DefinitionOfDecl";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct DefinitionOfDecl
+
+struct LookupNamespaceDefinition : Predicate<std::tuple<boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<facebook::glean::cpp::schema::Cxx1::Name>>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<facebook::glean::cpp::schema::Cxx1::NamespaceQName>>>, facebook::glean::cpp::schema::Code::Cxx::Entity>> {
+  static const char* GLEAN_name() {
+    return "symbolid.cxx.LookupNamespaceDefinition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct LookupNamespaceDefinition
+
+} // namespace Cxx
+
+} // namespace Symbolid
+
+namespace Codemarkup {
+
+namespace Cxx {
+
+struct CxxDefinitionContainsChild : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Cxx::Definition, facebook::glean::cpp::schema::Code::Cxx::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxDefinitionContainsChild";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxDefinitionContainsChild
+
+struct CxxDefinitionContainsParent : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Cxx::Definition, facebook::glean::cpp::schema::Code::Cxx::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxDefinitionContainsParent";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxDefinitionContainsParent
+
+struct CxxDefinitionExtendsChild : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Cxx::Definition, facebook::glean::cpp::schema::Code::Cxx::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxDefinitionExtendsChild";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxDefinitionExtendsChild
+
+struct CxxDefinitionExtendsParent : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Cxx::Definition, facebook::glean::cpp::schema::Code::Cxx::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxDefinitionExtendsParent";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxDefinitionExtendsParent
+
+struct CxxDefinitionModifiers : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Cxx::Definition, facebook::glean::cpp::schema::Codemarkup::Types::Modifiers>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxDefinitionModifiers";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxDefinitionModifiers
+
+struct CxxDefnVisibility : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Cxx::Definition, facebook::glean::cpp::schema::Codemarkup::Types::Visibility>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxDefnVisibility";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxDefnVisibility
+
+struct CxxEntityDefinitionBase : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Cxx::Definition, facebook::glean::cpp::schema::Cxx1::Declaration>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxEntityDefinitionBase";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxEntityDefinitionBase
+
+} // namespace Cxx
+
+} // namespace Codemarkup
+
+namespace Search {
+
+namespace Cxx {
+
+struct DeclIsDefn : Predicate<std::tuple<facebook::glean::cpp::schema::Cxx1::Declaration, facebook::glean::cpp::schema::Code::Cxx::Definition>> {
+  static const char* GLEAN_name() {
+    return "search.cxx.DeclIsDefn";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct DeclIsDefn
+
+} // namespace Cxx
+
+} // namespace Search
+
+namespace Code {
+
+namespace Cxx {
+
+struct DeclToDef : Predicate<std::tuple<facebook::glean::cpp::schema::Cxx1::Declaration, Definition>> {
+  static const char* GLEAN_name() {
+    return "code.cxx.DeclToDef";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct DeclToDef
+
+} // namespace Cxx
+
+} // namespace Code
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Code::Cxx::Annotations> {
+  using Type = Sum<Array<facebook::glean::cpp::schema::Cxx1::Attribute>>;
+};
+
+
+namespace schema {
+
+namespace Code {
+
+namespace Cxx {
+
+struct Annotations {
+  boost::variant<Alt<0, std::vector<Fact<facebook::glean::cpp::schema::Cxx1::Attribute>>>> GLEAN_value;
+
+  static Annotations attributes(const std::vector<Fact<facebook::glean::cpp::schema::Cxx1::Attribute>>& a) {
+    return Annotations{Alt<0, std::vector<Fact<facebook::glean::cpp::schema::Cxx1::Attribute>>>(a)};
+  }
+
+  bool operator==(const Annotations& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Annotations& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Annotations& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Annotations& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Annotations& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Annotations& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Annotations>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Annotations
+
+} // namespace Cxx
+
+} // namespace Code
+
+namespace Codemarkup {
+
+namespace Cxx {
+
+struct CxxAnnotation : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Cxx::Entity, facebook::glean::cpp::schema::Code::Cxx::Annotations>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxAnnotation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxAnnotation
+
+} // namespace Cxx
+
+} // namespace Codemarkup
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Code::Csharp::Entity> {
+  using Type = Sum<Repr<facebook::glean::cpp::schema::Csharp::Definition>>;
+};
+
+
+namespace schema {
+
+namespace Code {
+
+namespace Csharp {
+
+struct Entity {
+  boost::variant<Alt<0, facebook::glean::cpp::schema::Csharp::Definition>> GLEAN_value;
+
+  static Entity decl(const facebook::glean::cpp::schema::Csharp::Definition& a) {
+    return Entity{Alt<0, facebook::glean::cpp::schema::Csharp::Definition>(a)};
+  }
+
+  bool operator==(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Entity>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Entity
+
+} // namespace Csharp
+
+} // namespace Code
+
+namespace Codemarkup {
+
+namespace Csharp {
+
+struct CSharpEntityKind : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Csharp::Entity, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.csharp.CSharpEntityKind";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct CSharpEntityKind
+
+struct CSharpEntityLocation : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Csharp::Entity, facebook::glean::cpp::schema::Codemarkup::Types::Location>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.csharp.CSharpEntityLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct CSharpEntityLocation
+
+struct CSharpEntityUses : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Csharp::Entity, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.csharp.CSharpEntityUses";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct CSharpEntityUses
+
+struct CSharpFileEntityXRefLocations : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Codemarkup::Types::XRefLocation, facebook::glean::cpp::schema::Code::Csharp::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.csharp.CSharpFileEntityXRefLocations";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct CSharpFileEntityXRefLocations
+
+struct CSharpResolveLocation : Predicate<std::tuple<facebook::glean::cpp::schema::Codemarkup::Types::Location, facebook::glean::cpp::schema::Code::Csharp::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.csharp.CSharpResolveLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct CSharpResolveLocation
+
+} // namespace Csharp
+
+} // namespace Codemarkup
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Code::Buck::Entity> {
+  using Type = Sum<facebook::glean::cpp::schema::Buck::Locator, facebook::glean::cpp::schema::Src::File, facebook::glean::cpp::schema::Buck::Definition>;
+};
+
+
+namespace schema {
+
+namespace Code {
+
+namespace Buck {
+
+struct Entity {
+  boost::variant<Alt<0, Fact<facebook::glean::cpp::schema::Buck::Locator>>, Alt<1, Fact<facebook::glean::cpp::schema::Src::File>>, Alt<2, Fact<facebook::glean::cpp::schema::Buck::Definition>>> GLEAN_value;
+
+  static Entity locator(const Fact<facebook::glean::cpp::schema::Buck::Locator>& a) {
+    return Entity{Alt<0, Fact<facebook::glean::cpp::schema::Buck::Locator>>(a)};
+  }
+  static Entity file(const Fact<facebook::glean::cpp::schema::Src::File>& a) {
+    return Entity{Alt<1, Fact<facebook::glean::cpp::schema::Src::File>>(a)};
+  }
+  static Entity definition(const Fact<facebook::glean::cpp::schema::Buck::Definition>& a) {
+    return Entity{Alt<2, Fact<facebook::glean::cpp::schema::Buck::Definition>>(a)};
+  }
+
+  bool operator==(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Entity>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Entity
+
+} // namespace Buck
+
+} // namespace Code
+
+namespace Codemarkup {
+
+namespace Buck {
+
+struct BuckEntityKind : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Buck::Entity, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.buck.BuckEntityKind";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct BuckEntityKind
+
+struct BuckEntityLocation : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Buck::Entity, facebook::glean::cpp::schema::Codemarkup::Types::Location>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.buck.BuckEntityLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct BuckEntityLocation
+
+struct BuckEntityUses : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Buck::Entity, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.buck.BuckEntityUses";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct BuckEntityUses
+
+struct BuckFileEntityXRefLocations : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Codemarkup::Types::XRefLocation, facebook::glean::cpp::schema::Code::Buck::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.buck.BuckFileEntityXRefLocations";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct BuckFileEntityXRefLocations
+
+struct BuckResolveLocation : Predicate<std::tuple<facebook::glean::cpp::schema::Codemarkup::Types::Location, facebook::glean::cpp::schema::Code::Buck::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.buck.BuckResolveLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct BuckResolveLocation
+
+} // namespace Buck
+
+} // namespace Codemarkup
+
+namespace Search {
+
+namespace Buck {
+
+struct SearchByFQN : Predicate<std::tuple<boost::variant<Alt<0, std::tuple<>>, Alt<1, std::string>>, std::string, std::string, facebook::glean::cpp::schema::Code::Buck::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.buck.SearchByFQN";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct SearchByFQN
+
+struct SearchDefinition : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, std::string, facebook::glean::cpp::schema::Code::Buck::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.buck.SearchDefinition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct SearchDefinition
+
+struct SearchFile : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Code::Buck::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.buck.SearchFile";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct SearchFile
+
+} // namespace Buck
+
+} // namespace Search
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Code::SymbolId> {
+  using Type = Sum<Repr<facebook::glean::cpp::schema::Code::Scip::SymbolId>, Repr<facebook::glean::cpp::schema::Code::Cxx::SymbolId>>;
+};
+
+
+namespace schema {
+
+namespace Code {
+
+struct SymbolId {
+  boost::variant<Alt<0, facebook::glean::cpp::schema::Code::Scip::SymbolId>, Alt<1, facebook::glean::cpp::schema::Code::Cxx::SymbolId>> GLEAN_value;
+
+  static SymbolId scip(const facebook::glean::cpp::schema::Code::Scip::SymbolId& a) {
+    return SymbolId{Alt<0, facebook::glean::cpp::schema::Code::Scip::SymbolId>(a)};
+  }
+  static SymbolId cxx(const facebook::glean::cpp::schema::Code::Cxx::SymbolId& a) {
+    return SymbolId{Alt<1, facebook::glean::cpp::schema::Code::Cxx::SymbolId>(a)};
+  }
+
+  bool operator==(const SymbolId& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const SymbolId& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const SymbolId& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const SymbolId& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const SymbolId& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const SymbolId& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<SymbolId>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct SymbolId
+
+} // namespace Code
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Code::Language> {
+  using Type = Enum<23>;
+};
+
+
+namespace schema {
+
+namespace Code {
+
+enum class Language { Cpp, PreProcessor, Java, Haskell, Python, Hack, JavaScript, Rust, Thrift, Buck, Erlang, FSharp, Go, Kotlin, OCaml, Scala, Swift, TypeScript, CSharp, GraphQL, Dataswarm, Yaml, Angle };
+
+struct EntityLanguageSCIP : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Scip::Entity, Language>> {
+  static const char* GLEAN_name() {
+    return "code.EntityLanguageSCIP";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 24;
+  }
+}; // struct EntityLanguageSCIP
+
+struct EntityLanguageLSIF : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Lsif::Entity, Language>> {
+  static const char* GLEAN_name() {
+    return "code.EntityLanguageLSIF";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 24;
+  }
+}; // struct EntityLanguageLSIF
+
+} // namespace Code
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Code::Annotations> {
+  using Type = Sum<Repr<facebook::glean::cpp::schema::Code::Cxx::Annotations>, Repr<facebook::glean::cpp::schema::Code::Java::Annotations>, Repr<facebook::glean::cpp::schema::Code::Python::Annotations>, Repr<facebook::glean::cpp::schema::Code::Hack::Annotations>, Repr<facebook::glean::cpp::schema::Code::Fbthrift::Annotations>>;
+};
+
+
+namespace schema {
+
+namespace Code {
+
+struct Annotations {
+  boost::variant<Alt<0, facebook::glean::cpp::schema::Code::Cxx::Annotations>, Alt<1, facebook::glean::cpp::schema::Code::Java::Annotations>, Alt<2, facebook::glean::cpp::schema::Code::Python::Annotations>, Alt<3, facebook::glean::cpp::schema::Code::Hack::Annotations>, Alt<4, facebook::glean::cpp::schema::Code::Fbthrift::Annotations>> GLEAN_value;
+
+  static Annotations cxx(const facebook::glean::cpp::schema::Code::Cxx::Annotations& a) {
+    return Annotations{Alt<0, facebook::glean::cpp::schema::Code::Cxx::Annotations>(a)};
+  }
+  static Annotations java(const facebook::glean::cpp::schema::Code::Java::Annotations& a) {
+    return Annotations{Alt<1, facebook::glean::cpp::schema::Code::Java::Annotations>(a)};
+  }
+  static Annotations python(const facebook::glean::cpp::schema::Code::Python::Annotations& a) {
+    return Annotations{Alt<2, facebook::glean::cpp::schema::Code::Python::Annotations>(a)};
+  }
+  static Annotations hack(const facebook::glean::cpp::schema::Code::Hack::Annotations& a) {
+    return Annotations{Alt<3, facebook::glean::cpp::schema::Code::Hack::Annotations>(a)};
+  }
+  static Annotations fbthrift(const facebook::glean::cpp::schema::Code::Fbthrift::Annotations& a) {
+    return Annotations{Alt<4, facebook::glean::cpp::schema::Code::Fbthrift::Annotations>(a)};
+  }
+
+  bool operator==(const Annotations& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Annotations& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Annotations& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Annotations& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Annotations& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Annotations& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Annotations>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Annotations
+
+} // namespace Code
+
+namespace Cxx1 {
+
+struct FunctionName : Predicate<boost::variant<Alt<0, Fact<Name>>, Alt<1, Operator>, Alt<2, LiteralOperator>, Alt<3, std::tuple<>>, Alt<4, std::tuple<>>, Alt<5, Fact<Type>>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.FunctionName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct FunctionName
+
+} // namespace Cxx1
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Cxx1::RecordKind> {
+  using Type = Sum<Unit, Unit, Unit>;
+};
+
+
+namespace schema {
+
+namespace Cxx1 {
+
+struct RecordKind {
+  boost::variant<Alt<0, std::tuple<>>, Alt<1, std::tuple<>>, Alt<2, std::tuple<>>> GLEAN_value;
+
+  static RecordKind struct_() {
+    return RecordKind{Alt<0, std::tuple<>>(std::make_tuple())};
+  }
+  static RecordKind class_() {
+    return RecordKind{Alt<1, std::tuple<>>(std::make_tuple())};
+  }
+  static RecordKind union_() {
+    return RecordKind{Alt<2, std::tuple<>>(std::make_tuple())};
+  }
+
+  bool operator==(const RecordKind& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const RecordKind& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const RecordKind& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const RecordKind& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const RecordKind& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const RecordKind& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<RecordKind>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct RecordKind
+
+struct RecordDeclaration : Predicate<std::tuple<Fact<QName>, RecordKind, facebook::glean::cpp::schema::Src::Range>> {
+  static const char* GLEAN_name() {
+    return "cxx1.RecordDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct RecordDeclaration
+
+} // namespace Cxx1
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Cxx1::Scope> {
+  using Type = Sum<Unit, facebook::glean::cpp::schema::Cxx1::NamespaceQName, Tuple<facebook::glean::cpp::schema::Cxx1::QName, Repr<facebook::glean::cpp::schema::Cxx1::Access>>, facebook::glean::cpp::schema::Cxx1::FunctionQName>;
+};
+
+
+namespace schema {
+
+namespace Cxx1 {
+
+struct Scope {
+  boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<NamespaceQName>>, Alt<2, std::tuple<Fact<QName>, Access>>, Alt<3, Fact<FunctionQName>>> GLEAN_value;
+
+  static Scope global_() {
+    return Scope{Alt<0, std::tuple<>>(std::make_tuple())};
+  }
+  static Scope namespace_(const Fact<NamespaceQName>& a) {
+    return Scope{Alt<1, Fact<NamespaceQName>>(a)};
+  }
+  static Scope recordWithAccess(const Fact<QName>& record, const Access& access) {
+    return Scope{Alt<2, std::tuple<Fact<QName>, Access>>(std::make_tuple(record, access))};
+  }
+  static Scope local(const Fact<FunctionQName>& a) {
+    return Scope{Alt<3, Fact<FunctionQName>>(a)};
+  }
+
+  bool operator==(const Scope& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Scope& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Scope& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Scope& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Scope& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Scope& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Scope>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Scope
+
+struct DeclarationScope : Predicate<std::tuple<Declaration, Scope>> {
+  static const char* GLEAN_name() {
+    return "cxx1.DeclarationScope";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct DeclarationScope
+
+struct EnumDeclarationByName : Predicate<std::tuple<std::string, Scope, Fact<EnumDeclaration>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.EnumDeclarationByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct EnumDeclarationByName
+
+struct FunctionDeclarationByNameScope : Predicate<std::tuple<std::string, Scope, Fact<FunctionDeclaration>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.FunctionDeclarationByNameScope";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct FunctionDeclarationByNameScope
+
+struct FunctionQName : Predicate<std::tuple<Fact<FunctionName>, Scope>> {
+  static const char* GLEAN_name() {
+    return "cxx1.FunctionQName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct FunctionQName
+
+struct QName : Predicate<std::tuple<Fact<Name>, Scope>> {
+  static const char* GLEAN_name() {
+    return "cxx1.QName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct QName
+
+struct RecordDeclarationClass : Predicate<std::tuple<std::string, Scope, Fact<RecordDeclaration>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.RecordDeclarationClass";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct RecordDeclarationClass
+
+struct RecordDeclarationStruct : Predicate<std::tuple<std::string, Scope, Fact<RecordDeclaration>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.RecordDeclarationStruct";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct RecordDeclarationStruct
+
+struct RecordDeclarationUnion : Predicate<std::tuple<std::string, Scope, Fact<RecordDeclaration>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.RecordDeclarationUnion";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct RecordDeclarationUnion
+
+struct TypeAliasDeclarationByName : Predicate<std::tuple<std::string, Scope, Fact<TypeAliasDeclaration>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.TypeAliasDeclarationByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct TypeAliasDeclarationByName
+
+struct VariableDeclarationNonLocalByName : Predicate<std::tuple<std::string, Scope, Fact<VariableDeclaration>>> {
+  static const char* GLEAN_name() {
+    return "cxx1.VariableDeclarationNonLocalByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct VariableDeclarationNonLocalByName
+
+} // namespace Cxx1
+
+namespace Search {
+
+namespace Cxx {
+
+struct QueryToScopeCase : Predicate<std::tuple<std::vector<std::string>, bool, facebook::glean::cpp::schema::Cxx1::Scope>> {
+  static const char* GLEAN_name() {
+    return "search.cxx.QueryToScopeCase";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 5;
+  }
+}; // struct QueryToScopeCase
+
+} // namespace Cxx
+
+namespace Kind {
+
+namespace Cxx {
+
+struct SearchClass : Predicate<std::tuple<std::string, facebook::glean::cpp::schema::Cxx1::Scope, facebook::glean::cpp::schema::Code::Cxx::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.kind.cxx.SearchClass";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct SearchClass
+
+struct SearchEnum : Predicate<std::tuple<std::string, facebook::glean::cpp::schema::Cxx1::Scope, facebook::glean::cpp::schema::Code::Cxx::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.kind.cxx.SearchEnum";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct SearchEnum
+
+struct SearchEnumerator : Predicate<std::tuple<std::string, facebook::glean::cpp::schema::Cxx1::Scope, facebook::glean::cpp::schema::Code::Cxx::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.kind.cxx.SearchEnumerator";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct SearchEnumerator
+
+struct SearchFunction : Predicate<std::tuple<std::string, facebook::glean::cpp::schema::Cxx1::Scope, facebook::glean::cpp::schema::Code::Cxx::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.kind.cxx.SearchFunction";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct SearchFunction
+
+struct SearchNamespace : Predicate<std::tuple<std::string, facebook::glean::cpp::schema::Cxx1::Scope, facebook::glean::cpp::schema::Code::Cxx::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.kind.cxx.SearchNamespace";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct SearchNamespace
+
+struct SearchStruct : Predicate<std::tuple<std::string, facebook::glean::cpp::schema::Cxx1::Scope, facebook::glean::cpp::schema::Code::Cxx::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.kind.cxx.SearchStruct";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct SearchStruct
+
+struct SearchTypeAlias : Predicate<std::tuple<std::string, facebook::glean::cpp::schema::Cxx1::Scope, facebook::glean::cpp::schema::Code::Cxx::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.kind.cxx.SearchTypeAlias";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct SearchTypeAlias
+
+struct SearchUnion : Predicate<std::tuple<std::string, facebook::glean::cpp::schema::Cxx1::Scope, facebook::glean::cpp::schema::Code::Cxx::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.kind.cxx.SearchUnion";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct SearchUnion
+
+struct SearchVariable : Predicate<std::tuple<std::string, facebook::glean::cpp::schema::Cxx1::Scope, facebook::glean::cpp::schema::Code::Cxx::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.kind.cxx.SearchVariable";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct SearchVariable
+
+} // namespace Cxx
+
+} // namespace Kind
+
+} // namespace Search
+
+namespace Symbolid {
+
+namespace Cxx {
+
+struct LookupDeclaration : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Cxx1::Name>, facebook::glean::cpp::schema::Cxx1::Scope, facebook::glean::cpp::schema::Cxx1::Declaration>> {
+  static const char* GLEAN_name() {
+    return "symbolid.cxx.LookupDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct LookupDeclaration
+
+struct LookupDefinition : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Cxx1::Name>, facebook::glean::cpp::schema::Cxx1::Scope, facebook::glean::cpp::schema::Code::Cxx::Entity>> {
+  static const char* GLEAN_name() {
+    return "symbolid.cxx.LookupDefinition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct LookupDefinition
+
+struct LookupEnumerator : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Cxx1::Name>, Fact<facebook::glean::cpp::schema::Cxx1::Name>, facebook::glean::cpp::schema::Cxx1::Scope, Fact<facebook::glean::cpp::schema::Cxx1::Enumerator>>> {
+  static const char* GLEAN_name() {
+    return "symbolid.cxx.LookupEnumerator";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct LookupEnumerator
+
+struct LookupFunctionDeclaration : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Cxx1::FunctionName>, facebook::glean::cpp::schema::Cxx1::Scope, facebook::glean::cpp::schema::Cxx1::Declaration>> {
+  static const char* GLEAN_name() {
+    return "symbolid.cxx.LookupFunctionDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct LookupFunctionDeclaration
+
+struct LookupFunctionDefinition : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Cxx1::FunctionName>, facebook::glean::cpp::schema::Cxx1::Scope, facebook::glean::cpp::schema::Code::Cxx::Entity>> {
+  static const char* GLEAN_name() {
+    return "symbolid.cxx.LookupFunctionDefinition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct LookupFunctionDefinition
+
+struct LookupFunctionSignatureDeclaration : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Cxx1::FunctionName>, facebook::glean::cpp::schema::Cxx1::Scope, Fact<facebook::glean::cpp::schema::Cxx1::Signature>, facebook::glean::cpp::schema::Cxx1::Declaration>> {
+  static const char* GLEAN_name() {
+    return "symbolid.cxx.LookupFunctionSignatureDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct LookupFunctionSignatureDeclaration
+
+struct LookupFunctionSignatureDefinition : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Cxx1::FunctionName>, facebook::glean::cpp::schema::Cxx1::Scope, Fact<facebook::glean::cpp::schema::Cxx1::Signature>, facebook::glean::cpp::schema::Code::Cxx::Entity>> {
+  static const char* GLEAN_name() {
+    return "symbolid.cxx.LookupFunctionSignatureDefinition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct LookupFunctionSignatureDefinition
+
+struct LookupFunctionSignatureQualifierDeclaration : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Cxx1::FunctionName>, facebook::glean::cpp::schema::Cxx1::Scope, Fact<facebook::glean::cpp::schema::Cxx1::Signature>, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Cxx1::MethodSignature>>, facebook::glean::cpp::schema::Cxx1::Declaration>> {
+  static const char* GLEAN_name() {
+    return "symbolid.cxx.LookupFunctionSignatureQualifierDeclaration";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct LookupFunctionSignatureQualifierDeclaration
+
+struct LookupFunctionSignatureQualifierDefinition : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Cxx1::FunctionName>, facebook::glean::cpp::schema::Cxx1::Scope, Fact<facebook::glean::cpp::schema::Cxx1::Signature>, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Cxx1::MethodSignature>>, facebook::glean::cpp::schema::Code::Cxx::Entity>> {
+  static const char* GLEAN_name() {
+    return "symbolid.cxx.LookupFunctionSignatureQualifierDefinition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct LookupFunctionSignatureQualifierDefinition
+
+} // namespace Cxx
+
+} // namespace Symbolid
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Fbthrift::ResultType> {
+  using Type = Sum<Unit, Unit, facebook::glean::cpp::schema::Fbthrift::TypeSpecification, Repr<facebook::glean::cpp::schema::Fbthrift::ResultStream>, facebook::glean::cpp::schema::Fbthrift::ServiceName, Repr<facebook::glean::cpp::schema::Fbthrift::ResultSink>>;
+};
+
+
+namespace schema {
+
+namespace Fbthrift {
+
+struct ResultType {
+  boost::variant<Alt<0, std::tuple<>>, Alt<1, std::tuple<>>, Alt<2, Fact<TypeSpecification>>, Alt<3, ResultStream>, Alt<4, Fact<ServiceName>>, Alt<5, ResultSink>> GLEAN_value;
+
+  static ResultType oneway_() {
+    return ResultType{Alt<0, std::tuple<>>(std::make_tuple())};
+  }
+  static ResultType void_() {
+    return ResultType{Alt<1, std::tuple<>>(std::make_tuple())};
+  }
+  static ResultType result(const Fact<TypeSpecification>& a) {
+    return ResultType{Alt<2, Fact<TypeSpecification>>(a)};
+  }
+  static ResultType stream_(const ResultStream& a) {
+    return ResultType{Alt<3, ResultStream>(a)};
+  }
+  static ResultType service_(const Fact<ServiceName>& a) {
+    return ResultType{Alt<4, Fact<ServiceName>>(a)};
+  }
+  static ResultType sink_(const ResultSink& a) {
+    return ResultType{Alt<5, ResultSink>(a)};
+  }
+
+  bool operator==(const ResultType& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const ResultType& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const ResultType& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const ResultType& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const ResultType& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const ResultType& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<ResultType>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct ResultType
+
+struct FunctionSpecification : Predicate<std::tuple<Fact<FunctionName>, ResultType, std::vector<UnqualField>, std::vector<ExceptionSpecification>, std::vector<Fact<StructuredAnnotation>>>> {
+  static const char* GLEAN_name() {
+    return "fbthrift.FunctionSpecification";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct FunctionSpecification
+
+} // namespace Fbthrift
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Buck::XRefDestination> {
+  using Type = Sum<facebook::glean::cpp::schema::Buck::Locator, facebook::glean::cpp::schema::Src::File, facebook::glean::cpp::schema::Buck::Definition>;
+};
+
+
+namespace schema {
+
+namespace Buck {
+
+struct XRefDestination {
+  boost::variant<Alt<0, Fact<Locator>>, Alt<1, Fact<facebook::glean::cpp::schema::Src::File>>, Alt<2, Fact<Definition>>> GLEAN_value;
+
+  static XRefDestination locator(const Fact<Locator>& a) {
+    return XRefDestination{Alt<0, Fact<Locator>>(a)};
+  }
+  static XRefDestination file(const Fact<facebook::glean::cpp::schema::Src::File>& a) {
+    return XRefDestination{Alt<1, Fact<facebook::glean::cpp::schema::Src::File>>(a)};
+  }
+  static XRefDestination definition(const Fact<Definition>& a) {
+    return XRefDestination{Alt<2, Fact<Definition>>(a)};
+  }
+
+  bool operator==(const XRefDestination& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const XRefDestination& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const XRefDestination& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const XRefDestination& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const XRefDestination& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const XRefDestination& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<XRefDestination>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct XRefDestination
+
+} // namespace Buck
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Buck::XRef> {
+  using Type = Tuple<Repr<facebook::glean::cpp::schema::Buck::XRefDestination>, Array<Repr<facebook::glean::cpp::schema::Src::ByteSpan>>>;
+};
+
+
+namespace schema {
+
+namespace Buck {
+
+struct XRef {
+  XRefDestination destination;
+  std::vector<facebook::glean::cpp::schema::Src::ByteSpan> ranges;
+
+  bool operator==(const XRef& other) const {
+    return std::tie(destination,ranges)
+             == std::tie(other.destination,other.ranges);
+  }
+  bool operator!=(const XRef& other) const {
+    return std::tie(destination,ranges)
+             != std::tie(other.destination,other.ranges);
+  }
+  bool operator<(const XRef& other) const {
+    return std::tie(destination,ranges)
+             < std::tie(other.destination,other.ranges);
+  }
+  bool operator<=(const XRef& other) const {
+    return std::tie(destination,ranges)
+             <= std::tie(other.destination,other.ranges);
+  }
+  bool operator>(const XRef& other) const {
+    return std::tie(destination,ranges)
+             > std::tie(other.destination,other.ranges);
+  }
+  bool operator>=(const XRef& other) const {
+    return std::tie(destination,ranges)
+             >= std::tie(other.destination,other.ranges);
+  }
+  void outputRepr(Output<Repr<XRef>> out) const {
+    outputValue(out, std::make_tuple(destination, ranges));
+  }
+}; // struct XRef
+
+struct Type : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "buck.Type";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct Type
+
+struct TranslationUnit : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, Fact<Locator>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Platform>>>>> {
+  static const char* GLEAN_name() {
+    return "buck.TranslationUnit";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct TranslationUnit
+
+struct TargetUses : Predicate<std::tuple<Fact<Locator>, Fact<facebook::glean::cpp::schema::Src::File>, std::vector<facebook::glean::cpp::schema::Src::ByteSpan>>> {
+  static const char* GLEAN_name() {
+    return "buck.TargetUses";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct TargetUses
+
+struct TargetSourcesBaseModule : Predicate<std::tuple<Fact<Target>, std::vector<Fact<File>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<AttributeValue>>>>> {
+  static const char* GLEAN_name() {
+    return "buck.TargetSourcesBaseModule";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct TargetSourcesBaseModule
+
+struct TargetSources : Predicate<std::tuple<Fact<Target>, std::vector<Fact<File>>, std::vector<Fact<File>>, std::vector<Fact<File>>>> {
+  static const char* GLEAN_name() {
+    return "buck.TargetSources";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct TargetSources
+
+struct TargetOuts : Predicate<std::tuple<Fact<Target>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<OutputLabel>>>, Fact<facebook::glean::cpp::schema::Src::File>>> {
+  static const char* GLEAN_name() {
+    return "buck.TargetOuts";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct TargetOuts
+
+struct TargetOut : Predicate<std::tuple<Fact<Target>, Fact<facebook::glean::cpp::schema::Src::File>>> {
+  static const char* GLEAN_name() {
+    return "buck.TargetOut";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct TargetOut
+
+struct TargetMode : Predicate<std::tuple<Fact<Target>, std::string>> {
+  static const char* GLEAN_name() {
+    return "buck.TargetMode";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct TargetMode
+
+struct TargetLocation : Predicate<std::tuple<Fact<Locator>, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "buck.TargetLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct TargetLocation
+
+struct TargetLinkWhole : Predicate<Fact<Target>> {
+  static const char* GLEAN_name() {
+    return "buck.TargetLinkWhole";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct TargetLinkWhole
+
+struct TargetIndexerName : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "buck.TargetIndexerName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct TargetIndexerName
+
+struct TargetIndexer : Predicate<std::tuple<Fact<TargetIndexerName>, Fact<Target>>> {
+  static const char* GLEAN_name() {
+    return "buck.TargetIndexer";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct TargetIndexer
+
+struct TargetHash : Predicate<std::tuple<Fact<Locator>, std::string>> {
+  static const char* GLEAN_name() {
+    return "buck.TargetHash";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct TargetHash
+
+struct TargetCallByCallExpr : Predicate<std::tuple<Fact<CallExpr>, Fact<TargetCall>>> {
+  static const char* GLEAN_name() {
+    return "buck.TargetCallByCallExpr";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct TargetCallByCallExpr
+
+struct TargetCall : Predicate<std::tuple<Fact<Locator>, std::vector<Fact<CallArgument>>, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<CallExpr>>>>> {
+  static const char* GLEAN_name() {
+    return "buck.TargetCall";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct TargetCall
+
+struct TargetByType : Predicate<std::tuple<Fact<Type>, Fact<Target>>> {
+  static const char* GLEAN_name() {
+    return "buck.TargetByType";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct TargetByType
+
+struct TargetAttribute : Predicate<std::tuple<Fact<Target>, Fact<AttributeName>, Fact<AttributeValue>>> {
+  static const char* GLEAN_name() {
+    return "buck.TargetAttribute";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct TargetAttribute
+
+struct Target : Predicate<std::tuple<Fact<Locator>, Fact<Type>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Platform>>>, Fact<Labels>>> {
+  static const char* GLEAN_name() {
+    return "buck.Target";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct Target
+
+struct SourceFileLocation : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "buck.SourceFileLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct SourceFileLocation
+
+struct SearchByLocalName : Predicate<std::tuple<Fact<LocalName>, XRefDestination>> {
+  static const char* GLEAN_name() {
+    return "buck.SearchByLocalName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct SearchByLocalName
+
+struct RuleKey : Predicate<std::tuple<Fact<Locator>, std::string>> {
+  static const char* GLEAN_name() {
+    return "buck.RuleKey";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct RuleKey
+
+struct Platform : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "buck.Platform";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct Platform
+
+struct Owner : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, Fact<TargetSources>>> {
+  static const char* GLEAN_name() {
+    return "buck.Owner";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct Owner
+
+struct OutsTarget : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, Fact<Target>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<OutputLabel>>>>> {
+  static const char* GLEAN_name() {
+    return "buck.OutsTarget";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct OutsTarget
+
+struct OutputLabel : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "buck.OutputLabel";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct OutputLabel
+
+struct OutTarget : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, Fact<Target>>> {
+  static const char* GLEAN_name() {
+    return "buck.OutTarget";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct OutTarget
+
+struct LocatorWithLabel : Predicate<std::tuple<Fact<Locator>, Fact<OutputLabel>>> {
+  static const char* GLEAN_name() {
+    return "buck.LocatorWithLabel";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct LocatorWithLabel
+
+struct LocatorReverseDeps : Predicate<std::tuple<Fact<Locator>, std::vector<Fact<Locator>>>> {
+  static const char* GLEAN_name() {
+    return "buck.LocatorReverseDeps";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct LocatorReverseDeps
+
+struct LocatorReverseDep : Predicate<std::tuple<Fact<Locator>, Fact<Locator>>> {
+  static const char* GLEAN_name() {
+    return "buck.LocatorReverseDep";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct LocatorReverseDep
+
+struct Locator : Predicate<std::tuple<boost::variant<Alt<0, std::tuple<>>, Alt<1, std::string>>, std::string, std::string>> {
+  static const char* GLEAN_name() {
+    return "buck.Locator";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct Locator
+
+struct LocalNameLowerCase : Predicate<std::tuple<std::string, Fact<LocalName>>> {
+  static const char* GLEAN_name() {
+    return "buck.LocalNameLowerCase";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct LocalNameLowerCase
+
+struct LocalName : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "buck.LocalName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct LocalName
+
+struct Labels : Predicate<std::vector<Fact<Label>>> {
+  static const char* GLEAN_name() {
+    return "buck.Labels";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct Labels
+
+struct Label : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "buck.Label";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct Label
+
+struct IndexerName : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "buck.IndexerName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct IndexerName
+
+struct FileXRefs : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, std::vector<XRef>>> {
+  static const char* GLEAN_name() {
+    return "buck.FileXRefs";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct FileXRefs
+
+struct FileToTarget : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, Fact<Locator>>> {
+  static const char* GLEAN_name() {
+    return "buck.FileToTarget";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct FileToTarget
+
+struct FileTarget : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, Fact<Locator>>> {
+  static const char* GLEAN_name() {
+    return "buck.FileTarget";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct FileTarget
+
+struct FileResolved : Predicate<std::tuple<Fact<File>, Fact<facebook::glean::cpp::schema::Src::File>>> {
+  static const char* GLEAN_name() {
+    return "buck.FileResolved";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct FileResolved
+
+struct FileEntity : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, XRefDestination>> {
+  static const char* GLEAN_name() {
+    return "buck.FileEntity";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct FileEntity
+
+struct FileDefinition : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, Fact<Definition>>> {
+  static const char* GLEAN_name() {
+    return "buck.FileDefinition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct FileDefinition
+
+struct File : Predicate<boost::variant<Alt<0, Fact<facebook::glean::cpp::schema::Src::File>>, Alt<1, Fact<Locator>>, Alt<2, Fact<LocatorWithLabel>>>> {
+  static const char* GLEAN_name() {
+    return "buck.File";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct File
+
+struct FailureSources : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, Fact<IndexFailureX>>> {
+  static const char* GLEAN_name() {
+    return "buck.FailureSources";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct FailureSources
+
+} // namespace Buck
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Buck::FailureReason> {
+  using Type = Enum<6>;
+};
+
+
+namespace schema {
+
+namespace Buck {
+
+enum class FailureReason { Skipped, Blocked, EmptyCdb, FailedCdb, QueryFailed, Unclassified };
+
+struct IndexFailureX : Predicate<std::tuple<boost::variant<Alt<0, Fact<Locator>>, Alt<1, Fact<facebook::glean::cpp::schema::Src::File>>>, Fact<IndexerName>, FailureReason, std::string, boost::variant<Alt<0, std::tuple<>>, Alt<1, std::string>>>> {
+  static const char* GLEAN_name() {
+    return "buck.IndexFailureX";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct IndexFailureX
+
+struct DestinationUses : Predicate<std::tuple<XRefDestination, Fact<facebook::glean::cpp::schema::Src::File>, std::vector<facebook::glean::cpp::schema::Src::ByteSpan>>> {
+  static const char* GLEAN_name() {
+    return "buck.DestinationUses";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct DestinationUses
+
+} // namespace Buck
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Buck::Dependency> {
+  using Type = Tuple<facebook::glean::cpp::schema::Buck::Locator, Bool, Bool>;
+};
+
+
+namespace schema {
+
+namespace Buck {
+
+struct Dependency {
+  Fact<Locator> target;
+  bool explicit_;
+  bool exported;
+
+  bool operator==(const Dependency& other) const {
+    return std::tie(target,explicit_,exported)
+             == std::tie(other.target,other.explicit_,other.exported);
+  }
+  bool operator!=(const Dependency& other) const {
+    return std::tie(target,explicit_,exported)
+             != std::tie(other.target,other.explicit_,other.exported);
+  }
+  bool operator<(const Dependency& other) const {
+    return std::tie(target,explicit_,exported)
+             < std::tie(other.target,other.explicit_,other.exported);
+  }
+  bool operator<=(const Dependency& other) const {
+    return std::tie(target,explicit_,exported)
+             <= std::tie(other.target,other.explicit_,other.exported);
+  }
+  bool operator>(const Dependency& other) const {
+    return std::tie(target,explicit_,exported)
+             > std::tie(other.target,other.explicit_,other.exported);
+  }
+  bool operator>=(const Dependency& other) const {
+    return std::tie(target,explicit_,exported)
+             >= std::tie(other.target,other.explicit_,other.exported);
+  }
+  void outputRepr(Output<Repr<Dependency>> out) const {
+    outputValue(out, std::make_tuple(target, explicit_, exported));
+  }
+}; // struct Dependency
+
+struct TargetDependencies : Predicate<std::tuple<Fact<Target>, std::vector<Dependency>>> {
+  static const char* GLEAN_name() {
+    return "buck.TargetDependencies";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct TargetDependencies
+
+struct DefinitionLocation : Predicate<std::tuple<Fact<Definition>, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "buck.DefinitionLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct DefinitionLocation
+
+struct Definition : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, std::string>> {
+  static const char* GLEAN_name() {
+    return "buck.Definition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct Definition
+
+struct Consumer : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, Fact<TargetSources>>> {
+  static const char* GLEAN_name() {
+    return "buck.Consumer";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct Consumer
+
+} // namespace Buck
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Buck::CallName> {
+  using Type = Sum<String, facebook::glean::cpp::schema::Buck::Definition>;
+};
+
+
+namespace schema {
+
+namespace Buck {
+
+struct CallName {
+  boost::variant<Alt<0, std::string>, Alt<1, Fact<Definition>>> GLEAN_value;
+
+  static CallName prim(const std::string& a) {
+    return CallName{Alt<0, std::string>(a)};
+  }
+  static CallName definition(const Fact<Definition>& a) {
+    return CallName{Alt<1, Fact<Definition>>(a)};
+  }
+
+  bool operator==(const CallName& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const CallName& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const CallName& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const CallName& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const CallName& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const CallName& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<CallName>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct CallName
+
+struct CallExpr : Predicate<boost::variant<Alt<0, CallName>, Alt<1, std::tuple<Fact<CallExpr>, std::string>>>> {
+  static const char* GLEAN_name() {
+    return "buck.CallExpr";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CallExpr
+
+struct CallArgument : Predicate<std::tuple<boost::variant<Alt<0, std::tuple<>>, Alt<1, std::string>>, Fact<ArgumentValue>, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "buck.CallArgument";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CallArgument
+
+struct AttributeName : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "buck.AttributeName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct AttributeName
+
+} // namespace Buck
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Buck::AttributeMapping> {
+  using Type = Tuple<String, facebook::glean::cpp::schema::Buck::AttributeValue>;
+};
+
+
+namespace schema {
+
+namespace Buck {
+
+struct AttributeMapping {
+  std::string key;
+  Fact<AttributeValue> value;
+
+  bool operator==(const AttributeMapping& other) const {
+    return std::tie(key,value)
+             == std::tie(other.key,other.value);
+  }
+  bool operator!=(const AttributeMapping& other) const {
+    return std::tie(key,value)
+             != std::tie(other.key,other.value);
+  }
+  bool operator<(const AttributeMapping& other) const {
+    return std::tie(key,value)
+             < std::tie(other.key,other.value);
+  }
+  bool operator<=(const AttributeMapping& other) const {
+    return std::tie(key,value)
+             <= std::tie(other.key,other.value);
+  }
+  bool operator>(const AttributeMapping& other) const {
+    return std::tie(key,value)
+             > std::tie(other.key,other.value);
+  }
+  bool operator>=(const AttributeMapping& other) const {
+    return std::tie(key,value)
+             >= std::tie(other.key,other.value);
+  }
+  void outputRepr(Output<Repr<AttributeMapping>> out) const {
+    outputValue(out, std::make_tuple(key, value));
+  }
+}; // struct AttributeMapping
+
+struct AttributeValue : Predicate<boost::variant<Alt<0, std::string>, Alt<1, std::vector<Fact<AttributeValue>>>, Alt<2, std::vector<AttributeMapping>>>> {
+  static const char* GLEAN_name() {
+    return "buck.AttributeValue";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct AttributeValue
+
+} // namespace Buck
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Buck::ArgumentMapping> {
+  using Type = Tuple<String, facebook::glean::cpp::schema::Buck::ArgumentValue>;
+};
+
+
+namespace schema {
+
+namespace Buck {
+
+struct ArgumentMapping {
+  std::string key;
+  Fact<ArgumentValue> value;
+
+  bool operator==(const ArgumentMapping& other) const {
+    return std::tie(key,value)
+             == std::tie(other.key,other.value);
+  }
+  bool operator!=(const ArgumentMapping& other) const {
+    return std::tie(key,value)
+             != std::tie(other.key,other.value);
+  }
+  bool operator<(const ArgumentMapping& other) const {
+    return std::tie(key,value)
+             < std::tie(other.key,other.value);
+  }
+  bool operator<=(const ArgumentMapping& other) const {
+    return std::tie(key,value)
+             <= std::tie(other.key,other.value);
+  }
+  bool operator>(const ArgumentMapping& other) const {
+    return std::tie(key,value)
+             > std::tie(other.key,other.value);
+  }
+  bool operator>=(const ArgumentMapping& other) const {
+    return std::tie(key,value)
+             >= std::tie(other.key,other.value);
+  }
+  void outputRepr(Output<Repr<ArgumentMapping>> out) const {
+    outputValue(out, std::make_tuple(key, value));
+  }
+}; // struct ArgumentMapping
+
+struct ArgumentValue : Predicate<boost::variant<Alt<0, std::string>, Alt<1, std::vector<Fact<ArgumentValue>>>, Alt<2, std::vector<ArgumentMapping>>>> {
+  static const char* GLEAN_name() {
+    return "buck.ArgumentValue";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct ArgumentValue
+
+} // namespace Buck
+
+namespace Anglelang {
+
+struct TypeDecl : Predicate<std::tuple<Fact<Name>, Fact<Type>>> {
+  static const char* GLEAN_name() {
+    return "anglelang.TypeDecl";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct TypeDecl
+
+struct Name : Predicate<std::string> {
+  static const char* GLEAN_name() {
+    return "anglelang.Name";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct Name
+
+using ImportStmt = Fact<Name>;
+
+} // namespace Anglelang
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Anglelang::Field> {
+  using Type = Tuple<facebook::glean::cpp::schema::Anglelang::Name, facebook::glean::cpp::schema::Anglelang::Type>;
+};
+
+
+namespace schema {
+
+namespace Anglelang {
+
+struct Field {
+  Fact<Name> name;
+  Fact<Type> ty;
+
+  bool operator==(const Field& other) const {
+    return std::tie(name,ty)
+             == std::tie(other.name,other.ty);
+  }
+  bool operator!=(const Field& other) const {
+    return std::tie(name,ty)
+             != std::tie(other.name,other.ty);
+  }
+  bool operator<(const Field& other) const {
+    return std::tie(name,ty)
+             < std::tie(other.name,other.ty);
+  }
+  bool operator<=(const Field& other) const {
+    return std::tie(name,ty)
+             <= std::tie(other.name,other.ty);
+  }
+  bool operator>(const Field& other) const {
+    return std::tie(name,ty)
+             > std::tie(other.name,other.ty);
+  }
+  bool operator>=(const Field& other) const {
+    return std::tie(name,ty)
+             >= std::tie(other.name,other.ty);
+  }
+  void outputRepr(Output<Repr<Field>> out) const {
+    outputValue(out, std::make_tuple(name, ty));
+  }
+}; // struct Field
+
+struct Type : Predicate<boost::variant<Alt<0, std::tuple<>>, Alt<1, std::tuple<>>, Alt<2, std::tuple<>>, Alt<3, std::tuple<>>, Alt<4, Fact<Type>>, Alt<5, Fact<Type>>, Alt<6, Fact<Type>>, Alt<7, std::vector<Field>>, Alt<8, std::vector<Field>>, Alt<9, Fact<Name>>, Alt<10, Fact<Name>>, Alt<11, std::vector<Fact<Name>>>>> {
+  static const char* GLEAN_name() {
+    return "anglelang.Type";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct Type
+
+struct EvolveDecl : Predicate<std::tuple<Fact<Name>, Fact<Name>>> {
+  static const char* GLEAN_name() {
+    return "anglelang.EvolveDecl";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct EvolveDecl
+
+} // namespace Anglelang
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Anglelang::DeriveInfo> {
+  using Type = Enum<4>;
+};
+
+
+namespace schema {
+
+namespace Anglelang {
+
+enum class DeriveInfo { NoDeriving, OnDemand, Stored, IfEmpty };
+
+struct DerivingDecl : Predicate<std::tuple<Fact<Name>, DeriveInfo>> {
+  static const char* GLEAN_name() {
+    return "anglelang.DerivingDecl";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct DerivingDecl
+
+struct PredicateDecl : Predicate<std::tuple<Fact<Name>, Fact<Type>, Fact<Type>, DeriveInfo>> {
+  static const char* GLEAN_name() {
+    return "anglelang.PredicateDecl";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct PredicateDecl
+
+} // namespace Anglelang
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Anglelang::Declaration> {
+  using Type = Sum<facebook::glean::cpp::schema::Anglelang::PredicateDecl, facebook::glean::cpp::schema::Anglelang::TypeDecl, facebook::glean::cpp::schema::Anglelang::SchemaDecl, Repr<facebook::glean::cpp::schema::Anglelang::ImportStmt>, facebook::glean::cpp::schema::Anglelang::EvolveDecl, facebook::glean::cpp::schema::Anglelang::DerivingDecl>;
+};
+
+
+namespace schema {
+
+namespace Anglelang {
+
+struct Declaration {
+  boost::variant<Alt<0, Fact<PredicateDecl>>, Alt<1, Fact<TypeDecl>>, Alt<2, Fact<SchemaDecl>>, Alt<3, ImportStmt>, Alt<4, Fact<EvolveDecl>>, Alt<5, Fact<DerivingDecl>>> GLEAN_value;
+
+  static Declaration pred(const Fact<PredicateDecl>& a) {
+    return Declaration{Alt<0, Fact<PredicateDecl>>(a)};
+  }
+  static Declaration ty(const Fact<TypeDecl>& a) {
+    return Declaration{Alt<1, Fact<TypeDecl>>(a)};
+  }
+  static Declaration schema(const Fact<SchemaDecl>& a) {
+    return Declaration{Alt<2, Fact<SchemaDecl>>(a)};
+  }
+  static Declaration imp(const ImportStmt& a) {
+    return Declaration{Alt<3, ImportStmt>(a)};
+  }
+  static Declaration evolve(const Fact<EvolveDecl>& a) {
+    return Declaration{Alt<4, Fact<EvolveDecl>>(a)};
+  }
+  static Declaration derive_(const Fact<DerivingDecl>& a) {
+    return Declaration{Alt<5, Fact<DerivingDecl>>(a)};
+  }
+
+  bool operator==(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Declaration& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Declaration>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Declaration
+
+struct DeclarationLocation : Predicate<std::tuple<Declaration, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "anglelang.DeclarationLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct DeclarationLocation
+
+struct DeclarationToName : Predicate<Declaration, Fact<Name>> {
+  static const char* GLEAN_name() {
+    return "anglelang.DeclarationToName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct DeclarationToName
+
+struct SchemaDecl : Predicate<std::tuple<Fact<Name>, std::vector<Declaration>>> {
+  static const char* GLEAN_name() {
+    return "anglelang.SchemaDecl";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct SchemaDecl
+
+} // namespace Anglelang
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Anglelang::XRefTarget> {
+  using Type = Tuple<Repr<facebook::glean::cpp::schema::Anglelang::Declaration>>;
+};
+
+
+namespace schema {
+
+namespace Anglelang {
+
+struct XRefTarget {
+  Declaration ref;
+
+  bool operator==(const XRefTarget& other) const {
+    return std::tie(ref)
+             == std::tie(other.ref);
+  }
+  bool operator!=(const XRefTarget& other) const {
+    return std::tie(ref)
+             != std::tie(other.ref);
+  }
+  bool operator<(const XRefTarget& other) const {
+    return std::tie(ref)
+             < std::tie(other.ref);
+  }
+  bool operator<=(const XRefTarget& other) const {
+    return std::tie(ref)
+             <= std::tie(other.ref);
+  }
+  bool operator>(const XRefTarget& other) const {
+    return std::tie(ref)
+             > std::tie(other.ref);
+  }
+  bool operator>=(const XRefTarget& other) const {
+    return std::tie(ref)
+             >= std::tie(other.ref);
+  }
+  void outputRepr(Output<Repr<XRefTarget>> out) const {
+    outputValue(out, std::make_tuple(ref));
+  }
+}; // struct XRefTarget
+
+struct TargetUses : Predicate<std::tuple<XRefTarget, Fact<facebook::glean::cpp::schema::Src::File>, std::vector<facebook::glean::cpp::schema::Src::ByteSpan>>> {
+  static const char* GLEAN_name() {
+    return "anglelang.TargetUses";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct TargetUses
+
+} // namespace Anglelang
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Anglelang::XRef> {
+  using Type = Tuple<Repr<facebook::glean::cpp::schema::Anglelang::XRefTarget>, Array<Repr<facebook::glean::cpp::schema::Src::ByteSpan>>>;
+};
+
+
+namespace schema {
+
+namespace Anglelang {
+
+struct XRef {
+  XRefTarget target;
+  std::vector<facebook::glean::cpp::schema::Src::ByteSpan> span;
+
+  bool operator==(const XRef& other) const {
+    return std::tie(target,span)
+             == std::tie(other.target,other.span);
+  }
+  bool operator!=(const XRef& other) const {
+    return std::tie(target,span)
+             != std::tie(other.target,other.span);
+  }
+  bool operator<(const XRef& other) const {
+    return std::tie(target,span)
+             < std::tie(other.target,other.span);
+  }
+  bool operator<=(const XRef& other) const {
+    return std::tie(target,span)
+             <= std::tie(other.target,other.span);
+  }
+  bool operator>(const XRef& other) const {
+    return std::tie(target,span)
+             > std::tie(other.target,other.span);
+  }
+  bool operator>=(const XRef& other) const {
+    return std::tie(target,span)
+             >= std::tie(other.target,other.span);
+  }
+  void outputRepr(Output<Repr<XRef>> out) const {
+    outputValue(out, std::make_tuple(target, span));
+  }
+}; // struct XRef
+
+struct FileXRefs : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, std::vector<XRef>>> {
+  static const char* GLEAN_name() {
+    return "anglelang.FileXRefs";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct FileXRefs
+
+} // namespace Anglelang
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Code::Anglelang::Entity> {
+  using Type = Tuple<Repr<facebook::glean::cpp::schema::Anglelang::Declaration>>;
+};
+
+
+namespace schema {
+
+namespace Code {
+
+namespace Anglelang {
+
+struct Entity {
+  facebook::glean::cpp::schema::Anglelang::Declaration decl;
+
+  bool operator==(const Entity& other) const {
+    return std::tie(decl)
+             == std::tie(other.decl);
+  }
+  bool operator!=(const Entity& other) const {
+    return std::tie(decl)
+             != std::tie(other.decl);
+  }
+  bool operator<(const Entity& other) const {
+    return std::tie(decl)
+             < std::tie(other.decl);
+  }
+  bool operator<=(const Entity& other) const {
+    return std::tie(decl)
+             <= std::tie(other.decl);
+  }
+  bool operator>(const Entity& other) const {
+    return std::tie(decl)
+             > std::tie(other.decl);
+  }
+  bool operator>=(const Entity& other) const {
+    return std::tie(decl)
+             >= std::tie(other.decl);
+  }
+  void outputRepr(Output<Repr<Entity>> out) const {
+    outputValue(out, std::make_tuple(decl));
+  }
+}; // struct Entity
+
+} // namespace Anglelang
+
+} // namespace Code
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Code::Entity> {
+  using Type = Sum<Repr<facebook::glean::cpp::schema::Code::Cxx::Entity>, Repr<facebook::glean::cpp::schema::Code::Pp::Entity>, Repr<facebook::glean::cpp::schema::Code::Java::Entity>, Repr<facebook::glean::cpp::schema::Code::Kotlin::Entity>, Repr<facebook::glean::cpp::schema::Code::Hs::Entity>, Repr<facebook::glean::cpp::schema::Code::Python::Entity>, Repr<facebook::glean::cpp::schema::Code::Hack::Entity>, Repr<facebook::glean::cpp::schema::Code::Flow::Entity>, Repr<facebook::glean::cpp::schema::Code::Fbthrift::Entity>, Repr<facebook::glean::cpp::schema::Code::Buck::Entity>, Repr<facebook::glean::cpp::schema::Code::Erlang::Entity>, Repr<facebook::glean::cpp::schema::Code::Lsif::Entity>, Repr<facebook::glean::cpp::schema::Code::Scip::Entity>, Repr<facebook::glean::cpp::schema::Code::Csharp::Entity>, Repr<facebook::glean::cpp::schema::Code::Graphql::Entity>, Repr<facebook::glean::cpp::schema::Code::Dataswarm::Entity>, Repr<facebook::glean::cpp::schema::Code::Anglelang::Entity>>;
+};
+
+
+namespace schema {
+
+namespace Code {
+
+struct Entity {
+  boost::variant<Alt<0, facebook::glean::cpp::schema::Code::Cxx::Entity>, Alt<1, facebook::glean::cpp::schema::Code::Pp::Entity>, Alt<2, facebook::glean::cpp::schema::Code::Java::Entity>, Alt<3, facebook::glean::cpp::schema::Code::Kotlin::Entity>, Alt<4, facebook::glean::cpp::schema::Code::Hs::Entity>, Alt<5, facebook::glean::cpp::schema::Code::Python::Entity>, Alt<6, facebook::glean::cpp::schema::Code::Hack::Entity>, Alt<7, facebook::glean::cpp::schema::Code::Flow::Entity>, Alt<8, facebook::glean::cpp::schema::Code::Fbthrift::Entity>, Alt<9, facebook::glean::cpp::schema::Code::Buck::Entity>, Alt<10, facebook::glean::cpp::schema::Code::Erlang::Entity>, Alt<11, facebook::glean::cpp::schema::Code::Lsif::Entity>, Alt<12, facebook::glean::cpp::schema::Code::Scip::Entity>, Alt<13, facebook::glean::cpp::schema::Code::Csharp::Entity>, Alt<14, facebook::glean::cpp::schema::Code::Graphql::Entity>, Alt<15, facebook::glean::cpp::schema::Code::Dataswarm::Entity>, Alt<16, facebook::glean::cpp::schema::Code::Anglelang::Entity>> GLEAN_value;
+
+  static Entity cxx(const facebook::glean::cpp::schema::Code::Cxx::Entity& a) {
+    return Entity{Alt<0, facebook::glean::cpp::schema::Code::Cxx::Entity>(a)};
+  }
+  static Entity pp(const facebook::glean::cpp::schema::Code::Pp::Entity& a) {
+    return Entity{Alt<1, facebook::glean::cpp::schema::Code::Pp::Entity>(a)};
+  }
+  static Entity java(const facebook::glean::cpp::schema::Code::Java::Entity& a) {
+    return Entity{Alt<2, facebook::glean::cpp::schema::Code::Java::Entity>(a)};
+  }
+  static Entity kotlin(const facebook::glean::cpp::schema::Code::Kotlin::Entity& a) {
+    return Entity{Alt<3, facebook::glean::cpp::schema::Code::Kotlin::Entity>(a)};
+  }
+  static Entity hs(const facebook::glean::cpp::schema::Code::Hs::Entity& a) {
+    return Entity{Alt<4, facebook::glean::cpp::schema::Code::Hs::Entity>(a)};
+  }
+  static Entity python(const facebook::glean::cpp::schema::Code::Python::Entity& a) {
+    return Entity{Alt<5, facebook::glean::cpp::schema::Code::Python::Entity>(a)};
+  }
+  static Entity hack(const facebook::glean::cpp::schema::Code::Hack::Entity& a) {
+    return Entity{Alt<6, facebook::glean::cpp::schema::Code::Hack::Entity>(a)};
+  }
+  static Entity flow(const facebook::glean::cpp::schema::Code::Flow::Entity& a) {
+    return Entity{Alt<7, facebook::glean::cpp::schema::Code::Flow::Entity>(a)};
+  }
+  static Entity fbthrift(const facebook::glean::cpp::schema::Code::Fbthrift::Entity& a) {
+    return Entity{Alt<8, facebook::glean::cpp::schema::Code::Fbthrift::Entity>(a)};
+  }
+  static Entity buck(const facebook::glean::cpp::schema::Code::Buck::Entity& a) {
+    return Entity{Alt<9, facebook::glean::cpp::schema::Code::Buck::Entity>(a)};
+  }
+  static Entity erlang(const facebook::glean::cpp::schema::Code::Erlang::Entity& a) {
+    return Entity{Alt<10, facebook::glean::cpp::schema::Code::Erlang::Entity>(a)};
+  }
+  static Entity lsif(const facebook::glean::cpp::schema::Code::Lsif::Entity& a) {
+    return Entity{Alt<11, facebook::glean::cpp::schema::Code::Lsif::Entity>(a)};
+  }
+  static Entity scip(const facebook::glean::cpp::schema::Code::Scip::Entity& a) {
+    return Entity{Alt<12, facebook::glean::cpp::schema::Code::Scip::Entity>(a)};
+  }
+  static Entity csharp(const facebook::glean::cpp::schema::Code::Csharp::Entity& a) {
+    return Entity{Alt<13, facebook::glean::cpp::schema::Code::Csharp::Entity>(a)};
+  }
+  static Entity graphql(const facebook::glean::cpp::schema::Code::Graphql::Entity& a) {
+    return Entity{Alt<14, facebook::glean::cpp::schema::Code::Graphql::Entity>(a)};
+  }
+  static Entity dataswarm(const facebook::glean::cpp::schema::Code::Dataswarm::Entity& a) {
+    return Entity{Alt<15, facebook::glean::cpp::schema::Code::Dataswarm::Entity>(a)};
+  }
+  static Entity angle(const facebook::glean::cpp::schema::Code::Anglelang::Entity& a) {
+    return Entity{Alt<16, facebook::glean::cpp::schema::Code::Anglelang::Entity>(a)};
+  }
+
+  bool operator==(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Entity& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Entity>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Entity
+
+} // namespace Code
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Code::Argument> {
+  using Type = Sum<String, Repr<facebook::glean::cpp::schema::Code::Entity>>;
+};
+
+
+namespace schema {
+
+namespace Code {
+
+struct Argument {
+  boost::variant<Alt<0, std::string>, Alt<1, Entity>> GLEAN_value;
+
+  static Argument lit(const std::string& a) {
+    return Argument{Alt<0, std::string>(a)};
+  }
+  static Argument xref(const Entity& a) {
+    return Argument{Alt<1, Entity>(a)};
+  }
+
+  bool operator==(const Argument& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const Argument& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const Argument& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const Argument& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const Argument& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const Argument& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<Argument>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct Argument
+
+} // namespace Code
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Code::CallArgument> {
+  using Type = Tuple<Maybe<String>, Repr<facebook::glean::cpp::schema::Src::ByteSpan>, Maybe<Repr<facebook::glean::cpp::schema::Code::Argument>>>;
+};
+
+
+namespace schema {
+
+namespace Code {
+
+struct CallArgument {
+  boost::variant<Alt<0, std::tuple<>>, Alt<1, std::string>> label;
+  facebook::glean::cpp::schema::Src::ByteSpan span;
+  boost::variant<Alt<0, std::tuple<>>, Alt<1, Argument>> argument;
+
+  bool operator==(const CallArgument& other) const {
+    return std::tie(label,span,argument)
+             == std::tie(other.label,other.span,other.argument);
+  }
+  bool operator!=(const CallArgument& other) const {
+    return std::tie(label,span,argument)
+             != std::tie(other.label,other.span,other.argument);
+  }
+  bool operator<(const CallArgument& other) const {
+    return std::tie(label,span,argument)
+             < std::tie(other.label,other.span,other.argument);
+  }
+  bool operator<=(const CallArgument& other) const {
+    return std::tie(label,span,argument)
+             <= std::tie(other.label,other.span,other.argument);
+  }
+  bool operator>(const CallArgument& other) const {
+    return std::tie(label,span,argument)
+             > std::tie(other.label,other.span,other.argument);
+  }
+  bool operator>=(const CallArgument& other) const {
+    return std::tie(label,span,argument)
+             >= std::tie(other.label,other.span,other.argument);
+  }
+  void outputRepr(Output<Repr<CallArgument>> out) const {
+    outputValue(out, std::make_tuple(label, span, argument));
+  }
+}; // struct CallArgument
+
+} // namespace Code
+
+namespace Codemarkup {
+
+namespace Hack {
+
+struct ConvertCallArguments : Predicate<std::tuple<std::vector<facebook::glean::cpp::schema::Hack::CallArgument>, std::vector<facebook::glean::cpp::schema::Code::CallArgument>>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.hack.ConvertCallArguments";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct ConvertCallArguments
+
+struct ConvertMaybeCallArguments : Predicate<std::tuple<boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Hack::CallArgument>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Code::CallArgument>>>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.hack.ConvertMaybeCallArguments";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct ConvertMaybeCallArguments
+
+} // namespace Hack
+
+namespace Python {
+
+struct ConvertCallArguments : Predicate<std::tuple<std::vector<facebook::glean::cpp::schema::Python::CallArgument>, std::vector<facebook::glean::cpp::schema::Code::CallArgument>>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.python.ConvertCallArguments";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct ConvertCallArguments
+
+struct PythonFileCall : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan, std::vector<facebook::glean::cpp::schema::Code::CallArgument>>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.python.PythonFileCall";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct PythonFileCall
+
+} // namespace Python
+
+namespace Hack {
+
+struct ConvertArgument : Predicate<std::tuple<boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Hack::Argument>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Code::Argument>>>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.hack.ConvertArgument";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct ConvertArgument
+
+} // namespace Hack
+
+namespace Python {
+
+struct ConvertArgument : Predicate<std::tuple<boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Python::Argument>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Code::Argument>>>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.python.ConvertArgument";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct ConvertArgument
+
+} // namespace Python
+
+} // namespace Codemarkup
+
+namespace Code {
+
+struct EntityLanguage : Predicate<std::tuple<Entity, Language>> {
+  static const char* GLEAN_name() {
+    return "code.EntityLanguage";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 24;
+  }
+}; // struct EntityLanguage
+
+} // namespace Code
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Code::IdlEntity> {
+  using Type = Tuple<Repr<facebook::glean::cpp::schema::Code::Language>, facebook::glean::cpp::schema::Src::File, Maybe<Repr<facebook::glean::cpp::schema::Code::Entity>>, Maybe<Repr<facebook::glean::cpp::schema::Src::Range>>>;
+};
+
+
+namespace schema {
+
+namespace Code {
+
+struct IdlEntity {
+  Language lang;
+  Fact<facebook::glean::cpp::schema::Src::File> file;
+  boost::variant<Alt<0, std::tuple<>>, Alt<1, Entity>> entity;
+  boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Src::Range>> range;
+
+  bool operator==(const IdlEntity& other) const {
+    return std::tie(lang,file,entity,range)
+             == std::tie(other.lang,other.file,other.entity,other.range);
+  }
+  bool operator!=(const IdlEntity& other) const {
+    return std::tie(lang,file,entity,range)
+             != std::tie(other.lang,other.file,other.entity,other.range);
+  }
+  bool operator<(const IdlEntity& other) const {
+    return std::tie(lang,file,entity,range)
+             < std::tie(other.lang,other.file,other.entity,other.range);
+  }
+  bool operator<=(const IdlEntity& other) const {
+    return std::tie(lang,file,entity,range)
+             <= std::tie(other.lang,other.file,other.entity,other.range);
+  }
+  bool operator>(const IdlEntity& other) const {
+    return std::tie(lang,file,entity,range)
+             > std::tie(other.lang,other.file,other.entity,other.range);
+  }
+  bool operator>=(const IdlEntity& other) const {
+    return std::tie(lang,file,entity,range)
+             >= std::tie(other.lang,other.file,other.entity,other.range);
+  }
+  void outputRepr(Output<Repr<IdlEntity>> out) const {
+    outputValue(out, std::make_tuple(lang, file, entity, range));
+  }
+}; // struct IdlEntity
+
+} // namespace Code
+
+namespace Codemarkup {
+
+namespace Cxx {
+
+struct CxxEntityIdl : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Cxx::Entity, facebook::glean::cpp::schema::Code::IdlEntity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxEntityIdl";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxEntityIdl
+
+} // namespace Cxx
+
+namespace Hack {
+
+struct HackEntityIdl : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Hack::Entity, facebook::glean::cpp::schema::Code::IdlEntity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.hack.HackEntityIdl";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct HackEntityIdl
+
+} // namespace Hack
+
+namespace Yaml {
+
+struct YamlFileEntityXLangXRefLocations : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Codemarkup::Types::RangeSpan, facebook::glean::cpp::schema::Code::IdlEntity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.yaml.YamlFileEntityXLangXRefLocations";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct YamlFileEntityXLangXRefLocations
+
+} // namespace Yaml
+
+} // namespace Codemarkup
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Codemarkup::ChildEntity> {
+  using Type = Tuple<Repr<facebook::glean::cpp::schema::Code::Entity>, Repr<facebook::glean::cpp::schema::Codemarkup::Types::Location>>;
+};
+
+
+namespace schema {
+
+namespace Codemarkup {
+
+struct ChildEntity {
+  facebook::glean::cpp::schema::Code::Entity child;
+  facebook::glean::cpp::schema::Codemarkup::Types::Location location;
+
+  bool operator==(const ChildEntity& other) const {
+    return std::tie(child,location)
+             == std::tie(other.child,other.location);
+  }
+  bool operator!=(const ChildEntity& other) const {
+    return std::tie(child,location)
+             != std::tie(other.child,other.location);
+  }
+  bool operator<(const ChildEntity& other) const {
+    return std::tie(child,location)
+             < std::tie(other.child,other.location);
+  }
+  bool operator<=(const ChildEntity& other) const {
+    return std::tie(child,location)
+             <= std::tie(other.child,other.location);
+  }
+  bool operator>(const ChildEntity& other) const {
+    return std::tie(child,location)
+             > std::tie(other.child,other.location);
+  }
+  bool operator>=(const ChildEntity& other) const {
+    return std::tie(child,location)
+             >= std::tie(other.child,other.location);
+  }
+  void outputRepr(Output<Repr<ChildEntity>> out) const {
+    outputValue(out, std::make_tuple(child, location));
+  }
+}; // struct ChildEntity
+
+struct ContainsChildEntity : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Entity, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.ContainsChildEntity";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 30;
+  }
+}; // struct ContainsChildEntity
+
+struct ContainsParentEntity : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Entity, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.ContainsParentEntity";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 30;
+  }
+}; // struct ContainsParentEntity
+
+struct EntityComments : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Entity, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan, boost::variant<Alt<0, std::tuple<>>, Alt<1, std::string>>>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.EntityComments";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 30;
+  }
+}; // struct EntityComments
+
+struct EntityInfo : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Entity, facebook::glean::cpp::schema::Codemarkup::Types::SymbolInfo>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.EntityInfo";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 30;
+  }
+}; // struct EntityInfo
+
+struct EntityIsDefinition : Predicate<facebook::glean::cpp::schema::Code::Entity> {
+  static const char* GLEAN_name() {
+    return "codemarkup.EntityIsDefinition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 30;
+  }
+}; // struct EntityIsDefinition
+
+struct EntityKind : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Entity, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.EntityKind";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 30;
+  }
+}; // struct EntityKind
+
+struct EntityLocation : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Entity, facebook::glean::cpp::schema::Codemarkup::Types::Location>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.EntityLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 30;
+  }
+}; // struct EntityLocation
+
+struct EntityModifiers : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Entity, facebook::glean::cpp::schema::Codemarkup::Types::Modifiers>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.EntityModifiers";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 30;
+  }
+}; // struct EntityModifiers
+
+struct EntityModuleName : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Entity, std::string>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.EntityModuleName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 30;
+  }
+}; // struct EntityModuleName
+
+struct EntityReferences : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Entity, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Codemarkup::Types::RangeSpan>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.EntityReferences";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 30;
+  }
+}; // struct EntityReferences
+
+struct EntitySource : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Entity, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.EntitySource";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 30;
+  }
+}; // struct EntitySource
+
+struct EntityToAnnotations : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Entity, facebook::glean::cpp::schema::Code::Annotations>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.EntityToAnnotations";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 30;
+  }
+}; // struct EntityToAnnotations
+
+struct EntityUses : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Entity, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.EntityUses";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 30;
+  }
+}; // struct EntityUses
+
+struct EntityVisibility : Predicate<facebook::glean::cpp::schema::Code::Entity, facebook::glean::cpp::schema::Codemarkup::Types::Visibility> {
+  static const char* GLEAN_name() {
+    return "codemarkup.EntityVisibility";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 30;
+  }
+}; // struct EntityVisibility
+
+struct ExtendsChildEntity : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Entity, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.ExtendsChildEntity";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 30;
+  }
+}; // struct ExtendsChildEntity
+
+struct ExtendsParentEntity : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Entity, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.ExtendsParentEntity";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 30;
+  }
+}; // struct ExtendsParentEntity
+
+struct ExtendsParentEntityConcise : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Entity, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.ExtendsParentEntityConcise";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 30;
+  }
+}; // struct ExtendsParentEntityConcise
+
+struct FileCall : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan, std::vector<facebook::glean::cpp::schema::Code::CallArgument>, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Code::Entity>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Code::CallArgument>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Code::Entity>>>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.FileCall";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 30;
+  }
+}; // struct FileCall
+
+struct FileEntityDigest : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Code::Entity>, std::string> {
+  static const char* GLEAN_name() {
+    return "codemarkup.FileEntityDigest";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 30;
+  }
+}; // struct FileEntityDigest
+
+struct FileEntityInfos : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Code::Entity, facebook::glean::cpp::schema::Codemarkup::Types::SymbolInfo>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.FileEntityInfos";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 30;
+  }
+}; // struct FileEntityInfos
+
+struct FileEntityKinds : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Code::Entity, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.FileEntityKinds";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 30;
+  }
+}; // struct FileEntityKinds
+
+struct FileEntityLocations : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Codemarkup::Types::Location, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.FileEntityLocations";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 30;
+  }
+}; // struct FileEntityLocations
+
+struct FileEntityXRefInfos : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Code::Entity, facebook::glean::cpp::schema::Codemarkup::Types::SymbolInfo>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.FileEntityXRefInfos";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 30;
+  }
+}; // struct FileEntityXRefInfos
+
+struct FileEntityXRefKinds : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Code::Entity, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.FileEntityXRefKinds";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 30;
+  }
+}; // struct FileEntityXRefKinds
+
+struct FileEntityXRefLocations : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Codemarkup::Types::XRefLocation, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.FileEntityXRefLocations";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 30;
+  }
+}; // struct FileEntityXRefLocations
+
+struct FileEntityXRefRangeSpans : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Codemarkup::Types::RangeSpan, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.FileEntityXRefRangeSpans";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 30;
+  }
+}; // struct FileEntityXRefRangeSpans
+
+struct FindEntityDefinition : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Entity, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.FindEntityDefinition";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 30;
+  }
+}; // struct FindEntityDefinition
+
+struct GeneratedEntityToIdlEntity : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Entity, facebook::glean::cpp::schema::Code::IdlEntity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.GeneratedEntityToIdlEntity";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 30;
+  }
+}; // struct GeneratedEntityToIdlEntity
+
+} // namespace Codemarkup
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Codemarkup::GenericEntity> {
+  using Type = Sum<Tuple<Repr<facebook::glean::cpp::schema::Codemarkup::Types::XRefLocation>, Repr<facebook::glean::cpp::schema::Code::Entity>>, Tuple<Repr<facebook::glean::cpp::schema::Codemarkup::Types::RangeSpan>, Repr<facebook::glean::cpp::schema::Code::IdlEntity>>, Tuple<Repr<facebook::glean::cpp::schema::Codemarkup::Types::RangeSpan>, Repr<facebook::glean::cpp::schema::Code::SymbolId>>>;
+};
+
+
+namespace schema {
+
+namespace Codemarkup {
+
+struct GenericEntity {
+  boost::variant<Alt<0, std::tuple<facebook::glean::cpp::schema::Codemarkup::Types::XRefLocation, facebook::glean::cpp::schema::Code::Entity>>, Alt<1, std::tuple<facebook::glean::cpp::schema::Codemarkup::Types::RangeSpan, facebook::glean::cpp::schema::Code::IdlEntity>>, Alt<2, std::tuple<facebook::glean::cpp::schema::Codemarkup::Types::RangeSpan, facebook::glean::cpp::schema::Code::SymbolId>>> GLEAN_value;
+
+  static GenericEntity plainEntity(const facebook::glean::cpp::schema::Codemarkup::Types::XRefLocation& xref, const facebook::glean::cpp::schema::Code::Entity& entity) {
+    return GenericEntity{Alt<0, std::tuple<facebook::glean::cpp::schema::Codemarkup::Types::XRefLocation, facebook::glean::cpp::schema::Code::Entity>>(std::make_tuple(xref, entity))};
+  }
+  static GenericEntity xlangEntity(const facebook::glean::cpp::schema::Codemarkup::Types::RangeSpan& source, const facebook::glean::cpp::schema::Code::IdlEntity& entity) {
+    return GenericEntity{Alt<1, std::tuple<facebook::glean::cpp::schema::Codemarkup::Types::RangeSpan, facebook::glean::cpp::schema::Code::IdlEntity>>(std::make_tuple(source, entity))};
+  }
+  static GenericEntity xlangSymbol(const facebook::glean::cpp::schema::Codemarkup::Types::RangeSpan& source, const facebook::glean::cpp::schema::Code::SymbolId& symbol) {
+    return GenericEntity{Alt<2, std::tuple<facebook::glean::cpp::schema::Codemarkup::Types::RangeSpan, facebook::glean::cpp::schema::Code::SymbolId>>(std::make_tuple(source, symbol))};
+  }
+
+  bool operator==(const GenericEntity& other) const {
+    return std::tie(GLEAN_value)
+             == std::tie(other.GLEAN_value);
+  }
+  bool operator!=(const GenericEntity& other) const {
+    return std::tie(GLEAN_value)
+             != std::tie(other.GLEAN_value);
+  }
+  bool operator<(const GenericEntity& other) const {
+    return std::tie(GLEAN_value)
+             < std::tie(other.GLEAN_value);
+  }
+  bool operator<=(const GenericEntity& other) const {
+    return std::tie(GLEAN_value)
+             <= std::tie(other.GLEAN_value);
+  }
+  bool operator>(const GenericEntity& other) const {
+    return std::tie(GLEAN_value)
+             > std::tie(other.GLEAN_value);
+  }
+  bool operator>=(const GenericEntity& other) const {
+    return std::tie(GLEAN_value)
+             >= std::tie(other.GLEAN_value);
+  }
+
+  void outputRepr(Output<Repr<GenericEntity>> out) const {
+    outputValue(out, GLEAN_value);
+  }
+}; // struct GenericEntity
+
+struct FileXRefsGenericEntities : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, GenericEntity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.FileXRefsGenericEntities";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 30;
+  }
+}; // struct FileXRefsGenericEntities
+
+} // namespace Codemarkup
+
+} // namespace schema
+
+template<> struct Repr_<facebook::glean::cpp::schema::Codemarkup::ParentEntity> {
+  using Type = Tuple<Repr<facebook::glean::cpp::schema::Code::Entity>, Repr<facebook::glean::cpp::schema::Codemarkup::Types::Location>>;
+};
+
+
+namespace schema {
+
+namespace Codemarkup {
+
+struct ParentEntity {
+  facebook::glean::cpp::schema::Code::Entity parent;
+  facebook::glean::cpp::schema::Codemarkup::Types::Location location;
+
+  bool operator==(const ParentEntity& other) const {
+    return std::tie(parent,location)
+             == std::tie(other.parent,other.location);
+  }
+  bool operator!=(const ParentEntity& other) const {
+    return std::tie(parent,location)
+             != std::tie(other.parent,other.location);
+  }
+  bool operator<(const ParentEntity& other) const {
+    return std::tie(parent,location)
+             < std::tie(other.parent,other.location);
+  }
+  bool operator<=(const ParentEntity& other) const {
+    return std::tie(parent,location)
+             <= std::tie(other.parent,other.location);
+  }
+  bool operator>(const ParentEntity& other) const {
+    return std::tie(parent,location)
+             > std::tie(other.parent,other.location);
+  }
+  bool operator>=(const ParentEntity& other) const {
+    return std::tie(parent,location)
+             >= std::tie(other.parent,other.location);
+  }
+  void outputRepr(Output<Repr<ParentEntity>> out) const {
+    outputValue(out, std::make_tuple(parent, location));
+  }
+}; // struct ParentEntity
+
+struct SearchRelatedEntities : Predicate<std::tuple<RelationType, ParentEntity, ChildEntity, SearchStyle>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.SearchRelatedEntities";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 30;
+  }
+}; // struct SearchRelatedEntities
+
+struct ReferencingEntity : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Entity, facebook::glean::cpp::schema::Code::Entity, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Codemarkup::Types::RangeSpan, facebook::glean::cpp::schema::Codemarkup::Types::Location>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.ReferencingEntity";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 30;
+  }
+}; // struct ReferencingEntity
+
+struct ResolveLocation : Predicate<std::tuple<facebook::glean::cpp::schema::Codemarkup::Types::Location, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.ResolveLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 30;
+  }
+}; // struct ResolveLocation
+
+struct SearchInheritedEntities : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Entity, ParentEntity, ChildEntity, SearchStyle>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.SearchInheritedEntities";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 30;
+  }
+}; // struct SearchInheritedEntities
+
+struct SymbolToEntity : Predicate<std::tuple<facebook::glean::cpp::schema::Code::SymbolId, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.SymbolToEntity";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 30;
+  }
+}; // struct SymbolToEntity
+
+namespace Cxx {
+
+struct CxxFileEntityIdl : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Cxx1::FileXRefs>, facebook::glean::cpp::schema::Code::Entity, facebook::glean::cpp::schema::Code::IdlEntity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxFileEntityIdl";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxFileEntityIdl
+
+struct CxxIdlEntityUses : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Entity, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.cxx.CxxIdlEntityUses";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 4;
+  }
+}; // struct CxxIdlEntityUses
+
+} // namespace Cxx
+
+namespace Hack {
+
+struct ConvertCallee : Predicate<std::tuple<boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Hack::XRefTarget>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Code::Entity>>>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.hack.ConvertCallee";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct ConvertCallee
+
+struct ConvertCalleeForFileCall : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Hack::XRefTarget>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Code::Entity>>>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.hack.ConvertCalleeForFileCall";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct ConvertCalleeForFileCall
+
+struct ConvertStaticType : Predicate<std::tuple<boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Hack::Declaration>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Code::Entity>>>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.hack.ConvertStaticType";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct ConvertStaticType
+
+struct HackFileCall : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan, std::vector<facebook::glean::cpp::schema::Code::CallArgument>, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Code::Entity>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Code::CallArgument>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Code::Entity>>>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.hack.HackFileCall";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct HackFileCall
+
+struct HackIdlEntityUses : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Entity, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.hack.HackIdlEntityUses";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 2;
+  }
+}; // struct HackIdlEntityUses
+
+} // namespace Hack
+
+namespace Search {
+
+struct EntityLocationAndKind : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Entity, facebook::glean::cpp::schema::Codemarkup::Types::Location, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>>>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.search.EntityLocationAndKind";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct EntityLocationAndKind
+
+struct SearchByName : Predicate<std::tuple<SearchCase, std::string, facebook::glean::cpp::schema::Code::Entity, facebook::glean::cpp::schema::Codemarkup::Types::Location, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>>, facebook::glean::cpp::schema::Code::Language>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.search.SearchByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct SearchByName
+
+struct SearchByScope : Predicate<std::tuple<SearchCase, std::string, std::vector<std::string>, facebook::glean::cpp::schema::Code::Entity, facebook::glean::cpp::schema::Codemarkup::Types::Location, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>>, facebook::glean::cpp::schema::Code::Language>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.search.SearchByScope";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct SearchByScope
+
+} // namespace Search
+
+} // namespace Codemarkup
+
+namespace Dyn {
+
+struct EntityUsage : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Entity, Observer, Usage, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Environment>>>>> {
+  static const char* GLEAN_name() {
+    return "dyn.EntityUsage";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 6;
+  }
+}; // struct EntityUsage
+
+} // namespace Dyn
+
+namespace Search {
+
+namespace Code {
+
+struct AngleSearchByLowerCaseName : Predicate<std::tuple<std::string, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.AngleSearchByLowerCaseName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct AngleSearchByLowerCaseName
+
+struct AngleSearchByName : Predicate<std::tuple<std::string, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.AngleSearchByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct AngleSearchByName
+
+struct BuckSearchByLocalNameFact : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Buck::LocalName>, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.BuckSearchByLocalNameFact";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct BuckSearchByLocalNameFact
+
+struct BuckSearchByLowerCaseName : Predicate<std::tuple<std::string, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.BuckSearchByLowerCaseName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct BuckSearchByLowerCaseName
+
+struct BuckSearchByName : Predicate<std::tuple<std::string, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.BuckSearchByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct BuckSearchByName
+
+struct CSharpSearchByLowerCaseName : Predicate<std::tuple<std::string, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.CSharpSearchByLowerCaseName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct CSharpSearchByLowerCaseName
+
+struct CSharpSearchByName : Predicate<std::tuple<std::string, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.CSharpSearchByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct CSharpSearchByName
+
+struct CxxSearchByLowerCaseNameKindAndScopeFact : Predicate<std::tuple<std::string, facebook::glean::cpp::schema::Cxx1::Scope, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>>, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.CxxSearchByLowerCaseNameKindAndScopeFact";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct CxxSearchByLowerCaseNameKindAndScopeFact
+
+struct CxxSearchByLowerCaseScopeAndKind : Predicate<std::tuple<std::string, std::vector<std::string>, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>>, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.CxxSearchByLowerCaseScopeAndKind";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct CxxSearchByLowerCaseScopeAndKind
+
+struct CxxSearchByNameKindAndScopeFact : Predicate<std::tuple<std::string, facebook::glean::cpp::schema::Cxx1::Scope, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>>, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.CxxSearchByNameKindAndScopeFact";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct CxxSearchByNameKindAndScopeFact
+
+struct CxxSearchByScopeAndKind : Predicate<std::tuple<std::string, std::vector<std::string>, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>>, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.CxxSearchByScopeAndKind";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct CxxSearchByScopeAndKind
+
+struct ErlangSearchByLowerCaseName : Predicate<std::tuple<std::string, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.ErlangSearchByLowerCaseName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct ErlangSearchByLowerCaseName
+
+struct ErlangSearchByName : Predicate<std::tuple<std::string, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.ErlangSearchByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct ErlangSearchByName
+
+struct FbthriftSearchByNameFact : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Fbthrift::Identifier>, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.FbthriftSearchByNameFact";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct FbthriftSearchByNameFact
+
+struct FlowSearchByLowerCaseNameKindAndScopeFact : Predicate<std::tuple<std::string, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<facebook::glean::cpp::schema::Flow::Module>>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>>, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.FlowSearchByLowerCaseNameKindAndScopeFact";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct FlowSearchByLowerCaseNameKindAndScopeFact
+
+struct FlowSearchByLowerCaseScopeAndKind : Predicate<std::tuple<std::string, std::vector<std::string>, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>>, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.FlowSearchByLowerCaseScopeAndKind";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct FlowSearchByLowerCaseScopeAndKind
+
+struct FlowSearchByNameKindAndScopeFact : Predicate<std::tuple<std::string, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<facebook::glean::cpp::schema::Flow::Module>>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>>, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.FlowSearchByNameKindAndScopeFact";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct FlowSearchByNameKindAndScopeFact
+
+struct FlowSearchByScopeAndKind : Predicate<std::tuple<std::string, std::vector<std::string>, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>>, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.FlowSearchByScopeAndKind";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct FlowSearchByScopeAndKind
+
+struct GraphQLSearchByLowerCaseName : Predicate<std::tuple<std::string, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.GraphQLSearchByLowerCaseName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct GraphQLSearchByLowerCaseName
+
+struct GraphQLSearchByName : Predicate<std::tuple<std::string, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.GraphQLSearchByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct GraphQLSearchByName
+
+struct HackSearchByLowerCaseNameAndKind : Predicate<std::tuple<std::string, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>>, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.HackSearchByLowerCaseNameAndKind";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct HackSearchByLowerCaseNameAndKind
+
+struct HackSearchByLowerCaseScopeAndKind : Predicate<std::tuple<std::string, std::vector<std::string>, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>>, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.HackSearchByLowerCaseScopeAndKind";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct HackSearchByLowerCaseScopeAndKind
+
+struct HackSearchByNameAndKind : Predicate<std::tuple<std::string, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>>, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.HackSearchByNameAndKind";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct HackSearchByNameAndKind
+
+struct HackSearchByNameKindWithNamespace : Predicate<std::tuple<std::string, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<facebook::glean::cpp::schema::Hack::NamespaceQName>>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>>, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.HackSearchByNameKindWithNamespace";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct HackSearchByNameKindWithNamespace
+
+struct HackSearchByNameKindWithQName : Predicate<std::tuple<std::string, Fact<facebook::glean::cpp::schema::Hack::Name>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<facebook::glean::cpp::schema::Hack::NamespaceQName>>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>>, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.HackSearchByNameKindWithQName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct HackSearchByNameKindWithQName
+
+struct HackSearchByScopeAndKind : Predicate<std::tuple<std::string, std::vector<std::string>, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>>, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.HackSearchByScopeAndKind";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct HackSearchByScopeAndKind
+
+struct HackSearchByScopeWithNameKinds : Predicate<std::tuple<std::string, bool, std::vector<std::string>, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>>, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.HackSearchByScopeWithNameKinds";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct HackSearchByScopeWithNameKinds
+
+struct HsSearchByLowerCaseName : Predicate<std::tuple<std::string, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.HsSearchByLowerCaseName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct HsSearchByLowerCaseName
+
+struct HsSearchByName : Predicate<std::tuple<std::string, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.HsSearchByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct HsSearchByName
+
+struct JavaSearchByLowerCaseName : Predicate<std::tuple<std::string, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.JavaSearchByLowerCaseName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct JavaSearchByLowerCaseName
+
+struct JavaSearchByLowerCaseScope : Predicate<std::tuple<std::string, std::vector<std::string>, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.JavaSearchByLowerCaseScope";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct JavaSearchByLowerCaseScope
+
+struct JavaSearchByName : Predicate<std::tuple<std::string, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.JavaSearchByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct JavaSearchByName
+
+struct JavaSearchByNameWithFact : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::QName>, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.JavaSearchByNameWithFact";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct JavaSearchByNameWithFact
+
+struct JavaSearchByScope : Predicate<std::tuple<std::string, std::vector<std::string>, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.JavaSearchByScope";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct JavaSearchByScope
+
+struct JavaSearchByScopeWithName : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::Name>, bool, std::vector<std::string>, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.JavaSearchByScopeWithName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct JavaSearchByScopeWithName
+
+struct KotlinSearchByLowerCaseName : Predicate<std::tuple<std::string, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.KotlinSearchByLowerCaseName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct KotlinSearchByLowerCaseName
+
+struct KotlinSearchByLowerCaseScope : Predicate<std::tuple<std::string, std::vector<std::string>, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.KotlinSearchByLowerCaseScope";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct KotlinSearchByLowerCaseScope
+
+struct KotlinSearchByName : Predicate<std::tuple<std::string, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.KotlinSearchByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct KotlinSearchByName
+
+struct KotlinSearchByNameWithFact : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::QName>, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.KotlinSearchByNameWithFact";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct KotlinSearchByNameWithFact
+
+struct KotlinSearchByScope : Predicate<std::tuple<std::string, std::vector<std::string>, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.KotlinSearchByScope";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct KotlinSearchByScope
+
+struct KotlinSearchByScopeWithName : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Javakotlin::Alpha::Name>, bool, std::vector<std::string>, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.KotlinSearchByScopeWithName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct KotlinSearchByScopeWithName
+
+struct LsifSearchByLowerCaseName : Predicate<std::tuple<std::string, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.LsifSearchByLowerCaseName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct LsifSearchByLowerCaseName
+
+struct LsifSearchByName : Predicate<std::tuple<std::string, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.LsifSearchByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct LsifSearchByName
+
+struct PpSearchByLowerCaseNameKind : Predicate<std::tuple<std::string, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>>, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.PpSearchByLowerCaseNameKind";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct PpSearchByLowerCaseNameKind
+
+struct PpSearchByNameKind : Predicate<std::tuple<std::string, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>>, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.PpSearchByNameKind";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct PpSearchByNameKind
+
+struct PythonSearchByLowerCaseNameKindAndScopeFact : Predicate<std::tuple<std::string, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<facebook::glean::cpp::schema::Python::SName>>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>>, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.PythonSearchByLowerCaseNameKindAndScopeFact";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct PythonSearchByLowerCaseNameKindAndScopeFact
+
+struct PythonSearchByLowerCaseScopeAndKind : Predicate<std::tuple<std::string, std::vector<std::string>, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>>, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.PythonSearchByLowerCaseScopeAndKind";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct PythonSearchByLowerCaseScopeAndKind
+
+struct PythonSearchByNameKindAndScopeFact : Predicate<std::tuple<std::string, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<facebook::glean::cpp::schema::Python::SName>>>, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>>, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.PythonSearchByNameKindAndScopeFact";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct PythonSearchByNameKindAndScopeFact
+
+struct PythonSearchByScopeAndKind : Predicate<std::tuple<std::string, std::vector<std::string>, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>>, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.PythonSearchByScopeAndKind";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct PythonSearchByScopeAndKind
+
+struct RustSearchByNameAndKind : Predicate<std::tuple<std::string, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>>, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.RustSearchByNameAndKind";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct RustSearchByNameAndKind
+
+struct SearchByLowerCaseNameAndLanguage : Predicate<std::tuple<std::string, facebook::glean::cpp::schema::Code::Language, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.SearchByLowerCaseNameAndLanguage";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct SearchByLowerCaseNameAndLanguage
+
+struct SearchByLowerCaseNameKindAndLanguage : Predicate<std::tuple<std::string, facebook::glean::cpp::schema::Code::Language, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>>, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.SearchByLowerCaseNameKindAndLanguage";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct SearchByLowerCaseNameKindAndLanguage
+
+struct SearchByLowerCaseScope : Predicate<std::tuple<std::string, std::vector<std::string>, facebook::glean::cpp::schema::Code::Language, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.SearchByLowerCaseScope";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct SearchByLowerCaseScope
+
+struct SearchByLowerCaseScopeAndKind : Predicate<std::tuple<std::string, std::vector<std::string>, facebook::glean::cpp::schema::Code::Language, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>>, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.SearchByLowerCaseScopeAndKind";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct SearchByLowerCaseScopeAndKind
+
+struct SearchByNameAndLanguage : Predicate<std::tuple<std::string, facebook::glean::cpp::schema::Code::Language, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.SearchByNameAndLanguage";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct SearchByNameAndLanguage
+
+struct SearchByNameKindAndLanguage : Predicate<std::tuple<std::string, facebook::glean::cpp::schema::Code::Language, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>>, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.SearchByNameKindAndLanguage";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct SearchByNameKindAndLanguage
+
+struct SearchByScope : Predicate<std::tuple<std::string, std::vector<std::string>, facebook::glean::cpp::schema::Code::Language, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.SearchByScope";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct SearchByScope
+
+struct SearchByScopeAndKind : Predicate<std::tuple<std::string, std::vector<std::string>, facebook::glean::cpp::schema::Code::Language, boost::variant<Alt<0, std::tuple<>>, Alt<1, facebook::glean::cpp::schema::Codemarkup::Types::SymbolKind>>, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.SearchByScopeAndKind";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct SearchByScopeAndKind
+
+struct ThriftSearchByLowerCaseName : Predicate<std::tuple<std::string, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.ThriftSearchByLowerCaseName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct ThriftSearchByLowerCaseName
+
+struct ThriftSearchByName : Predicate<std::tuple<std::string, facebook::glean::cpp::schema::Code::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.code.ThriftSearchByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 16;
+  }
+}; // struct ThriftSearchByName
+
+} // namespace Code
+
+} // namespace Search
+
+namespace Codemarkup {
+
+namespace Anglelang {
+
+struct AngleEntityLocation : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Anglelang::Entity, facebook::glean::cpp::schema::Codemarkup::Types::Location>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.anglelang.AngleEntityLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct AngleEntityLocation
+
+struct AngleEntityUses : Predicate<std::tuple<facebook::glean::cpp::schema::Code::Anglelang::Entity, Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Src::ByteSpan>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.anglelang.AngleEntityUses";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct AngleEntityUses
+
+struct AngleFileEntityXRefLocations : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, facebook::glean::cpp::schema::Codemarkup::Types::XRefLocation, facebook::glean::cpp::schema::Code::Anglelang::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.anglelang.AngleFileEntityXRefLocations";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct AngleFileEntityXRefLocations
+
+struct AngleResolveLocation : Predicate<std::tuple<facebook::glean::cpp::schema::Codemarkup::Types::Location, facebook::glean::cpp::schema::Code::Anglelang::Entity>> {
+  static const char* GLEAN_name() {
+    return "codemarkup.anglelang.AngleResolveLocation";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct AngleResolveLocation
+
+} // namespace Anglelang
+
+} // namespace Codemarkup
+
+namespace Search {
+
+namespace Anglelang {
+
+struct SearchByName : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Anglelang::Name>, facebook::glean::cpp::schema::Code::Anglelang::Entity>> {
+  static const char* GLEAN_name() {
+    return "search.anglelang.SearchByName";
+  }
+
+  static constexpr size_t GLEAN_version() {
+     return 1;
+  }
+}; // struct SearchByName
+
+} // namespace Anglelang
+
+} // namespace Search
+
+struct SCHEMA {
+  template<typename P> struct index;
+  static constexpr size_t count = 1157;
+  static constexpr char schemaId[] = "d90d0945fb0ce9e863db84e05c868ba3";
+  template<size_t i> struct predicate;
+};
+
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Sys::Blob> { static constexpr size_t value = 0; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Src::RangeContains> { static constexpr size_t value = 1; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Src::IndexFailure> { static constexpr size_t value = 2; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Src::FileLines> { static constexpr size_t value = 3; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Src::FileLanguage> { static constexpr size_t value = 4; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Src::FileDigest> { static constexpr size_t value = 5; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Src::File> { static constexpr size_t value = 6; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Src::ByteSpanContains> { static constexpr size_t value = 7; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Python::QueryToScopeCase> { static constexpr size_t value = 8; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Python::PythonNameCase> { static constexpr size_t value = 9; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Pp::SearchByName> { static constexpr size_t value = 10; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Java::QueryToScopeCase> { static constexpr size_t value = 11; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Java::NameCase> { static constexpr size_t value = 12; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Hack::QueryToScopeCase> { static constexpr size_t value = 13; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Hack::HackNameCase> { static constexpr size_t value = 14; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Hack::HackInAutoImportedNamespace> { static constexpr size_t value = 15; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Flow::TypeDeclarationAsDeclaration> { static constexpr size_t value = 16; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Flow::QueryToScopeCase> { static constexpr size_t value = 17; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Flow::FlowModuleNameCase> { static constexpr size_t value = 18; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Cxx::QueryToQNameCase> { static constexpr size_t value = 19; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Cxx::QueryToNSQNameCase> { static constexpr size_t value = 20; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Cxx::CxxRecordCase> { static constexpr size_t value = 21; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Cxx::CxxNamespaceCase> { static constexpr size_t value = 22; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Anglelang::NameLowerCase> { static constexpr size_t value = 23; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Scip::SymbolName> { static constexpr size_t value = 24; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Scip::SymbolDocumentation> { static constexpr size_t value = 25; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Scip::SymbolDisplayName> { static constexpr size_t value = 26; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Scip::Symbol> { static constexpr size_t value = 27; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Scip::ReferenceTarget> { static constexpr size_t value = 28; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Scip::Reference> { static constexpr size_t value = 29; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Scip::LocalName> { static constexpr size_t value = 30; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Scip::IsImplemented> { static constexpr size_t value = 31; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Scip::IsImplementation> { static constexpr size_t value = 32; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Scip::EntityDefinition> { static constexpr size_t value = 33; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Scip::EntityLocation> { static constexpr size_t value = 34; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Scip::EntityUses> { static constexpr size_t value = 35; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Scip::FileEntityXRefLocation> { static constexpr size_t value = 36; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Scip::ResolveLocation> { static constexpr size_t value = 37; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Scip::SearchBySymbol> { static constexpr size_t value = 38; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Scip::Documentation> { static constexpr size_t value = 39; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Scip::DisplayNameSymbol> { static constexpr size_t value = 40; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Scip::DisplayName> { static constexpr size_t value = 41; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Scip::DefinitionUses> { static constexpr size_t value = 42; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Scip::DefinitionName> { static constexpr size_t value = 43; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Scip::DefinitionDocumentation> { static constexpr size_t value = 44; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Scip::Definition> { static constexpr size_t value = 45; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::Branches::Root> { static constexpr size_t value = 46; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::Branches::FileToRoot> { static constexpr size_t value = 47; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::Branches::DirectXRefByFile> { static constexpr size_t value = 48; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::XRefsViaNameByTarget> { static constexpr size_t value = 49; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::XRefsViaName> { static constexpr size_t value = 50; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::XRefsViaNameByFile> { static constexpr size_t value = 51; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::VariableDeclaration> { static constexpr size_t value = 52; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::VariableBySName> { static constexpr size_t value = 53; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::Type> { static constexpr size_t value = 54; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::StringLiteral> { static constexpr size_t value = 55; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::SearchVariableByName> { static constexpr size_t value = 56; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::SearchVariableByLowerCaseName> { static constexpr size_t value = 57; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::SearchModuleByName> { static constexpr size_t value = 58; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::SearchModuleByLowerCaseName> { static constexpr size_t value = 59; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::SearchMethodByName> { static constexpr size_t value = 60; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::SearchMethodByLowerCaseName> { static constexpr size_t value = 61; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::SearchFunctionByName> { static constexpr size_t value = 62; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::SearchFunctionByLowerCaseName> { static constexpr size_t value = 63; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::SearchFieldByName> { static constexpr size_t value = 64; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::SearchFieldByLowerCaseName> { static constexpr size_t value = 65; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::SearchClassByName> { static constexpr size_t value = 66; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::SearchClassByLowerCaseName> { static constexpr size_t value = 67; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::SNameToName> { static constexpr size_t value = 68; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::SName> { static constexpr size_t value = 69; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::ResolveOriginalName> { static constexpr size_t value = 70; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::NameToSName> { static constexpr size_t value = 71; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::Name> { static constexpr size_t value = 72; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::ModuleDefinition> { static constexpr size_t value = 73; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::ModuleBySName> { static constexpr size_t value = 74; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::Module> { static constexpr size_t value = 75; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::MethodOverrides> { static constexpr size_t value = 76; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::MethodOverriden> { static constexpr size_t value = 77; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::MethodByLocalNameStr> { static constexpr size_t value = 78; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::ImportStatementByAsSName> { static constexpr size_t value = 79; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::ImportStatementByAsName> { static constexpr size_t value = 80; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::ImportStatement> { static constexpr size_t value = 81; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::ImportStarsByFile> { static constexpr size_t value = 82; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::ImportStarStatement> { static constexpr size_t value = 83; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::ImportStarLocation> { static constexpr size_t value = 84; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::FunctionDeclaration> { static constexpr size_t value = 85; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::FunctionBySName> { static constexpr size_t value = 86; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::DerivedClassToBase> { static constexpr size_t value = 87; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::DefinitionLocation> { static constexpr size_t value = 88; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::DefinitionsByFile> { static constexpr size_t value = 89; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::IsTopLevelDefinition> { static constexpr size_t value = 90; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::FunctionDefinition> { static constexpr size_t value = 91; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::VariableDefinition> { static constexpr size_t value = 92; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::DeclarationDefinition> { static constexpr size_t value = 93; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::DeclarationDocstring> { static constexpr size_t value = 94; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::DeclarationLocation> { static constexpr size_t value = 95; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::DeclarationReference> { static constexpr size_t value = 96; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::DeclarationToName> { static constexpr size_t value = 97; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::DeclarationUses> { static constexpr size_t value = 98; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::DeclarationWithLocalName> { static constexpr size_t value = 99; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::DeclarationWithName> { static constexpr size_t value = 100; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::DeclarationWithSName> { static constexpr size_t value = 101; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::DeclarationsByFile> { static constexpr size_t value = 102; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::DefinitionDeclaration> { static constexpr size_t value = 103; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::DirectXRefsByFile> { static constexpr size_t value = 104; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::IsAbstract> { static constexpr size_t value = 105; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::IsTopLevelDeclaration> { static constexpr size_t value = 106; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::NonImportDeclaration> { static constexpr size_t value = 107; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::SNameWithDeclaration> { static constexpr size_t value = 108; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Yaml::XRefsByFile> { static constexpr size_t value = 109; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::Contains> { static constexpr size_t value = 110; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::ContainingTopLevelDeclaration> { static constexpr size_t value = 111; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::ContainedByTopLevelDeclaration> { static constexpr size_t value = 112; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::ContainedBy> { static constexpr size_t value = 113; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::ClassDefinition> { static constexpr size_t value = 114; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::ClassDeclaration> { static constexpr size_t value = 115; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::ClassBySName> { static constexpr size_t value = 116; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::CalleeToCaller> { static constexpr size_t value = 117; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::BaseClassToDerived> { static constexpr size_t value = 118; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Python::FileCall> { static constexpr size_t value = 119; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Pp1::Use> { static constexpr size_t value = 120; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Pp1::Undef> { static constexpr size_t value = 121; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Pp1::Macro> { static constexpr size_t value = 122; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Pp1::Include> { static constexpr size_t value = 123; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Pp1::DefineUse> { static constexpr size_t value = 124; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Pp1::DefineLowerCase> { static constexpr size_t value = 125; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Pp1::Define> { static constexpr size_t value = 126; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Scip::Metadata> { static constexpr size_t value = 127; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Scip::EntityKind> { static constexpr size_t value = 128; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Scip::SearchByNameKind> { static constexpr size_t value = 129; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Scip::SymbolKind> { static constexpr size_t value = 130; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Lsif::Types::ToSrcRange> { static constexpr size_t value = 131; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Scip::DefinitionLocation> { static constexpr size_t value = 132; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Scip::FileRange> { static constexpr size_t value = 133; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Scip::FileXLangSymbolRef> { static constexpr size_t value = 134; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Scip::ReferenceLocation> { static constexpr size_t value = 135; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Scip::FileLanguage> { static constexpr size_t value = 136; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Scip::TagDefinition> { static constexpr size_t value = 137; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Lsif::Types::FromSrcRange> { static constexpr size_t value = 138; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Lsif::Reference> { static constexpr size_t value = 139; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Lsif::Range> { static constexpr size_t value = 140; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Lsif::ProjectDocument> { static constexpr size_t value = 141; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Lsif::Project> { static constexpr size_t value = 142; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Lsif::PackageInformation> { static constexpr size_t value = 143; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Lsif::NameLowerCase> { static constexpr size_t value = 144; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Lsif::NameDefinition> { static constexpr size_t value = 145; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Lsif::Name> { static constexpr size_t value = 146; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Lsif::MonikerSymbolKind> { static constexpr size_t value = 147; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Lsif::MonikerScheme> { static constexpr size_t value = 148; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Lsif::MonikerId> { static constexpr size_t value = 149; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Lsif::MonikerDefinition> { static constexpr size_t value = 150; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Lsif::Moniker> { static constexpr size_t value = 151; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Lsif::Metadata> { static constexpr size_t value = 152; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Lsif::HoverText> { static constexpr size_t value = 153; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Lsif::HoverContent> { static constexpr size_t value = 154; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Lsif::EntityDefinition> { static constexpr size_t value = 155; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Lsif::EntityKind> { static constexpr size_t value = 156; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Lsif::EntityLocation> { static constexpr size_t value = 157; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Lsif::EntityUses> { static constexpr size_t value = 158; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Lsif::FileEntityXRefLocation> { static constexpr size_t value = 159; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Lsif::ResolveLocation> { static constexpr size_t value = 160; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Lsif::SearchByExactLocation> { static constexpr size_t value = 161; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Lsif::SearchByExactLocationAndName> { static constexpr size_t value = 162; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Lsif::SearchByMoniker> { static constexpr size_t value = 163; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Lsif::SearchByName> { static constexpr size_t value = 164; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Lsif::SearchNonLocalByLocation> { static constexpr size_t value = 165; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Lsif::TagDefinition> { static constexpr size_t value = 166; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Lsif::Document> { static constexpr size_t value = 167; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Lsif::DefinitionUse> { static constexpr size_t value = 168; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Lsif::DefinitionMoniker> { static constexpr size_t value = 169; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Lsif::DefinitionLocation> { static constexpr size_t value = 170; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Lsif::DefinitionKind> { static constexpr size_t value = 171; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Lsif::DefinitionHover> { static constexpr size_t value = 172; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Lsif::Definition> { static constexpr size_t value = 173; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Lsif::Declaration> { static constexpr size_t value = 174; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Kotlin::Alpha::VariableParent> { static constexpr size_t value = 175; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Kotlin::Alpha::VariableDeclaration> { static constexpr size_t value = 176; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Kotlin::Alpha::TypeArg> { static constexpr size_t value = 177; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Kotlin::Alpha::Type> { static constexpr size_t value = 178; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Kotlin::Alpha::DeclarationLocation> { static constexpr size_t value = 179; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Kotlin::Alpha::DeclarationFileLocation> { static constexpr size_t value = 180; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Kotlin::Alpha::ExtendsDeclaration> { static constexpr size_t value = 181; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Kotlin::Alpha::FileDeclarations> { static constexpr size_t value = 182; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Kotlin::Alpha::MethodDeclaration> { static constexpr size_t value = 183; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Kotlin::Alpha::ParentDeclaration> { static constexpr size_t value = 184; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Kotlin::SearchByQName> { static constexpr size_t value = 185; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Symbolid::Kotlin::LookupDeclaration> { static constexpr size_t value = 186; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Symbolid::Kotlin::LookupMethodDeclaration> { static constexpr size_t value = 187; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Kotlin::Alpha::ContainsDeclaration> { static constexpr size_t value = 188; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Kotlin::Alpha::ClassMember> { static constexpr size_t value = 189; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Kotlin::Alpha::ClassDeclaration> { static constexpr size_t value = 190; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Javakotlin::Alpha::Type> { static constexpr size_t value = 191; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Javakotlin::Alpha::QName> { static constexpr size_t value = 192; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Javakotlin::Alpha::Path> { static constexpr size_t value = 193; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Javakotlin::Alpha::NameLowerCase> { static constexpr size_t value = 194; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Javakotlin::Alpha::Name> { static constexpr size_t value = 195; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Javakotlin::Alpha::MethodName> { static constexpr size_t value = 196; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Java::Alpha::XRefFile> { static constexpr size_t value = 197; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Java::Alpha::XRef> { static constexpr size_t value = 198; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Java::Alpha::TypeVar> { static constexpr size_t value = 199; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Java::Alpha::TypeParam> { static constexpr size_t value = 200; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Java::Alpha::TypeOfTypeArgs> { static constexpr size_t value = 201; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Java::Alpha::TypeArg> { static constexpr size_t value = 202; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Java::Alpha::PrimitiveType> { static constexpr size_t value = 203; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Java::Alpha::PackageDeclaration> { static constexpr size_t value = 204; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Java::Alpha::ObjectType> { static constexpr size_t value = 205; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Java::Alpha::ParameterDeclaration> { static constexpr size_t value = 206; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Java::Alpha::InterfaceInheritance> { static constexpr size_t value = 207; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Java::Alpha::Inheritance> { static constexpr size_t value = 208; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Java::Alpha::ImportDeclaration> { static constexpr size_t value = 209; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Java::Alpha::FileXRefs> { static constexpr size_t value = 210; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Java::Alpha::ExecutableDefnLocation> { static constexpr size_t value = 211; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Java::Alpha::LocalDeclaration> { static constexpr size_t value = 212; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Java::Alpha::DefinitionLocation> { static constexpr size_t value = 213; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Java::Alpha::EnumDeclaration> { static constexpr size_t value = 214; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Java::Alpha::FieldDeclaration> { static constexpr size_t value = 215; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Java::Alpha::InterfaceDeclaration> { static constexpr size_t value = 216; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Java::Alpha::MethodDeclaration> { static constexpr size_t value = 217; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Java::Alpha::DeclarationAnnotations> { static constexpr size_t value = 218; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Java::Alpha::DeclarationComment> { static constexpr size_t value = 219; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Java::Alpha::DeclarationLocation> { static constexpr size_t value = 220; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Java::Alpha::DeclarationType> { static constexpr size_t value = 221; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Java::Alpha::DeclarationUses> { static constexpr size_t value = 222; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Java::Alpha::DeclarationXRefTarget> { static constexpr size_t value = 223; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Java::Alpha::ExtendedByDeclaration> { static constexpr size_t value = 224; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Java::Alpha::ExtendsDeclaration> { static constexpr size_t value = 225; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Java::Alpha::FileDeclarations> { static constexpr size_t value = 226; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Java::Alpha::ParentDeclaration> { static constexpr size_t value = 227; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Java::Alpha::QNameToDefinition> { static constexpr size_t value = 228; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Java::Alpha::XRefOfType> { static constexpr size_t value = 229; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Java::Alpha::XRefTargetDeclaration> { static constexpr size_t value = 230; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Java::SearchByQName> { static constexpr size_t value = 231; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Symbolid::Java::LookupDeclaration> { static constexpr size_t value = 232; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Symbolid::Java::LookupMethodDeclaration> { static constexpr size_t value = 233; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Java::Alpha::DeclOfExecutableDefn> { static constexpr size_t value = 234; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Java::Alpha::DeclOfDefn> { static constexpr size_t value = 235; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Java::Alpha::ContainsDeclaration> { static constexpr size_t value = 236; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Java::Alpha::ConstructorDeclaration> { static constexpr size_t value = 237; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Java::Alpha::ClassDeclaration> { static constexpr size_t value = 238; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Java::Alpha::Type> { static constexpr size_t value = 239; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Java::Alpha::ArrayType> { static constexpr size_t value = 240; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Java::Alpha::Annotation> { static constexpr size_t value = 241; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Java::Alpha::AnnotatedClass> { static constexpr size_t value = 242; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Indexer::Config> { static constexpr size_t value = 243; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hs::ValBind> { static constexpr size_t value = 244; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hs::UnitName> { static constexpr size_t value = 245; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hs::TypeSynDecl> { static constexpr size_t value = 246; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hs::TypeFamilyDecl> { static constexpr size_t value = 247; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hs::TyVarBind> { static constexpr size_t value = 248; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hs::TyCon> { static constexpr size_t value = 249; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hs::SourceModule> { static constexpr size_t value = 250; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hs::SigDecl> { static constexpr size_t value = 251; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hs::XRef> { static constexpr size_t value = 252; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hs::RecordFieldDecl> { static constexpr size_t value = 253; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hs::PatSynDecl> { static constexpr size_t value = 254; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hs::PatBind> { static constexpr size_t value = 255; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hs::OccNameLowerCase> { static constexpr size_t value = 256; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hs::OccName> { static constexpr size_t value = 257; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hs::Name> { static constexpr size_t value = 258; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hs::ModuleSource> { static constexpr size_t value = 259; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hs::ModuleName> { static constexpr size_t value = 260; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hs::ModuleDeclarations> { static constexpr size_t value = 261; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hs::Module> { static constexpr size_t value = 262; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hs::MethDecl> { static constexpr size_t value = 263; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hs::LitType> { static constexpr size_t value = 264; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hs::InstanceDecl> { static constexpr size_t value = 265; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hs::InstanceBindToDecl> { static constexpr size_t value = 266; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hs::InstanceBind> { static constexpr size_t value = 267; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hs::FileXRefs> { static constexpr size_t value = 268; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hs::DeclarationLocation> { static constexpr size_t value = 269; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hs::DeclarationOfName> { static constexpr size_t value = 270; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hs::DeclarationSpan> { static constexpr size_t value = 271; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hs::DataDecl> { static constexpr size_t value = 272; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hs::ConstrDecl> { static constexpr size_t value = 273; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hs::ClassDecl> { static constexpr size_t value = 274; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hs::Type> { static constexpr size_t value = 275; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::UserAttribute> { static constexpr size_t value = 276; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::TypedefDeclaration> { static constexpr size_t value = 277; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::TypeConstDefinition> { static constexpr size_t value = 278; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::Type> { static constexpr size_t value = 279; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::TraitDeclaration> { static constexpr size_t value = 280; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::StringLiteral> { static constexpr size_t value = 281; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::SearchTypedefByLowerCaseName> { static constexpr size_t value = 282; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::SearchTypeConstByLowerCaseName> { static constexpr size_t value = 283; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::SearchTraitByLowerCaseName> { static constexpr size_t value = 284; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::SearchPropertyByLowerCaseName> { static constexpr size_t value = 285; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::SearchNamespaceByLowerCaseName> { static constexpr size_t value = 286; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::SearchModuleByLowerCaseName> { static constexpr size_t value = 287; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::SearchMethodByLowerCaseName> { static constexpr size_t value = 288; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::SearchInterfaceByLowerCaseName> { static constexpr size_t value = 289; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::SearchGlobalConstByLowerCaseName> { static constexpr size_t value = 290; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::SearchFunctionByLowerCaseName> { static constexpr size_t value = 291; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::SearchEnumeratorByLowerCaseName> { static constexpr size_t value = 292; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::SearchEnumByLowerCaseName> { static constexpr size_t value = 293; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::SearchClassConstByLowerCaseName> { static constexpr size_t value = 294; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::SearchClassByLowerCaseName> { static constexpr size_t value = 295; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::QName> { static constexpr size_t value = 296; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::PropertyDefinition> { static constexpr size_t value = 297; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::Signature> { static constexpr size_t value = 298; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::NamespaceQName> { static constexpr size_t value = 299; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::NamespaceDeclaration> { static constexpr size_t value = 300; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::NameLowerCase> { static constexpr size_t value = 301; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::Name> { static constexpr size_t value = 302; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::ModuleDefinition> { static constexpr size_t value = 303; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::ModuleDeclaration> { static constexpr size_t value = 304; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::MethodOverrides> { static constexpr size_t value = 305; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::MethodOverridden> { static constexpr size_t value = 306; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::MethodOccurrence> { static constexpr size_t value = 307; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::InterfaceDeclaration> { static constexpr size_t value = 308; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::IndexerInputsHash> { static constexpr size_t value = 309; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::GlobalNamespaceAlias> { static constexpr size_t value = 310; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::GlobalConstDefinition> { static constexpr size_t value = 311; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::GlobalConstDeclaration> { static constexpr size_t value = 312; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::FunctionDeclaration> { static constexpr size_t value = 313; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::Hint> { static constexpr size_t value = 314; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::Enumerator> { static constexpr size_t value = 315; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::EnumDefinition> { static constexpr size_t value = 316; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::EnumDeclaration> { static constexpr size_t value = 317; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::Context_> { static constexpr size_t value = 318; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::ContainerDeclarationQName> { static constexpr size_t value = 319; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::ContainerParent> { static constexpr size_t value = 320; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::DeclarationComment> { static constexpr size_t value = 321; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::DeclarationLocation> { static constexpr size_t value = 322; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::DeclarationName> { static constexpr size_t value = 323; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::DeclarationNamespace> { static constexpr size_t value = 324; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::DeclarationSource> { static constexpr size_t value = 325; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::DeclarationSpan> { static constexpr size_t value = 326; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::DeclarationTarget> { static constexpr size_t value = 327; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::FileDeclarations> { static constexpr size_t value = 328; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::MemberCluster> { static constexpr size_t value = 329; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::ModuleChild> { static constexpr size_t value = 330; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::ModuleParent> { static constexpr size_t value = 331; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::NamespaceMember> { static constexpr size_t value = 332; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::SearchClassByName> { static constexpr size_t value = 333; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::SearchClassConstByName> { static constexpr size_t value = 334; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::SearchEnumByName> { static constexpr size_t value = 335; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::SearchEnumeratorByName> { static constexpr size_t value = 336; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::SearchFunctionByName> { static constexpr size_t value = 337; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::SearchGlobalConstByName> { static constexpr size_t value = 338; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::SearchInterfaceByName> { static constexpr size_t value = 339; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::SearchMethodByName> { static constexpr size_t value = 340; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::SearchModuleByName> { static constexpr size_t value = 341; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::SearchNamespaceByName> { static constexpr size_t value = 342; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::SearchPropertyByName> { static constexpr size_t value = 343; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::SearchTraitByName> { static constexpr size_t value = 344; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::SearchTypeConstByName> { static constexpr size_t value = 345; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::SearchTypedefByName> { static constexpr size_t value = 346; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::TargetUses> { static constexpr size_t value = 347; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::TargetUsesAbs> { static constexpr size_t value = 348; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::FileXRefs> { static constexpr size_t value = 349; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::TypeInfo> { static constexpr size_t value = 350; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Hack::SearchByName> { static constexpr size_t value = 351; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Hack::SearchFunctionInNamespace> { static constexpr size_t value = 352; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Hack::SearchGlobalConstInNamespace> { static constexpr size_t value = 353; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Hack::SearchInContainer> { static constexpr size_t value = 354; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Hack::SearchInContainerNoProperty> { static constexpr size_t value = 355; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Hack::SearchInContainerOrEnum> { static constexpr size_t value = 356; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Hack::SearchInContainerOrEnumNoProperty> { static constexpr size_t value = 357; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Hack::SearchInEnum> { static constexpr size_t value = 358; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Hack::SearchInNamespace> { static constexpr size_t value = 359; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Hack::SearchModule> { static constexpr size_t value = 360; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Hack::SearchNamespace> { static constexpr size_t value = 361; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Hack::SearchNamespacedDecl> { static constexpr size_t value = 362; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Hack::SearchPropertyInContainer> { static constexpr size_t value = 363; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Hack::SearchTypeInNamespace> { static constexpr size_t value = 364; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::InheritedMembers> { static constexpr size_t value = 365; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::MethodDeclaration> { static constexpr size_t value = 366; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::PropertyDeclaration> { static constexpr size_t value = 367; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::TypeConstDeclaration> { static constexpr size_t value = 368; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::ContainerChild> { static constexpr size_t value = 369; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::FunctionDefinition> { static constexpr size_t value = 370; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::InterfaceDefinition> { static constexpr size_t value = 371; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::MethodDefinition> { static constexpr size_t value = 372; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::TraitDefinition> { static constexpr size_t value = 373; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::TypedefDefinition> { static constexpr size_t value = 374; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::ClassDefinition> { static constexpr size_t value = 375; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::ClassDeclaration> { static constexpr size_t value = 376; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::ClassConstDefinition> { static constexpr size_t value = 377; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::ClassConstDeclaration> { static constexpr size_t value = 378; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::AttributeToDefinition> { static constexpr size_t value = 379; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::AttributeToDeclaration> { static constexpr size_t value = 380; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::AttributeHasParameter> { static constexpr size_t value = 381; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::FileCall> { static constexpr size_t value = 382; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Graphql::VariableDef> { static constexpr size_t value = 383; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Graphql::Value> { static constexpr size_t value = 384; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Graphql::UnionTypeDef> { static constexpr size_t value = 385; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Graphql::ScalarTypeDef> { static constexpr size_t value = 386; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Graphql::Operation> { static constexpr size_t value = 387; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Graphql::ObjectTypeDef> { static constexpr size_t value = 388; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Graphql::NameLowerCase> { static constexpr size_t value = 389; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Graphql::InterfaceTypeDef> { static constexpr size_t value = 390; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Graphql::InputValueDef> { static constexpr size_t value = 391; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Graphql::InputObjectTypeDef> { static constexpr size_t value = 392; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Graphql::InlineFragment> { static constexpr size_t value = 393; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Graphql::FragmentSpread> { static constexpr size_t value = 394; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Graphql::Fragment> { static constexpr size_t value = 395; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Graphql::FieldDef> { static constexpr size_t value = 396; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Graphql::Field> { static constexpr size_t value = 397; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Graphql::EnumTypeDef> { static constexpr size_t value = 398; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Graphql::DirectiveDef> { static constexpr size_t value = 399; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Graphql::Directive> { static constexpr size_t value = 400; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Graphql::DeclarationLocation> { static constexpr size_t value = 401; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Graphql::DeclarationName> { static constexpr size_t value = 402; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Graphql::DeclarationUses> { static constexpr size_t value = 403; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Graphql::FileDeclarations> { static constexpr size_t value = 404; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Graphql::SearchByName> { static constexpr size_t value = 405; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Graphql::FileXRefs> { static constexpr size_t value = 406; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Graphql::DeclHasName> { static constexpr size_t value = 407; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Graphql::BelongToConfig> { static constexpr size_t value = 408; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Graphql::Argument> { static constexpr size_t value = 409; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::nothingTest> { static constexpr size_t value = 410; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::ViaStringPair> { static constexpr size_t value = 411; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::Unbound2> { static constexpr size_t value = 412; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::Unbound> { static constexpr size_t value = 413; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::TreeToTree> { static constexpr size_t value = 414; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::Tree> { static constexpr size_t value = 415; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::StringPairBox> { static constexpr size_t value = 416; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::StringPair> { static constexpr size_t value = 417; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::StoredRevStringPairWithRev> { static constexpr size_t value = 418; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::StoredRevStringPairWithA> { static constexpr size_t value = 419; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::StoredRevStringPairSum> { static constexpr size_t value = 420; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::StoredRevStringPair> { static constexpr size_t value = 421; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::StoredDualStringPair> { static constexpr size_t value = 422; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::SkipRevEdge> { static constexpr size_t value = 423; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::SameString> { static constexpr size_t value = 424; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::RevStringPairs> { static constexpr size_t value = 425; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::RevStringPairRec> { static constexpr size_t value = 426; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::RevStringPair> { static constexpr size_t value = 427; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::RevRevStringPair> { static constexpr size_t value = 428; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::RevEdge> { static constexpr size_t value = 429; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::ReflStringPair> { static constexpr size_t value = 430; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::RefRef> { static constexpr size_t value = 431; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::Ref> { static constexpr size_t value = 432; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::Qux> { static constexpr size_t value = 433; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::Predicate_0> { static constexpr size_t value = 434; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::NodePair> { static constexpr size_t value = 435; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::Node> { static constexpr size_t value = 436; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::Name> { static constexpr size_t value = 437; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::MatchOneAlt> { static constexpr size_t value = 438; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::LeftOr2> { static constexpr size_t value = 439; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::LeftOr> { static constexpr size_t value = 440; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::KeyValue> { static constexpr size_t value = 441; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::IsThree> { static constexpr size_t value = 442; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::IsParent> { static constexpr size_t value = 443; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::IsGlean> { static constexpr size_t value = 444; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::FooToFoo> { static constexpr size_t value = 445; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::Foo> { static constexpr size_t value = 446; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::Expr> { static constexpr size_t value = 447; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::EmptyStoredStringPair> { static constexpr size_t value = 448; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::EmptyPred> { static constexpr size_t value = 449; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::EdgeWrapper> { static constexpr size_t value = 450; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::EdgeFromNotA> { static constexpr size_t value = 451; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::Edge> { static constexpr size_t value = 452; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::DualStringPair> { static constexpr size_t value = 453; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::DerivedKeyValue2> { static constexpr size_t value = 454; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::DerivedKeyValue> { static constexpr size_t value = 455; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::Bar> { static constexpr size_t value = 456; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glean::Test::Predicate_> { static constexpr size_t value = 457; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Gencode::GenCodeSignature> { static constexpr size_t value = 458; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Gencode::GenCodeCommand> { static constexpr size_t value = 459; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Gencode::GenCodeClass> { static constexpr size_t value = 460; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Gencode::GenCodeBySource> { static constexpr size_t value = 461; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Gencode::GenCode> { static constexpr size_t value = 462; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::TypeImportDeclaration> { static constexpr size_t value = 463; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::TypeExport> { static constexpr size_t value = 464; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::TypeDeclarationReference> { static constexpr size_t value = 465; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::TypeDeclarationInfo> { static constexpr size_t value = 466; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::TypeDeclaration> { static constexpr size_t value = 467; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::Type> { static constexpr size_t value = 468; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::StringToFileModule> { static constexpr size_t value = 469; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::SourceOfTypeExport> { static constexpr size_t value = 470; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::SourceOfExport> { static constexpr size_t value = 471; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Flow::FlowSearchByNameNonImport> { static constexpr size_t value = 472; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::SearchTypeDeclarationByName> { static constexpr size_t value = 473; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::SearchTypeDeclarationByLowerCaseName> { static constexpr size_t value = 474; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::SearchTypeByModuleExport> { static constexpr size_t value = 475; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::SearchModuleByLowerCaseName> { static constexpr size_t value = 476; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::SearchMemberDeclarationByName> { static constexpr size_t value = 477; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::SearchMemberDeclarationByLowerCaseName> { static constexpr size_t value = 478; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::SearchDeclarationByName> { static constexpr size_t value = 479; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::SearchDeclarationByLowerCaseName> { static constexpr size_t value = 480; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::SearchByNameModule> { static constexpr size_t value = 481; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::SearchByName> { static constexpr size_t value = 482; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::SearchByModuleName> { static constexpr size_t value = 483; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::SearchByModule> { static constexpr size_t value = 484; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::SearchByFileModule> { static constexpr size_t value = 485; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::Range> { static constexpr size_t value = 486; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::Name> { static constexpr size_t value = 487; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::ModuleTypeExport> { static constexpr size_t value = 488; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::ModuleNameLowerCase> { static constexpr size_t value = 489; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::ModuleLocationByFile> { static constexpr size_t value = 490; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::ModuleLocation> { static constexpr size_t value = 491; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::ModuleExport> { static constexpr size_t value = 492; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::ModuleDoc> { static constexpr size_t value = 493; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::ModuleContains> { static constexpr size_t value = 494; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::ModuleComments> { static constexpr size_t value = 495; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::Module> { static constexpr size_t value = 496; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::MemberDeclarationReference> { static constexpr size_t value = 497; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::MemberDeclarationInfo> { static constexpr size_t value = 498; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::MemberDeclaration> { static constexpr size_t value = 499; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::LocalDeclarationReference> { static constexpr size_t value = 500; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::ImportDeclaration> { static constexpr size_t value = 501; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::FlowXRefDeclInfo> { static constexpr size_t value = 502; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::FlowTypeImportXRef> { static constexpr size_t value = 503; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::FlowTypeExportLocation> { static constexpr size_t value = 504; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::FlowTypeEntityImportUses> { static constexpr size_t value = 505; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::FlowSameModule> { static constexpr size_t value = 506; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::FlowModuleNamespaceXRef> { static constexpr size_t value = 507; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::FlowImportXRef> { static constexpr size_t value = 508; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::FlowExportLocation> { static constexpr size_t value = 509; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::FlowEntityUsesAll> { static constexpr size_t value = 510; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::FlowEntityImportUses> { static constexpr size_t value = 511; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::FlowCompatibleExport> { static constexpr size_t value = 512; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::FileXRef> { static constexpr size_t value = 513; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::FileOfStringModule> { static constexpr size_t value = 514; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::FileDeclaration> { static constexpr size_t value = 515; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::Export> { static constexpr size_t value = 516; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::Documentation> { static constexpr size_t value = 517; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::DeclarationUses> { static constexpr size_t value = 518; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::DeclarationSignature> { static constexpr size_t value = 519; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::DeclarationNameSpan> { static constexpr size_t value = 520; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::DeclarationLocation> { static constexpr size_t value = 521; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::DeclarationInfo> { static constexpr size_t value = 522; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Flow::Declaration> { static constexpr size_t value = 523; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::UnionVal> { static constexpr size_t value = 524; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::TypeDefType> { static constexpr size_t value = 525; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::StructuredAnnotation> { static constexpr size_t value = 526; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::StructVal> { static constexpr size_t value = 527; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::ServiceParent> { static constexpr size_t value = 528; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::ServiceName> { static constexpr size_t value = 529; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::ServiceInteractionFunctions> { static constexpr size_t value = 530; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::ServiceDefinition> { static constexpr size_t value = 531; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::ServiceChild> { static constexpr size_t value = 532; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::SearchByName> { static constexpr size_t value = 533; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::QualName> { static constexpr size_t value = 534; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::PackageName> { static constexpr size_t value = 535; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::Package> { static constexpr size_t value = 536; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::NamespaceValue> { static constexpr size_t value = 537; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::NamespaceName> { static constexpr size_t value = 538; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::Namespace> { static constexpr size_t value = 539; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::NamedDecl> { static constexpr size_t value = 540; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::NameLowerCase> { static constexpr size_t value = 541; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::InteractionName> { static constexpr size_t value = 542; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::InteractionDefinition> { static constexpr size_t value = 543; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::Identifier> { static constexpr size_t value = 544; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::FunctionName> { static constexpr size_t value = 545; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::Literal> { static constexpr size_t value = 546; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::FileXRefs> { static constexpr size_t value = 547; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::File> { static constexpr size_t value = 548; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::StructType> { static constexpr size_t value = 549; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::UnionType> { static constexpr size_t value = 550; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::FieldDecl> { static constexpr size_t value = 551; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::ExceptionVal> { static constexpr size_t value = 552; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::ExceptionType> { static constexpr size_t value = 553; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::TypeDefException> { static constexpr size_t value = 554; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::ExceptionName> { static constexpr size_t value = 555; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::EnumerationType> { static constexpr size_t value = 556; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::EnumValueDef> { static constexpr size_t value = 557; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::EnumValue> { static constexpr size_t value = 558; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::EnumVal> { static constexpr size_t value = 559; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::DeclarationComment> { static constexpr size_t value = 560; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::DeclarationFile> { static constexpr size_t value = 561; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::DeclarationMember> { static constexpr size_t value = 562; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::DeclarationName> { static constexpr size_t value = 563; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::DeclarationNameSpan> { static constexpr size_t value = 564; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::DeclarationUses> { static constexpr size_t value = 565; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::FileDeclaration> { static constexpr size_t value = 566; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::FunctionDeclarationName> { static constexpr size_t value = 567; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::HackToThrift> { static constexpr size_t value = 568; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Hack::ThriftToHack> { static constexpr size_t value = 569; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::TypeSpecification> { static constexpr size_t value = 570; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::ConstantDefinition> { static constexpr size_t value = 571; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::Constant> { static constexpr size_t value = 572; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Erlang::NameLowerCase> { static constexpr size_t value = 573; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Erlang::FunctionDeclaration> { static constexpr size_t value = 574; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Erlang::XRefsViaFqnByFile> { static constexpr size_t value = 575; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Erlang::DeclarationComment> { static constexpr size_t value = 576; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Erlang::DeclarationLocation> { static constexpr size_t value = 577; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Erlang::DeclarationReference> { static constexpr size_t value = 578; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Erlang::DeclarationToFqn> { static constexpr size_t value = 579; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Erlang::DeclarationUses> { static constexpr size_t value = 580; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Erlang::DeclarationWithFqn> { static constexpr size_t value = 581; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Erlang::DeclarationsByFile> { static constexpr size_t value = 582; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Erlang::SearchByName> { static constexpr size_t value = 583; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Dyn::ObserverIdentifier> { static constexpr size_t value = 584; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Dyn::Environment> { static constexpr size_t value = 585; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Dyn::EntityDynamicReference> { static constexpr size_t value = 586; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Digest::FileDigest> { static constexpr size_t value = 587; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Glass::FileInfo> { static constexpr size_t value = 588; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Dataswarm::TableDeclaration> { static constexpr size_t value = 589; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Dataswarm::TableColumnDeclaration> { static constexpr size_t value = 590; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Dataswarm::SubqueryDeclaration> { static constexpr size_t value = 591; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Dataswarm::SubqueryColumnDeclaration> { static constexpr size_t value = 592; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Dataswarm::MacroDeclaration> { static constexpr size_t value = 593; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Dataswarm::DeclarationLocation> { static constexpr size_t value = 594; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Dataswarm::DeclarationName> { static constexpr size_t value = 595; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Dataswarm::XRefsByFile> { static constexpr size_t value = 596; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::VariableLowerCase> { static constexpr size_t value = 597; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::UsingDirective> { static constexpr size_t value = 598; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::UsingDeclaration> { static constexpr size_t value = 599; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::TypeAliasLowerCase> { static constexpr size_t value = 600; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::TypeAliasDeclaration> { static constexpr size_t value = 601; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::Type> { static constexpr size_t value = 602; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::TranslationUnitXRefs> { static constexpr size_t value = 603; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::TranslationUnitTrace> { static constexpr size_t value = 604; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::TranslationUnitIncludeTree> { static constexpr size_t value = 605; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::Trace> { static constexpr size_t value = 606; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::RecordUnionLowerCase> { static constexpr size_t value = 607; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::RecordStructLowerCase> { static constexpr size_t value = 608; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::RecordDerived> { static constexpr size_t value = 609; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::RecordClassLowerCase> { static constexpr size_t value = 610; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::Signature> { static constexpr size_t value = 611; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::PPDefineLocation> { static constexpr size_t value = 612; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::ObjcSelector> { static constexpr size_t value = 613; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::ObjcPropertyImplementation> { static constexpr size_t value = 614; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::ObjcPropertyIVar> { static constexpr size_t value = 615; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::ObjcMethodDefinition> { static constexpr size_t value = 616; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::ObjcMethodDeclarationName> { static constexpr size_t value = 617; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::ObjcInterfaceToImplementation> { static constexpr size_t value = 618; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::ObjcImplements> { static constexpr size_t value = 619; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::ObjcContainerInterfaceLowerCase> { static constexpr size_t value = 620; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::ObjcContainerInheritance> { static constexpr size_t value = 621; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::ObjcContainerDefinition> { static constexpr size_t value = 622; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::ObjcContainerDeclarationInterface> { static constexpr size_t value = 623; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::ObjcContainerBase> { static constexpr size_t value = 624; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::ObjcContainerDeclaration> { static constexpr size_t value = 625; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::ObjcMethodDeclaration> { static constexpr size_t value = 626; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::ObjcPropertyDeclaration> { static constexpr size_t value = 627; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::ObjContainerIdName> { static constexpr size_t value = 628; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::NamespaceQName> { static constexpr size_t value = 629; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::NamespaceLowerCase> { static constexpr size_t value = 630; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::NamespaceDefinition> { static constexpr size_t value = 631; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::NamespaceDeclarationName> { static constexpr size_t value = 632; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::NamespaceDeclarationByName> { static constexpr size_t value = 633; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::NamespaceDeclaration> { static constexpr size_t value = 634; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::NamespaceAliasDeclaration> { static constexpr size_t value = 635; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::Name> { static constexpr size_t value = 636; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::MethodOverrides> { static constexpr size_t value = 637; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::MethodOverridden> { static constexpr size_t value = 638; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::IncludeTreeTranslationUnit> { static constexpr size_t value = 639; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::IncludeTreeParent> { static constexpr size_t value = 640; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::IncludeTree> { static constexpr size_t value = 641; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::PPTrace> { static constexpr size_t value = 642; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::FunctionLowerCase> { static constexpr size_t value = 643; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::FunctionDefinition> { static constexpr size_t value = 644; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::FunctionDeclarationNameString> { static constexpr size_t value = 645; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::FunctionDeclarationName> { static constexpr size_t value = 646; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::FunctionDeclaration> { static constexpr size_t value = 647; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::FunctionDeclAttribute> { static constexpr size_t value = 648; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::FunctionAttribute> { static constexpr size_t value = 649; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::FileXRefs> { static constexpr size_t value = 650; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::FilePPUseXRefs> { static constexpr size_t value = 651; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::FilePPUseTraceXRefs> { static constexpr size_t value = 652; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::FilePPTraceXRefs> { static constexpr size_t value = 653; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::VariableDeclaration> { static constexpr size_t value = 654; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::EnumeratorLowerCase> { static constexpr size_t value = 655; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::EnumeratorInEnum> { static constexpr size_t value = 656; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::EnumeratorByName> { static constexpr size_t value = 657; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::Enumerator> { static constexpr size_t value = 658; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::EnumLowerCase> { static constexpr size_t value = 659; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::EnumDefinition> { static constexpr size_t value = 660; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::EnumDeclaration> { static constexpr size_t value = 661; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::DefnInRecord> { static constexpr size_t value = 662; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::DeclarationComment> { static constexpr size_t value = 663; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::DeclarationInTrace> { static constexpr size_t value = 664; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::DeclarationLocationName> { static constexpr size_t value = 665; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::DeclarationLocationNameSpan> { static constexpr size_t value = 666; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::DeclarationNameSpan> { static constexpr size_t value = 667; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::DeclarationSources> { static constexpr size_t value = 668; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::DeclarationSrcRange> { static constexpr size_t value = 669; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::DeclarationTargets> { static constexpr size_t value = 670; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::DeclarationToUSR> { static constexpr size_t value = 671; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::Declarations> { static constexpr size_t value = 672; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::DefToBaseDecl> { static constexpr size_t value = 673; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::MangledNameHashToDeclaration> { static constexpr size_t value = 674; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::Same> { static constexpr size_t value = 675; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::USRToDeclaration> { static constexpr size_t value = 676; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::FileXRefMap> { static constexpr size_t value = 677; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::SpellingXRef> { static constexpr size_t value = 678; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::TargetUses> { static constexpr size_t value = 679; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::ThriftToCxx> { static constexpr size_t value = 680; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::XRefIndirectTarget> { static constexpr size_t value = 681; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::XRefTargets> { static constexpr size_t value = 682; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Symbolid::Cxx::LookupNamespaceDeclaration> { static constexpr size_t value = 683; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::DeclToFamily> { static constexpr size_t value = 684; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::DeclInRecord> { static constexpr size_t value = 685; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::DeclInObjcContainer> { static constexpr size_t value = 686; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::DeclFamilyOf> { static constexpr size_t value = 687; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::DeclFamily> { static constexpr size_t value = 688; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::CxxToThrift> { static constexpr size_t value = 689; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::Attribute> { static constexpr size_t value = 690; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::RecordDefinition> { static constexpr size_t value = 691; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Csharp::UnityPackageToProject> { static constexpr size_t value = 692; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Csharp::UnityPackage> { static constexpr size_t value = 693; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Csharp::UnityProjectSource> { static constexpr size_t value = 694; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Csharp::TypeParameter> { static constexpr size_t value = 695; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Csharp::SourceFileToProject> { static constexpr size_t value = 696; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Csharp::SolutionToProject> { static constexpr size_t value = 697; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Csharp::Solution> { static constexpr size_t value = 698; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Csharp::ProjectToSourceFile> { static constexpr size_t value = 699; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Csharp::ProjectToSolution> { static constexpr size_t value = 700; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Csharp::Project> { static constexpr size_t value = 701; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Csharp::Namespace> { static constexpr size_t value = 702; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Csharp::NameLowerCase> { static constexpr size_t value = 703; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Csharp::Name> { static constexpr size_t value = 704; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Csharp::MSBuildProjectSource> { static constexpr size_t value = 705; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Csharp::MemberAccessLocation> { static constexpr size_t value = 706; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Csharp::MethodInvocationLocation> { static constexpr size_t value = 707; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Csharp::Implements> { static constexpr size_t value = 708; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Csharp::FunctionPointerType> { static constexpr size_t value = 709; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Csharp::FullName> { static constexpr size_t value = 710; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Csharp::Class> { static constexpr size_t value = 711; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Csharp::Interface> { static constexpr size_t value = 712; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Csharp::Record> { static constexpr size_t value = 713; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Csharp::Struct> { static constexpr size_t value = 714; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Csharp::ArrayType> { static constexpr size_t value = 715; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Csharp::DefinitionLocation> { static constexpr size_t value = 716; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Csharp::DefinitionLocationName> { static constexpr size_t value = 717; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Csharp::FileDefinitions> { static constexpr size_t value = 718; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Csharp::FileEntityXRefs> { static constexpr size_t value = 719; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Csharp::SearchByName> { static constexpr size_t value = 720; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Csharp::Field> { static constexpr size_t value = 721; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Csharp::Local> { static constexpr size_t value = 722; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Csharp::Method> { static constexpr size_t value = 723; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Csharp::ObjectCreationLocation> { static constexpr size_t value = 724; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Csharp::Parameter> { static constexpr size_t value = 725; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Csharp::PointerType> { static constexpr size_t value = 726; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Csharp::Property> { static constexpr size_t value = 727; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Csharp::TypeLocation> { static constexpr size_t value = 728; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Yaml::YamlDataAvailable> { static constexpr size_t value = 729; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::CxxNameLowerCase> { static constexpr size_t value = 730; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::FlowNameLowerCase> { static constexpr size_t value = 731; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::HackNameLowerCase> { static constexpr size_t value = 732; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::PythonNameLowerCase> { static constexpr size_t value = 733; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Types::RangeSpanContains> { static constexpr size_t value = 734; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Scip::LsifKindToKind> { static constexpr size_t value = 735; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Scip::FileXLangSymbolRefs> { static constexpr size_t value = 736; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Python::NonImportPythonDeclarationKind> { static constexpr size_t value = 737; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Python::NonImportPythonDeclarationInfo> { static constexpr size_t value = 738; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Python::ConvertLabel> { static constexpr size_t value = 739; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Pp::PpIncludeXRefLocations> { static constexpr size_t value = 740; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Lsif::LsifKindToKind> { static constexpr size_t value = 741; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Hack::HackInheritedEntities> { static constexpr size_t value = 742; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Hack::HackEnumInheritedMembers> { static constexpr size_t value = 743; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Hack::FromHackVisibility> { static constexpr size_t value = 744; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Flow::FlowDocumentationSpan> { static constexpr size_t value = 745; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Flow::FlowDeclarationDocumentation> { static constexpr size_t value = 746; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::FromCxxVisibility> { static constexpr size_t value = 747; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxFileEntityXMapVariableXRefDeclLocations> { static constexpr size_t value = 748; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxDeclarationModifiers> { static constexpr size_t value = 749; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxDeclVisibility> { static constexpr size_t value = 750; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxDeclKind> { static constexpr size_t value = 751; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxDeclInfo> { static constexpr size_t value = 752; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxDataAvailable> { static constexpr size_t value = 753; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::IndexedFile> { static constexpr size_t value = 754; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::EntityDataAvailable> { static constexpr size_t value = 755; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Scip::EntityInfo> { static constexpr size_t value = 756; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Scip::ScipEntityDocumentation> { static constexpr size_t value = 757; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Scip::ScipEntityLocation> { static constexpr size_t value = 758; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Scip::ScipEntityUses> { static constexpr size_t value = 759; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Scip::ScipFileEntityXRefLocations> { static constexpr size_t value = 760; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Scip::ScipResolveLocation> { static constexpr size_t value = 761; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Python::PythonContainsChildEntity> { static constexpr size_t value = 762; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Python::PythonContainsParentEntity> { static constexpr size_t value = 763; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Python::PythonEntityComments> { static constexpr size_t value = 764; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Python::PythonEntityInfo> { static constexpr size_t value = 765; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Python::PythonEntityKind> { static constexpr size_t value = 766; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Python::PythonEntityLocation> { static constexpr size_t value = 767; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Python::PythonEntityModuleName> { static constexpr size_t value = 768; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Python::PythonEntityUses> { static constexpr size_t value = 769; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Python::PythonExtendsChildEntity> { static constexpr size_t value = 770; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Python::PythonExtendsParentEntity> { static constexpr size_t value = 771; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Python::PythonFileEntityXRefLocations> { static constexpr size_t value = 772; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Python::PythonModifiers> { static constexpr size_t value = 773; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Python::PythonResolveLocation> { static constexpr size_t value = 774; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Python::PythonVisibility> { static constexpr size_t value = 775; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Python::PythonAnnotation> { static constexpr size_t value = 776; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Pp::PPEntityLocation> { static constexpr size_t value = 777; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Pp::PpEntityInfo> { static constexpr size_t value = 778; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Pp::PpEntityKind> { static constexpr size_t value = 779; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Pp::PpEntityTraceXRefLocations> { static constexpr size_t value = 780; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Pp::PpEntityUses> { static constexpr size_t value = 781; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Pp::PpFileEntityXRefLocations> { static constexpr size_t value = 782; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Pp::PpResolveLocation> { static constexpr size_t value = 783; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Pp::PpResolveTraceLocation> { static constexpr size_t value = 784; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Lsif::EntityInfo> { static constexpr size_t value = 785; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Lsif::LsifEntityLocation> { static constexpr size_t value = 786; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Lsif::LsifEntityModuleName> { static constexpr size_t value = 787; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Lsif::LsifEntityUses> { static constexpr size_t value = 788; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Lsif::LsifFileEntityXRefLocations> { static constexpr size_t value = 789; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Lsif::LsifResolveLocation> { static constexpr size_t value = 790; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Kotlin::KotlinContainsChildEntity> { static constexpr size_t value = 791; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Kotlin::KotlinContainsParentEntity> { static constexpr size_t value = 792; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Kotlin::KotlinEntityKind> { static constexpr size_t value = 793; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Kotlin::KotlinEntityLocation> { static constexpr size_t value = 794; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Kotlin::KotlinEntityUses> { static constexpr size_t value = 795; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Kotlin::KotlinExtendsParentEntity> { static constexpr size_t value = 796; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Kotlin::KotlinFileEntityXRefLocations> { static constexpr size_t value = 797; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Kotlin::KotlinResolveLocation> { static constexpr size_t value = 798; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Java::JavaContainsChildEntity> { static constexpr size_t value = 799; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Java::JavaContainsParentEntity> { static constexpr size_t value = 800; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Java::JavaEntityDocumentation> { static constexpr size_t value = 801; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Java::JavaEntityKind> { static constexpr size_t value = 802; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Java::JavaEntityLocation> { static constexpr size_t value = 803; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Java::JavaEntityUses> { static constexpr size_t value = 804; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Java::JavaExtendsChildEntity> { static constexpr size_t value = 805; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Java::JavaExtendsParentEntity> { static constexpr size_t value = 806; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Java::JavaModifiers> { static constexpr size_t value = 807; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Java::JavaResolveLocation> { static constexpr size_t value = 808; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Java::JavaVisibility> { static constexpr size_t value = 809; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Java::JavalFileEntityXRefLocations> { static constexpr size_t value = 810; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Java::JavaAnnotation> { static constexpr size_t value = 811; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Haskell::HaskellContainsChildEntity> { static constexpr size_t value = 812; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Haskell::HaskellContainsParentEntity> { static constexpr size_t value = 813; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Haskell::HaskellEntityLocation> { static constexpr size_t value = 814; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Haskell::HaskellEntityUses> { static constexpr size_t value = 815; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Haskell::HaskellFileEntityXRefLocations> { static constexpr size_t value = 816; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Haskell::HaskellResolveLocation> { static constexpr size_t value = 817; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Hs::SearchByLowerCaseName> { static constexpr size_t value = 818; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Hs::SearchByName> { static constexpr size_t value = 819; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Hack::EntityHasHideFromDocsAttr> { static constexpr size_t value = 820; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Hack::HackContainsChildEntity> { static constexpr size_t value = 821; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Hack::HackContainsParentEntity> { static constexpr size_t value = 822; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Hack::HackEntityDocumentation> { static constexpr size_t value = 823; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Hack::HackEntityInfo> { static constexpr size_t value = 824; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Hack::HackEntityKind> { static constexpr size_t value = 825; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Hack::HackEntityLocation> { static constexpr size_t value = 826; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Hack::HackEntityModuleName> { static constexpr size_t value = 827; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Hack::HackEntitySource> { static constexpr size_t value = 828; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Hack::HackEntityUses> { static constexpr size_t value = 829; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Hack::HackExtendsChildEntity> { static constexpr size_t value = 830; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Hack::HackExtendsParentEntity> { static constexpr size_t value = 831; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Hack::HackExtendsParentEntityConcise> { static constexpr size_t value = 832; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Hack::HackFileEntityXRefLocations> { static constexpr size_t value = 833; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Hack::HackFileEntityXRefSpans> { static constexpr size_t value = 834; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Hack::HackModifiers> { static constexpr size_t value = 835; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Hack::HackRequiredConstraint> { static constexpr size_t value = 836; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Hack::HackResolveLocation> { static constexpr size_t value = 837; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Hack::HackVisibility> { static constexpr size_t value = 838; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Hack::HackAnnotation> { static constexpr size_t value = 839; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Graphql::GraphQLEntityKind> { static constexpr size_t value = 840; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Graphql::GraphQLEntityLocation> { static constexpr size_t value = 841; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Graphql::GraphQLEntityUses> { static constexpr size_t value = 842; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Graphql::GraphQLFileEntityXRefLocations> { static constexpr size_t value = 843; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Graphql::GraphQLResolveLocation> { static constexpr size_t value = 844; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Flow::FlowContainsChildEntity> { static constexpr size_t value = 845; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Flow::FlowContainsParentEntity> { static constexpr size_t value = 846; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Flow::FlowEntityDocumentation> { static constexpr size_t value = 847; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Flow::FlowEntityKind> { static constexpr size_t value = 848; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Flow::FlowEntityLocation> { static constexpr size_t value = 849; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Flow::FlowEntityModuleName> { static constexpr size_t value = 850; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Flow::FlowEntityUses> { static constexpr size_t value = 851; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Flow::FlowFileEntityXRefLocations> { static constexpr size_t value = 852; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Flow::FlowFileImportDeclEntityXRefLocations> { static constexpr size_t value = 853; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Flow::FlowFileReferenceEntityXRefLocations> { static constexpr size_t value = 854; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Flow::FlowResolveLocation> { static constexpr size_t value = 855; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Fbthrift::FbthriftEntityDocumentation> { static constexpr size_t value = 856; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Fbthrift::FbthriftEntityUses> { static constexpr size_t value = 857; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Fbthrift::ThriftContainsChildEntity> { static constexpr size_t value = 858; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Fbthrift::ThriftContainsParentEntity> { static constexpr size_t value = 859; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Fbthrift::ThriftEntityKind> { static constexpr size_t value = 860; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Fbthrift::ThriftEntityLocation> { static constexpr size_t value = 861; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Fbthrift::ThriftExtendsChildEntity> { static constexpr size_t value = 862; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Fbthrift::ThriftExtendsParentEntity> { static constexpr size_t value = 863; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Fbthrift::ThriftFileEntityXRefLocations> { static constexpr size_t value = 864; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Fbthrift::ThriftResolveLocation> { static constexpr size_t value = 865; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Erlang::ErlangEntityDocumentation> { static constexpr size_t value = 866; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Erlang::ErlangEntityInfo> { static constexpr size_t value = 867; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Erlang::ErlangEntityKind> { static constexpr size_t value = 868; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Erlang::ErlangEntityLocation> { static constexpr size_t value = 869; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Erlang::ErlangEntityUses> { static constexpr size_t value = 870; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Erlang::ErlangFileEntityXRefLocations> { static constexpr size_t value = 871; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Erlang::ErlangResolveLocation> { static constexpr size_t value = 872; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Erlang::SearchByFQN> { static constexpr size_t value = 873; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Erlang::SearchByName> { static constexpr size_t value = 874; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Dataswarm::DataswarmFileEntityXRefLocations> { static constexpr size_t value = 875; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxContainsChildEntity> { static constexpr size_t value = 876; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxContainsParentEntity> { static constexpr size_t value = 877; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxDeclToDefXRefTargetLocation> { static constexpr size_t value = 878; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxDeclarationContainsChild> { static constexpr size_t value = 879; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxDeclarationContainsParent> { static constexpr size_t value = 880; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxDeclarationExtendsChild> { static constexpr size_t value = 881; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxDeclarationExtendsParent> { static constexpr size_t value = 882; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxDeclarationSource> { static constexpr size_t value = 883; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxDefToDeclFamilyXRefTargetLocation> { static constexpr size_t value = 884; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxEntityDocumentation> { static constexpr size_t value = 885; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxEntityInfo> { static constexpr size_t value = 886; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxEntityKind> { static constexpr size_t value = 887; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxEntityLocation> { static constexpr size_t value = 888; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxEntityMangledNameHash> { static constexpr size_t value = 889; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxEntitySource> { static constexpr size_t value = 890; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxEntityUSR> { static constexpr size_t value = 891; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxEntityUses> { static constexpr size_t value = 892; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxExtendsChildEntity> { static constexpr size_t value = 893; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxExtendsParentEntity> { static constexpr size_t value = 894; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxFileEntitySpellingXRefLocations> { static constexpr size_t value = 895; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxFileEntityTraceDeclToDefXRefLocations> { static constexpr size_t value = 896; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxFileEntityXMapFixedXRefLocations> { static constexpr size_t value = 897; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxFileEntityXMapVariableXRefDeclToDefs> { static constexpr size_t value = 898; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxFileEntityXRefLocations> { static constexpr size_t value = 899; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxFindDefinitionOfEntity> { static constexpr size_t value = 900; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxModifiers> { static constexpr size_t value = 901; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxNamespaceDeclarationContainsChild> { static constexpr size_t value = 902; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxResolveDeclarationToEntity> { static constexpr size_t value = 903; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxResolveLocation> { static constexpr size_t value = 904; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxResolveTraceLocation> { static constexpr size_t value = 905; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxVisibility> { static constexpr size_t value = 906; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxXRefTargetLocation> { static constexpr size_t value = 907; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::EntityToXRefTarget> { static constexpr size_t value = 908; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::SymbolToEntity> { static constexpr size_t value = 909; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::XRefTargetToEntity> { static constexpr size_t value = 910; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::CxxPreferDefinitions> { static constexpr size_t value = 911; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Kind::Cxx::SearchObjcInterface> { static constexpr size_t value = 912; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Symbolid::Cxx::DefinitionOfDecl> { static constexpr size_t value = 913; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Symbolid::Cxx::LookupNamespaceDefinition> { static constexpr size_t value = 914; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxDefinitionContainsChild> { static constexpr size_t value = 915; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxDefinitionContainsParent> { static constexpr size_t value = 916; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxDefinitionExtendsChild> { static constexpr size_t value = 917; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxDefinitionExtendsParent> { static constexpr size_t value = 918; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxDefinitionModifiers> { static constexpr size_t value = 919; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxDefnVisibility> { static constexpr size_t value = 920; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxEntityDefinitionBase> { static constexpr size_t value = 921; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Cxx::DeclIsDefn> { static constexpr size_t value = 922; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Code::Cxx::DeclToDef> { static constexpr size_t value = 923; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxAnnotation> { static constexpr size_t value = 924; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Csharp::CSharpEntityKind> { static constexpr size_t value = 925; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Csharp::CSharpEntityLocation> { static constexpr size_t value = 926; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Csharp::CSharpEntityUses> { static constexpr size_t value = 927; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Csharp::CSharpFileEntityXRefLocations> { static constexpr size_t value = 928; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Csharp::CSharpResolveLocation> { static constexpr size_t value = 929; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Buck::BuckEntityKind> { static constexpr size_t value = 930; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Buck::BuckEntityLocation> { static constexpr size_t value = 931; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Buck::BuckEntityUses> { static constexpr size_t value = 932; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Buck::BuckFileEntityXRefLocations> { static constexpr size_t value = 933; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Buck::BuckResolveLocation> { static constexpr size_t value = 934; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Buck::SearchByFQN> { static constexpr size_t value = 935; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Buck::SearchDefinition> { static constexpr size_t value = 936; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Buck::SearchFile> { static constexpr size_t value = 937; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Code::EntityLanguageSCIP> { static constexpr size_t value = 938; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Code::EntityLanguageLSIF> { static constexpr size_t value = 939; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::FunctionName> { static constexpr size_t value = 940; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::RecordDeclaration> { static constexpr size_t value = 941; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::DeclarationScope> { static constexpr size_t value = 942; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::EnumDeclarationByName> { static constexpr size_t value = 943; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::FunctionDeclarationByNameScope> { static constexpr size_t value = 944; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::FunctionQName> { static constexpr size_t value = 945; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::QName> { static constexpr size_t value = 946; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::RecordDeclarationClass> { static constexpr size_t value = 947; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::RecordDeclarationStruct> { static constexpr size_t value = 948; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::RecordDeclarationUnion> { static constexpr size_t value = 949; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::TypeAliasDeclarationByName> { static constexpr size_t value = 950; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Cxx1::VariableDeclarationNonLocalByName> { static constexpr size_t value = 951; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Cxx::QueryToScopeCase> { static constexpr size_t value = 952; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Kind::Cxx::SearchClass> { static constexpr size_t value = 953; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Kind::Cxx::SearchEnum> { static constexpr size_t value = 954; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Kind::Cxx::SearchEnumerator> { static constexpr size_t value = 955; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Kind::Cxx::SearchFunction> { static constexpr size_t value = 956; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Kind::Cxx::SearchNamespace> { static constexpr size_t value = 957; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Kind::Cxx::SearchStruct> { static constexpr size_t value = 958; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Kind::Cxx::SearchTypeAlias> { static constexpr size_t value = 959; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Kind::Cxx::SearchUnion> { static constexpr size_t value = 960; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Kind::Cxx::SearchVariable> { static constexpr size_t value = 961; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Symbolid::Cxx::LookupDeclaration> { static constexpr size_t value = 962; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Symbolid::Cxx::LookupDefinition> { static constexpr size_t value = 963; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Symbolid::Cxx::LookupEnumerator> { static constexpr size_t value = 964; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Symbolid::Cxx::LookupFunctionDeclaration> { static constexpr size_t value = 965; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Symbolid::Cxx::LookupFunctionDefinition> { static constexpr size_t value = 966; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Symbolid::Cxx::LookupFunctionSignatureDeclaration> { static constexpr size_t value = 967; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Symbolid::Cxx::LookupFunctionSignatureDefinition> { static constexpr size_t value = 968; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Symbolid::Cxx::LookupFunctionSignatureQualifierDeclaration> { static constexpr size_t value = 969; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Symbolid::Cxx::LookupFunctionSignatureQualifierDefinition> { static constexpr size_t value = 970; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Fbthrift::FunctionSpecification> { static constexpr size_t value = 971; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::Type> { static constexpr size_t value = 972; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::TranslationUnit> { static constexpr size_t value = 973; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::TargetUses> { static constexpr size_t value = 974; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::TargetSourcesBaseModule> { static constexpr size_t value = 975; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::TargetSources> { static constexpr size_t value = 976; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::TargetOuts> { static constexpr size_t value = 977; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::TargetOut> { static constexpr size_t value = 978; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::TargetMode> { static constexpr size_t value = 979; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::TargetLocation> { static constexpr size_t value = 980; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::TargetLinkWhole> { static constexpr size_t value = 981; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::TargetIndexerName> { static constexpr size_t value = 982; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::TargetIndexer> { static constexpr size_t value = 983; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::TargetHash> { static constexpr size_t value = 984; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::TargetCallByCallExpr> { static constexpr size_t value = 985; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::TargetCall> { static constexpr size_t value = 986; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::TargetByType> { static constexpr size_t value = 987; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::TargetAttribute> { static constexpr size_t value = 988; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::Target> { static constexpr size_t value = 989; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::SourceFileLocation> { static constexpr size_t value = 990; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::SearchByLocalName> { static constexpr size_t value = 991; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::RuleKey> { static constexpr size_t value = 992; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::Platform> { static constexpr size_t value = 993; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::Owner> { static constexpr size_t value = 994; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::OutsTarget> { static constexpr size_t value = 995; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::OutputLabel> { static constexpr size_t value = 996; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::OutTarget> { static constexpr size_t value = 997; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::LocatorWithLabel> { static constexpr size_t value = 998; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::LocatorReverseDeps> { static constexpr size_t value = 999; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::LocatorReverseDep> { static constexpr size_t value = 1000; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::Locator> { static constexpr size_t value = 1001; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::LocalNameLowerCase> { static constexpr size_t value = 1002; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::LocalName> { static constexpr size_t value = 1003; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::Labels> { static constexpr size_t value = 1004; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::Label> { static constexpr size_t value = 1005; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::IndexerName> { static constexpr size_t value = 1006; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::FileXRefs> { static constexpr size_t value = 1007; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::FileToTarget> { static constexpr size_t value = 1008; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::FileTarget> { static constexpr size_t value = 1009; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::FileResolved> { static constexpr size_t value = 1010; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::FileEntity> { static constexpr size_t value = 1011; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::FileDefinition> { static constexpr size_t value = 1012; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::File> { static constexpr size_t value = 1013; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::FailureSources> { static constexpr size_t value = 1014; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::IndexFailureX> { static constexpr size_t value = 1015; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::DestinationUses> { static constexpr size_t value = 1016; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::TargetDependencies> { static constexpr size_t value = 1017; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::DefinitionLocation> { static constexpr size_t value = 1018; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::Definition> { static constexpr size_t value = 1019; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::Consumer> { static constexpr size_t value = 1020; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::CallExpr> { static constexpr size_t value = 1021; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::CallArgument> { static constexpr size_t value = 1022; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::AttributeName> { static constexpr size_t value = 1023; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::AttributeValue> { static constexpr size_t value = 1024; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Buck::ArgumentValue> { static constexpr size_t value = 1025; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Anglelang::TypeDecl> { static constexpr size_t value = 1026; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Anglelang::Name> { static constexpr size_t value = 1027; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Anglelang::Type> { static constexpr size_t value = 1028; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Anglelang::EvolveDecl> { static constexpr size_t value = 1029; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Anglelang::DerivingDecl> { static constexpr size_t value = 1030; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Anglelang::PredicateDecl> { static constexpr size_t value = 1031; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Anglelang::DeclarationLocation> { static constexpr size_t value = 1032; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Anglelang::DeclarationToName> { static constexpr size_t value = 1033; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Anglelang::SchemaDecl> { static constexpr size_t value = 1034; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Anglelang::TargetUses> { static constexpr size_t value = 1035; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Anglelang::FileXRefs> { static constexpr size_t value = 1036; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Hack::ConvertCallArguments> { static constexpr size_t value = 1037; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Hack::ConvertMaybeCallArguments> { static constexpr size_t value = 1038; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Python::ConvertCallArguments> { static constexpr size_t value = 1039; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Python::PythonFileCall> { static constexpr size_t value = 1040; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Hack::ConvertArgument> { static constexpr size_t value = 1041; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Python::ConvertArgument> { static constexpr size_t value = 1042; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Code::EntityLanguage> { static constexpr size_t value = 1043; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxEntityIdl> { static constexpr size_t value = 1044; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Hack::HackEntityIdl> { static constexpr size_t value = 1045; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Yaml::YamlFileEntityXLangXRefLocations> { static constexpr size_t value = 1046; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::ContainsChildEntity> { static constexpr size_t value = 1047; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::ContainsParentEntity> { static constexpr size_t value = 1048; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::EntityComments> { static constexpr size_t value = 1049; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::EntityInfo> { static constexpr size_t value = 1050; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::EntityIsDefinition> { static constexpr size_t value = 1051; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::EntityKind> { static constexpr size_t value = 1052; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::EntityLocation> { static constexpr size_t value = 1053; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::EntityModifiers> { static constexpr size_t value = 1054; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::EntityModuleName> { static constexpr size_t value = 1055; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::EntityReferences> { static constexpr size_t value = 1056; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::EntitySource> { static constexpr size_t value = 1057; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::EntityToAnnotations> { static constexpr size_t value = 1058; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::EntityUses> { static constexpr size_t value = 1059; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::EntityVisibility> { static constexpr size_t value = 1060; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::ExtendsChildEntity> { static constexpr size_t value = 1061; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::ExtendsParentEntity> { static constexpr size_t value = 1062; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::ExtendsParentEntityConcise> { static constexpr size_t value = 1063; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::FileCall> { static constexpr size_t value = 1064; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::FileEntityDigest> { static constexpr size_t value = 1065; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::FileEntityInfos> { static constexpr size_t value = 1066; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::FileEntityKinds> { static constexpr size_t value = 1067; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::FileEntityLocations> { static constexpr size_t value = 1068; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::FileEntityXRefInfos> { static constexpr size_t value = 1069; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::FileEntityXRefKinds> { static constexpr size_t value = 1070; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::FileEntityXRefLocations> { static constexpr size_t value = 1071; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::FileEntityXRefRangeSpans> { static constexpr size_t value = 1072; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::FindEntityDefinition> { static constexpr size_t value = 1073; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::GeneratedEntityToIdlEntity> { static constexpr size_t value = 1074; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::FileXRefsGenericEntities> { static constexpr size_t value = 1075; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::SearchRelatedEntities> { static constexpr size_t value = 1076; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::ReferencingEntity> { static constexpr size_t value = 1077; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::ResolveLocation> { static constexpr size_t value = 1078; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::SearchInheritedEntities> { static constexpr size_t value = 1079; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::SymbolToEntity> { static constexpr size_t value = 1080; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxFileEntityIdl> { static constexpr size_t value = 1081; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Cxx::CxxIdlEntityUses> { static constexpr size_t value = 1082; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Hack::ConvertCallee> { static constexpr size_t value = 1083; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Hack::ConvertCalleeForFileCall> { static constexpr size_t value = 1084; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Hack::ConvertStaticType> { static constexpr size_t value = 1085; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Hack::HackFileCall> { static constexpr size_t value = 1086; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Hack::HackIdlEntityUses> { static constexpr size_t value = 1087; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Search::EntityLocationAndKind> { static constexpr size_t value = 1088; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Search::SearchByName> { static constexpr size_t value = 1089; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Search::SearchByScope> { static constexpr size_t value = 1090; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Dyn::EntityUsage> { static constexpr size_t value = 1091; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::AngleSearchByLowerCaseName> { static constexpr size_t value = 1092; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::AngleSearchByName> { static constexpr size_t value = 1093; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::BuckSearchByLocalNameFact> { static constexpr size_t value = 1094; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::BuckSearchByLowerCaseName> { static constexpr size_t value = 1095; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::BuckSearchByName> { static constexpr size_t value = 1096; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::CSharpSearchByLowerCaseName> { static constexpr size_t value = 1097; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::CSharpSearchByName> { static constexpr size_t value = 1098; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::CxxSearchByLowerCaseNameKindAndScopeFact> { static constexpr size_t value = 1099; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::CxxSearchByLowerCaseScopeAndKind> { static constexpr size_t value = 1100; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::CxxSearchByNameKindAndScopeFact> { static constexpr size_t value = 1101; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::CxxSearchByScopeAndKind> { static constexpr size_t value = 1102; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::ErlangSearchByLowerCaseName> { static constexpr size_t value = 1103; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::ErlangSearchByName> { static constexpr size_t value = 1104; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::FbthriftSearchByNameFact> { static constexpr size_t value = 1105; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::FlowSearchByLowerCaseNameKindAndScopeFact> { static constexpr size_t value = 1106; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::FlowSearchByLowerCaseScopeAndKind> { static constexpr size_t value = 1107; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::FlowSearchByNameKindAndScopeFact> { static constexpr size_t value = 1108; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::FlowSearchByScopeAndKind> { static constexpr size_t value = 1109; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::GraphQLSearchByLowerCaseName> { static constexpr size_t value = 1110; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::GraphQLSearchByName> { static constexpr size_t value = 1111; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::HackSearchByLowerCaseNameAndKind> { static constexpr size_t value = 1112; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::HackSearchByLowerCaseScopeAndKind> { static constexpr size_t value = 1113; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::HackSearchByNameAndKind> { static constexpr size_t value = 1114; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::HackSearchByNameKindWithNamespace> { static constexpr size_t value = 1115; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::HackSearchByNameKindWithQName> { static constexpr size_t value = 1116; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::HackSearchByScopeAndKind> { static constexpr size_t value = 1117; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::HackSearchByScopeWithNameKinds> { static constexpr size_t value = 1118; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::HsSearchByLowerCaseName> { static constexpr size_t value = 1119; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::HsSearchByName> { static constexpr size_t value = 1120; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::JavaSearchByLowerCaseName> { static constexpr size_t value = 1121; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::JavaSearchByLowerCaseScope> { static constexpr size_t value = 1122; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::JavaSearchByName> { static constexpr size_t value = 1123; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::JavaSearchByNameWithFact> { static constexpr size_t value = 1124; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::JavaSearchByScope> { static constexpr size_t value = 1125; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::JavaSearchByScopeWithName> { static constexpr size_t value = 1126; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::KotlinSearchByLowerCaseName> { static constexpr size_t value = 1127; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::KotlinSearchByLowerCaseScope> { static constexpr size_t value = 1128; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::KotlinSearchByName> { static constexpr size_t value = 1129; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::KotlinSearchByNameWithFact> { static constexpr size_t value = 1130; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::KotlinSearchByScope> { static constexpr size_t value = 1131; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::KotlinSearchByScopeWithName> { static constexpr size_t value = 1132; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::LsifSearchByLowerCaseName> { static constexpr size_t value = 1133; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::LsifSearchByName> { static constexpr size_t value = 1134; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::PpSearchByLowerCaseNameKind> { static constexpr size_t value = 1135; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::PpSearchByNameKind> { static constexpr size_t value = 1136; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::PythonSearchByLowerCaseNameKindAndScopeFact> { static constexpr size_t value = 1137; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::PythonSearchByLowerCaseScopeAndKind> { static constexpr size_t value = 1138; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::PythonSearchByNameKindAndScopeFact> { static constexpr size_t value = 1139; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::PythonSearchByScopeAndKind> { static constexpr size_t value = 1140; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::RustSearchByNameAndKind> { static constexpr size_t value = 1141; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::SearchByLowerCaseNameAndLanguage> { static constexpr size_t value = 1142; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::SearchByLowerCaseNameKindAndLanguage> { static constexpr size_t value = 1143; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::SearchByLowerCaseScope> { static constexpr size_t value = 1144; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::SearchByLowerCaseScopeAndKind> { static constexpr size_t value = 1145; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::SearchByNameAndLanguage> { static constexpr size_t value = 1146; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::SearchByNameKindAndLanguage> { static constexpr size_t value = 1147; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::SearchByScope> { static constexpr size_t value = 1148; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::SearchByScopeAndKind> { static constexpr size_t value = 1149; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::ThriftSearchByLowerCaseName> { static constexpr size_t value = 1150; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Code::ThriftSearchByName> { static constexpr size_t value = 1151; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Anglelang::AngleEntityLocation> { static constexpr size_t value = 1152; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Anglelang::AngleEntityUses> { static constexpr size_t value = 1153; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Anglelang::AngleFileEntityXRefLocations> { static constexpr size_t value = 1154; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Codemarkup::Anglelang::AngleResolveLocation> { static constexpr size_t value = 1155; };
+template<> struct SCHEMA::index<facebook::glean::cpp::schema::Search::Anglelang::SearchByName> { static constexpr size_t value = 1156; };
+
+template<> struct SCHEMA::predicate<0> { using type = facebook::glean::cpp::schema::Sys::Blob; };
+template<> struct SCHEMA::predicate<1> { using type = facebook::glean::cpp::schema::Src::RangeContains; };
+template<> struct SCHEMA::predicate<2> { using type = facebook::glean::cpp::schema::Src::IndexFailure; };
+template<> struct SCHEMA::predicate<3> { using type = facebook::glean::cpp::schema::Src::FileLines; };
+template<> struct SCHEMA::predicate<4> { using type = facebook::glean::cpp::schema::Src::FileLanguage; };
+template<> struct SCHEMA::predicate<5> { using type = facebook::glean::cpp::schema::Src::FileDigest; };
+template<> struct SCHEMA::predicate<6> { using type = facebook::glean::cpp::schema::Src::File; };
+template<> struct SCHEMA::predicate<7> { using type = facebook::glean::cpp::schema::Src::ByteSpanContains; };
+template<> struct SCHEMA::predicate<8> { using type = facebook::glean::cpp::schema::Search::Python::QueryToScopeCase; };
+template<> struct SCHEMA::predicate<9> { using type = facebook::glean::cpp::schema::Search::Python::PythonNameCase; };
+template<> struct SCHEMA::predicate<10> { using type = facebook::glean::cpp::schema::Search::Pp::SearchByName; };
+template<> struct SCHEMA::predicate<11> { using type = facebook::glean::cpp::schema::Search::Java::QueryToScopeCase; };
+template<> struct SCHEMA::predicate<12> { using type = facebook::glean::cpp::schema::Search::Java::NameCase; };
+template<> struct SCHEMA::predicate<13> { using type = facebook::glean::cpp::schema::Search::Hack::QueryToScopeCase; };
+template<> struct SCHEMA::predicate<14> { using type = facebook::glean::cpp::schema::Search::Hack::HackNameCase; };
+template<> struct SCHEMA::predicate<15> { using type = facebook::glean::cpp::schema::Search::Hack::HackInAutoImportedNamespace; };
+template<> struct SCHEMA::predicate<16> { using type = facebook::glean::cpp::schema::Search::Flow::TypeDeclarationAsDeclaration; };
+template<> struct SCHEMA::predicate<17> { using type = facebook::glean::cpp::schema::Search::Flow::QueryToScopeCase; };
+template<> struct SCHEMA::predicate<18> { using type = facebook::glean::cpp::schema::Search::Flow::FlowModuleNameCase; };
+template<> struct SCHEMA::predicate<19> { using type = facebook::glean::cpp::schema::Search::Cxx::QueryToQNameCase; };
+template<> struct SCHEMA::predicate<20> { using type = facebook::glean::cpp::schema::Search::Cxx::QueryToNSQNameCase; };
+template<> struct SCHEMA::predicate<21> { using type = facebook::glean::cpp::schema::Search::Cxx::CxxRecordCase; };
+template<> struct SCHEMA::predicate<22> { using type = facebook::glean::cpp::schema::Search::Cxx::CxxNamespaceCase; };
+template<> struct SCHEMA::predicate<23> { using type = facebook::glean::cpp::schema::Search::Anglelang::NameLowerCase; };
+template<> struct SCHEMA::predicate<24> { using type = facebook::glean::cpp::schema::Scip::SymbolName; };
+template<> struct SCHEMA::predicate<25> { using type = facebook::glean::cpp::schema::Scip::SymbolDocumentation; };
+template<> struct SCHEMA::predicate<26> { using type = facebook::glean::cpp::schema::Scip::SymbolDisplayName; };
+template<> struct SCHEMA::predicate<27> { using type = facebook::glean::cpp::schema::Scip::Symbol; };
+template<> struct SCHEMA::predicate<28> { using type = facebook::glean::cpp::schema::Scip::ReferenceTarget; };
+template<> struct SCHEMA::predicate<29> { using type = facebook::glean::cpp::schema::Scip::Reference; };
+template<> struct SCHEMA::predicate<30> { using type = facebook::glean::cpp::schema::Scip::LocalName; };
+template<> struct SCHEMA::predicate<31> { using type = facebook::glean::cpp::schema::Scip::IsImplemented; };
+template<> struct SCHEMA::predicate<32> { using type = facebook::glean::cpp::schema::Scip::IsImplementation; };
+template<> struct SCHEMA::predicate<33> { using type = facebook::glean::cpp::schema::Scip::EntityDefinition; };
+template<> struct SCHEMA::predicate<34> { using type = facebook::glean::cpp::schema::Scip::EntityLocation; };
+template<> struct SCHEMA::predicate<35> { using type = facebook::glean::cpp::schema::Scip::EntityUses; };
+template<> struct SCHEMA::predicate<36> { using type = facebook::glean::cpp::schema::Scip::FileEntityXRefLocation; };
+template<> struct SCHEMA::predicate<37> { using type = facebook::glean::cpp::schema::Scip::ResolveLocation; };
+template<> struct SCHEMA::predicate<38> { using type = facebook::glean::cpp::schema::Scip::SearchBySymbol; };
+template<> struct SCHEMA::predicate<39> { using type = facebook::glean::cpp::schema::Scip::Documentation; };
+template<> struct SCHEMA::predicate<40> { using type = facebook::glean::cpp::schema::Scip::DisplayNameSymbol; };
+template<> struct SCHEMA::predicate<41> { using type = facebook::glean::cpp::schema::Scip::DisplayName; };
+template<> struct SCHEMA::predicate<42> { using type = facebook::glean::cpp::schema::Scip::DefinitionUses; };
+template<> struct SCHEMA::predicate<43> { using type = facebook::glean::cpp::schema::Scip::DefinitionName; };
+template<> struct SCHEMA::predicate<44> { using type = facebook::glean::cpp::schema::Scip::DefinitionDocumentation; };
+template<> struct SCHEMA::predicate<45> { using type = facebook::glean::cpp::schema::Scip::Definition; };
+template<> struct SCHEMA::predicate<46> { using type = facebook::glean::cpp::schema::Python::Branches::Root; };
+template<> struct SCHEMA::predicate<47> { using type = facebook::glean::cpp::schema::Python::Branches::FileToRoot; };
+template<> struct SCHEMA::predicate<48> { using type = facebook::glean::cpp::schema::Python::Branches::DirectXRefByFile; };
+template<> struct SCHEMA::predicate<49> { using type = facebook::glean::cpp::schema::Python::XRefsViaNameByTarget; };
+template<> struct SCHEMA::predicate<50> { using type = facebook::glean::cpp::schema::Python::XRefsViaName; };
+template<> struct SCHEMA::predicate<51> { using type = facebook::glean::cpp::schema::Python::XRefsViaNameByFile; };
+template<> struct SCHEMA::predicate<52> { using type = facebook::glean::cpp::schema::Python::VariableDeclaration; };
+template<> struct SCHEMA::predicate<53> { using type = facebook::glean::cpp::schema::Python::VariableBySName; };
+template<> struct SCHEMA::predicate<54> { using type = facebook::glean::cpp::schema::Python::Type; };
+template<> struct SCHEMA::predicate<55> { using type = facebook::glean::cpp::schema::Python::StringLiteral; };
+template<> struct SCHEMA::predicate<56> { using type = facebook::glean::cpp::schema::Python::SearchVariableByName; };
+template<> struct SCHEMA::predicate<57> { using type = facebook::glean::cpp::schema::Python::SearchVariableByLowerCaseName; };
+template<> struct SCHEMA::predicate<58> { using type = facebook::glean::cpp::schema::Python::SearchModuleByName; };
+template<> struct SCHEMA::predicate<59> { using type = facebook::glean::cpp::schema::Python::SearchModuleByLowerCaseName; };
+template<> struct SCHEMA::predicate<60> { using type = facebook::glean::cpp::schema::Python::SearchMethodByName; };
+template<> struct SCHEMA::predicate<61> { using type = facebook::glean::cpp::schema::Python::SearchMethodByLowerCaseName; };
+template<> struct SCHEMA::predicate<62> { using type = facebook::glean::cpp::schema::Python::SearchFunctionByName; };
+template<> struct SCHEMA::predicate<63> { using type = facebook::glean::cpp::schema::Python::SearchFunctionByLowerCaseName; };
+template<> struct SCHEMA::predicate<64> { using type = facebook::glean::cpp::schema::Python::SearchFieldByName; };
+template<> struct SCHEMA::predicate<65> { using type = facebook::glean::cpp::schema::Python::SearchFieldByLowerCaseName; };
+template<> struct SCHEMA::predicate<66> { using type = facebook::glean::cpp::schema::Python::SearchClassByName; };
+template<> struct SCHEMA::predicate<67> { using type = facebook::glean::cpp::schema::Python::SearchClassByLowerCaseName; };
+template<> struct SCHEMA::predicate<68> { using type = facebook::glean::cpp::schema::Python::SNameToName; };
+template<> struct SCHEMA::predicate<69> { using type = facebook::glean::cpp::schema::Python::SName; };
+template<> struct SCHEMA::predicate<70> { using type = facebook::glean::cpp::schema::Python::ResolveOriginalName; };
+template<> struct SCHEMA::predicate<71> { using type = facebook::glean::cpp::schema::Python::NameToSName; };
+template<> struct SCHEMA::predicate<72> { using type = facebook::glean::cpp::schema::Python::Name; };
+template<> struct SCHEMA::predicate<73> { using type = facebook::glean::cpp::schema::Python::ModuleDefinition; };
+template<> struct SCHEMA::predicate<74> { using type = facebook::glean::cpp::schema::Python::ModuleBySName; };
+template<> struct SCHEMA::predicate<75> { using type = facebook::glean::cpp::schema::Python::Module; };
+template<> struct SCHEMA::predicate<76> { using type = facebook::glean::cpp::schema::Python::MethodOverrides; };
+template<> struct SCHEMA::predicate<77> { using type = facebook::glean::cpp::schema::Python::MethodOverriden; };
+template<> struct SCHEMA::predicate<78> { using type = facebook::glean::cpp::schema::Python::MethodByLocalNameStr; };
+template<> struct SCHEMA::predicate<79> { using type = facebook::glean::cpp::schema::Python::ImportStatementByAsSName; };
+template<> struct SCHEMA::predicate<80> { using type = facebook::glean::cpp::schema::Python::ImportStatementByAsName; };
+template<> struct SCHEMA::predicate<81> { using type = facebook::glean::cpp::schema::Python::ImportStatement; };
+template<> struct SCHEMA::predicate<82> { using type = facebook::glean::cpp::schema::Python::ImportStarsByFile; };
+template<> struct SCHEMA::predicate<83> { using type = facebook::glean::cpp::schema::Python::ImportStarStatement; };
+template<> struct SCHEMA::predicate<84> { using type = facebook::glean::cpp::schema::Python::ImportStarLocation; };
+template<> struct SCHEMA::predicate<85> { using type = facebook::glean::cpp::schema::Python::FunctionDeclaration; };
+template<> struct SCHEMA::predicate<86> { using type = facebook::glean::cpp::schema::Python::FunctionBySName; };
+template<> struct SCHEMA::predicate<87> { using type = facebook::glean::cpp::schema::Python::DerivedClassToBase; };
+template<> struct SCHEMA::predicate<88> { using type = facebook::glean::cpp::schema::Python::DefinitionLocation; };
+template<> struct SCHEMA::predicate<89> { using type = facebook::glean::cpp::schema::Python::DefinitionsByFile; };
+template<> struct SCHEMA::predicate<90> { using type = facebook::glean::cpp::schema::Python::IsTopLevelDefinition; };
+template<> struct SCHEMA::predicate<91> { using type = facebook::glean::cpp::schema::Python::FunctionDefinition; };
+template<> struct SCHEMA::predicate<92> { using type = facebook::glean::cpp::schema::Python::VariableDefinition; };
+template<> struct SCHEMA::predicate<93> { using type = facebook::glean::cpp::schema::Python::DeclarationDefinition; };
+template<> struct SCHEMA::predicate<94> { using type = facebook::glean::cpp::schema::Python::DeclarationDocstring; };
+template<> struct SCHEMA::predicate<95> { using type = facebook::glean::cpp::schema::Python::DeclarationLocation; };
+template<> struct SCHEMA::predicate<96> { using type = facebook::glean::cpp::schema::Python::DeclarationReference; };
+template<> struct SCHEMA::predicate<97> { using type = facebook::glean::cpp::schema::Python::DeclarationToName; };
+template<> struct SCHEMA::predicate<98> { using type = facebook::glean::cpp::schema::Python::DeclarationUses; };
+template<> struct SCHEMA::predicate<99> { using type = facebook::glean::cpp::schema::Python::DeclarationWithLocalName; };
+template<> struct SCHEMA::predicate<100> { using type = facebook::glean::cpp::schema::Python::DeclarationWithName; };
+template<> struct SCHEMA::predicate<101> { using type = facebook::glean::cpp::schema::Python::DeclarationWithSName; };
+template<> struct SCHEMA::predicate<102> { using type = facebook::glean::cpp::schema::Python::DeclarationsByFile; };
+template<> struct SCHEMA::predicate<103> { using type = facebook::glean::cpp::schema::Python::DefinitionDeclaration; };
+template<> struct SCHEMA::predicate<104> { using type = facebook::glean::cpp::schema::Python::DirectXRefsByFile; };
+template<> struct SCHEMA::predicate<105> { using type = facebook::glean::cpp::schema::Python::IsAbstract; };
+template<> struct SCHEMA::predicate<106> { using type = facebook::glean::cpp::schema::Python::IsTopLevelDeclaration; };
+template<> struct SCHEMA::predicate<107> { using type = facebook::glean::cpp::schema::Python::NonImportDeclaration; };
+template<> struct SCHEMA::predicate<108> { using type = facebook::glean::cpp::schema::Python::SNameWithDeclaration; };
+template<> struct SCHEMA::predicate<109> { using type = facebook::glean::cpp::schema::Yaml::XRefsByFile; };
+template<> struct SCHEMA::predicate<110> { using type = facebook::glean::cpp::schema::Python::Contains; };
+template<> struct SCHEMA::predicate<111> { using type = facebook::glean::cpp::schema::Python::ContainingTopLevelDeclaration; };
+template<> struct SCHEMA::predicate<112> { using type = facebook::glean::cpp::schema::Python::ContainedByTopLevelDeclaration; };
+template<> struct SCHEMA::predicate<113> { using type = facebook::glean::cpp::schema::Python::ContainedBy; };
+template<> struct SCHEMA::predicate<114> { using type = facebook::glean::cpp::schema::Python::ClassDefinition; };
+template<> struct SCHEMA::predicate<115> { using type = facebook::glean::cpp::schema::Python::ClassDeclaration; };
+template<> struct SCHEMA::predicate<116> { using type = facebook::glean::cpp::schema::Python::ClassBySName; };
+template<> struct SCHEMA::predicate<117> { using type = facebook::glean::cpp::schema::Python::CalleeToCaller; };
+template<> struct SCHEMA::predicate<118> { using type = facebook::glean::cpp::schema::Python::BaseClassToDerived; };
+template<> struct SCHEMA::predicate<119> { using type = facebook::glean::cpp::schema::Python::FileCall; };
+template<> struct SCHEMA::predicate<120> { using type = facebook::glean::cpp::schema::Pp1::Use; };
+template<> struct SCHEMA::predicate<121> { using type = facebook::glean::cpp::schema::Pp1::Undef; };
+template<> struct SCHEMA::predicate<122> { using type = facebook::glean::cpp::schema::Pp1::Macro; };
+template<> struct SCHEMA::predicate<123> { using type = facebook::glean::cpp::schema::Pp1::Include; };
+template<> struct SCHEMA::predicate<124> { using type = facebook::glean::cpp::schema::Pp1::DefineUse; };
+template<> struct SCHEMA::predicate<125> { using type = facebook::glean::cpp::schema::Pp1::DefineLowerCase; };
+template<> struct SCHEMA::predicate<126> { using type = facebook::glean::cpp::schema::Pp1::Define; };
+template<> struct SCHEMA::predicate<127> { using type = facebook::glean::cpp::schema::Scip::Metadata; };
+template<> struct SCHEMA::predicate<128> { using type = facebook::glean::cpp::schema::Scip::EntityKind; };
+template<> struct SCHEMA::predicate<129> { using type = facebook::glean::cpp::schema::Scip::SearchByNameKind; };
+template<> struct SCHEMA::predicate<130> { using type = facebook::glean::cpp::schema::Scip::SymbolKind; };
+template<> struct SCHEMA::predicate<131> { using type = facebook::glean::cpp::schema::Lsif::Types::ToSrcRange; };
+template<> struct SCHEMA::predicate<132> { using type = facebook::glean::cpp::schema::Scip::DefinitionLocation; };
+template<> struct SCHEMA::predicate<133> { using type = facebook::glean::cpp::schema::Scip::FileRange; };
+template<> struct SCHEMA::predicate<134> { using type = facebook::glean::cpp::schema::Scip::FileXLangSymbolRef; };
+template<> struct SCHEMA::predicate<135> { using type = facebook::glean::cpp::schema::Scip::ReferenceLocation; };
+template<> struct SCHEMA::predicate<136> { using type = facebook::glean::cpp::schema::Scip::FileLanguage; };
+template<> struct SCHEMA::predicate<137> { using type = facebook::glean::cpp::schema::Scip::TagDefinition; };
+template<> struct SCHEMA::predicate<138> { using type = facebook::glean::cpp::schema::Lsif::Types::FromSrcRange; };
+template<> struct SCHEMA::predicate<139> { using type = facebook::glean::cpp::schema::Lsif::Reference; };
+template<> struct SCHEMA::predicate<140> { using type = facebook::glean::cpp::schema::Lsif::Range; };
+template<> struct SCHEMA::predicate<141> { using type = facebook::glean::cpp::schema::Lsif::ProjectDocument; };
+template<> struct SCHEMA::predicate<142> { using type = facebook::glean::cpp::schema::Lsif::Project; };
+template<> struct SCHEMA::predicate<143> { using type = facebook::glean::cpp::schema::Lsif::PackageInformation; };
+template<> struct SCHEMA::predicate<144> { using type = facebook::glean::cpp::schema::Lsif::NameLowerCase; };
+template<> struct SCHEMA::predicate<145> { using type = facebook::glean::cpp::schema::Lsif::NameDefinition; };
+template<> struct SCHEMA::predicate<146> { using type = facebook::glean::cpp::schema::Lsif::Name; };
+template<> struct SCHEMA::predicate<147> { using type = facebook::glean::cpp::schema::Lsif::MonikerSymbolKind; };
+template<> struct SCHEMA::predicate<148> { using type = facebook::glean::cpp::schema::Lsif::MonikerScheme; };
+template<> struct SCHEMA::predicate<149> { using type = facebook::glean::cpp::schema::Lsif::MonikerId; };
+template<> struct SCHEMA::predicate<150> { using type = facebook::glean::cpp::schema::Lsif::MonikerDefinition; };
+template<> struct SCHEMA::predicate<151> { using type = facebook::glean::cpp::schema::Lsif::Moniker; };
+template<> struct SCHEMA::predicate<152> { using type = facebook::glean::cpp::schema::Lsif::Metadata; };
+template<> struct SCHEMA::predicate<153> { using type = facebook::glean::cpp::schema::Lsif::HoverText; };
+template<> struct SCHEMA::predicate<154> { using type = facebook::glean::cpp::schema::Lsif::HoverContent; };
+template<> struct SCHEMA::predicate<155> { using type = facebook::glean::cpp::schema::Lsif::EntityDefinition; };
+template<> struct SCHEMA::predicate<156> { using type = facebook::glean::cpp::schema::Lsif::EntityKind; };
+template<> struct SCHEMA::predicate<157> { using type = facebook::glean::cpp::schema::Lsif::EntityLocation; };
+template<> struct SCHEMA::predicate<158> { using type = facebook::glean::cpp::schema::Lsif::EntityUses; };
+template<> struct SCHEMA::predicate<159> { using type = facebook::glean::cpp::schema::Lsif::FileEntityXRefLocation; };
+template<> struct SCHEMA::predicate<160> { using type = facebook::glean::cpp::schema::Lsif::ResolveLocation; };
+template<> struct SCHEMA::predicate<161> { using type = facebook::glean::cpp::schema::Lsif::SearchByExactLocation; };
+template<> struct SCHEMA::predicate<162> { using type = facebook::glean::cpp::schema::Lsif::SearchByExactLocationAndName; };
+template<> struct SCHEMA::predicate<163> { using type = facebook::glean::cpp::schema::Lsif::SearchByMoniker; };
+template<> struct SCHEMA::predicate<164> { using type = facebook::glean::cpp::schema::Lsif::SearchByName; };
+template<> struct SCHEMA::predicate<165> { using type = facebook::glean::cpp::schema::Lsif::SearchNonLocalByLocation; };
+template<> struct SCHEMA::predicate<166> { using type = facebook::glean::cpp::schema::Lsif::TagDefinition; };
+template<> struct SCHEMA::predicate<167> { using type = facebook::glean::cpp::schema::Lsif::Document; };
+template<> struct SCHEMA::predicate<168> { using type = facebook::glean::cpp::schema::Lsif::DefinitionUse; };
+template<> struct SCHEMA::predicate<169> { using type = facebook::glean::cpp::schema::Lsif::DefinitionMoniker; };
+template<> struct SCHEMA::predicate<170> { using type = facebook::glean::cpp::schema::Lsif::DefinitionLocation; };
+template<> struct SCHEMA::predicate<171> { using type = facebook::glean::cpp::schema::Lsif::DefinitionKind; };
+template<> struct SCHEMA::predicate<172> { using type = facebook::glean::cpp::schema::Lsif::DefinitionHover; };
+template<> struct SCHEMA::predicate<173> { using type = facebook::glean::cpp::schema::Lsif::Definition; };
+template<> struct SCHEMA::predicate<174> { using type = facebook::glean::cpp::schema::Lsif::Declaration; };
+template<> struct SCHEMA::predicate<175> { using type = facebook::glean::cpp::schema::Kotlin::Alpha::VariableParent; };
+template<> struct SCHEMA::predicate<176> { using type = facebook::glean::cpp::schema::Kotlin::Alpha::VariableDeclaration; };
+template<> struct SCHEMA::predicate<177> { using type = facebook::glean::cpp::schema::Kotlin::Alpha::TypeArg; };
+template<> struct SCHEMA::predicate<178> { using type = facebook::glean::cpp::schema::Kotlin::Alpha::Type; };
+template<> struct SCHEMA::predicate<179> { using type = facebook::glean::cpp::schema::Kotlin::Alpha::DeclarationLocation; };
+template<> struct SCHEMA::predicate<180> { using type = facebook::glean::cpp::schema::Kotlin::Alpha::DeclarationFileLocation; };
+template<> struct SCHEMA::predicate<181> { using type = facebook::glean::cpp::schema::Kotlin::Alpha::ExtendsDeclaration; };
+template<> struct SCHEMA::predicate<182> { using type = facebook::glean::cpp::schema::Kotlin::Alpha::FileDeclarations; };
+template<> struct SCHEMA::predicate<183> { using type = facebook::glean::cpp::schema::Kotlin::Alpha::MethodDeclaration; };
+template<> struct SCHEMA::predicate<184> { using type = facebook::glean::cpp::schema::Kotlin::Alpha::ParentDeclaration; };
+template<> struct SCHEMA::predicate<185> { using type = facebook::glean::cpp::schema::Search::Kotlin::SearchByQName; };
+template<> struct SCHEMA::predicate<186> { using type = facebook::glean::cpp::schema::Symbolid::Kotlin::LookupDeclaration; };
+template<> struct SCHEMA::predicate<187> { using type = facebook::glean::cpp::schema::Symbolid::Kotlin::LookupMethodDeclaration; };
+template<> struct SCHEMA::predicate<188> { using type = facebook::glean::cpp::schema::Kotlin::Alpha::ContainsDeclaration; };
+template<> struct SCHEMA::predicate<189> { using type = facebook::glean::cpp::schema::Kotlin::Alpha::ClassMember; };
+template<> struct SCHEMA::predicate<190> { using type = facebook::glean::cpp::schema::Kotlin::Alpha::ClassDeclaration; };
+template<> struct SCHEMA::predicate<191> { using type = facebook::glean::cpp::schema::Javakotlin::Alpha::Type; };
+template<> struct SCHEMA::predicate<192> { using type = facebook::glean::cpp::schema::Javakotlin::Alpha::QName; };
+template<> struct SCHEMA::predicate<193> { using type = facebook::glean::cpp::schema::Javakotlin::Alpha::Path; };
+template<> struct SCHEMA::predicate<194> { using type = facebook::glean::cpp::schema::Javakotlin::Alpha::NameLowerCase; };
+template<> struct SCHEMA::predicate<195> { using type = facebook::glean::cpp::schema::Javakotlin::Alpha::Name; };
+template<> struct SCHEMA::predicate<196> { using type = facebook::glean::cpp::schema::Javakotlin::Alpha::MethodName; };
+template<> struct SCHEMA::predicate<197> { using type = facebook::glean::cpp::schema::Java::Alpha::XRefFile; };
+template<> struct SCHEMA::predicate<198> { using type = facebook::glean::cpp::schema::Java::Alpha::XRef; };
+template<> struct SCHEMA::predicate<199> { using type = facebook::glean::cpp::schema::Java::Alpha::TypeVar; };
+template<> struct SCHEMA::predicate<200> { using type = facebook::glean::cpp::schema::Java::Alpha::TypeParam; };
+template<> struct SCHEMA::predicate<201> { using type = facebook::glean::cpp::schema::Java::Alpha::TypeOfTypeArgs; };
+template<> struct SCHEMA::predicate<202> { using type = facebook::glean::cpp::schema::Java::Alpha::TypeArg; };
+template<> struct SCHEMA::predicate<203> { using type = facebook::glean::cpp::schema::Java::Alpha::PrimitiveType; };
+template<> struct SCHEMA::predicate<204> { using type = facebook::glean::cpp::schema::Java::Alpha::PackageDeclaration; };
+template<> struct SCHEMA::predicate<205> { using type = facebook::glean::cpp::schema::Java::Alpha::ObjectType; };
+template<> struct SCHEMA::predicate<206> { using type = facebook::glean::cpp::schema::Java::Alpha::ParameterDeclaration; };
+template<> struct SCHEMA::predicate<207> { using type = facebook::glean::cpp::schema::Java::Alpha::InterfaceInheritance; };
+template<> struct SCHEMA::predicate<208> { using type = facebook::glean::cpp::schema::Java::Alpha::Inheritance; };
+template<> struct SCHEMA::predicate<209> { using type = facebook::glean::cpp::schema::Java::Alpha::ImportDeclaration; };
+template<> struct SCHEMA::predicate<210> { using type = facebook::glean::cpp::schema::Java::Alpha::FileXRefs; };
+template<> struct SCHEMA::predicate<211> { using type = facebook::glean::cpp::schema::Java::Alpha::ExecutableDefnLocation; };
+template<> struct SCHEMA::predicate<212> { using type = facebook::glean::cpp::schema::Java::Alpha::LocalDeclaration; };
+template<> struct SCHEMA::predicate<213> { using type = facebook::glean::cpp::schema::Java::Alpha::DefinitionLocation; };
+template<> struct SCHEMA::predicate<214> { using type = facebook::glean::cpp::schema::Java::Alpha::EnumDeclaration; };
+template<> struct SCHEMA::predicate<215> { using type = facebook::glean::cpp::schema::Java::Alpha::FieldDeclaration; };
+template<> struct SCHEMA::predicate<216> { using type = facebook::glean::cpp::schema::Java::Alpha::InterfaceDeclaration; };
+template<> struct SCHEMA::predicate<217> { using type = facebook::glean::cpp::schema::Java::Alpha::MethodDeclaration; };
+template<> struct SCHEMA::predicate<218> { using type = facebook::glean::cpp::schema::Java::Alpha::DeclarationAnnotations; };
+template<> struct SCHEMA::predicate<219> { using type = facebook::glean::cpp::schema::Java::Alpha::DeclarationComment; };
+template<> struct SCHEMA::predicate<220> { using type = facebook::glean::cpp::schema::Java::Alpha::DeclarationLocation; };
+template<> struct SCHEMA::predicate<221> { using type = facebook::glean::cpp::schema::Java::Alpha::DeclarationType; };
+template<> struct SCHEMA::predicate<222> { using type = facebook::glean::cpp::schema::Java::Alpha::DeclarationUses; };
+template<> struct SCHEMA::predicate<223> { using type = facebook::glean::cpp::schema::Java::Alpha::DeclarationXRefTarget; };
+template<> struct SCHEMA::predicate<224> { using type = facebook::glean::cpp::schema::Java::Alpha::ExtendedByDeclaration; };
+template<> struct SCHEMA::predicate<225> { using type = facebook::glean::cpp::schema::Java::Alpha::ExtendsDeclaration; };
+template<> struct SCHEMA::predicate<226> { using type = facebook::glean::cpp::schema::Java::Alpha::FileDeclarations; };
+template<> struct SCHEMA::predicate<227> { using type = facebook::glean::cpp::schema::Java::Alpha::ParentDeclaration; };
+template<> struct SCHEMA::predicate<228> { using type = facebook::glean::cpp::schema::Java::Alpha::QNameToDefinition; };
+template<> struct SCHEMA::predicate<229> { using type = facebook::glean::cpp::schema::Java::Alpha::XRefOfType; };
+template<> struct SCHEMA::predicate<230> { using type = facebook::glean::cpp::schema::Java::Alpha::XRefTargetDeclaration; };
+template<> struct SCHEMA::predicate<231> { using type = facebook::glean::cpp::schema::Search::Java::SearchByQName; };
+template<> struct SCHEMA::predicate<232> { using type = facebook::glean::cpp::schema::Symbolid::Java::LookupDeclaration; };
+template<> struct SCHEMA::predicate<233> { using type = facebook::glean::cpp::schema::Symbolid::Java::LookupMethodDeclaration; };
+template<> struct SCHEMA::predicate<234> { using type = facebook::glean::cpp::schema::Java::Alpha::DeclOfExecutableDefn; };
+template<> struct SCHEMA::predicate<235> { using type = facebook::glean::cpp::schema::Java::Alpha::DeclOfDefn; };
+template<> struct SCHEMA::predicate<236> { using type = facebook::glean::cpp::schema::Java::Alpha::ContainsDeclaration; };
+template<> struct SCHEMA::predicate<237> { using type = facebook::glean::cpp::schema::Java::Alpha::ConstructorDeclaration; };
+template<> struct SCHEMA::predicate<238> { using type = facebook::glean::cpp::schema::Java::Alpha::ClassDeclaration; };
+template<> struct SCHEMA::predicate<239> { using type = facebook::glean::cpp::schema::Java::Alpha::Type; };
+template<> struct SCHEMA::predicate<240> { using type = facebook::glean::cpp::schema::Java::Alpha::ArrayType; };
+template<> struct SCHEMA::predicate<241> { using type = facebook::glean::cpp::schema::Java::Alpha::Annotation; };
+template<> struct SCHEMA::predicate<242> { using type = facebook::glean::cpp::schema::Java::Alpha::AnnotatedClass; };
+template<> struct SCHEMA::predicate<243> { using type = facebook::glean::cpp::schema::Indexer::Config; };
+template<> struct SCHEMA::predicate<244> { using type = facebook::glean::cpp::schema::Hs::ValBind; };
+template<> struct SCHEMA::predicate<245> { using type = facebook::glean::cpp::schema::Hs::UnitName; };
+template<> struct SCHEMA::predicate<246> { using type = facebook::glean::cpp::schema::Hs::TypeSynDecl; };
+template<> struct SCHEMA::predicate<247> { using type = facebook::glean::cpp::schema::Hs::TypeFamilyDecl; };
+template<> struct SCHEMA::predicate<248> { using type = facebook::glean::cpp::schema::Hs::TyVarBind; };
+template<> struct SCHEMA::predicate<249> { using type = facebook::glean::cpp::schema::Hs::TyCon; };
+template<> struct SCHEMA::predicate<250> { using type = facebook::glean::cpp::schema::Hs::SourceModule; };
+template<> struct SCHEMA::predicate<251> { using type = facebook::glean::cpp::schema::Hs::SigDecl; };
+template<> struct SCHEMA::predicate<252> { using type = facebook::glean::cpp::schema::Hs::XRef; };
+template<> struct SCHEMA::predicate<253> { using type = facebook::glean::cpp::schema::Hs::RecordFieldDecl; };
+template<> struct SCHEMA::predicate<254> { using type = facebook::glean::cpp::schema::Hs::PatSynDecl; };
+template<> struct SCHEMA::predicate<255> { using type = facebook::glean::cpp::schema::Hs::PatBind; };
+template<> struct SCHEMA::predicate<256> { using type = facebook::glean::cpp::schema::Hs::OccNameLowerCase; };
+template<> struct SCHEMA::predicate<257> { using type = facebook::glean::cpp::schema::Hs::OccName; };
+template<> struct SCHEMA::predicate<258> { using type = facebook::glean::cpp::schema::Hs::Name; };
+template<> struct SCHEMA::predicate<259> { using type = facebook::glean::cpp::schema::Hs::ModuleSource; };
+template<> struct SCHEMA::predicate<260> { using type = facebook::glean::cpp::schema::Hs::ModuleName; };
+template<> struct SCHEMA::predicate<261> { using type = facebook::glean::cpp::schema::Hs::ModuleDeclarations; };
+template<> struct SCHEMA::predicate<262> { using type = facebook::glean::cpp::schema::Hs::Module; };
+template<> struct SCHEMA::predicate<263> { using type = facebook::glean::cpp::schema::Hs::MethDecl; };
+template<> struct SCHEMA::predicate<264> { using type = facebook::glean::cpp::schema::Hs::LitType; };
+template<> struct SCHEMA::predicate<265> { using type = facebook::glean::cpp::schema::Hs::InstanceDecl; };
+template<> struct SCHEMA::predicate<266> { using type = facebook::glean::cpp::schema::Hs::InstanceBindToDecl; };
+template<> struct SCHEMA::predicate<267> { using type = facebook::glean::cpp::schema::Hs::InstanceBind; };
+template<> struct SCHEMA::predicate<268> { using type = facebook::glean::cpp::schema::Hs::FileXRefs; };
+template<> struct SCHEMA::predicate<269> { using type = facebook::glean::cpp::schema::Hs::DeclarationLocation; };
+template<> struct SCHEMA::predicate<270> { using type = facebook::glean::cpp::schema::Hs::DeclarationOfName; };
+template<> struct SCHEMA::predicate<271> { using type = facebook::glean::cpp::schema::Hs::DeclarationSpan; };
+template<> struct SCHEMA::predicate<272> { using type = facebook::glean::cpp::schema::Hs::DataDecl; };
+template<> struct SCHEMA::predicate<273> { using type = facebook::glean::cpp::schema::Hs::ConstrDecl; };
+template<> struct SCHEMA::predicate<274> { using type = facebook::glean::cpp::schema::Hs::ClassDecl; };
+template<> struct SCHEMA::predicate<275> { using type = facebook::glean::cpp::schema::Hs::Type; };
+template<> struct SCHEMA::predicate<276> { using type = facebook::glean::cpp::schema::Hack::UserAttribute; };
+template<> struct SCHEMA::predicate<277> { using type = facebook::glean::cpp::schema::Hack::TypedefDeclaration; };
+template<> struct SCHEMA::predicate<278> { using type = facebook::glean::cpp::schema::Hack::TypeConstDefinition; };
+template<> struct SCHEMA::predicate<279> { using type = facebook::glean::cpp::schema::Hack::Type; };
+template<> struct SCHEMA::predicate<280> { using type = facebook::glean::cpp::schema::Hack::TraitDeclaration; };
+template<> struct SCHEMA::predicate<281> { using type = facebook::glean::cpp::schema::Hack::StringLiteral; };
+template<> struct SCHEMA::predicate<282> { using type = facebook::glean::cpp::schema::Hack::SearchTypedefByLowerCaseName; };
+template<> struct SCHEMA::predicate<283> { using type = facebook::glean::cpp::schema::Hack::SearchTypeConstByLowerCaseName; };
+template<> struct SCHEMA::predicate<284> { using type = facebook::glean::cpp::schema::Hack::SearchTraitByLowerCaseName; };
+template<> struct SCHEMA::predicate<285> { using type = facebook::glean::cpp::schema::Hack::SearchPropertyByLowerCaseName; };
+template<> struct SCHEMA::predicate<286> { using type = facebook::glean::cpp::schema::Hack::SearchNamespaceByLowerCaseName; };
+template<> struct SCHEMA::predicate<287> { using type = facebook::glean::cpp::schema::Hack::SearchModuleByLowerCaseName; };
+template<> struct SCHEMA::predicate<288> { using type = facebook::glean::cpp::schema::Hack::SearchMethodByLowerCaseName; };
+template<> struct SCHEMA::predicate<289> { using type = facebook::glean::cpp::schema::Hack::SearchInterfaceByLowerCaseName; };
+template<> struct SCHEMA::predicate<290> { using type = facebook::glean::cpp::schema::Hack::SearchGlobalConstByLowerCaseName; };
+template<> struct SCHEMA::predicate<291> { using type = facebook::glean::cpp::schema::Hack::SearchFunctionByLowerCaseName; };
+template<> struct SCHEMA::predicate<292> { using type = facebook::glean::cpp::schema::Hack::SearchEnumeratorByLowerCaseName; };
+template<> struct SCHEMA::predicate<293> { using type = facebook::glean::cpp::schema::Hack::SearchEnumByLowerCaseName; };
+template<> struct SCHEMA::predicate<294> { using type = facebook::glean::cpp::schema::Hack::SearchClassConstByLowerCaseName; };
+template<> struct SCHEMA::predicate<295> { using type = facebook::glean::cpp::schema::Hack::SearchClassByLowerCaseName; };
+template<> struct SCHEMA::predicate<296> { using type = facebook::glean::cpp::schema::Hack::QName; };
+template<> struct SCHEMA::predicate<297> { using type = facebook::glean::cpp::schema::Hack::PropertyDefinition; };
+template<> struct SCHEMA::predicate<298> { using type = facebook::glean::cpp::schema::Hack::Signature; };
+template<> struct SCHEMA::predicate<299> { using type = facebook::glean::cpp::schema::Hack::NamespaceQName; };
+template<> struct SCHEMA::predicate<300> { using type = facebook::glean::cpp::schema::Hack::NamespaceDeclaration; };
+template<> struct SCHEMA::predicate<301> { using type = facebook::glean::cpp::schema::Hack::NameLowerCase; };
+template<> struct SCHEMA::predicate<302> { using type = facebook::glean::cpp::schema::Hack::Name; };
+template<> struct SCHEMA::predicate<303> { using type = facebook::glean::cpp::schema::Hack::ModuleDefinition; };
+template<> struct SCHEMA::predicate<304> { using type = facebook::glean::cpp::schema::Hack::ModuleDeclaration; };
+template<> struct SCHEMA::predicate<305> { using type = facebook::glean::cpp::schema::Hack::MethodOverrides; };
+template<> struct SCHEMA::predicate<306> { using type = facebook::glean::cpp::schema::Hack::MethodOverridden; };
+template<> struct SCHEMA::predicate<307> { using type = facebook::glean::cpp::schema::Hack::MethodOccurrence; };
+template<> struct SCHEMA::predicate<308> { using type = facebook::glean::cpp::schema::Hack::InterfaceDeclaration; };
+template<> struct SCHEMA::predicate<309> { using type = facebook::glean::cpp::schema::Hack::IndexerInputsHash; };
+template<> struct SCHEMA::predicate<310> { using type = facebook::glean::cpp::schema::Hack::GlobalNamespaceAlias; };
+template<> struct SCHEMA::predicate<311> { using type = facebook::glean::cpp::schema::Hack::GlobalConstDefinition; };
+template<> struct SCHEMA::predicate<312> { using type = facebook::glean::cpp::schema::Hack::GlobalConstDeclaration; };
+template<> struct SCHEMA::predicate<313> { using type = facebook::glean::cpp::schema::Hack::FunctionDeclaration; };
+template<> struct SCHEMA::predicate<314> { using type = facebook::glean::cpp::schema::Hack::Hint; };
+template<> struct SCHEMA::predicate<315> { using type = facebook::glean::cpp::schema::Hack::Enumerator; };
+template<> struct SCHEMA::predicate<316> { using type = facebook::glean::cpp::schema::Hack::EnumDefinition; };
+template<> struct SCHEMA::predicate<317> { using type = facebook::glean::cpp::schema::Hack::EnumDeclaration; };
+template<> struct SCHEMA::predicate<318> { using type = facebook::glean::cpp::schema::Hack::Context_; };
+template<> struct SCHEMA::predicate<319> { using type = facebook::glean::cpp::schema::Hack::ContainerDeclarationQName; };
+template<> struct SCHEMA::predicate<320> { using type = facebook::glean::cpp::schema::Hack::ContainerParent; };
+template<> struct SCHEMA::predicate<321> { using type = facebook::glean::cpp::schema::Hack::DeclarationComment; };
+template<> struct SCHEMA::predicate<322> { using type = facebook::glean::cpp::schema::Hack::DeclarationLocation; };
+template<> struct SCHEMA::predicate<323> { using type = facebook::glean::cpp::schema::Hack::DeclarationName; };
+template<> struct SCHEMA::predicate<324> { using type = facebook::glean::cpp::schema::Hack::DeclarationNamespace; };
+template<> struct SCHEMA::predicate<325> { using type = facebook::glean::cpp::schema::Hack::DeclarationSource; };
+template<> struct SCHEMA::predicate<326> { using type = facebook::glean::cpp::schema::Hack::DeclarationSpan; };
+template<> struct SCHEMA::predicate<327> { using type = facebook::glean::cpp::schema::Hack::DeclarationTarget; };
+template<> struct SCHEMA::predicate<328> { using type = facebook::glean::cpp::schema::Hack::FileDeclarations; };
+template<> struct SCHEMA::predicate<329> { using type = facebook::glean::cpp::schema::Hack::MemberCluster; };
+template<> struct SCHEMA::predicate<330> { using type = facebook::glean::cpp::schema::Hack::ModuleChild; };
+template<> struct SCHEMA::predicate<331> { using type = facebook::glean::cpp::schema::Hack::ModuleParent; };
+template<> struct SCHEMA::predicate<332> { using type = facebook::glean::cpp::schema::Hack::NamespaceMember; };
+template<> struct SCHEMA::predicate<333> { using type = facebook::glean::cpp::schema::Hack::SearchClassByName; };
+template<> struct SCHEMA::predicate<334> { using type = facebook::glean::cpp::schema::Hack::SearchClassConstByName; };
+template<> struct SCHEMA::predicate<335> { using type = facebook::glean::cpp::schema::Hack::SearchEnumByName; };
+template<> struct SCHEMA::predicate<336> { using type = facebook::glean::cpp::schema::Hack::SearchEnumeratorByName; };
+template<> struct SCHEMA::predicate<337> { using type = facebook::glean::cpp::schema::Hack::SearchFunctionByName; };
+template<> struct SCHEMA::predicate<338> { using type = facebook::glean::cpp::schema::Hack::SearchGlobalConstByName; };
+template<> struct SCHEMA::predicate<339> { using type = facebook::glean::cpp::schema::Hack::SearchInterfaceByName; };
+template<> struct SCHEMA::predicate<340> { using type = facebook::glean::cpp::schema::Hack::SearchMethodByName; };
+template<> struct SCHEMA::predicate<341> { using type = facebook::glean::cpp::schema::Hack::SearchModuleByName; };
+template<> struct SCHEMA::predicate<342> { using type = facebook::glean::cpp::schema::Hack::SearchNamespaceByName; };
+template<> struct SCHEMA::predicate<343> { using type = facebook::glean::cpp::schema::Hack::SearchPropertyByName; };
+template<> struct SCHEMA::predicate<344> { using type = facebook::glean::cpp::schema::Hack::SearchTraitByName; };
+template<> struct SCHEMA::predicate<345> { using type = facebook::glean::cpp::schema::Hack::SearchTypeConstByName; };
+template<> struct SCHEMA::predicate<346> { using type = facebook::glean::cpp::schema::Hack::SearchTypedefByName; };
+template<> struct SCHEMA::predicate<347> { using type = facebook::glean::cpp::schema::Hack::TargetUses; };
+template<> struct SCHEMA::predicate<348> { using type = facebook::glean::cpp::schema::Hack::TargetUsesAbs; };
+template<> struct SCHEMA::predicate<349> { using type = facebook::glean::cpp::schema::Hack::FileXRefs; };
+template<> struct SCHEMA::predicate<350> { using type = facebook::glean::cpp::schema::Hack::TypeInfo; };
+template<> struct SCHEMA::predicate<351> { using type = facebook::glean::cpp::schema::Search::Hack::SearchByName; };
+template<> struct SCHEMA::predicate<352> { using type = facebook::glean::cpp::schema::Search::Hack::SearchFunctionInNamespace; };
+template<> struct SCHEMA::predicate<353> { using type = facebook::glean::cpp::schema::Search::Hack::SearchGlobalConstInNamespace; };
+template<> struct SCHEMA::predicate<354> { using type = facebook::glean::cpp::schema::Search::Hack::SearchInContainer; };
+template<> struct SCHEMA::predicate<355> { using type = facebook::glean::cpp::schema::Search::Hack::SearchInContainerNoProperty; };
+template<> struct SCHEMA::predicate<356> { using type = facebook::glean::cpp::schema::Search::Hack::SearchInContainerOrEnum; };
+template<> struct SCHEMA::predicate<357> { using type = facebook::glean::cpp::schema::Search::Hack::SearchInContainerOrEnumNoProperty; };
+template<> struct SCHEMA::predicate<358> { using type = facebook::glean::cpp::schema::Search::Hack::SearchInEnum; };
+template<> struct SCHEMA::predicate<359> { using type = facebook::glean::cpp::schema::Search::Hack::SearchInNamespace; };
+template<> struct SCHEMA::predicate<360> { using type = facebook::glean::cpp::schema::Search::Hack::SearchModule; };
+template<> struct SCHEMA::predicate<361> { using type = facebook::glean::cpp::schema::Search::Hack::SearchNamespace; };
+template<> struct SCHEMA::predicate<362> { using type = facebook::glean::cpp::schema::Search::Hack::SearchNamespacedDecl; };
+template<> struct SCHEMA::predicate<363> { using type = facebook::glean::cpp::schema::Search::Hack::SearchPropertyInContainer; };
+template<> struct SCHEMA::predicate<364> { using type = facebook::glean::cpp::schema::Search::Hack::SearchTypeInNamespace; };
+template<> struct SCHEMA::predicate<365> { using type = facebook::glean::cpp::schema::Hack::InheritedMembers; };
+template<> struct SCHEMA::predicate<366> { using type = facebook::glean::cpp::schema::Hack::MethodDeclaration; };
+template<> struct SCHEMA::predicate<367> { using type = facebook::glean::cpp::schema::Hack::PropertyDeclaration; };
+template<> struct SCHEMA::predicate<368> { using type = facebook::glean::cpp::schema::Hack::TypeConstDeclaration; };
+template<> struct SCHEMA::predicate<369> { using type = facebook::glean::cpp::schema::Hack::ContainerChild; };
+template<> struct SCHEMA::predicate<370> { using type = facebook::glean::cpp::schema::Hack::FunctionDefinition; };
+template<> struct SCHEMA::predicate<371> { using type = facebook::glean::cpp::schema::Hack::InterfaceDefinition; };
+template<> struct SCHEMA::predicate<372> { using type = facebook::glean::cpp::schema::Hack::MethodDefinition; };
+template<> struct SCHEMA::predicate<373> { using type = facebook::glean::cpp::schema::Hack::TraitDefinition; };
+template<> struct SCHEMA::predicate<374> { using type = facebook::glean::cpp::schema::Hack::TypedefDefinition; };
+template<> struct SCHEMA::predicate<375> { using type = facebook::glean::cpp::schema::Hack::ClassDefinition; };
+template<> struct SCHEMA::predicate<376> { using type = facebook::glean::cpp::schema::Hack::ClassDeclaration; };
+template<> struct SCHEMA::predicate<377> { using type = facebook::glean::cpp::schema::Hack::ClassConstDefinition; };
+template<> struct SCHEMA::predicate<378> { using type = facebook::glean::cpp::schema::Hack::ClassConstDeclaration; };
+template<> struct SCHEMA::predicate<379> { using type = facebook::glean::cpp::schema::Hack::AttributeToDefinition; };
+template<> struct SCHEMA::predicate<380> { using type = facebook::glean::cpp::schema::Hack::AttributeToDeclaration; };
+template<> struct SCHEMA::predicate<381> { using type = facebook::glean::cpp::schema::Hack::AttributeHasParameter; };
+template<> struct SCHEMA::predicate<382> { using type = facebook::glean::cpp::schema::Hack::FileCall; };
+template<> struct SCHEMA::predicate<383> { using type = facebook::glean::cpp::schema::Graphql::VariableDef; };
+template<> struct SCHEMA::predicate<384> { using type = facebook::glean::cpp::schema::Graphql::Value; };
+template<> struct SCHEMA::predicate<385> { using type = facebook::glean::cpp::schema::Graphql::UnionTypeDef; };
+template<> struct SCHEMA::predicate<386> { using type = facebook::glean::cpp::schema::Graphql::ScalarTypeDef; };
+template<> struct SCHEMA::predicate<387> { using type = facebook::glean::cpp::schema::Graphql::Operation; };
+template<> struct SCHEMA::predicate<388> { using type = facebook::glean::cpp::schema::Graphql::ObjectTypeDef; };
+template<> struct SCHEMA::predicate<389> { using type = facebook::glean::cpp::schema::Graphql::NameLowerCase; };
+template<> struct SCHEMA::predicate<390> { using type = facebook::glean::cpp::schema::Graphql::InterfaceTypeDef; };
+template<> struct SCHEMA::predicate<391> { using type = facebook::glean::cpp::schema::Graphql::InputValueDef; };
+template<> struct SCHEMA::predicate<392> { using type = facebook::glean::cpp::schema::Graphql::InputObjectTypeDef; };
+template<> struct SCHEMA::predicate<393> { using type = facebook::glean::cpp::schema::Graphql::InlineFragment; };
+template<> struct SCHEMA::predicate<394> { using type = facebook::glean::cpp::schema::Graphql::FragmentSpread; };
+template<> struct SCHEMA::predicate<395> { using type = facebook::glean::cpp::schema::Graphql::Fragment; };
+template<> struct SCHEMA::predicate<396> { using type = facebook::glean::cpp::schema::Graphql::FieldDef; };
+template<> struct SCHEMA::predicate<397> { using type = facebook::glean::cpp::schema::Graphql::Field; };
+template<> struct SCHEMA::predicate<398> { using type = facebook::glean::cpp::schema::Graphql::EnumTypeDef; };
+template<> struct SCHEMA::predicate<399> { using type = facebook::glean::cpp::schema::Graphql::DirectiveDef; };
+template<> struct SCHEMA::predicate<400> { using type = facebook::glean::cpp::schema::Graphql::Directive; };
+template<> struct SCHEMA::predicate<401> { using type = facebook::glean::cpp::schema::Graphql::DeclarationLocation; };
+template<> struct SCHEMA::predicate<402> { using type = facebook::glean::cpp::schema::Graphql::DeclarationName; };
+template<> struct SCHEMA::predicate<403> { using type = facebook::glean::cpp::schema::Graphql::DeclarationUses; };
+template<> struct SCHEMA::predicate<404> { using type = facebook::glean::cpp::schema::Graphql::FileDeclarations; };
+template<> struct SCHEMA::predicate<405> { using type = facebook::glean::cpp::schema::Graphql::SearchByName; };
+template<> struct SCHEMA::predicate<406> { using type = facebook::glean::cpp::schema::Graphql::FileXRefs; };
+template<> struct SCHEMA::predicate<407> { using type = facebook::glean::cpp::schema::Graphql::DeclHasName; };
+template<> struct SCHEMA::predicate<408> { using type = facebook::glean::cpp::schema::Graphql::BelongToConfig; };
+template<> struct SCHEMA::predicate<409> { using type = facebook::glean::cpp::schema::Graphql::Argument; };
+template<> struct SCHEMA::predicate<410> { using type = facebook::glean::cpp::schema::Glean::Test::nothingTest; };
+template<> struct SCHEMA::predicate<411> { using type = facebook::glean::cpp::schema::Glean::Test::ViaStringPair; };
+template<> struct SCHEMA::predicate<412> { using type = facebook::glean::cpp::schema::Glean::Test::Unbound2; };
+template<> struct SCHEMA::predicate<413> { using type = facebook::glean::cpp::schema::Glean::Test::Unbound; };
+template<> struct SCHEMA::predicate<414> { using type = facebook::glean::cpp::schema::Glean::Test::TreeToTree; };
+template<> struct SCHEMA::predicate<415> { using type = facebook::glean::cpp::schema::Glean::Test::Tree; };
+template<> struct SCHEMA::predicate<416> { using type = facebook::glean::cpp::schema::Glean::Test::StringPairBox; };
+template<> struct SCHEMA::predicate<417> { using type = facebook::glean::cpp::schema::Glean::Test::StringPair; };
+template<> struct SCHEMA::predicate<418> { using type = facebook::glean::cpp::schema::Glean::Test::StoredRevStringPairWithRev; };
+template<> struct SCHEMA::predicate<419> { using type = facebook::glean::cpp::schema::Glean::Test::StoredRevStringPairWithA; };
+template<> struct SCHEMA::predicate<420> { using type = facebook::glean::cpp::schema::Glean::Test::StoredRevStringPairSum; };
+template<> struct SCHEMA::predicate<421> { using type = facebook::glean::cpp::schema::Glean::Test::StoredRevStringPair; };
+template<> struct SCHEMA::predicate<422> { using type = facebook::glean::cpp::schema::Glean::Test::StoredDualStringPair; };
+template<> struct SCHEMA::predicate<423> { using type = facebook::glean::cpp::schema::Glean::Test::SkipRevEdge; };
+template<> struct SCHEMA::predicate<424> { using type = facebook::glean::cpp::schema::Glean::Test::SameString; };
+template<> struct SCHEMA::predicate<425> { using type = facebook::glean::cpp::schema::Glean::Test::RevStringPairs; };
+template<> struct SCHEMA::predicate<426> { using type = facebook::glean::cpp::schema::Glean::Test::RevStringPairRec; };
+template<> struct SCHEMA::predicate<427> { using type = facebook::glean::cpp::schema::Glean::Test::RevStringPair; };
+template<> struct SCHEMA::predicate<428> { using type = facebook::glean::cpp::schema::Glean::Test::RevRevStringPair; };
+template<> struct SCHEMA::predicate<429> { using type = facebook::glean::cpp::schema::Glean::Test::RevEdge; };
+template<> struct SCHEMA::predicate<430> { using type = facebook::glean::cpp::schema::Glean::Test::ReflStringPair; };
+template<> struct SCHEMA::predicate<431> { using type = facebook::glean::cpp::schema::Glean::Test::RefRef; };
+template<> struct SCHEMA::predicate<432> { using type = facebook::glean::cpp::schema::Glean::Test::Ref; };
+template<> struct SCHEMA::predicate<433> { using type = facebook::glean::cpp::schema::Glean::Test::Qux; };
+template<> struct SCHEMA::predicate<434> { using type = facebook::glean::cpp::schema::Glean::Test::Predicate_0; };
+template<> struct SCHEMA::predicate<435> { using type = facebook::glean::cpp::schema::Glean::Test::NodePair; };
+template<> struct SCHEMA::predicate<436> { using type = facebook::glean::cpp::schema::Glean::Test::Node; };
+template<> struct SCHEMA::predicate<437> { using type = facebook::glean::cpp::schema::Glean::Test::Name; };
+template<> struct SCHEMA::predicate<438> { using type = facebook::glean::cpp::schema::Glean::Test::MatchOneAlt; };
+template<> struct SCHEMA::predicate<439> { using type = facebook::glean::cpp::schema::Glean::Test::LeftOr2; };
+template<> struct SCHEMA::predicate<440> { using type = facebook::glean::cpp::schema::Glean::Test::LeftOr; };
+template<> struct SCHEMA::predicate<441> { using type = facebook::glean::cpp::schema::Glean::Test::KeyValue; };
+template<> struct SCHEMA::predicate<442> { using type = facebook::glean::cpp::schema::Glean::Test::IsThree; };
+template<> struct SCHEMA::predicate<443> { using type = facebook::glean::cpp::schema::Glean::Test::IsParent; };
+template<> struct SCHEMA::predicate<444> { using type = facebook::glean::cpp::schema::Glean::Test::IsGlean; };
+template<> struct SCHEMA::predicate<445> { using type = facebook::glean::cpp::schema::Glean::Test::FooToFoo; };
+template<> struct SCHEMA::predicate<446> { using type = facebook::glean::cpp::schema::Glean::Test::Foo; };
+template<> struct SCHEMA::predicate<447> { using type = facebook::glean::cpp::schema::Glean::Test::Expr; };
+template<> struct SCHEMA::predicate<448> { using type = facebook::glean::cpp::schema::Glean::Test::EmptyStoredStringPair; };
+template<> struct SCHEMA::predicate<449> { using type = facebook::glean::cpp::schema::Glean::Test::EmptyPred; };
+template<> struct SCHEMA::predicate<450> { using type = facebook::glean::cpp::schema::Glean::Test::EdgeWrapper; };
+template<> struct SCHEMA::predicate<451> { using type = facebook::glean::cpp::schema::Glean::Test::EdgeFromNotA; };
+template<> struct SCHEMA::predicate<452> { using type = facebook::glean::cpp::schema::Glean::Test::Edge; };
+template<> struct SCHEMA::predicate<453> { using type = facebook::glean::cpp::schema::Glean::Test::DualStringPair; };
+template<> struct SCHEMA::predicate<454> { using type = facebook::glean::cpp::schema::Glean::Test::DerivedKeyValue2; };
+template<> struct SCHEMA::predicate<455> { using type = facebook::glean::cpp::schema::Glean::Test::DerivedKeyValue; };
+template<> struct SCHEMA::predicate<456> { using type = facebook::glean::cpp::schema::Glean::Test::Bar; };
+template<> struct SCHEMA::predicate<457> { using type = facebook::glean::cpp::schema::Glean::Test::Predicate_; };
+template<> struct SCHEMA::predicate<458> { using type = facebook::glean::cpp::schema::Gencode::GenCodeSignature; };
+template<> struct SCHEMA::predicate<459> { using type = facebook::glean::cpp::schema::Gencode::GenCodeCommand; };
+template<> struct SCHEMA::predicate<460> { using type = facebook::glean::cpp::schema::Gencode::GenCodeClass; };
+template<> struct SCHEMA::predicate<461> { using type = facebook::glean::cpp::schema::Gencode::GenCodeBySource; };
+template<> struct SCHEMA::predicate<462> { using type = facebook::glean::cpp::schema::Gencode::GenCode; };
+template<> struct SCHEMA::predicate<463> { using type = facebook::glean::cpp::schema::Flow::TypeImportDeclaration; };
+template<> struct SCHEMA::predicate<464> { using type = facebook::glean::cpp::schema::Flow::TypeExport; };
+template<> struct SCHEMA::predicate<465> { using type = facebook::glean::cpp::schema::Flow::TypeDeclarationReference; };
+template<> struct SCHEMA::predicate<466> { using type = facebook::glean::cpp::schema::Flow::TypeDeclarationInfo; };
+template<> struct SCHEMA::predicate<467> { using type = facebook::glean::cpp::schema::Flow::TypeDeclaration; };
+template<> struct SCHEMA::predicate<468> { using type = facebook::glean::cpp::schema::Flow::Type; };
+template<> struct SCHEMA::predicate<469> { using type = facebook::glean::cpp::schema::Flow::StringToFileModule; };
+template<> struct SCHEMA::predicate<470> { using type = facebook::glean::cpp::schema::Flow::SourceOfTypeExport; };
+template<> struct SCHEMA::predicate<471> { using type = facebook::glean::cpp::schema::Flow::SourceOfExport; };
+template<> struct SCHEMA::predicate<472> { using type = facebook::glean::cpp::schema::Search::Flow::FlowSearchByNameNonImport; };
+template<> struct SCHEMA::predicate<473> { using type = facebook::glean::cpp::schema::Flow::SearchTypeDeclarationByName; };
+template<> struct SCHEMA::predicate<474> { using type = facebook::glean::cpp::schema::Flow::SearchTypeDeclarationByLowerCaseName; };
+template<> struct SCHEMA::predicate<475> { using type = facebook::glean::cpp::schema::Flow::SearchTypeByModuleExport; };
+template<> struct SCHEMA::predicate<476> { using type = facebook::glean::cpp::schema::Flow::SearchModuleByLowerCaseName; };
+template<> struct SCHEMA::predicate<477> { using type = facebook::glean::cpp::schema::Flow::SearchMemberDeclarationByName; };
+template<> struct SCHEMA::predicate<478> { using type = facebook::glean::cpp::schema::Flow::SearchMemberDeclarationByLowerCaseName; };
+template<> struct SCHEMA::predicate<479> { using type = facebook::glean::cpp::schema::Flow::SearchDeclarationByName; };
+template<> struct SCHEMA::predicate<480> { using type = facebook::glean::cpp::schema::Flow::SearchDeclarationByLowerCaseName; };
+template<> struct SCHEMA::predicate<481> { using type = facebook::glean::cpp::schema::Flow::SearchByNameModule; };
+template<> struct SCHEMA::predicate<482> { using type = facebook::glean::cpp::schema::Flow::SearchByName; };
+template<> struct SCHEMA::predicate<483> { using type = facebook::glean::cpp::schema::Flow::SearchByModuleName; };
+template<> struct SCHEMA::predicate<484> { using type = facebook::glean::cpp::schema::Flow::SearchByModule; };
+template<> struct SCHEMA::predicate<485> { using type = facebook::glean::cpp::schema::Flow::SearchByFileModule; };
+template<> struct SCHEMA::predicate<486> { using type = facebook::glean::cpp::schema::Flow::Range; };
+template<> struct SCHEMA::predicate<487> { using type = facebook::glean::cpp::schema::Flow::Name; };
+template<> struct SCHEMA::predicate<488> { using type = facebook::glean::cpp::schema::Flow::ModuleTypeExport; };
+template<> struct SCHEMA::predicate<489> { using type = facebook::glean::cpp::schema::Flow::ModuleNameLowerCase; };
+template<> struct SCHEMA::predicate<490> { using type = facebook::glean::cpp::schema::Flow::ModuleLocationByFile; };
+template<> struct SCHEMA::predicate<491> { using type = facebook::glean::cpp::schema::Flow::ModuleLocation; };
+template<> struct SCHEMA::predicate<492> { using type = facebook::glean::cpp::schema::Flow::ModuleExport; };
+template<> struct SCHEMA::predicate<493> { using type = facebook::glean::cpp::schema::Flow::ModuleDoc; };
+template<> struct SCHEMA::predicate<494> { using type = facebook::glean::cpp::schema::Flow::ModuleContains; };
+template<> struct SCHEMA::predicate<495> { using type = facebook::glean::cpp::schema::Flow::ModuleComments; };
+template<> struct SCHEMA::predicate<496> { using type = facebook::glean::cpp::schema::Flow::Module; };
+template<> struct SCHEMA::predicate<497> { using type = facebook::glean::cpp::schema::Flow::MemberDeclarationReference; };
+template<> struct SCHEMA::predicate<498> { using type = facebook::glean::cpp::schema::Flow::MemberDeclarationInfo; };
+template<> struct SCHEMA::predicate<499> { using type = facebook::glean::cpp::schema::Flow::MemberDeclaration; };
+template<> struct SCHEMA::predicate<500> { using type = facebook::glean::cpp::schema::Flow::LocalDeclarationReference; };
+template<> struct SCHEMA::predicate<501> { using type = facebook::glean::cpp::schema::Flow::ImportDeclaration; };
+template<> struct SCHEMA::predicate<502> { using type = facebook::glean::cpp::schema::Flow::FlowXRefDeclInfo; };
+template<> struct SCHEMA::predicate<503> { using type = facebook::glean::cpp::schema::Flow::FlowTypeImportXRef; };
+template<> struct SCHEMA::predicate<504> { using type = facebook::glean::cpp::schema::Flow::FlowTypeExportLocation; };
+template<> struct SCHEMA::predicate<505> { using type = facebook::glean::cpp::schema::Flow::FlowTypeEntityImportUses; };
+template<> struct SCHEMA::predicate<506> { using type = facebook::glean::cpp::schema::Flow::FlowSameModule; };
+template<> struct SCHEMA::predicate<507> { using type = facebook::glean::cpp::schema::Flow::FlowModuleNamespaceXRef; };
+template<> struct SCHEMA::predicate<508> { using type = facebook::glean::cpp::schema::Flow::FlowImportXRef; };
+template<> struct SCHEMA::predicate<509> { using type = facebook::glean::cpp::schema::Flow::FlowExportLocation; };
+template<> struct SCHEMA::predicate<510> { using type = facebook::glean::cpp::schema::Flow::FlowEntityUsesAll; };
+template<> struct SCHEMA::predicate<511> { using type = facebook::glean::cpp::schema::Flow::FlowEntityImportUses; };
+template<> struct SCHEMA::predicate<512> { using type = facebook::glean::cpp::schema::Flow::FlowCompatibleExport; };
+template<> struct SCHEMA::predicate<513> { using type = facebook::glean::cpp::schema::Flow::FileXRef; };
+template<> struct SCHEMA::predicate<514> { using type = facebook::glean::cpp::schema::Flow::FileOfStringModule; };
+template<> struct SCHEMA::predicate<515> { using type = facebook::glean::cpp::schema::Flow::FileDeclaration; };
+template<> struct SCHEMA::predicate<516> { using type = facebook::glean::cpp::schema::Flow::Export; };
+template<> struct SCHEMA::predicate<517> { using type = facebook::glean::cpp::schema::Flow::Documentation; };
+template<> struct SCHEMA::predicate<518> { using type = facebook::glean::cpp::schema::Flow::DeclarationUses; };
+template<> struct SCHEMA::predicate<519> { using type = facebook::glean::cpp::schema::Flow::DeclarationSignature; };
+template<> struct SCHEMA::predicate<520> { using type = facebook::glean::cpp::schema::Flow::DeclarationNameSpan; };
+template<> struct SCHEMA::predicate<521> { using type = facebook::glean::cpp::schema::Flow::DeclarationLocation; };
+template<> struct SCHEMA::predicate<522> { using type = facebook::glean::cpp::schema::Flow::DeclarationInfo; };
+template<> struct SCHEMA::predicate<523> { using type = facebook::glean::cpp::schema::Flow::Declaration; };
+template<> struct SCHEMA::predicate<524> { using type = facebook::glean::cpp::schema::Fbthrift::UnionVal; };
+template<> struct SCHEMA::predicate<525> { using type = facebook::glean::cpp::schema::Fbthrift::TypeDefType; };
+template<> struct SCHEMA::predicate<526> { using type = facebook::glean::cpp::schema::Fbthrift::StructuredAnnotation; };
+template<> struct SCHEMA::predicate<527> { using type = facebook::glean::cpp::schema::Fbthrift::StructVal; };
+template<> struct SCHEMA::predicate<528> { using type = facebook::glean::cpp::schema::Fbthrift::ServiceParent; };
+template<> struct SCHEMA::predicate<529> { using type = facebook::glean::cpp::schema::Fbthrift::ServiceName; };
+template<> struct SCHEMA::predicate<530> { using type = facebook::glean::cpp::schema::Fbthrift::ServiceInteractionFunctions; };
+template<> struct SCHEMA::predicate<531> { using type = facebook::glean::cpp::schema::Fbthrift::ServiceDefinition; };
+template<> struct SCHEMA::predicate<532> { using type = facebook::glean::cpp::schema::Fbthrift::ServiceChild; };
+template<> struct SCHEMA::predicate<533> { using type = facebook::glean::cpp::schema::Fbthrift::SearchByName; };
+template<> struct SCHEMA::predicate<534> { using type = facebook::glean::cpp::schema::Fbthrift::QualName; };
+template<> struct SCHEMA::predicate<535> { using type = facebook::glean::cpp::schema::Fbthrift::PackageName; };
+template<> struct SCHEMA::predicate<536> { using type = facebook::glean::cpp::schema::Fbthrift::Package; };
+template<> struct SCHEMA::predicate<537> { using type = facebook::glean::cpp::schema::Fbthrift::NamespaceValue; };
+template<> struct SCHEMA::predicate<538> { using type = facebook::glean::cpp::schema::Fbthrift::NamespaceName; };
+template<> struct SCHEMA::predicate<539> { using type = facebook::glean::cpp::schema::Fbthrift::Namespace; };
+template<> struct SCHEMA::predicate<540> { using type = facebook::glean::cpp::schema::Fbthrift::NamedDecl; };
+template<> struct SCHEMA::predicate<541> { using type = facebook::glean::cpp::schema::Fbthrift::NameLowerCase; };
+template<> struct SCHEMA::predicate<542> { using type = facebook::glean::cpp::schema::Fbthrift::InteractionName; };
+template<> struct SCHEMA::predicate<543> { using type = facebook::glean::cpp::schema::Fbthrift::InteractionDefinition; };
+template<> struct SCHEMA::predicate<544> { using type = facebook::glean::cpp::schema::Fbthrift::Identifier; };
+template<> struct SCHEMA::predicate<545> { using type = facebook::glean::cpp::schema::Fbthrift::FunctionName; };
+template<> struct SCHEMA::predicate<546> { using type = facebook::glean::cpp::schema::Fbthrift::Literal; };
+template<> struct SCHEMA::predicate<547> { using type = facebook::glean::cpp::schema::Fbthrift::FileXRefs; };
+template<> struct SCHEMA::predicate<548> { using type = facebook::glean::cpp::schema::Fbthrift::File; };
+template<> struct SCHEMA::predicate<549> { using type = facebook::glean::cpp::schema::Fbthrift::StructType; };
+template<> struct SCHEMA::predicate<550> { using type = facebook::glean::cpp::schema::Fbthrift::UnionType; };
+template<> struct SCHEMA::predicate<551> { using type = facebook::glean::cpp::schema::Fbthrift::FieldDecl; };
+template<> struct SCHEMA::predicate<552> { using type = facebook::glean::cpp::schema::Fbthrift::ExceptionVal; };
+template<> struct SCHEMA::predicate<553> { using type = facebook::glean::cpp::schema::Fbthrift::ExceptionType; };
+template<> struct SCHEMA::predicate<554> { using type = facebook::glean::cpp::schema::Fbthrift::TypeDefException; };
+template<> struct SCHEMA::predicate<555> { using type = facebook::glean::cpp::schema::Fbthrift::ExceptionName; };
+template<> struct SCHEMA::predicate<556> { using type = facebook::glean::cpp::schema::Fbthrift::EnumerationType; };
+template<> struct SCHEMA::predicate<557> { using type = facebook::glean::cpp::schema::Fbthrift::EnumValueDef; };
+template<> struct SCHEMA::predicate<558> { using type = facebook::glean::cpp::schema::Fbthrift::EnumValue; };
+template<> struct SCHEMA::predicate<559> { using type = facebook::glean::cpp::schema::Fbthrift::EnumVal; };
+template<> struct SCHEMA::predicate<560> { using type = facebook::glean::cpp::schema::Fbthrift::DeclarationComment; };
+template<> struct SCHEMA::predicate<561> { using type = facebook::glean::cpp::schema::Fbthrift::DeclarationFile; };
+template<> struct SCHEMA::predicate<562> { using type = facebook::glean::cpp::schema::Fbthrift::DeclarationMember; };
+template<> struct SCHEMA::predicate<563> { using type = facebook::glean::cpp::schema::Fbthrift::DeclarationName; };
+template<> struct SCHEMA::predicate<564> { using type = facebook::glean::cpp::schema::Fbthrift::DeclarationNameSpan; };
+template<> struct SCHEMA::predicate<565> { using type = facebook::glean::cpp::schema::Fbthrift::DeclarationUses; };
+template<> struct SCHEMA::predicate<566> { using type = facebook::glean::cpp::schema::Fbthrift::FileDeclaration; };
+template<> struct SCHEMA::predicate<567> { using type = facebook::glean::cpp::schema::Fbthrift::FunctionDeclarationName; };
+template<> struct SCHEMA::predicate<568> { using type = facebook::glean::cpp::schema::Hack::HackToThrift; };
+template<> struct SCHEMA::predicate<569> { using type = facebook::glean::cpp::schema::Hack::ThriftToHack; };
+template<> struct SCHEMA::predicate<570> { using type = facebook::glean::cpp::schema::Fbthrift::TypeSpecification; };
+template<> struct SCHEMA::predicate<571> { using type = facebook::glean::cpp::schema::Fbthrift::ConstantDefinition; };
+template<> struct SCHEMA::predicate<572> { using type = facebook::glean::cpp::schema::Fbthrift::Constant; };
+template<> struct SCHEMA::predicate<573> { using type = facebook::glean::cpp::schema::Erlang::NameLowerCase; };
+template<> struct SCHEMA::predicate<574> { using type = facebook::glean::cpp::schema::Erlang::FunctionDeclaration; };
+template<> struct SCHEMA::predicate<575> { using type = facebook::glean::cpp::schema::Erlang::XRefsViaFqnByFile; };
+template<> struct SCHEMA::predicate<576> { using type = facebook::glean::cpp::schema::Erlang::DeclarationComment; };
+template<> struct SCHEMA::predicate<577> { using type = facebook::glean::cpp::schema::Erlang::DeclarationLocation; };
+template<> struct SCHEMA::predicate<578> { using type = facebook::glean::cpp::schema::Erlang::DeclarationReference; };
+template<> struct SCHEMA::predicate<579> { using type = facebook::glean::cpp::schema::Erlang::DeclarationToFqn; };
+template<> struct SCHEMA::predicate<580> { using type = facebook::glean::cpp::schema::Erlang::DeclarationUses; };
+template<> struct SCHEMA::predicate<581> { using type = facebook::glean::cpp::schema::Erlang::DeclarationWithFqn; };
+template<> struct SCHEMA::predicate<582> { using type = facebook::glean::cpp::schema::Erlang::DeclarationsByFile; };
+template<> struct SCHEMA::predicate<583> { using type = facebook::glean::cpp::schema::Erlang::SearchByName; };
+template<> struct SCHEMA::predicate<584> { using type = facebook::glean::cpp::schema::Dyn::ObserverIdentifier; };
+template<> struct SCHEMA::predicate<585> { using type = facebook::glean::cpp::schema::Dyn::Environment; };
+template<> struct SCHEMA::predicate<586> { using type = facebook::glean::cpp::schema::Dyn::EntityDynamicReference; };
+template<> struct SCHEMA::predicate<587> { using type = facebook::glean::cpp::schema::Digest::FileDigest; };
+template<> struct SCHEMA::predicate<588> { using type = facebook::glean::cpp::schema::Glass::FileInfo; };
+template<> struct SCHEMA::predicate<589> { using type = facebook::glean::cpp::schema::Dataswarm::TableDeclaration; };
+template<> struct SCHEMA::predicate<590> { using type = facebook::glean::cpp::schema::Dataswarm::TableColumnDeclaration; };
+template<> struct SCHEMA::predicate<591> { using type = facebook::glean::cpp::schema::Dataswarm::SubqueryDeclaration; };
+template<> struct SCHEMA::predicate<592> { using type = facebook::glean::cpp::schema::Dataswarm::SubqueryColumnDeclaration; };
+template<> struct SCHEMA::predicate<593> { using type = facebook::glean::cpp::schema::Dataswarm::MacroDeclaration; };
+template<> struct SCHEMA::predicate<594> { using type = facebook::glean::cpp::schema::Dataswarm::DeclarationLocation; };
+template<> struct SCHEMA::predicate<595> { using type = facebook::glean::cpp::schema::Dataswarm::DeclarationName; };
+template<> struct SCHEMA::predicate<596> { using type = facebook::glean::cpp::schema::Dataswarm::XRefsByFile; };
+template<> struct SCHEMA::predicate<597> { using type = facebook::glean::cpp::schema::Cxx1::VariableLowerCase; };
+template<> struct SCHEMA::predicate<598> { using type = facebook::glean::cpp::schema::Cxx1::UsingDirective; };
+template<> struct SCHEMA::predicate<599> { using type = facebook::glean::cpp::schema::Cxx1::UsingDeclaration; };
+template<> struct SCHEMA::predicate<600> { using type = facebook::glean::cpp::schema::Cxx1::TypeAliasLowerCase; };
+template<> struct SCHEMA::predicate<601> { using type = facebook::glean::cpp::schema::Cxx1::TypeAliasDeclaration; };
+template<> struct SCHEMA::predicate<602> { using type = facebook::glean::cpp::schema::Cxx1::Type; };
+template<> struct SCHEMA::predicate<603> { using type = facebook::glean::cpp::schema::Cxx1::TranslationUnitXRefs; };
+template<> struct SCHEMA::predicate<604> { using type = facebook::glean::cpp::schema::Cxx1::TranslationUnitTrace; };
+template<> struct SCHEMA::predicate<605> { using type = facebook::glean::cpp::schema::Cxx1::TranslationUnitIncludeTree; };
+template<> struct SCHEMA::predicate<606> { using type = facebook::glean::cpp::schema::Cxx1::Trace; };
+template<> struct SCHEMA::predicate<607> { using type = facebook::glean::cpp::schema::Cxx1::RecordUnionLowerCase; };
+template<> struct SCHEMA::predicate<608> { using type = facebook::glean::cpp::schema::Cxx1::RecordStructLowerCase; };
+template<> struct SCHEMA::predicate<609> { using type = facebook::glean::cpp::schema::Cxx1::RecordDerived; };
+template<> struct SCHEMA::predicate<610> { using type = facebook::glean::cpp::schema::Cxx1::RecordClassLowerCase; };
+template<> struct SCHEMA::predicate<611> { using type = facebook::glean::cpp::schema::Cxx1::Signature; };
+template<> struct SCHEMA::predicate<612> { using type = facebook::glean::cpp::schema::Cxx1::PPDefineLocation; };
+template<> struct SCHEMA::predicate<613> { using type = facebook::glean::cpp::schema::Cxx1::ObjcSelector; };
+template<> struct SCHEMA::predicate<614> { using type = facebook::glean::cpp::schema::Cxx1::ObjcPropertyImplementation; };
+template<> struct SCHEMA::predicate<615> { using type = facebook::glean::cpp::schema::Cxx1::ObjcPropertyIVar; };
+template<> struct SCHEMA::predicate<616> { using type = facebook::glean::cpp::schema::Cxx1::ObjcMethodDefinition; };
+template<> struct SCHEMA::predicate<617> { using type = facebook::glean::cpp::schema::Cxx1::ObjcMethodDeclarationName; };
+template<> struct SCHEMA::predicate<618> { using type = facebook::glean::cpp::schema::Cxx1::ObjcInterfaceToImplementation; };
+template<> struct SCHEMA::predicate<619> { using type = facebook::glean::cpp::schema::Cxx1::ObjcImplements; };
+template<> struct SCHEMA::predicate<620> { using type = facebook::glean::cpp::schema::Cxx1::ObjcContainerInterfaceLowerCase; };
+template<> struct SCHEMA::predicate<621> { using type = facebook::glean::cpp::schema::Cxx1::ObjcContainerInheritance; };
+template<> struct SCHEMA::predicate<622> { using type = facebook::glean::cpp::schema::Cxx1::ObjcContainerDefinition; };
+template<> struct SCHEMA::predicate<623> { using type = facebook::glean::cpp::schema::Cxx1::ObjcContainerDeclarationInterface; };
+template<> struct SCHEMA::predicate<624> { using type = facebook::glean::cpp::schema::Cxx1::ObjcContainerBase; };
+template<> struct SCHEMA::predicate<625> { using type = facebook::glean::cpp::schema::Cxx1::ObjcContainerDeclaration; };
+template<> struct SCHEMA::predicate<626> { using type = facebook::glean::cpp::schema::Cxx1::ObjcMethodDeclaration; };
+template<> struct SCHEMA::predicate<627> { using type = facebook::glean::cpp::schema::Cxx1::ObjcPropertyDeclaration; };
+template<> struct SCHEMA::predicate<628> { using type = facebook::glean::cpp::schema::Cxx1::ObjContainerIdName; };
+template<> struct SCHEMA::predicate<629> { using type = facebook::glean::cpp::schema::Cxx1::NamespaceQName; };
+template<> struct SCHEMA::predicate<630> { using type = facebook::glean::cpp::schema::Cxx1::NamespaceLowerCase; };
+template<> struct SCHEMA::predicate<631> { using type = facebook::glean::cpp::schema::Cxx1::NamespaceDefinition; };
+template<> struct SCHEMA::predicate<632> { using type = facebook::glean::cpp::schema::Cxx1::NamespaceDeclarationName; };
+template<> struct SCHEMA::predicate<633> { using type = facebook::glean::cpp::schema::Cxx1::NamespaceDeclarationByName; };
+template<> struct SCHEMA::predicate<634> { using type = facebook::glean::cpp::schema::Cxx1::NamespaceDeclaration; };
+template<> struct SCHEMA::predicate<635> { using type = facebook::glean::cpp::schema::Cxx1::NamespaceAliasDeclaration; };
+template<> struct SCHEMA::predicate<636> { using type = facebook::glean::cpp::schema::Cxx1::Name; };
+template<> struct SCHEMA::predicate<637> { using type = facebook::glean::cpp::schema::Cxx1::MethodOverrides; };
+template<> struct SCHEMA::predicate<638> { using type = facebook::glean::cpp::schema::Cxx1::MethodOverridden; };
+template<> struct SCHEMA::predicate<639> { using type = facebook::glean::cpp::schema::Cxx1::IncludeTreeTranslationUnit; };
+template<> struct SCHEMA::predicate<640> { using type = facebook::glean::cpp::schema::Cxx1::IncludeTreeParent; };
+template<> struct SCHEMA::predicate<641> { using type = facebook::glean::cpp::schema::Cxx1::IncludeTree; };
+template<> struct SCHEMA::predicate<642> { using type = facebook::glean::cpp::schema::Cxx1::PPTrace; };
+template<> struct SCHEMA::predicate<643> { using type = facebook::glean::cpp::schema::Cxx1::FunctionLowerCase; };
+template<> struct SCHEMA::predicate<644> { using type = facebook::glean::cpp::schema::Cxx1::FunctionDefinition; };
+template<> struct SCHEMA::predicate<645> { using type = facebook::glean::cpp::schema::Cxx1::FunctionDeclarationNameString; };
+template<> struct SCHEMA::predicate<646> { using type = facebook::glean::cpp::schema::Cxx1::FunctionDeclarationName; };
+template<> struct SCHEMA::predicate<647> { using type = facebook::glean::cpp::schema::Cxx1::FunctionDeclaration; };
+template<> struct SCHEMA::predicate<648> { using type = facebook::glean::cpp::schema::Cxx1::FunctionDeclAttribute; };
+template<> struct SCHEMA::predicate<649> { using type = facebook::glean::cpp::schema::Cxx1::FunctionAttribute; };
+template<> struct SCHEMA::predicate<650> { using type = facebook::glean::cpp::schema::Cxx1::FileXRefs; };
+template<> struct SCHEMA::predicate<651> { using type = facebook::glean::cpp::schema::Cxx1::FilePPUseXRefs; };
+template<> struct SCHEMA::predicate<652> { using type = facebook::glean::cpp::schema::Cxx1::FilePPUseTraceXRefs; };
+template<> struct SCHEMA::predicate<653> { using type = facebook::glean::cpp::schema::Cxx1::FilePPTraceXRefs; };
+template<> struct SCHEMA::predicate<654> { using type = facebook::glean::cpp::schema::Cxx1::VariableDeclaration; };
+template<> struct SCHEMA::predicate<655> { using type = facebook::glean::cpp::schema::Cxx1::EnumeratorLowerCase; };
+template<> struct SCHEMA::predicate<656> { using type = facebook::glean::cpp::schema::Cxx1::EnumeratorInEnum; };
+template<> struct SCHEMA::predicate<657> { using type = facebook::glean::cpp::schema::Cxx1::EnumeratorByName; };
+template<> struct SCHEMA::predicate<658> { using type = facebook::glean::cpp::schema::Cxx1::Enumerator; };
+template<> struct SCHEMA::predicate<659> { using type = facebook::glean::cpp::schema::Cxx1::EnumLowerCase; };
+template<> struct SCHEMA::predicate<660> { using type = facebook::glean::cpp::schema::Cxx1::EnumDefinition; };
+template<> struct SCHEMA::predicate<661> { using type = facebook::glean::cpp::schema::Cxx1::EnumDeclaration; };
+template<> struct SCHEMA::predicate<662> { using type = facebook::glean::cpp::schema::Cxx1::DefnInRecord; };
+template<> struct SCHEMA::predicate<663> { using type = facebook::glean::cpp::schema::Cxx1::DeclarationComment; };
+template<> struct SCHEMA::predicate<664> { using type = facebook::glean::cpp::schema::Cxx1::DeclarationInTrace; };
+template<> struct SCHEMA::predicate<665> { using type = facebook::glean::cpp::schema::Cxx1::DeclarationLocationName; };
+template<> struct SCHEMA::predicate<666> { using type = facebook::glean::cpp::schema::Cxx1::DeclarationLocationNameSpan; };
+template<> struct SCHEMA::predicate<667> { using type = facebook::glean::cpp::schema::Cxx1::DeclarationNameSpan; };
+template<> struct SCHEMA::predicate<668> { using type = facebook::glean::cpp::schema::Cxx1::DeclarationSources; };
+template<> struct SCHEMA::predicate<669> { using type = facebook::glean::cpp::schema::Cxx1::DeclarationSrcRange; };
+template<> struct SCHEMA::predicate<670> { using type = facebook::glean::cpp::schema::Cxx1::DeclarationTargets; };
+template<> struct SCHEMA::predicate<671> { using type = facebook::glean::cpp::schema::Cxx1::DeclarationToUSR; };
+template<> struct SCHEMA::predicate<672> { using type = facebook::glean::cpp::schema::Cxx1::Declarations; };
+template<> struct SCHEMA::predicate<673> { using type = facebook::glean::cpp::schema::Cxx1::DefToBaseDecl; };
+template<> struct SCHEMA::predicate<674> { using type = facebook::glean::cpp::schema::Cxx1::MangledNameHashToDeclaration; };
+template<> struct SCHEMA::predicate<675> { using type = facebook::glean::cpp::schema::Cxx1::Same; };
+template<> struct SCHEMA::predicate<676> { using type = facebook::glean::cpp::schema::Cxx1::USRToDeclaration; };
+template<> struct SCHEMA::predicate<677> { using type = facebook::glean::cpp::schema::Cxx1::FileXRefMap; };
+template<> struct SCHEMA::predicate<678> { using type = facebook::glean::cpp::schema::Cxx1::SpellingXRef; };
+template<> struct SCHEMA::predicate<679> { using type = facebook::glean::cpp::schema::Cxx1::TargetUses; };
+template<> struct SCHEMA::predicate<680> { using type = facebook::glean::cpp::schema::Cxx1::ThriftToCxx; };
+template<> struct SCHEMA::predicate<681> { using type = facebook::glean::cpp::schema::Cxx1::XRefIndirectTarget; };
+template<> struct SCHEMA::predicate<682> { using type = facebook::glean::cpp::schema::Cxx1::XRefTargets; };
+template<> struct SCHEMA::predicate<683> { using type = facebook::glean::cpp::schema::Symbolid::Cxx::LookupNamespaceDeclaration; };
+template<> struct SCHEMA::predicate<684> { using type = facebook::glean::cpp::schema::Cxx1::DeclToFamily; };
+template<> struct SCHEMA::predicate<685> { using type = facebook::glean::cpp::schema::Cxx1::DeclInRecord; };
+template<> struct SCHEMA::predicate<686> { using type = facebook::glean::cpp::schema::Cxx1::DeclInObjcContainer; };
+template<> struct SCHEMA::predicate<687> { using type = facebook::glean::cpp::schema::Cxx1::DeclFamilyOf; };
+template<> struct SCHEMA::predicate<688> { using type = facebook::glean::cpp::schema::Cxx1::DeclFamily; };
+template<> struct SCHEMA::predicate<689> { using type = facebook::glean::cpp::schema::Cxx1::CxxToThrift; };
+template<> struct SCHEMA::predicate<690> { using type = facebook::glean::cpp::schema::Cxx1::Attribute; };
+template<> struct SCHEMA::predicate<691> { using type = facebook::glean::cpp::schema::Cxx1::RecordDefinition; };
+template<> struct SCHEMA::predicate<692> { using type = facebook::glean::cpp::schema::Csharp::UnityPackageToProject; };
+template<> struct SCHEMA::predicate<693> { using type = facebook::glean::cpp::schema::Csharp::UnityPackage; };
+template<> struct SCHEMA::predicate<694> { using type = facebook::glean::cpp::schema::Csharp::UnityProjectSource; };
+template<> struct SCHEMA::predicate<695> { using type = facebook::glean::cpp::schema::Csharp::TypeParameter; };
+template<> struct SCHEMA::predicate<696> { using type = facebook::glean::cpp::schema::Csharp::SourceFileToProject; };
+template<> struct SCHEMA::predicate<697> { using type = facebook::glean::cpp::schema::Csharp::SolutionToProject; };
+template<> struct SCHEMA::predicate<698> { using type = facebook::glean::cpp::schema::Csharp::Solution; };
+template<> struct SCHEMA::predicate<699> { using type = facebook::glean::cpp::schema::Csharp::ProjectToSourceFile; };
+template<> struct SCHEMA::predicate<700> { using type = facebook::glean::cpp::schema::Csharp::ProjectToSolution; };
+template<> struct SCHEMA::predicate<701> { using type = facebook::glean::cpp::schema::Csharp::Project; };
+template<> struct SCHEMA::predicate<702> { using type = facebook::glean::cpp::schema::Csharp::Namespace; };
+template<> struct SCHEMA::predicate<703> { using type = facebook::glean::cpp::schema::Csharp::NameLowerCase; };
+template<> struct SCHEMA::predicate<704> { using type = facebook::glean::cpp::schema::Csharp::Name; };
+template<> struct SCHEMA::predicate<705> { using type = facebook::glean::cpp::schema::Csharp::MSBuildProjectSource; };
+template<> struct SCHEMA::predicate<706> { using type = facebook::glean::cpp::schema::Csharp::MemberAccessLocation; };
+template<> struct SCHEMA::predicate<707> { using type = facebook::glean::cpp::schema::Csharp::MethodInvocationLocation; };
+template<> struct SCHEMA::predicate<708> { using type = facebook::glean::cpp::schema::Csharp::Implements; };
+template<> struct SCHEMA::predicate<709> { using type = facebook::glean::cpp::schema::Csharp::FunctionPointerType; };
+template<> struct SCHEMA::predicate<710> { using type = facebook::glean::cpp::schema::Csharp::FullName; };
+template<> struct SCHEMA::predicate<711> { using type = facebook::glean::cpp::schema::Csharp::Class; };
+template<> struct SCHEMA::predicate<712> { using type = facebook::glean::cpp::schema::Csharp::Interface; };
+template<> struct SCHEMA::predicate<713> { using type = facebook::glean::cpp::schema::Csharp::Record; };
+template<> struct SCHEMA::predicate<714> { using type = facebook::glean::cpp::schema::Csharp::Struct; };
+template<> struct SCHEMA::predicate<715> { using type = facebook::glean::cpp::schema::Csharp::ArrayType; };
+template<> struct SCHEMA::predicate<716> { using type = facebook::glean::cpp::schema::Csharp::DefinitionLocation; };
+template<> struct SCHEMA::predicate<717> { using type = facebook::glean::cpp::schema::Csharp::DefinitionLocationName; };
+template<> struct SCHEMA::predicate<718> { using type = facebook::glean::cpp::schema::Csharp::FileDefinitions; };
+template<> struct SCHEMA::predicate<719> { using type = facebook::glean::cpp::schema::Csharp::FileEntityXRefs; };
+template<> struct SCHEMA::predicate<720> { using type = facebook::glean::cpp::schema::Csharp::SearchByName; };
+template<> struct SCHEMA::predicate<721> { using type = facebook::glean::cpp::schema::Csharp::Field; };
+template<> struct SCHEMA::predicate<722> { using type = facebook::glean::cpp::schema::Csharp::Local; };
+template<> struct SCHEMA::predicate<723> { using type = facebook::glean::cpp::schema::Csharp::Method; };
+template<> struct SCHEMA::predicate<724> { using type = facebook::glean::cpp::schema::Csharp::ObjectCreationLocation; };
+template<> struct SCHEMA::predicate<725> { using type = facebook::glean::cpp::schema::Csharp::Parameter; };
+template<> struct SCHEMA::predicate<726> { using type = facebook::glean::cpp::schema::Csharp::PointerType; };
+template<> struct SCHEMA::predicate<727> { using type = facebook::glean::cpp::schema::Csharp::Property; };
+template<> struct SCHEMA::predicate<728> { using type = facebook::glean::cpp::schema::Csharp::TypeLocation; };
+template<> struct SCHEMA::predicate<729> { using type = facebook::glean::cpp::schema::Codemarkup::Yaml::YamlDataAvailable; };
+template<> struct SCHEMA::predicate<730> { using type = facebook::glean::cpp::schema::Search::Code::CxxNameLowerCase; };
+template<> struct SCHEMA::predicate<731> { using type = facebook::glean::cpp::schema::Search::Code::FlowNameLowerCase; };
+template<> struct SCHEMA::predicate<732> { using type = facebook::glean::cpp::schema::Search::Code::HackNameLowerCase; };
+template<> struct SCHEMA::predicate<733> { using type = facebook::glean::cpp::schema::Search::Code::PythonNameLowerCase; };
+template<> struct SCHEMA::predicate<734> { using type = facebook::glean::cpp::schema::Codemarkup::Types::RangeSpanContains; };
+template<> struct SCHEMA::predicate<735> { using type = facebook::glean::cpp::schema::Codemarkup::Scip::LsifKindToKind; };
+template<> struct SCHEMA::predicate<736> { using type = facebook::glean::cpp::schema::Codemarkup::Scip::FileXLangSymbolRefs; };
+template<> struct SCHEMA::predicate<737> { using type = facebook::glean::cpp::schema::Codemarkup::Python::NonImportPythonDeclarationKind; };
+template<> struct SCHEMA::predicate<738> { using type = facebook::glean::cpp::schema::Codemarkup::Python::NonImportPythonDeclarationInfo; };
+template<> struct SCHEMA::predicate<739> { using type = facebook::glean::cpp::schema::Codemarkup::Python::ConvertLabel; };
+template<> struct SCHEMA::predicate<740> { using type = facebook::glean::cpp::schema::Codemarkup::Pp::PpIncludeXRefLocations; };
+template<> struct SCHEMA::predicate<741> { using type = facebook::glean::cpp::schema::Codemarkup::Lsif::LsifKindToKind; };
+template<> struct SCHEMA::predicate<742> { using type = facebook::glean::cpp::schema::Codemarkup::Hack::HackInheritedEntities; };
+template<> struct SCHEMA::predicate<743> { using type = facebook::glean::cpp::schema::Codemarkup::Hack::HackEnumInheritedMembers; };
+template<> struct SCHEMA::predicate<744> { using type = facebook::glean::cpp::schema::Codemarkup::Hack::FromHackVisibility; };
+template<> struct SCHEMA::predicate<745> { using type = facebook::glean::cpp::schema::Codemarkup::Flow::FlowDocumentationSpan; };
+template<> struct SCHEMA::predicate<746> { using type = facebook::glean::cpp::schema::Codemarkup::Flow::FlowDeclarationDocumentation; };
+template<> struct SCHEMA::predicate<747> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::FromCxxVisibility; };
+template<> struct SCHEMA::predicate<748> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxFileEntityXMapVariableXRefDeclLocations; };
+template<> struct SCHEMA::predicate<749> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxDeclarationModifiers; };
+template<> struct SCHEMA::predicate<750> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxDeclVisibility; };
+template<> struct SCHEMA::predicate<751> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxDeclKind; };
+template<> struct SCHEMA::predicate<752> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxDeclInfo; };
+template<> struct SCHEMA::predicate<753> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxDataAvailable; };
+template<> struct SCHEMA::predicate<754> { using type = facebook::glean::cpp::schema::Codemarkup::IndexedFile; };
+template<> struct SCHEMA::predicate<755> { using type = facebook::glean::cpp::schema::Codemarkup::EntityDataAvailable; };
+template<> struct SCHEMA::predicate<756> { using type = facebook::glean::cpp::schema::Codemarkup::Scip::EntityInfo; };
+template<> struct SCHEMA::predicate<757> { using type = facebook::glean::cpp::schema::Codemarkup::Scip::ScipEntityDocumentation; };
+template<> struct SCHEMA::predicate<758> { using type = facebook::glean::cpp::schema::Codemarkup::Scip::ScipEntityLocation; };
+template<> struct SCHEMA::predicate<759> { using type = facebook::glean::cpp::schema::Codemarkup::Scip::ScipEntityUses; };
+template<> struct SCHEMA::predicate<760> { using type = facebook::glean::cpp::schema::Codemarkup::Scip::ScipFileEntityXRefLocations; };
+template<> struct SCHEMA::predicate<761> { using type = facebook::glean::cpp::schema::Codemarkup::Scip::ScipResolveLocation; };
+template<> struct SCHEMA::predicate<762> { using type = facebook::glean::cpp::schema::Codemarkup::Python::PythonContainsChildEntity; };
+template<> struct SCHEMA::predicate<763> { using type = facebook::glean::cpp::schema::Codemarkup::Python::PythonContainsParentEntity; };
+template<> struct SCHEMA::predicate<764> { using type = facebook::glean::cpp::schema::Codemarkup::Python::PythonEntityComments; };
+template<> struct SCHEMA::predicate<765> { using type = facebook::glean::cpp::schema::Codemarkup::Python::PythonEntityInfo; };
+template<> struct SCHEMA::predicate<766> { using type = facebook::glean::cpp::schema::Codemarkup::Python::PythonEntityKind; };
+template<> struct SCHEMA::predicate<767> { using type = facebook::glean::cpp::schema::Codemarkup::Python::PythonEntityLocation; };
+template<> struct SCHEMA::predicate<768> { using type = facebook::glean::cpp::schema::Codemarkup::Python::PythonEntityModuleName; };
+template<> struct SCHEMA::predicate<769> { using type = facebook::glean::cpp::schema::Codemarkup::Python::PythonEntityUses; };
+template<> struct SCHEMA::predicate<770> { using type = facebook::glean::cpp::schema::Codemarkup::Python::PythonExtendsChildEntity; };
+template<> struct SCHEMA::predicate<771> { using type = facebook::glean::cpp::schema::Codemarkup::Python::PythonExtendsParentEntity; };
+template<> struct SCHEMA::predicate<772> { using type = facebook::glean::cpp::schema::Codemarkup::Python::PythonFileEntityXRefLocations; };
+template<> struct SCHEMA::predicate<773> { using type = facebook::glean::cpp::schema::Codemarkup::Python::PythonModifiers; };
+template<> struct SCHEMA::predicate<774> { using type = facebook::glean::cpp::schema::Codemarkup::Python::PythonResolveLocation; };
+template<> struct SCHEMA::predicate<775> { using type = facebook::glean::cpp::schema::Codemarkup::Python::PythonVisibility; };
+template<> struct SCHEMA::predicate<776> { using type = facebook::glean::cpp::schema::Codemarkup::Python::PythonAnnotation; };
+template<> struct SCHEMA::predicate<777> { using type = facebook::glean::cpp::schema::Codemarkup::Pp::PPEntityLocation; };
+template<> struct SCHEMA::predicate<778> { using type = facebook::glean::cpp::schema::Codemarkup::Pp::PpEntityInfo; };
+template<> struct SCHEMA::predicate<779> { using type = facebook::glean::cpp::schema::Codemarkup::Pp::PpEntityKind; };
+template<> struct SCHEMA::predicate<780> { using type = facebook::glean::cpp::schema::Codemarkup::Pp::PpEntityTraceXRefLocations; };
+template<> struct SCHEMA::predicate<781> { using type = facebook::glean::cpp::schema::Codemarkup::Pp::PpEntityUses; };
+template<> struct SCHEMA::predicate<782> { using type = facebook::glean::cpp::schema::Codemarkup::Pp::PpFileEntityXRefLocations; };
+template<> struct SCHEMA::predicate<783> { using type = facebook::glean::cpp::schema::Codemarkup::Pp::PpResolveLocation; };
+template<> struct SCHEMA::predicate<784> { using type = facebook::glean::cpp::schema::Codemarkup::Pp::PpResolveTraceLocation; };
+template<> struct SCHEMA::predicate<785> { using type = facebook::glean::cpp::schema::Codemarkup::Lsif::EntityInfo; };
+template<> struct SCHEMA::predicate<786> { using type = facebook::glean::cpp::schema::Codemarkup::Lsif::LsifEntityLocation; };
+template<> struct SCHEMA::predicate<787> { using type = facebook::glean::cpp::schema::Codemarkup::Lsif::LsifEntityModuleName; };
+template<> struct SCHEMA::predicate<788> { using type = facebook::glean::cpp::schema::Codemarkup::Lsif::LsifEntityUses; };
+template<> struct SCHEMA::predicate<789> { using type = facebook::glean::cpp::schema::Codemarkup::Lsif::LsifFileEntityXRefLocations; };
+template<> struct SCHEMA::predicate<790> { using type = facebook::glean::cpp::schema::Codemarkup::Lsif::LsifResolveLocation; };
+template<> struct SCHEMA::predicate<791> { using type = facebook::glean::cpp::schema::Codemarkup::Kotlin::KotlinContainsChildEntity; };
+template<> struct SCHEMA::predicate<792> { using type = facebook::glean::cpp::schema::Codemarkup::Kotlin::KotlinContainsParentEntity; };
+template<> struct SCHEMA::predicate<793> { using type = facebook::glean::cpp::schema::Codemarkup::Kotlin::KotlinEntityKind; };
+template<> struct SCHEMA::predicate<794> { using type = facebook::glean::cpp::schema::Codemarkup::Kotlin::KotlinEntityLocation; };
+template<> struct SCHEMA::predicate<795> { using type = facebook::glean::cpp::schema::Codemarkup::Kotlin::KotlinEntityUses; };
+template<> struct SCHEMA::predicate<796> { using type = facebook::glean::cpp::schema::Codemarkup::Kotlin::KotlinExtendsParentEntity; };
+template<> struct SCHEMA::predicate<797> { using type = facebook::glean::cpp::schema::Codemarkup::Kotlin::KotlinFileEntityXRefLocations; };
+template<> struct SCHEMA::predicate<798> { using type = facebook::glean::cpp::schema::Codemarkup::Kotlin::KotlinResolveLocation; };
+template<> struct SCHEMA::predicate<799> { using type = facebook::glean::cpp::schema::Codemarkup::Java::JavaContainsChildEntity; };
+template<> struct SCHEMA::predicate<800> { using type = facebook::glean::cpp::schema::Codemarkup::Java::JavaContainsParentEntity; };
+template<> struct SCHEMA::predicate<801> { using type = facebook::glean::cpp::schema::Codemarkup::Java::JavaEntityDocumentation; };
+template<> struct SCHEMA::predicate<802> { using type = facebook::glean::cpp::schema::Codemarkup::Java::JavaEntityKind; };
+template<> struct SCHEMA::predicate<803> { using type = facebook::glean::cpp::schema::Codemarkup::Java::JavaEntityLocation; };
+template<> struct SCHEMA::predicate<804> { using type = facebook::glean::cpp::schema::Codemarkup::Java::JavaEntityUses; };
+template<> struct SCHEMA::predicate<805> { using type = facebook::glean::cpp::schema::Codemarkup::Java::JavaExtendsChildEntity; };
+template<> struct SCHEMA::predicate<806> { using type = facebook::glean::cpp::schema::Codemarkup::Java::JavaExtendsParentEntity; };
+template<> struct SCHEMA::predicate<807> { using type = facebook::glean::cpp::schema::Codemarkup::Java::JavaModifiers; };
+template<> struct SCHEMA::predicate<808> { using type = facebook::glean::cpp::schema::Codemarkup::Java::JavaResolveLocation; };
+template<> struct SCHEMA::predicate<809> { using type = facebook::glean::cpp::schema::Codemarkup::Java::JavaVisibility; };
+template<> struct SCHEMA::predicate<810> { using type = facebook::glean::cpp::schema::Codemarkup::Java::JavalFileEntityXRefLocations; };
+template<> struct SCHEMA::predicate<811> { using type = facebook::glean::cpp::schema::Codemarkup::Java::JavaAnnotation; };
+template<> struct SCHEMA::predicate<812> { using type = facebook::glean::cpp::schema::Codemarkup::Haskell::HaskellContainsChildEntity; };
+template<> struct SCHEMA::predicate<813> { using type = facebook::glean::cpp::schema::Codemarkup::Haskell::HaskellContainsParentEntity; };
+template<> struct SCHEMA::predicate<814> { using type = facebook::glean::cpp::schema::Codemarkup::Haskell::HaskellEntityLocation; };
+template<> struct SCHEMA::predicate<815> { using type = facebook::glean::cpp::schema::Codemarkup::Haskell::HaskellEntityUses; };
+template<> struct SCHEMA::predicate<816> { using type = facebook::glean::cpp::schema::Codemarkup::Haskell::HaskellFileEntityXRefLocations; };
+template<> struct SCHEMA::predicate<817> { using type = facebook::glean::cpp::schema::Codemarkup::Haskell::HaskellResolveLocation; };
+template<> struct SCHEMA::predicate<818> { using type = facebook::glean::cpp::schema::Search::Hs::SearchByLowerCaseName; };
+template<> struct SCHEMA::predicate<819> { using type = facebook::glean::cpp::schema::Search::Hs::SearchByName; };
+template<> struct SCHEMA::predicate<820> { using type = facebook::glean::cpp::schema::Codemarkup::Hack::EntityHasHideFromDocsAttr; };
+template<> struct SCHEMA::predicate<821> { using type = facebook::glean::cpp::schema::Codemarkup::Hack::HackContainsChildEntity; };
+template<> struct SCHEMA::predicate<822> { using type = facebook::glean::cpp::schema::Codemarkup::Hack::HackContainsParentEntity; };
+template<> struct SCHEMA::predicate<823> { using type = facebook::glean::cpp::schema::Codemarkup::Hack::HackEntityDocumentation; };
+template<> struct SCHEMA::predicate<824> { using type = facebook::glean::cpp::schema::Codemarkup::Hack::HackEntityInfo; };
+template<> struct SCHEMA::predicate<825> { using type = facebook::glean::cpp::schema::Codemarkup::Hack::HackEntityKind; };
+template<> struct SCHEMA::predicate<826> { using type = facebook::glean::cpp::schema::Codemarkup::Hack::HackEntityLocation; };
+template<> struct SCHEMA::predicate<827> { using type = facebook::glean::cpp::schema::Codemarkup::Hack::HackEntityModuleName; };
+template<> struct SCHEMA::predicate<828> { using type = facebook::glean::cpp::schema::Codemarkup::Hack::HackEntitySource; };
+template<> struct SCHEMA::predicate<829> { using type = facebook::glean::cpp::schema::Codemarkup::Hack::HackEntityUses; };
+template<> struct SCHEMA::predicate<830> { using type = facebook::glean::cpp::schema::Codemarkup::Hack::HackExtendsChildEntity; };
+template<> struct SCHEMA::predicate<831> { using type = facebook::glean::cpp::schema::Codemarkup::Hack::HackExtendsParentEntity; };
+template<> struct SCHEMA::predicate<832> { using type = facebook::glean::cpp::schema::Codemarkup::Hack::HackExtendsParentEntityConcise; };
+template<> struct SCHEMA::predicate<833> { using type = facebook::glean::cpp::schema::Codemarkup::Hack::HackFileEntityXRefLocations; };
+template<> struct SCHEMA::predicate<834> { using type = facebook::glean::cpp::schema::Codemarkup::Hack::HackFileEntityXRefSpans; };
+template<> struct SCHEMA::predicate<835> { using type = facebook::glean::cpp::schema::Codemarkup::Hack::HackModifiers; };
+template<> struct SCHEMA::predicate<836> { using type = facebook::glean::cpp::schema::Codemarkup::Hack::HackRequiredConstraint; };
+template<> struct SCHEMA::predicate<837> { using type = facebook::glean::cpp::schema::Codemarkup::Hack::HackResolveLocation; };
+template<> struct SCHEMA::predicate<838> { using type = facebook::glean::cpp::schema::Codemarkup::Hack::HackVisibility; };
+template<> struct SCHEMA::predicate<839> { using type = facebook::glean::cpp::schema::Codemarkup::Hack::HackAnnotation; };
+template<> struct SCHEMA::predicate<840> { using type = facebook::glean::cpp::schema::Codemarkup::Graphql::GraphQLEntityKind; };
+template<> struct SCHEMA::predicate<841> { using type = facebook::glean::cpp::schema::Codemarkup::Graphql::GraphQLEntityLocation; };
+template<> struct SCHEMA::predicate<842> { using type = facebook::glean::cpp::schema::Codemarkup::Graphql::GraphQLEntityUses; };
+template<> struct SCHEMA::predicate<843> { using type = facebook::glean::cpp::schema::Codemarkup::Graphql::GraphQLFileEntityXRefLocations; };
+template<> struct SCHEMA::predicate<844> { using type = facebook::glean::cpp::schema::Codemarkup::Graphql::GraphQLResolveLocation; };
+template<> struct SCHEMA::predicate<845> { using type = facebook::glean::cpp::schema::Codemarkup::Flow::FlowContainsChildEntity; };
+template<> struct SCHEMA::predicate<846> { using type = facebook::glean::cpp::schema::Codemarkup::Flow::FlowContainsParentEntity; };
+template<> struct SCHEMA::predicate<847> { using type = facebook::glean::cpp::schema::Codemarkup::Flow::FlowEntityDocumentation; };
+template<> struct SCHEMA::predicate<848> { using type = facebook::glean::cpp::schema::Codemarkup::Flow::FlowEntityKind; };
+template<> struct SCHEMA::predicate<849> { using type = facebook::glean::cpp::schema::Codemarkup::Flow::FlowEntityLocation; };
+template<> struct SCHEMA::predicate<850> { using type = facebook::glean::cpp::schema::Codemarkup::Flow::FlowEntityModuleName; };
+template<> struct SCHEMA::predicate<851> { using type = facebook::glean::cpp::schema::Codemarkup::Flow::FlowEntityUses; };
+template<> struct SCHEMA::predicate<852> { using type = facebook::glean::cpp::schema::Codemarkup::Flow::FlowFileEntityXRefLocations; };
+template<> struct SCHEMA::predicate<853> { using type = facebook::glean::cpp::schema::Codemarkup::Flow::FlowFileImportDeclEntityXRefLocations; };
+template<> struct SCHEMA::predicate<854> { using type = facebook::glean::cpp::schema::Codemarkup::Flow::FlowFileReferenceEntityXRefLocations; };
+template<> struct SCHEMA::predicate<855> { using type = facebook::glean::cpp::schema::Codemarkup::Flow::FlowResolveLocation; };
+template<> struct SCHEMA::predicate<856> { using type = facebook::glean::cpp::schema::Codemarkup::Fbthrift::FbthriftEntityDocumentation; };
+template<> struct SCHEMA::predicate<857> { using type = facebook::glean::cpp::schema::Codemarkup::Fbthrift::FbthriftEntityUses; };
+template<> struct SCHEMA::predicate<858> { using type = facebook::glean::cpp::schema::Codemarkup::Fbthrift::ThriftContainsChildEntity; };
+template<> struct SCHEMA::predicate<859> { using type = facebook::glean::cpp::schema::Codemarkup::Fbthrift::ThriftContainsParentEntity; };
+template<> struct SCHEMA::predicate<860> { using type = facebook::glean::cpp::schema::Codemarkup::Fbthrift::ThriftEntityKind; };
+template<> struct SCHEMA::predicate<861> { using type = facebook::glean::cpp::schema::Codemarkup::Fbthrift::ThriftEntityLocation; };
+template<> struct SCHEMA::predicate<862> { using type = facebook::glean::cpp::schema::Codemarkup::Fbthrift::ThriftExtendsChildEntity; };
+template<> struct SCHEMA::predicate<863> { using type = facebook::glean::cpp::schema::Codemarkup::Fbthrift::ThriftExtendsParentEntity; };
+template<> struct SCHEMA::predicate<864> { using type = facebook::glean::cpp::schema::Codemarkup::Fbthrift::ThriftFileEntityXRefLocations; };
+template<> struct SCHEMA::predicate<865> { using type = facebook::glean::cpp::schema::Codemarkup::Fbthrift::ThriftResolveLocation; };
+template<> struct SCHEMA::predicate<866> { using type = facebook::glean::cpp::schema::Codemarkup::Erlang::ErlangEntityDocumentation; };
+template<> struct SCHEMA::predicate<867> { using type = facebook::glean::cpp::schema::Codemarkup::Erlang::ErlangEntityInfo; };
+template<> struct SCHEMA::predicate<868> { using type = facebook::glean::cpp::schema::Codemarkup::Erlang::ErlangEntityKind; };
+template<> struct SCHEMA::predicate<869> { using type = facebook::glean::cpp::schema::Codemarkup::Erlang::ErlangEntityLocation; };
+template<> struct SCHEMA::predicate<870> { using type = facebook::glean::cpp::schema::Codemarkup::Erlang::ErlangEntityUses; };
+template<> struct SCHEMA::predicate<871> { using type = facebook::glean::cpp::schema::Codemarkup::Erlang::ErlangFileEntityXRefLocations; };
+template<> struct SCHEMA::predicate<872> { using type = facebook::glean::cpp::schema::Codemarkup::Erlang::ErlangResolveLocation; };
+template<> struct SCHEMA::predicate<873> { using type = facebook::glean::cpp::schema::Search::Erlang::SearchByFQN; };
+template<> struct SCHEMA::predicate<874> { using type = facebook::glean::cpp::schema::Search::Erlang::SearchByName; };
+template<> struct SCHEMA::predicate<875> { using type = facebook::glean::cpp::schema::Codemarkup::Dataswarm::DataswarmFileEntityXRefLocations; };
+template<> struct SCHEMA::predicate<876> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxContainsChildEntity; };
+template<> struct SCHEMA::predicate<877> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxContainsParentEntity; };
+template<> struct SCHEMA::predicate<878> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxDeclToDefXRefTargetLocation; };
+template<> struct SCHEMA::predicate<879> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxDeclarationContainsChild; };
+template<> struct SCHEMA::predicate<880> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxDeclarationContainsParent; };
+template<> struct SCHEMA::predicate<881> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxDeclarationExtendsChild; };
+template<> struct SCHEMA::predicate<882> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxDeclarationExtendsParent; };
+template<> struct SCHEMA::predicate<883> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxDeclarationSource; };
+template<> struct SCHEMA::predicate<884> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxDefToDeclFamilyXRefTargetLocation; };
+template<> struct SCHEMA::predicate<885> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxEntityDocumentation; };
+template<> struct SCHEMA::predicate<886> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxEntityInfo; };
+template<> struct SCHEMA::predicate<887> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxEntityKind; };
+template<> struct SCHEMA::predicate<888> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxEntityLocation; };
+template<> struct SCHEMA::predicate<889> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxEntityMangledNameHash; };
+template<> struct SCHEMA::predicate<890> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxEntitySource; };
+template<> struct SCHEMA::predicate<891> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxEntityUSR; };
+template<> struct SCHEMA::predicate<892> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxEntityUses; };
+template<> struct SCHEMA::predicate<893> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxExtendsChildEntity; };
+template<> struct SCHEMA::predicate<894> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxExtendsParentEntity; };
+template<> struct SCHEMA::predicate<895> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxFileEntitySpellingXRefLocations; };
+template<> struct SCHEMA::predicate<896> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxFileEntityTraceDeclToDefXRefLocations; };
+template<> struct SCHEMA::predicate<897> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxFileEntityXMapFixedXRefLocations; };
+template<> struct SCHEMA::predicate<898> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxFileEntityXMapVariableXRefDeclToDefs; };
+template<> struct SCHEMA::predicate<899> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxFileEntityXRefLocations; };
+template<> struct SCHEMA::predicate<900> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxFindDefinitionOfEntity; };
+template<> struct SCHEMA::predicate<901> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxModifiers; };
+template<> struct SCHEMA::predicate<902> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxNamespaceDeclarationContainsChild; };
+template<> struct SCHEMA::predicate<903> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxResolveDeclarationToEntity; };
+template<> struct SCHEMA::predicate<904> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxResolveLocation; };
+template<> struct SCHEMA::predicate<905> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxResolveTraceLocation; };
+template<> struct SCHEMA::predicate<906> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxVisibility; };
+template<> struct SCHEMA::predicate<907> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxXRefTargetLocation; };
+template<> struct SCHEMA::predicate<908> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::EntityToXRefTarget; };
+template<> struct SCHEMA::predicate<909> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::SymbolToEntity; };
+template<> struct SCHEMA::predicate<910> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::XRefTargetToEntity; };
+template<> struct SCHEMA::predicate<911> { using type = facebook::glean::cpp::schema::Search::Code::CxxPreferDefinitions; };
+template<> struct SCHEMA::predicate<912> { using type = facebook::glean::cpp::schema::Search::Kind::Cxx::SearchObjcInterface; };
+template<> struct SCHEMA::predicate<913> { using type = facebook::glean::cpp::schema::Symbolid::Cxx::DefinitionOfDecl; };
+template<> struct SCHEMA::predicate<914> { using type = facebook::glean::cpp::schema::Symbolid::Cxx::LookupNamespaceDefinition; };
+template<> struct SCHEMA::predicate<915> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxDefinitionContainsChild; };
+template<> struct SCHEMA::predicate<916> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxDefinitionContainsParent; };
+template<> struct SCHEMA::predicate<917> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxDefinitionExtendsChild; };
+template<> struct SCHEMA::predicate<918> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxDefinitionExtendsParent; };
+template<> struct SCHEMA::predicate<919> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxDefinitionModifiers; };
+template<> struct SCHEMA::predicate<920> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxDefnVisibility; };
+template<> struct SCHEMA::predicate<921> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxEntityDefinitionBase; };
+template<> struct SCHEMA::predicate<922> { using type = facebook::glean::cpp::schema::Search::Cxx::DeclIsDefn; };
+template<> struct SCHEMA::predicate<923> { using type = facebook::glean::cpp::schema::Code::Cxx::DeclToDef; };
+template<> struct SCHEMA::predicate<924> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxAnnotation; };
+template<> struct SCHEMA::predicate<925> { using type = facebook::glean::cpp::schema::Codemarkup::Csharp::CSharpEntityKind; };
+template<> struct SCHEMA::predicate<926> { using type = facebook::glean::cpp::schema::Codemarkup::Csharp::CSharpEntityLocation; };
+template<> struct SCHEMA::predicate<927> { using type = facebook::glean::cpp::schema::Codemarkup::Csharp::CSharpEntityUses; };
+template<> struct SCHEMA::predicate<928> { using type = facebook::glean::cpp::schema::Codemarkup::Csharp::CSharpFileEntityXRefLocations; };
+template<> struct SCHEMA::predicate<929> { using type = facebook::glean::cpp::schema::Codemarkup::Csharp::CSharpResolveLocation; };
+template<> struct SCHEMA::predicate<930> { using type = facebook::glean::cpp::schema::Codemarkup::Buck::BuckEntityKind; };
+template<> struct SCHEMA::predicate<931> { using type = facebook::glean::cpp::schema::Codemarkup::Buck::BuckEntityLocation; };
+template<> struct SCHEMA::predicate<932> { using type = facebook::glean::cpp::schema::Codemarkup::Buck::BuckEntityUses; };
+template<> struct SCHEMA::predicate<933> { using type = facebook::glean::cpp::schema::Codemarkup::Buck::BuckFileEntityXRefLocations; };
+template<> struct SCHEMA::predicate<934> { using type = facebook::glean::cpp::schema::Codemarkup::Buck::BuckResolveLocation; };
+template<> struct SCHEMA::predicate<935> { using type = facebook::glean::cpp::schema::Search::Buck::SearchByFQN; };
+template<> struct SCHEMA::predicate<936> { using type = facebook::glean::cpp::schema::Search::Buck::SearchDefinition; };
+template<> struct SCHEMA::predicate<937> { using type = facebook::glean::cpp::schema::Search::Buck::SearchFile; };
+template<> struct SCHEMA::predicate<938> { using type = facebook::glean::cpp::schema::Code::EntityLanguageSCIP; };
+template<> struct SCHEMA::predicate<939> { using type = facebook::glean::cpp::schema::Code::EntityLanguageLSIF; };
+template<> struct SCHEMA::predicate<940> { using type = facebook::glean::cpp::schema::Cxx1::FunctionName; };
+template<> struct SCHEMA::predicate<941> { using type = facebook::glean::cpp::schema::Cxx1::RecordDeclaration; };
+template<> struct SCHEMA::predicate<942> { using type = facebook::glean::cpp::schema::Cxx1::DeclarationScope; };
+template<> struct SCHEMA::predicate<943> { using type = facebook::glean::cpp::schema::Cxx1::EnumDeclarationByName; };
+template<> struct SCHEMA::predicate<944> { using type = facebook::glean::cpp::schema::Cxx1::FunctionDeclarationByNameScope; };
+template<> struct SCHEMA::predicate<945> { using type = facebook::glean::cpp::schema::Cxx1::FunctionQName; };
+template<> struct SCHEMA::predicate<946> { using type = facebook::glean::cpp::schema::Cxx1::QName; };
+template<> struct SCHEMA::predicate<947> { using type = facebook::glean::cpp::schema::Cxx1::RecordDeclarationClass; };
+template<> struct SCHEMA::predicate<948> { using type = facebook::glean::cpp::schema::Cxx1::RecordDeclarationStruct; };
+template<> struct SCHEMA::predicate<949> { using type = facebook::glean::cpp::schema::Cxx1::RecordDeclarationUnion; };
+template<> struct SCHEMA::predicate<950> { using type = facebook::glean::cpp::schema::Cxx1::TypeAliasDeclarationByName; };
+template<> struct SCHEMA::predicate<951> { using type = facebook::glean::cpp::schema::Cxx1::VariableDeclarationNonLocalByName; };
+template<> struct SCHEMA::predicate<952> { using type = facebook::glean::cpp::schema::Search::Cxx::QueryToScopeCase; };
+template<> struct SCHEMA::predicate<953> { using type = facebook::glean::cpp::schema::Search::Kind::Cxx::SearchClass; };
+template<> struct SCHEMA::predicate<954> { using type = facebook::glean::cpp::schema::Search::Kind::Cxx::SearchEnum; };
+template<> struct SCHEMA::predicate<955> { using type = facebook::glean::cpp::schema::Search::Kind::Cxx::SearchEnumerator; };
+template<> struct SCHEMA::predicate<956> { using type = facebook::glean::cpp::schema::Search::Kind::Cxx::SearchFunction; };
+template<> struct SCHEMA::predicate<957> { using type = facebook::glean::cpp::schema::Search::Kind::Cxx::SearchNamespace; };
+template<> struct SCHEMA::predicate<958> { using type = facebook::glean::cpp::schema::Search::Kind::Cxx::SearchStruct; };
+template<> struct SCHEMA::predicate<959> { using type = facebook::glean::cpp::schema::Search::Kind::Cxx::SearchTypeAlias; };
+template<> struct SCHEMA::predicate<960> { using type = facebook::glean::cpp::schema::Search::Kind::Cxx::SearchUnion; };
+template<> struct SCHEMA::predicate<961> { using type = facebook::glean::cpp::schema::Search::Kind::Cxx::SearchVariable; };
+template<> struct SCHEMA::predicate<962> { using type = facebook::glean::cpp::schema::Symbolid::Cxx::LookupDeclaration; };
+template<> struct SCHEMA::predicate<963> { using type = facebook::glean::cpp::schema::Symbolid::Cxx::LookupDefinition; };
+template<> struct SCHEMA::predicate<964> { using type = facebook::glean::cpp::schema::Symbolid::Cxx::LookupEnumerator; };
+template<> struct SCHEMA::predicate<965> { using type = facebook::glean::cpp::schema::Symbolid::Cxx::LookupFunctionDeclaration; };
+template<> struct SCHEMA::predicate<966> { using type = facebook::glean::cpp::schema::Symbolid::Cxx::LookupFunctionDefinition; };
+template<> struct SCHEMA::predicate<967> { using type = facebook::glean::cpp::schema::Symbolid::Cxx::LookupFunctionSignatureDeclaration; };
+template<> struct SCHEMA::predicate<968> { using type = facebook::glean::cpp::schema::Symbolid::Cxx::LookupFunctionSignatureDefinition; };
+template<> struct SCHEMA::predicate<969> { using type = facebook::glean::cpp::schema::Symbolid::Cxx::LookupFunctionSignatureQualifierDeclaration; };
+template<> struct SCHEMA::predicate<970> { using type = facebook::glean::cpp::schema::Symbolid::Cxx::LookupFunctionSignatureQualifierDefinition; };
+template<> struct SCHEMA::predicate<971> { using type = facebook::glean::cpp::schema::Fbthrift::FunctionSpecification; };
+template<> struct SCHEMA::predicate<972> { using type = facebook::glean::cpp::schema::Buck::Type; };
+template<> struct SCHEMA::predicate<973> { using type = facebook::glean::cpp::schema::Buck::TranslationUnit; };
+template<> struct SCHEMA::predicate<974> { using type = facebook::glean::cpp::schema::Buck::TargetUses; };
+template<> struct SCHEMA::predicate<975> { using type = facebook::glean::cpp::schema::Buck::TargetSourcesBaseModule; };
+template<> struct SCHEMA::predicate<976> { using type = facebook::glean::cpp::schema::Buck::TargetSources; };
+template<> struct SCHEMA::predicate<977> { using type = facebook::glean::cpp::schema::Buck::TargetOuts; };
+template<> struct SCHEMA::predicate<978> { using type = facebook::glean::cpp::schema::Buck::TargetOut; };
+template<> struct SCHEMA::predicate<979> { using type = facebook::glean::cpp::schema::Buck::TargetMode; };
+template<> struct SCHEMA::predicate<980> { using type = facebook::glean::cpp::schema::Buck::TargetLocation; };
+template<> struct SCHEMA::predicate<981> { using type = facebook::glean::cpp::schema::Buck::TargetLinkWhole; };
+template<> struct SCHEMA::predicate<982> { using type = facebook::glean::cpp::schema::Buck::TargetIndexerName; };
+template<> struct SCHEMA::predicate<983> { using type = facebook::glean::cpp::schema::Buck::TargetIndexer; };
+template<> struct SCHEMA::predicate<984> { using type = facebook::glean::cpp::schema::Buck::TargetHash; };
+template<> struct SCHEMA::predicate<985> { using type = facebook::glean::cpp::schema::Buck::TargetCallByCallExpr; };
+template<> struct SCHEMA::predicate<986> { using type = facebook::glean::cpp::schema::Buck::TargetCall; };
+template<> struct SCHEMA::predicate<987> { using type = facebook::glean::cpp::schema::Buck::TargetByType; };
+template<> struct SCHEMA::predicate<988> { using type = facebook::glean::cpp::schema::Buck::TargetAttribute; };
+template<> struct SCHEMA::predicate<989> { using type = facebook::glean::cpp::schema::Buck::Target; };
+template<> struct SCHEMA::predicate<990> { using type = facebook::glean::cpp::schema::Buck::SourceFileLocation; };
+template<> struct SCHEMA::predicate<991> { using type = facebook::glean::cpp::schema::Buck::SearchByLocalName; };
+template<> struct SCHEMA::predicate<992> { using type = facebook::glean::cpp::schema::Buck::RuleKey; };
+template<> struct SCHEMA::predicate<993> { using type = facebook::glean::cpp::schema::Buck::Platform; };
+template<> struct SCHEMA::predicate<994> { using type = facebook::glean::cpp::schema::Buck::Owner; };
+template<> struct SCHEMA::predicate<995> { using type = facebook::glean::cpp::schema::Buck::OutsTarget; };
+template<> struct SCHEMA::predicate<996> { using type = facebook::glean::cpp::schema::Buck::OutputLabel; };
+template<> struct SCHEMA::predicate<997> { using type = facebook::glean::cpp::schema::Buck::OutTarget; };
+template<> struct SCHEMA::predicate<998> { using type = facebook::glean::cpp::schema::Buck::LocatorWithLabel; };
+template<> struct SCHEMA::predicate<999> { using type = facebook::glean::cpp::schema::Buck::LocatorReverseDeps; };
+template<> struct SCHEMA::predicate<1000> { using type = facebook::glean::cpp::schema::Buck::LocatorReverseDep; };
+template<> struct SCHEMA::predicate<1001> { using type = facebook::glean::cpp::schema::Buck::Locator; };
+template<> struct SCHEMA::predicate<1002> { using type = facebook::glean::cpp::schema::Buck::LocalNameLowerCase; };
+template<> struct SCHEMA::predicate<1003> { using type = facebook::glean::cpp::schema::Buck::LocalName; };
+template<> struct SCHEMA::predicate<1004> { using type = facebook::glean::cpp::schema::Buck::Labels; };
+template<> struct SCHEMA::predicate<1005> { using type = facebook::glean::cpp::schema::Buck::Label; };
+template<> struct SCHEMA::predicate<1006> { using type = facebook::glean::cpp::schema::Buck::IndexerName; };
+template<> struct SCHEMA::predicate<1007> { using type = facebook::glean::cpp::schema::Buck::FileXRefs; };
+template<> struct SCHEMA::predicate<1008> { using type = facebook::glean::cpp::schema::Buck::FileToTarget; };
+template<> struct SCHEMA::predicate<1009> { using type = facebook::glean::cpp::schema::Buck::FileTarget; };
+template<> struct SCHEMA::predicate<1010> { using type = facebook::glean::cpp::schema::Buck::FileResolved; };
+template<> struct SCHEMA::predicate<1011> { using type = facebook::glean::cpp::schema::Buck::FileEntity; };
+template<> struct SCHEMA::predicate<1012> { using type = facebook::glean::cpp::schema::Buck::FileDefinition; };
+template<> struct SCHEMA::predicate<1013> { using type = facebook::glean::cpp::schema::Buck::File; };
+template<> struct SCHEMA::predicate<1014> { using type = facebook::glean::cpp::schema::Buck::FailureSources; };
+template<> struct SCHEMA::predicate<1015> { using type = facebook::glean::cpp::schema::Buck::IndexFailureX; };
+template<> struct SCHEMA::predicate<1016> { using type = facebook::glean::cpp::schema::Buck::DestinationUses; };
+template<> struct SCHEMA::predicate<1017> { using type = facebook::glean::cpp::schema::Buck::TargetDependencies; };
+template<> struct SCHEMA::predicate<1018> { using type = facebook::glean::cpp::schema::Buck::DefinitionLocation; };
+template<> struct SCHEMA::predicate<1019> { using type = facebook::glean::cpp::schema::Buck::Definition; };
+template<> struct SCHEMA::predicate<1020> { using type = facebook::glean::cpp::schema::Buck::Consumer; };
+template<> struct SCHEMA::predicate<1021> { using type = facebook::glean::cpp::schema::Buck::CallExpr; };
+template<> struct SCHEMA::predicate<1022> { using type = facebook::glean::cpp::schema::Buck::CallArgument; };
+template<> struct SCHEMA::predicate<1023> { using type = facebook::glean::cpp::schema::Buck::AttributeName; };
+template<> struct SCHEMA::predicate<1024> { using type = facebook::glean::cpp::schema::Buck::AttributeValue; };
+template<> struct SCHEMA::predicate<1025> { using type = facebook::glean::cpp::schema::Buck::ArgumentValue; };
+template<> struct SCHEMA::predicate<1026> { using type = facebook::glean::cpp::schema::Anglelang::TypeDecl; };
+template<> struct SCHEMA::predicate<1027> { using type = facebook::glean::cpp::schema::Anglelang::Name; };
+template<> struct SCHEMA::predicate<1028> { using type = facebook::glean::cpp::schema::Anglelang::Type; };
+template<> struct SCHEMA::predicate<1029> { using type = facebook::glean::cpp::schema::Anglelang::EvolveDecl; };
+template<> struct SCHEMA::predicate<1030> { using type = facebook::glean::cpp::schema::Anglelang::DerivingDecl; };
+template<> struct SCHEMA::predicate<1031> { using type = facebook::glean::cpp::schema::Anglelang::PredicateDecl; };
+template<> struct SCHEMA::predicate<1032> { using type = facebook::glean::cpp::schema::Anglelang::DeclarationLocation; };
+template<> struct SCHEMA::predicate<1033> { using type = facebook::glean::cpp::schema::Anglelang::DeclarationToName; };
+template<> struct SCHEMA::predicate<1034> { using type = facebook::glean::cpp::schema::Anglelang::SchemaDecl; };
+template<> struct SCHEMA::predicate<1035> { using type = facebook::glean::cpp::schema::Anglelang::TargetUses; };
+template<> struct SCHEMA::predicate<1036> { using type = facebook::glean::cpp::schema::Anglelang::FileXRefs; };
+template<> struct SCHEMA::predicate<1037> { using type = facebook::glean::cpp::schema::Codemarkup::Hack::ConvertCallArguments; };
+template<> struct SCHEMA::predicate<1038> { using type = facebook::glean::cpp::schema::Codemarkup::Hack::ConvertMaybeCallArguments; };
+template<> struct SCHEMA::predicate<1039> { using type = facebook::glean::cpp::schema::Codemarkup::Python::ConvertCallArguments; };
+template<> struct SCHEMA::predicate<1040> { using type = facebook::glean::cpp::schema::Codemarkup::Python::PythonFileCall; };
+template<> struct SCHEMA::predicate<1041> { using type = facebook::glean::cpp::schema::Codemarkup::Hack::ConvertArgument; };
+template<> struct SCHEMA::predicate<1042> { using type = facebook::glean::cpp::schema::Codemarkup::Python::ConvertArgument; };
+template<> struct SCHEMA::predicate<1043> { using type = facebook::glean::cpp::schema::Code::EntityLanguage; };
+template<> struct SCHEMA::predicate<1044> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxEntityIdl; };
+template<> struct SCHEMA::predicate<1045> { using type = facebook::glean::cpp::schema::Codemarkup::Hack::HackEntityIdl; };
+template<> struct SCHEMA::predicate<1046> { using type = facebook::glean::cpp::schema::Codemarkup::Yaml::YamlFileEntityXLangXRefLocations; };
+template<> struct SCHEMA::predicate<1047> { using type = facebook::glean::cpp::schema::Codemarkup::ContainsChildEntity; };
+template<> struct SCHEMA::predicate<1048> { using type = facebook::glean::cpp::schema::Codemarkup::ContainsParentEntity; };
+template<> struct SCHEMA::predicate<1049> { using type = facebook::glean::cpp::schema::Codemarkup::EntityComments; };
+template<> struct SCHEMA::predicate<1050> { using type = facebook::glean::cpp::schema::Codemarkup::EntityInfo; };
+template<> struct SCHEMA::predicate<1051> { using type = facebook::glean::cpp::schema::Codemarkup::EntityIsDefinition; };
+template<> struct SCHEMA::predicate<1052> { using type = facebook::glean::cpp::schema::Codemarkup::EntityKind; };
+template<> struct SCHEMA::predicate<1053> { using type = facebook::glean::cpp::schema::Codemarkup::EntityLocation; };
+template<> struct SCHEMA::predicate<1054> { using type = facebook::glean::cpp::schema::Codemarkup::EntityModifiers; };
+template<> struct SCHEMA::predicate<1055> { using type = facebook::glean::cpp::schema::Codemarkup::EntityModuleName; };
+template<> struct SCHEMA::predicate<1056> { using type = facebook::glean::cpp::schema::Codemarkup::EntityReferences; };
+template<> struct SCHEMA::predicate<1057> { using type = facebook::glean::cpp::schema::Codemarkup::EntitySource; };
+template<> struct SCHEMA::predicate<1058> { using type = facebook::glean::cpp::schema::Codemarkup::EntityToAnnotations; };
+template<> struct SCHEMA::predicate<1059> { using type = facebook::glean::cpp::schema::Codemarkup::EntityUses; };
+template<> struct SCHEMA::predicate<1060> { using type = facebook::glean::cpp::schema::Codemarkup::EntityVisibility; };
+template<> struct SCHEMA::predicate<1061> { using type = facebook::glean::cpp::schema::Codemarkup::ExtendsChildEntity; };
+template<> struct SCHEMA::predicate<1062> { using type = facebook::glean::cpp::schema::Codemarkup::ExtendsParentEntity; };
+template<> struct SCHEMA::predicate<1063> { using type = facebook::glean::cpp::schema::Codemarkup::ExtendsParentEntityConcise; };
+template<> struct SCHEMA::predicate<1064> { using type = facebook::glean::cpp::schema::Codemarkup::FileCall; };
+template<> struct SCHEMA::predicate<1065> { using type = facebook::glean::cpp::schema::Codemarkup::FileEntityDigest; };
+template<> struct SCHEMA::predicate<1066> { using type = facebook::glean::cpp::schema::Codemarkup::FileEntityInfos; };
+template<> struct SCHEMA::predicate<1067> { using type = facebook::glean::cpp::schema::Codemarkup::FileEntityKinds; };
+template<> struct SCHEMA::predicate<1068> { using type = facebook::glean::cpp::schema::Codemarkup::FileEntityLocations; };
+template<> struct SCHEMA::predicate<1069> { using type = facebook::glean::cpp::schema::Codemarkup::FileEntityXRefInfos; };
+template<> struct SCHEMA::predicate<1070> { using type = facebook::glean::cpp::schema::Codemarkup::FileEntityXRefKinds; };
+template<> struct SCHEMA::predicate<1071> { using type = facebook::glean::cpp::schema::Codemarkup::FileEntityXRefLocations; };
+template<> struct SCHEMA::predicate<1072> { using type = facebook::glean::cpp::schema::Codemarkup::FileEntityXRefRangeSpans; };
+template<> struct SCHEMA::predicate<1073> { using type = facebook::glean::cpp::schema::Codemarkup::FindEntityDefinition; };
+template<> struct SCHEMA::predicate<1074> { using type = facebook::glean::cpp::schema::Codemarkup::GeneratedEntityToIdlEntity; };
+template<> struct SCHEMA::predicate<1075> { using type = facebook::glean::cpp::schema::Codemarkup::FileXRefsGenericEntities; };
+template<> struct SCHEMA::predicate<1076> { using type = facebook::glean::cpp::schema::Codemarkup::SearchRelatedEntities; };
+template<> struct SCHEMA::predicate<1077> { using type = facebook::glean::cpp::schema::Codemarkup::ReferencingEntity; };
+template<> struct SCHEMA::predicate<1078> { using type = facebook::glean::cpp::schema::Codemarkup::ResolveLocation; };
+template<> struct SCHEMA::predicate<1079> { using type = facebook::glean::cpp::schema::Codemarkup::SearchInheritedEntities; };
+template<> struct SCHEMA::predicate<1080> { using type = facebook::glean::cpp::schema::Codemarkup::SymbolToEntity; };
+template<> struct SCHEMA::predicate<1081> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxFileEntityIdl; };
+template<> struct SCHEMA::predicate<1082> { using type = facebook::glean::cpp::schema::Codemarkup::Cxx::CxxIdlEntityUses; };
+template<> struct SCHEMA::predicate<1083> { using type = facebook::glean::cpp::schema::Codemarkup::Hack::ConvertCallee; };
+template<> struct SCHEMA::predicate<1084> { using type = facebook::glean::cpp::schema::Codemarkup::Hack::ConvertCalleeForFileCall; };
+template<> struct SCHEMA::predicate<1085> { using type = facebook::glean::cpp::schema::Codemarkup::Hack::ConvertStaticType; };
+template<> struct SCHEMA::predicate<1086> { using type = facebook::glean::cpp::schema::Codemarkup::Hack::HackFileCall; };
+template<> struct SCHEMA::predicate<1087> { using type = facebook::glean::cpp::schema::Codemarkup::Hack::HackIdlEntityUses; };
+template<> struct SCHEMA::predicate<1088> { using type = facebook::glean::cpp::schema::Codemarkup::Search::EntityLocationAndKind; };
+template<> struct SCHEMA::predicate<1089> { using type = facebook::glean::cpp::schema::Codemarkup::Search::SearchByName; };
+template<> struct SCHEMA::predicate<1090> { using type = facebook::glean::cpp::schema::Codemarkup::Search::SearchByScope; };
+template<> struct SCHEMA::predicate<1091> { using type = facebook::glean::cpp::schema::Dyn::EntityUsage; };
+template<> struct SCHEMA::predicate<1092> { using type = facebook::glean::cpp::schema::Search::Code::AngleSearchByLowerCaseName; };
+template<> struct SCHEMA::predicate<1093> { using type = facebook::glean::cpp::schema::Search::Code::AngleSearchByName; };
+template<> struct SCHEMA::predicate<1094> { using type = facebook::glean::cpp::schema::Search::Code::BuckSearchByLocalNameFact; };
+template<> struct SCHEMA::predicate<1095> { using type = facebook::glean::cpp::schema::Search::Code::BuckSearchByLowerCaseName; };
+template<> struct SCHEMA::predicate<1096> { using type = facebook::glean::cpp::schema::Search::Code::BuckSearchByName; };
+template<> struct SCHEMA::predicate<1097> { using type = facebook::glean::cpp::schema::Search::Code::CSharpSearchByLowerCaseName; };
+template<> struct SCHEMA::predicate<1098> { using type = facebook::glean::cpp::schema::Search::Code::CSharpSearchByName; };
+template<> struct SCHEMA::predicate<1099> { using type = facebook::glean::cpp::schema::Search::Code::CxxSearchByLowerCaseNameKindAndScopeFact; };
+template<> struct SCHEMA::predicate<1100> { using type = facebook::glean::cpp::schema::Search::Code::CxxSearchByLowerCaseScopeAndKind; };
+template<> struct SCHEMA::predicate<1101> { using type = facebook::glean::cpp::schema::Search::Code::CxxSearchByNameKindAndScopeFact; };
+template<> struct SCHEMA::predicate<1102> { using type = facebook::glean::cpp::schema::Search::Code::CxxSearchByScopeAndKind; };
+template<> struct SCHEMA::predicate<1103> { using type = facebook::glean::cpp::schema::Search::Code::ErlangSearchByLowerCaseName; };
+template<> struct SCHEMA::predicate<1104> { using type = facebook::glean::cpp::schema::Search::Code::ErlangSearchByName; };
+template<> struct SCHEMA::predicate<1105> { using type = facebook::glean::cpp::schema::Search::Code::FbthriftSearchByNameFact; };
+template<> struct SCHEMA::predicate<1106> { using type = facebook::glean::cpp::schema::Search::Code::FlowSearchByLowerCaseNameKindAndScopeFact; };
+template<> struct SCHEMA::predicate<1107> { using type = facebook::glean::cpp::schema::Search::Code::FlowSearchByLowerCaseScopeAndKind; };
+template<> struct SCHEMA::predicate<1108> { using type = facebook::glean::cpp::schema::Search::Code::FlowSearchByNameKindAndScopeFact; };
+template<> struct SCHEMA::predicate<1109> { using type = facebook::glean::cpp::schema::Search::Code::FlowSearchByScopeAndKind; };
+template<> struct SCHEMA::predicate<1110> { using type = facebook::glean::cpp::schema::Search::Code::GraphQLSearchByLowerCaseName; };
+template<> struct SCHEMA::predicate<1111> { using type = facebook::glean::cpp::schema::Search::Code::GraphQLSearchByName; };
+template<> struct SCHEMA::predicate<1112> { using type = facebook::glean::cpp::schema::Search::Code::HackSearchByLowerCaseNameAndKind; };
+template<> struct SCHEMA::predicate<1113> { using type = facebook::glean::cpp::schema::Search::Code::HackSearchByLowerCaseScopeAndKind; };
+template<> struct SCHEMA::predicate<1114> { using type = facebook::glean::cpp::schema::Search::Code::HackSearchByNameAndKind; };
+template<> struct SCHEMA::predicate<1115> { using type = facebook::glean::cpp::schema::Search::Code::HackSearchByNameKindWithNamespace; };
+template<> struct SCHEMA::predicate<1116> { using type = facebook::glean::cpp::schema::Search::Code::HackSearchByNameKindWithQName; };
+template<> struct SCHEMA::predicate<1117> { using type = facebook::glean::cpp::schema::Search::Code::HackSearchByScopeAndKind; };
+template<> struct SCHEMA::predicate<1118> { using type = facebook::glean::cpp::schema::Search::Code::HackSearchByScopeWithNameKinds; };
+template<> struct SCHEMA::predicate<1119> { using type = facebook::glean::cpp::schema::Search::Code::HsSearchByLowerCaseName; };
+template<> struct SCHEMA::predicate<1120> { using type = facebook::glean::cpp::schema::Search::Code::HsSearchByName; };
+template<> struct SCHEMA::predicate<1121> { using type = facebook::glean::cpp::schema::Search::Code::JavaSearchByLowerCaseName; };
+template<> struct SCHEMA::predicate<1122> { using type = facebook::glean::cpp::schema::Search::Code::JavaSearchByLowerCaseScope; };
+template<> struct SCHEMA::predicate<1123> { using type = facebook::glean::cpp::schema::Search::Code::JavaSearchByName; };
+template<> struct SCHEMA::predicate<1124> { using type = facebook::glean::cpp::schema::Search::Code::JavaSearchByNameWithFact; };
+template<> struct SCHEMA::predicate<1125> { using type = facebook::glean::cpp::schema::Search::Code::JavaSearchByScope; };
+template<> struct SCHEMA::predicate<1126> { using type = facebook::glean::cpp::schema::Search::Code::JavaSearchByScopeWithName; };
+template<> struct SCHEMA::predicate<1127> { using type = facebook::glean::cpp::schema::Search::Code::KotlinSearchByLowerCaseName; };
+template<> struct SCHEMA::predicate<1128> { using type = facebook::glean::cpp::schema::Search::Code::KotlinSearchByLowerCaseScope; };
+template<> struct SCHEMA::predicate<1129> { using type = facebook::glean::cpp::schema::Search::Code::KotlinSearchByName; };
+template<> struct SCHEMA::predicate<1130> { using type = facebook::glean::cpp::schema::Search::Code::KotlinSearchByNameWithFact; };
+template<> struct SCHEMA::predicate<1131> { using type = facebook::glean::cpp::schema::Search::Code::KotlinSearchByScope; };
+template<> struct SCHEMA::predicate<1132> { using type = facebook::glean::cpp::schema::Search::Code::KotlinSearchByScopeWithName; };
+template<> struct SCHEMA::predicate<1133> { using type = facebook::glean::cpp::schema::Search::Code::LsifSearchByLowerCaseName; };
+template<> struct SCHEMA::predicate<1134> { using type = facebook::glean::cpp::schema::Search::Code::LsifSearchByName; };
+template<> struct SCHEMA::predicate<1135> { using type = facebook::glean::cpp::schema::Search::Code::PpSearchByLowerCaseNameKind; };
+template<> struct SCHEMA::predicate<1136> { using type = facebook::glean::cpp::schema::Search::Code::PpSearchByNameKind; };
+template<> struct SCHEMA::predicate<1137> { using type = facebook::glean::cpp::schema::Search::Code::PythonSearchByLowerCaseNameKindAndScopeFact; };
+template<> struct SCHEMA::predicate<1138> { using type = facebook::glean::cpp::schema::Search::Code::PythonSearchByLowerCaseScopeAndKind; };
+template<> struct SCHEMA::predicate<1139> { using type = facebook::glean::cpp::schema::Search::Code::PythonSearchByNameKindAndScopeFact; };
+template<> struct SCHEMA::predicate<1140> { using type = facebook::glean::cpp::schema::Search::Code::PythonSearchByScopeAndKind; };
+template<> struct SCHEMA::predicate<1141> { using type = facebook::glean::cpp::schema::Search::Code::RustSearchByNameAndKind; };
+template<> struct SCHEMA::predicate<1142> { using type = facebook::glean::cpp::schema::Search::Code::SearchByLowerCaseNameAndLanguage; };
+template<> struct SCHEMA::predicate<1143> { using type = facebook::glean::cpp::schema::Search::Code::SearchByLowerCaseNameKindAndLanguage; };
+template<> struct SCHEMA::predicate<1144> { using type = facebook::glean::cpp::schema::Search::Code::SearchByLowerCaseScope; };
+template<> struct SCHEMA::predicate<1145> { using type = facebook::glean::cpp::schema::Search::Code::SearchByLowerCaseScopeAndKind; };
+template<> struct SCHEMA::predicate<1146> { using type = facebook::glean::cpp::schema::Search::Code::SearchByNameAndLanguage; };
+template<> struct SCHEMA::predicate<1147> { using type = facebook::glean::cpp::schema::Search::Code::SearchByNameKindAndLanguage; };
+template<> struct SCHEMA::predicate<1148> { using type = facebook::glean::cpp::schema::Search::Code::SearchByScope; };
+template<> struct SCHEMA::predicate<1149> { using type = facebook::glean::cpp::schema::Search::Code::SearchByScopeAndKind; };
+template<> struct SCHEMA::predicate<1150> { using type = facebook::glean::cpp::schema::Search::Code::ThriftSearchByLowerCaseName; };
+template<> struct SCHEMA::predicate<1151> { using type = facebook::glean::cpp::schema::Search::Code::ThriftSearchByName; };
+template<> struct SCHEMA::predicate<1152> { using type = facebook::glean::cpp::schema::Codemarkup::Anglelang::AngleEntityLocation; };
+template<> struct SCHEMA::predicate<1153> { using type = facebook::glean::cpp::schema::Codemarkup::Anglelang::AngleEntityUses; };
+template<> struct SCHEMA::predicate<1154> { using type = facebook::glean::cpp::schema::Codemarkup::Anglelang::AngleFileEntityXRefLocations; };
+template<> struct SCHEMA::predicate<1155> { using type = facebook::glean::cpp::schema::Codemarkup::Anglelang::AngleResolveLocation; };
+template<> struct SCHEMA::predicate<1156> { using type = facebook::glean::cpp::schema::Search::Anglelang::SearchByName; };
+
+
+} // namespace schema
+
+} // namespace cpp
+
+} // namespace glean
+
+} // namespace facebook
diff --git a/glean/schema/gen/Glean/Schema/Gen/Python.hs b/glean/schema/gen/Glean/Schema/Gen/Python.hs
--- a/glean/schema/gen/Glean/Schema/Gen/Python.hs
+++ b/glean/schema/gen/Glean/Schema/Gen/Python.hs
@@ -45,12 +45,34 @@
     "API, we expect a GleanSchemaPredicate as the result. To meet both " <>
     "conditions, GleanSchemaPredicate extends a Struct."
   , "class GleanSchemaPredicate(Struct):"
+  , "  " <> "\"\"\"Base class for Glean schema predicate queries using the Angle query language."
+  , "  "
+  , "  " <> "This class serves as a base type for generated Glean schema predicates and extends"
+  , "  " <> "thrift.py3.types.Struct to satisfy Pyre's type checking requirements."
+  , "  "
+  , "  " <> "Concrete predicate classes inherit from this base and implement the build_angle()"
+  , "  " <> "static method, which constructs Angle query strings and returns the corresponding"
+  , "  " <> "Thrift struct type as a Tuple[str, Struct]."
+  , "  "
+  , "  " <> "The angle_query() method is a user-facing API stub designed to be called only within"
+  , "  " <> "functions decorated with @angle_query. The decorator parses these calls at definition"
+  , "  " <> "time and redirects them to build_angle() to construct the actual query."
+  , "  "
+  , "  " <> "@AI Generated 2025-11-21"
+  , "  " <> "\"\"\""
   , "  " <> "@staticmethod"
   , "  " <> "def angle_query(*, arg: str) -> \"GleanSchemaPredicate\":"
   , "    " <> "raise Exception" <>
     "(\"this function can only be called from @angle_query\")"
   , ""
   , "class InnerGleanSchemaPredicate:"
+  , "  " <> "\"\"\"Base class for Glean predicates in nested query fields."
+  , "  " <> ""
+  , "  " <> "Used for predicates that appear only as parameters within"
+  , "  " <> "outer Angle queries. Hides named types from the user's outer"
+  , "  " <> "query context for type-safe nested query composition. Cannot"
+  , "  " <> "be invoked directly in top-level Angle queries."
+  , "  " <> "\"\"\""
   , "  " <> "@staticmethod"
   , "  " <> "def angle_query(*, arg: str) -> \"InnerGleanSchemaPredicate\":"
   , "    " <> "raise Exception" <> "(\"this function can only be called as" <>
@@ -59,6 +81,12 @@
   , "T = TypeVar(\"T\")"
   , ""
   , "class Just(Generic[T]):"
+  , "  " <> "\"\"\"Wrapper for optional values in Glean angle queries."
+  , "  " <> ""
+  , "  " <> "Represents a \"maybe\" type that can either contain a value or"
+  , "  " <> " be None. Used in generated Glean schema predicates to"
+  , "  " <> " explicitly handle optional parameters in query definitions."
+  , "  " <> "\"\"\""
   , "  " <> "just: T | None = None"
   , "  " <> "def __init__(self, just: T | None = None) -> None:"
   , "    " <> "self.just = just"
@@ -89,15 +117,22 @@
     namePolicy = mkNamePolicy preddefs typedefs
     declsPerNamespace =
       addNamespaceDependencies $ sortDeclsByNamespace preddefs typedefs
-    genPredicateImports namespaces preds = Text.unlines $
-      ("from glean.schema." <> namespaceToFileName namespaces <> ".types import (") :
-      [ "    " <> return_class_name <> ","
-          | pred <- preds
-          , let ref = predicateDefRef pred
-                predicateName = predicateRef_name ref
-                return_class_name = returnPythonClassName predicateName
-      ] ++
-      [")"]
+    genPredicateImports namespaces preds =
+      let importList = [ "    " <> return_class_name <> ","
+              | pred <- preds
+              , let ref = predicateDefRef pred
+                    predicateName = predicateRef_name ref
+                    return_class_name = returnPythonClassName predicateName
+            ] in
+      Text.unlines
+        (if null importList then
+          []
+        else
+            ("from glean.schema."
+                <> namespaceToFileName namespaces
+                <> ".types import (") :
+            importList ++
+            [")"])
     extraImports = [
       (Text.concat namespaces,
       addBuckImportsForKeys namespaces namePolicy allPreds) |
diff --git a/glean/schema/gen/Glean/Schema/Gen/Rust.hs b/glean/schema/gen/Glean/Schema/Gen/Rust.hs
--- a/glean/schema/gen/Glean/Schema/Gen/Rust.hs
+++ b/glean/schema/gen/Glean/Schema/Gen/Rust.hs
@@ -99,8 +99,10 @@
     , "use serde::Deserialize;"
     , "use serde::Serialize;"
     , "use serde_json::Value;"
+    , "use serde_repr::*;"
     , ""
     , "use crate::report::glean::schema::*;"
+    , "use crate::report::glean::facts::GleanPredicate;"
     ] ++
     -- builtin only
     if namespace /= "builtin" then [] else
@@ -187,10 +189,10 @@
   | Text.null (underscored ns) = safe name
   | otherwise = underscored ns <> "::" <> safe name
 
-
-annotation :: Text
-annotation = "#[derive(Clone, Debug, Deserialize, Eq, Hash, "
-    <> "PartialEq, Serialize)]"
+data ShouldUseRepr = UseRepr | NoRepr
+annotation :: ShouldUseRepr -> Text
+annotation UseRepr = "#[derive(Clone, Debug, Deserialize_repr, Eq, Hash, PartialEq, Serialize_repr)]"
+annotation NoRepr =  "#[derive(Clone, Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]"
 
 wrapInBoxIf :: Bool -> Text -> Text
 wrapInBoxIf useBox text =
@@ -261,7 +263,7 @@
   let
     -- Predicate struct definition
     define = (:[]) $ myUnlines $ concat
-        [ [ annotation ]
+        [ [ annotation NoRepr ]
         , [ "pub struct " <> name <> " {" ]
         , indentLines $ catMaybes
           [ Just $ "pub id: " <> type_id <> ","
@@ -274,16 +276,7 @@
         , [ ""]
         , [ "impl " <> name <> " {" ]
         , indentLines
-            [ "pub fn GLEAN_name() -> String {"
-            , addIndent 1
-              <> "String::from(\""
-              <> predicateRef_name predicateDefRef
-              <> "."
-              <> showt (predicateRef_version predicateDefRef)
-              <> "\")"
-            , "}"
-            , ""
-            , "pub fn new(" <> paramList <> ") -> Self {"
+            [ "pub fn new(" <> paramList <> ") -> Self {"
             , addIndent 1 <> name <> " {"
             , addIndent 2 <> "id: 0,"
             , addIndent 2 <> "key: " <> keyConstruction <> ","
@@ -296,6 +289,20 @@
             , addIndent 1 <> "}"
             ]
         , [ "}" ]
+        , [ "" ]
+        , [ "impl GleanPredicate for " <> name <> " {"]
+        , indentLines
+            [ "fn GLEAN_name() -> String {"
+            , addIndent 1
+              <> "String::from(\""
+              <> predicateRef_name predicateDefRef
+              <> "."
+              <> showt (predicateRef_version predicateDefRef)
+              <> "\")"
+            , "}"
+            , ""
+            ]
+          , [ "}" ]
         ]
   extra <- popDefs
   return (define,  nubOrd (extra ++ define_key ++ define_value))
@@ -313,7 +320,8 @@
 makeEnum name vals = do
   let
     variants = Text.unlines $ indentLines (map (<> ",") vals)
-    declare = annotation <> newline
+    declare = annotation UseRepr <> newline
+      <> "#[repr(u8)]" <> newline
       <> "pub enum " <> name <> " {" <> newline <> variants <> "}"
   return [declare]
 
@@ -328,15 +336,22 @@
     RecordTy fields -> do
         fieldTexts <- forM fields $ \(FieldDef nm ty) -> do
           tyName <- withRecordFieldHint nm (rustTy here ty)
-          return $ "pub " <> safe nm <> ": " <> tyName <> ","
+          let isOption = case ty of MaybeTy _ -> True; _ -> False
+          let fieldLine = "pub " <> safe nm <> ": " <> tyName <> ","
+          return $ if isOption
+                   then [
+                    "#[serde(skip_serializing_if = \"Option::is_none\")]"
+                    , fieldLine
+                    ]
+                   else [fieldLine]
         let
           define | null fields =
-            annotation <> newline <>
+            annotation NoRepr <> newline <>
             "pub struct " <> name <> " {}"
                 | otherwise = myUnlines $ concat
-            [ [ annotation ]
+            [ [ annotation NoRepr ]
             , [ "pub struct " <> name <> " {" ]
-            , indentLines fieldTexts
+            , indentLines (concat fieldTexts)
             , [ "}" ]
             ]
         return [define]
@@ -346,10 +361,10 @@
           return $ safe nm <> "(" <> safe tyName <> "),"
         let
           define | null fields =
-            annotation <> newline <>
+            annotation NoRepr <> newline <>
             "pub enum " <> name <> " {}"
                  | otherwise = myUnlines $ concat
-            [ [ annotation ]
+            [ [ annotation NoRepr ]
             , [ "pub enum " <> name <> " {" ]
             , indentLines variantTexts
             , [ "}" ]
diff --git a/glean/schema/gen/Glean/Schema/Gen/Thrift.hs b/glean/schema/gen/Glean/Schema/Gen/Thrift.hs
--- a/glean/schema/gen/Glean/Schema/Gen/Thrift.hs
+++ b/glean/schema/gen/Glean/Schema/Gen/Thrift.hs
@@ -78,7 +78,12 @@
   genTarget (ns, (deps, nsPredicates, _)) =
     let
       namespace = underscored ns
-      cppSplits = showt $ min 20 (max 1 (length nsPredicates))
+      typesCppSplits =
+        let cppSplits = min 20 (length nsPredicates) in
+        ["\"types_cpp_splits=" <> showt cppSplits <> "\"" | cppSplits /= 0]
+      typesRustSplits =
+        let rustSplits = min 20 (length nsPredicates) in
+        ["\"types_split_count=" <> showt rustSplits <> "\"" | rustSplits /= 0]
     in
     [ "thrift_library("
     , "  name = \"" <> namespace <> "\","
@@ -87,16 +92,16 @@
     , "  py_base_module = \"" <> pyBaseModule <> "\","
     ] ++
     [ "  hs_includes = [\"" <> namespace <> "_include.hs\"]," ] ++
-    [ "  thrift_rust_options = ["
-    , "    \"serde\","
-    , "    \"skip_none_serialization\","
-    , "    \"deprecated_default_enum_min_i32\","
-    , "],"
-    , "  thrift_cpp2_options = [" <> Text.intercalate ", " [
-      "\"json\"",
-      "\"types_cpp_splits=" <> cppSplits <> "\""
-      ] <> "],"
+    [ "  thrift_rust_options = [" <> Text.intercalate ", " (
+    ["\"serde\""
+    , "\"skip_none_serialization\""
+    , "\"deprecated_default_enum_min_i32\""]
+    ++ typesRustSplits) <> "],"
+    , "  thrift_cpp2_options = [" <> Text.intercalate ", " (
+      "\"json\"" : typesCppSplits
+      ) <> "],"
     , "  thrift_py_options = \"utf8strings\","
+    , "  thrift_py3_options = [\"inplace_migrate\"],"
     , "  languages = [" <> Text.intercalate ", " langs <> "],"
     , "  thrift_srcs = { \"" <> namespace <> ".thrift\" : [] },"
     , "  deps = [" <> Text.intercalate ","
@@ -104,9 +109,9 @@
       ", \"//thrift/annotation:rust\"" <>
       ", \"//thrift/annotation:thrift\"],"
     , "  hs2_deps = ["
-    , "    \"//glean/hs:angle\","
-    , "    \"//glean/hs:typed\","
-    , "    \"//glean/hs:query-angle\","
+    , "    \"//glean/angle:angle\","
+    , "    \"//glean/typed:typed\","
+    , "    \"//glean/typed:query-angle\","
     , "    \"//glean/if:glean-hs2\","
     ] ++
     [ "  ],"
diff --git a/glean/schema/hs/Glean/Schema/Buck.hs b/glean/schema/hs/Glean/Schema/Buck.hs
--- a/glean/schema/hs/Glean/Schema/Buck.hs
+++ b/glean/schema/hs/Glean/Schema/Buck.hs
@@ -28,6 +28,7 @@
   , (PredicateRef "buck.Platform" 4)
   , (PredicateRef "buck.Consumer" 4)
   , (PredicateRef "buck.TargetLinkWhole" 4)
+  , (PredicateRef "buck.FileCall" 4)
   , (PredicateRef "buck.DestinationUses" 4)
   , (PredicateRef "buck.SourceFileLocation" 4)
   , (PredicateRef "buck.TargetSourcesBaseModule" 4)
@@ -38,11 +39,13 @@
   , (PredicateRef "buck.FileXRefs" 4)
   , (PredicateRef "buck.File" 4)
   , (PredicateRef "buck.FileResolved" 4)
+  , (PredicateRef "buck.DefinitionKind" 4)
   , (PredicateRef "buck.Type" 4)
   , (PredicateRef "buck.OutputLabel" 4)
   , (PredicateRef "buck.Definition" 4)
   , (PredicateRef "buck.TargetByType" 4)
   , (PredicateRef "buck.AttributeName" 4)
+  , (PredicateRef "buck.DefinitionMetadata" 4)
   , (PredicateRef "buck.OutTarget" 4)
   , (PredicateRef "buck.AttributeValue" 4)
   , (PredicateRef "buck.TargetAttribute" 4)
diff --git a/glean/schema/hs/Glean/Schema/Chef.hs b/glean/schema/hs/Glean/Schema/Chef.hs
new file mode 100644
--- /dev/null
+++ b/glean/schema/hs/Glean/Schema/Chef.hs
@@ -0,0 +1,19 @@
+-- @generated
+module Glean.Schema.Chef (allPredicates) where
+
+import Glean.Types
+
+allPredicates :: [PredicateRef]
+allPredicates =
+  [ (PredicateRef "chef.Cookbook" 1)
+  , (PredicateRef "chef.ReferencedAt" 1)
+  , (PredicateRef "chef.CookbookDependedOnBy" 1)
+  , (PredicateRef "chef.CookbookDependsOn" 1)
+  , (PredicateRef "chef.DefinedAt" 1)
+  , (PredicateRef "chef.Symbol" 1)
+  , (PredicateRef "chef.DefLocationSymbol" 1)
+  , (PredicateRef "chef.Name" 1)
+  , (PredicateRef "chef.RefLocationSymbol" 1)
+  , (PredicateRef "chef.Location" 1)
+  ]
+
diff --git a/glean/schema/hs/Glean/Schema/CodeChef.hs b/glean/schema/hs/Glean/Schema/CodeChef.hs
new file mode 100644
--- /dev/null
+++ b/glean/schema/hs/Glean/Schema/CodeChef.hs
@@ -0,0 +1,9 @@
+-- @generated
+module Glean.Schema.CodeChef (allPredicates) where
+
+import Glean.Types
+
+allPredicates :: [PredicateRef]
+allPredicates =
+  [ ]
+
diff --git a/glean/schema/hs/Glean/Schema/CodemarkupChef.hs b/glean/schema/hs/Glean/Schema/CodemarkupChef.hs
new file mode 100644
--- /dev/null
+++ b/glean/schema/hs/Glean/Schema/CodemarkupChef.hs
@@ -0,0 +1,13 @@
+-- @generated
+module Glean.Schema.CodemarkupChef (allPredicates) where
+
+import Glean.Types
+
+allPredicates :: [PredicateRef]
+allPredicates =
+  [ (PredicateRef "codemarkup.chef.ChefFileEntityXRefLocations" 1)
+  , (PredicateRef "codemarkup.chef.ChefEntityLocation" 1)
+  , (PredicateRef "codemarkup.chef.ChefResolveLocation" 1)
+  , (PredicateRef "codemarkup.chef.ChefEntityUses" 1)
+  ]
+
diff --git a/glean/schema/hs/Glean/Schema/CodemarkupHaskell.hs b/glean/schema/hs/Glean/Schema/CodemarkupHaskell.hs
--- a/glean/schema/hs/Glean/Schema/CodemarkupHaskell.hs
+++ b/glean/schema/hs/Glean/Schema/CodemarkupHaskell.hs
@@ -7,6 +7,7 @@
 allPredicates =
   [ (PredicateRef "codemarkup.haskell.HaskellContainsChildEntity" 2)
   , (PredicateRef "codemarkup.haskell.HaskellContainsParentEntity" 2)
+  , (PredicateRef "codemarkup.haskell.HaskellEntityKind" 2)
   , (PredicateRef "codemarkup.haskell.HaskellEntityUses" 2)
   , (PredicateRef "codemarkup.haskell.HaskellFileEntityXRefLocations" 2)
   , (PredicateRef "codemarkup.haskell.HaskellResolveLocation" 2)
diff --git a/glean/schema/hs/Glean/Schema/CodemarkupScip.hs b/glean/schema/hs/Glean/Schema/CodemarkupScip.hs
--- a/glean/schema/hs/Glean/Schema/CodemarkupScip.hs
+++ b/glean/schema/hs/Glean/Schema/CodemarkupScip.hs
@@ -6,11 +6,11 @@
 allPredicates :: [PredicateRef]
 allPredicates =
   [ (PredicateRef "codemarkup.scip.ScipFileEntityXRefLocations" 1)
-  , (PredicateRef "codemarkup.scip.FileXLangSymbolRefs" 1)
   , (PredicateRef "codemarkup.scip.LsifKindToKind" 1)
   , (PredicateRef "codemarkup.scip.EntityInfo" 1)
   , (PredicateRef "codemarkup.scip.ScipEntityDocumentation" 1)
   , (PredicateRef "codemarkup.scip.ScipResolveLocation" 1)
+  , (PredicateRef "codemarkup.scip.EnclosingSrcRange" 1)
   , (PredicateRef "codemarkup.scip.ScipEntityLocation" 1)
   , (PredicateRef "codemarkup.scip.ScipEntityUses" 1)
   ]
diff --git a/glean/schema/hs/Glean/Schema/Cxx1.hs b/glean/schema/hs/Glean/Schema/Cxx1.hs
--- a/glean/schema/hs/Glean/Schema/Cxx1.hs
+++ b/glean/schema/hs/Glean/Schema/Cxx1.hs
@@ -59,6 +59,7 @@
   , (PredicateRef "cxx1.ObjcPropertyImplementation" 5)
   , (PredicateRef "cxx1.ObjcContainerDefinition" 5)
   , (PredicateRef "cxx1.VariableDeclarationNonLocalByName" 5)
+  , (PredicateRef "cxx1.ObjcContainerProperties" 5)
   , (PredicateRef "cxx1.NamespaceDeclaration" 5)
   , (PredicateRef "cxx1.RecordDeclarationStruct" 5)
   , (PredicateRef "cxx1.DeclFamilyOf" 5)
@@ -107,6 +108,7 @@
   , (PredicateRef "cxx1.EnumDeclarationByName" 5)
   , (PredicateRef "cxx1.ObjcPropertyDeclaration" 5)
   , (PredicateRef "cxx1.EnumLowerCase" 5)
+  , (PredicateRef "cxx1.ObjcContainerMethods" 5)
   , (PredicateRef "cxx1.TypeAliasLowerCase" 5)
   , (PredicateRef "cxx1.FunctionAttribute" 5)
   , (PredicateRef "cxx1.Trace" 5)
diff --git a/glean/schema/hs/Glean/Schema/Erlang.hs b/glean/schema/hs/Glean/Schema/Erlang.hs
--- a/glean/schema/hs/Glean/Schema/Erlang.hs
+++ b/glean/schema/hs/Glean/Schema/Erlang.hs
@@ -16,5 +16,6 @@
   , (PredicateRef "erlang.DeclarationToFqn" 1)
   , (PredicateRef "erlang.DeclarationUses" 1)
   , (PredicateRef "erlang.SearchByName" 1)
+  , (PredicateRef "erlang.Module" 1)
   ]
 
diff --git a/glean/schema/hs/Glean/Schema/GleanTest.hs b/glean/schema/hs/Glean/Schema/GleanTest.hs
--- a/glean/schema/hs/Glean/Schema/GleanTest.hs
+++ b/glean/schema/hs/Glean/Schema/GleanTest.hs
@@ -9,6 +9,7 @@
   , (PredicateRef "glean.test.MatchOneAlt" 6)
   , (PredicateRef "glean.test.DerivedKeyValue" 6)
   , (PredicateRef "glean.test.ViaStringPair" 6)
+  , (PredicateRef "glean.test.LargeKey" 6)
   , (PredicateRef "glean.test.Predicate" 6)
   , (PredicateRef "glean.test.EmptyPred" 6)
   , (PredicateRef "glean.test.Node" 6)
diff --git a/glean/schema/hs/Glean/Schema/Hack.hs b/glean/schema/hs/Glean/Schema/Hack.hs
--- a/glean/schema/hs/Glean/Schema/Hack.hs
+++ b/glean/schema/hs/Glean/Schema/Hack.hs
@@ -7,10 +7,13 @@
 allPredicates =
   [ (PredicateRef "hack.TargetUsesAbs" 6)
   , (PredicateRef "hack.ClassConstDeclaration" 6)
+  , (PredicateRef "hack.FileHasRedundantPackageOverride" 6)
   , (PredicateRef "hack.NamespaceQName" 6)
+  , (PredicateRef "hack.FileHasPackageOverride" 6)
   , (PredicateRef "hack.TypedefDefinition" 6)
   , (PredicateRef "hack.SearchClassConstByName" 6)
   , (PredicateRef "hack.InterfaceDefinition" 6)
+  , (PredicateRef "hack.Package_" 6)
   , (PredicateRef "hack.SearchGlobalConstByLowerCaseName" 6)
   , (PredicateRef "hack.FunctionDeclaration" 6)
   , (PredicateRef "hack.SearchTraitByLowerCaseName" 6)
@@ -36,6 +39,7 @@
   , (PredicateRef "hack.StringLiteral" 6)
   , (PredicateRef "hack.GlobalNamespaceAlias" 6)
   , (PredicateRef "hack.SearchInterfaceByName" 6)
+  , (PredicateRef "hack.FilePackage" 6)
   , (PredicateRef "hack.SearchClassByLowerCaseName" 6)
   , (PredicateRef "hack.ContainerDeclarationQName" 6)
   , (PredicateRef "hack.UserAttribute" 6)
@@ -88,6 +92,7 @@
   , (PredicateRef "hack.SearchEnumByLowerCaseName" 6)
   , (PredicateRef "hack.AttributeHasParameter" 6)
   , (PredicateRef "hack.ContainerParent" 6)
+  , (PredicateRef "hack.DefinitionToDeclaration" 6)
   , (PredicateRef "hack.SearchTypeConstByLowerCaseName" 6)
   , (PredicateRef "hack.SearchTraitByName" 6)
   , (PredicateRef "hack.DeclarationComment" 6)
diff --git a/glean/schema/hs/Glean/Schema/SearchCode.hs b/glean/schema/hs/Glean/Schema/SearchCode.hs
--- a/glean/schema/hs/Glean/Schema/SearchCode.hs
+++ b/glean/schema/hs/Glean/Schema/SearchCode.hs
@@ -10,9 +10,11 @@
   , (PredicateRef "search.code.HackSearchByNameKindWithNamespace" 16)
   , (PredicateRef "search.code.CxxNameLowerCase" 16)
   , (PredicateRef "search.code.JavaSearchByScope" 16)
+  , (PredicateRef "search.code.SwiftSearchByNameAndKind" 16)
   , (PredicateRef "search.code.KotlinSearchByNameWithFact" 16)
   , (PredicateRef "search.code.KotlinSearchByLowerCaseName" 16)
   , (PredicateRef "search.code.PythonSearchByLowerCaseScopeAndKind" 16)
+  , (PredicateRef "search.code.SwiftSearchByLowerCaseNameAndKind" 16)
   , (PredicateRef "search.code.KotlinSearchByScopeWithName" 16)
   , (PredicateRef "search.code.BuckSearchByLocalNameFact" 16)
   , (PredicateRef "search.code.SearchByLowerCaseScopeAndKind" 16)
@@ -28,6 +30,7 @@
   , (PredicateRef "search.code.CSharpSearchByLowerCaseName" 16)
   , (PredicateRef "search.code.LsifSearchByName" 16)
   , (PredicateRef "search.code.HackNameLowerCase" 16)
+  , (PredicateRef "search.code.RustSearchByLowerCaseNameAndKind" 16)
   , (PredicateRef "search.code.FlowSearchByScopeAndKind" 16)
   , (PredicateRef "search.code.CSharpSearchByName" 16)
   , (PredicateRef "search.code.ThriftSearchByName" 16)
diff --git a/glean/schema/hs/Glean/Schema/Src.hs b/glean/schema/hs/Glean/Schema/Src.hs
--- a/glean/schema/hs/Glean/Schema/Src.hs
+++ b/glean/schema/hs/Glean/Schema/Src.hs
@@ -5,7 +5,8 @@
 
 allPredicates :: [PredicateRef]
 allPredicates =
-  [ (PredicateRef "src.File" 1)
+  [ (PredicateRef "src.FileContent" 1)
+  , (PredicateRef "src.File" 1)
   , (PredicateRef "src.FileDigest" 1)
   , (PredicateRef "src.FileLines" 1)
   , (PredicateRef "src.IndexFailure" 1)
diff --git a/glean/schema/source/buck.angle b/glean/schema/source/buck.angle
--- a/glean/schema/source/buck.angle
+++ b/glean/schema/source/buck.angle
@@ -263,6 +263,15 @@
 # The span goes from `c` to `)`
 #
 
+type Kind = enum {
+  Function | Variable
+}
+
+predicate DefinitionKind : {
+  definition : Definition,
+  kind: Kind,
+}
+
 predicate Definition : {
   module : src.File,
   name : string,
@@ -275,6 +284,16 @@
   span: src.ByteSpan,
 }
 
+predicate DefinitionMetadata:
+{
+  definition : Definition,
+  kind: Kind,
+  span: src.ByteSpan,
+}
+{ DEFN, KIND, SPAN } where
+    DefinitionLocation { definition = DEFN, file = _, span = SPAN };
+    DefinitionKind { definition = DEFN, kind = KIND };
+
 predicate TargetLocation:
 {
   locator : Locator,
@@ -417,7 +436,10 @@
   {
     lit: string |
     sequence: [ArgumentValue] |
-    mapping: [ArgumentMapping]
+    mapping: [ArgumentMapping] |
+    none |
+    def_ : Definition |
+    other : src.ByteSpan |
   }
 
 predicate CallArgument: {
@@ -456,6 +478,16 @@
     callExpr : CallExpr,
     target : TargetCall,
   } stored { CE, T } where T = buck.TargetCall { callExpr = { just = CE } }
+
+# A call to a function, not restricted to build rules
+predicate FileCall:
+  {
+    file: src.File,
+    callee_span: src.ByteSpan,
+    callExpr : maybe CallExpr,
+    arguments: [CallArgument],
+    locator: maybe Locator,  # we store the target only if the call is a build_rule
+  }
 
 # A translation unit (source file and target)
 predicate TranslationUnit :
diff --git a/glean/schema/source/chef.angle b/glean/schema/source/chef.angle
new file mode 100644
--- /dev/null
+++ b/glean/schema/source/chef.angle
@@ -0,0 +1,58 @@
+schema chef.1{
+import src
+
+predicate Name : string
+
+predicate Location: src.FileLocation
+
+# FQN = fully qualified name (name which uniquely describes the identifier)
+# Ex: methodXYZ's FQN will be moduleA.classB.classC.methodXYZ
+predicate Symbol :
+ {
+   identifier: Name, # Ex: methodXYZ
+   qualifiedName: [Name] # Qualified name of the symbol, [moduleA,classB,classC]
+ }
+
+predicate Cookbook :
+ {
+   cookbookName: Name, # name of the cookbook
+   cookbookLocation: Location,
+ }
+
+# list of cookbooks this cookbook depends on
+predicate CookbookDependsOn :
+ {
+   cookbook: Cookbook,
+   dependsOn: Cookbook,
+ }
+
+# list of cookbooks which are depending on a cookbook
+predicate CookbookDependedOnBy :
+ {
+   cookbook: Cookbook,
+   dependedOnBy: Cookbook,
+ } stored {C,D} where CookbookDependsOn {D,C}
+
+predicate DefinedAt :
+ {
+   symbol: Symbol,
+   definitionLocation: Location,
+ }
+
+predicate ReferencedAt :
+ {
+   symbol: Symbol,
+   referenceLocation: Location,
+ }
+
+ predicate DefLocationSymbol :{
+   definitionLocation: Location,
+   symbol: Symbol,
+ } stored {L,S} where DefinedAt {S,L}
+
+ predicate RefLocationSymbol :{
+   referenceLocation: Location,
+   symbol: Symbol,
+ } stored {L,S} where ReferencedAt {S,L}
+
+}
diff --git a/glean/schema/source/code.angle b/glean/schema/source/code.angle
--- a/glean/schema/source/code.angle
+++ b/glean/schema/source/code.angle
@@ -4,6 +4,7 @@
 import src
 import code.anglelang
 import code.buck
+import code.chef
 import code.csharp
 import code.cxx
 import code.dataswarm
@@ -18,7 +19,8 @@
 import code.lsif
 import code.pp
 import code.python
-import code.scip.1
+import code.scip
+import code.swift
 import codemarkup.types
 
 type Entity =
@@ -40,12 +42,14 @@
     graphql : code.graphql.Entity |
     dataswarm: code.dataswarm.Entity |
     angle: code.anglelang.Entity |
+    chef: code.chef.Entity |
   }
 
 type SymbolId =
   {
     scip : code.scip.SymbolId |
     cxx : code.cxx.SymbolId |
+    swift : code.swift.SymbolId |
   }
 
 # language enum values for exactly the set of entity tags (including LSIF)
@@ -56,7 +60,8 @@
   enum {
     Cpp | PreProcessor | Java | Haskell | Python | Hack | JavaScript | Rust |
     Thrift | Buck | Erlang | FSharp | Go | Kotlin | OCaml | Scala | Swift |
-    TypeScript | CSharp | GraphQL | Dataswarm | Yaml | Angle |
+    TypeScript | CSharp | GraphQL | Dataswarm | Yaml | Angle | Chef | C |
+    TypeScriptReact | JavaScriptReact | Ruby | VisualBasic | Dart | PHP
   }
 
 # entity tag to language id
@@ -82,7 +87,8 @@
     ( { dataswarm = _ } = Entity; Dataswarm = Language ) |
     ( { angle = _ } = Entity; Angle = Language ) |
     ( { lsif = LSIF }  = Entity; EntityLanguageLSIF { LSIF, Language } ) |
-    ( { scip = SCIP }  = Entity; EntityLanguageSCIP { SCIP, Language } );
+    ( { scip = SCIP }  = Entity; EntityLanguageSCIP { SCIP, Language } ) |
+    ( { chef = _ } = Entity; Chef = Language );
 
 # (private) helper for the LSIF subset
 predicate EntityLanguageLSIF:
@@ -110,7 +116,23 @@
     language: Language
   }
   { SCIP, Language } where
-    { rust = _ } = SCIP; Rust : Language = Language;
+    ({ rust = _ } = SCIP; Rust : Language = Language)
+    | ({ go = _ } = SCIP; Go : Language = Language)
+    | ({ java = _ } = SCIP; Java : Language = Language)
+    | ({ kotlin = _ } = SCIP; Kotlin : Language = Language)
+    | ({ typescript = _ } = SCIP; TypeScript : Language = Language)
+    | ({ swift = _ } = SCIP; Swift : Language = Language)
+    | ({ typescriptReact = _ } = SCIP; TypeScriptReact : Language = Language)
+    | ({ javascript = _ } = SCIP; JavaScript : Language = Language)
+    | ({ javascriptReact = _ } = SCIP; JavaScriptReact : Language = Language)
+    | ({ python = _ } = SCIP; Python : Language = Language)
+    | ({ c = _ } = SCIP; C : Language = Language)
+    | ({ cpp = _ } = SCIP; Cpp : Language = Language)
+    | ({ csharp = _ } = SCIP; CSharp : Language = Language)
+    | ({ ruby = _ } = SCIP; Ruby : Language = Language)
+    | ({ visualBasic = _ } = SCIP; VisualBasic : Language = Language)
+    | ({ dart = _ } = SCIP; Dart : Language = Language)
+    | ({ php = _ } = SCIP; PHP : Language = Language)
 
 type Annotations =
   {
diff --git a/glean/schema/source/code.chef.angle b/glean/schema/source/code.chef.angle
new file mode 100644
--- /dev/null
+++ b/glean/schema/source/code.chef.angle
@@ -0,0 +1,11 @@
+# Copyright (c) Meta Platforms, Inc. and affiliates.
+
+# For Glass integration
+schema code.chef.1 {
+    import chef
+
+    type Entity =
+    {
+        symbol : chef.Symbol |
+    }
+}
diff --git a/glean/schema/source/code.scip.angle b/glean/schema/source/code.scip.angle
--- a/glean/schema/source/code.scip.angle
+++ b/glean/schema/source/code.scip.angle
@@ -1,6 +1,7 @@
 # Copyright (c) Meta Platforms, Inc. and affiliates.
 
 schema code.scip.1 {
+
 import scip
 
 type Entity =
@@ -11,6 +12,17 @@
     java : scip.SomeEntity |
     kotlin : scip.SomeEntity |
     swift: scip.SomeEntity |
+    python: scip.SomeEntity |
+    typescriptReact : scip.SomeEntity |
+    javascript : scip.SomeEntity |
+    javascriptReact : scip.SomeEntity |
+    c: scip.SomeEntity |
+    cpp: scip.SomeEntity |
+    ruby: scip.SomeEntity |
+    csharp: scip.SomeEntity |
+    visualBasic: scip.SomeEntity |
+    dart: scip.SomeEntity |
+    php: scip.SomeEntity |
   }
 
 type SymbolId = scip.Symbol
diff --git a/glean/schema/source/code.swift.angle b/glean/schema/source/code.swift.angle
new file mode 100644
--- /dev/null
+++ b/glean/schema/source/code.swift.angle
@@ -0,0 +1,9 @@
+# Copyright (c) Meta Platforms, Inc. and affiliates.
+
+schema code.swift.1 {
+
+import scip
+
+type SymbolId = scip.Symbol
+
+}
diff --git a/glean/schema/source/codemarkup.angle b/glean/schema/source/codemarkup.angle
--- a/glean/schema/source/codemarkup.angle
+++ b/glean/schema/source/codemarkup.angle
@@ -4,6 +4,7 @@
 import src
 import code.24
 import codemarkup.buck
+import codemarkup.chef
 import codemarkup.csharp
 import codemarkup.cxx
 import codemarkup.dataswarm
@@ -20,6 +21,7 @@
 import codemarkup.pp
 import codemarkup.python
 import codemarkup.scip
+import codemarkup.swift
 import codemarkup.types
 import codemarkup.anglelang
 
@@ -55,7 +57,8 @@
     (codemarkup.fbthrift.ThriftEntityKind { E, Kind }; { fbthrift = E } = Entity) |
     (codemarkup.buck.BuckEntityKind { E, Kind }; { buck = E } = Entity) |
     (codemarkup.csharp.CSharpEntityKind { E, Kind }; { csharp = E } = Entity) |
-    (codemarkup.graphql.GraphQLEntityKind { E, Kind }; { graphql = E } = Entity) ;
+    (codemarkup.graphql.GraphQLEntityKind { E, Kind }; { graphql = E } = Entity) |
+    (codemarkup.haskell.HaskellEntityKind { E, Kind }; { hs = E } = Entity) ;
 
 # Retrieve information about an entity
 predicate EntityInfo:
@@ -82,7 +85,9 @@
        (codemarkup.csharp.CSharpEntityKind { E, Kind };
         { csharp = E } = Entity) |
        (codemarkup.graphql.GraphQLEntityKind { E, Kind };
-        { graphql = E } = Entity);
+        { graphql = E } = Entity) |
+       (codemarkup.haskell.HaskellEntityKind { E, Kind };
+        { hs = E } = Entity);
       )
     ) |
     (codemarkup.cxx.CxxEntityInfo { E, Info }; { cxx = E } = Entity) |
@@ -90,7 +95,7 @@
     (codemarkup.lsif.EntityInfo { E, Info }; { lsif = E } = Entity) |
     (codemarkup.scip.EntityInfo { E, Info }; { scip = E } = Entity);
 
-# Source code digests produced by unspecified hash function
+# Source code digests produced by unspecified hash function
 predicate FileEntityDigest:
   { file: src.File
   , entity: code.Entity,
@@ -166,7 +171,9 @@
     (codemarkup.graphql.GraphQLResolveLocation { Location, E };
      { graphql = E } = Entity) |
     (codemarkup.anglelang.AngleResolveLocation { Location, E };
-     { angle = E } = Entity);
+     { angle = E } = Entity) |
+    (codemarkup.chef.ChefResolveLocation { Location, E };
+     { chef = E } = Entity);
 
 predicate EntityLocation:
   {
@@ -205,7 +212,9 @@
     (codemarkup.graphql.GraphQLEntityLocation { E, Location };
      { graphql = E } = Entity) |
     (codemarkup.anglelang.AngleEntityLocation { E, Location };
-     { angle = E } = Entity);
+     { angle = E } = Entity) |
+    (codemarkup.chef.ChefEntityLocation { E, Location };
+     { chef = E } = Entity);
 
 # Maps a generated entity to its source definition
 predicate GeneratedEntityToIdlEntity:
@@ -236,48 +245,67 @@
     file: src.File,
     genEntity: GenericEntity
 } { File, GenEntity } where
-  (codemarkup.hack.HackFileEntityXRefLocations { File, XRef, E };
-  { plainEntity = { xref = XRef, entity = { hack = E } } } = GenEntity ) |
-  (codemarkup.hack.HackFileEntityXRefLocations { File, { source = Source }, E };
-   codemarkup.hack.HackEntityIdl { E, IdlEntity };
-   { xlangEntity = { source = Source, entity = IdlEntity } } = GenEntity ) |
-  (codemarkup.flow.FlowFileEntityXRefLocations { File, XRef, E };
-  { plainEntity = { xref = XRef, entity = { flow = E } } } = GenEntity ) |
-  (codemarkup.python.PythonFileEntityXRefLocations { File, XRef, E };
-  { plainEntity = { xref = XRef, entity = { python = E } } } = GenEntity ) |
-  (codemarkup.cxx.CxxFileEntityXRefLocations { File, XRef, E };
-  { plainEntity = { xref = XRef, entity = { cxx = E } } }  = GenEntity ) |
-  (codemarkup.pp.PpFileEntityXRefLocations { File, XRef, E };
-  { plainEntity = { xref = XRef, entity = { pp = E } } } = GenEntity ) |
-  (codemarkup.haskell.HaskellFileEntityXRefLocations { File, XRef, E };
-  { plainEntity = { xref = XRef, entity = { hs = E } } } = GenEntity ) |
-  (codemarkup.buck.BuckFileEntityXRefLocations { File, XRef, E };
-  { plainEntity = { xref = XRef, entity = { buck = E } } } = GenEntity) |
-  (codemarkup.fbthrift.ThriftFileEntityXRefLocations { File, XRef, E };
-  { plainEntity = { xref = XRef, entity = { fbthrift = E } } } = GenEntity) |
-  (codemarkup.erlang.ErlangFileEntityXRefLocations { File, XRef, E };
-  { plainEntity = { xref = XRef, entity = { erlang = E } } } = GenEntity) |
-  (codemarkup.lsif.LsifFileEntityXRefLocations { File, XRef, E };
-  { plainEntity = { xref = XRef, entity = { lsif = E } } } = GenEntity)
+    ( codemarkup.hack.HackFileEntityXRefLocations { File, XRef, E }
+    ; { plainEntity = { xref = XRef, entity = { hack = E } } } = GenEntity
+    )
+  | ( codemarkup.hack.HackFileEntityXRefLocations { File, { source = Source }, E }
+    ; codemarkup.hack.HackEntityIdl { E, IdlEntity }
+    ; { xlangEntity = { source = Source, entity = IdlEntity } } = GenEntity
+    )
+  | ( codemarkup.flow.FlowFileEntityXRefLocations { File, XRef, E }
+    ; { plainEntity = { xref = XRef, entity = { flow = E } } } = GenEntity
+    )
+  | ( codemarkup.python.PythonFileEntityXRefLocations { File, XRef, E }
+    ; { plainEntity = { xref = XRef, entity = { python = E } } } = GenEntity
+    )
+  | ( codemarkup.cxx.CxxFileEntityXRefLocations { File, XRef, E }
+    ; { plainEntity = { xref = XRef, entity = { cxx = E } } }  = GenEntity
+    )
+  | ( codemarkup.pp.PpFileEntityXRefLocations { File, XRef, E }
+    ; { plainEntity = { xref = XRef, entity = { pp = E } } } = GenEntity
+    )
+  | ( codemarkup.haskell.HaskellFileEntityXRefLocations { File, XRef, E }
+    ; { plainEntity = { xref = XRef, entity = { hs = E } } } = GenEntity
+    )
+  | ( codemarkup.buck.BuckFileEntityXRefLocations { File, XRef, E }
+    ; { plainEntity = { xref = XRef, entity = { buck = E } } } = GenEntity
+    )
+  | ( codemarkup.fbthrift.ThriftFileEntityXRefLocations { File, XRef, E }
+    ; { plainEntity = { xref = XRef, entity = { fbthrift = E } } } = GenEntity
+    )
+  | ( codemarkup.erlang.ErlangFileEntityXRefLocations { File, XRef, E }
+    ; { plainEntity = { xref = XRef, entity = { erlang = E } } } = GenEntity
+    )
+  | ( codemarkup.lsif.LsifFileEntityXRefLocations { File, XRef, E }
+    ; { plainEntity = { xref = XRef, entity = { lsif = E } } } = GenEntity
+    )
   | ( codemarkup.scip.ScipFileEntityXRefLocations { File, XRef, E }
-      ; { plainEntity = { xref = XRef, entity = { scip = E } } } = GenEntity )
-  | ( codemarkup.scip.FileXLangSymbolRefs { File, Source, Symbol }
-      ; { xlangSymbol = { source = Source, symbol = { scip = Symbol } } } = GenEntity )
-  |
-  (codemarkup.java.JavalFileEntityXRefLocations { File, XRef, E };
-  { plainEntity = { xref = XRef, entity = { java = E } } } = GenEntity) |
-  (codemarkup.kotlin.KotlinFileEntityXRefLocations { File, XRef, E };
-  { plainEntity = { xref = XRef, entity = { kotlin = E } } } = GenEntity) |
-  (codemarkup.csharp.CSharpFileEntityXRefLocations { File, XRef, E };
-  { plainEntity = { xref = XRef, entity = { csharp = E } } } = GenEntity) |
-  (codemarkup.graphql.GraphQLFileEntityXRefLocations { File, XRef, E };
-  { plainEntity = { xref = XRef, entity = { graphql = E } } } = GenEntity) |
-  (codemarkup.dataswarm.DataswarmFileEntityXRefLocations { File, XRef, E };
-  { plainEntity = { xref = XRef, entity = { dataswarm = E } } } = GenEntity) |
-  (codemarkup.yaml.YamlFileEntityXLangXRefLocations { File, Source, E };
-  { xlangEntity = { source = Source, entity = E } } = GenEntity) |
-  (codemarkup.anglelang.AngleFileEntityXRefLocations { File, XRef, E };
-  { plainEntity = { xref = XRef, entity = { angle = E } } } = GenEntity)
+    ; { plainEntity = { xref = XRef, entity = { scip = E } } } = GenEntity
+    )
+  | ( codemarkup.swift.FileXLangSymbolRef { File, Source, Symbol }
+    ; { xlangSymbol = { source = Source, symbol = { swift = Symbol } } } = GenEntity
+    )
+  | ( codemarkup.java.JavalFileEntityXRefLocations { File, XRef, E }
+    ; { plainEntity = { xref = XRef, entity = { java = E } } } = GenEntity
+    )
+  | ( codemarkup.kotlin.KotlinFileEntityXRefLocations { File, XRef, E }
+    ; { plainEntity = { xref = XRef, entity = { kotlin = E } } } = GenEntity
+    )
+  | ( codemarkup.csharp.CSharpFileEntityXRefLocations { File, XRef, E }
+    ; { plainEntity = { xref = XRef, entity = { csharp = E } } } = GenEntity
+    )
+  | ( codemarkup.graphql.GraphQLFileEntityXRefLocations { File, XRef, E }
+    ; { plainEntity = { xref = XRef, entity = { graphql = E } } } = GenEntity
+    )
+  | ( codemarkup.dataswarm.DataswarmFileEntityXRefLocations { File, XRef, E }
+    ; { plainEntity = { xref = XRef, entity = { dataswarm = E } } } = GenEntity
+    )
+  | ( codemarkup.yaml.YamlFileEntityXLangXRefLocations { File, Source, E }
+    ; { xlangEntity = { source = Source, entity = E } } = GenEntity
+    )
+  | ( codemarkup.anglelang.AngleFileEntityXRefLocations { File, XRef, E }
+    ; { plainEntity = { xref = XRef, entity = { angle = E } } } = GenEntity
+    )
 
 predicate SymbolToEntity:
   {
@@ -329,8 +357,10 @@
      { graphql = E } = Entity) |
     (codemarkup.dataswarm.DataswarmFileEntityXRefLocations { File, XRef, E };
      { dataswarm = E } = Entity) |
-     (codemarkup.anglelang.AngleFileEntityXRefLocations { File, XRef, E };
-     { angle = E } = Entity);
+    (codemarkup.anglelang.AngleFileEntityXRefLocations { File, XRef, E };
+     { angle = E } = Entity) |
+    (codemarkup.chef.ChefFileEntityXRefLocations { File, XRef, E };
+     { chef = E } = Entity);
 
 # Xrefs without the target location. This can be useful in cases
 # where we don't have a target location, but we don't need it. This
@@ -420,6 +450,8 @@
      { flow = E } = Entity) |
     (codemarkup.python.PythonEntityUses { E, File, Span };
      { python = E } = Entity) |
+    (codemarkup.chef.ChefEntityUses { E, File, Span };
+    { chef = E } = Entity) |
     (codemarkup.cxx.CxxEntityUses { E, File, Span };
      { cxx = E } = Entity) |
     (codemarkup.haskell.HaskellEntityUses { E, File, Span };
@@ -948,7 +980,7 @@
 # You should not use this, instead use codemarkup.IndexedFile
 predicate EntityDataAvailable:  src.File
     File where
-      src.File _ = File; # bind File as demanded by the schema consistency check
+      src.File _ = File; # bind File as demanded by the schema consistency check
       # double negation is used to check for existence
       # (even if the Angle compiler could notice and optimize)
       !(!(codemarkup.FileEntityLocations { file = File } |
diff --git a/glean/schema/source/codemarkup.chef.angle b/glean/schema/source/codemarkup.chef.angle
new file mode 100644
--- /dev/null
+++ b/glean/schema/source/codemarkup.chef.angle
@@ -0,0 +1,49 @@
+schema codemarkup.chef.1 {
+import src
+import chef
+import code
+import code.chef
+import codemarkup.types
+
+
+predicate ChefEntityUses:
+  {
+    target: code.chef.Entity,
+    file: src.File,
+    range: src.ByteSpan,
+  }
+  {{ symbol = Symbol }, File, Span } where
+  chef.ReferencedAt { Symbol, { File, Span } }
+
+
+predicate ChefEntityLocation:
+  {
+    entity: code.chef.Entity,
+    location: codemarkup.types.Location,
+  }
+  { { symbol = Symbol }, { EntityName, File, { span = Span }, nothing } } where
+    chef.DefinedAt { Symbol,{File, Span} };
+    Symbol.identifier = chef.Name EntityName;
+
+predicate ChefResolveLocation:
+  {
+    location: codemarkup.types.Location,
+    entity: code.chef.Entity,
+  }
+  { { EntityName, File, {span = Span}, nothing }, { symbol = Symbol } } where
+  chef.DefinedAt { Symbol,{File, Span} };
+  Symbol.identifier = chef.Name EntityName
+
+predicate ChefFileEntityXRefLocations:
+  {
+    file: src.File,
+    xref: codemarkup.types.XRefLocation,
+    entity: code.chef.Entity,
+  } { File, {Location, {span = Span}}, { symbol = Symbol } } where
+  chef.ReferencedAt { Symbol, { File, Span } };
+  Symbol.identifier = chef.Name EntityName;
+  chef.DefinedAt { Symbol, {TargetFile,TargetSpan} };
+  Location = codemarkup.types.Location { EntityName, TargetFile, { span = TargetSpan }, nothing }
+
+
+}
diff --git a/glean/schema/source/codemarkup.haskell.angle b/glean/schema/source/codemarkup.haskell.angle
--- a/glean/schema/source/codemarkup.haskell.angle
+++ b/glean/schema/source/codemarkup.haskell.angle
@@ -132,4 +132,27 @@
     (ParentDecl.con?.fields[..]).name = ChildName
   )
 
+#
+# Entity kinds
+#
+
+predicate HaskellEntityKind:
+  {
+    entity: code.hs.Entity,
+    kind: codemarkup.types.SymbolKind,
+  }
+  { {name = Name}, Kind } where
+     hs.DeclarationOfName { name = Name, decl = Decl };
+     ( Decl = { val = _ }; Function = Kind ) |
+     ( Decl = { typeFamily = _ }; Type = Kind ) |
+     ( Decl = { type_ = _ }; Type = Kind ) |
+     ( Decl = { data = _ }; Type = Kind ) |
+     ( Decl = { con = _ }; Constant = Kind ) |
+     ( Decl = { patSyn = _ }; Constant = Kind ) |
+     ( Decl = { class_ = _ }; Class_ = Kind ) |
+     ( Decl = { method = _ }; Method = Kind ) |
+     ( Decl = { patBind = _ }; Variable = Kind ) |
+     ( Decl = { tyVarBind = _ }; TypeParameter = Kind ) |
+     ( Decl = { field = _ }; Field = Kind )
+
 }
diff --git a/glean/schema/source/codemarkup.python.angle b/glean/schema/source/codemarkup.python.angle
--- a/glean/schema/source/codemarkup.python.angle
+++ b/glean/schema/source/codemarkup.python.angle
@@ -58,7 +58,7 @@
   }
   {File, {Location , { span = Src } }, { decl = Decl }} where
   if (python.branches.FileToRoot { file = File }) then (
-    python.branches.DirectXRefByFile { File, {Decl, DeclFile, DeclSpan}, Src };
+    python.branches.ResolvedXRefsByFile { File, {Decl, DeclFile, DeclSpan}, Src };
     python.DeclarationToName Decl -> (python.Name Name);
     codemarkup.types.Location { Name, DeclFile, { span = DeclSpan }, nothing } = Location;
   ) else (
diff --git a/glean/schema/source/codemarkup.scip.angle b/glean/schema/source/codemarkup.scip.angle
--- a/glean/schema/source/codemarkup.scip.angle
+++ b/glean/schema/source/codemarkup.scip.angle
@@ -11,13 +11,26 @@
 # Resolving locations to entities
 #
 
+# only defined for function, package, class or namespace
+# todo: make indexer output predicates in this format
+predicate EnclosingSrcRange:
+  {
+    range : src.Range,
+    enclosingRange : src.Range
+  }
+  { Range, EnclosingR } where
+    lsif.types.FromSrcRange { Range, File, RangeS };
+    scip.EnclosingRange { { File, RangeS }, { File, EnclosingRS } };
+    lsif.types.ToSrcRange { File, EnclosingRS, EnclosingR }
+
 predicate ScipResolveLocation:
   {
     location: codemarkup.types.Location,
     entity: code.scip.Entity,
   }
-  { { Name, File, { range = Range }, nothing }, Entity } where
+  { { Name, File, { range = FullRange }, nothing }, Entity } where
     scip.ResolveLocation { { File, Range, Name }, Entity };
+    FullRange = if EnclosingSrcRange { Range, EncRange } then EncRange else Range;
 
 #
 # Finding entities' locations
@@ -28,9 +41,9 @@
     entity: code.scip.Entity,
     location: codemarkup.types.Location,
   }
-  { Entity, { Name, File, { range = Range }, nothing } } where
+  { Entity, { Name, File, { range = FullRange }, nothing } } where
     scip.EntityLocation { Entity, { File, Range, Name } };
-
+    FullRange = if EnclosingSrcRange { Range, EncRange } then EncRange else Range;
 #
 # Finding references in a file
 #
@@ -46,16 +59,6 @@
     { TargetFile, TargetRange, Name } = TargetLocation;
     { { Name, TargetFile, { range = TargetRange }, nothing },
       { range = SrcRange } } = XRefLocation;
-
-predicate FileXLangSymbolRefs:
-  {
-    file: src.File,
-    source: codemarkup.types.RangeSpan,
-    symbol: scip.Symbol,
-  }
-  { File, { range = SrcRange }, Symbol } where
-  scip.FileXLangSymbolRef { File, LsifRange, Symbol };
-  lsif.types.ToSrcRange { File, LsifRange, SrcRange };
 
 #
 # Language entity uses (find-references)
diff --git a/glean/schema/source/codemarkup.swift.angle b/glean/schema/source/codemarkup.swift.angle
new file mode 100644
--- /dev/null
+++ b/glean/schema/source/codemarkup.swift.angle
@@ -0,0 +1,21 @@
+# Copyright (c) Meta, Inc. and affiliates.
+
+schema codemarkup.swift.1 {
+
+import codemarkup.types
+import lsif.types
+import scip
+import src
+import swift
+
+predicate FileXLangSymbolRef:
+  {
+    file: src.File,
+    source: codemarkup.types.RangeSpan,
+    symbol: scip.Symbol,
+  }
+  { File, { range = SrcRange }, Symbol } where
+  swift.FileXLangSymbolRef { File, LsifRange, Symbol };
+  lsif.types.ToSrcRange { File, LsifRange, SrcRange };
+
+}
diff --git a/glean/schema/source/cxx.angle b/glean/schema/source/cxx.angle
--- a/glean/schema/source/cxx.angle
+++ b/glean/schema/source/cxx.angle
@@ -193,6 +193,13 @@
     source : src.Range,
   }
 
+predicate ObjcContainerMethods :
+  {
+    container : ObjcContainerId,
+    method: ObjcMethodDeclaration,
+  } stored { C, M } where
+    M = ObjcMethodDeclaration { container = C }
+
 # The full name of an ObjC method declaration.
 #
 # If the method has no parameters, the name is the method name. e.g., `foo`
@@ -225,6 +232,13 @@
     isAtomic : bool,
     source : src.Range,
   }
+
+predicate ObjcContainerProperties :
+  {
+    container : ObjcContainerId,
+    property : ObjcPropertyDeclaration,
+  } stored { C, P } where
+    P = ObjcPropertyDeclaration { container = C }
 
 # Objective C property implementation kind
 type ObjcPropertyKind = enum { Synthesize | Dynamic }
diff --git a/glean/schema/source/erlang.angle b/glean/schema/source/erlang.angle
--- a/glean/schema/source/erlang.angle
+++ b/glean/schema/source/erlang.angle
@@ -28,6 +28,17 @@
     text : maybe string,
   }
 
+predicate Module :
+  {
+    file : src.File,
+    name : string,
+    oncall : maybe string,
+    exports : maybe [string],
+    behaviours : maybe [string],
+    module_doc : maybe string,
+    exdoc_link: maybe string,
+  }
+
 ## types
 
 type Declaration =
diff --git a/glean/schema/source/github/schema.angle b/glean/schema/source/github/schema.angle
--- a/glean/schema/source/github/schema.angle
+++ b/glean/schema/source/github/schema.angle
@@ -2,9 +2,11 @@
 
 schema all.1 :
   builtin,
+  chef,
   code,
   code.anglelang,
   code.buck,
+  code.chef,
   code.csharp,
   code.cxx,
   code.erlang,
@@ -19,6 +21,7 @@
   codemarkup,
   codemarkup.anglelang,
   codemarkup.buck,
+  codemarkup.chef,
   codemarkup.csharp,
   codemarkup.cxx,
   codemarkup.erlang,
diff --git a/glean/schema/source/hack.angle b/glean/schema/source/hack.angle
--- a/glean/schema/source/hack.angle
+++ b/glean/schema/source/hack.angle
@@ -105,7 +105,7 @@
   }
 
 # Visibility scope of declaration
-type Visibility = enum { Private | Protected | Public | Internal }
+type Visibility = enum { Private | Protected | Public | Internal | ProtectedInternal }
 
 # Variance (subtyping)
 type Variance = enum { Contravariant | Covariant | Invariant }
@@ -278,6 +278,32 @@
 
 type ModuleMembership = { declaration: ModuleDeclaration, internal: bool}
 
+# Package information for a given file.
+predicate Package_ : string
+
+predicate FilePackage :
+  {
+    file : src.File,
+    package_ : Package_,
+    hasPackageOverride : bool,
+  }
+
+predicate FileHasPackageOverride : src.File
+stored F where FilePackage { F, _, true }
+
+#  File F has a redundant PackageOverride('prod') if
+# none of the files that refer to any of the declarations
+# in F belong to package 'prod'
+predicate FileHasRedundantPackageOverride : src.File
+F where 
+  hack.FileHasPackageOverride F;
+  hack.FilePackage { file = F, package_ = "prod" };
+  !(hack.FileDeclarations { file = F, declarations = Decls };
+    Decl = Decls[..];
+    Target = hack.XRefTarget { declaration = Decl };
+    hack.TargetUses { target = Target, file = ReferralFile };
+    hack.FilePackage { file = ReferralFile, package_ = "prod" })
+    
 # Infos related to a hack module
 predicate ModuleDefinition :
   {
@@ -339,6 +365,7 @@
     requireImplements : [InterfaceDeclaration],
     module_ : maybe ModuleMembership,
     requireClass : maybe [ClassDeclaration],
+    requireThisAs : [ClassDeclaration],
   }
 
 # Definition of a Hack enum
@@ -457,6 +484,24 @@
     module : ModuleDefinition |
   }
 
+predicate DefinitionToDeclaration :
+  {
+    definition : Definition,
+    declaration : Declaration,
+  }
+  { { class_ = { declaration = Decl }}, { container = { class_ = Decl }}} |
+  { { classConst = { declaration = Decl }}, { classConst = Decl }} |
+  { { enum_ = { declaration = Decl }}, { container = { enum_ = Decl }}} |
+  { { function_ = { declaration = Decl }}, { function_ = Decl }} |
+  { { globalConst = { declaration = Decl }}, { globalConst = Decl }} |
+  { { interface_ = { declaration = Decl }}, { container = { interface_ = Decl }}} |
+  { { trait = { declaration = Decl }}, { container = { trait = Decl }}} |
+  { { method = { declaration = Decl }}, { method = Decl }} |
+  { { property_ = { declaration = Decl }}, { property_ = Decl }} |
+  { { typeConst = { declaration = Decl }}, { typeConst = Decl }} |
+  { { typedef_ = { declaration = Decl }}, { typedef_ = Decl }} |
+  { { module = { declaration = Decl }}, { module = Decl }}
+
 # Occurrences are symbols referenced where the class definition could not
 # be found. Expect the class name to be a special name like
 # HH_FIXME\MISSING_TYPE_IN_HIERARCHY
@@ -592,8 +637,8 @@
   { AS[..], { method = { attributes = AS }}} |
   { AS[..], { property_ = { attributes = AS }}} |
   { AS[..], { typeConst = { attributes = AS }}} |
-  { AS[..], { module = { attributes = AS }}} |
-  { AS[..], { typedef_ = { attributes = AS }}}
+  { AS[..], { typedef_ = { attributes = AS }}} |
+  { AS[..], { module = { attributes = AS }}}
 
 predicate AttributeHasParameter :
   {
diff --git a/glean/schema/source/lsif.types.angle b/glean/schema/source/lsif.types.angle
--- a/glean/schema/source/lsif.types.angle
+++ b/glean/schema/source/lsif.types.angle
@@ -57,6 +57,18 @@
     columnEnd : nat,
   }
 
+predicate RangeSpanContains:
+  {
+    inner: RangeSpan,
+    outer: RangeSpan,
+  } { I, O } where
+    {LBI, CBI, LEI, CEI} = I;
+    {LBO, CBO, LEO, CEO} = O;
+    LBO <= LBI;
+    LEI <= LEO;
+    (LBO < LBI | CBO <= CBI);
+    (LEI < LEO | CEI <= CEO)
+
 # convenience to convert between lsif.RangeSpan and src.Range
 # These are both 1-indexed range types, but lsif doesn't have a File
 predicate ToSrcRange:
diff --git a/glean/schema/source/python.branches.angle b/glean/schema/source/python.branches.angle
--- a/glean/schema/source/python.branches.angle
+++ b/glean/schema/source/python.branches.angle
@@ -13,17 +13,77 @@
     root: Root,
   }
 
-predicate DirectXRefByFile:
+predicate CommonDependency: Root
+
+predicate TargetLocation:
   {
     file: src.File,
+    target: python.Name,
+    decl_location: python.DeclarationLocation
+  }
+  { File, TargetName, Target } where
+  python.DeclarationWithName { TargetName, Decl };
+  Target = python.DeclarationLocation { declaration = Decl, file = SourceFile };
+  FileToRoot { file = SourceFile, root = Root };
+  (FileToRoot { file = File, root = Root } | CommonDependency Root);
+
+predicate DirectXRefsByFile:
+  {
+    file: src.File,
     target: python.DeclarationLocation,
     source: src.ByteSpan,
   }
-  stored { File, Target, Span } where
+  { File, Target, Span } where
   python.XRefsViaNameByFile { File, XRefs };
   { target = TargetName, source = Span } = XRefs[..];
-  python.DeclarationWithName { TargetName, Decl };
-  Target = python.DeclarationLocation { declaration = Decl, file = SourceFile };
-  FileToRoot { file = SourceFile, root = Root };
-  FileToRoot { file = File, root = Root };
+  TargetLocation {File, TargetName, Target};
+
+
+predicate ImportedDeclaration:
+  {
+    import_decl: python.DeclarationLocation,
+    imported_declaration: python.DeclarationLocation,
+  } {ImportDecl, ImportedDeclaration} where
+  python.DeclarationLocation { declaration = {imp = { from_name = FromName} }, file = ImportFile} = ImportDecl;
+  TargetLocation {ImportFile, FromName, ImportedDeclaration};
+
+
+predicate ResolveOriginalDeclaration:
+  {
+    decl_location: python.DeclarationLocation,
+    original_decl_location: python.DeclarationLocation,
+  }
+  {DeclLocation, OriginalDeclaration} where
+  OriginalDeclaration = if (
+      ImportedDeclaration { DeclLocation, DeclLocation1};
+    ) then (
+      if (
+        ImportedDeclaration { DeclLocation1, DeclLocation2 };
+      ) then (
+        if (
+          ImportedDeclaration { DeclLocation2, DeclLocation3 };
+        ) then (
+          if (
+            ImportedDeclaration { DeclLocation3, DeclLocation4 };
+          ) then (
+            if (
+              ImportedDeclaration { DeclLocation4, DeclLocation5 };
+            ) then (
+              DeclLocation5 # returns declaration location 5 even if there are other imports
+            ) else ( DeclLocation4 )
+          ) else ( DeclLocation3 )
+        ) else ( DeclLocation2 )
+      ) else ( DeclLocation1 )
+    ) else ( DeclLocation );
+
+
+predicate ResolvedXRefsByFile:
+  {
+      file: src.File,
+      target: python.DeclarationLocation,
+      source: src.ByteSpan,
+  }
+  { File, OriginalDeclLocation, Span } where
+  DirectXRefsByFile { File, DeclLocation, Span};
+  ResolveOriginalDeclaration { DeclLocation, OriginalDeclLocation};
 }
diff --git a/glean/schema/source/python.xrefs.angle b/glean/schema/source/python.xrefs.angle
new file mode 100644
--- /dev/null
+++ b/glean/schema/source/python.xrefs.angle
@@ -0,0 +1,32 @@
+# Copyright (c) Meta Platforms, Inc. and affiliates.
+
+schema python.xrefs.1 {
+import builtin.1
+import python.4
+import src
+
+
+type XRefDefinitionLocation = {
+    name: python.Name,
+    file: maybe src.File,
+}
+
+type XRef = {
+    target: XRefDefinitionLocation,
+    source: src.ByteSpan,
+}
+
+predicate XRefsByFile:
+{
+    file: src.File,
+    xrefs: [XRef]
+}
+
+predicate XRefsByTarget:
+{
+    target: python.DeclarationLocation,
+    file: src.File,
+    spans: [src.ByteSpan]
+}
+
+}
diff --git a/glean/schema/source/scip.angle b/glean/schema/source/scip.angle
--- a/glean/schema/source/scip.angle
+++ b/glean/schema/source/scip.angle
@@ -62,6 +62,13 @@
   } stored { Symbol, DisplayName } where
     scip.DisplayNameSymbol { DisplayName, Symbol }
 
+predicate LowerCaseDisplayNameSymbol: {
+  displayName: string,
+  symbol: Symbol
+}
+stored { prim.toLower N, S } where
+scip.DisplayNameSymbol { scip.DisplayName N, S }
+
 # These correspond to SCIP occurrences with symbol_role = `Definition`
 predicate Definition:
   {
@@ -86,6 +93,26 @@
     location: FileRange
   }
 
+predicate EnclosingRange:
+  {
+    range: scip.FileRange,
+    enclosingRange: scip.FileRange,
+  }
+
+# For example, the symbol for a class enclosed the symbol for a method of that class
+predicate EnclosingSymbol:
+  {
+    symbol: scip.Symbol,
+    enclosing: scip.Symbol,
+  }
+
+predicate EnclosedSymbol:
+  {
+    symbol: scip.Symbol,
+    enclosed: scip.Symbol,
+  } stored { Enclosing, Enclosed } where
+    scip.EnclosingSymbol { Enclosing, Enclosed }
+
 predicate ReferenceLocation:
   {
     file : src.File,
@@ -194,6 +221,17 @@
     java: SomeEntity |
     kotlin: SomeEntity |
     swift: SomeEntity |
+    python: SomeEntity |
+    typescriptReact: SomeEntity |
+    javascript: SomeEntity |
+    javascriptReact: SomeEntity |
+    c: SomeEntity |
+    cpp: SomeEntity |
+    ruby: SomeEntity |
+    csharp: SomeEntity |
+    visualBasic: SomeEntity |
+    dart: SomeEntity |
+    php: SomeEntity |
   }
 
 # entities are scip.Definitions
@@ -214,9 +252,20 @@
     ( Rust = Language; { rust = SomeEntity }) |
     ( Go = Language; { go = SomeEntity }) |
     ( TypeScript = Language; { typescript = SomeEntity }) |
+    ( TypeScriptReact = Language; { typescriptReact = SomeEntity }) |
+    ( JavaScript = Language; { javascript = SomeEntity }) |
+    ( JavaScriptReact = Language; { javascriptReact = SomeEntity }) |
     ( Swift = Language; { swift = SomeEntity }) |
     ( Java = Language; { java = SomeEntity }) |
-    ( Kotlin = Language; { kotlin = SomeEntity }) = Entity;
+    ( Python = Language; { python = SomeEntity }) |
+    ( C = Language; { c = SomeEntity }) |
+    ( Cpp = Language; { cpp = SomeEntity }) |
+    ( Kotlin = Language; { kotlin = SomeEntity }) |
+    ( Ruby = Language; { ruby = SomeEntity }) |
+    ( CSharp = Language; { csharp = SomeEntity }) |
+    ( VisualBasic = Language; { visualBasic = SomeEntity }) |
+    ( Dart = Language; { dart = SomeEntity }) |
+    ( PHP = Language; { php = SomeEntity }) = Entity
 
 # eliminate entity language tags. inverse of TagDefinition
 predicate EntityDefinition:
@@ -228,9 +277,20 @@
     ({ rust = SomeEntity }) |
     ({ go = SomeEntity }) |
     ({ typescript = SomeEntity }) |
-    ({ swift = SomeEntity }) |
     ({ java = SomeEntity }) |
-    ({ kotlin = SomeEntity }) = Entity;
+    ({ kotlin = SomeEntity }) |
+    ({ swift = SomeEntity }) |
+    ({ python = SomeEntity }) |
+    ({ typescriptReact = SomeEntity }) |
+    ({ javascript = SomeEntity }) |
+    ({ javascriptReact = SomeEntity }) |
+    ({ c = SomeEntity }) |
+    ({ cpp = SomeEntity }) |
+    ({ ruby = SomeEntity }) |
+    ({ csharp = SomeEntity }) |
+    ({ visualBasic = SomeEntity }) |
+    ({ dart = SomeEntity }) |
+    ({ php = SomeEntity }) = Entity;
     { defn = Defn } = SomeEntity
 
 # Symbol locations type. Analog of codemarkup:Location
@@ -248,8 +308,8 @@
     entity: scip.Entity,
   }
   { Location, Entity } where
-    scip.FileLanguage { File, Language };
     { File, SrcRange, Name } = Location;
+    scip.FileLanguage { File, Language };
     lsif.types.FromSrcRange { SrcRange, File, RangeSpan };
     scip.DefinitionLocation { File, RangeSpan, Defn };
     scip.TagDefinition { Language, Defn, Entity };
@@ -318,33 +378,36 @@
 predicate SearchBySymbol:
   {
     symbol : scip.Symbol,
+    language: lsif.types.LanguageId,
     entity : scip.Entity,
   }
-  { Symbol, Entity } where
+  { Symbol, Language, Entity } where
     Defn = scip.Definition { symbol = Symbol };
     { location = { file = File } } = Defn;
     scip.FileLanguage { File, Language };
     scip.TagDefinition { Language, Defn, Entity }
 
-predicate FileXLangSymbolRef:
+predicate SearchByNameKindLanguage:
   {
-    file: src.File,
-    range: lsif.types.RangeSpan,
-    target: scip.Symbol,
+    name : string,
+    kind : maybe lsif.types.SymbolKind,
+    language: lsif.types.LanguageId,
+    entity : scip.Entity,
   }
-  { File, Range, Symbol } where
-  scip.FileLanguage { file = File, language = Swift };
-  scip.ReferenceLocation { File, Range, { symbol = Symbol } };
-  Symbol = "c:objc"..;
+  { Name, Kind, Language, Entity } where
+    scip.DisplayNameSymbol { DisplayName Name, Symbol };
+    Kind = ( if (scip.SymbolKind { Symbol, K }) then { just = K } else nothing );
+    scip.SearchBySymbol { Symbol, Language, Entity }
 
-predicate SearchByNameKind:
+predicate SearchByLowerCaseNameKindLanguage:
   {
     name : string,
     kind : maybe lsif.types.SymbolKind,
+    language: lsif.types.LanguageId,
     entity : scip.Entity,
   }
-  { Name, Kind, Entity } where
-    scip.DisplayNameSymbol { DisplayName Name, Symbol };
+  { Name, Kind, Language, Entity } where
+    scip.LowerCaseDisplayNameSymbol { Name, Symbol };
     Kind = ( if (scip.SymbolKind { Symbol, K }) then { just = K } else nothing );
-    scip.SearchBySymbol { Symbol, Entity }
+    scip.SearchBySymbol { Symbol, Language, Entity }
 }
diff --git a/glean/schema/source/search.code.angle b/glean/schema/source/search.code.angle
--- a/glean/schema/source/search.code.angle
+++ b/glean/schema/source/search.code.angle
@@ -38,7 +38,7 @@
 # public API
 #
 
-# global symbol search with language constraint
+# DEPRECATED: global symbol search with language constraint
 # migrate these to kind-based search so that the union of them covers each
 # language once
 predicate SearchByNameAndLanguage:
@@ -60,7 +60,7 @@
     ( Angle = Language; AngleSearchByName { Name, Entity } );
     code.EntityLanguage { Entity, Language }; # double check the entity lang
 
-# global symbol search normalized to lower case
+# DEPRECATED: global symbol search normalized to lower case
 predicate SearchByLowerCaseNameAndLanguage:
   {
     name: string,
@@ -106,6 +106,9 @@
     ) | (
       Rust = Language;
       RustSearchByNameAndKind { NameStr, Kinds, Entity }
+    ) | (
+      Swift = Language;
+      SwiftSearchByNameAndKind { NameStr, Kinds, Entity }
     )
 
 # Kind-optimized search, case insensitive.
@@ -131,6 +134,12 @@
     ) | (
       Hack = Language;
       HackSearchByLowerCaseNameAndKind { NameStr, Kinds, Entity }
+    ) | (
+      Rust = Language;
+      RustSearchByLowerCaseNameAndKind { NameStr, Kinds, Entity }
+    ) | (
+      Swift = Language;
+      SwiftSearchByLowerCaseNameAndKind { NameStr, Kinds, Entity }
     )
 
 # scoped search
@@ -291,12 +300,53 @@
     entity: code.Entity,
   }
   { NameStr, Kinds, Entity } where
-  scip.SearchByNameKind { NameStr, Ks, { rust = { defn = D } } };
+  scip.SearchByNameKindLanguage { NameStr, Ks, Rust, { rust = { defn = D } } };
   Kinds =
     if (Ks = { just = K }) then
       (codemarkup.lsif.LsifKindToKind { K, Kind }; { just = Kind })
     else nothing;
   { scip = { rust = { defn = D } } } = Entity
+
+predicate RustSearchByLowerCaseNameAndKind:
+ {
+    name: string,
+    kind: maybe codemarkup.types.SymbolKind,
+    entity: code.Entity,
+ }
+ { NameStr, Kinds, Entity } where
+  scip.SearchByLowerCaseNameKindLanguage { NameStr, Ks, Rust, { rust = { defn = D } } };
+  Kinds =
+    if (Ks = { just = K }) then
+      (codemarkup.lsif.LsifKindToKind { K, Kind }; { just = Kind })
+    else nothing;
+  { scip = { rust = { defn = D } } } = Entity
+
+predicate SwiftSearchByNameAndKind:
+  {
+    name: string,
+    kind: maybe codemarkup.types.SymbolKind,
+    entity: code.Entity,
+  }
+  { NameStr, Kinds, Entity } where
+  scip.SearchByNameKindLanguage { NameStr, Ks, Swift, { swift = { defn = D } } };
+  Kinds =
+    if (Ks = { just = K }) then
+      (codemarkup.lsif.LsifKindToKind { K, Kind }; { just = Kind })
+    else nothing;
+  { scip = { swift = { defn = D } } } = Entity
+
+predicate SwiftSearchByLowerCaseNameAndKind:
+  {
+    name: string,
+    kind: maybe codemarkup.types.SymbolKind,
+    entity: code.Entity,
+  } { NameStr, Kinds, Entity } where
+  scip.SearchByLowerCaseNameKindLanguage { NameStr, Ks, Swift, { swift = { defn = D } } };
+  Kinds =
+    if (Ks = { just = K }) then
+      (codemarkup.lsif.LsifKindToKind { K, Kind }; { just = Kind })
+    else nothing;
+  { scip = { swift = { defn = D } } } = Entity
 
 predicate HackSearchByNameAndKind:
   {
diff --git a/glean/schema/source/src.angle b/glean/schema/source/src.angle
--- a/glean/schema/source/src.angle
+++ b/glean/schema/source/src.angle
@@ -8,6 +8,9 @@
 # Source code digests produced by unspecified hash function
 predicate FileDigest : File -> string
 
+# Source code content (if the indexer stored it)
+predicate FileContent : File -> string
+
 # Common source code location type
 type Loc = {
   file : File,
diff --git a/glean/schema/source/swift.angle b/glean/schema/source/swift.angle
new file mode 100644
--- /dev/null
+++ b/glean/schema/source/swift.angle
@@ -0,0 +1,67 @@
+# Copyright (c) Meta, Inc. and affiliates.
+
+schema swift.1 {
+
+import lsif.types
+import scip
+import src
+
+# Unique Symbol Reference, a symbol ID used in the compiler for swift, ObjC and Clang
+predicate USR: string
+
+predicate SymbolUSR:
+  {
+    symbol: scip.Symbol,
+    usr: USR,
+  }
+
+predicate USRSymbol:
+  {
+    usr: USR,
+    symbol: scip.Symbol,
+  }
+
+predicate SymbolLanguage:
+  {
+    symbol: scip.Symbol,
+    language: lsif.types.LanguageId
+  }
+
+predicate ContainerMember:
+  {
+    container: scip.DisplayName,
+    member: scip.DisplayName,
+    kind: lsif.types.SymbolKind
+  }
+
+predicate MemberContainer:
+  {
+    member: scip.DisplayName,
+    container: scip.DisplayName
+  } stored { M, C } where
+  swift.ContainerMember { C, M, _ }
+
+predicate MemberSymbol:
+  {
+    member: ContainerMember,
+    symbol: scip.Symbol
+  }
+
+predicate SymbolContainer:
+  {
+    symbol: scip.Symbol,
+    container: scip.DisplayName
+  } stored { S, C } where
+  swift.MemberSymbol { member = swift.ContainerMember { container = C }, symbol = S }
+
+predicate FileXLangSymbolRef:
+  {
+    file: src.File,
+    range: lsif.types.RangeSpan,
+    target: scip.Symbol,
+  }
+  { File, Range, Symbol } where
+  scip.ReferenceLocation { File, Range, { symbol = Symbol } };
+  swift.SymbolLanguage { symbol = Symbol, language = ObjectiveC };
+
+}
diff --git a/glean/schema/source/test.angle b/glean/schema/source/test.angle
--- a/glean/schema/source/test.angle
+++ b/glean/schema/source/test.angle
@@ -281,4 +281,7 @@
 # To test predicates without facts
 predicate EmptyPred : string
 
+# For testing large keys
+predicate LargeKey : string
+
 }
diff --git a/glean/schema/thrift/gen-hs2/Glean/Schema/Buck/Types.hs b/glean/schema/thrift/gen-hs2/Glean/Schema/Buck/Types.hs
--- a/glean/schema/thrift/gen-hs2/Glean/Schema/Buck/Types.hs
+++ b/glean/schema/thrift/gen-hs2/Glean/Schema/Buck/Types.hs
@@ -102,10980 +102,11830 @@
         FileDefinition_id,
         FileDefinition(FileDefinition, fileDefinition_id,
                        fileDefinition_key),
-        File_id, File(File, file_id, file_key), IndexFailureX_id,
-        IndexFailureX(IndexFailureX, indexFailureX_id, indexFailureX_key),
-        DestinationUses_id,
-        DestinationUses(DestinationUses, destinationUses_id,
-                        destinationUses_key),
-        TargetDependencies_id,
-        TargetDependencies(TargetDependencies, targetDependencies_id,
-                           targetDependencies_key),
-        DefinitionLocation_id,
-        DefinitionLocation(DefinitionLocation, definitionLocation_id,
-                           definitionLocation_key),
-        Definition_id,
-        Definition(Definition, definition_id, definition_key), Consumer_id,
-        Consumer(Consumer, consumer_id, consumer_key), CallExpr_id,
-        CallExpr(CallExpr, callExpr_id, callExpr_key), CallArgument_id,
-        CallArgument(CallArgument, callArgument_id, callArgument_key),
-        AttributeName_id,
-        AttributeName(AttributeName, attributeName_id, attributeName_key),
-        AttributeValue_id,
-        AttributeValue(AttributeValue, attributeValue_id,
-                       attributeValue_key),
-        ArgumentValue_id,
-        ArgumentValue(ArgumentValue, argumentValue_id, argumentValue_key),
-        XRefDestination(XRefDestination_EMPTY, XRefDestination_locator,
-                        XRefDestination_file, XRefDestination_definition),
-        XRef(XRef, xRef_destination, xRef_ranges),
-        TranslationUnit_key(TranslationUnit_key, translationUnit_key_file,
-                            translationUnit_key_target, translationUnit_key_platform),
-        TargetUses_key(TargetUses_key, targetUses_key_locator,
-                       targetUses_key_file, targetUses_key_spans),
-        TargetSourcesBaseModule_key(TargetSourcesBaseModule_key,
-                                    targetSourcesBaseModule_key_locator,
-                                    targetSourcesBaseModule_key_srcs,
-                                    targetSourcesBaseModule_key_baseModule),
-        TargetSources_key(TargetSources_key, targetSources_key_target,
-                          targetSources_key_headers, targetSources_key_exportedHeaders,
-                          targetSources_key_srcs),
-        TargetOuts_key(TargetOuts_key, targetOuts_key_target,
-                       targetOuts_key_outputLabel, targetOuts_key_file),
-        TargetOut_key(TargetOut_key, targetOut_key_target,
-                      targetOut_key_file),
-        TargetMode_key(TargetMode_key, targetMode_key_target,
-                       targetMode_key_mode),
-        TargetLocation_key(TargetLocation_key, targetLocation_key_locator,
-                           targetLocation_key_file, targetLocation_key_span),
-        TargetIndexer_key(TargetIndexer_key, targetIndexer_key_name,
-                          targetIndexer_key_target),
-        TargetHash_key(TargetHash_key, targetHash_key_locator,
-                       targetHash_key_targetHash),
-        TargetCallByCallExpr_key(TargetCallByCallExpr_key,
-                                 targetCallByCallExpr_key_callExpr,
-                                 targetCallByCallExpr_key_target),
-        TargetCall_key(TargetCall_key, targetCall_key_locator,
-                       targetCall_key_arguments, targetCall_key_file, targetCall_key_span,
-                       targetCall_key_callExpr),
-        TargetByType_key(TargetByType_key, targetByType_key_type_,
-                         targetByType_key_target),
-        TargetAttribute_key(TargetAttribute_key,
-                            targetAttribute_key_target, targetAttribute_key_attribute,
-                            targetAttribute_key_value),
-        Target_key(Target_key, target_key_locator, target_key_type_,
-                   target_key_defaultPlatform, target_key_labels),
-        SourceFileLocation_key(SourceFileLocation_key,
-                               sourceFileLocation_key_file, sourceFileLocation_key_span),
-        SearchByLocalName_key(SearchByLocalName_key,
-                              searchByLocalName_key_name, searchByLocalName_key_decl),
-        RuleKey_key(RuleKey_key, ruleKey_key_locator, ruleKey_key_ruleKey),
-        Owner_key(Owner_key, owner_key_source, owner_key_owner),
-        OutsTarget_key(OutsTarget_key, outsTarget_key_file,
-                       outsTarget_key_target, outsTarget_key_outputLabel),
-        OutTarget_key(OutTarget_key, outTarget_key_file,
-                      outTarget_key_target),
-        LocatorWithLabel_key(LocatorWithLabel_key,
-                             locatorWithLabel_key_locator, locatorWithLabel_key_label),
-        LocatorReverseDeps_key(LocatorReverseDeps_key,
-                               locatorReverseDeps_key_locator, locatorReverseDeps_key_rdeps),
-        LocatorReverseDep_key(LocatorReverseDep_key,
-                              locatorReverseDep_key_locator, locatorReverseDep_key_rdep),
-        Locator_key(Locator_key, locator_key_subdir, locator_key_path,
-                    locator_key_name),
-        LocalNameLowerCase_key(LocalNameLowerCase_key,
-                               localNameLowerCase_key_lowercase, localNameLowerCase_key_name),
-        FileXRefs_key(FileXRefs_key, fileXRefs_key_file,
-                      fileXRefs_key_xrefs),
-        FileToTarget_key(FileToTarget_key, fileToTarget_key_source,
-                         fileToTarget_key_locator),
-        FileTarget_key(FileTarget_key, fileTarget_key_file,
-                       fileTarget_key_locator),
-        FileResolved_key(FileResolved_key, fileResolved_key_buckFile,
-                         fileResolved_key_srcFile),
-        FileEntity_key(FileEntity_key, fileEntity_key_file,
-                       fileEntity_key_entity),
-        FileDefinition_key(FileDefinition_key, fileDefinition_key_file,
-                           fileDefinition_key_definition),
-        File_key(File_key_EMPTY, File_key_source, File_key_generated,
-                 File_key_generatedLabel),
-        FailureReason(FailureReason_Skipped, FailureReason_Blocked,
-                      FailureReason_EmptyCdb, FailureReason_FailedCdb,
-                      FailureReason_QueryFailed, FailureReason_Unclassified,
-                      FailureReason__UNKNOWN),
-        IndexFailureX_source(IndexFailureX_source_EMPTY,
-                             IndexFailureX_source_locator, IndexFailureX_source_buildFile),
-        IndexFailureX_key(IndexFailureX_key, indexFailureX_key_source,
-                          indexFailureX_key_indexer, indexFailureX_key_reason,
-                          indexFailureX_key_details, indexFailureX_key_repro),
-        DestinationUses_key(DestinationUses_key,
-                            destinationUses_key_destination, destinationUses_key_file,
-                            destinationUses_key_spans),
-        Dependency(Dependency, dependency_target, dependency_explicit_,
-                   dependency_exported),
-        TargetDependencies_key(TargetDependencies_key,
-                               targetDependencies_key_target,
-                               targetDependencies_key_dependencies),
-        DefinitionLocation_key(DefinitionLocation_key,
-                               definitionLocation_key_definition, definitionLocation_key_file,
-                               definitionLocation_key_span),
-        Definition_key(Definition_key, definition_key_module,
-                       definition_key_name),
-        Consumer_key(Consumer_key, consumer_key_source,
-                     consumer_key_consumer),
-        CallName(CallName_EMPTY, CallName_prim, CallName_definition),
-        CallExpr_accessor_(CallExpr_accessor_, callExpr_accessor__name,
-                           callExpr_accessor__field),
-        CallExpr_key(CallExpr_key_EMPTY, CallExpr_key_name,
-                     CallExpr_key_accessor),
-        CallArgument_key(CallArgument_key, callArgument_key_label,
-                         callArgument_key_value, callArgument_key_file,
-                         callArgument_key_span),
-        AttributeMapping(AttributeMapping, attributeMapping_key,
-                         attributeMapping_value),
-        AttributeValue_key(AttributeValue_key_EMPTY,
-                           AttributeValue_key_str, AttributeValue_key_sequence,
-                           AttributeValue_key_mapping),
-        ArgumentMapping(ArgumentMapping, argumentMapping_key,
-                        argumentMapping_value),
-        ArgumentValue_key(ArgumentValue_key_EMPTY, ArgumentValue_key_lit,
-                          ArgumentValue_key_sequence, ArgumentValue_key_mapping))
-       where
-import qualified Control.DeepSeq as DeepSeq
-import qualified Control.Exception as Exception
-import qualified Control.Monad as Monad
-import qualified Control.Monad.ST.Trans as ST
-import qualified Control.Monad.Trans.Class as Trans
-import qualified Data.Aeson as Aeson
-import qualified Data.Aeson.Types as Aeson
-import qualified Data.Default as Default
-import qualified Data.Function as Function
-import qualified Data.HashMap.Strict as HashMap
-import qualified Data.Hashable as Hashable
-import qualified Data.Int as Int
-import qualified Data.List as List
-import qualified Data.Map.Strict as Map
-import qualified Data.Ord as Ord
-import qualified Data.Text as Text
-import qualified Data.Text.Encoding as Text
-import qualified Facebook.Thrift.Annotation.Thrift.Thrift.Types
-       as Facebook.Thrift.Annotation.Thrift.Thrift
-import qualified GHC.Magic as GHC
-import qualified Glean.Schema.Builtin.Types as Glean.Schema.Builtin
-import qualified Glean.Schema.Src.Types as Glean.Schema.Src
-import qualified Glean.Types as Glean
-import qualified Prelude as Prelude
-import qualified Rust.Types as Rust
-import qualified Thrift.Binary.Parser as Parser
-import qualified Thrift.CodegenTypesOnly as Thrift
-import Control.Applicative ((<|>), (*>), (<*))
-import Data.Aeson ((.:), (.:?), (.=), (.!=))
-import Data.Aeson ((.:), (.=))
-import Data.Monoid ((<>))
-import Prelude ((.), (++), (>), (==))
-import Prelude ((.), (<$>), (<*>), (>>=), (==), (++))
-import Prelude ((.), (<$>), (<*>), (>>=), (==), (/=), (<), (++))
-{-# LINE 5 "glean/schema/thrift/buck_include.hs" #-}
-import qualified Data.ByteString
-{-# LINE 6 "glean/schema/thrift/buck_include.hs" #-}
-import qualified Data.Default
-{-# LINE 7 "glean/schema/thrift/buck_include.hs" #-}
-import qualified Data.Text
-{-# LINE 9 "glean/schema/thrift/buck_include.hs" #-}
-import qualified Glean.Types as Glean
-{-# LINE 10 "glean/schema/thrift/buck_include.hs" #-}
-import qualified Glean.Typed as Glean
-{-# LINE 11 "glean/schema/thrift/buck_include.hs" #-}
-import qualified Glean.Query.Angle as Angle
-{-# LINE 12 "glean/schema/thrift/buck_include.hs" #-}
-import qualified Glean.Angle.Types as Angle
-{-# LINE 14 "glean/schema/thrift/buck_include.hs" #-}
-import qualified Glean.Schema.Builtin.Types
-{-# LINE 15 "glean/schema/thrift/buck_include.hs" #-}
-import qualified Glean.Schema.Src.Types
-{-# LINE 296 ".build/def/codegen/thrift-schema-hs/glean/schema/thrift/gen-hs2/Glean/Schema/Buck/Types.hs" #-}
-
-pREDICATE_VERSIONS :: Map.Map Text.Text Int.Int64
-pREDICATE_VERSIONS
-  = Map.fromList
-      [("CallArgument", 4), ("RuleKey", 4), ("Label", 4),
-       ("SearchByLocalName", 4), ("TargetIndexerName", 4),
-       ("TargetCallByCallExpr", 4), ("OutsTarget", 4),
-       ("LocalNameLowerCase", 4), ("LocalName", 4), ("FileTarget", 4),
-       ("Labels", 4), ("TargetLocation", 4), ("FileDefinition", 4),
-       ("LocatorReverseDep", 4), ("FileEntity", 4), ("Locator", 4),
-       ("DefinitionLocation", 4), ("CallExpr", 4), ("TargetIndexer", 4),
-       ("TargetUses", 4), ("Platform", 4), ("Consumer", 4),
-       ("TargetLinkWhole", 4), ("DestinationUses", 4),
-       ("SourceFileLocation", 4), ("TargetSourcesBaseModule", 4),
-       ("ArgumentValue", 4), ("IndexFailureX", 4), ("TargetOut", 4),
-       ("FileToTarget", 4), ("FileXRefs", 4), ("File", 4),
-       ("FileResolved", 4), ("Type", 4), ("OutputLabel", 4),
-       ("Definition", 4), ("TargetByType", 4), ("AttributeName", 4),
-       ("OutTarget", 4), ("AttributeValue", 4), ("TargetAttribute", 4),
-       ("TargetCall", 4), ("Target", 4), ("TargetMode", 4),
-       ("TargetHash", 4), ("Owner", 4), ("TargetDependencies", 4),
-       ("TargetOuts", 4), ("LocatorReverseDeps", 4), ("TargetSources", 4),
-       ("LocatorWithLabel", 4), ("IndexerName", 4),
-       ("TranslationUnit", 4)]
-
-type Type_id = Glean.Id
-
-data Type = Type{type_id :: {-# UNPACK #-} !Type_id,
-                 type_key :: Prelude.Maybe Text.Text}
-            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Type where
-  toJSON (Type __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct Type where
-  buildStruct _proxy (Type __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStringType _proxy)
-                                    2
-                                    1
-                                    (Thrift.genText _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (Type __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData Type where
-  rnf (Type __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default Type where
-  def = Type Default.def Prelude.Nothing
-
-instance Hashable.Hashable Type where
-  hashWithSalt __salt (Type _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type TranslationUnit_id = Glean.Id
-
-data TranslationUnit = TranslationUnit{translationUnit_id ::
-                                       {-# UNPACK #-} !TranslationUnit_id,
-                                       translationUnit_key :: Prelude.Maybe TranslationUnit_key}
-                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TranslationUnit where
-  toJSON (TranslationUnit __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct TranslationUnit where
-  buildStruct _proxy (TranslationUnit __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (TranslationUnit __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData TranslationUnit where
-  rnf (TranslationUnit __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default TranslationUnit where
-  def = TranslationUnit Default.def Prelude.Nothing
-
-instance Hashable.Hashable TranslationUnit where
-  hashWithSalt __salt (TranslationUnit _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type TargetUses_id = Glean.Id
-
-data TargetUses = TargetUses{targetUses_id ::
-                             {-# UNPACK #-} !TargetUses_id,
-                             targetUses_key :: Prelude.Maybe TargetUses_key}
-                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TargetUses where
-  toJSON (TargetUses __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct TargetUses where
-  buildStruct _proxy (TargetUses __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (TargetUses __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData TargetUses where
-  rnf (TargetUses __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default TargetUses where
-  def = TargetUses Default.def Prelude.Nothing
-
-instance Hashable.Hashable TargetUses where
-  hashWithSalt __salt (TargetUses _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type TargetSourcesBaseModule_id = Glean.Id
-
-data TargetSourcesBaseModule = TargetSourcesBaseModule{targetSourcesBaseModule_id
-                                                       ::
-                                                       {-# UNPACK #-} !TargetSourcesBaseModule_id,
-                                                       targetSourcesBaseModule_key ::
-                                                       Prelude.Maybe TargetSourcesBaseModule_key}
-                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TargetSourcesBaseModule where
-  toJSON (TargetSourcesBaseModule __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct TargetSourcesBaseModule where
-  buildStruct _proxy
-    (TargetSourcesBaseModule __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (TargetSourcesBaseModule __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData TargetSourcesBaseModule where
-  rnf (TargetSourcesBaseModule __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default TargetSourcesBaseModule where
-  def = TargetSourcesBaseModule Default.def Prelude.Nothing
-
-instance Hashable.Hashable TargetSourcesBaseModule where
-  hashWithSalt __salt (TargetSourcesBaseModule _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type TargetSources_id = Glean.Id
-
-data TargetSources = TargetSources{targetSources_id ::
-                                   {-# UNPACK #-} !TargetSources_id,
-                                   targetSources_key :: Prelude.Maybe TargetSources_key}
-                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TargetSources where
-  toJSON (TargetSources __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct TargetSources where
-  buildStruct _proxy (TargetSources __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (TargetSources __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData TargetSources where
-  rnf (TargetSources __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default TargetSources where
-  def = TargetSources Default.def Prelude.Nothing
-
-instance Hashable.Hashable TargetSources where
-  hashWithSalt __salt (TargetSources _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type TargetOuts_id = Glean.Id
-
-data TargetOuts = TargetOuts{targetOuts_id ::
-                             {-# UNPACK #-} !TargetOuts_id,
-                             targetOuts_key :: Prelude.Maybe TargetOuts_key}
-                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TargetOuts where
-  toJSON (TargetOuts __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct TargetOuts where
-  buildStruct _proxy (TargetOuts __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (TargetOuts __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData TargetOuts where
-  rnf (TargetOuts __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default TargetOuts where
-  def = TargetOuts Default.def Prelude.Nothing
-
-instance Hashable.Hashable TargetOuts where
-  hashWithSalt __salt (TargetOuts _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type TargetOut_id = Glean.Id
-
-data TargetOut = TargetOut{targetOut_id ::
-                           {-# UNPACK #-} !TargetOut_id,
-                           targetOut_key :: Prelude.Maybe TargetOut_key}
-                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TargetOut where
-  toJSON (TargetOut __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct TargetOut where
-  buildStruct _proxy (TargetOut __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (TargetOut __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData TargetOut where
-  rnf (TargetOut __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default TargetOut where
-  def = TargetOut Default.def Prelude.Nothing
-
-instance Hashable.Hashable TargetOut where
-  hashWithSalt __salt (TargetOut _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type TargetMode_id = Glean.Id
-
-data TargetMode = TargetMode{targetMode_id ::
-                             {-# UNPACK #-} !TargetMode_id,
-                             targetMode_key :: Prelude.Maybe TargetMode_key}
-                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TargetMode where
-  toJSON (TargetMode __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct TargetMode where
-  buildStruct _proxy (TargetMode __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (TargetMode __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData TargetMode where
-  rnf (TargetMode __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default TargetMode where
-  def = TargetMode Default.def Prelude.Nothing
-
-instance Hashable.Hashable TargetMode where
-  hashWithSalt __salt (TargetMode _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type TargetLocation_id = Glean.Id
-
-data TargetLocation = TargetLocation{targetLocation_id ::
-                                     {-# UNPACK #-} !TargetLocation_id,
-                                     targetLocation_key :: Prelude.Maybe TargetLocation_key}
-                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TargetLocation where
-  toJSON (TargetLocation __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct TargetLocation where
-  buildStruct _proxy (TargetLocation __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (TargetLocation __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData TargetLocation where
-  rnf (TargetLocation __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default TargetLocation where
-  def = TargetLocation Default.def Prelude.Nothing
-
-instance Hashable.Hashable TargetLocation where
-  hashWithSalt __salt (TargetLocation _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type TargetLinkWhole_id = Glean.Id
-
-data TargetLinkWhole = TargetLinkWhole{targetLinkWhole_id ::
-                                       {-# UNPACK #-} !TargetLinkWhole_id,
-                                       targetLinkWhole_key :: Prelude.Maybe Target}
-                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TargetLinkWhole where
-  toJSON (TargetLinkWhole __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct TargetLinkWhole where
-  buildStruct _proxy (TargetLinkWhole __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (TargetLinkWhole __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData TargetLinkWhole where
-  rnf (TargetLinkWhole __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default TargetLinkWhole where
-  def = TargetLinkWhole Default.def Prelude.Nothing
-
-instance Hashable.Hashable TargetLinkWhole where
-  hashWithSalt __salt (TargetLinkWhole _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type TargetIndexerName_id = Glean.Id
-
-data TargetIndexerName = TargetIndexerName{targetIndexerName_id ::
-                                           {-# UNPACK #-} !TargetIndexerName_id,
-                                           targetIndexerName_key :: Prelude.Maybe Text.Text}
-                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TargetIndexerName where
-  toJSON (TargetIndexerName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct TargetIndexerName where
-  buildStruct _proxy (TargetIndexerName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStringType _proxy)
-                                    2
-                                    1
-                                    (Thrift.genText _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (TargetIndexerName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData TargetIndexerName where
-  rnf (TargetIndexerName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default TargetIndexerName where
-  def = TargetIndexerName Default.def Prelude.Nothing
-
-instance Hashable.Hashable TargetIndexerName where
-  hashWithSalt __salt (TargetIndexerName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type TargetIndexer_id = Glean.Id
-
-data TargetIndexer = TargetIndexer{targetIndexer_id ::
-                                   {-# UNPACK #-} !TargetIndexer_id,
-                                   targetIndexer_key :: Prelude.Maybe TargetIndexer_key}
-                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TargetIndexer where
-  toJSON (TargetIndexer __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct TargetIndexer where
-  buildStruct _proxy (TargetIndexer __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (TargetIndexer __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData TargetIndexer where
-  rnf (TargetIndexer __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default TargetIndexer where
-  def = TargetIndexer Default.def Prelude.Nothing
-
-instance Hashable.Hashable TargetIndexer where
-  hashWithSalt __salt (TargetIndexer _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type TargetHash_id = Glean.Id
-
-data TargetHash = TargetHash{targetHash_id ::
-                             {-# UNPACK #-} !TargetHash_id,
-                             targetHash_key :: Prelude.Maybe TargetHash_key}
-                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TargetHash where
-  toJSON (TargetHash __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct TargetHash where
-  buildStruct _proxy (TargetHash __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (TargetHash __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData TargetHash where
-  rnf (TargetHash __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default TargetHash where
-  def = TargetHash Default.def Prelude.Nothing
-
-instance Hashable.Hashable TargetHash where
-  hashWithSalt __salt (TargetHash _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type TargetCallByCallExpr_id = Glean.Id
-
-data TargetCallByCallExpr = TargetCallByCallExpr{targetCallByCallExpr_id
-                                                 :: {-# UNPACK #-} !TargetCallByCallExpr_id,
-                                                 targetCallByCallExpr_key ::
-                                                 Prelude.Maybe TargetCallByCallExpr_key}
-                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TargetCallByCallExpr where
-  toJSON (TargetCallByCallExpr __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct TargetCallByCallExpr where
-  buildStruct _proxy (TargetCallByCallExpr __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (TargetCallByCallExpr __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData TargetCallByCallExpr where
-  rnf (TargetCallByCallExpr __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default TargetCallByCallExpr where
-  def = TargetCallByCallExpr Default.def Prelude.Nothing
-
-instance Hashable.Hashable TargetCallByCallExpr where
-  hashWithSalt __salt (TargetCallByCallExpr _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type TargetCall_id = Glean.Id
-
-data TargetCall = TargetCall{targetCall_id ::
-                             {-# UNPACK #-} !TargetCall_id,
-                             targetCall_key :: Prelude.Maybe TargetCall_key}
-                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TargetCall where
-  toJSON (TargetCall __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct TargetCall where
-  buildStruct _proxy (TargetCall __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (TargetCall __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData TargetCall where
-  rnf (TargetCall __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default TargetCall where
-  def = TargetCall Default.def Prelude.Nothing
-
-instance Hashable.Hashable TargetCall where
-  hashWithSalt __salt (TargetCall _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type TargetByType_id = Glean.Id
-
-data TargetByType = TargetByType{targetByType_id ::
-                                 {-# UNPACK #-} !TargetByType_id,
-                                 targetByType_key :: Prelude.Maybe TargetByType_key}
-                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TargetByType where
-  toJSON (TargetByType __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct TargetByType where
-  buildStruct _proxy (TargetByType __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (TargetByType __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData TargetByType where
-  rnf (TargetByType __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default TargetByType where
-  def = TargetByType Default.def Prelude.Nothing
-
-instance Hashable.Hashable TargetByType where
-  hashWithSalt __salt (TargetByType _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type TargetAttribute_id = Glean.Id
-
-data TargetAttribute = TargetAttribute{targetAttribute_id ::
-                                       {-# UNPACK #-} !TargetAttribute_id,
-                                       targetAttribute_key :: Prelude.Maybe TargetAttribute_key}
-                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TargetAttribute where
-  toJSON (TargetAttribute __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct TargetAttribute where
-  buildStruct _proxy (TargetAttribute __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (TargetAttribute __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData TargetAttribute where
-  rnf (TargetAttribute __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default TargetAttribute where
-  def = TargetAttribute Default.def Prelude.Nothing
-
-instance Hashable.Hashable TargetAttribute where
-  hashWithSalt __salt (TargetAttribute _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type Target_id = Glean.Id
-
-data Target = Target{target_id :: {-# UNPACK #-} !Target_id,
-                     target_key :: Prelude.Maybe Target_key}
-              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Target where
-  toJSON (Target __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct Target where
-  buildStruct _proxy (Target __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (Target __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData Target where
-  rnf (Target __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default Target where
-  def = Target Default.def Prelude.Nothing
-
-instance Hashable.Hashable Target where
-  hashWithSalt __salt (Target _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type SourceFileLocation_id = Glean.Id
-
-data SourceFileLocation = SourceFileLocation{sourceFileLocation_id
-                                             :: {-# UNPACK #-} !SourceFileLocation_id,
-                                             sourceFileLocation_key ::
-                                             Prelude.Maybe SourceFileLocation_key}
-                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SourceFileLocation where
-  toJSON (SourceFileLocation __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct SourceFileLocation where
-  buildStruct _proxy (SourceFileLocation __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (SourceFileLocation __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SourceFileLocation where
-  rnf (SourceFileLocation __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default SourceFileLocation where
-  def = SourceFileLocation Default.def Prelude.Nothing
-
-instance Hashable.Hashable SourceFileLocation where
-  hashWithSalt __salt (SourceFileLocation _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type SearchByLocalName_id = Glean.Id
-
-data SearchByLocalName = SearchByLocalName{searchByLocalName_id ::
-                                           {-# UNPACK #-} !SearchByLocalName_id,
-                                           searchByLocalName_key ::
-                                           Prelude.Maybe SearchByLocalName_key}
-                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchByLocalName where
-  toJSON (SearchByLocalName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchByLocalName where
-  buildStruct _proxy (SearchByLocalName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (SearchByLocalName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchByLocalName where
-  rnf (SearchByLocalName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default SearchByLocalName where
-  def = SearchByLocalName Default.def Prelude.Nothing
-
-instance Hashable.Hashable SearchByLocalName where
-  hashWithSalt __salt (SearchByLocalName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type RuleKey_id = Glean.Id
-
-data RuleKey = RuleKey{ruleKey_id :: {-# UNPACK #-} !RuleKey_id,
-                       ruleKey_key :: Prelude.Maybe RuleKey_key}
-               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON RuleKey where
-  toJSON (RuleKey __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct RuleKey where
-  buildStruct _proxy (RuleKey __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (RuleKey __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData RuleKey where
-  rnf (RuleKey __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default RuleKey where
-  def = RuleKey Default.def Prelude.Nothing
-
-instance Hashable.Hashable RuleKey where
-  hashWithSalt __salt (RuleKey _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type Platform_id = Glean.Id
-
-data Platform = Platform{platform_id ::
-                         {-# UNPACK #-} !Platform_id,
-                         platform_key :: Prelude.Maybe Text.Text}
-                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Platform where
-  toJSON (Platform __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct Platform where
-  buildStruct _proxy (Platform __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStringType _proxy)
-                                    2
-                                    1
-                                    (Thrift.genText _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (Platform __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData Platform where
-  rnf (Platform __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default Platform where
-  def = Platform Default.def Prelude.Nothing
-
-instance Hashable.Hashable Platform where
-  hashWithSalt __salt (Platform _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type Owner_id = Glean.Id
-
-data Owner = Owner{owner_id :: {-# UNPACK #-} !Owner_id,
-                   owner_key :: Prelude.Maybe Owner_key}
-             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Owner where
-  toJSON (Owner __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct Owner where
-  buildStruct _proxy (Owner __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (Owner __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData Owner where
-  rnf (Owner __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default Owner where
-  def = Owner Default.def Prelude.Nothing
-
-instance Hashable.Hashable Owner where
-  hashWithSalt __salt (Owner _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type OutsTarget_id = Glean.Id
-
-data OutsTarget = OutsTarget{outsTarget_id ::
-                             {-# UNPACK #-} !OutsTarget_id,
-                             outsTarget_key :: Prelude.Maybe OutsTarget_key}
-                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON OutsTarget where
-  toJSON (OutsTarget __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct OutsTarget where
-  buildStruct _proxy (OutsTarget __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (OutsTarget __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData OutsTarget where
-  rnf (OutsTarget __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default OutsTarget where
-  def = OutsTarget Default.def Prelude.Nothing
-
-instance Hashable.Hashable OutsTarget where
-  hashWithSalt __salt (OutsTarget _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type OutputLabel_id = Glean.Id
-
-data OutputLabel = OutputLabel{outputLabel_id ::
-                               {-# UNPACK #-} !OutputLabel_id,
-                               outputLabel_key :: Prelude.Maybe Text.Text}
-                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON OutputLabel where
-  toJSON (OutputLabel __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct OutputLabel where
-  buildStruct _proxy (OutputLabel __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStringType _proxy)
-                                    2
-                                    1
-                                    (Thrift.genText _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (OutputLabel __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData OutputLabel where
-  rnf (OutputLabel __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default OutputLabel where
-  def = OutputLabel Default.def Prelude.Nothing
-
-instance Hashable.Hashable OutputLabel where
-  hashWithSalt __salt (OutputLabel _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type OutTarget_id = Glean.Id
-
-data OutTarget = OutTarget{outTarget_id ::
-                           {-# UNPACK #-} !OutTarget_id,
-                           outTarget_key :: Prelude.Maybe OutTarget_key}
-                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON OutTarget where
-  toJSON (OutTarget __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct OutTarget where
-  buildStruct _proxy (OutTarget __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (OutTarget __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData OutTarget where
-  rnf (OutTarget __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default OutTarget where
-  def = OutTarget Default.def Prelude.Nothing
-
-instance Hashable.Hashable OutTarget where
-  hashWithSalt __salt (OutTarget _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type LocatorWithLabel_id = Glean.Id
-
-data LocatorWithLabel = LocatorWithLabel{locatorWithLabel_id ::
-                                         {-# UNPACK #-} !LocatorWithLabel_id,
-                                         locatorWithLabel_key :: Prelude.Maybe LocatorWithLabel_key}
-                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON LocatorWithLabel where
-  toJSON (LocatorWithLabel __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct LocatorWithLabel where
-  buildStruct _proxy (LocatorWithLabel __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (LocatorWithLabel __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData LocatorWithLabel where
-  rnf (LocatorWithLabel __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default LocatorWithLabel where
-  def = LocatorWithLabel Default.def Prelude.Nothing
-
-instance Hashable.Hashable LocatorWithLabel where
-  hashWithSalt __salt (LocatorWithLabel _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type LocatorReverseDeps_id = Glean.Id
-
-data LocatorReverseDeps = LocatorReverseDeps{locatorReverseDeps_id
-                                             :: {-# UNPACK #-} !LocatorReverseDeps_id,
-                                             locatorReverseDeps_key ::
-                                             Prelude.Maybe LocatorReverseDeps_key}
-                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON LocatorReverseDeps where
-  toJSON (LocatorReverseDeps __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct LocatorReverseDeps where
-  buildStruct _proxy (LocatorReverseDeps __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (LocatorReverseDeps __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData LocatorReverseDeps where
-  rnf (LocatorReverseDeps __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default LocatorReverseDeps where
-  def = LocatorReverseDeps Default.def Prelude.Nothing
-
-instance Hashable.Hashable LocatorReverseDeps where
-  hashWithSalt __salt (LocatorReverseDeps _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type LocatorReverseDep_id = Glean.Id
-
-data LocatorReverseDep = LocatorReverseDep{locatorReverseDep_id ::
-                                           {-# UNPACK #-} !LocatorReverseDep_id,
-                                           locatorReverseDep_key ::
-                                           Prelude.Maybe LocatorReverseDep_key}
-                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON LocatorReverseDep where
-  toJSON (LocatorReverseDep __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct LocatorReverseDep where
-  buildStruct _proxy (LocatorReverseDep __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (LocatorReverseDep __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData LocatorReverseDep where
-  rnf (LocatorReverseDep __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default LocatorReverseDep where
-  def = LocatorReverseDep Default.def Prelude.Nothing
-
-instance Hashable.Hashable LocatorReverseDep where
-  hashWithSalt __salt (LocatorReverseDep _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type Locator_id = Glean.Id
-
-data Locator = Locator{locator_id :: {-# UNPACK #-} !Locator_id,
-                       locator_key :: Prelude.Maybe Locator_key}
-               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Locator where
-  toJSON (Locator __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct Locator where
-  buildStruct _proxy (Locator __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (Locator __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData Locator where
-  rnf (Locator __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default Locator where
-  def = Locator Default.def Prelude.Nothing
-
-instance Hashable.Hashable Locator where
-  hashWithSalt __salt (Locator _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type LocalNameLowerCase_id = Glean.Id
-
-data LocalNameLowerCase = LocalNameLowerCase{localNameLowerCase_id
-                                             :: {-# UNPACK #-} !LocalNameLowerCase_id,
-                                             localNameLowerCase_key ::
-                                             Prelude.Maybe LocalNameLowerCase_key}
-                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON LocalNameLowerCase where
-  toJSON (LocalNameLowerCase __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct LocalNameLowerCase where
-  buildStruct _proxy (LocalNameLowerCase __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (LocalNameLowerCase __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData LocalNameLowerCase where
-  rnf (LocalNameLowerCase __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default LocalNameLowerCase where
-  def = LocalNameLowerCase Default.def Prelude.Nothing
-
-instance Hashable.Hashable LocalNameLowerCase where
-  hashWithSalt __salt (LocalNameLowerCase _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type LocalName_id = Glean.Id
-
-data LocalName = LocalName{localName_id ::
-                           {-# UNPACK #-} !LocalName_id,
-                           localName_key :: Prelude.Maybe Text.Text}
-                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON LocalName where
-  toJSON (LocalName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct LocalName where
-  buildStruct _proxy (LocalName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStringType _proxy)
-                                    2
-                                    1
-                                    (Thrift.genText _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (LocalName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData LocalName where
-  rnf (LocalName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default LocalName where
-  def = LocalName Default.def Prelude.Nothing
-
-instance Hashable.Hashable LocalName where
-  hashWithSalt __salt (LocalName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type Labels_id = Glean.Id
-
-data Labels = Labels{labels_id :: {-# UNPACK #-} !Labels_id,
-                     labels_key :: Prelude.Maybe [Label]}
-              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Labels where
-  toJSON (Labels __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct Labels where
-  buildStruct _proxy (Labels __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getListType _proxy)
-                                    2
-                                    1
-                                    (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                                       (Thrift.buildStruct _proxy)
-                                       _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (Labels __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData Labels where
-  rnf (Labels __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default Labels where
-  def = Labels Default.def Prelude.Nothing
-
-instance Hashable.Hashable Labels where
-  hashWithSalt __salt (Labels _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type Label_id = Glean.Id
-
-data Label = Label{label_id :: {-# UNPACK #-} !Label_id,
-                   label_key :: Prelude.Maybe Text.Text}
-             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Label where
-  toJSON (Label __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct Label where
-  buildStruct _proxy (Label __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStringType _proxy)
-                                    2
-                                    1
-                                    (Thrift.genText _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (Label __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData Label where
-  rnf (Label __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default Label where
-  def = Label Default.def Prelude.Nothing
-
-instance Hashable.Hashable Label where
-  hashWithSalt __salt (Label _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type IndexerName_id = Glean.Id
-
-data IndexerName = IndexerName{indexerName_id ::
-                               {-# UNPACK #-} !IndexerName_id,
-                               indexerName_key :: Prelude.Maybe Text.Text}
-                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON IndexerName where
-  toJSON (IndexerName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct IndexerName where
-  buildStruct _proxy (IndexerName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStringType _proxy)
-                                    2
-                                    1
-                                    (Thrift.genText _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (IndexerName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData IndexerName where
-  rnf (IndexerName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default IndexerName where
-  def = IndexerName Default.def Prelude.Nothing
-
-instance Hashable.Hashable IndexerName where
-  hashWithSalt __salt (IndexerName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type FileXRefs_id = Glean.Id
-
-data FileXRefs = FileXRefs{fileXRefs_id ::
-                           {-# UNPACK #-} !FileXRefs_id,
-                           fileXRefs_key :: Prelude.Maybe FileXRefs_key}
-                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON FileXRefs where
-  toJSON (FileXRefs __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct FileXRefs where
-  buildStruct _proxy (FileXRefs __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (FileXRefs __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData FileXRefs where
-  rnf (FileXRefs __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default FileXRefs where
-  def = FileXRefs Default.def Prelude.Nothing
-
-instance Hashable.Hashable FileXRefs where
-  hashWithSalt __salt (FileXRefs _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type FileToTarget_id = Glean.Id
-
-data FileToTarget = FileToTarget{fileToTarget_id ::
-                                 {-# UNPACK #-} !FileToTarget_id,
-                                 fileToTarget_key :: Prelude.Maybe FileToTarget_key}
-                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON FileToTarget where
-  toJSON (FileToTarget __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct FileToTarget where
-  buildStruct _proxy (FileToTarget __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (FileToTarget __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData FileToTarget where
-  rnf (FileToTarget __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default FileToTarget where
-  def = FileToTarget Default.def Prelude.Nothing
-
-instance Hashable.Hashable FileToTarget where
-  hashWithSalt __salt (FileToTarget _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type FileTarget_id = Glean.Id
-
-data FileTarget = FileTarget{fileTarget_id ::
-                             {-# UNPACK #-} !FileTarget_id,
-                             fileTarget_key :: Prelude.Maybe FileTarget_key}
-                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON FileTarget where
-  toJSON (FileTarget __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct FileTarget where
-  buildStruct _proxy (FileTarget __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (FileTarget __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData FileTarget where
-  rnf (FileTarget __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default FileTarget where
-  def = FileTarget Default.def Prelude.Nothing
-
-instance Hashable.Hashable FileTarget where
-  hashWithSalt __salt (FileTarget _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type FileResolved_id = Glean.Id
-
-data FileResolved = FileResolved{fileResolved_id ::
-                                 {-# UNPACK #-} !FileResolved_id,
-                                 fileResolved_key :: Prelude.Maybe FileResolved_key}
-                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON FileResolved where
-  toJSON (FileResolved __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct FileResolved where
-  buildStruct _proxy (FileResolved __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (FileResolved __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData FileResolved where
-  rnf (FileResolved __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default FileResolved where
-  def = FileResolved Default.def Prelude.Nothing
-
-instance Hashable.Hashable FileResolved where
-  hashWithSalt __salt (FileResolved _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type FileEntity_id = Glean.Id
-
-data FileEntity = FileEntity{fileEntity_id ::
-                             {-# UNPACK #-} !FileEntity_id,
-                             fileEntity_key :: Prelude.Maybe FileEntity_key}
-                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON FileEntity where
-  toJSON (FileEntity __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct FileEntity where
-  buildStruct _proxy (FileEntity __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (FileEntity __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData FileEntity where
-  rnf (FileEntity __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default FileEntity where
-  def = FileEntity Default.def Prelude.Nothing
-
-instance Hashable.Hashable FileEntity where
-  hashWithSalt __salt (FileEntity _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type FileDefinition_id = Glean.Id
-
-data FileDefinition = FileDefinition{fileDefinition_id ::
-                                     {-# UNPACK #-} !FileDefinition_id,
-                                     fileDefinition_key :: Prelude.Maybe FileDefinition_key}
-                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON FileDefinition where
-  toJSON (FileDefinition __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct FileDefinition where
-  buildStruct _proxy (FileDefinition __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (FileDefinition __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData FileDefinition where
-  rnf (FileDefinition __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default FileDefinition where
-  def = FileDefinition Default.def Prelude.Nothing
-
-instance Hashable.Hashable FileDefinition where
-  hashWithSalt __salt (FileDefinition _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type File_id = Glean.Id
-
-data File = File{file_id :: {-# UNPACK #-} !File_id,
-                 file_key :: Prelude.Maybe File_key}
-            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON File where
-  toJSON (File __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct File where
-  buildStruct _proxy (File __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (File __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData File where
-  rnf (File __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default File where
-  def = File Default.def Prelude.Nothing
-
-instance Hashable.Hashable File where
-  hashWithSalt __salt (File _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type IndexFailureX_id = Glean.Id
-
-data IndexFailureX = IndexFailureX{indexFailureX_id ::
-                                   {-# UNPACK #-} !IndexFailureX_id,
-                                   indexFailureX_key :: Prelude.Maybe IndexFailureX_key}
-                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON IndexFailureX where
-  toJSON (IndexFailureX __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct IndexFailureX where
-  buildStruct _proxy (IndexFailureX __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (IndexFailureX __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData IndexFailureX where
-  rnf (IndexFailureX __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default IndexFailureX where
-  def = IndexFailureX Default.def Prelude.Nothing
-
-instance Hashable.Hashable IndexFailureX where
-  hashWithSalt __salt (IndexFailureX _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type DestinationUses_id = Glean.Id
-
-data DestinationUses = DestinationUses{destinationUses_id ::
-                                       {-# UNPACK #-} !DestinationUses_id,
-                                       destinationUses_key :: Prelude.Maybe DestinationUses_key}
-                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON DestinationUses where
-  toJSON (DestinationUses __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct DestinationUses where
-  buildStruct _proxy (DestinationUses __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (DestinationUses __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData DestinationUses where
-  rnf (DestinationUses __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default DestinationUses where
-  def = DestinationUses Default.def Prelude.Nothing
-
-instance Hashable.Hashable DestinationUses where
-  hashWithSalt __salt (DestinationUses _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type TargetDependencies_id = Glean.Id
-
-data TargetDependencies = TargetDependencies{targetDependencies_id
-                                             :: {-# UNPACK #-} !TargetDependencies_id,
-                                             targetDependencies_key ::
-                                             Prelude.Maybe TargetDependencies_key}
-                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TargetDependencies where
-  toJSON (TargetDependencies __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct TargetDependencies where
-  buildStruct _proxy (TargetDependencies __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (TargetDependencies __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData TargetDependencies where
-  rnf (TargetDependencies __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default TargetDependencies where
-  def = TargetDependencies Default.def Prelude.Nothing
-
-instance Hashable.Hashable TargetDependencies where
-  hashWithSalt __salt (TargetDependencies _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type DefinitionLocation_id = Glean.Id
-
-data DefinitionLocation = DefinitionLocation{definitionLocation_id
-                                             :: {-# UNPACK #-} !DefinitionLocation_id,
-                                             definitionLocation_key ::
-                                             Prelude.Maybe DefinitionLocation_key}
-                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON DefinitionLocation where
-  toJSON (DefinitionLocation __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct DefinitionLocation where
-  buildStruct _proxy (DefinitionLocation __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (DefinitionLocation __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData DefinitionLocation where
-  rnf (DefinitionLocation __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default DefinitionLocation where
-  def = DefinitionLocation Default.def Prelude.Nothing
-
-instance Hashable.Hashable DefinitionLocation where
-  hashWithSalt __salt (DefinitionLocation _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type Definition_id = Glean.Id
-
-data Definition = Definition{definition_id ::
-                             {-# UNPACK #-} !Definition_id,
-                             definition_key :: Prelude.Maybe Definition_key}
-                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Definition where
-  toJSON (Definition __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct Definition where
-  buildStruct _proxy (Definition __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (Definition __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData Definition where
-  rnf (Definition __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default Definition where
-  def = Definition Default.def Prelude.Nothing
-
-instance Hashable.Hashable Definition where
-  hashWithSalt __salt (Definition _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type Consumer_id = Glean.Id
-
-data Consumer = Consumer{consumer_id ::
-                         {-# UNPACK #-} !Consumer_id,
-                         consumer_key :: Prelude.Maybe Consumer_key}
-                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Consumer where
-  toJSON (Consumer __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct Consumer where
-  buildStruct _proxy (Consumer __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (Consumer __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData Consumer where
-  rnf (Consumer __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default Consumer where
-  def = Consumer Default.def Prelude.Nothing
-
-instance Hashable.Hashable Consumer where
-  hashWithSalt __salt (Consumer _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type CallExpr_id = Glean.Id
-
-data CallExpr = CallExpr{callExpr_id ::
-                         {-# UNPACK #-} !CallExpr_id,
-                         callExpr_key :: Prelude.Maybe CallExpr_key}
-                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON CallExpr where
-  toJSON (CallExpr __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct CallExpr where
-  buildStruct _proxy (CallExpr __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (CallExpr __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData CallExpr where
-  rnf (CallExpr __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default CallExpr where
-  def = CallExpr Default.def Prelude.Nothing
-
-instance Hashable.Hashable CallExpr where
-  hashWithSalt __salt (CallExpr _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type CallArgument_id = Glean.Id
-
-data CallArgument = CallArgument{callArgument_id ::
-                                 {-# UNPACK #-} !CallArgument_id,
-                                 callArgument_key :: Prelude.Maybe CallArgument_key}
-                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON CallArgument where
-  toJSON (CallArgument __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct CallArgument where
-  buildStruct _proxy (CallArgument __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (CallArgument __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData CallArgument where
-  rnf (CallArgument __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default CallArgument where
-  def = CallArgument Default.def Prelude.Nothing
-
-instance Hashable.Hashable CallArgument where
-  hashWithSalt __salt (CallArgument _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type AttributeName_id = Glean.Id
-
-data AttributeName = AttributeName{attributeName_id ::
-                                   {-# UNPACK #-} !AttributeName_id,
-                                   attributeName_key :: Prelude.Maybe Text.Text}
-                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON AttributeName where
-  toJSON (AttributeName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct AttributeName where
-  buildStruct _proxy (AttributeName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStringType _proxy)
-                                    2
-                                    1
-                                    (Thrift.genText _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (AttributeName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData AttributeName where
-  rnf (AttributeName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default AttributeName where
-  def = AttributeName Default.def Prelude.Nothing
-
-instance Hashable.Hashable AttributeName where
-  hashWithSalt __salt (AttributeName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type AttributeValue_id = Glean.Id
-
-data AttributeValue = AttributeValue{attributeValue_id ::
-                                     {-# UNPACK #-} !AttributeValue_id,
-                                     attributeValue_key :: Prelude.Maybe AttributeValue_key}
-                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON AttributeValue where
-  toJSON (AttributeValue __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct AttributeValue where
-  buildStruct _proxy (AttributeValue __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (AttributeValue __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData AttributeValue where
-  rnf (AttributeValue __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default AttributeValue where
-  def = AttributeValue Default.def Prelude.Nothing
-
-instance Hashable.Hashable AttributeValue where
-  hashWithSalt __salt (AttributeValue _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type ArgumentValue_id = Glean.Id
-
-data ArgumentValue = ArgumentValue{argumentValue_id ::
-                                   {-# UNPACK #-} !ArgumentValue_id,
-                                   argumentValue_key :: Prelude.Maybe ArgumentValue_key}
-                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ArgumentValue where
-  toJSON (ArgumentValue __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct ArgumentValue where
-  buildStruct _proxy (ArgumentValue __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (ArgumentValue __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData ArgumentValue where
-  rnf (ArgumentValue __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default ArgumentValue where
-  def = ArgumentValue Default.def Prelude.Nothing
-
-instance Hashable.Hashable ArgumentValue where
-  hashWithSalt __salt (ArgumentValue _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-data XRefDestination = XRefDestination_locator Locator
-                     | XRefDestination_file Glean.Schema.Src.File
-                     | XRefDestination_definition Definition
-                     | XRefDestination_EMPTY
-                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON XRefDestination where
-  toJSON (XRefDestination_locator __locator)
-    = Aeson.object ["locator" .= __locator]
-  toJSON (XRefDestination_file __file)
-    = Aeson.object ["file" .= __file]
-  toJSON (XRefDestination_definition __definition)
-    = Aeson.object ["definition" .= __definition]
-  toJSON XRefDestination_EMPTY = Aeson.object []
-
-instance Thrift.ThriftStruct XRefDestination where
-  buildStruct _proxy (XRefDestination_locator __locator)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "locator" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __locator)]
-  buildStruct _proxy (XRefDestination_file __file)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 2 0
-           (Thrift.buildStruct _proxy __file)]
-  buildStruct _proxy (XRefDestination_definition __definition)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "definition" (Thrift.getStructType _proxy)
-           3
-           0
-           (Thrift.buildStruct _proxy __definition)]
-  buildStruct _proxy XRefDestination_EMPTY
-    = Thrift.genStruct _proxy []
-  parseStruct _proxy
-    = do _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap
-         case _fieldBegin of
-           Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                     1 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return
-                                                              (XRefDestination_locator _val)
-                                                     2 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return
-                                                              (XRefDestination_file _val)
-                                                     3 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return
-                                                              (XRefDestination_definition _val)
-                                                     _ -> do Thrift.parseSkip _proxy _type
-                                                               Prelude.Nothing
-                                                             Thrift.parseStop _proxy
-                                                             Prelude.return XRefDestination_EMPTY
-           Thrift.FieldEnd -> Prelude.return XRefDestination_EMPTY
-    where
-      _idMap
-        = HashMap.fromList [("locator", 1), ("file", 2), ("definition", 3)]
-
-instance DeepSeq.NFData XRefDestination where
-  rnf (XRefDestination_locator __locator) = DeepSeq.rnf __locator
-  rnf (XRefDestination_file __file) = DeepSeq.rnf __file
-  rnf (XRefDestination_definition __definition)
-    = DeepSeq.rnf __definition
-  rnf XRefDestination_EMPTY = ()
-
-instance Default.Default XRefDestination where
-  def = XRefDestination_EMPTY
-
-instance Hashable.Hashable XRefDestination where
-  hashWithSalt __salt (XRefDestination_locator _locator)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 1 _locator)
-  hashWithSalt __salt (XRefDestination_file _file)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 2 _file)
-  hashWithSalt __salt (XRefDestination_definition _definition)
-    = Hashable.hashWithSalt __salt
-        (Hashable.hashWithSalt 3 _definition)
-  hashWithSalt __salt XRefDestination_EMPTY
-    = Hashable.hashWithSalt __salt (0 :: Prelude.Int)
-
-data XRef = XRef{xRef_destination :: XRefDestination,
-                 xRef_ranges :: [Glean.Schema.Src.ByteSpan]}
-            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON XRef where
-  toJSON (XRef __field__destination __field__ranges)
-    = Aeson.object
-        ("destination" .= __field__destination :
-           "ranges" .= __field__ranges : Prelude.mempty)
-
-instance Thrift.ThriftStruct XRef where
-  buildStruct _proxy (XRef __field__destination __field__ranges)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "destination" (Thrift.getStructType _proxy)
-           1
-           0
-           (Thrift.buildStruct _proxy __field__destination)
-           :
-           Thrift.genField _proxy "ranges" (Thrift.getListType _proxy) 2 1
-             (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                (Thrift.buildStruct _proxy)
-                __field__ranges)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__destination <- ST.newSTRef Default.def
-            __field__ranges <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__destination
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__ranges
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__destination <- ST.readSTRef
-                                                                      __field__destination
-                                             !__val__ranges <- ST.readSTRef __field__ranges
-                                             Prelude.pure (XRef __val__destination __val__ranges)
-              _idMap = HashMap.fromList [("destination", 1), ("ranges", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData XRef where
-  rnf (XRef __field__destination __field__ranges)
-    = DeepSeq.rnf __field__destination `Prelude.seq`
-        DeepSeq.rnf __field__ranges `Prelude.seq` ()
-
-instance Default.Default XRef where
-  def = XRef Default.def Default.def
-
-instance Hashable.Hashable XRef where
-  hashWithSalt __salt (XRef _destination _ranges)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _destination)
-        _ranges
-
-data TranslationUnit_key = TranslationUnit_key{translationUnit_key_file
-                                               :: Glean.Schema.Src.File,
-                                               translationUnit_key_target :: Locator,
-                                               translationUnit_key_platform ::
-                                               Prelude.Maybe Platform}
-                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TranslationUnit_key where
-  toJSON
-    (TranslationUnit_key __field__file __field__target
-       __field__platform)
-    = Aeson.object
-        ("file" .= __field__file :
-           "target" .= __field__target :
-             Prelude.maybe Prelude.id ((:) . ("platform" .=)) __field__platform
-               Prelude.mempty)
-
-instance Thrift.ThriftStruct TranslationUnit_key where
-  buildStruct _proxy
-    (TranslationUnit_key __field__file __field__target
-       __field__platform)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__file)
-           :
-           Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__target)
-             :
-             case __field__platform of
-               Prelude.Just _val -> Thrift.genField _proxy "platform"
-                                      (Thrift.getStructType _proxy)
-                                      3
-                                      2
-                                      (Thrift.buildStruct _proxy _val)
-                                      : []
-               Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__file <- ST.newSTRef Default.def
-            __field__target <- ST.newSTRef Default.def
-            __field__platform <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__file
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__target
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__platform
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__file <- ST.readSTRef __field__file
-                                             !__val__target <- ST.readSTRef __field__target
-                                             !__val__platform <- ST.readSTRef __field__platform
-                                             Prelude.pure
-                                               (TranslationUnit_key __val__file __val__target
-                                                  __val__platform)
-              _idMap
-                = HashMap.fromList [("file", 1), ("target", 2), ("platform", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData TranslationUnit_key where
-  rnf
-    (TranslationUnit_key __field__file __field__target
-       __field__platform)
-    = DeepSeq.rnf __field__file `Prelude.seq`
-        DeepSeq.rnf __field__target `Prelude.seq`
-          DeepSeq.rnf __field__platform `Prelude.seq` ()
-
-instance Default.Default TranslationUnit_key where
-  def = TranslationUnit_key Default.def Default.def Prelude.Nothing
-
-instance Hashable.Hashable TranslationUnit_key where
-  hashWithSalt __salt (TranslationUnit_key _file _target _platform)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _file)
-           _target)
-        _platform
-
-data TargetUses_key = TargetUses_key{targetUses_key_locator ::
-                                     Locator,
-                                     targetUses_key_file :: Glean.Schema.Src.File,
-                                     targetUses_key_spans :: [Glean.Schema.Src.ByteSpan]}
-                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TargetUses_key where
-  toJSON
-    (TargetUses_key __field__locator __field__file __field__spans)
-    = Aeson.object
-        ("locator" .= __field__locator :
-           "file" .= __field__file :
-             "spans" .= __field__spans : Prelude.mempty)
-
-instance Thrift.ThriftStruct TargetUses_key where
-  buildStruct _proxy
-    (TargetUses_key __field__locator __field__file __field__spans)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "locator" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__locator)
-           :
-           Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__file)
-             :
-             Thrift.genField _proxy "spans" (Thrift.getListType _proxy) 3 2
-               (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                  (Thrift.buildStruct _proxy)
-                  __field__spans)
-               : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__locator <- ST.newSTRef Default.def
-            __field__file <- ST.newSTRef Default.def
-            __field__spans <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__locator
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__file
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef __field__spans
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__locator <- ST.readSTRef
-                                                                  __field__locator
-                                             !__val__file <- ST.readSTRef __field__file
-                                             !__val__spans <- ST.readSTRef __field__spans
-                                             Prelude.pure
-                                               (TargetUses_key __val__locator __val__file
-                                                  __val__spans)
-              _idMap
-                = HashMap.fromList [("locator", 1), ("file", 2), ("spans", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData TargetUses_key where
-  rnf (TargetUses_key __field__locator __field__file __field__spans)
-    = DeepSeq.rnf __field__locator `Prelude.seq`
-        DeepSeq.rnf __field__file `Prelude.seq`
-          DeepSeq.rnf __field__spans `Prelude.seq` ()
-
-instance Default.Default TargetUses_key where
-  def = TargetUses_key Default.def Default.def Default.def
-
-instance Hashable.Hashable TargetUses_key where
-  hashWithSalt __salt (TargetUses_key _locator _file _spans)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _locator)
-           _file)
-        _spans
-
-data TargetSourcesBaseModule_key = TargetSourcesBaseModule_key{targetSourcesBaseModule_key_locator
-                                                               :: Target,
-                                                               targetSourcesBaseModule_key_srcs ::
-                                                               [File],
-                                                               targetSourcesBaseModule_key_baseModule
-                                                               :: Prelude.Maybe AttributeValue}
-                                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TargetSourcesBaseModule_key where
-  toJSON
-    (TargetSourcesBaseModule_key __field__locator __field__srcs
-       __field__baseModule)
-    = Aeson.object
-        ("locator" .= __field__locator :
-           "srcs" .= __field__srcs :
-             Prelude.maybe Prelude.id ((:) . ("baseModule" .=))
-               __field__baseModule
-               Prelude.mempty)
-
-instance Thrift.ThriftStruct TargetSourcesBaseModule_key where
-  buildStruct _proxy
-    (TargetSourcesBaseModule_key __field__locator __field__srcs
-       __field__baseModule)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "locator" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__locator)
-           :
-           Thrift.genField _proxy "srcs" (Thrift.getListType _proxy) 2 1
-             (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                (Thrift.buildStruct _proxy)
-                __field__srcs)
-             :
-             case __field__baseModule of
-               Prelude.Just _val -> Thrift.genField _proxy "baseModule"
-                                      (Thrift.getStructType _proxy)
-                                      3
-                                      2
-                                      (Thrift.buildStruct _proxy _val)
-                                      : []
-               Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__locator <- ST.newSTRef Default.def
-            __field__srcs <- ST.newSTRef Default.def
-            __field__baseModule <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__locator
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef __field__srcs
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__baseModule
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__locator <- ST.readSTRef
-                                                                  __field__locator
-                                             !__val__srcs <- ST.readSTRef __field__srcs
-                                             !__val__baseModule <- ST.readSTRef __field__baseModule
-                                             Prelude.pure
-                                               (TargetSourcesBaseModule_key __val__locator
-                                                  __val__srcs
-                                                  __val__baseModule)
-              _idMap
-                = HashMap.fromList [("locator", 1), ("srcs", 2), ("baseModule", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData TargetSourcesBaseModule_key where
-  rnf
-    (TargetSourcesBaseModule_key __field__locator __field__srcs
-       __field__baseModule)
-    = DeepSeq.rnf __field__locator `Prelude.seq`
-        DeepSeq.rnf __field__srcs `Prelude.seq`
-          DeepSeq.rnf __field__baseModule `Prelude.seq` ()
-
-instance Default.Default TargetSourcesBaseModule_key where
-  def
-    = TargetSourcesBaseModule_key Default.def Default.def
-        Prelude.Nothing
-
-instance Hashable.Hashable TargetSourcesBaseModule_key where
-  hashWithSalt __salt
-    (TargetSourcesBaseModule_key _locator _srcs _baseModule)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _locator)
-           _srcs)
-        _baseModule
-
-data TargetSources_key = TargetSources_key{targetSources_key_target
-                                           :: Target,
-                                           targetSources_key_headers :: [File],
-                                           targetSources_key_exportedHeaders :: [File],
-                                           targetSources_key_srcs :: [File]}
-                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TargetSources_key where
-  toJSON
-    (TargetSources_key __field__target __field__headers
-       __field__exportedHeaders __field__srcs)
-    = Aeson.object
-        ("target" .= __field__target :
-           "headers" .= __field__headers :
-             "exportedHeaders" .= __field__exportedHeaders :
-               "srcs" .= __field__srcs : Prelude.mempty)
-
-instance Thrift.ThriftStruct TargetSources_key where
-  buildStruct _proxy
-    (TargetSources_key __field__target __field__headers
-       __field__exportedHeaders __field__srcs)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__target)
-           :
-           Thrift.genField _proxy "headers" (Thrift.getListType _proxy) 2 1
-             (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                (Thrift.buildStruct _proxy)
-                __field__headers)
-             :
-             Thrift.genField _proxy "exportedHeaders"
-               (Thrift.getListType _proxy)
-               3
-               2
-               (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                  (Thrift.buildStruct _proxy)
-                  __field__exportedHeaders)
-               :
-               Thrift.genField _proxy "srcs" (Thrift.getListType _proxy) 4 3
-                 (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                    (Thrift.buildStruct _proxy)
-                    __field__srcs)
-                 : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__target <- ST.newSTRef Default.def
-            __field__headers <- ST.newSTRef Default.def
-            __field__exportedHeaders <- ST.newSTRef Default.def
-            __field__srcs <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__target
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__headers
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__exportedHeaders
-                                                                          _val
-                                                                 4 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef __field__srcs
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__target <- ST.readSTRef
-                                                                 __field__target
-                                             !__val__headers <- ST.readSTRef __field__headers
-                                             !__val__exportedHeaders <- ST.readSTRef
-                                                                          __field__exportedHeaders
-                                             !__val__srcs <- ST.readSTRef __field__srcs
-                                             Prelude.pure
-                                               (TargetSources_key __val__target __val__headers
-                                                  __val__exportedHeaders
-                                                  __val__srcs)
-              _idMap
-                = HashMap.fromList
-                    [("target", 1), ("headers", 2), ("exportedHeaders", 3),
-                     ("srcs", 4)]
-            _parse 0)
-
-instance DeepSeq.NFData TargetSources_key where
-  rnf
-    (TargetSources_key __field__target __field__headers
-       __field__exportedHeaders __field__srcs)
-    = DeepSeq.rnf __field__target `Prelude.seq`
-        DeepSeq.rnf __field__headers `Prelude.seq`
-          DeepSeq.rnf __field__exportedHeaders `Prelude.seq`
-            DeepSeq.rnf __field__srcs `Prelude.seq` ()
-
-instance Default.Default TargetSources_key where
-  def
-    = TargetSources_key Default.def Default.def Default.def Default.def
-
-instance Hashable.Hashable TargetSources_key where
-  hashWithSalt __salt
-    (TargetSources_key _target _headers _exportedHeaders _srcs)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _target)
-              _headers)
-           _exportedHeaders)
-        _srcs
-
-data TargetOuts_key = TargetOuts_key{targetOuts_key_target ::
-                                     Target,
-                                     targetOuts_key_outputLabel :: Prelude.Maybe OutputLabel,
-                                     targetOuts_key_file :: Glean.Schema.Src.File}
-                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TargetOuts_key where
-  toJSON
-    (TargetOuts_key __field__target __field__outputLabel __field__file)
-    = Aeson.object
-        ("target" .= __field__target :
-           Prelude.maybe Prelude.id ((:) . ("outputLabel" .=))
-             __field__outputLabel
-             ("file" .= __field__file : Prelude.mempty))
-
-instance Thrift.ThriftStruct TargetOuts_key where
-  buildStruct _proxy
-    (TargetOuts_key __field__target __field__outputLabel __field__file)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__target)
-           :
-           let (__cereal__outputLabel, __id__outputLabel)
-                 = case __field__outputLabel of
-                     Prelude.Just _val -> ((:)
-                                             (Thrift.genField _proxy "outputLabel"
-                                                (Thrift.getStructType _proxy)
-                                                2
-                                                1
-                                                (Thrift.buildStruct _proxy _val)),
-                                           2)
-                     Prelude.Nothing -> (Prelude.id, 1)
-             in
-             __cereal__outputLabel
-               (Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 3
-                  __id__outputLabel
-                  (Thrift.buildStruct _proxy __field__file)
-                  : []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__target <- ST.newSTRef Default.def
-            __field__outputLabel <- ST.newSTRef Prelude.Nothing
-            __field__file <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__target
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__outputLabel
-                                                                          (Prelude.Just _val)
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__file
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__target <- ST.readSTRef
-                                                                 __field__target
-                                             !__val__outputLabel <- ST.readSTRef
-                                                                      __field__outputLabel
-                                             !__val__file <- ST.readSTRef __field__file
-                                             Prelude.pure
-                                               (TargetOuts_key __val__target __val__outputLabel
-                                                  __val__file)
-              _idMap
-                = HashMap.fromList [("target", 1), ("outputLabel", 2), ("file", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData TargetOuts_key where
-  rnf
-    (TargetOuts_key __field__target __field__outputLabel __field__file)
-    = DeepSeq.rnf __field__target `Prelude.seq`
-        DeepSeq.rnf __field__outputLabel `Prelude.seq`
-          DeepSeq.rnf __field__file `Prelude.seq` ()
-
-instance Default.Default TargetOuts_key where
-  def = TargetOuts_key Default.def Prelude.Nothing Default.def
-
-instance Hashable.Hashable TargetOuts_key where
-  hashWithSalt __salt (TargetOuts_key _target _outputLabel _file)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _target)
-           _outputLabel)
-        _file
-
-data TargetOut_key = TargetOut_key{targetOut_key_target :: Target,
-                                   targetOut_key_file :: Glean.Schema.Src.File}
-                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TargetOut_key where
-  toJSON (TargetOut_key __field__target __field__file)
-    = Aeson.object
-        ("target" .= __field__target :
-           "file" .= __field__file : Prelude.mempty)
-
-instance Thrift.ThriftStruct TargetOut_key where
-  buildStruct _proxy (TargetOut_key __field__target __field__file)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__target)
-           :
-           Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__file)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__target <- ST.newSTRef Default.def
-            __field__file <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__target
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__file
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__target <- ST.readSTRef
-                                                                 __field__target
-                                             !__val__file <- ST.readSTRef __field__file
-                                             Prelude.pure (TargetOut_key __val__target __val__file)
-              _idMap = HashMap.fromList [("target", 1), ("file", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData TargetOut_key where
-  rnf (TargetOut_key __field__target __field__file)
-    = DeepSeq.rnf __field__target `Prelude.seq`
-        DeepSeq.rnf __field__file `Prelude.seq` ()
-
-instance Default.Default TargetOut_key where
-  def = TargetOut_key Default.def Default.def
-
-instance Hashable.Hashable TargetOut_key where
-  hashWithSalt __salt (TargetOut_key _target _file)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _target)
-        _file
-
-data TargetMode_key = TargetMode_key{targetMode_key_target ::
-                                     Target,
-                                     targetMode_key_mode :: Text.Text}
-                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TargetMode_key where
-  toJSON (TargetMode_key __field__target __field__mode)
-    = Aeson.object
-        ("target" .= __field__target :
-           "mode" .= __field__mode : Prelude.mempty)
-
-instance Thrift.ThriftStruct TargetMode_key where
-  buildStruct _proxy (TargetMode_key __field__target __field__mode)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__target)
-           :
-           Thrift.genField _proxy "mode" (Thrift.getStringType _proxy) 2 1
-             (Thrift.genText _proxy __field__mode)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__target <- ST.newSTRef Default.def
-            __field__mode <- ST.newSTRef ""
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__target
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__mode
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__target <- ST.readSTRef
-                                                                 __field__target
-                                             !__val__mode <- ST.readSTRef __field__mode
-                                             Prelude.pure (TargetMode_key __val__target __val__mode)
-              _idMap = HashMap.fromList [("target", 1), ("mode", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData TargetMode_key where
-  rnf (TargetMode_key __field__target __field__mode)
-    = DeepSeq.rnf __field__target `Prelude.seq`
-        DeepSeq.rnf __field__mode `Prelude.seq` ()
-
-instance Default.Default TargetMode_key where
-  def = TargetMode_key Default.def ""
-
-instance Hashable.Hashable TargetMode_key where
-  hashWithSalt __salt (TargetMode_key _target _mode)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _target)
-        _mode
-
-data TargetLocation_key = TargetLocation_key{targetLocation_key_locator
-                                             :: Locator,
-                                             targetLocation_key_file :: Glean.Schema.Src.File,
-                                             targetLocation_key_span :: Glean.Schema.Src.ByteSpan}
-                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TargetLocation_key where
-  toJSON
-    (TargetLocation_key __field__locator __field__file __field__span)
-    = Aeson.object
-        ("locator" .= __field__locator :
-           "file" .= __field__file : "span" .= __field__span : Prelude.mempty)
-
-instance Thrift.ThriftStruct TargetLocation_key where
-  buildStruct _proxy
-    (TargetLocation_key __field__locator __field__file __field__span)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "locator" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__locator)
-           :
-           Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__file)
-             :
-             Thrift.genField _proxy "span" (Thrift.getStructType _proxy) 3 2
-               (Thrift.buildStruct _proxy __field__span)
-               : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__locator <- ST.newSTRef Default.def
-            __field__file <- ST.newSTRef Default.def
-            __field__span <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__locator
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__file
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__span
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__locator <- ST.readSTRef
-                                                                  __field__locator
-                                             !__val__file <- ST.readSTRef __field__file
-                                             !__val__span <- ST.readSTRef __field__span
-                                             Prelude.pure
-                                               (TargetLocation_key __val__locator __val__file
-                                                  __val__span)
-              _idMap
-                = HashMap.fromList [("locator", 1), ("file", 2), ("span", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData TargetLocation_key where
-  rnf
-    (TargetLocation_key __field__locator __field__file __field__span)
-    = DeepSeq.rnf __field__locator `Prelude.seq`
-        DeepSeq.rnf __field__file `Prelude.seq`
-          DeepSeq.rnf __field__span `Prelude.seq` ()
-
-instance Default.Default TargetLocation_key where
-  def = TargetLocation_key Default.def Default.def Default.def
-
-instance Hashable.Hashable TargetLocation_key where
-  hashWithSalt __salt (TargetLocation_key _locator _file _span)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _locator)
-           _file)
-        _span
-
-data TargetIndexer_key = TargetIndexer_key{targetIndexer_key_name
-                                           :: TargetIndexerName,
-                                           targetIndexer_key_target :: Target}
-                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TargetIndexer_key where
-  toJSON (TargetIndexer_key __field__name __field__target)
-    = Aeson.object
-        ("name" .= __field__name :
-           "target" .= __field__target : Prelude.mempty)
-
-instance Thrift.ThriftStruct TargetIndexer_key where
-  buildStruct _proxy
-    (TargetIndexer_key __field__name __field__target)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__name)
-           :
-           Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__target)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef Default.def
-            __field__target <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__target
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__target <- ST.readSTRef __field__target
-                                             Prelude.pure
-                                               (TargetIndexer_key __val__name __val__target)
-              _idMap = HashMap.fromList [("name", 1), ("target", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData TargetIndexer_key where
-  rnf (TargetIndexer_key __field__name __field__target)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__target `Prelude.seq` ()
-
-instance Default.Default TargetIndexer_key where
-  def = TargetIndexer_key Default.def Default.def
-
-instance Hashable.Hashable TargetIndexer_key where
-  hashWithSalt __salt (TargetIndexer_key _name _target)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-        _target
-
-data TargetHash_key = TargetHash_key{targetHash_key_locator ::
-                                     Locator,
-                                     targetHash_key_targetHash :: Text.Text}
-                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TargetHash_key where
-  toJSON (TargetHash_key __field__locator __field__targetHash)
-    = Aeson.object
-        ("locator" .= __field__locator :
-           "targetHash" .= __field__targetHash : Prelude.mempty)
-
-instance Thrift.ThriftStruct TargetHash_key where
-  buildStruct _proxy
-    (TargetHash_key __field__locator __field__targetHash)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "locator" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__locator)
-           :
-           Thrift.genField _proxy "targetHash" (Thrift.getStringType _proxy) 2
-             1
-             (Thrift.genText _proxy __field__targetHash)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__locator <- ST.newSTRef Default.def
-            __field__targetHash <- ST.newSTRef ""
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__locator
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__targetHash
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__locator <- ST.readSTRef
-                                                                  __field__locator
-                                             !__val__targetHash <- ST.readSTRef __field__targetHash
-                                             Prelude.pure
-                                               (TargetHash_key __val__locator __val__targetHash)
-              _idMap = HashMap.fromList [("locator", 1), ("targetHash", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData TargetHash_key where
-  rnf (TargetHash_key __field__locator __field__targetHash)
-    = DeepSeq.rnf __field__locator `Prelude.seq`
-        DeepSeq.rnf __field__targetHash `Prelude.seq` ()
-
-instance Default.Default TargetHash_key where
-  def = TargetHash_key Default.def ""
-
-instance Hashable.Hashable TargetHash_key where
-  hashWithSalt __salt (TargetHash_key _locator _targetHash)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _locator)
-        _targetHash
-
-data TargetCallByCallExpr_key = TargetCallByCallExpr_key{targetCallByCallExpr_key_callExpr
-                                                         :: CallExpr,
-                                                         targetCallByCallExpr_key_target ::
-                                                         TargetCall}
-                                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TargetCallByCallExpr_key where
-  toJSON (TargetCallByCallExpr_key __field__callExpr __field__target)
-    = Aeson.object
-        ("callExpr" .= __field__callExpr :
-           "target" .= __field__target : Prelude.mempty)
-
-instance Thrift.ThriftStruct TargetCallByCallExpr_key where
-  buildStruct _proxy
-    (TargetCallByCallExpr_key __field__callExpr __field__target)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "callExpr" (Thrift.getStructType _proxy) 1
-           0
-           (Thrift.buildStruct _proxy __field__callExpr)
-           :
-           Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__target)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__callExpr <- ST.newSTRef Default.def
-            __field__target <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__callExpr
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__target
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__callExpr <- ST.readSTRef
-                                                                   __field__callExpr
-                                             !__val__target <- ST.readSTRef __field__target
-                                             Prelude.pure
-                                               (TargetCallByCallExpr_key __val__callExpr
-                                                  __val__target)
-              _idMap = HashMap.fromList [("callExpr", 1), ("target", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData TargetCallByCallExpr_key where
-  rnf (TargetCallByCallExpr_key __field__callExpr __field__target)
-    = DeepSeq.rnf __field__callExpr `Prelude.seq`
-        DeepSeq.rnf __field__target `Prelude.seq` ()
-
-instance Default.Default TargetCallByCallExpr_key where
-  def = TargetCallByCallExpr_key Default.def Default.def
-
-instance Hashable.Hashable TargetCallByCallExpr_key where
-  hashWithSalt __salt (TargetCallByCallExpr_key _callExpr _target)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _callExpr)
-        _target
-
-data TargetCall_key = TargetCall_key{targetCall_key_locator ::
-                                     Locator,
-                                     targetCall_key_arguments :: [CallArgument],
-                                     targetCall_key_file :: Glean.Schema.Src.File,
-                                     targetCall_key_span :: Glean.Schema.Src.ByteSpan,
-                                     targetCall_key_callExpr :: Prelude.Maybe CallExpr}
-                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TargetCall_key where
-  toJSON
-    (TargetCall_key __field__locator __field__arguments __field__file
-       __field__span __field__callExpr)
-    = Aeson.object
-        ("locator" .= __field__locator :
-           "arguments" .= __field__arguments :
-             "file" .= __field__file :
-               "span" .= __field__span :
-                 Prelude.maybe Prelude.id ((:) . ("callExpr" .=)) __field__callExpr
-                   Prelude.mempty)
-
-instance Thrift.ThriftStruct TargetCall_key where
-  buildStruct _proxy
-    (TargetCall_key __field__locator __field__arguments __field__file
-       __field__span __field__callExpr)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "locator" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__locator)
-           :
-           Thrift.genField _proxy "arguments" (Thrift.getListType _proxy) 2 1
-             (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                (Thrift.buildStruct _proxy)
-                __field__arguments)
-             :
-             Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 3 2
-               (Thrift.buildStruct _proxy __field__file)
-               :
-               Thrift.genField _proxy "span" (Thrift.getStructType _proxy) 4 3
-                 (Thrift.buildStruct _proxy __field__span)
-                 :
-                 case __field__callExpr of
-                   Prelude.Just _val -> Thrift.genField _proxy "callExpr"
-                                          (Thrift.getStructType _proxy)
-                                          5
-                                          4
-                                          (Thrift.buildStruct _proxy _val)
-                                          : []
-                   Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__locator <- ST.newSTRef Default.def
-            __field__arguments <- ST.newSTRef Default.def
-            __field__file <- ST.newSTRef Default.def
-            __field__span <- ST.newSTRef Default.def
-            __field__callExpr <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__locator
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__arguments
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__file
-                                                                          _val
-                                                                 4 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__span
-                                                                          _val
-                                                                 5 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__callExpr
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__locator <- ST.readSTRef
-                                                                  __field__locator
-                                             !__val__arguments <- ST.readSTRef __field__arguments
-                                             !__val__file <- ST.readSTRef __field__file
-                                             !__val__span <- ST.readSTRef __field__span
-                                             !__val__callExpr <- ST.readSTRef __field__callExpr
-                                             Prelude.pure
-                                               (TargetCall_key __val__locator __val__arguments
-                                                  __val__file
-                                                  __val__span
-                                                  __val__callExpr)
-              _idMap
-                = HashMap.fromList
-                    [("locator", 1), ("arguments", 2), ("file", 3), ("span", 4),
-                     ("callExpr", 5)]
-            _parse 0)
-
-instance DeepSeq.NFData TargetCall_key where
-  rnf
-    (TargetCall_key __field__locator __field__arguments __field__file
-       __field__span __field__callExpr)
-    = DeepSeq.rnf __field__locator `Prelude.seq`
-        DeepSeq.rnf __field__arguments `Prelude.seq`
-          DeepSeq.rnf __field__file `Prelude.seq`
-            DeepSeq.rnf __field__span `Prelude.seq`
-              DeepSeq.rnf __field__callExpr `Prelude.seq` ()
-
-instance Default.Default TargetCall_key where
-  def
-    = TargetCall_key Default.def Default.def Default.def Default.def
-        Prelude.Nothing
-
-instance Hashable.Hashable TargetCall_key where
-  hashWithSalt __salt
-    (TargetCall_key _locator _arguments _file _span _callExpr)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt
-              (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _locator)
-                 _arguments)
-              _file)
-           _span)
-        _callExpr
-
-data TargetByType_key = TargetByType_key{targetByType_key_type_ ::
-                                         Type,
-                                         targetByType_key_target :: Target}
-                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TargetByType_key where
-  toJSON (TargetByType_key __field__type_ __field__target)
-    = Aeson.object
-        ("type_" .= __field__type_ :
-           "target" .= __field__target : Prelude.mempty)
-
-instance Thrift.ThriftStruct TargetByType_key where
-  buildStruct _proxy
-    (TargetByType_key __field__type_ __field__target)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "type_" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__type_)
-           :
-           Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__target)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__type_ <- ST.newSTRef Default.def
-            __field__target <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__type_
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__target
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__type_ <- ST.readSTRef __field__type_
-                                             !__val__target <- ST.readSTRef __field__target
-                                             Prelude.pure
-                                               (TargetByType_key __val__type_ __val__target)
-              _idMap = HashMap.fromList [("type_", 1), ("target", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData TargetByType_key where
-  rnf (TargetByType_key __field__type_ __field__target)
-    = DeepSeq.rnf __field__type_ `Prelude.seq`
-        DeepSeq.rnf __field__target `Prelude.seq` ()
-
-instance Default.Default TargetByType_key where
-  def = TargetByType_key Default.def Default.def
-
-instance Hashable.Hashable TargetByType_key where
-  hashWithSalt __salt (TargetByType_key _type_ _target)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _type_)
-        _target
-
-data TargetAttribute_key = TargetAttribute_key{targetAttribute_key_target
-                                               :: Target,
-                                               targetAttribute_key_attribute :: AttributeName,
-                                               targetAttribute_key_value :: AttributeValue}
-                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TargetAttribute_key where
-  toJSON
-    (TargetAttribute_key __field__target __field__attribute
-       __field__value)
-    = Aeson.object
-        ("target" .= __field__target :
-           "attribute" .= __field__attribute :
-             "value" .= __field__value : Prelude.mempty)
-
-instance Thrift.ThriftStruct TargetAttribute_key where
-  buildStruct _proxy
-    (TargetAttribute_key __field__target __field__attribute
-       __field__value)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__target)
-           :
-           Thrift.genField _proxy "attribute" (Thrift.getStructType _proxy) 2
-             1
-             (Thrift.buildStruct _proxy __field__attribute)
-             :
-             Thrift.genField _proxy "value" (Thrift.getStructType _proxy) 3 2
-               (Thrift.buildStruct _proxy __field__value)
-               : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__target <- ST.newSTRef Default.def
-            __field__attribute <- ST.newSTRef Default.def
-            __field__value <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__target
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__attribute
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__value
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__target <- ST.readSTRef
-                                                                 __field__target
-                                             !__val__attribute <- ST.readSTRef __field__attribute
-                                             !__val__value <- ST.readSTRef __field__value
-                                             Prelude.pure
-                                               (TargetAttribute_key __val__target __val__attribute
-                                                  __val__value)
-              _idMap
-                = HashMap.fromList [("target", 1), ("attribute", 2), ("value", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData TargetAttribute_key where
-  rnf
-    (TargetAttribute_key __field__target __field__attribute
-       __field__value)
-    = DeepSeq.rnf __field__target `Prelude.seq`
-        DeepSeq.rnf __field__attribute `Prelude.seq`
-          DeepSeq.rnf __field__value `Prelude.seq` ()
-
-instance Default.Default TargetAttribute_key where
-  def = TargetAttribute_key Default.def Default.def Default.def
-
-instance Hashable.Hashable TargetAttribute_key where
-  hashWithSalt __salt (TargetAttribute_key _target _attribute _value)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _target)
-           _attribute)
-        _value
-
-data Target_key = Target_key{target_key_locator :: Locator,
-                             target_key_type_ :: Type,
-                             target_key_defaultPlatform :: Prelude.Maybe Platform,
-                             target_key_labels :: Labels}
-                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Target_key where
-  toJSON
-    (Target_key __field__locator __field__type_
-       __field__defaultPlatform __field__labels)
-    = Aeson.object
-        ("locator" .= __field__locator :
-           "type_" .= __field__type_ :
-             Prelude.maybe Prelude.id ((:) . ("defaultPlatform" .=))
-               __field__defaultPlatform
-               ("labels" .= __field__labels : Prelude.mempty))
-
-instance Thrift.ThriftStruct Target_key where
-  buildStruct _proxy
-    (Target_key __field__locator __field__type_
-       __field__defaultPlatform __field__labels)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "locator" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__locator)
-           :
-           Thrift.genField _proxy "type_" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__type_)
-             :
-             let (__cereal__defaultPlatform, __id__defaultPlatform)
-                   = case __field__defaultPlatform of
-                       Prelude.Just _val -> ((:)
-                                               (Thrift.genField _proxy "defaultPlatform"
-                                                  (Thrift.getStructType _proxy)
-                                                  3
-                                                  2
-                                                  (Thrift.buildStruct _proxy _val)),
-                                             3)
-                       Prelude.Nothing -> (Prelude.id, 2)
-               in
-               __cereal__defaultPlatform
-                 (Thrift.genField _proxy "labels" (Thrift.getStructType _proxy) 4
-                    __id__defaultPlatform
-                    (Thrift.buildStruct _proxy __field__labels)
-                    : []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__locator <- ST.newSTRef Default.def
-            __field__type_ <- ST.newSTRef Default.def
-            __field__defaultPlatform <- ST.newSTRef Prelude.Nothing
-            __field__labels <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__locator
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__type_
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__defaultPlatform
-                                                                          (Prelude.Just _val)
-                                                                 4 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__labels
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__locator <- ST.readSTRef
-                                                                  __field__locator
-                                             !__val__type_ <- ST.readSTRef __field__type_
-                                             !__val__defaultPlatform <- ST.readSTRef
-                                                                          __field__defaultPlatform
-                                             !__val__labels <- ST.readSTRef __field__labels
-                                             Prelude.pure
-                                               (Target_key __val__locator __val__type_
-                                                  __val__defaultPlatform
-                                                  __val__labels)
-              _idMap
-                = HashMap.fromList
-                    [("locator", 1), ("type_", 2), ("defaultPlatform", 3),
-                     ("labels", 4)]
-            _parse 0)
-
-instance DeepSeq.NFData Target_key where
-  rnf
-    (Target_key __field__locator __field__type_
-       __field__defaultPlatform __field__labels)
-    = DeepSeq.rnf __field__locator `Prelude.seq`
-        DeepSeq.rnf __field__type_ `Prelude.seq`
-          DeepSeq.rnf __field__defaultPlatform `Prelude.seq`
-            DeepSeq.rnf __field__labels `Prelude.seq` ()
-
-instance Default.Default Target_key where
-  def
-    = Target_key Default.def Default.def Prelude.Nothing Default.def
-
-instance Hashable.Hashable Target_key where
-  hashWithSalt __salt
-    (Target_key _locator _type_ _defaultPlatform _labels)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _locator)
-              _type_)
-           _defaultPlatform)
-        _labels
-
-data SourceFileLocation_key = SourceFileLocation_key{sourceFileLocation_key_file
-                                                     :: Glean.Schema.Src.File,
-                                                     sourceFileLocation_key_span ::
-                                                     Glean.Schema.Src.ByteSpan}
-                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SourceFileLocation_key where
-  toJSON (SourceFileLocation_key __field__file __field__span)
-    = Aeson.object
-        ("file" .= __field__file :
-           "span" .= __field__span : Prelude.mempty)
-
-instance Thrift.ThriftStruct SourceFileLocation_key where
-  buildStruct _proxy
-    (SourceFileLocation_key __field__file __field__span)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__file)
-           :
-           Thrift.genField _proxy "span" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__span)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__file <- ST.newSTRef Default.def
-            __field__span <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__file
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__span
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__file <- ST.readSTRef __field__file
-                                             !__val__span <- ST.readSTRef __field__span
-                                             Prelude.pure
-                                               (SourceFileLocation_key __val__file __val__span)
-              _idMap = HashMap.fromList [("file", 1), ("span", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SourceFileLocation_key where
-  rnf (SourceFileLocation_key __field__file __field__span)
-    = DeepSeq.rnf __field__file `Prelude.seq`
-        DeepSeq.rnf __field__span `Prelude.seq` ()
-
-instance Default.Default SourceFileLocation_key where
-  def = SourceFileLocation_key Default.def Default.def
-
-instance Hashable.Hashable SourceFileLocation_key where
-  hashWithSalt __salt (SourceFileLocation_key _file _span)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _file) _span
-
-data SearchByLocalName_key = SearchByLocalName_key{searchByLocalName_key_name
-                                                   :: LocalName,
-                                                   searchByLocalName_key_decl :: XRefDestination}
-                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchByLocalName_key where
-  toJSON (SearchByLocalName_key __field__name __field__decl)
-    = Aeson.object
-        ("name" .= __field__name :
-           "decl" .= __field__decl : Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchByLocalName_key where
-  buildStruct _proxy
-    (SearchByLocalName_key __field__name __field__decl)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__name)
-           :
-           Thrift.genField _proxy "decl" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__decl)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef Default.def
-            __field__decl <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__decl
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__decl <- ST.readSTRef __field__decl
-                                             Prelude.pure
-                                               (SearchByLocalName_key __val__name __val__decl)
-              _idMap = HashMap.fromList [("name", 1), ("decl", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchByLocalName_key where
-  rnf (SearchByLocalName_key __field__name __field__decl)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__decl `Prelude.seq` ()
-
-instance Default.Default SearchByLocalName_key where
-  def = SearchByLocalName_key Default.def Default.def
-
-instance Hashable.Hashable SearchByLocalName_key where
-  hashWithSalt __salt (SearchByLocalName_key _name _decl)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _decl
-
-data RuleKey_key = RuleKey_key{ruleKey_key_locator :: Locator,
-                               ruleKey_key_ruleKey :: Text.Text}
-                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON RuleKey_key where
-  toJSON (RuleKey_key __field__locator __field__ruleKey)
-    = Aeson.object
-        ("locator" .= __field__locator :
-           "ruleKey" .= __field__ruleKey : Prelude.mempty)
-
-instance Thrift.ThriftStruct RuleKey_key where
-  buildStruct _proxy (RuleKey_key __field__locator __field__ruleKey)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "locator" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__locator)
-           :
-           Thrift.genField _proxy "ruleKey" (Thrift.getStringType _proxy) 2 1
-             (Thrift.genText _proxy __field__ruleKey)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__locator <- ST.newSTRef Default.def
-            __field__ruleKey <- ST.newSTRef ""
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__locator
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__ruleKey
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__locator <- ST.readSTRef
-                                                                  __field__locator
-                                             !__val__ruleKey <- ST.readSTRef __field__ruleKey
-                                             Prelude.pure
-                                               (RuleKey_key __val__locator __val__ruleKey)
-              _idMap = HashMap.fromList [("locator", 1), ("ruleKey", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData RuleKey_key where
-  rnf (RuleKey_key __field__locator __field__ruleKey)
-    = DeepSeq.rnf __field__locator `Prelude.seq`
-        DeepSeq.rnf __field__ruleKey `Prelude.seq` ()
-
-instance Default.Default RuleKey_key where
-  def = RuleKey_key Default.def ""
-
-instance Hashable.Hashable RuleKey_key where
-  hashWithSalt __salt (RuleKey_key _locator _ruleKey)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _locator)
-        _ruleKey
-
-data Owner_key = Owner_key{owner_key_source ::
-                           Glean.Schema.Src.File,
-                           owner_key_owner :: TargetSources}
-                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Owner_key where
-  toJSON (Owner_key __field__source __field__owner)
-    = Aeson.object
-        ("source" .= __field__source :
-           "owner" .= __field__owner : Prelude.mempty)
-
-instance Thrift.ThriftStruct Owner_key where
-  buildStruct _proxy (Owner_key __field__source __field__owner)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "source" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__source)
-           :
-           Thrift.genField _proxy "owner" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__owner)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__source <- ST.newSTRef Default.def
-            __field__owner <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__source
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__owner
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__source <- ST.readSTRef
-                                                                 __field__source
-                                             !__val__owner <- ST.readSTRef __field__owner
-                                             Prelude.pure (Owner_key __val__source __val__owner)
-              _idMap = HashMap.fromList [("source", 1), ("owner", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData Owner_key where
-  rnf (Owner_key __field__source __field__owner)
-    = DeepSeq.rnf __field__source `Prelude.seq`
-        DeepSeq.rnf __field__owner `Prelude.seq` ()
-
-instance Default.Default Owner_key where
-  def = Owner_key Default.def Default.def
-
-instance Hashable.Hashable Owner_key where
-  hashWithSalt __salt (Owner_key _source _owner)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _source)
-        _owner
-
-data OutsTarget_key = OutsTarget_key{outsTarget_key_file ::
-                                     Glean.Schema.Src.File,
-                                     outsTarget_key_target :: Target,
-                                     outsTarget_key_outputLabel :: Prelude.Maybe OutputLabel}
-                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON OutsTarget_key where
-  toJSON
-    (OutsTarget_key __field__file __field__target __field__outputLabel)
-    = Aeson.object
-        ("file" .= __field__file :
-           "target" .= __field__target :
-             Prelude.maybe Prelude.id ((:) . ("outputLabel" .=))
-               __field__outputLabel
-               Prelude.mempty)
-
-instance Thrift.ThriftStruct OutsTarget_key where
-  buildStruct _proxy
-    (OutsTarget_key __field__file __field__target __field__outputLabel)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__file)
-           :
-           Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__target)
-             :
-             case __field__outputLabel of
-               Prelude.Just _val -> Thrift.genField _proxy "outputLabel"
-                                      (Thrift.getStructType _proxy)
-                                      3
-                                      2
-                                      (Thrift.buildStruct _proxy _val)
-                                      : []
-               Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__file <- ST.newSTRef Default.def
-            __field__target <- ST.newSTRef Default.def
-            __field__outputLabel <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__file
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__target
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__outputLabel
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__file <- ST.readSTRef __field__file
-                                             !__val__target <- ST.readSTRef __field__target
-                                             !__val__outputLabel <- ST.readSTRef
-                                                                      __field__outputLabel
-                                             Prelude.pure
-                                               (OutsTarget_key __val__file __val__target
-                                                  __val__outputLabel)
-              _idMap
-                = HashMap.fromList [("file", 1), ("target", 2), ("outputLabel", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData OutsTarget_key where
-  rnf
-    (OutsTarget_key __field__file __field__target __field__outputLabel)
-    = DeepSeq.rnf __field__file `Prelude.seq`
-        DeepSeq.rnf __field__target `Prelude.seq`
-          DeepSeq.rnf __field__outputLabel `Prelude.seq` ()
-
-instance Default.Default OutsTarget_key where
-  def = OutsTarget_key Default.def Default.def Prelude.Nothing
-
-instance Hashable.Hashable OutsTarget_key where
-  hashWithSalt __salt (OutsTarget_key _file _target _outputLabel)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _file)
-           _target)
-        _outputLabel
-
-data OutTarget_key = OutTarget_key{outTarget_key_file ::
-                                   Glean.Schema.Src.File,
-                                   outTarget_key_target :: Target}
-                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON OutTarget_key where
-  toJSON (OutTarget_key __field__file __field__target)
-    = Aeson.object
-        ("file" .= __field__file :
-           "target" .= __field__target : Prelude.mempty)
-
-instance Thrift.ThriftStruct OutTarget_key where
-  buildStruct _proxy (OutTarget_key __field__file __field__target)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__file)
-           :
-           Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__target)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__file <- ST.newSTRef Default.def
-            __field__target <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__file
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__target
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__file <- ST.readSTRef __field__file
-                                             !__val__target <- ST.readSTRef __field__target
-                                             Prelude.pure (OutTarget_key __val__file __val__target)
-              _idMap = HashMap.fromList [("file", 1), ("target", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData OutTarget_key where
-  rnf (OutTarget_key __field__file __field__target)
-    = DeepSeq.rnf __field__file `Prelude.seq`
-        DeepSeq.rnf __field__target `Prelude.seq` ()
-
-instance Default.Default OutTarget_key where
-  def = OutTarget_key Default.def Default.def
-
-instance Hashable.Hashable OutTarget_key where
-  hashWithSalt __salt (OutTarget_key _file _target)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _file)
-        _target
-
-data LocatorWithLabel_key = LocatorWithLabel_key{locatorWithLabel_key_locator
-                                                 :: Locator,
-                                                 locatorWithLabel_key_label :: OutputLabel}
-                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON LocatorWithLabel_key where
-  toJSON (LocatorWithLabel_key __field__locator __field__label)
-    = Aeson.object
-        ("locator" .= __field__locator :
-           "label" .= __field__label : Prelude.mempty)
-
-instance Thrift.ThriftStruct LocatorWithLabel_key where
-  buildStruct _proxy
-    (LocatorWithLabel_key __field__locator __field__label)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "locator" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__locator)
-           :
-           Thrift.genField _proxy "label" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__label)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__locator <- ST.newSTRef Default.def
-            __field__label <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__locator
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__label
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__locator <- ST.readSTRef
-                                                                  __field__locator
-                                             !__val__label <- ST.readSTRef __field__label
-                                             Prelude.pure
-                                               (LocatorWithLabel_key __val__locator __val__label)
-              _idMap = HashMap.fromList [("locator", 1), ("label", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData LocatorWithLabel_key where
-  rnf (LocatorWithLabel_key __field__locator __field__label)
-    = DeepSeq.rnf __field__locator `Prelude.seq`
-        DeepSeq.rnf __field__label `Prelude.seq` ()
-
-instance Default.Default LocatorWithLabel_key where
-  def = LocatorWithLabel_key Default.def Default.def
-
-instance Hashable.Hashable LocatorWithLabel_key where
-  hashWithSalt __salt (LocatorWithLabel_key _locator _label)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _locator)
-        _label
-
-data LocatorReverseDeps_key = LocatorReverseDeps_key{locatorReverseDeps_key_locator
-                                                     :: Locator,
-                                                     locatorReverseDeps_key_rdeps :: [Locator]}
-                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON LocatorReverseDeps_key where
-  toJSON (LocatorReverseDeps_key __field__locator __field__rdeps)
-    = Aeson.object
-        ("locator" .= __field__locator :
-           "rdeps" .= __field__rdeps : Prelude.mempty)
-
-instance Thrift.ThriftStruct LocatorReverseDeps_key where
-  buildStruct _proxy
-    (LocatorReverseDeps_key __field__locator __field__rdeps)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "locator" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__locator)
-           :
-           Thrift.genField _proxy "rdeps" (Thrift.getListType _proxy) 2 1
-             (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                (Thrift.buildStruct _proxy)
-                __field__rdeps)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__locator <- ST.newSTRef Default.def
-            __field__rdeps <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__locator
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef __field__rdeps
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__locator <- ST.readSTRef
-                                                                  __field__locator
-                                             !__val__rdeps <- ST.readSTRef __field__rdeps
-                                             Prelude.pure
-                                               (LocatorReverseDeps_key __val__locator __val__rdeps)
-              _idMap = HashMap.fromList [("locator", 1), ("rdeps", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData LocatorReverseDeps_key where
-  rnf (LocatorReverseDeps_key __field__locator __field__rdeps)
-    = DeepSeq.rnf __field__locator `Prelude.seq`
-        DeepSeq.rnf __field__rdeps `Prelude.seq` ()
-
-instance Default.Default LocatorReverseDeps_key where
-  def = LocatorReverseDeps_key Default.def Default.def
-
-instance Hashable.Hashable LocatorReverseDeps_key where
-  hashWithSalt __salt (LocatorReverseDeps_key _locator _rdeps)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _locator)
-        _rdeps
-
-data LocatorReverseDep_key = LocatorReverseDep_key{locatorReverseDep_key_locator
-                                                   :: Locator,
-                                                   locatorReverseDep_key_rdep :: Locator}
-                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON LocatorReverseDep_key where
-  toJSON (LocatorReverseDep_key __field__locator __field__rdep)
-    = Aeson.object
-        ("locator" .= __field__locator :
-           "rdep" .= __field__rdep : Prelude.mempty)
-
-instance Thrift.ThriftStruct LocatorReverseDep_key where
-  buildStruct _proxy
-    (LocatorReverseDep_key __field__locator __field__rdep)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "locator" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__locator)
-           :
-           Thrift.genField _proxy "rdep" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__rdep)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__locator <- ST.newSTRef Default.def
-            __field__rdep <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__locator
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__rdep
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__locator <- ST.readSTRef
-                                                                  __field__locator
-                                             !__val__rdep <- ST.readSTRef __field__rdep
-                                             Prelude.pure
-                                               (LocatorReverseDep_key __val__locator __val__rdep)
-              _idMap = HashMap.fromList [("locator", 1), ("rdep", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData LocatorReverseDep_key where
-  rnf (LocatorReverseDep_key __field__locator __field__rdep)
-    = DeepSeq.rnf __field__locator `Prelude.seq`
-        DeepSeq.rnf __field__rdep `Prelude.seq` ()
-
-instance Default.Default LocatorReverseDep_key where
-  def = LocatorReverseDep_key Default.def Default.def
-
-instance Hashable.Hashable LocatorReverseDep_key where
-  hashWithSalt __salt (LocatorReverseDep_key _locator _rdep)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _locator)
-        _rdep
-
-data Locator_key = Locator_key{locator_key_subdir ::
-                               Prelude.Maybe Text.Text,
-                               locator_key_path :: Text.Text, locator_key_name :: Text.Text}
-                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Locator_key where
-  toJSON (Locator_key __field__subdir __field__path __field__name)
-    = Aeson.object
-        (Prelude.maybe Prelude.id ((:) . ("subdir" .=)) __field__subdir
-           ("path" .= __field__path :
-              "name" .= __field__name : Prelude.mempty))
-
-instance Thrift.ThriftStruct Locator_key where
-  buildStruct _proxy
-    (Locator_key __field__subdir __field__path __field__name)
-    = Thrift.genStruct _proxy
-        (let (__cereal__subdir, __id__subdir)
-               = case __field__subdir of
-                   Prelude.Just _val -> ((:)
-                                           (Thrift.genField _proxy "subdir"
-                                              (Thrift.getStringType _proxy)
-                                              1
-                                              0
-                                              (Thrift.genText _proxy _val)),
-                                         1)
-                   Prelude.Nothing -> (Prelude.id, 0)
-           in
-           __cereal__subdir
-             (Thrift.genField _proxy "path" (Thrift.getStringType _proxy) 2
-                __id__subdir
-                (Thrift.genText _proxy __field__path)
-                :
-                Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 3 2
-                  (Thrift.genText _proxy __field__name)
-                  : []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__subdir <- ST.newSTRef Prelude.Nothing
-            __field__path <- ST.newSTRef ""
-            __field__name <- ST.newSTRef ""
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__subdir
-                                                                          (Prelude.Just _val)
-                                                                 2 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__path
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__subdir <- ST.readSTRef
-                                                                 __field__subdir
-                                             !__val__path <- ST.readSTRef __field__path
-                                             !__val__name <- ST.readSTRef __field__name
-                                             Prelude.pure
-                                               (Locator_key __val__subdir __val__path __val__name)
-              _idMap = HashMap.fromList [("subdir", 1), ("path", 2), ("name", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData Locator_key where
-  rnf (Locator_key __field__subdir __field__path __field__name)
-    = DeepSeq.rnf __field__subdir `Prelude.seq`
-        DeepSeq.rnf __field__path `Prelude.seq`
-          DeepSeq.rnf __field__name `Prelude.seq` ()
-
-instance Default.Default Locator_key where
-  def = Locator_key Prelude.Nothing "" ""
-
-instance Hashable.Hashable Locator_key where
-  hashWithSalt __salt (Locator_key _subdir _path _name)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _subdir)
-           _path)
-        _name
-
-data LocalNameLowerCase_key = LocalNameLowerCase_key{localNameLowerCase_key_lowercase
-                                                     :: Text.Text,
-                                                     localNameLowerCase_key_name :: LocalName}
-                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON LocalNameLowerCase_key where
-  toJSON (LocalNameLowerCase_key __field__lowercase __field__name)
-    = Aeson.object
-        ("lowercase" .= __field__lowercase :
-           "name" .= __field__name : Prelude.mempty)
-
-instance Thrift.ThriftStruct LocalNameLowerCase_key where
-  buildStruct _proxy
-    (LocalNameLowerCase_key __field__lowercase __field__name)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "lowercase" (Thrift.getStringType _proxy) 1
-           0
-           (Thrift.genText _proxy __field__lowercase)
-           :
-           Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__name)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__lowercase <- ST.newSTRef ""
-            __field__name <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__lowercase
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__lowercase <- ST.readSTRef
-                                                                    __field__lowercase
-                                             !__val__name <- ST.readSTRef __field__name
-                                             Prelude.pure
-                                               (LocalNameLowerCase_key __val__lowercase __val__name)
-              _idMap = HashMap.fromList [("lowercase", 1), ("name", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData LocalNameLowerCase_key where
-  rnf (LocalNameLowerCase_key __field__lowercase __field__name)
-    = DeepSeq.rnf __field__lowercase `Prelude.seq`
-        DeepSeq.rnf __field__name `Prelude.seq` ()
-
-instance Default.Default LocalNameLowerCase_key where
-  def = LocalNameLowerCase_key "" Default.def
-
-instance Hashable.Hashable LocalNameLowerCase_key where
-  hashWithSalt __salt (LocalNameLowerCase_key _lowercase _name)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _lowercase)
-        _name
-
-data FileXRefs_key = FileXRefs_key{fileXRefs_key_file ::
-                                   Glean.Schema.Src.File,
-                                   fileXRefs_key_xrefs :: [XRef]}
-                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON FileXRefs_key where
-  toJSON (FileXRefs_key __field__file __field__xrefs)
-    = Aeson.object
-        ("file" .= __field__file :
-           "xrefs" .= __field__xrefs : Prelude.mempty)
-
-instance Thrift.ThriftStruct FileXRefs_key where
-  buildStruct _proxy (FileXRefs_key __field__file __field__xrefs)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__file)
-           :
-           Thrift.genField _proxy "xrefs" (Thrift.getListType _proxy) 2 1
-             (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                (Thrift.buildStruct _proxy)
-                __field__xrefs)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__file <- ST.newSTRef Default.def
-            __field__xrefs <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__file
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef __field__xrefs
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__file <- ST.readSTRef __field__file
-                                             !__val__xrefs <- ST.readSTRef __field__xrefs
-                                             Prelude.pure (FileXRefs_key __val__file __val__xrefs)
-              _idMap = HashMap.fromList [("file", 1), ("xrefs", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData FileXRefs_key where
-  rnf (FileXRefs_key __field__file __field__xrefs)
-    = DeepSeq.rnf __field__file `Prelude.seq`
-        DeepSeq.rnf __field__xrefs `Prelude.seq` ()
-
-instance Default.Default FileXRefs_key where
-  def = FileXRefs_key Default.def Default.def
-
-instance Hashable.Hashable FileXRefs_key where
-  hashWithSalt __salt (FileXRefs_key _file _xrefs)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _file) _xrefs
-
-data FileToTarget_key = FileToTarget_key{fileToTarget_key_source ::
-                                         Glean.Schema.Src.File,
-                                         fileToTarget_key_locator :: Locator}
-                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON FileToTarget_key where
-  toJSON (FileToTarget_key __field__source __field__locator)
-    = Aeson.object
-        ("source" .= __field__source :
-           "locator" .= __field__locator : Prelude.mempty)
-
-instance Thrift.ThriftStruct FileToTarget_key where
-  buildStruct _proxy
-    (FileToTarget_key __field__source __field__locator)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "source" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__source)
-           :
-           Thrift.genField _proxy "locator" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__locator)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__source <- ST.newSTRef Default.def
-            __field__locator <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__source
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__locator
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__source <- ST.readSTRef
-                                                                 __field__source
-                                             !__val__locator <- ST.readSTRef __field__locator
-                                             Prelude.pure
-                                               (FileToTarget_key __val__source __val__locator)
-              _idMap = HashMap.fromList [("source", 1), ("locator", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData FileToTarget_key where
-  rnf (FileToTarget_key __field__source __field__locator)
-    = DeepSeq.rnf __field__source `Prelude.seq`
-        DeepSeq.rnf __field__locator `Prelude.seq` ()
-
-instance Default.Default FileToTarget_key where
-  def = FileToTarget_key Default.def Default.def
-
-instance Hashable.Hashable FileToTarget_key where
-  hashWithSalt __salt (FileToTarget_key _source _locator)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _source)
-        _locator
-
-data FileTarget_key = FileTarget_key{fileTarget_key_file ::
-                                     Glean.Schema.Src.File,
-                                     fileTarget_key_locator :: Locator}
-                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON FileTarget_key where
-  toJSON (FileTarget_key __field__file __field__locator)
-    = Aeson.object
-        ("file" .= __field__file :
-           "locator" .= __field__locator : Prelude.mempty)
-
-instance Thrift.ThriftStruct FileTarget_key where
-  buildStruct _proxy (FileTarget_key __field__file __field__locator)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__file)
-           :
-           Thrift.genField _proxy "locator" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__locator)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__file <- ST.newSTRef Default.def
-            __field__locator <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__file
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__locator
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__file <- ST.readSTRef __field__file
-                                             !__val__locator <- ST.readSTRef __field__locator
-                                             Prelude.pure
-                                               (FileTarget_key __val__file __val__locator)
-              _idMap = HashMap.fromList [("file", 1), ("locator", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData FileTarget_key where
-  rnf (FileTarget_key __field__file __field__locator)
-    = DeepSeq.rnf __field__file `Prelude.seq`
-        DeepSeq.rnf __field__locator `Prelude.seq` ()
-
-instance Default.Default FileTarget_key where
-  def = FileTarget_key Default.def Default.def
-
-instance Hashable.Hashable FileTarget_key where
-  hashWithSalt __salt (FileTarget_key _file _locator)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _file)
-        _locator
-
-data FileResolved_key = FileResolved_key{fileResolved_key_buckFile
-                                         :: File,
-                                         fileResolved_key_srcFile :: Glean.Schema.Src.File}
-                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON FileResolved_key where
-  toJSON (FileResolved_key __field__buckFile __field__srcFile)
-    = Aeson.object
-        ("buckFile" .= __field__buckFile :
-           "srcFile" .= __field__srcFile : Prelude.mempty)
-
-instance Thrift.ThriftStruct FileResolved_key where
-  buildStruct _proxy
-    (FileResolved_key __field__buckFile __field__srcFile)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "buckFile" (Thrift.getStructType _proxy) 1
-           0
-           (Thrift.buildStruct _proxy __field__buckFile)
-           :
-           Thrift.genField _proxy "srcFile" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__srcFile)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__buckFile <- ST.newSTRef Default.def
-            __field__srcFile <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__buckFile
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__srcFile
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__buckFile <- ST.readSTRef
-                                                                   __field__buckFile
-                                             !__val__srcFile <- ST.readSTRef __field__srcFile
-                                             Prelude.pure
-                                               (FileResolved_key __val__buckFile __val__srcFile)
-              _idMap = HashMap.fromList [("buckFile", 1), ("srcFile", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData FileResolved_key where
-  rnf (FileResolved_key __field__buckFile __field__srcFile)
-    = DeepSeq.rnf __field__buckFile `Prelude.seq`
-        DeepSeq.rnf __field__srcFile `Prelude.seq` ()
-
-instance Default.Default FileResolved_key where
-  def = FileResolved_key Default.def Default.def
-
-instance Hashable.Hashable FileResolved_key where
-  hashWithSalt __salt (FileResolved_key _buckFile _srcFile)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _buckFile)
-        _srcFile
-
-data FileEntity_key = FileEntity_key{fileEntity_key_file ::
-                                     Glean.Schema.Src.File,
-                                     fileEntity_key_entity :: XRefDestination}
-                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON FileEntity_key where
-  toJSON (FileEntity_key __field__file __field__entity)
-    = Aeson.object
-        ("file" .= __field__file :
-           "entity" .= __field__entity : Prelude.mempty)
-
-instance Thrift.ThriftStruct FileEntity_key where
-  buildStruct _proxy (FileEntity_key __field__file __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__file)
-           :
-           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__entity)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__file <- ST.newSTRef Default.def
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__file
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__file <- ST.readSTRef __field__file
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure (FileEntity_key __val__file __val__entity)
-              _idMap = HashMap.fromList [("file", 1), ("entity", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData FileEntity_key where
-  rnf (FileEntity_key __field__file __field__entity)
-    = DeepSeq.rnf __field__file `Prelude.seq`
-        DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default FileEntity_key where
-  def = FileEntity_key Default.def Default.def
-
-instance Hashable.Hashable FileEntity_key where
-  hashWithSalt __salt (FileEntity_key _file _entity)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _file)
-        _entity
-
-data FileDefinition_key = FileDefinition_key{fileDefinition_key_file
-                                             :: Glean.Schema.Src.File,
-                                             fileDefinition_key_definition :: Definition}
-                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON FileDefinition_key where
-  toJSON (FileDefinition_key __field__file __field__definition)
-    = Aeson.object
-        ("file" .= __field__file :
-           "definition" .= __field__definition : Prelude.mempty)
-
-instance Thrift.ThriftStruct FileDefinition_key where
-  buildStruct _proxy
-    (FileDefinition_key __field__file __field__definition)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__file)
-           :
-           Thrift.genField _proxy "definition" (Thrift.getStructType _proxy) 2
-             1
-             (Thrift.buildStruct _proxy __field__definition)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__file <- ST.newSTRef Default.def
-            __field__definition <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__file
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__definition
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__file <- ST.readSTRef __field__file
-                                             !__val__definition <- ST.readSTRef __field__definition
-                                             Prelude.pure
-                                               (FileDefinition_key __val__file __val__definition)
-              _idMap = HashMap.fromList [("file", 1), ("definition", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData FileDefinition_key where
-  rnf (FileDefinition_key __field__file __field__definition)
-    = DeepSeq.rnf __field__file `Prelude.seq`
-        DeepSeq.rnf __field__definition `Prelude.seq` ()
-
-instance Default.Default FileDefinition_key where
-  def = FileDefinition_key Default.def Default.def
-
-instance Hashable.Hashable FileDefinition_key where
-  hashWithSalt __salt (FileDefinition_key _file _definition)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _file)
-        _definition
-
-data File_key = File_key_source Glean.Schema.Src.File
-              | File_key_generated Locator
-              | File_key_generatedLabel LocatorWithLabel
-              | File_key_EMPTY
-                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON File_key where
-  toJSON (File_key_source __source)
-    = Aeson.object ["source" .= __source]
-  toJSON (File_key_generated __generated)
-    = Aeson.object ["generated" .= __generated]
-  toJSON (File_key_generatedLabel __generatedLabel)
-    = Aeson.object ["generatedLabel" .= __generatedLabel]
-  toJSON File_key_EMPTY = Aeson.object []
-
-instance Thrift.ThriftStruct File_key where
-  buildStruct _proxy (File_key_source __source)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "source" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __source)]
-  buildStruct _proxy (File_key_generated __generated)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "generated" (Thrift.getStructType _proxy) 2
-           0
-           (Thrift.buildStruct _proxy __generated)]
-  buildStruct _proxy (File_key_generatedLabel __generatedLabel)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "generatedLabel"
-           (Thrift.getStructType _proxy)
-           3
-           0
-           (Thrift.buildStruct _proxy __generatedLabel)]
-  buildStruct _proxy File_key_EMPTY = Thrift.genStruct _proxy []
-  parseStruct _proxy
-    = do _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap
-         case _fieldBegin of
-           Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                     1 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return (File_key_source _val)
-                                                     2 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return (File_key_generated _val)
-                                                     3 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return
-                                                              (File_key_generatedLabel _val)
-                                                     _ -> do Thrift.parseSkip _proxy _type
-                                                               Prelude.Nothing
-                                                             Thrift.parseStop _proxy
-                                                             Prelude.return File_key_EMPTY
-           Thrift.FieldEnd -> Prelude.return File_key_EMPTY
-    where
-      _idMap
-        = HashMap.fromList
-            [("source", 1), ("generated", 2), ("generatedLabel", 3)]
-
-instance DeepSeq.NFData File_key where
-  rnf (File_key_source __source) = DeepSeq.rnf __source
-  rnf (File_key_generated __generated) = DeepSeq.rnf __generated
-  rnf (File_key_generatedLabel __generatedLabel)
-    = DeepSeq.rnf __generatedLabel
-  rnf File_key_EMPTY = ()
-
-instance Default.Default File_key where
-  def = File_key_EMPTY
-
-instance Hashable.Hashable File_key where
-  hashWithSalt __salt (File_key_source _source)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 1 _source)
-  hashWithSalt __salt (File_key_generated _generated)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 2 _generated)
-  hashWithSalt __salt (File_key_generatedLabel _generatedLabel)
-    = Hashable.hashWithSalt __salt
-        (Hashable.hashWithSalt 3 _generatedLabel)
-  hashWithSalt __salt File_key_EMPTY
-    = Hashable.hashWithSalt __salt (0 :: Prelude.Int)
-
-data FailureReason = FailureReason_Skipped
-                   | FailureReason_Blocked
-                   | FailureReason_EmptyCdb
-                   | FailureReason_FailedCdb
-                   | FailureReason_QueryFailed
-                   | FailureReason_Unclassified
-                   | FailureReason__UNKNOWN Prelude.Int
-                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON FailureReason where
-  toJSON = Aeson.toJSON . Thrift.fromThriftEnum
-
-instance DeepSeq.NFData FailureReason where
-  rnf __FailureReason = Prelude.seq __FailureReason ()
-
-instance Default.Default FailureReason where
-  def = FailureReason_Skipped
-
-instance Hashable.Hashable FailureReason where
-  hashWithSalt _salt _val
-    = Hashable.hashWithSalt _salt (Thrift.fromThriftEnum _val)
-
-instance Thrift.ThriftEnum FailureReason where
-  toThriftEnum 0 = FailureReason_Skipped
-  toThriftEnum 1 = FailureReason_Blocked
-  toThriftEnum 2 = FailureReason_EmptyCdb
-  toThriftEnum 3 = FailureReason_FailedCdb
-  toThriftEnum 4 = FailureReason_QueryFailed
-  toThriftEnum 5 = FailureReason_Unclassified
-  toThriftEnum val = FailureReason__UNKNOWN val
-  fromThriftEnum FailureReason_Skipped = 0
-  fromThriftEnum FailureReason_Blocked = 1
-  fromThriftEnum FailureReason_EmptyCdb = 2
-  fromThriftEnum FailureReason_FailedCdb = 3
-  fromThriftEnum FailureReason_QueryFailed = 4
-  fromThriftEnum FailureReason_Unclassified = 5
-  fromThriftEnum (FailureReason__UNKNOWN val) = val
-  allThriftEnumValues
-    = [FailureReason_Skipped, FailureReason_Blocked,
-       FailureReason_EmptyCdb, FailureReason_FailedCdb,
-       FailureReason_QueryFailed, FailureReason_Unclassified]
-  toThriftEnumEither 0 = Prelude.Right FailureReason_Skipped
-  toThriftEnumEither 1 = Prelude.Right FailureReason_Blocked
-  toThriftEnumEither 2 = Prelude.Right FailureReason_EmptyCdb
-  toThriftEnumEither 3 = Prelude.Right FailureReason_FailedCdb
-  toThriftEnumEither 4 = Prelude.Right FailureReason_QueryFailed
-  toThriftEnumEither 5 = Prelude.Right FailureReason_Unclassified
-  toThriftEnumEither val
-    = Prelude.Left
-        ("toThriftEnumEither: not a valid identifier for enum FailureReason: "
-           ++ Prelude.show val)
-
-data IndexFailureX_source = IndexFailureX_source_locator Locator
-                          | IndexFailureX_source_buildFile Glean.Schema.Src.File
-                          | IndexFailureX_source_EMPTY
-                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON IndexFailureX_source where
-  toJSON (IndexFailureX_source_locator __locator)
-    = Aeson.object ["locator" .= __locator]
-  toJSON (IndexFailureX_source_buildFile __buildFile)
-    = Aeson.object ["buildFile" .= __buildFile]
-  toJSON IndexFailureX_source_EMPTY = Aeson.object []
-
-instance Thrift.ThriftStruct IndexFailureX_source where
-  buildStruct _proxy (IndexFailureX_source_locator __locator)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "locator" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __locator)]
-  buildStruct _proxy (IndexFailureX_source_buildFile __buildFile)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "buildFile" (Thrift.getStructType _proxy) 2
-           0
-           (Thrift.buildStruct _proxy __buildFile)]
-  buildStruct _proxy IndexFailureX_source_EMPTY
-    = Thrift.genStruct _proxy []
-  parseStruct _proxy
-    = do _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap
-         case _fieldBegin of
-           Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                     1 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return
-                                                              (IndexFailureX_source_locator _val)
-                                                     2 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return
-                                                              (IndexFailureX_source_buildFile _val)
-                                                     _ -> do Thrift.parseSkip _proxy _type
-                                                               Prelude.Nothing
-                                                             Thrift.parseStop _proxy
-                                                             Prelude.return
-                                                               IndexFailureX_source_EMPTY
-           Thrift.FieldEnd -> Prelude.return IndexFailureX_source_EMPTY
-    where
-      _idMap = HashMap.fromList [("locator", 1), ("buildFile", 2)]
-
-instance DeepSeq.NFData IndexFailureX_source where
-  rnf (IndexFailureX_source_locator __locator)
-    = DeepSeq.rnf __locator
-  rnf (IndexFailureX_source_buildFile __buildFile)
-    = DeepSeq.rnf __buildFile
-  rnf IndexFailureX_source_EMPTY = ()
-
-instance Default.Default IndexFailureX_source where
-  def = IndexFailureX_source_EMPTY
-
-instance Hashable.Hashable IndexFailureX_source where
-  hashWithSalt __salt (IndexFailureX_source_locator _locator)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 1 _locator)
-  hashWithSalt __salt (IndexFailureX_source_buildFile _buildFile)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 2 _buildFile)
-  hashWithSalt __salt IndexFailureX_source_EMPTY
-    = Hashable.hashWithSalt __salt (0 :: Prelude.Int)
-
-data IndexFailureX_key = IndexFailureX_key{indexFailureX_key_source
-                                           :: IndexFailureX_source,
-                                           indexFailureX_key_indexer :: IndexerName,
-                                           indexFailureX_key_reason :: FailureReason,
-                                           indexFailureX_key_details :: Text.Text,
-                                           indexFailureX_key_repro :: Prelude.Maybe Text.Text}
-                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON IndexFailureX_key where
-  toJSON
-    (IndexFailureX_key __field__source __field__indexer __field__reason
-       __field__details __field__repro)
-    = Aeson.object
-        ("source" .= __field__source :
-           "indexer" .= __field__indexer :
-             "reason" .= __field__reason :
-               "details" .= __field__details :
-                 Prelude.maybe Prelude.id ((:) . ("repro" .=)) __field__repro
-                   Prelude.mempty)
-
-instance Thrift.ThriftStruct IndexFailureX_key where
-  buildStruct _proxy
-    (IndexFailureX_key __field__source __field__indexer __field__reason
-       __field__details __field__repro)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "source" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__source)
-           :
-           Thrift.genField _proxy "indexer" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__indexer)
-             :
-             Thrift.genField _proxy "reason" (Thrift.getI32Type _proxy) 3 2
-               ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                   Thrift.fromThriftEnum)
-                  __field__reason)
-               :
-               Thrift.genField _proxy "details" (Thrift.getStringType _proxy) 4 3
-                 (Thrift.genText _proxy __field__details)
-                 :
-                 case __field__repro of
-                   Prelude.Just _val -> Thrift.genField _proxy "repro"
-                                          (Thrift.getStringType _proxy)
-                                          5
-                                          4
-                                          (Thrift.genText _proxy _val)
-                                          : []
-                   Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__source <- ST.newSTRef Default.def
-            __field__indexer <- ST.newSTRef Default.def
-            __field__reason <- ST.newSTRef Default.def
-            __field__details <- ST.newSTRef ""
-            __field__repro <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__source
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__indexer
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "FailureReason")
-                                                                        ST.writeSTRef
-                                                                          __field__reason
-                                                                          _val
-                                                                 4 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__details
-                                                                          _val
-                                                                 5 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__repro
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__source <- ST.readSTRef
-                                                                 __field__source
-                                             !__val__indexer <- ST.readSTRef __field__indexer
-                                             !__val__reason <- ST.readSTRef __field__reason
-                                             !__val__details <- ST.readSTRef __field__details
-                                             !__val__repro <- ST.readSTRef __field__repro
-                                             Prelude.pure
-                                               (IndexFailureX_key __val__source __val__indexer
-                                                  __val__reason
-                                                  __val__details
-                                                  __val__repro)
-              _idMap
-                = HashMap.fromList
-                    [("source", 1), ("indexer", 2), ("reason", 3), ("details", 4),
-                     ("repro", 5)]
-            _parse 0)
-
-instance DeepSeq.NFData IndexFailureX_key where
-  rnf
-    (IndexFailureX_key __field__source __field__indexer __field__reason
-       __field__details __field__repro)
-    = DeepSeq.rnf __field__source `Prelude.seq`
-        DeepSeq.rnf __field__indexer `Prelude.seq`
-          DeepSeq.rnf __field__reason `Prelude.seq`
-            DeepSeq.rnf __field__details `Prelude.seq`
-              DeepSeq.rnf __field__repro `Prelude.seq` ()
-
-instance Default.Default IndexFailureX_key where
-  def
-    = IndexFailureX_key Default.def Default.def Default.def ""
-        Prelude.Nothing
-
-instance Hashable.Hashable IndexFailureX_key where
-  hashWithSalt __salt
-    (IndexFailureX_key _source _indexer _reason _details _repro)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt
-              (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _source)
-                 _indexer)
-              _reason)
-           _details)
-        _repro
-
-data DestinationUses_key = DestinationUses_key{destinationUses_key_destination
-                                               :: XRefDestination,
-                                               destinationUses_key_file :: Glean.Schema.Src.File,
-                                               destinationUses_key_spans ::
-                                               [Glean.Schema.Src.ByteSpan]}
-                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON DestinationUses_key where
-  toJSON
-    (DestinationUses_key __field__destination __field__file
-       __field__spans)
-    = Aeson.object
-        ("destination" .= __field__destination :
-           "file" .= __field__file :
-             "spans" .= __field__spans : Prelude.mempty)
-
-instance Thrift.ThriftStruct DestinationUses_key where
-  buildStruct _proxy
-    (DestinationUses_key __field__destination __field__file
-       __field__spans)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "destination" (Thrift.getStructType _proxy)
-           1
-           0
-           (Thrift.buildStruct _proxy __field__destination)
-           :
-           Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__file)
-             :
-             Thrift.genField _proxy "spans" (Thrift.getListType _proxy) 3 2
-               (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                  (Thrift.buildStruct _proxy)
-                  __field__spans)
-               : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__destination <- ST.newSTRef Default.def
-            __field__file <- ST.newSTRef Default.def
-            __field__spans <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__destination
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__file
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef __field__spans
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__destination <- ST.readSTRef
-                                                                      __field__destination
-                                             !__val__file <- ST.readSTRef __field__file
-                                             !__val__spans <- ST.readSTRef __field__spans
-                                             Prelude.pure
-                                               (DestinationUses_key __val__destination __val__file
-                                                  __val__spans)
-              _idMap
-                = HashMap.fromList [("destination", 1), ("file", 2), ("spans", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData DestinationUses_key where
-  rnf
-    (DestinationUses_key __field__destination __field__file
-       __field__spans)
-    = DeepSeq.rnf __field__destination `Prelude.seq`
-        DeepSeq.rnf __field__file `Prelude.seq`
-          DeepSeq.rnf __field__spans `Prelude.seq` ()
-
-instance Default.Default DestinationUses_key where
-  def = DestinationUses_key Default.def Default.def Default.def
-
-instance Hashable.Hashable DestinationUses_key where
-  hashWithSalt __salt (DestinationUses_key _destination _file _spans)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _destination)
-           _file)
-        _spans
-
-data Dependency = Dependency{dependency_target :: Locator,
-                             dependency_explicit_ :: Prelude.Bool,
-                             dependency_exported :: Prelude.Bool}
-                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Dependency where
-  toJSON
-    (Dependency __field__target __field__explicit_ __field__exported)
-    = Aeson.object
-        ("target" .= __field__target :
-           "explicit_" .= __field__explicit_ :
-             "exported" .= __field__exported : Prelude.mempty)
-
-instance Thrift.ThriftStruct Dependency where
-  buildStruct _proxy
-    (Dependency __field__target __field__explicit_ __field__exported)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__target)
-           :
-           Thrift.genFieldBool _proxy "explicit_" 2 1 __field__explicit_ :
-             Thrift.genFieldBool _proxy "exported" 3 2 __field__exported : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__target <- ST.newSTRef Default.def
-            __field__explicit_ <- ST.newSTRef Prelude.False
-            __field__exported <- ST.newSTRef Prelude.False
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__target
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getBoolType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseBoolF
-                                                                                      _proxy
-                                                                                      _bool)
-                                                                        ST.writeSTRef
-                                                                          __field__explicit_
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getBoolType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseBoolF
-                                                                                      _proxy
-                                                                                      _bool)
-                                                                        ST.writeSTRef
-                                                                          __field__exported
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__target <- ST.readSTRef
-                                                                 __field__target
-                                             !__val__explicit_ <- ST.readSTRef __field__explicit_
-                                             !__val__exported <- ST.readSTRef __field__exported
-                                             Prelude.pure
-                                               (Dependency __val__target __val__explicit_
-                                                  __val__exported)
-              _idMap
-                = HashMap.fromList
-                    [("target", 1), ("explicit_", 2), ("exported", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData Dependency where
-  rnf
-    (Dependency __field__target __field__explicit_ __field__exported)
-    = DeepSeq.rnf __field__target `Prelude.seq`
-        DeepSeq.rnf __field__explicit_ `Prelude.seq`
-          DeepSeq.rnf __field__exported `Prelude.seq` ()
-
-instance Default.Default Dependency where
-  def = Dependency Default.def Prelude.False Prelude.False
-
-instance Hashable.Hashable Dependency where
-  hashWithSalt __salt (Dependency _target _explicit_ _exported)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _target)
-           _explicit_)
-        _exported
-
-data TargetDependencies_key = TargetDependencies_key{targetDependencies_key_target
-                                                     :: Target,
-                                                     targetDependencies_key_dependencies ::
-                                                     [Dependency]}
-                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TargetDependencies_key where
-  toJSON
-    (TargetDependencies_key __field__target __field__dependencies)
-    = Aeson.object
-        ("target" .= __field__target :
-           "dependencies" .= __field__dependencies : Prelude.mempty)
-
-instance Thrift.ThriftStruct TargetDependencies_key where
-  buildStruct _proxy
-    (TargetDependencies_key __field__target __field__dependencies)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__target)
-           :
-           Thrift.genField _proxy "dependencies" (Thrift.getListType _proxy) 2
-             1
-             (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                (Thrift.buildStruct _proxy)
-                __field__dependencies)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__target <- ST.newSTRef Default.def
-            __field__dependencies <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__target
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__dependencies
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__target <- ST.readSTRef
-                                                                 __field__target
-                                             !__val__dependencies <- ST.readSTRef
-                                                                       __field__dependencies
-                                             Prelude.pure
-                                               (TargetDependencies_key __val__target
-                                                  __val__dependencies)
-              _idMap = HashMap.fromList [("target", 1), ("dependencies", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData TargetDependencies_key where
-  rnf (TargetDependencies_key __field__target __field__dependencies)
-    = DeepSeq.rnf __field__target `Prelude.seq`
-        DeepSeq.rnf __field__dependencies `Prelude.seq` ()
-
-instance Default.Default TargetDependencies_key where
-  def = TargetDependencies_key Default.def Default.def
-
-instance Hashable.Hashable TargetDependencies_key where
-  hashWithSalt __salt (TargetDependencies_key _target _dependencies)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _target)
-        _dependencies
-
-data DefinitionLocation_key = DefinitionLocation_key{definitionLocation_key_definition
-                                                     :: Definition,
-                                                     definitionLocation_key_file ::
-                                                     Glean.Schema.Src.File,
-                                                     definitionLocation_key_span ::
-                                                     Glean.Schema.Src.ByteSpan}
-                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON DefinitionLocation_key where
-  toJSON
-    (DefinitionLocation_key __field__definition __field__file
-       __field__span)
-    = Aeson.object
-        ("definition" .= __field__definition :
-           "file" .= __field__file : "span" .= __field__span : Prelude.mempty)
-
-instance Thrift.ThriftStruct DefinitionLocation_key where
-  buildStruct _proxy
-    (DefinitionLocation_key __field__definition __field__file
-       __field__span)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "definition" (Thrift.getStructType _proxy)
-           1
-           0
-           (Thrift.buildStruct _proxy __field__definition)
-           :
-           Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__file)
-             :
-             Thrift.genField _proxy "span" (Thrift.getStructType _proxy) 3 2
-               (Thrift.buildStruct _proxy __field__span)
-               : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__definition <- ST.newSTRef Default.def
-            __field__file <- ST.newSTRef Default.def
-            __field__span <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__definition
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__file
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__span
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__definition <- ST.readSTRef
-                                                                     __field__definition
-                                             !__val__file <- ST.readSTRef __field__file
-                                             !__val__span <- ST.readSTRef __field__span
-                                             Prelude.pure
-                                               (DefinitionLocation_key __val__definition __val__file
-                                                  __val__span)
-              _idMap
-                = HashMap.fromList [("definition", 1), ("file", 2), ("span", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData DefinitionLocation_key where
-  rnf
-    (DefinitionLocation_key __field__definition __field__file
-       __field__span)
-    = DeepSeq.rnf __field__definition `Prelude.seq`
-        DeepSeq.rnf __field__file `Prelude.seq`
-          DeepSeq.rnf __field__span `Prelude.seq` ()
-
-instance Default.Default DefinitionLocation_key where
-  def = DefinitionLocation_key Default.def Default.def Default.def
-
-instance Hashable.Hashable DefinitionLocation_key where
-  hashWithSalt __salt
-    (DefinitionLocation_key _definition _file _span)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _definition)
-           _file)
-        _span
-
-data Definition_key = Definition_key{definition_key_module ::
-                                     Glean.Schema.Src.File,
-                                     definition_key_name :: Text.Text}
-                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Definition_key where
-  toJSON (Definition_key __field__module __field__name)
-    = Aeson.object
-        ("module" .= __field__module :
-           "name" .= __field__name : Prelude.mempty)
-
-instance Thrift.ThriftStruct Definition_key where
-  buildStruct _proxy (Definition_key __field__module __field__name)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "module" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__module)
-           :
-           Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 2 1
-             (Thrift.genText _proxy __field__name)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__module <- ST.newSTRef Default.def
-            __field__name <- ST.newSTRef ""
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__module
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__module <- ST.readSTRef
-                                                                 __field__module
-                                             !__val__name <- ST.readSTRef __field__name
-                                             Prelude.pure (Definition_key __val__module __val__name)
-              _idMap = HashMap.fromList [("module", 1), ("name", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData Definition_key where
-  rnf (Definition_key __field__module __field__name)
-    = DeepSeq.rnf __field__module `Prelude.seq`
-        DeepSeq.rnf __field__name `Prelude.seq` ()
-
-instance Default.Default Definition_key where
-  def = Definition_key Default.def ""
-
-instance Hashable.Hashable Definition_key where
-  hashWithSalt __salt (Definition_key _module _name)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _module)
-        _name
-
-data Consumer_key = Consumer_key{consumer_key_source ::
-                                 Glean.Schema.Src.File,
-                                 consumer_key_consumer :: TargetSources}
-                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Consumer_key where
-  toJSON (Consumer_key __field__source __field__consumer)
-    = Aeson.object
-        ("source" .= __field__source :
-           "consumer" .= __field__consumer : Prelude.mempty)
-
-instance Thrift.ThriftStruct Consumer_key where
-  buildStruct _proxy (Consumer_key __field__source __field__consumer)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "source" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__source)
-           :
-           Thrift.genField _proxy "consumer" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__consumer)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__source <- ST.newSTRef Default.def
-            __field__consumer <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__source
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__consumer
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__source <- ST.readSTRef
-                                                                 __field__source
-                                             !__val__consumer <- ST.readSTRef __field__consumer
-                                             Prelude.pure
-                                               (Consumer_key __val__source __val__consumer)
-              _idMap = HashMap.fromList [("source", 1), ("consumer", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData Consumer_key where
-  rnf (Consumer_key __field__source __field__consumer)
-    = DeepSeq.rnf __field__source `Prelude.seq`
-        DeepSeq.rnf __field__consumer `Prelude.seq` ()
-
-instance Default.Default Consumer_key where
-  def = Consumer_key Default.def Default.def
-
-instance Hashable.Hashable Consumer_key where
-  hashWithSalt __salt (Consumer_key _source _consumer)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _source)
-        _consumer
-
-data CallName = CallName_prim Text.Text
-              | CallName_definition Definition
-              | CallName_EMPTY
-                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON CallName where
-  toJSON (CallName_prim __prim) = Aeson.object ["prim" .= __prim]
-  toJSON (CallName_definition __definition)
-    = Aeson.object ["definition" .= __definition]
-  toJSON CallName_EMPTY = Aeson.object []
-
-instance Thrift.ThriftStruct CallName where
-  buildStruct _proxy (CallName_prim __prim)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "prim" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __prim)]
-  buildStruct _proxy (CallName_definition __definition)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "definition" (Thrift.getStructType _proxy)
-           2
-           0
-           (Thrift.buildStruct _proxy __definition)]
-  buildStruct _proxy CallName_EMPTY = Thrift.genStruct _proxy []
-  parseStruct _proxy
-    = do _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap
-         case _fieldBegin of
-           Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                     1 | _type == Thrift.getStringType _proxy ->
-                                                         do _val <- Thrift.parseText _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return (CallName_prim _val)
-                                                     2 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return
-                                                              (CallName_definition _val)
-                                                     _ -> do Thrift.parseSkip _proxy _type
-                                                               Prelude.Nothing
-                                                             Thrift.parseStop _proxy
-                                                             Prelude.return CallName_EMPTY
-           Thrift.FieldEnd -> Prelude.return CallName_EMPTY
-    where
-      _idMap = HashMap.fromList [("prim", 1), ("definition", 2)]
-
-instance DeepSeq.NFData CallName where
-  rnf (CallName_prim __prim) = DeepSeq.rnf __prim
-  rnf (CallName_definition __definition) = DeepSeq.rnf __definition
-  rnf CallName_EMPTY = ()
-
-instance Default.Default CallName where
-  def = CallName_EMPTY
-
-instance Hashable.Hashable CallName where
-  hashWithSalt __salt (CallName_prim _prim)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 1 _prim)
-  hashWithSalt __salt (CallName_definition _definition)
-    = Hashable.hashWithSalt __salt
-        (Hashable.hashWithSalt 2 _definition)
-  hashWithSalt __salt CallName_EMPTY
-    = Hashable.hashWithSalt __salt (0 :: Prelude.Int)
-
-data CallExpr_accessor_ = CallExpr_accessor_{callExpr_accessor__name
-                                             :: CallExpr,
-                                             callExpr_accessor__field :: Text.Text}
-                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON CallExpr_accessor_ where
-  toJSON (CallExpr_accessor_ __field__name __field__field)
-    = Aeson.object
-        ("name" .= __field__name :
-           "field" .= __field__field : Prelude.mempty)
-
-instance Thrift.ThriftStruct CallExpr_accessor_ where
-  buildStruct _proxy
-    (CallExpr_accessor_ __field__name __field__field)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__name)
-           :
-           Thrift.genField _proxy "field" (Thrift.getStringType _proxy) 2 1
-             (Thrift.genText _proxy __field__field)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef Default.def
-            __field__field <- ST.newSTRef ""
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__field
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__field <- ST.readSTRef __field__field
-                                             Prelude.pure
-                                               (CallExpr_accessor_ __val__name __val__field)
-              _idMap = HashMap.fromList [("name", 1), ("field", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData CallExpr_accessor_ where
-  rnf (CallExpr_accessor_ __field__name __field__field)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__field `Prelude.seq` ()
-
-instance Default.Default CallExpr_accessor_ where
-  def = CallExpr_accessor_ Default.def ""
-
-instance Hashable.Hashable CallExpr_accessor_ where
-  hashWithSalt __salt (CallExpr_accessor_ _name _field)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _field
-
-data CallExpr_key = CallExpr_key_name CallName
-                  | CallExpr_key_accessor CallExpr_accessor_
-                  | CallExpr_key_EMPTY
-                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON CallExpr_key where
-  toJSON (CallExpr_key_name __name) = Aeson.object ["name" .= __name]
-  toJSON (CallExpr_key_accessor __accessor)
-    = Aeson.object ["accessor" .= __accessor]
-  toJSON CallExpr_key_EMPTY = Aeson.object []
-
-instance Thrift.ThriftStruct CallExpr_key where
-  buildStruct _proxy (CallExpr_key_name __name)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __name)]
-  buildStruct _proxy (CallExpr_key_accessor __accessor)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "accessor" (Thrift.getStructType _proxy) 2
-           0
-           (Thrift.buildStruct _proxy __accessor)]
-  buildStruct _proxy CallExpr_key_EMPTY = Thrift.genStruct _proxy []
-  parseStruct _proxy
-    = do _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap
-         case _fieldBegin of
-           Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                     1 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return (CallExpr_key_name _val)
-                                                     2 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return
-                                                              (CallExpr_key_accessor _val)
-                                                     _ -> do Thrift.parseSkip _proxy _type
-                                                               Prelude.Nothing
-                                                             Thrift.parseStop _proxy
-                                                             Prelude.return CallExpr_key_EMPTY
-           Thrift.FieldEnd -> Prelude.return CallExpr_key_EMPTY
-    where
-      _idMap = HashMap.fromList [("name", 1), ("accessor", 2)]
-
-instance DeepSeq.NFData CallExpr_key where
-  rnf (CallExpr_key_name __name) = DeepSeq.rnf __name
-  rnf (CallExpr_key_accessor __accessor) = DeepSeq.rnf __accessor
-  rnf CallExpr_key_EMPTY = ()
-
-instance Default.Default CallExpr_key where
-  def = CallExpr_key_EMPTY
-
-instance Hashable.Hashable CallExpr_key where
-  hashWithSalt __salt (CallExpr_key_name _name)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 1 _name)
-  hashWithSalt __salt (CallExpr_key_accessor _accessor)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 2 _accessor)
-  hashWithSalt __salt CallExpr_key_EMPTY
-    = Hashable.hashWithSalt __salt (0 :: Prelude.Int)
-
-data CallArgument_key = CallArgument_key{callArgument_key_label ::
-                                         Prelude.Maybe Text.Text,
-                                         callArgument_key_value :: ArgumentValue,
-                                         callArgument_key_file :: Glean.Schema.Src.File,
-                                         callArgument_key_span :: Glean.Schema.Src.ByteSpan}
-                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON CallArgument_key where
-  toJSON
-    (CallArgument_key __field__label __field__value __field__file
-       __field__span)
-    = Aeson.object
-        (Prelude.maybe Prelude.id ((:) . ("label" .=)) __field__label
-           ("value" .= __field__value :
-              "file" .= __field__file :
-                "span" .= __field__span : Prelude.mempty))
-
-instance Thrift.ThriftStruct CallArgument_key where
-  buildStruct _proxy
-    (CallArgument_key __field__label __field__value __field__file
-       __field__span)
-    = Thrift.genStruct _proxy
-        (let (__cereal__label, __id__label)
-               = case __field__label of
-                   Prelude.Just _val -> ((:)
-                                           (Thrift.genField _proxy "label"
-                                              (Thrift.getStringType _proxy)
-                                              1
-                                              0
-                                              (Thrift.genText _proxy _val)),
-                                         1)
-                   Prelude.Nothing -> (Prelude.id, 0)
-           in
-           __cereal__label
-             (Thrift.genField _proxy "value" (Thrift.getStructType _proxy) 2
-                __id__label
-                (Thrift.buildStruct _proxy __field__value)
-                :
-                Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 3 2
-                  (Thrift.buildStruct _proxy __field__file)
-                  :
-                  Thrift.genField _proxy "span" (Thrift.getStructType _proxy) 4 3
-                    (Thrift.buildStruct _proxy __field__span)
-                    : []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__label <- ST.newSTRef Prelude.Nothing
-            __field__value <- ST.newSTRef Default.def
-            __field__file <- ST.newSTRef Default.def
-            __field__span <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__label
-                                                                          (Prelude.Just _val)
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__value
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__file
-                                                                          _val
-                                                                 4 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__span
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__label <- ST.readSTRef __field__label
-                                             !__val__value <- ST.readSTRef __field__value
-                                             !__val__file <- ST.readSTRef __field__file
-                                             !__val__span <- ST.readSTRef __field__span
-                                             Prelude.pure
-                                               (CallArgument_key __val__label __val__value
-                                                  __val__file
-                                                  __val__span)
-              _idMap
-                = HashMap.fromList
-                    [("label", 1), ("value", 2), ("file", 3), ("span", 4)]
-            _parse 0)
-
-instance DeepSeq.NFData CallArgument_key where
-  rnf
-    (CallArgument_key __field__label __field__value __field__file
-       __field__span)
-    = DeepSeq.rnf __field__label `Prelude.seq`
-        DeepSeq.rnf __field__value `Prelude.seq`
-          DeepSeq.rnf __field__file `Prelude.seq`
-            DeepSeq.rnf __field__span `Prelude.seq` ()
-
-instance Default.Default CallArgument_key where
-  def
-    = CallArgument_key Prelude.Nothing Default.def Default.def
-        Default.def
-
-instance Hashable.Hashable CallArgument_key where
-  hashWithSalt __salt (CallArgument_key _label _value _file _span)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _label)
-              _value)
-           _file)
-        _span
-
-data AttributeMapping = AttributeMapping{attributeMapping_key ::
-                                         Text.Text,
-                                         attributeMapping_value :: AttributeValue}
-                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON AttributeMapping where
-  toJSON (AttributeMapping __field__key __field__value)
-    = Aeson.object
-        ("key" .= __field__key :
-           "value" .= __field__value : Prelude.mempty)
-
-instance Thrift.ThriftStruct AttributeMapping where
-  buildStruct _proxy (AttributeMapping __field__key __field__value)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "key" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__key)
-           :
-           Thrift.genField _proxy "value" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__value)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__key <- ST.newSTRef ""
-            __field__value <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__value
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__key <- ST.readSTRef __field__key
-                                             !__val__value <- ST.readSTRef __field__value
-                                             Prelude.pure (AttributeMapping __val__key __val__value)
-              _idMap = HashMap.fromList [("key", 1), ("value", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData AttributeMapping where
-  rnf (AttributeMapping __field__key __field__value)
-    = DeepSeq.rnf __field__key `Prelude.seq`
-        DeepSeq.rnf __field__value `Prelude.seq` ()
-
-instance Default.Default AttributeMapping where
-  def = AttributeMapping "" Default.def
-
-instance Hashable.Hashable AttributeMapping where
-  hashWithSalt __salt (AttributeMapping _key _value)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _key) _value
-
-data AttributeValue_key = AttributeValue_key_str Text.Text
-                        | AttributeValue_key_sequence [AttributeValue]
-                        | AttributeValue_key_mapping [AttributeMapping]
-                        | AttributeValue_key_EMPTY
-                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON AttributeValue_key where
-  toJSON (AttributeValue_key_str __str)
-    = Aeson.object ["str" .= __str]
-  toJSON (AttributeValue_key_sequence __sequence)
-    = Aeson.object ["sequence" .= __sequence]
-  toJSON (AttributeValue_key_mapping __mapping)
-    = Aeson.object ["mapping" .= __mapping]
-  toJSON AttributeValue_key_EMPTY = Aeson.object []
-
-instance Thrift.ThriftStruct AttributeValue_key where
-  buildStruct _proxy (AttributeValue_key_str __str)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "str" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __str)]
-  buildStruct _proxy (AttributeValue_key_sequence __sequence)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "sequence" (Thrift.getListType _proxy) 2 0
-           (Thrift.genList _proxy (Thrift.getStructType _proxy)
-              (Thrift.buildStruct _proxy)
-              __sequence)]
-  buildStruct _proxy (AttributeValue_key_mapping __mapping)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "mapping" (Thrift.getListType _proxy) 3 0
-           (Thrift.genList _proxy (Thrift.getStructType _proxy)
-              (Thrift.buildStruct _proxy)
-              __mapping)]
-  buildStruct _proxy AttributeValue_key_EMPTY
-    = Thrift.genStruct _proxy []
-  parseStruct _proxy
-    = do _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap
-         case _fieldBegin of
-           Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                     1 | _type == Thrift.getStringType _proxy ->
-                                                         do _val <- Thrift.parseText _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return
-                                                              (AttributeValue_key_str _val)
-                                                     2 | _type == Thrift.getListType _proxy ->
-                                                         do _val <- Prelude.snd <$>
-                                                                      Thrift.parseList _proxy
-                                                                        (Thrift.parseStruct _proxy)
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return
-                                                              (AttributeValue_key_sequence _val)
-                                                     3 | _type == Thrift.getListType _proxy ->
-                                                         do _val <- Prelude.snd <$>
-                                                                      Thrift.parseList _proxy
-                                                                        (Thrift.parseStruct _proxy)
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return
-                                                              (AttributeValue_key_mapping _val)
-                                                     _ -> do Thrift.parseSkip _proxy _type
-                                                               Prelude.Nothing
-                                                             Thrift.parseStop _proxy
-                                                             Prelude.return AttributeValue_key_EMPTY
-           Thrift.FieldEnd -> Prelude.return AttributeValue_key_EMPTY
-    where
-      _idMap
-        = HashMap.fromList [("str", 1), ("sequence", 2), ("mapping", 3)]
-
-instance DeepSeq.NFData AttributeValue_key where
-  rnf (AttributeValue_key_str __str) = DeepSeq.rnf __str
-  rnf (AttributeValue_key_sequence __sequence)
-    = DeepSeq.rnf __sequence
-  rnf (AttributeValue_key_mapping __mapping) = DeepSeq.rnf __mapping
-  rnf AttributeValue_key_EMPTY = ()
-
-instance Default.Default AttributeValue_key where
-  def = AttributeValue_key_EMPTY
-
-instance Hashable.Hashable AttributeValue_key where
-  hashWithSalt __salt (AttributeValue_key_str _str)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 1 _str)
-  hashWithSalt __salt (AttributeValue_key_sequence _sequence)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 2 _sequence)
-  hashWithSalt __salt (AttributeValue_key_mapping _mapping)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 3 _mapping)
-  hashWithSalt __salt AttributeValue_key_EMPTY
-    = Hashable.hashWithSalt __salt (0 :: Prelude.Int)
-
-data ArgumentMapping = ArgumentMapping{argumentMapping_key ::
-                                       Text.Text,
-                                       argumentMapping_value :: ArgumentValue}
-                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ArgumentMapping where
-  toJSON (ArgumentMapping __field__key __field__value)
-    = Aeson.object
-        ("key" .= __field__key :
-           "value" .= __field__value : Prelude.mempty)
-
-instance Thrift.ThriftStruct ArgumentMapping where
-  buildStruct _proxy (ArgumentMapping __field__key __field__value)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "key" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__key)
-           :
-           Thrift.genField _proxy "value" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__value)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__key <- ST.newSTRef ""
-            __field__value <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__value
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__key <- ST.readSTRef __field__key
-                                             !__val__value <- ST.readSTRef __field__value
-                                             Prelude.pure (ArgumentMapping __val__key __val__value)
-              _idMap = HashMap.fromList [("key", 1), ("value", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData ArgumentMapping where
-  rnf (ArgumentMapping __field__key __field__value)
-    = DeepSeq.rnf __field__key `Prelude.seq`
-        DeepSeq.rnf __field__value `Prelude.seq` ()
-
-instance Default.Default ArgumentMapping where
-  def = ArgumentMapping "" Default.def
-
-instance Hashable.Hashable ArgumentMapping where
-  hashWithSalt __salt (ArgumentMapping _key _value)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _key) _value
-
-data ArgumentValue_key = ArgumentValue_key_lit Text.Text
-                       | ArgumentValue_key_sequence [ArgumentValue]
-                       | ArgumentValue_key_mapping [ArgumentMapping]
-                       | ArgumentValue_key_EMPTY
-                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ArgumentValue_key where
-  toJSON (ArgumentValue_key_lit __lit)
-    = Aeson.object ["lit" .= __lit]
-  toJSON (ArgumentValue_key_sequence __sequence)
-    = Aeson.object ["sequence" .= __sequence]
-  toJSON (ArgumentValue_key_mapping __mapping)
-    = Aeson.object ["mapping" .= __mapping]
-  toJSON ArgumentValue_key_EMPTY = Aeson.object []
-
-instance Thrift.ThriftStruct ArgumentValue_key where
-  buildStruct _proxy (ArgumentValue_key_lit __lit)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "lit" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __lit)]
-  buildStruct _proxy (ArgumentValue_key_sequence __sequence)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "sequence" (Thrift.getListType _proxy) 2 0
-           (Thrift.genList _proxy (Thrift.getStructType _proxy)
-              (Thrift.buildStruct _proxy)
-              __sequence)]
-  buildStruct _proxy (ArgumentValue_key_mapping __mapping)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "mapping" (Thrift.getListType _proxy) 3 0
-           (Thrift.genList _proxy (Thrift.getStructType _proxy)
-              (Thrift.buildStruct _proxy)
-              __mapping)]
-  buildStruct _proxy ArgumentValue_key_EMPTY
-    = Thrift.genStruct _proxy []
-  parseStruct _proxy
-    = do _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap
-         case _fieldBegin of
-           Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                     1 | _type == Thrift.getStringType _proxy ->
-                                                         do _val <- Thrift.parseText _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return
-                                                              (ArgumentValue_key_lit _val)
-                                                     2 | _type == Thrift.getListType _proxy ->
-                                                         do _val <- Prelude.snd <$>
-                                                                      Thrift.parseList _proxy
-                                                                        (Thrift.parseStruct _proxy)
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return
-                                                              (ArgumentValue_key_sequence _val)
-                                                     3 | _type == Thrift.getListType _proxy ->
-                                                         do _val <- Prelude.snd <$>
-                                                                      Thrift.parseList _proxy
-                                                                        (Thrift.parseStruct _proxy)
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return
-                                                              (ArgumentValue_key_mapping _val)
-                                                     _ -> do Thrift.parseSkip _proxy _type
-                                                               Prelude.Nothing
-                                                             Thrift.parseStop _proxy
-                                                             Prelude.return ArgumentValue_key_EMPTY
-           Thrift.FieldEnd -> Prelude.return ArgumentValue_key_EMPTY
-    where
-      _idMap
-        = HashMap.fromList [("lit", 1), ("sequence", 2), ("mapping", 3)]
-
-instance DeepSeq.NFData ArgumentValue_key where
-  rnf (ArgumentValue_key_lit __lit) = DeepSeq.rnf __lit
-  rnf (ArgumentValue_key_sequence __sequence)
-    = DeepSeq.rnf __sequence
-  rnf (ArgumentValue_key_mapping __mapping) = DeepSeq.rnf __mapping
-  rnf ArgumentValue_key_EMPTY = ()
-
-instance Default.Default ArgumentValue_key where
-  def = ArgumentValue_key_EMPTY
-
-instance Hashable.Hashable ArgumentValue_key where
-  hashWithSalt __salt (ArgumentValue_key_lit _lit)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 1 _lit)
-  hashWithSalt __salt (ArgumentValue_key_sequence _sequence)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 2 _sequence)
-  hashWithSalt __salt (ArgumentValue_key_mapping _mapping)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 3 _mapping)
-  hashWithSalt __salt ArgumentValue_key_EMPTY
-    = Hashable.hashWithSalt __salt (0 :: Prelude.Int)
-{-# LINE 18 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.CallArgument_key where
-  buildRtsValue b
-    (Glean.Schema.Buck.Types.CallArgument_key x1 x2 x3 x4)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-  decodeRtsValue
-    = Glean.Schema.Buck.Types.CallArgument_key <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.CallArgument_key" (Prelude.Just 0))
-{-# LINE 31 "glean/schema/thrift/buck_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Buck.Types.CallArgument_key =
-     'Angle.TField "label" (Prelude.Maybe Data.Text.Text)
-       ('Angle.TField "value"
-          (Glean.KeyType Glean.Schema.Buck.Types.ArgumentValue)
-          ('Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
-             ('Angle.TField "span" (Glean.Schema.Src.Types.ByteSpan)
-                ('Angle.TNoFields))))
-{-# LINE 33 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.CallArgument where
-  type KeyType Glean.Schema.Buck.Types.CallArgument =
-       Glean.Schema.Buck.Types.CallArgument_key
-  getName _proxy = Glean.PredicateRef "buck.CallArgument" 4
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.callArgument_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.CallArgument x k
-  getFactKey = Glean.Schema.Buck.Types.callArgument_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 42 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.CallArgument where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 48 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.RuleKey_key where
-  buildRtsValue b (Glean.Schema.Buck.Types.RuleKey_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Buck.Types.RuleKey_key <$> Glean.decodeRtsValue <*>
-        Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.RuleKey_key" (Prelude.Just 0))
-{-# LINE 57 "glean/schema/thrift/buck_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Buck.Types.RuleKey_key =
-     'Angle.TField "locator"
-       (Glean.KeyType Glean.Schema.Buck.Types.Locator)
-       ('Angle.TField "ruleKey" (Data.Text.Text) ('Angle.TNoFields))
-{-# LINE 59 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.RuleKey where
-  type KeyType Glean.Schema.Buck.Types.RuleKey =
-       Glean.Schema.Buck.Types.RuleKey_key
-  getName _proxy = Glean.PredicateRef "buck.RuleKey" 4
-  getId = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.ruleKey_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.RuleKey x k
-  getFactKey = Glean.Schema.Buck.Types.ruleKey_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 68 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.RuleKey where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 74 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.Label where
-  type KeyType Glean.Schema.Buck.Types.Label = Data.Text.Text
-  getName _proxy = Glean.PredicateRef "buck.Label" 4
-  getId = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.label_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.Label x k
-  getFactKey = Glean.Schema.Buck.Types.label_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 82 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.Label where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 88 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.SearchByLocalName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Buck.Types.SearchByLocalName_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Buck.Types.SearchByLocalName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.SearchByLocalName_key" (Prelude.Just 0))
-{-# LINE 97 "glean/schema/thrift/buck_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Buck.Types.SearchByLocalName_key =
-     'Angle.TField "name"
-       (Glean.KeyType Glean.Schema.Buck.Types.LocalName)
-       ('Angle.TField "decl" (Glean.Schema.Buck.Types.XRefDestination)
-          ('Angle.TNoFields))
-{-# LINE 99 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.SearchByLocalName
-         where
-  type KeyType Glean.Schema.Buck.Types.SearchByLocalName =
-       Glean.Schema.Buck.Types.SearchByLocalName_key
-  getName _proxy = Glean.PredicateRef "buck.SearchByLocalName" 4
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Buck.Types.searchByLocalName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.SearchByLocalName x k
-  getFactKey = Glean.Schema.Buck.Types.searchByLocalName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 108 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.SearchByLocalName where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 114 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.TargetIndexerName
-         where
-  type KeyType Glean.Schema.Buck.Types.TargetIndexerName =
-       Data.Text.Text
-  getName _proxy = Glean.PredicateRef "buck.TargetIndexerName" 4
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Buck.Types.targetIndexerName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.TargetIndexerName x k
-  getFactKey = Glean.Schema.Buck.Types.targetIndexerName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 122 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.TargetIndexerName where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 128 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Buck.Types.TargetCallByCallExpr_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Buck.Types.TargetCallByCallExpr_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Buck.Types.TargetCallByCallExpr_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.TargetCallByCallExpr_key" (Prelude.Just 0))
-{-# LINE 137 "glean/schema/thrift/buck_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Buck.Types.TargetCallByCallExpr_key
-     =
-     'Angle.TField "callExpr"
-       (Glean.KeyType Glean.Schema.Buck.Types.CallExpr)
-       ('Angle.TField "target"
-          (Glean.KeyType Glean.Schema.Buck.Types.TargetCall)
-          ('Angle.TNoFields))
-{-# LINE 139 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Buck.Types.TargetCallByCallExpr
-         where
-  type KeyType Glean.Schema.Buck.Types.TargetCallByCallExpr =
-       Glean.Schema.Buck.Types.TargetCallByCallExpr_key
-  getName _proxy = Glean.PredicateRef "buck.TargetCallByCallExpr" 4
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Buck.Types.targetCallByCallExpr_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.TargetCallByCallExpr x k
-  getFactKey = Glean.Schema.Buck.Types.targetCallByCallExpr_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 148 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.TargetCallByCallExpr
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 154 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.OutsTarget_key where
-  buildRtsValue b (Glean.Schema.Buck.Types.OutsTarget_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Buck.Types.OutsTarget_key <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.OutsTarget_key" (Prelude.Just 0))
-{-# LINE 165 "glean/schema/thrift/buck_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Buck.Types.OutsTarget_key =
-     'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
-       ('Angle.TField "target"
-          (Glean.KeyType Glean.Schema.Buck.Types.Target)
-          ('Angle.TField "outputLabel"
-             (Prelude.Maybe Glean.Schema.Buck.Types.OutputLabel)
-             ('Angle.TNoFields)))
-{-# LINE 167 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.OutsTarget where
-  type KeyType Glean.Schema.Buck.Types.OutsTarget =
-       Glean.Schema.Buck.Types.OutsTarget_key
-  getName _proxy = Glean.PredicateRef "buck.OutsTarget" 4
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.outsTarget_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.OutsTarget x k
-  getFactKey = Glean.Schema.Buck.Types.outsTarget_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 176 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.OutsTarget where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 182 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.LocalNameLowerCase_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Buck.Types.LocalNameLowerCase_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Buck.Types.LocalNameLowerCase_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.LocalNameLowerCase_key" (Prelude.Just 0))
-{-# LINE 191 "glean/schema/thrift/buck_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Buck.Types.LocalNameLowerCase_key =
-     'Angle.TField "lowercase" (Data.Text.Text)
-       ('Angle.TField "name"
-          (Glean.KeyType Glean.Schema.Buck.Types.LocalName)
-          ('Angle.TNoFields))
-{-# LINE 193 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.LocalNameLowerCase
-         where
-  type KeyType Glean.Schema.Buck.Types.LocalNameLowerCase =
-       Glean.Schema.Buck.Types.LocalNameLowerCase_key
-  getName _proxy = Glean.PredicateRef "buck.LocalNameLowerCase" 4
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Buck.Types.localNameLowerCase_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.LocalNameLowerCase x k
-  getFactKey = Glean.Schema.Buck.Types.localNameLowerCase_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 202 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.LocalNameLowerCase
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 208 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.LocalName where
-  type KeyType Glean.Schema.Buck.Types.LocalName = Data.Text.Text
-  getName _proxy = Glean.PredicateRef "buck.LocalName" 4
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.localName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.LocalName x k
-  getFactKey = Glean.Schema.Buck.Types.localName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 216 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.LocalName where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 222 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.FileTarget_key where
-  buildRtsValue b (Glean.Schema.Buck.Types.FileTarget_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Buck.Types.FileTarget_key <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.FileTarget_key" (Prelude.Just 0))
-{-# LINE 231 "glean/schema/thrift/buck_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Buck.Types.FileTarget_key =
-     'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
-       ('Angle.TField "locator"
-          (Glean.KeyType Glean.Schema.Buck.Types.Locator)
-          ('Angle.TNoFields))
-{-# LINE 233 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.FileTarget where
-  type KeyType Glean.Schema.Buck.Types.FileTarget =
-       Glean.Schema.Buck.Types.FileTarget_key
-  getName _proxy = Glean.PredicateRef "buck.FileTarget" 4
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.fileTarget_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.FileTarget x k
-  getFactKey = Glean.Schema.Buck.Types.fileTarget_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 242 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.FileTarget where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 248 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.Labels where
-  type KeyType Glean.Schema.Buck.Types.Labels =
-       [Glean.Schema.Buck.Types.Label]
-  getName _proxy = Glean.PredicateRef "buck.Labels" 4
-  getId = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.labels_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.Labels x k
-  getFactKey = Glean.Schema.Buck.Types.labels_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 257 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.Labels where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 263 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.TargetLocation_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Buck.Types.TargetLocation_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Buck.Types.TargetLocation_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.TargetLocation_key" (Prelude.Just 0))
-{-# LINE 274 "glean/schema/thrift/buck_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Buck.Types.TargetLocation_key =
-     'Angle.TField "locator"
-       (Glean.KeyType Glean.Schema.Buck.Types.Locator)
-       ('Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
-          ('Angle.TField "span" (Glean.Schema.Src.Types.ByteSpan)
-             ('Angle.TNoFields)))
-{-# LINE 276 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.TargetLocation
-         where
-  type KeyType Glean.Schema.Buck.Types.TargetLocation =
-       Glean.Schema.Buck.Types.TargetLocation_key
-  getName _proxy = Glean.PredicateRef "buck.TargetLocation" 4
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Buck.Types.targetLocation_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.TargetLocation x k
-  getFactKey = Glean.Schema.Buck.Types.targetLocation_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 285 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.TargetLocation where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 291 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.FileDefinition_key
-         where
-  buildRtsValue b (Glean.Schema.Buck.Types.FileDefinition_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Buck.Types.FileDefinition_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.FileDefinition_key" (Prelude.Just 0))
-{-# LINE 300 "glean/schema/thrift/buck_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Buck.Types.FileDefinition_key =
-     'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
-       ('Angle.TField "definition"
-          (Glean.KeyType Glean.Schema.Buck.Types.Definition)
-          ('Angle.TNoFields))
-{-# LINE 302 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.FileDefinition
-         where
-  type KeyType Glean.Schema.Buck.Types.FileDefinition =
-       Glean.Schema.Buck.Types.FileDefinition_key
-  getName _proxy = Glean.PredicateRef "buck.FileDefinition" 4
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Buck.Types.fileDefinition_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.FileDefinition x k
-  getFactKey = Glean.Schema.Buck.Types.fileDefinition_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 311 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.FileDefinition where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 317 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.LocatorReverseDep_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Buck.Types.LocatorReverseDep_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Buck.Types.LocatorReverseDep_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.LocatorReverseDep_key" (Prelude.Just 0))
-{-# LINE 326 "glean/schema/thrift/buck_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Buck.Types.LocatorReverseDep_key =
-     'Angle.TField "locator"
-       (Glean.KeyType Glean.Schema.Buck.Types.Locator)
-       ('Angle.TField "rdep"
-          (Glean.KeyType Glean.Schema.Buck.Types.Locator)
-          ('Angle.TNoFields))
-{-# LINE 328 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.LocatorReverseDep
-         where
-  type KeyType Glean.Schema.Buck.Types.LocatorReverseDep =
-       Glean.Schema.Buck.Types.LocatorReverseDep_key
-  getName _proxy = Glean.PredicateRef "buck.LocatorReverseDep" 4
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Buck.Types.locatorReverseDep_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.LocatorReverseDep x k
-  getFactKey = Glean.Schema.Buck.Types.locatorReverseDep_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 337 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.LocatorReverseDep where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 343 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.FileEntity_key where
-  buildRtsValue b (Glean.Schema.Buck.Types.FileEntity_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Buck.Types.FileEntity_key <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.FileEntity_key" (Prelude.Just 0))
-{-# LINE 352 "glean/schema/thrift/buck_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Buck.Types.FileEntity_key =
-     'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
-       ('Angle.TField "entity" (Glean.Schema.Buck.Types.XRefDestination)
-          ('Angle.TNoFields))
-{-# LINE 354 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.FileEntity where
-  type KeyType Glean.Schema.Buck.Types.FileEntity =
-       Glean.Schema.Buck.Types.FileEntity_key
-  getName _proxy = Glean.PredicateRef "buck.FileEntity" 4
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.fileEntity_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.FileEntity x k
-  getFactKey = Glean.Schema.Buck.Types.fileEntity_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 363 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.FileEntity where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 369 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.Locator_key where
-  buildRtsValue b (Glean.Schema.Buck.Types.Locator_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Buck.Types.Locator_key <$> Glean.decodeRtsValue <*>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.Locator_key" (Prelude.Just 0))
-{-# LINE 380 "glean/schema/thrift/buck_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Buck.Types.Locator_key =
-     'Angle.TField "subdir" (Prelude.Maybe Data.Text.Text)
-       ('Angle.TField "path" (Data.Text.Text)
-          ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields)))
-{-# LINE 382 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.Locator where
-  type KeyType Glean.Schema.Buck.Types.Locator =
-       Glean.Schema.Buck.Types.Locator_key
-  getName _proxy = Glean.PredicateRef "buck.Locator" 4
-  getId = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.locator_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.Locator x k
-  getFactKey = Glean.Schema.Buck.Types.locator_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 391 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.Locator where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 397 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.DefinitionLocation_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Buck.Types.DefinitionLocation_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Buck.Types.DefinitionLocation_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.DefinitionLocation_key" (Prelude.Just 0))
-{-# LINE 408 "glean/schema/thrift/buck_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Buck.Types.DefinitionLocation_key =
-     'Angle.TField "definition"
-       (Glean.KeyType Glean.Schema.Buck.Types.Definition)
-       ('Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
-          ('Angle.TField "span" (Glean.Schema.Src.Types.ByteSpan)
-             ('Angle.TNoFields)))
-{-# LINE 410 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.DefinitionLocation
-         where
-  type KeyType Glean.Schema.Buck.Types.DefinitionLocation =
-       Glean.Schema.Buck.Types.DefinitionLocation_key
-  getName _proxy = Glean.PredicateRef "buck.DefinitionLocation" 4
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Buck.Types.definitionLocation_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.DefinitionLocation x k
-  getFactKey = Glean.Schema.Buck.Types.definitionLocation_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 419 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.DefinitionLocation
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 425 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.CallExpr_key where
-  buildRtsValue b Glean.Schema.Buck.Types.CallExpr_key_EMPTY
-    = Glean.buildRtsSelector b 2
-  buildRtsValue b (Glean.Schema.Buck.Types.CallExpr_key_name x)
-    = do Glean.buildRtsSelector b 0
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Buck.Types.CallExpr_key_accessor x)
-    = do Glean.buildRtsSelector b 1
-         Glean.buildRtsValue b x
-  decodeRtsValue
-    = Glean.sumD
-        (Prelude.pure Glean.Schema.Buck.Types.CallExpr_key_EMPTY)
-        [Glean.mapD Glean.Schema.Buck.Types.CallExpr_key_name,
-         Glean.mapD Glean.Schema.Buck.Types.CallExpr_key_accessor]
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.CallExpr_key" (Prelude.Just 0))
-{-# LINE 441 "glean/schema/thrift/buck_include.hs" #-}
-type instance Angle.SumFields Glean.Schema.Buck.Types.CallExpr_key
-     =
-     'Angle.TField "name" (Glean.Schema.Buck.Types.CallName)
-       ('Angle.TField "accessor"
-          (Glean.Schema.Buck.Types.CallExpr_accessor_)
-          ('Angle.TNoFields))
-{-# LINE 443 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.CallExpr where
-  type KeyType Glean.Schema.Buck.Types.CallExpr =
-       Glean.Schema.Buck.Types.CallExpr_key
-  getName _proxy = Glean.PredicateRef "buck.CallExpr" 4
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.callExpr_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.CallExpr x k
-  getFactKey = Glean.Schema.Buck.Types.callExpr_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 452 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.CallExpr where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 458 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.TargetIndexer_key where
-  buildRtsValue b (Glean.Schema.Buck.Types.TargetIndexer_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Buck.Types.TargetIndexer_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.TargetIndexer_key" (Prelude.Just 0))
-{-# LINE 467 "glean/schema/thrift/buck_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Buck.Types.TargetIndexer_key =
-     'Angle.TField "name"
-       (Glean.KeyType Glean.Schema.Buck.Types.TargetIndexerName)
-       ('Angle.TField "target"
-          (Glean.KeyType Glean.Schema.Buck.Types.Target)
-          ('Angle.TNoFields))
-{-# LINE 469 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.TargetIndexer
-         where
-  type KeyType Glean.Schema.Buck.Types.TargetIndexer =
-       Glean.Schema.Buck.Types.TargetIndexer_key
-  getName _proxy = Glean.PredicateRef "buck.TargetIndexer" 4
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.targetIndexer_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.TargetIndexer x k
-  getFactKey = Glean.Schema.Buck.Types.targetIndexer_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 478 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.TargetIndexer where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 484 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.TargetUses_key where
-  buildRtsValue b (Glean.Schema.Buck.Types.TargetUses_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Buck.Types.TargetUses_key <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.TargetUses_key" (Prelude.Just 0))
-{-# LINE 495 "glean/schema/thrift/buck_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Buck.Types.TargetUses_key =
-     'Angle.TField "locator"
-       (Glean.KeyType Glean.Schema.Buck.Types.Locator)
-       ('Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
-          ('Angle.TField "spans" ([Glean.Schema.Src.Types.ByteSpan])
-             ('Angle.TNoFields)))
-{-# LINE 497 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.TargetUses where
-  type KeyType Glean.Schema.Buck.Types.TargetUses =
-       Glean.Schema.Buck.Types.TargetUses_key
-  getName _proxy = Glean.PredicateRef "buck.TargetUses" 4
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.targetUses_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.TargetUses x k
-  getFactKey = Glean.Schema.Buck.Types.targetUses_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 506 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.TargetUses where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 512 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.Platform where
-  type KeyType Glean.Schema.Buck.Types.Platform = Data.Text.Text
-  getName _proxy = Glean.PredicateRef "buck.Platform" 4
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.platform_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.Platform x k
-  getFactKey = Glean.Schema.Buck.Types.platform_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 520 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.Platform where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 526 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.Consumer_key where
-  buildRtsValue b (Glean.Schema.Buck.Types.Consumer_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Buck.Types.Consumer_key <$> Glean.decodeRtsValue <*>
-        Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.Consumer_key" (Prelude.Just 0))
-{-# LINE 535 "glean/schema/thrift/buck_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Buck.Types.Consumer_key =
-     'Angle.TField "source" (Glean.KeyType Glean.Schema.Src.Types.File)
-       ('Angle.TField "consumer"
-          (Glean.KeyType Glean.Schema.Buck.Types.TargetSources)
-          ('Angle.TNoFields))
-{-# LINE 537 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.Consumer where
-  type KeyType Glean.Schema.Buck.Types.Consumer =
-       Glean.Schema.Buck.Types.Consumer_key
-  getName _proxy = Glean.PredicateRef "buck.Consumer" 4
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.consumer_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.Consumer x k
-  getFactKey = Glean.Schema.Buck.Types.consumer_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 546 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.Consumer where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 552 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.TargetLinkWhole
-         where
-  type KeyType Glean.Schema.Buck.Types.TargetLinkWhole =
-       Glean.Schema.Buck.Types.Target
-  getName _proxy = Glean.PredicateRef "buck.TargetLinkWhole" 4
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Buck.Types.targetLinkWhole_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.TargetLinkWhole x k
-  getFactKey = Glean.Schema.Buck.Types.targetLinkWhole_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 561 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.TargetLinkWhole where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 567 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.DestinationUses_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Buck.Types.DestinationUses_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Buck.Types.DestinationUses_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.DestinationUses_key" (Prelude.Just 0))
-{-# LINE 578 "glean/schema/thrift/buck_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Buck.Types.DestinationUses_key =
-     'Angle.TField "destination"
-       (Glean.Schema.Buck.Types.XRefDestination)
-       ('Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
-          ('Angle.TField "spans" ([Glean.Schema.Src.Types.ByteSpan])
-             ('Angle.TNoFields)))
-{-# LINE 580 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.DestinationUses
-         where
-  type KeyType Glean.Schema.Buck.Types.DestinationUses =
-       Glean.Schema.Buck.Types.DestinationUses_key
-  getName _proxy = Glean.PredicateRef "buck.DestinationUses" 4
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Buck.Types.destinationUses_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.DestinationUses x k
-  getFactKey = Glean.Schema.Buck.Types.destinationUses_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 589 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.DestinationUses where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 595 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.SourceFileLocation_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Buck.Types.SourceFileLocation_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Buck.Types.SourceFileLocation_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.SourceFileLocation_key" (Prelude.Just 0))
-{-# LINE 604 "glean/schema/thrift/buck_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Buck.Types.SourceFileLocation_key =
-     'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
-       ('Angle.TField "span" (Glean.Schema.Src.Types.ByteSpan)
-          ('Angle.TNoFields))
-{-# LINE 606 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.SourceFileLocation
-         where
-  type KeyType Glean.Schema.Buck.Types.SourceFileLocation =
-       Glean.Schema.Buck.Types.SourceFileLocation_key
-  getName _proxy = Glean.PredicateRef "buck.SourceFileLocation" 4
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Buck.Types.sourceFileLocation_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.SourceFileLocation x k
-  getFactKey = Glean.Schema.Buck.Types.sourceFileLocation_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 615 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.SourceFileLocation
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 621 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Buck.Types.TargetSourcesBaseModule_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Buck.Types.TargetSourcesBaseModule_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Buck.Types.TargetSourcesBaseModule_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.TargetSourcesBaseModule_key"
-           (Prelude.Just 0))
-{-# LINE 632 "glean/schema/thrift/buck_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.Buck.Types.TargetSourcesBaseModule_key
-     =
-     'Angle.TField "locator"
-       (Glean.KeyType Glean.Schema.Buck.Types.Target)
-       ('Angle.TField "srcs" ([Glean.Schema.Buck.Types.File])
-          ('Angle.TField "baseModule"
-             (Prelude.Maybe Glean.Schema.Buck.Types.AttributeValue)
-             ('Angle.TNoFields)))
-{-# LINE 634 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Buck.Types.TargetSourcesBaseModule
-         where
-  type KeyType Glean.Schema.Buck.Types.TargetSourcesBaseModule =
-       Glean.Schema.Buck.Types.TargetSourcesBaseModule_key
-  getName _proxy
-    = Glean.PredicateRef "buck.TargetSourcesBaseModule" 4
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Buck.Types.targetSourcesBaseModule_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.TargetSourcesBaseModule x k
-  getFactKey = Glean.Schema.Buck.Types.targetSourcesBaseModule_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 643 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.TargetSourcesBaseModule
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 649 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.ArgumentValue_key where
-  buildRtsValue b Glean.Schema.Buck.Types.ArgumentValue_key_EMPTY
-    = Glean.buildRtsSelector b 3
-  buildRtsValue b (Glean.Schema.Buck.Types.ArgumentValue_key_lit x)
-    = do Glean.buildRtsSelector b 0
-         Glean.buildRtsValue b x
-  buildRtsValue b
-    (Glean.Schema.Buck.Types.ArgumentValue_key_sequence x)
-    = do Glean.buildRtsSelector b 1
-         Glean.buildRtsValue b x
-  buildRtsValue b
-    (Glean.Schema.Buck.Types.ArgumentValue_key_mapping x)
-    = do Glean.buildRtsSelector b 2
-         Glean.buildRtsValue b x
-  decodeRtsValue
-    = Glean.sumD
-        (Prelude.pure Glean.Schema.Buck.Types.ArgumentValue_key_EMPTY)
-        [Glean.mapD Glean.Schema.Buck.Types.ArgumentValue_key_lit,
-         Glean.mapD Glean.Schema.Buck.Types.ArgumentValue_key_sequence,
-         Glean.mapD Glean.Schema.Buck.Types.ArgumentValue_key_mapping]
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.ArgumentValue_key" (Prelude.Just 0))
-{-# LINE 669 "glean/schema/thrift/buck_include.hs" #-}
-type instance
-     Angle.SumFields Glean.Schema.Buck.Types.ArgumentValue_key =
-     'Angle.TField "lit" (Data.Text.Text)
-       ('Angle.TField "sequence" ([Glean.Schema.Buck.Types.ArgumentValue])
-          ('Angle.TField "mapping"
-             ([Glean.Schema.Buck.Types.ArgumentMapping])
-             ('Angle.TNoFields)))
-{-# LINE 671 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.ArgumentValue
-         where
-  type KeyType Glean.Schema.Buck.Types.ArgumentValue =
-       Glean.Schema.Buck.Types.ArgumentValue_key
-  getName _proxy = Glean.PredicateRef "buck.ArgumentValue" 4
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.argumentValue_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.ArgumentValue x k
-  getFactKey = Glean.Schema.Buck.Types.argumentValue_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 680 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.ArgumentValue where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 686 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.IndexFailureX_key where
-  buildRtsValue b
-    (Glean.Schema.Buck.Types.IndexFailureX_key x1 x2 x3 x4 x5)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-         Glean.buildRtsValue b x5
-  decodeRtsValue
-    = Glean.Schema.Buck.Types.IndexFailureX_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.IndexFailureX_key" (Prelude.Just 0))
-{-# LINE 701 "glean/schema/thrift/buck_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Buck.Types.IndexFailureX_key =
-     'Angle.TField "source"
-       (Glean.Schema.Buck.Types.IndexFailureX_source)
-       ('Angle.TField "indexer"
-          (Glean.KeyType Glean.Schema.Buck.Types.IndexerName)
-          ('Angle.TField "reason" (Glean.Schema.Buck.Types.FailureReason)
-             ('Angle.TField "details" (Data.Text.Text)
-                ('Angle.TField "repro" (Prelude.Maybe Data.Text.Text)
-                   ('Angle.TNoFields)))))
-{-# LINE 703 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.IndexFailureX
-         where
-  type KeyType Glean.Schema.Buck.Types.IndexFailureX =
-       Glean.Schema.Buck.Types.IndexFailureX_key
-  getName _proxy = Glean.PredicateRef "buck.IndexFailureX" 4
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.indexFailureX_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.IndexFailureX x k
-  getFactKey = Glean.Schema.Buck.Types.indexFailureX_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 712 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.IndexFailureX where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 718 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.TargetOut_key where
-  buildRtsValue b (Glean.Schema.Buck.Types.TargetOut_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Buck.Types.TargetOut_key <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.TargetOut_key" (Prelude.Just 0))
-{-# LINE 727 "glean/schema/thrift/buck_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Buck.Types.TargetOut_key =
-     'Angle.TField "target"
-       (Glean.KeyType Glean.Schema.Buck.Types.Target)
-       ('Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
-          ('Angle.TNoFields))
-{-# LINE 729 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.TargetOut where
-  type KeyType Glean.Schema.Buck.Types.TargetOut =
-       Glean.Schema.Buck.Types.TargetOut_key
-  getName _proxy = Glean.PredicateRef "buck.TargetOut" 4
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.targetOut_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.TargetOut x k
-  getFactKey = Glean.Schema.Buck.Types.targetOut_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 738 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.TargetOut where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 744 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.FileToTarget_key where
-  buildRtsValue b (Glean.Schema.Buck.Types.FileToTarget_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Buck.Types.FileToTarget_key <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.FileToTarget_key" (Prelude.Just 0))
-{-# LINE 753 "glean/schema/thrift/buck_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Buck.Types.FileToTarget_key =
-     'Angle.TField "source" (Glean.KeyType Glean.Schema.Src.Types.File)
-       ('Angle.TField "locator"
-          (Glean.KeyType Glean.Schema.Buck.Types.Locator)
-          ('Angle.TNoFields))
-{-# LINE 755 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.FileToTarget where
-  type KeyType Glean.Schema.Buck.Types.FileToTarget =
-       Glean.Schema.Buck.Types.FileToTarget_key
-  getName _proxy = Glean.PredicateRef "buck.FileToTarget" 4
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.fileToTarget_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.FileToTarget x k
-  getFactKey = Glean.Schema.Buck.Types.fileToTarget_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 764 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.FileToTarget where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 770 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.FileXRefs_key where
-  buildRtsValue b (Glean.Schema.Buck.Types.FileXRefs_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Buck.Types.FileXRefs_key <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.FileXRefs_key" (Prelude.Just 0))
-{-# LINE 779 "glean/schema/thrift/buck_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Buck.Types.FileXRefs_key =
-     'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
-       ('Angle.TField "xrefs" ([Glean.Schema.Buck.Types.XRef])
-          ('Angle.TNoFields))
-{-# LINE 781 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.FileXRefs where
-  type KeyType Glean.Schema.Buck.Types.FileXRefs =
-       Glean.Schema.Buck.Types.FileXRefs_key
-  getName _proxy = Glean.PredicateRef "buck.FileXRefs" 4
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.fileXRefs_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.FileXRefs x k
-  getFactKey = Glean.Schema.Buck.Types.fileXRefs_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 790 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.FileXRefs where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 796 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.File_key where
-  buildRtsValue b Glean.Schema.Buck.Types.File_key_EMPTY
-    = Glean.buildRtsSelector b 3
-  buildRtsValue b (Glean.Schema.Buck.Types.File_key_source x)
-    = do Glean.buildRtsSelector b 0
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Buck.Types.File_key_generated x)
-    = do Glean.buildRtsSelector b 1
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Buck.Types.File_key_generatedLabel x)
-    = do Glean.buildRtsSelector b 2
-         Glean.buildRtsValue b x
-  decodeRtsValue
-    = Glean.sumD (Prelude.pure Glean.Schema.Buck.Types.File_key_EMPTY)
-        [Glean.mapD Glean.Schema.Buck.Types.File_key_source,
-         Glean.mapD Glean.Schema.Buck.Types.File_key_generated,
-         Glean.mapD Glean.Schema.Buck.Types.File_key_generatedLabel]
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.File_key" (Prelude.Just 0))
-{-# LINE 816 "glean/schema/thrift/buck_include.hs" #-}
-type instance Angle.SumFields Glean.Schema.Buck.Types.File_key =
-     'Angle.TField "source" (Glean.KeyType Glean.Schema.Src.Types.File)
-       ('Angle.TField "generated"
-          (Glean.KeyType Glean.Schema.Buck.Types.Locator)
-          ('Angle.TField "generatedLabel"
-             (Glean.KeyType Glean.Schema.Buck.Types.LocatorWithLabel)
-             ('Angle.TNoFields)))
-{-# LINE 818 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.File where
-  type KeyType Glean.Schema.Buck.Types.File =
-       Glean.Schema.Buck.Types.File_key
-  getName _proxy = Glean.PredicateRef "buck.File" 4
-  getId = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.file_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.File x k
-  getFactKey = Glean.Schema.Buck.Types.file_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 826 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.File where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 832 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.FileResolved_key where
-  buildRtsValue b (Glean.Schema.Buck.Types.FileResolved_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Buck.Types.FileResolved_key <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.FileResolved_key" (Prelude.Just 0))
-{-# LINE 841 "glean/schema/thrift/buck_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Buck.Types.FileResolved_key =
-     'Angle.TField "buckFile"
-       (Glean.KeyType Glean.Schema.Buck.Types.File)
-       ('Angle.TField "srcFile"
-          (Glean.KeyType Glean.Schema.Src.Types.File)
-          ('Angle.TNoFields))
-{-# LINE 843 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.FileResolved where
-  type KeyType Glean.Schema.Buck.Types.FileResolved =
-       Glean.Schema.Buck.Types.FileResolved_key
-  getName _proxy = Glean.PredicateRef "buck.FileResolved" 4
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.fileResolved_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.FileResolved x k
-  getFactKey = Glean.Schema.Buck.Types.fileResolved_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 852 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.FileResolved where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 858 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.Type where
-  type KeyType Glean.Schema.Buck.Types.Type = Data.Text.Text
-  getName _proxy = Glean.PredicateRef "buck.Type" 4
-  getId = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.type_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.Type x k
-  getFactKey = Glean.Schema.Buck.Types.type_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 866 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.Type where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 872 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.OutputLabel where
-  type KeyType Glean.Schema.Buck.Types.OutputLabel = Data.Text.Text
-  getName _proxy = Glean.PredicateRef "buck.OutputLabel" 4
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.outputLabel_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.OutputLabel x k
-  getFactKey = Glean.Schema.Buck.Types.outputLabel_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 880 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.OutputLabel where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 886 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.Definition_key where
-  buildRtsValue b (Glean.Schema.Buck.Types.Definition_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Buck.Types.Definition_key <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.Definition_key" (Prelude.Just 0))
-{-# LINE 895 "glean/schema/thrift/buck_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Buck.Types.Definition_key =
-     'Angle.TField "module" (Glean.KeyType Glean.Schema.Src.Types.File)
-       ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields))
-{-# LINE 897 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.Definition where
-  type KeyType Glean.Schema.Buck.Types.Definition =
-       Glean.Schema.Buck.Types.Definition_key
-  getName _proxy = Glean.PredicateRef "buck.Definition" 4
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.definition_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.Definition x k
-  getFactKey = Glean.Schema.Buck.Types.definition_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 906 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.Definition where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 912 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.TargetByType_key where
-  buildRtsValue b (Glean.Schema.Buck.Types.TargetByType_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Buck.Types.TargetByType_key <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.TargetByType_key" (Prelude.Just 0))
-{-# LINE 921 "glean/schema/thrift/buck_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Buck.Types.TargetByType_key =
-     'Angle.TField "type_" (Glean.KeyType Glean.Schema.Buck.Types.Type)
-       ('Angle.TField "target"
-          (Glean.KeyType Glean.Schema.Buck.Types.Target)
-          ('Angle.TNoFields))
-{-# LINE 923 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.TargetByType where
-  type KeyType Glean.Schema.Buck.Types.TargetByType =
-       Glean.Schema.Buck.Types.TargetByType_key
-  getName _proxy = Glean.PredicateRef "buck.TargetByType" 4
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.targetByType_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.TargetByType x k
-  getFactKey = Glean.Schema.Buck.Types.targetByType_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 932 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.TargetByType where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 938 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.AttributeName
-         where
-  type KeyType Glean.Schema.Buck.Types.AttributeName = Data.Text.Text
-  getName _proxy = Glean.PredicateRef "buck.AttributeName" 4
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.attributeName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.AttributeName x k
-  getFactKey = Glean.Schema.Buck.Types.attributeName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 946 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.AttributeName where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 952 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.OutTarget_key where
-  buildRtsValue b (Glean.Schema.Buck.Types.OutTarget_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Buck.Types.OutTarget_key <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.OutTarget_key" (Prelude.Just 0))
-{-# LINE 961 "glean/schema/thrift/buck_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Buck.Types.OutTarget_key =
-     'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
-       ('Angle.TField "target"
-          (Glean.KeyType Glean.Schema.Buck.Types.Target)
-          ('Angle.TNoFields))
-{-# LINE 963 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.OutTarget where
-  type KeyType Glean.Schema.Buck.Types.OutTarget =
-       Glean.Schema.Buck.Types.OutTarget_key
-  getName _proxy = Glean.PredicateRef "buck.OutTarget" 4
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.outTarget_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.OutTarget x k
-  getFactKey = Glean.Schema.Buck.Types.outTarget_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 972 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.OutTarget where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 978 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.AttributeValue_key
-         where
-  buildRtsValue b Glean.Schema.Buck.Types.AttributeValue_key_EMPTY
-    = Glean.buildRtsSelector b 3
-  buildRtsValue b (Glean.Schema.Buck.Types.AttributeValue_key_str x)
-    = do Glean.buildRtsSelector b 0
-         Glean.buildRtsValue b x
-  buildRtsValue b
-    (Glean.Schema.Buck.Types.AttributeValue_key_sequence x)
-    = do Glean.buildRtsSelector b 1
-         Glean.buildRtsValue b x
-  buildRtsValue b
-    (Glean.Schema.Buck.Types.AttributeValue_key_mapping x)
-    = do Glean.buildRtsSelector b 2
-         Glean.buildRtsValue b x
-  decodeRtsValue
-    = Glean.sumD
-        (Prelude.pure Glean.Schema.Buck.Types.AttributeValue_key_EMPTY)
-        [Glean.mapD Glean.Schema.Buck.Types.AttributeValue_key_str,
-         Glean.mapD Glean.Schema.Buck.Types.AttributeValue_key_sequence,
-         Glean.mapD Glean.Schema.Buck.Types.AttributeValue_key_mapping]
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.AttributeValue_key" (Prelude.Just 0))
-{-# LINE 998 "glean/schema/thrift/buck_include.hs" #-}
-type instance
-     Angle.SumFields Glean.Schema.Buck.Types.AttributeValue_key =
-     'Angle.TField "str" (Data.Text.Text)
-       ('Angle.TField "sequence"
-          ([Glean.Schema.Buck.Types.AttributeValue])
-          ('Angle.TField "mapping"
-             ([Glean.Schema.Buck.Types.AttributeMapping])
-             ('Angle.TNoFields)))
-{-# LINE 1000 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.AttributeValue
-         where
-  type KeyType Glean.Schema.Buck.Types.AttributeValue =
-       Glean.Schema.Buck.Types.AttributeValue_key
-  getName _proxy = Glean.PredicateRef "buck.AttributeValue" 4
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Buck.Types.attributeValue_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.AttributeValue x k
-  getFactKey = Glean.Schema.Buck.Types.attributeValue_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1009 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.AttributeValue where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1015 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.TargetAttribute_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Buck.Types.TargetAttribute_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Buck.Types.TargetAttribute_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.TargetAttribute_key" (Prelude.Just 0))
-{-# LINE 1026 "glean/schema/thrift/buck_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Buck.Types.TargetAttribute_key =
-     'Angle.TField "target"
-       (Glean.KeyType Glean.Schema.Buck.Types.Target)
-       ('Angle.TField "attribute"
-          (Glean.KeyType Glean.Schema.Buck.Types.AttributeName)
-          ('Angle.TField "value"
-             (Glean.KeyType Glean.Schema.Buck.Types.AttributeValue)
-             ('Angle.TNoFields)))
-{-# LINE 1028 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.TargetAttribute
-         where
-  type KeyType Glean.Schema.Buck.Types.TargetAttribute =
-       Glean.Schema.Buck.Types.TargetAttribute_key
-  getName _proxy = Glean.PredicateRef "buck.TargetAttribute" 4
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Buck.Types.targetAttribute_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.TargetAttribute x k
-  getFactKey = Glean.Schema.Buck.Types.targetAttribute_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1037 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.TargetAttribute where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1043 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.TargetCall_key where
-  buildRtsValue b
-    (Glean.Schema.Buck.Types.TargetCall_key x1 x2 x3 x4 x5)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-         Glean.buildRtsValue b x5
-  decodeRtsValue
-    = Glean.Schema.Buck.Types.TargetCall_key <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.TargetCall_key" (Prelude.Just 0))
-{-# LINE 1058 "glean/schema/thrift/buck_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Buck.Types.TargetCall_key =
-     'Angle.TField "locator"
-       (Glean.KeyType Glean.Schema.Buck.Types.Locator)
-       ('Angle.TField "arguments" ([Glean.Schema.Buck.Types.CallArgument])
-          ('Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
-             ('Angle.TField "span" (Glean.Schema.Src.Types.ByteSpan)
-                ('Angle.TField "callExpr"
-                   (Prelude.Maybe Glean.Schema.Buck.Types.CallExpr)
-                   ('Angle.TNoFields)))))
-{-# LINE 1060 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.TargetCall where
-  type KeyType Glean.Schema.Buck.Types.TargetCall =
-       Glean.Schema.Buck.Types.TargetCall_key
-  getName _proxy = Glean.PredicateRef "buck.TargetCall" 4
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.targetCall_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.TargetCall x k
-  getFactKey = Glean.Schema.Buck.Types.targetCall_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1069 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.TargetCall where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1075 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.Target_key where
-  buildRtsValue b (Glean.Schema.Buck.Types.Target_key x1 x2 x3 x4)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-  decodeRtsValue
-    = Glean.Schema.Buck.Types.Target_key <$> Glean.decodeRtsValue <*>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.Target_key" (Prelude.Just 0))
-{-# LINE 1088 "glean/schema/thrift/buck_include.hs" #-}
-type instance Angle.RecordFields Glean.Schema.Buck.Types.Target_key
-     =
-     'Angle.TField "locator"
-       (Glean.KeyType Glean.Schema.Buck.Types.Locator)
-       ('Angle.TField "type_" (Glean.KeyType Glean.Schema.Buck.Types.Type)
-          ('Angle.TField "defaultPlatform"
-             (Prelude.Maybe Glean.Schema.Buck.Types.Platform)
-             ('Angle.TField "labels"
-                (Glean.KeyType Glean.Schema.Buck.Types.Labels)
-                ('Angle.TNoFields))))
-{-# LINE 1090 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.Target where
-  type KeyType Glean.Schema.Buck.Types.Target =
-       Glean.Schema.Buck.Types.Target_key
-  getName _proxy = Glean.PredicateRef "buck.Target" 4
-  getId = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.target_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.Target x k
-  getFactKey = Glean.Schema.Buck.Types.target_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1099 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.Target where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1105 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.TargetMode_key where
-  buildRtsValue b (Glean.Schema.Buck.Types.TargetMode_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Buck.Types.TargetMode_key <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.TargetMode_key" (Prelude.Just 0))
-{-# LINE 1114 "glean/schema/thrift/buck_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Buck.Types.TargetMode_key =
-     'Angle.TField "target"
-       (Glean.KeyType Glean.Schema.Buck.Types.Target)
-       ('Angle.TField "mode" (Data.Text.Text) ('Angle.TNoFields))
-{-# LINE 1116 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.TargetMode where
-  type KeyType Glean.Schema.Buck.Types.TargetMode =
-       Glean.Schema.Buck.Types.TargetMode_key
-  getName _proxy = Glean.PredicateRef "buck.TargetMode" 4
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.targetMode_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.TargetMode x k
-  getFactKey = Glean.Schema.Buck.Types.targetMode_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1125 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.TargetMode where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1131 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.TargetHash_key where
-  buildRtsValue b (Glean.Schema.Buck.Types.TargetHash_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Buck.Types.TargetHash_key <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.TargetHash_key" (Prelude.Just 0))
-{-# LINE 1140 "glean/schema/thrift/buck_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Buck.Types.TargetHash_key =
-     'Angle.TField "locator"
-       (Glean.KeyType Glean.Schema.Buck.Types.Locator)
-       ('Angle.TField "targetHash" (Data.Text.Text) ('Angle.TNoFields))
-{-# LINE 1142 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.TargetHash where
-  type KeyType Glean.Schema.Buck.Types.TargetHash =
-       Glean.Schema.Buck.Types.TargetHash_key
-  getName _proxy = Glean.PredicateRef "buck.TargetHash" 4
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.targetHash_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.TargetHash x k
-  getFactKey = Glean.Schema.Buck.Types.targetHash_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1151 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.TargetHash where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1157 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.Owner_key where
-  buildRtsValue b (Glean.Schema.Buck.Types.Owner_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Buck.Types.Owner_key <$> Glean.decodeRtsValue <*>
-        Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.Owner_key" (Prelude.Just 0))
-{-# LINE 1166 "glean/schema/thrift/buck_include.hs" #-}
-type instance Angle.RecordFields Glean.Schema.Buck.Types.Owner_key
-     =
-     'Angle.TField "source" (Glean.KeyType Glean.Schema.Src.Types.File)
-       ('Angle.TField "owner"
-          (Glean.KeyType Glean.Schema.Buck.Types.TargetSources)
-          ('Angle.TNoFields))
-{-# LINE 1168 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.Owner where
-  type KeyType Glean.Schema.Buck.Types.Owner =
-       Glean.Schema.Buck.Types.Owner_key
-  getName _proxy = Glean.PredicateRef "buck.Owner" 4
-  getId = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.owner_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.Owner x k
-  getFactKey = Glean.Schema.Buck.Types.owner_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1177 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.Owner where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1183 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.TargetDependencies_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Buck.Types.TargetDependencies_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Buck.Types.TargetDependencies_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.TargetDependencies_key" (Prelude.Just 0))
-{-# LINE 1192 "glean/schema/thrift/buck_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Buck.Types.TargetDependencies_key =
-     'Angle.TField "target"
-       (Glean.KeyType Glean.Schema.Buck.Types.Target)
-       ('Angle.TField "dependencies"
-          ([Glean.Schema.Buck.Types.Dependency])
-          ('Angle.TNoFields))
-{-# LINE 1194 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.TargetDependencies
-         where
-  type KeyType Glean.Schema.Buck.Types.TargetDependencies =
-       Glean.Schema.Buck.Types.TargetDependencies_key
-  getName _proxy = Glean.PredicateRef "buck.TargetDependencies" 4
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Buck.Types.targetDependencies_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.TargetDependencies x k
-  getFactKey = Glean.Schema.Buck.Types.targetDependencies_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1203 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.TargetDependencies
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1209 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.TargetOuts_key where
-  buildRtsValue b (Glean.Schema.Buck.Types.TargetOuts_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Buck.Types.TargetOuts_key <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.TargetOuts_key" (Prelude.Just 0))
-{-# LINE 1220 "glean/schema/thrift/buck_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Buck.Types.TargetOuts_key =
-     'Angle.TField "target"
-       (Glean.KeyType Glean.Schema.Buck.Types.Target)
-       ('Angle.TField "outputLabel"
-          (Prelude.Maybe Glean.Schema.Buck.Types.OutputLabel)
-          ('Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
-             ('Angle.TNoFields)))
-{-# LINE 1222 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.TargetOuts where
-  type KeyType Glean.Schema.Buck.Types.TargetOuts =
-       Glean.Schema.Buck.Types.TargetOuts_key
-  getName _proxy = Glean.PredicateRef "buck.TargetOuts" 4
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.targetOuts_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.TargetOuts x k
-  getFactKey = Glean.Schema.Buck.Types.targetOuts_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1231 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.TargetOuts where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1237 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.LocatorReverseDeps_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Buck.Types.LocatorReverseDeps_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Buck.Types.LocatorReverseDeps_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.LocatorReverseDeps_key" (Prelude.Just 0))
-{-# LINE 1246 "glean/schema/thrift/buck_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Buck.Types.LocatorReverseDeps_key =
-     'Angle.TField "locator"
-       (Glean.KeyType Glean.Schema.Buck.Types.Locator)
-       ('Angle.TField "rdeps" ([Glean.Schema.Buck.Types.Locator])
-          ('Angle.TNoFields))
-{-# LINE 1248 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.LocatorReverseDeps
-         where
-  type KeyType Glean.Schema.Buck.Types.LocatorReverseDeps =
-       Glean.Schema.Buck.Types.LocatorReverseDeps_key
-  getName _proxy = Glean.PredicateRef "buck.LocatorReverseDeps" 4
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Buck.Types.locatorReverseDeps_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.LocatorReverseDeps x k
-  getFactKey = Glean.Schema.Buck.Types.locatorReverseDeps_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1257 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.LocatorReverseDeps
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1263 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.TargetSources_key where
-  buildRtsValue b
-    (Glean.Schema.Buck.Types.TargetSources_key x1 x2 x3 x4)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-  decodeRtsValue
-    = Glean.Schema.Buck.Types.TargetSources_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.TargetSources_key" (Prelude.Just 0))
-{-# LINE 1276 "glean/schema/thrift/buck_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Buck.Types.TargetSources_key =
-     'Angle.TField "target"
-       (Glean.KeyType Glean.Schema.Buck.Types.Target)
-       ('Angle.TField "headers" ([Glean.Schema.Buck.Types.File])
-          ('Angle.TField "exportedHeaders" ([Glean.Schema.Buck.Types.File])
-             ('Angle.TField "srcs" ([Glean.Schema.Buck.Types.File])
-                ('Angle.TNoFields))))
-{-# LINE 1278 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.TargetSources
-         where
-  type KeyType Glean.Schema.Buck.Types.TargetSources =
-       Glean.Schema.Buck.Types.TargetSources_key
-  getName _proxy = Glean.PredicateRef "buck.TargetSources" 4
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.targetSources_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.TargetSources x k
-  getFactKey = Glean.Schema.Buck.Types.targetSources_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1287 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.TargetSources where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1293 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.LocatorWithLabel_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Buck.Types.LocatorWithLabel_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Buck.Types.LocatorWithLabel_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.LocatorWithLabel_key" (Prelude.Just 0))
-{-# LINE 1302 "glean/schema/thrift/buck_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Buck.Types.LocatorWithLabel_key =
-     'Angle.TField "locator"
-       (Glean.KeyType Glean.Schema.Buck.Types.Locator)
-       ('Angle.TField "label"
-          (Glean.KeyType Glean.Schema.Buck.Types.OutputLabel)
-          ('Angle.TNoFields))
-{-# LINE 1304 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.LocatorWithLabel
-         where
-  type KeyType Glean.Schema.Buck.Types.LocatorWithLabel =
-       Glean.Schema.Buck.Types.LocatorWithLabel_key
-  getName _proxy = Glean.PredicateRef "buck.LocatorWithLabel" 4
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Buck.Types.locatorWithLabel_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.LocatorWithLabel x k
-  getFactKey = Glean.Schema.Buck.Types.locatorWithLabel_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1313 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.LocatorWithLabel where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1319 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.IndexerName where
-  type KeyType Glean.Schema.Buck.Types.IndexerName = Data.Text.Text
-  getName _proxy = Glean.PredicateRef "buck.IndexerName" 4
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.indexerName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.IndexerName x k
-  getFactKey = Glean.Schema.Buck.Types.indexerName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1327 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.IndexerName where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1333 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.TranslationUnit_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Buck.Types.TranslationUnit_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Buck.Types.TranslationUnit_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.TranslationUnit_key" (Prelude.Just 0))
-{-# LINE 1344 "glean/schema/thrift/buck_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Buck.Types.TranslationUnit_key =
-     'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
-       ('Angle.TField "target"
-          (Glean.KeyType Glean.Schema.Buck.Types.Locator)
-          ('Angle.TField "platform"
-             (Prelude.Maybe Glean.Schema.Buck.Types.Platform)
-             ('Angle.TNoFields)))
-{-# LINE 1346 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Buck.Types.TranslationUnit
-         where
-  type KeyType Glean.Schema.Buck.Types.TranslationUnit =
-       Glean.Schema.Buck.Types.TranslationUnit_key
-  getName _proxy = Glean.PredicateRef "buck.TranslationUnit" 4
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Buck.Types.translationUnit_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Buck.Types.TranslationUnit x k
-  getFactKey = Glean.Schema.Buck.Types.translationUnit_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1355 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.TranslationUnit where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1361 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.AttributeMapping where
-  buildRtsValue b (Glean.Schema.Buck.Types.AttributeMapping x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Buck.Types.AttributeMapping <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.AttributeMapping" (Prelude.Just 4))
-{-# LINE 1370 "glean/schema/thrift/buck_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Buck.Types.AttributeMapping =
-     'Angle.TField "key" (Data.Text.Text)
-       ('Angle.TField "value"
-          (Glean.KeyType Glean.Schema.Buck.Types.AttributeValue)
-          ('Angle.TNoFields))
-{-# LINE 1372 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.ArgumentMapping where
-  buildRtsValue b (Glean.Schema.Buck.Types.ArgumentMapping x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Buck.Types.ArgumentMapping <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.ArgumentMapping" (Prelude.Just 4))
-{-# LINE 1381 "glean/schema/thrift/buck_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Buck.Types.ArgumentMapping =
-     'Angle.TField "key" (Data.Text.Text)
-       ('Angle.TField "value"
-          (Glean.KeyType Glean.Schema.Buck.Types.ArgumentValue)
-          ('Angle.TNoFields))
-{-# LINE 1383 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.XRefDestination where
-  buildRtsValue b Glean.Schema.Buck.Types.XRefDestination_EMPTY
-    = Glean.buildRtsSelector b 3
-  buildRtsValue b (Glean.Schema.Buck.Types.XRefDestination_locator x)
-    = do Glean.buildRtsSelector b 0
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Buck.Types.XRefDestination_file x)
-    = do Glean.buildRtsSelector b 1
-         Glean.buildRtsValue b x
-  buildRtsValue b
-    (Glean.Schema.Buck.Types.XRefDestination_definition x)
-    = do Glean.buildRtsSelector b 2
-         Glean.buildRtsValue b x
-  decodeRtsValue
-    = Glean.sumD
-        (Prelude.pure Glean.Schema.Buck.Types.XRefDestination_EMPTY)
-        [Glean.mapD Glean.Schema.Buck.Types.XRefDestination_locator,
-         Glean.mapD Glean.Schema.Buck.Types.XRefDestination_file,
-         Glean.mapD Glean.Schema.Buck.Types.XRefDestination_definition]
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.XRefDestination" (Prelude.Just 4))
-{-# LINE 1403 "glean/schema/thrift/buck_include.hs" #-}
-type instance
-     Angle.SumFields Glean.Schema.Buck.Types.XRefDestination =
-     'Angle.TField "locator"
-       (Glean.KeyType Glean.Schema.Buck.Types.Locator)
-       ('Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
-          ('Angle.TField "definition"
-             (Glean.KeyType Glean.Schema.Buck.Types.Definition)
-             ('Angle.TNoFields)))
-{-# LINE 1405 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.CallName where
-  buildRtsValue b Glean.Schema.Buck.Types.CallName_EMPTY
-    = Glean.buildRtsSelector b 2
-  buildRtsValue b (Glean.Schema.Buck.Types.CallName_prim x)
-    = do Glean.buildRtsSelector b 0
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Buck.Types.CallName_definition x)
-    = do Glean.buildRtsSelector b 1
-         Glean.buildRtsValue b x
-  decodeRtsValue
-    = Glean.sumD (Prelude.pure Glean.Schema.Buck.Types.CallName_EMPTY)
-        [Glean.mapD Glean.Schema.Buck.Types.CallName_prim,
-         Glean.mapD Glean.Schema.Buck.Types.CallName_definition]
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.CallName" (Prelude.Just 4))
-{-# LINE 1421 "glean/schema/thrift/buck_include.hs" #-}
-type instance Angle.SumFields Glean.Schema.Buck.Types.CallName =
-     'Angle.TField "prim" (Data.Text.Text)
-       ('Angle.TField "definition"
-          (Glean.KeyType Glean.Schema.Buck.Types.Definition)
-          ('Angle.TNoFields))
-{-# LINE 1423 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.FailureReason where
-  buildRtsValue = Glean.thriftEnum_buildRtsValue
-  decodeRtsValue = Glean.thriftEnumD
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.FailureReason" (Prelude.Just 4))
-{-# LINE 1428 "glean/schema/thrift/buck_include.hs" #-}
-type instance Angle.SumFields Glean.Schema.Buck.Types.FailureReason
-     =
-     'Angle.TField "Skipped" (Glean.Schema.Builtin.Types.Unit)
-       ('Angle.TField "Blocked" (Glean.Schema.Builtin.Types.Unit)
-          ('Angle.TField "EmptyCdb" (Glean.Schema.Builtin.Types.Unit)
-             ('Angle.TField "FailedCdb" (Glean.Schema.Builtin.Types.Unit)
-                ('Angle.TField "QueryFailed" (Glean.Schema.Builtin.Types.Unit)
-                   ('Angle.TField "Unclassified" (Glean.Schema.Builtin.Types.Unit)
-                      ('Angle.TNoFields))))))
-{-# LINE 1430 "glean/schema/thrift/buck_include.hs" #-}
-instance Angle.AngleEnum Glean.Schema.Buck.Types.FailureReason
-         where
-  type AngleEnumTy Glean.Schema.Buck.Types.FailureReason =
-       Glean.Schema.Buck.Types.FailureReason
-  enumName v = Text.pack (Prelude.drop 14 (Prelude.show v))
-{-# LINE 1434 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.XRef where
-  buildRtsValue b (Glean.Schema.Buck.Types.XRef x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Buck.Types.XRef <$> Glean.decodeRtsValue <*>
-        Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy () (Angle.SourceRef "buck.XRef" (Prelude.Just 4))
-{-# LINE 1443 "glean/schema/thrift/buck_include.hs" #-}
-type instance Angle.RecordFields Glean.Schema.Buck.Types.XRef =
-     'Angle.TField "destination"
-       (Glean.Schema.Buck.Types.XRefDestination)
-       ('Angle.TField "ranges" ([Glean.Schema.Src.Types.ByteSpan])
-          ('Angle.TNoFields))
-{-# LINE 1445 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.Dependency where
-  buildRtsValue b (Glean.Schema.Buck.Types.Dependency x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Buck.Types.Dependency <$> Glean.decodeRtsValue <*>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.Dependency" (Prelude.Just 4))
-{-# LINE 1456 "glean/schema/thrift/buck_include.hs" #-}
-type instance Angle.RecordFields Glean.Schema.Buck.Types.Dependency
-     =
-     'Angle.TField "target"
-       (Glean.KeyType Glean.Schema.Buck.Types.Locator)
-       ('Angle.TField "explicit_" (Prelude.Bool)
-          ('Angle.TField "exported" (Prelude.Bool) ('Angle.TNoFields)))
-{-# LINE 1458 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.CallExpr_accessor_
-         where
-  buildRtsValue b (Glean.Schema.Buck.Types.CallExpr_accessor_ x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Buck.Types.CallExpr_accessor_ <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.CallExpr_accessor_" (Prelude.Just 0))
-{-# LINE 1467 "glean/schema/thrift/buck_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Buck.Types.CallExpr_accessor_ =
-     'Angle.TField "name"
-       (Glean.KeyType Glean.Schema.Buck.Types.CallExpr)
-       ('Angle.TField "field" (Data.Text.Text) ('Angle.TNoFields))
-{-# LINE 1469 "glean/schema/thrift/buck_include.hs" #-}
-instance Glean.Type Glean.Schema.Buck.Types.IndexFailureX_source
-         where
-  buildRtsValue b Glean.Schema.Buck.Types.IndexFailureX_source_EMPTY
-    = Glean.buildRtsSelector b 2
-  buildRtsValue b
-    (Glean.Schema.Buck.Types.IndexFailureX_source_locator x)
-    = do Glean.buildRtsSelector b 0
-         Glean.buildRtsValue b x
-  buildRtsValue b
-    (Glean.Schema.Buck.Types.IndexFailureX_source_buildFile x)
-    = do Glean.buildRtsSelector b 1
-         Glean.buildRtsValue b x
-  decodeRtsValue
-    = Glean.sumD
-        (Prelude.pure Glean.Schema.Buck.Types.IndexFailureX_source_EMPTY)
-        [Glean.mapD Glean.Schema.Buck.Types.IndexFailureX_source_locator,
-         Glean.mapD Glean.Schema.Buck.Types.IndexFailureX_source_buildFile]
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "buck.IndexFailureX_source" (Prelude.Just 0))
-{-# LINE 1485 "glean/schema/thrift/buck_include.hs" #-}
+        FileCall_id, FileCall(FileCall, fileCall_id, fileCall_key),
+        File_id, File(File, file_id, file_key), IndexFailureX_id,
+        IndexFailureX(IndexFailureX, indexFailureX_id, indexFailureX_key),
+        DestinationUses_id,
+        DestinationUses(DestinationUses, destinationUses_id,
+                        destinationUses_key),
+        TargetDependencies_id,
+        TargetDependencies(TargetDependencies, targetDependencies_id,
+                           targetDependencies_key),
+        DefinitionMetadata_id,
+        DefinitionMetadata(DefinitionMetadata, definitionMetadata_id,
+                           definitionMetadata_key),
+        DefinitionLocation_id,
+        DefinitionLocation(DefinitionLocation, definitionLocation_id,
+                           definitionLocation_key),
+        DefinitionKind_id,
+        DefinitionKind(DefinitionKind, definitionKind_id,
+                       definitionKind_key),
+        Definition_id,
+        Definition(Definition, definition_id, definition_key), Consumer_id,
+        Consumer(Consumer, consumer_id, consumer_key), CallExpr_id,
+        CallExpr(CallExpr, callExpr_id, callExpr_key), CallArgument_id,
+        CallArgument(CallArgument, callArgument_id, callArgument_key),
+        AttributeName_id,
+        AttributeName(AttributeName, attributeName_id, attributeName_key),
+        AttributeValue_id,
+        AttributeValue(AttributeValue, attributeValue_id,
+                       attributeValue_key),
+        ArgumentValue_id,
+        ArgumentValue(ArgumentValue, argumentValue_id, argumentValue_key),
+        XRefDestination(XRefDestination_EMPTY, XRefDestination_locator,
+                        XRefDestination_file, XRefDestination_definition),
+        XRef(XRef, xRef_destination, xRef_ranges),
+        TranslationUnit_key(TranslationUnit_key, translationUnit_key_file,
+                            translationUnit_key_target, translationUnit_key_platform),
+        TargetUses_key(TargetUses_key, targetUses_key_locator,
+                       targetUses_key_file, targetUses_key_spans),
+        TargetSourcesBaseModule_key(TargetSourcesBaseModule_key,
+                                    targetSourcesBaseModule_key_locator,
+                                    targetSourcesBaseModule_key_srcs,
+                                    targetSourcesBaseModule_key_baseModule),
+        TargetSources_key(TargetSources_key, targetSources_key_target,
+                          targetSources_key_headers, targetSources_key_exportedHeaders,
+                          targetSources_key_srcs),
+        TargetOuts_key(TargetOuts_key, targetOuts_key_target,
+                       targetOuts_key_outputLabel, targetOuts_key_file),
+        TargetOut_key(TargetOut_key, targetOut_key_target,
+                      targetOut_key_file),
+        TargetMode_key(TargetMode_key, targetMode_key_target,
+                       targetMode_key_mode),
+        TargetLocation_key(TargetLocation_key, targetLocation_key_locator,
+                           targetLocation_key_file, targetLocation_key_span),
+        TargetIndexer_key(TargetIndexer_key, targetIndexer_key_name,
+                          targetIndexer_key_target),
+        TargetHash_key(TargetHash_key, targetHash_key_locator,
+                       targetHash_key_targetHash),
+        TargetCallByCallExpr_key(TargetCallByCallExpr_key,
+                                 targetCallByCallExpr_key_callExpr,
+                                 targetCallByCallExpr_key_target),
+        TargetCall_key(TargetCall_key, targetCall_key_locator,
+                       targetCall_key_arguments, targetCall_key_file, targetCall_key_span,
+                       targetCall_key_callExpr),
+        TargetByType_key(TargetByType_key, targetByType_key_type_,
+                         targetByType_key_target),
+        TargetAttribute_key(TargetAttribute_key,
+                            targetAttribute_key_target, targetAttribute_key_attribute,
+                            targetAttribute_key_value),
+        Target_key(Target_key, target_key_locator, target_key_type_,
+                   target_key_defaultPlatform, target_key_labels),
+        SourceFileLocation_key(SourceFileLocation_key,
+                               sourceFileLocation_key_file, sourceFileLocation_key_span),
+        SearchByLocalName_key(SearchByLocalName_key,
+                              searchByLocalName_key_name, searchByLocalName_key_decl),
+        RuleKey_key(RuleKey_key, ruleKey_key_locator, ruleKey_key_ruleKey),
+        Owner_key(Owner_key, owner_key_source, owner_key_owner),
+        OutsTarget_key(OutsTarget_key, outsTarget_key_file,
+                       outsTarget_key_target, outsTarget_key_outputLabel),
+        OutTarget_key(OutTarget_key, outTarget_key_file,
+                      outTarget_key_target),
+        LocatorWithLabel_key(LocatorWithLabel_key,
+                             locatorWithLabel_key_locator, locatorWithLabel_key_label),
+        LocatorReverseDeps_key(LocatorReverseDeps_key,
+                               locatorReverseDeps_key_locator, locatorReverseDeps_key_rdeps),
+        LocatorReverseDep_key(LocatorReverseDep_key,
+                              locatorReverseDep_key_locator, locatorReverseDep_key_rdep),
+        Locator_key(Locator_key, locator_key_subdir, locator_key_path,
+                    locator_key_name),
+        LocalNameLowerCase_key(LocalNameLowerCase_key,
+                               localNameLowerCase_key_lowercase, localNameLowerCase_key_name),
+        Kind(Kind_Function, Kind_Variable, Kind__UNKNOWN),
+        FileXRefs_key(FileXRefs_key, fileXRefs_key_file,
+                      fileXRefs_key_xrefs),
+        FileToTarget_key(FileToTarget_key, fileToTarget_key_source,
+                         fileToTarget_key_locator),
+        FileTarget_key(FileTarget_key, fileTarget_key_file,
+                       fileTarget_key_locator),
+        FileResolved_key(FileResolved_key, fileResolved_key_buckFile,
+                         fileResolved_key_srcFile),
+        FileEntity_key(FileEntity_key, fileEntity_key_file,
+                       fileEntity_key_entity),
+        FileDefinition_key(FileDefinition_key, fileDefinition_key_file,
+                           fileDefinition_key_definition),
+        FileCall_key(FileCall_key, fileCall_key_file,
+                     fileCall_key_callee_span, fileCall_key_callExpr,
+                     fileCall_key_arguments, fileCall_key_locator),
+        File_key(File_key_EMPTY, File_key_source, File_key_generated,
+                 File_key_generatedLabel),
+        FailureReason(FailureReason_Skipped, FailureReason_Blocked,
+                      FailureReason_EmptyCdb, FailureReason_FailedCdb,
+                      FailureReason_QueryFailed, FailureReason_Unclassified,
+                      FailureReason__UNKNOWN),
+        IndexFailureX_source(IndexFailureX_source_EMPTY,
+                             IndexFailureX_source_locator, IndexFailureX_source_buildFile),
+        IndexFailureX_key(IndexFailureX_key, indexFailureX_key_source,
+                          indexFailureX_key_indexer, indexFailureX_key_reason,
+                          indexFailureX_key_details, indexFailureX_key_repro),
+        DestinationUses_key(DestinationUses_key,
+                            destinationUses_key_destination, destinationUses_key_file,
+                            destinationUses_key_spans),
+        Dependency(Dependency, dependency_target, dependency_explicit_,
+                   dependency_exported),
+        TargetDependencies_key(TargetDependencies_key,
+                               targetDependencies_key_target,
+                               targetDependencies_key_dependencies),
+        DefinitionMetadata_key(DefinitionMetadata_key,
+                               definitionMetadata_key_definition, definitionMetadata_key_kind,
+                               definitionMetadata_key_span),
+        DefinitionLocation_key(DefinitionLocation_key,
+                               definitionLocation_key_definition, definitionLocation_key_file,
+                               definitionLocation_key_span),
+        DefinitionKind_key(DefinitionKind_key,
+                           definitionKind_key_definition, definitionKind_key_kind),
+        Definition_key(Definition_key, definition_key_module,
+                       definition_key_name),
+        Consumer_key(Consumer_key, consumer_key_source,
+                     consumer_key_consumer),
+        CallName(CallName_EMPTY, CallName_prim, CallName_definition),
+        CallExpr_accessor_(CallExpr_accessor_, callExpr_accessor__name,
+                           callExpr_accessor__field),
+        CallExpr_key(CallExpr_key_EMPTY, CallExpr_key_name,
+                     CallExpr_key_accessor),
+        CallArgument_key(CallArgument_key, callArgument_key_label,
+                         callArgument_key_value, callArgument_key_file,
+                         callArgument_key_span),
+        AttributeMapping(AttributeMapping, attributeMapping_key,
+                         attributeMapping_value),
+        AttributeValue_key(AttributeValue_key_EMPTY,
+                           AttributeValue_key_str, AttributeValue_key_sequence,
+                           AttributeValue_key_mapping),
+        ArgumentMapping(ArgumentMapping, argumentMapping_key,
+                        argumentMapping_value),
+        ArgumentValue_key(ArgumentValue_key_EMPTY, ArgumentValue_key_lit,
+                          ArgumentValue_key_sequence, ArgumentValue_key_mapping,
+                          ArgumentValue_key_none, ArgumentValue_key_def_,
+                          ArgumentValue_key_other))
+       where
+import qualified Control.DeepSeq as DeepSeq
+import qualified Control.Exception as Exception
+import qualified Control.Monad as Monad
+import qualified Control.Monad.ST.Trans as ST
+import qualified Control.Monad.Trans.Class as Trans
+import qualified Data.Aeson as Aeson
+import qualified Data.Aeson.Types as Aeson
+import qualified Data.Default as Default
+import qualified Data.Function as Function
+import qualified Data.HashMap.Strict as HashMap
+import qualified Data.Hashable as Hashable
+import qualified Data.Int as Int
+import qualified Data.List as List
+import qualified Data.Map.Strict as Map
+import qualified Data.Ord as Ord
+import qualified Data.Text as Text
+import qualified Data.Text.Encoding as Text
+import qualified Facebook.Thrift.Annotation.Thrift.Thrift.Types
+       as Facebook.Thrift.Annotation.Thrift.Thrift
+import qualified GHC.Magic as GHC
+import qualified Glean.Schema.Builtin.Types as Glean.Schema.Builtin
+import qualified Glean.Schema.Src.Types as Glean.Schema.Src
+import qualified Glean.Types as Glean
+import qualified Prelude as Prelude
+import qualified Rust.Types as Rust
+import qualified Thrift.Binary.Parser as Parser
+import qualified Thrift.CodegenTypesOnly as Thrift
+import Control.Applicative ((<|>), (*>), (<*))
+import Data.Aeson ((.:), (.:?), (.=), (.!=))
+import Data.Aeson ((.:), (.=))
+import Data.Monoid ((<>))
+import Prelude ((.), (++), (>), (==))
+import Prelude ((.), (<$>), (<*>), (>>=), (==), (++))
+import Prelude ((.), (<$>), (<*>), (>>=), (==), (/=), (<), (++))
+{-# LINE 5 "glean/schema/thrift/buck_include.hs" #-}
+import qualified Data.ByteString
+{-# LINE 6 "glean/schema/thrift/buck_include.hs" #-}
+import qualified Data.Default
+{-# LINE 7 "glean/schema/thrift/buck_include.hs" #-}
+import qualified Data.Text
+{-# LINE 9 "glean/schema/thrift/buck_include.hs" #-}
+import qualified Glean.Types as Glean
+{-# LINE 10 "glean/schema/thrift/buck_include.hs" #-}
+import qualified Glean.Typed as Glean
+{-# LINE 11 "glean/schema/thrift/buck_include.hs" #-}
+import qualified Glean.Query.Angle as Angle
+{-# LINE 12 "glean/schema/thrift/buck_include.hs" #-}
+import qualified Glean.Angle.Types as Angle
+{-# LINE 14 "glean/schema/thrift/buck_include.hs" #-}
+import qualified Glean.Schema.Builtin.Types
+{-# LINE 15 "glean/schema/thrift/buck_include.hs" #-}
+import qualified Glean.Schema.Src.Types
+{-# LINE 314 ".build/def/codegen/thrift-schema-hs/glean/schema/thrift/gen-hs2/Glean/Schema/Buck/Types.hs" #-}
+
+pREDICATE_VERSIONS :: Map.Map Text.Text Int.Int64
+pREDICATE_VERSIONS
+  = Map.fromList
+      [("CallArgument", 4), ("RuleKey", 4), ("Label", 4),
+       ("SearchByLocalName", 4), ("TargetIndexerName", 4),
+       ("TargetCallByCallExpr", 4), ("OutsTarget", 4),
+       ("LocalNameLowerCase", 4), ("LocalName", 4), ("FileTarget", 4),
+       ("Labels", 4), ("TargetLocation", 4), ("FileDefinition", 4),
+       ("LocatorReverseDep", 4), ("FileEntity", 4), ("Locator", 4),
+       ("DefinitionLocation", 4), ("CallExpr", 4), ("TargetIndexer", 4),
+       ("TargetUses", 4), ("Platform", 4), ("Consumer", 4),
+       ("TargetLinkWhole", 4), ("FileCall", 4), ("DestinationUses", 4),
+       ("SourceFileLocation", 4), ("TargetSourcesBaseModule", 4),
+       ("ArgumentValue", 4), ("IndexFailureX", 4), ("TargetOut", 4),
+       ("FileToTarget", 4), ("FileXRefs", 4), ("File", 4),
+       ("FileResolved", 4), ("DefinitionKind", 4), ("Type", 4),
+       ("OutputLabel", 4), ("Definition", 4), ("TargetByType", 4),
+       ("AttributeName", 4), ("DefinitionMetadata", 4), ("OutTarget", 4),
+       ("AttributeValue", 4), ("TargetAttribute", 4), ("TargetCall", 4),
+       ("Target", 4), ("TargetMode", 4), ("TargetHash", 4), ("Owner", 4),
+       ("TargetDependencies", 4), ("TargetOuts", 4),
+       ("LocatorReverseDeps", 4), ("TargetSources", 4),
+       ("LocatorWithLabel", 4), ("IndexerName", 4),
+       ("TranslationUnit", 4)]
+
+type Type_id = Glean.Id
+
+data Type = Type{type_id :: {-# UNPACK #-} !Type_id,
+                 type_key :: Prelude.Maybe Text.Text}
+            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Type where
+  toJSON (Type __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct Type where
+  buildStruct _proxy (Type __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStringType _proxy)
+                                    2
+                                    1
+                                    (Thrift.genText _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (Type __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData Type where
+  rnf (Type __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default Type where
+  def = Type Default.def Prelude.Nothing
+
+instance Hashable.Hashable Type where
+  hashWithSalt __salt (Type _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type TranslationUnit_id = Glean.Id
+
+data TranslationUnit = TranslationUnit{translationUnit_id ::
+                                       {-# UNPACK #-} !TranslationUnit_id,
+                                       translationUnit_key :: Prelude.Maybe TranslationUnit_key}
+                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TranslationUnit where
+  toJSON (TranslationUnit __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct TranslationUnit where
+  buildStruct _proxy (TranslationUnit __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (TranslationUnit __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData TranslationUnit where
+  rnf (TranslationUnit __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default TranslationUnit where
+  def = TranslationUnit Default.def Prelude.Nothing
+
+instance Hashable.Hashable TranslationUnit where
+  hashWithSalt __salt (TranslationUnit _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type TargetUses_id = Glean.Id
+
+data TargetUses = TargetUses{targetUses_id ::
+                             {-# UNPACK #-} !TargetUses_id,
+                             targetUses_key :: Prelude.Maybe TargetUses_key}
+                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TargetUses where
+  toJSON (TargetUses __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct TargetUses where
+  buildStruct _proxy (TargetUses __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (TargetUses __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData TargetUses where
+  rnf (TargetUses __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default TargetUses where
+  def = TargetUses Default.def Prelude.Nothing
+
+instance Hashable.Hashable TargetUses where
+  hashWithSalt __salt (TargetUses _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type TargetSourcesBaseModule_id = Glean.Id
+
+data TargetSourcesBaseModule = TargetSourcesBaseModule{targetSourcesBaseModule_id
+                                                       ::
+                                                       {-# UNPACK #-} !TargetSourcesBaseModule_id,
+                                                       targetSourcesBaseModule_key ::
+                                                       Prelude.Maybe TargetSourcesBaseModule_key}
+                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TargetSourcesBaseModule where
+  toJSON (TargetSourcesBaseModule __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct TargetSourcesBaseModule where
+  buildStruct _proxy
+    (TargetSourcesBaseModule __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (TargetSourcesBaseModule __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData TargetSourcesBaseModule where
+  rnf (TargetSourcesBaseModule __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default TargetSourcesBaseModule where
+  def = TargetSourcesBaseModule Default.def Prelude.Nothing
+
+instance Hashable.Hashable TargetSourcesBaseModule where
+  hashWithSalt __salt (TargetSourcesBaseModule _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type TargetSources_id = Glean.Id
+
+data TargetSources = TargetSources{targetSources_id ::
+                                   {-# UNPACK #-} !TargetSources_id,
+                                   targetSources_key :: Prelude.Maybe TargetSources_key}
+                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TargetSources where
+  toJSON (TargetSources __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct TargetSources where
+  buildStruct _proxy (TargetSources __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (TargetSources __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData TargetSources where
+  rnf (TargetSources __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default TargetSources where
+  def = TargetSources Default.def Prelude.Nothing
+
+instance Hashable.Hashable TargetSources where
+  hashWithSalt __salt (TargetSources _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type TargetOuts_id = Glean.Id
+
+data TargetOuts = TargetOuts{targetOuts_id ::
+                             {-# UNPACK #-} !TargetOuts_id,
+                             targetOuts_key :: Prelude.Maybe TargetOuts_key}
+                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TargetOuts where
+  toJSON (TargetOuts __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct TargetOuts where
+  buildStruct _proxy (TargetOuts __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (TargetOuts __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData TargetOuts where
+  rnf (TargetOuts __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default TargetOuts where
+  def = TargetOuts Default.def Prelude.Nothing
+
+instance Hashable.Hashable TargetOuts where
+  hashWithSalt __salt (TargetOuts _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type TargetOut_id = Glean.Id
+
+data TargetOut = TargetOut{targetOut_id ::
+                           {-# UNPACK #-} !TargetOut_id,
+                           targetOut_key :: Prelude.Maybe TargetOut_key}
+                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TargetOut where
+  toJSON (TargetOut __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct TargetOut where
+  buildStruct _proxy (TargetOut __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (TargetOut __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData TargetOut where
+  rnf (TargetOut __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default TargetOut where
+  def = TargetOut Default.def Prelude.Nothing
+
+instance Hashable.Hashable TargetOut where
+  hashWithSalt __salt (TargetOut _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type TargetMode_id = Glean.Id
+
+data TargetMode = TargetMode{targetMode_id ::
+                             {-# UNPACK #-} !TargetMode_id,
+                             targetMode_key :: Prelude.Maybe TargetMode_key}
+                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TargetMode where
+  toJSON (TargetMode __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct TargetMode where
+  buildStruct _proxy (TargetMode __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (TargetMode __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData TargetMode where
+  rnf (TargetMode __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default TargetMode where
+  def = TargetMode Default.def Prelude.Nothing
+
+instance Hashable.Hashable TargetMode where
+  hashWithSalt __salt (TargetMode _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type TargetLocation_id = Glean.Id
+
+data TargetLocation = TargetLocation{targetLocation_id ::
+                                     {-# UNPACK #-} !TargetLocation_id,
+                                     targetLocation_key :: Prelude.Maybe TargetLocation_key}
+                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TargetLocation where
+  toJSON (TargetLocation __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct TargetLocation where
+  buildStruct _proxy (TargetLocation __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (TargetLocation __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData TargetLocation where
+  rnf (TargetLocation __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default TargetLocation where
+  def = TargetLocation Default.def Prelude.Nothing
+
+instance Hashable.Hashable TargetLocation where
+  hashWithSalt __salt (TargetLocation _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type TargetLinkWhole_id = Glean.Id
+
+data TargetLinkWhole = TargetLinkWhole{targetLinkWhole_id ::
+                                       {-# UNPACK #-} !TargetLinkWhole_id,
+                                       targetLinkWhole_key :: Prelude.Maybe Target}
+                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TargetLinkWhole where
+  toJSON (TargetLinkWhole __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct TargetLinkWhole where
+  buildStruct _proxy (TargetLinkWhole __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (TargetLinkWhole __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData TargetLinkWhole where
+  rnf (TargetLinkWhole __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default TargetLinkWhole where
+  def = TargetLinkWhole Default.def Prelude.Nothing
+
+instance Hashable.Hashable TargetLinkWhole where
+  hashWithSalt __salt (TargetLinkWhole _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type TargetIndexerName_id = Glean.Id
+
+data TargetIndexerName = TargetIndexerName{targetIndexerName_id ::
+                                           {-# UNPACK #-} !TargetIndexerName_id,
+                                           targetIndexerName_key :: Prelude.Maybe Text.Text}
+                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TargetIndexerName where
+  toJSON (TargetIndexerName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct TargetIndexerName where
+  buildStruct _proxy (TargetIndexerName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStringType _proxy)
+                                    2
+                                    1
+                                    (Thrift.genText _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (TargetIndexerName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData TargetIndexerName where
+  rnf (TargetIndexerName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default TargetIndexerName where
+  def = TargetIndexerName Default.def Prelude.Nothing
+
+instance Hashable.Hashable TargetIndexerName where
+  hashWithSalt __salt (TargetIndexerName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type TargetIndexer_id = Glean.Id
+
+data TargetIndexer = TargetIndexer{targetIndexer_id ::
+                                   {-# UNPACK #-} !TargetIndexer_id,
+                                   targetIndexer_key :: Prelude.Maybe TargetIndexer_key}
+                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TargetIndexer where
+  toJSON (TargetIndexer __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct TargetIndexer where
+  buildStruct _proxy (TargetIndexer __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (TargetIndexer __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData TargetIndexer where
+  rnf (TargetIndexer __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default TargetIndexer where
+  def = TargetIndexer Default.def Prelude.Nothing
+
+instance Hashable.Hashable TargetIndexer where
+  hashWithSalt __salt (TargetIndexer _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type TargetHash_id = Glean.Id
+
+data TargetHash = TargetHash{targetHash_id ::
+                             {-# UNPACK #-} !TargetHash_id,
+                             targetHash_key :: Prelude.Maybe TargetHash_key}
+                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TargetHash where
+  toJSON (TargetHash __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct TargetHash where
+  buildStruct _proxy (TargetHash __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (TargetHash __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData TargetHash where
+  rnf (TargetHash __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default TargetHash where
+  def = TargetHash Default.def Prelude.Nothing
+
+instance Hashable.Hashable TargetHash where
+  hashWithSalt __salt (TargetHash _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type TargetCallByCallExpr_id = Glean.Id
+
+data TargetCallByCallExpr = TargetCallByCallExpr{targetCallByCallExpr_id
+                                                 :: {-# UNPACK #-} !TargetCallByCallExpr_id,
+                                                 targetCallByCallExpr_key ::
+                                                 Prelude.Maybe TargetCallByCallExpr_key}
+                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TargetCallByCallExpr where
+  toJSON (TargetCallByCallExpr __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct TargetCallByCallExpr where
+  buildStruct _proxy (TargetCallByCallExpr __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (TargetCallByCallExpr __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData TargetCallByCallExpr where
+  rnf (TargetCallByCallExpr __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default TargetCallByCallExpr where
+  def = TargetCallByCallExpr Default.def Prelude.Nothing
+
+instance Hashable.Hashable TargetCallByCallExpr where
+  hashWithSalt __salt (TargetCallByCallExpr _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type TargetCall_id = Glean.Id
+
+data TargetCall = TargetCall{targetCall_id ::
+                             {-# UNPACK #-} !TargetCall_id,
+                             targetCall_key :: Prelude.Maybe TargetCall_key}
+                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TargetCall where
+  toJSON (TargetCall __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct TargetCall where
+  buildStruct _proxy (TargetCall __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (TargetCall __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData TargetCall where
+  rnf (TargetCall __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default TargetCall where
+  def = TargetCall Default.def Prelude.Nothing
+
+instance Hashable.Hashable TargetCall where
+  hashWithSalt __salt (TargetCall _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type TargetByType_id = Glean.Id
+
+data TargetByType = TargetByType{targetByType_id ::
+                                 {-# UNPACK #-} !TargetByType_id,
+                                 targetByType_key :: Prelude.Maybe TargetByType_key}
+                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TargetByType where
+  toJSON (TargetByType __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct TargetByType where
+  buildStruct _proxy (TargetByType __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (TargetByType __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData TargetByType where
+  rnf (TargetByType __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default TargetByType where
+  def = TargetByType Default.def Prelude.Nothing
+
+instance Hashable.Hashable TargetByType where
+  hashWithSalt __salt (TargetByType _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type TargetAttribute_id = Glean.Id
+
+data TargetAttribute = TargetAttribute{targetAttribute_id ::
+                                       {-# UNPACK #-} !TargetAttribute_id,
+                                       targetAttribute_key :: Prelude.Maybe TargetAttribute_key}
+                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TargetAttribute where
+  toJSON (TargetAttribute __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct TargetAttribute where
+  buildStruct _proxy (TargetAttribute __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (TargetAttribute __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData TargetAttribute where
+  rnf (TargetAttribute __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default TargetAttribute where
+  def = TargetAttribute Default.def Prelude.Nothing
+
+instance Hashable.Hashable TargetAttribute where
+  hashWithSalt __salt (TargetAttribute _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type Target_id = Glean.Id
+
+data Target = Target{target_id :: {-# UNPACK #-} !Target_id,
+                     target_key :: Prelude.Maybe Target_key}
+              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Target where
+  toJSON (Target __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct Target where
+  buildStruct _proxy (Target __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (Target __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData Target where
+  rnf (Target __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default Target where
+  def = Target Default.def Prelude.Nothing
+
+instance Hashable.Hashable Target where
+  hashWithSalt __salt (Target _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SourceFileLocation_id = Glean.Id
+
+data SourceFileLocation = SourceFileLocation{sourceFileLocation_id
+                                             :: {-# UNPACK #-} !SourceFileLocation_id,
+                                             sourceFileLocation_key ::
+                                             Prelude.Maybe SourceFileLocation_key}
+                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SourceFileLocation where
+  toJSON (SourceFileLocation __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SourceFileLocation where
+  buildStruct _proxy (SourceFileLocation __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (SourceFileLocation __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SourceFileLocation where
+  rnf (SourceFileLocation __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SourceFileLocation where
+  def = SourceFileLocation Default.def Prelude.Nothing
+
+instance Hashable.Hashable SourceFileLocation where
+  hashWithSalt __salt (SourceFileLocation _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SearchByLocalName_id = Glean.Id
+
+data SearchByLocalName = SearchByLocalName{searchByLocalName_id ::
+                                           {-# UNPACK #-} !SearchByLocalName_id,
+                                           searchByLocalName_key ::
+                                           Prelude.Maybe SearchByLocalName_key}
+                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchByLocalName where
+  toJSON (SearchByLocalName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchByLocalName where
+  buildStruct _proxy (SearchByLocalName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (SearchByLocalName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchByLocalName where
+  rnf (SearchByLocalName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SearchByLocalName where
+  def = SearchByLocalName Default.def Prelude.Nothing
+
+instance Hashable.Hashable SearchByLocalName where
+  hashWithSalt __salt (SearchByLocalName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type RuleKey_id = Glean.Id
+
+data RuleKey = RuleKey{ruleKey_id :: {-# UNPACK #-} !RuleKey_id,
+                       ruleKey_key :: Prelude.Maybe RuleKey_key}
+               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON RuleKey where
+  toJSON (RuleKey __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct RuleKey where
+  buildStruct _proxy (RuleKey __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (RuleKey __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData RuleKey where
+  rnf (RuleKey __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default RuleKey where
+  def = RuleKey Default.def Prelude.Nothing
+
+instance Hashable.Hashable RuleKey where
+  hashWithSalt __salt (RuleKey _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type Platform_id = Glean.Id
+
+data Platform = Platform{platform_id ::
+                         {-# UNPACK #-} !Platform_id,
+                         platform_key :: Prelude.Maybe Text.Text}
+                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Platform where
+  toJSON (Platform __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct Platform where
+  buildStruct _proxy (Platform __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStringType _proxy)
+                                    2
+                                    1
+                                    (Thrift.genText _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (Platform __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData Platform where
+  rnf (Platform __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default Platform where
+  def = Platform Default.def Prelude.Nothing
+
+instance Hashable.Hashable Platform where
+  hashWithSalt __salt (Platform _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type Owner_id = Glean.Id
+
+data Owner = Owner{owner_id :: {-# UNPACK #-} !Owner_id,
+                   owner_key :: Prelude.Maybe Owner_key}
+             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Owner where
+  toJSON (Owner __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct Owner where
+  buildStruct _proxy (Owner __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (Owner __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData Owner where
+  rnf (Owner __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default Owner where
+  def = Owner Default.def Prelude.Nothing
+
+instance Hashable.Hashable Owner where
+  hashWithSalt __salt (Owner _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type OutsTarget_id = Glean.Id
+
+data OutsTarget = OutsTarget{outsTarget_id ::
+                             {-# UNPACK #-} !OutsTarget_id,
+                             outsTarget_key :: Prelude.Maybe OutsTarget_key}
+                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON OutsTarget where
+  toJSON (OutsTarget __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct OutsTarget where
+  buildStruct _proxy (OutsTarget __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (OutsTarget __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData OutsTarget where
+  rnf (OutsTarget __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default OutsTarget where
+  def = OutsTarget Default.def Prelude.Nothing
+
+instance Hashable.Hashable OutsTarget where
+  hashWithSalt __salt (OutsTarget _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type OutputLabel_id = Glean.Id
+
+data OutputLabel = OutputLabel{outputLabel_id ::
+                               {-# UNPACK #-} !OutputLabel_id,
+                               outputLabel_key :: Prelude.Maybe Text.Text}
+                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON OutputLabel where
+  toJSON (OutputLabel __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct OutputLabel where
+  buildStruct _proxy (OutputLabel __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStringType _proxy)
+                                    2
+                                    1
+                                    (Thrift.genText _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (OutputLabel __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData OutputLabel where
+  rnf (OutputLabel __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default OutputLabel where
+  def = OutputLabel Default.def Prelude.Nothing
+
+instance Hashable.Hashable OutputLabel where
+  hashWithSalt __salt (OutputLabel _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type OutTarget_id = Glean.Id
+
+data OutTarget = OutTarget{outTarget_id ::
+                           {-# UNPACK #-} !OutTarget_id,
+                           outTarget_key :: Prelude.Maybe OutTarget_key}
+                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON OutTarget where
+  toJSON (OutTarget __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct OutTarget where
+  buildStruct _proxy (OutTarget __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (OutTarget __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData OutTarget where
+  rnf (OutTarget __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default OutTarget where
+  def = OutTarget Default.def Prelude.Nothing
+
+instance Hashable.Hashable OutTarget where
+  hashWithSalt __salt (OutTarget _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type LocatorWithLabel_id = Glean.Id
+
+data LocatorWithLabel = LocatorWithLabel{locatorWithLabel_id ::
+                                         {-# UNPACK #-} !LocatorWithLabel_id,
+                                         locatorWithLabel_key :: Prelude.Maybe LocatorWithLabel_key}
+                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON LocatorWithLabel where
+  toJSON (LocatorWithLabel __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct LocatorWithLabel where
+  buildStruct _proxy (LocatorWithLabel __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (LocatorWithLabel __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData LocatorWithLabel where
+  rnf (LocatorWithLabel __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default LocatorWithLabel where
+  def = LocatorWithLabel Default.def Prelude.Nothing
+
+instance Hashable.Hashable LocatorWithLabel where
+  hashWithSalt __salt (LocatorWithLabel _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type LocatorReverseDeps_id = Glean.Id
+
+data LocatorReverseDeps = LocatorReverseDeps{locatorReverseDeps_id
+                                             :: {-# UNPACK #-} !LocatorReverseDeps_id,
+                                             locatorReverseDeps_key ::
+                                             Prelude.Maybe LocatorReverseDeps_key}
+                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON LocatorReverseDeps where
+  toJSON (LocatorReverseDeps __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct LocatorReverseDeps where
+  buildStruct _proxy (LocatorReverseDeps __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (LocatorReverseDeps __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData LocatorReverseDeps where
+  rnf (LocatorReverseDeps __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default LocatorReverseDeps where
+  def = LocatorReverseDeps Default.def Prelude.Nothing
+
+instance Hashable.Hashable LocatorReverseDeps where
+  hashWithSalt __salt (LocatorReverseDeps _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type LocatorReverseDep_id = Glean.Id
+
+data LocatorReverseDep = LocatorReverseDep{locatorReverseDep_id ::
+                                           {-# UNPACK #-} !LocatorReverseDep_id,
+                                           locatorReverseDep_key ::
+                                           Prelude.Maybe LocatorReverseDep_key}
+                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON LocatorReverseDep where
+  toJSON (LocatorReverseDep __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct LocatorReverseDep where
+  buildStruct _proxy (LocatorReverseDep __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (LocatorReverseDep __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData LocatorReverseDep where
+  rnf (LocatorReverseDep __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default LocatorReverseDep where
+  def = LocatorReverseDep Default.def Prelude.Nothing
+
+instance Hashable.Hashable LocatorReverseDep where
+  hashWithSalt __salt (LocatorReverseDep _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type Locator_id = Glean.Id
+
+data Locator = Locator{locator_id :: {-# UNPACK #-} !Locator_id,
+                       locator_key :: Prelude.Maybe Locator_key}
+               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Locator where
+  toJSON (Locator __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct Locator where
+  buildStruct _proxy (Locator __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (Locator __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData Locator where
+  rnf (Locator __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default Locator where
+  def = Locator Default.def Prelude.Nothing
+
+instance Hashable.Hashable Locator where
+  hashWithSalt __salt (Locator _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type LocalNameLowerCase_id = Glean.Id
+
+data LocalNameLowerCase = LocalNameLowerCase{localNameLowerCase_id
+                                             :: {-# UNPACK #-} !LocalNameLowerCase_id,
+                                             localNameLowerCase_key ::
+                                             Prelude.Maybe LocalNameLowerCase_key}
+                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON LocalNameLowerCase where
+  toJSON (LocalNameLowerCase __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct LocalNameLowerCase where
+  buildStruct _proxy (LocalNameLowerCase __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (LocalNameLowerCase __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData LocalNameLowerCase where
+  rnf (LocalNameLowerCase __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default LocalNameLowerCase where
+  def = LocalNameLowerCase Default.def Prelude.Nothing
+
+instance Hashable.Hashable LocalNameLowerCase where
+  hashWithSalt __salt (LocalNameLowerCase _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type LocalName_id = Glean.Id
+
+data LocalName = LocalName{localName_id ::
+                           {-# UNPACK #-} !LocalName_id,
+                           localName_key :: Prelude.Maybe Text.Text}
+                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON LocalName where
+  toJSON (LocalName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct LocalName where
+  buildStruct _proxy (LocalName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStringType _proxy)
+                                    2
+                                    1
+                                    (Thrift.genText _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (LocalName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData LocalName where
+  rnf (LocalName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default LocalName where
+  def = LocalName Default.def Prelude.Nothing
+
+instance Hashable.Hashable LocalName where
+  hashWithSalt __salt (LocalName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type Labels_id = Glean.Id
+
+data Labels = Labels{labels_id :: {-# UNPACK #-} !Labels_id,
+                     labels_key :: Prelude.Maybe [Label]}
+              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Labels where
+  toJSON (Labels __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct Labels where
+  buildStruct _proxy (Labels __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getListType _proxy)
+                                    2
+                                    1
+                                    (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                                       (Thrift.buildStruct _proxy)
+                                       _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (Labels __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData Labels where
+  rnf (Labels __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default Labels where
+  def = Labels Default.def Prelude.Nothing
+
+instance Hashable.Hashable Labels where
+  hashWithSalt __salt (Labels _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type Label_id = Glean.Id
+
+data Label = Label{label_id :: {-# UNPACK #-} !Label_id,
+                   label_key :: Prelude.Maybe Text.Text}
+             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Label where
+  toJSON (Label __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct Label where
+  buildStruct _proxy (Label __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStringType _proxy)
+                                    2
+                                    1
+                                    (Thrift.genText _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (Label __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData Label where
+  rnf (Label __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default Label where
+  def = Label Default.def Prelude.Nothing
+
+instance Hashable.Hashable Label where
+  hashWithSalt __salt (Label _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type IndexerName_id = Glean.Id
+
+data IndexerName = IndexerName{indexerName_id ::
+                               {-# UNPACK #-} !IndexerName_id,
+                               indexerName_key :: Prelude.Maybe Text.Text}
+                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON IndexerName where
+  toJSON (IndexerName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct IndexerName where
+  buildStruct _proxy (IndexerName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStringType _proxy)
+                                    2
+                                    1
+                                    (Thrift.genText _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (IndexerName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData IndexerName where
+  rnf (IndexerName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default IndexerName where
+  def = IndexerName Default.def Prelude.Nothing
+
+instance Hashable.Hashable IndexerName where
+  hashWithSalt __salt (IndexerName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type FileXRefs_id = Glean.Id
+
+data FileXRefs = FileXRefs{fileXRefs_id ::
+                           {-# UNPACK #-} !FileXRefs_id,
+                           fileXRefs_key :: Prelude.Maybe FileXRefs_key}
+                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FileXRefs where
+  toJSON (FileXRefs __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct FileXRefs where
+  buildStruct _proxy (FileXRefs __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (FileXRefs __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData FileXRefs where
+  rnf (FileXRefs __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default FileXRefs where
+  def = FileXRefs Default.def Prelude.Nothing
+
+instance Hashable.Hashable FileXRefs where
+  hashWithSalt __salt (FileXRefs _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type FileToTarget_id = Glean.Id
+
+data FileToTarget = FileToTarget{fileToTarget_id ::
+                                 {-# UNPACK #-} !FileToTarget_id,
+                                 fileToTarget_key :: Prelude.Maybe FileToTarget_key}
+                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FileToTarget where
+  toJSON (FileToTarget __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct FileToTarget where
+  buildStruct _proxy (FileToTarget __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (FileToTarget __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData FileToTarget where
+  rnf (FileToTarget __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default FileToTarget where
+  def = FileToTarget Default.def Prelude.Nothing
+
+instance Hashable.Hashable FileToTarget where
+  hashWithSalt __salt (FileToTarget _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type FileTarget_id = Glean.Id
+
+data FileTarget = FileTarget{fileTarget_id ::
+                             {-# UNPACK #-} !FileTarget_id,
+                             fileTarget_key :: Prelude.Maybe FileTarget_key}
+                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FileTarget where
+  toJSON (FileTarget __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct FileTarget where
+  buildStruct _proxy (FileTarget __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (FileTarget __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData FileTarget where
+  rnf (FileTarget __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default FileTarget where
+  def = FileTarget Default.def Prelude.Nothing
+
+instance Hashable.Hashable FileTarget where
+  hashWithSalt __salt (FileTarget _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type FileResolved_id = Glean.Id
+
+data FileResolved = FileResolved{fileResolved_id ::
+                                 {-# UNPACK #-} !FileResolved_id,
+                                 fileResolved_key :: Prelude.Maybe FileResolved_key}
+                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FileResolved where
+  toJSON (FileResolved __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct FileResolved where
+  buildStruct _proxy (FileResolved __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (FileResolved __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData FileResolved where
+  rnf (FileResolved __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default FileResolved where
+  def = FileResolved Default.def Prelude.Nothing
+
+instance Hashable.Hashable FileResolved where
+  hashWithSalt __salt (FileResolved _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type FileEntity_id = Glean.Id
+
+data FileEntity = FileEntity{fileEntity_id ::
+                             {-# UNPACK #-} !FileEntity_id,
+                             fileEntity_key :: Prelude.Maybe FileEntity_key}
+                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FileEntity where
+  toJSON (FileEntity __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct FileEntity where
+  buildStruct _proxy (FileEntity __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (FileEntity __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData FileEntity where
+  rnf (FileEntity __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default FileEntity where
+  def = FileEntity Default.def Prelude.Nothing
+
+instance Hashable.Hashable FileEntity where
+  hashWithSalt __salt (FileEntity _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type FileDefinition_id = Glean.Id
+
+data FileDefinition = FileDefinition{fileDefinition_id ::
+                                     {-# UNPACK #-} !FileDefinition_id,
+                                     fileDefinition_key :: Prelude.Maybe FileDefinition_key}
+                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FileDefinition where
+  toJSON (FileDefinition __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct FileDefinition where
+  buildStruct _proxy (FileDefinition __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (FileDefinition __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData FileDefinition where
+  rnf (FileDefinition __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default FileDefinition where
+  def = FileDefinition Default.def Prelude.Nothing
+
+instance Hashable.Hashable FileDefinition where
+  hashWithSalt __salt (FileDefinition _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type FileCall_id = Glean.Id
+
+data FileCall = FileCall{fileCall_id ::
+                         {-# UNPACK #-} !FileCall_id,
+                         fileCall_key :: Prelude.Maybe FileCall_key}
+                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FileCall where
+  toJSON (FileCall __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct FileCall where
+  buildStruct _proxy (FileCall __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (FileCall __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData FileCall where
+  rnf (FileCall __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default FileCall where
+  def = FileCall Default.def Prelude.Nothing
+
+instance Hashable.Hashable FileCall where
+  hashWithSalt __salt (FileCall _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type File_id = Glean.Id
+
+data File = File{file_id :: {-# UNPACK #-} !File_id,
+                 file_key :: Prelude.Maybe File_key}
+            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON File where
+  toJSON (File __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct File where
+  buildStruct _proxy (File __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (File __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData File where
+  rnf (File __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default File where
+  def = File Default.def Prelude.Nothing
+
+instance Hashable.Hashable File where
+  hashWithSalt __salt (File _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type IndexFailureX_id = Glean.Id
+
+data IndexFailureX = IndexFailureX{indexFailureX_id ::
+                                   {-# UNPACK #-} !IndexFailureX_id,
+                                   indexFailureX_key :: Prelude.Maybe IndexFailureX_key}
+                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON IndexFailureX where
+  toJSON (IndexFailureX __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct IndexFailureX where
+  buildStruct _proxy (IndexFailureX __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (IndexFailureX __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData IndexFailureX where
+  rnf (IndexFailureX __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default IndexFailureX where
+  def = IndexFailureX Default.def Prelude.Nothing
+
+instance Hashable.Hashable IndexFailureX where
+  hashWithSalt __salt (IndexFailureX _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type DestinationUses_id = Glean.Id
+
+data DestinationUses = DestinationUses{destinationUses_id ::
+                                       {-# UNPACK #-} !DestinationUses_id,
+                                       destinationUses_key :: Prelude.Maybe DestinationUses_key}
+                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON DestinationUses where
+  toJSON (DestinationUses __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct DestinationUses where
+  buildStruct _proxy (DestinationUses __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (DestinationUses __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData DestinationUses where
+  rnf (DestinationUses __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default DestinationUses where
+  def = DestinationUses Default.def Prelude.Nothing
+
+instance Hashable.Hashable DestinationUses where
+  hashWithSalt __salt (DestinationUses _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type TargetDependencies_id = Glean.Id
+
+data TargetDependencies = TargetDependencies{targetDependencies_id
+                                             :: {-# UNPACK #-} !TargetDependencies_id,
+                                             targetDependencies_key ::
+                                             Prelude.Maybe TargetDependencies_key}
+                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TargetDependencies where
+  toJSON (TargetDependencies __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct TargetDependencies where
+  buildStruct _proxy (TargetDependencies __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (TargetDependencies __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData TargetDependencies where
+  rnf (TargetDependencies __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default TargetDependencies where
+  def = TargetDependencies Default.def Prelude.Nothing
+
+instance Hashable.Hashable TargetDependencies where
+  hashWithSalt __salt (TargetDependencies _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type DefinitionMetadata_id = Glean.Id
+
+data DefinitionMetadata = DefinitionMetadata{definitionMetadata_id
+                                             :: {-# UNPACK #-} !DefinitionMetadata_id,
+                                             definitionMetadata_key ::
+                                             Prelude.Maybe DefinitionMetadata_key}
+                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON DefinitionMetadata where
+  toJSON (DefinitionMetadata __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct DefinitionMetadata where
+  buildStruct _proxy (DefinitionMetadata __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (DefinitionMetadata __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData DefinitionMetadata where
+  rnf (DefinitionMetadata __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default DefinitionMetadata where
+  def = DefinitionMetadata Default.def Prelude.Nothing
+
+instance Hashable.Hashable DefinitionMetadata where
+  hashWithSalt __salt (DefinitionMetadata _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type DefinitionLocation_id = Glean.Id
+
+data DefinitionLocation = DefinitionLocation{definitionLocation_id
+                                             :: {-# UNPACK #-} !DefinitionLocation_id,
+                                             definitionLocation_key ::
+                                             Prelude.Maybe DefinitionLocation_key}
+                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON DefinitionLocation where
+  toJSON (DefinitionLocation __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct DefinitionLocation where
+  buildStruct _proxy (DefinitionLocation __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (DefinitionLocation __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData DefinitionLocation where
+  rnf (DefinitionLocation __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default DefinitionLocation where
+  def = DefinitionLocation Default.def Prelude.Nothing
+
+instance Hashable.Hashable DefinitionLocation where
+  hashWithSalt __salt (DefinitionLocation _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type DefinitionKind_id = Glean.Id
+
+data DefinitionKind = DefinitionKind{definitionKind_id ::
+                                     {-# UNPACK #-} !DefinitionKind_id,
+                                     definitionKind_key :: Prelude.Maybe DefinitionKind_key}
+                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON DefinitionKind where
+  toJSON (DefinitionKind __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct DefinitionKind where
+  buildStruct _proxy (DefinitionKind __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (DefinitionKind __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData DefinitionKind where
+  rnf (DefinitionKind __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default DefinitionKind where
+  def = DefinitionKind Default.def Prelude.Nothing
+
+instance Hashable.Hashable DefinitionKind where
+  hashWithSalt __salt (DefinitionKind _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type Definition_id = Glean.Id
+
+data Definition = Definition{definition_id ::
+                             {-# UNPACK #-} !Definition_id,
+                             definition_key :: Prelude.Maybe Definition_key}
+                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Definition where
+  toJSON (Definition __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct Definition where
+  buildStruct _proxy (Definition __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (Definition __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData Definition where
+  rnf (Definition __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default Definition where
+  def = Definition Default.def Prelude.Nothing
+
+instance Hashable.Hashable Definition where
+  hashWithSalt __salt (Definition _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type Consumer_id = Glean.Id
+
+data Consumer = Consumer{consumer_id ::
+                         {-# UNPACK #-} !Consumer_id,
+                         consumer_key :: Prelude.Maybe Consumer_key}
+                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Consumer where
+  toJSON (Consumer __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct Consumer where
+  buildStruct _proxy (Consumer __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (Consumer __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData Consumer where
+  rnf (Consumer __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default Consumer where
+  def = Consumer Default.def Prelude.Nothing
+
+instance Hashable.Hashable Consumer where
+  hashWithSalt __salt (Consumer _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type CallExpr_id = Glean.Id
+
+data CallExpr = CallExpr{callExpr_id ::
+                         {-# UNPACK #-} !CallExpr_id,
+                         callExpr_key :: Prelude.Maybe CallExpr_key}
+                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON CallExpr where
+  toJSON (CallExpr __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct CallExpr where
+  buildStruct _proxy (CallExpr __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (CallExpr __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData CallExpr where
+  rnf (CallExpr __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default CallExpr where
+  def = CallExpr Default.def Prelude.Nothing
+
+instance Hashable.Hashable CallExpr where
+  hashWithSalt __salt (CallExpr _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type CallArgument_id = Glean.Id
+
+data CallArgument = CallArgument{callArgument_id ::
+                                 {-# UNPACK #-} !CallArgument_id,
+                                 callArgument_key :: Prelude.Maybe CallArgument_key}
+                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON CallArgument where
+  toJSON (CallArgument __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct CallArgument where
+  buildStruct _proxy (CallArgument __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (CallArgument __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData CallArgument where
+  rnf (CallArgument __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default CallArgument where
+  def = CallArgument Default.def Prelude.Nothing
+
+instance Hashable.Hashable CallArgument where
+  hashWithSalt __salt (CallArgument _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type AttributeName_id = Glean.Id
+
+data AttributeName = AttributeName{attributeName_id ::
+                                   {-# UNPACK #-} !AttributeName_id,
+                                   attributeName_key :: Prelude.Maybe Text.Text}
+                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON AttributeName where
+  toJSON (AttributeName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct AttributeName where
+  buildStruct _proxy (AttributeName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStringType _proxy)
+                                    2
+                                    1
+                                    (Thrift.genText _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (AttributeName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData AttributeName where
+  rnf (AttributeName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default AttributeName where
+  def = AttributeName Default.def Prelude.Nothing
+
+instance Hashable.Hashable AttributeName where
+  hashWithSalt __salt (AttributeName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type AttributeValue_id = Glean.Id
+
+data AttributeValue = AttributeValue{attributeValue_id ::
+                                     {-# UNPACK #-} !AttributeValue_id,
+                                     attributeValue_key :: Prelude.Maybe AttributeValue_key}
+                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON AttributeValue where
+  toJSON (AttributeValue __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct AttributeValue where
+  buildStruct _proxy (AttributeValue __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (AttributeValue __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData AttributeValue where
+  rnf (AttributeValue __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default AttributeValue where
+  def = AttributeValue Default.def Prelude.Nothing
+
+instance Hashable.Hashable AttributeValue where
+  hashWithSalt __salt (AttributeValue _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type ArgumentValue_id = Glean.Id
+
+data ArgumentValue = ArgumentValue{argumentValue_id ::
+                                   {-# UNPACK #-} !ArgumentValue_id,
+                                   argumentValue_key :: Prelude.Maybe ArgumentValue_key}
+                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ArgumentValue where
+  toJSON (ArgumentValue __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct ArgumentValue where
+  buildStruct _proxy (ArgumentValue __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (ArgumentValue __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ArgumentValue where
+  rnf (ArgumentValue __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default ArgumentValue where
+  def = ArgumentValue Default.def Prelude.Nothing
+
+instance Hashable.Hashable ArgumentValue where
+  hashWithSalt __salt (ArgumentValue _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+data XRefDestination = XRefDestination_locator Locator
+                     | XRefDestination_file Glean.Schema.Src.File
+                     | XRefDestination_definition Definition
+                     | XRefDestination_EMPTY
+                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON XRefDestination where
+  toJSON (XRefDestination_locator __locator)
+    = Aeson.object ["locator" .= __locator]
+  toJSON (XRefDestination_file __file)
+    = Aeson.object ["file" .= __file]
+  toJSON (XRefDestination_definition __definition)
+    = Aeson.object ["definition" .= __definition]
+  toJSON XRefDestination_EMPTY = Aeson.object []
+
+instance Thrift.ThriftStruct XRefDestination where
+  buildStruct _proxy (XRefDestination_locator __locator)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "locator" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __locator)]
+  buildStruct _proxy (XRefDestination_file __file)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 2 0
+           (Thrift.buildStruct _proxy __file)]
+  buildStruct _proxy (XRefDestination_definition __definition)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "definition" (Thrift.getStructType _proxy)
+           3
+           0
+           (Thrift.buildStruct _proxy __definition)]
+  buildStruct _proxy XRefDestination_EMPTY
+    = Thrift.genStruct _proxy []
+  parseStruct _proxy
+    = do _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap
+         case _fieldBegin of
+           Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                     1 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (XRefDestination_locator _val)
+                                                     2 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (XRefDestination_file _val)
+                                                     3 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (XRefDestination_definition _val)
+                                                     _ -> do Thrift.parseSkip _proxy _type
+                                                               Prelude.Nothing
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return XRefDestination_EMPTY
+           Thrift.FieldEnd -> Prelude.return XRefDestination_EMPTY
+    where
+      _idMap
+        = HashMap.fromList [("locator", 1), ("file", 2), ("definition", 3)]
+
+instance DeepSeq.NFData XRefDestination where
+  rnf (XRefDestination_locator __locator) = DeepSeq.rnf __locator
+  rnf (XRefDestination_file __file) = DeepSeq.rnf __file
+  rnf (XRefDestination_definition __definition)
+    = DeepSeq.rnf __definition
+  rnf XRefDestination_EMPTY = ()
+
+instance Default.Default XRefDestination where
+  def = XRefDestination_EMPTY
+
+instance Hashable.Hashable XRefDestination where
+  hashWithSalt __salt (XRefDestination_locator _locator)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 1 _locator)
+  hashWithSalt __salt (XRefDestination_file _file)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 2 _file)
+  hashWithSalt __salt (XRefDestination_definition _definition)
+    = Hashable.hashWithSalt __salt
+        (Hashable.hashWithSalt 3 _definition)
+  hashWithSalt __salt XRefDestination_EMPTY
+    = Hashable.hashWithSalt __salt (0 :: Prelude.Int)
+
+data XRef = XRef{xRef_destination :: XRefDestination,
+                 xRef_ranges :: [Glean.Schema.Src.ByteSpan]}
+            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON XRef where
+  toJSON (XRef __field__destination __field__ranges)
+    = Aeson.object
+        ("destination" .= __field__destination :
+           "ranges" .= __field__ranges : Prelude.mempty)
+
+instance Thrift.ThriftStruct XRef where
+  buildStruct _proxy (XRef __field__destination __field__ranges)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "destination" (Thrift.getStructType _proxy)
+           1
+           0
+           (Thrift.buildStruct _proxy __field__destination)
+           :
+           Thrift.genField _proxy "ranges" (Thrift.getListType _proxy) 2 1
+             (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                (Thrift.buildStruct _proxy)
+                __field__ranges)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__destination <- ST.newSTRef Default.def
+            __field__ranges <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__destination
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__ranges
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__destination <- ST.readSTRef
+                                                                      __field__destination
+                                             !__val__ranges <- ST.readSTRef __field__ranges
+                                             Prelude.pure (XRef __val__destination __val__ranges)
+              _idMap = HashMap.fromList [("destination", 1), ("ranges", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData XRef where
+  rnf (XRef __field__destination __field__ranges)
+    = DeepSeq.rnf __field__destination `Prelude.seq`
+        DeepSeq.rnf __field__ranges `Prelude.seq` ()
+
+instance Default.Default XRef where
+  def = XRef Default.def Default.def
+
+instance Hashable.Hashable XRef where
+  hashWithSalt __salt (XRef _destination _ranges)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _destination)
+        _ranges
+
+data TranslationUnit_key = TranslationUnit_key{translationUnit_key_file
+                                               :: Glean.Schema.Src.File,
+                                               translationUnit_key_target :: Locator,
+                                               translationUnit_key_platform ::
+                                               Prelude.Maybe Platform}
+                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TranslationUnit_key where
+  toJSON
+    (TranslationUnit_key __field__file __field__target
+       __field__platform)
+    = Aeson.object
+        ("file" .= __field__file :
+           "target" .= __field__target :
+             Prelude.maybe Prelude.id ((:) . ("platform" .=)) __field__platform
+               Prelude.mempty)
+
+instance Thrift.ThriftStruct TranslationUnit_key where
+  buildStruct _proxy
+    (TranslationUnit_key __field__file __field__target
+       __field__platform)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__file)
+           :
+           Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__target)
+             :
+             case __field__platform of
+               Prelude.Just _val -> Thrift.genField _proxy "platform"
+                                      (Thrift.getStructType _proxy)
+                                      3
+                                      2
+                                      (Thrift.buildStruct _proxy _val)
+                                      : []
+               Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__file <- ST.newSTRef Default.def
+            __field__target <- ST.newSTRef Default.def
+            __field__platform <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__file
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__target
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__platform
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__file <- ST.readSTRef __field__file
+                                             !__val__target <- ST.readSTRef __field__target
+                                             !__val__platform <- ST.readSTRef __field__platform
+                                             Prelude.pure
+                                               (TranslationUnit_key __val__file __val__target
+                                                  __val__platform)
+              _idMap
+                = HashMap.fromList [("file", 1), ("target", 2), ("platform", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData TranslationUnit_key where
+  rnf
+    (TranslationUnit_key __field__file __field__target
+       __field__platform)
+    = DeepSeq.rnf __field__file `Prelude.seq`
+        DeepSeq.rnf __field__target `Prelude.seq`
+          DeepSeq.rnf __field__platform `Prelude.seq` ()
+
+instance Default.Default TranslationUnit_key where
+  def = TranslationUnit_key Default.def Default.def Prelude.Nothing
+
+instance Hashable.Hashable TranslationUnit_key where
+  hashWithSalt __salt (TranslationUnit_key _file _target _platform)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _file)
+           _target)
+        _platform
+
+data TargetUses_key = TargetUses_key{targetUses_key_locator ::
+                                     Locator,
+                                     targetUses_key_file :: Glean.Schema.Src.File,
+                                     targetUses_key_spans :: [Glean.Schema.Src.ByteSpan]}
+                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TargetUses_key where
+  toJSON
+    (TargetUses_key __field__locator __field__file __field__spans)
+    = Aeson.object
+        ("locator" .= __field__locator :
+           "file" .= __field__file :
+             "spans" .= __field__spans : Prelude.mempty)
+
+instance Thrift.ThriftStruct TargetUses_key where
+  buildStruct _proxy
+    (TargetUses_key __field__locator __field__file __field__spans)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "locator" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__locator)
+           :
+           Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__file)
+             :
+             Thrift.genField _proxy "spans" (Thrift.getListType _proxy) 3 2
+               (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                  (Thrift.buildStruct _proxy)
+                  __field__spans)
+               : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__locator <- ST.newSTRef Default.def
+            __field__file <- ST.newSTRef Default.def
+            __field__spans <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__locator
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__file
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef __field__spans
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__locator <- ST.readSTRef
+                                                                  __field__locator
+                                             !__val__file <- ST.readSTRef __field__file
+                                             !__val__spans <- ST.readSTRef __field__spans
+                                             Prelude.pure
+                                               (TargetUses_key __val__locator __val__file
+                                                  __val__spans)
+              _idMap
+                = HashMap.fromList [("locator", 1), ("file", 2), ("spans", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData TargetUses_key where
+  rnf (TargetUses_key __field__locator __field__file __field__spans)
+    = DeepSeq.rnf __field__locator `Prelude.seq`
+        DeepSeq.rnf __field__file `Prelude.seq`
+          DeepSeq.rnf __field__spans `Prelude.seq` ()
+
+instance Default.Default TargetUses_key where
+  def = TargetUses_key Default.def Default.def Default.def
+
+instance Hashable.Hashable TargetUses_key where
+  hashWithSalt __salt (TargetUses_key _locator _file _spans)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _locator)
+           _file)
+        _spans
+
+data TargetSourcesBaseModule_key = TargetSourcesBaseModule_key{targetSourcesBaseModule_key_locator
+                                                               :: Target,
+                                                               targetSourcesBaseModule_key_srcs ::
+                                                               [File],
+                                                               targetSourcesBaseModule_key_baseModule
+                                                               :: Prelude.Maybe AttributeValue}
+                                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TargetSourcesBaseModule_key where
+  toJSON
+    (TargetSourcesBaseModule_key __field__locator __field__srcs
+       __field__baseModule)
+    = Aeson.object
+        ("locator" .= __field__locator :
+           "srcs" .= __field__srcs :
+             Prelude.maybe Prelude.id ((:) . ("baseModule" .=))
+               __field__baseModule
+               Prelude.mempty)
+
+instance Thrift.ThriftStruct TargetSourcesBaseModule_key where
+  buildStruct _proxy
+    (TargetSourcesBaseModule_key __field__locator __field__srcs
+       __field__baseModule)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "locator" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__locator)
+           :
+           Thrift.genField _proxy "srcs" (Thrift.getListType _proxy) 2 1
+             (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                (Thrift.buildStruct _proxy)
+                __field__srcs)
+             :
+             case __field__baseModule of
+               Prelude.Just _val -> Thrift.genField _proxy "baseModule"
+                                      (Thrift.getStructType _proxy)
+                                      3
+                                      2
+                                      (Thrift.buildStruct _proxy _val)
+                                      : []
+               Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__locator <- ST.newSTRef Default.def
+            __field__srcs <- ST.newSTRef Default.def
+            __field__baseModule <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__locator
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef __field__srcs
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__baseModule
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__locator <- ST.readSTRef
+                                                                  __field__locator
+                                             !__val__srcs <- ST.readSTRef __field__srcs
+                                             !__val__baseModule <- ST.readSTRef __field__baseModule
+                                             Prelude.pure
+                                               (TargetSourcesBaseModule_key __val__locator
+                                                  __val__srcs
+                                                  __val__baseModule)
+              _idMap
+                = HashMap.fromList [("locator", 1), ("srcs", 2), ("baseModule", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData TargetSourcesBaseModule_key where
+  rnf
+    (TargetSourcesBaseModule_key __field__locator __field__srcs
+       __field__baseModule)
+    = DeepSeq.rnf __field__locator `Prelude.seq`
+        DeepSeq.rnf __field__srcs `Prelude.seq`
+          DeepSeq.rnf __field__baseModule `Prelude.seq` ()
+
+instance Default.Default TargetSourcesBaseModule_key where
+  def
+    = TargetSourcesBaseModule_key Default.def Default.def
+        Prelude.Nothing
+
+instance Hashable.Hashable TargetSourcesBaseModule_key where
+  hashWithSalt __salt
+    (TargetSourcesBaseModule_key _locator _srcs _baseModule)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _locator)
+           _srcs)
+        _baseModule
+
+data TargetSources_key = TargetSources_key{targetSources_key_target
+                                           :: Target,
+                                           targetSources_key_headers :: [File],
+                                           targetSources_key_exportedHeaders :: [File],
+                                           targetSources_key_srcs :: [File]}
+                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TargetSources_key where
+  toJSON
+    (TargetSources_key __field__target __field__headers
+       __field__exportedHeaders __field__srcs)
+    = Aeson.object
+        ("target" .= __field__target :
+           "headers" .= __field__headers :
+             "exportedHeaders" .= __field__exportedHeaders :
+               "srcs" .= __field__srcs : Prelude.mempty)
+
+instance Thrift.ThriftStruct TargetSources_key where
+  buildStruct _proxy
+    (TargetSources_key __field__target __field__headers
+       __field__exportedHeaders __field__srcs)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__target)
+           :
+           Thrift.genField _proxy "headers" (Thrift.getListType _proxy) 2 1
+             (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                (Thrift.buildStruct _proxy)
+                __field__headers)
+             :
+             Thrift.genField _proxy "exportedHeaders"
+               (Thrift.getListType _proxy)
+               3
+               2
+               (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                  (Thrift.buildStruct _proxy)
+                  __field__exportedHeaders)
+               :
+               Thrift.genField _proxy "srcs" (Thrift.getListType _proxy) 4 3
+                 (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                    (Thrift.buildStruct _proxy)
+                    __field__srcs)
+                 : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__target <- ST.newSTRef Default.def
+            __field__headers <- ST.newSTRef Default.def
+            __field__exportedHeaders <- ST.newSTRef Default.def
+            __field__srcs <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__target
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__headers
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__exportedHeaders
+                                                                          _val
+                                                                 4 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef __field__srcs
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__target <- ST.readSTRef
+                                                                 __field__target
+                                             !__val__headers <- ST.readSTRef __field__headers
+                                             !__val__exportedHeaders <- ST.readSTRef
+                                                                          __field__exportedHeaders
+                                             !__val__srcs <- ST.readSTRef __field__srcs
+                                             Prelude.pure
+                                               (TargetSources_key __val__target __val__headers
+                                                  __val__exportedHeaders
+                                                  __val__srcs)
+              _idMap
+                = HashMap.fromList
+                    [("target", 1), ("headers", 2), ("exportedHeaders", 3),
+                     ("srcs", 4)]
+            _parse 0)
+
+instance DeepSeq.NFData TargetSources_key where
+  rnf
+    (TargetSources_key __field__target __field__headers
+       __field__exportedHeaders __field__srcs)
+    = DeepSeq.rnf __field__target `Prelude.seq`
+        DeepSeq.rnf __field__headers `Prelude.seq`
+          DeepSeq.rnf __field__exportedHeaders `Prelude.seq`
+            DeepSeq.rnf __field__srcs `Prelude.seq` ()
+
+instance Default.Default TargetSources_key where
+  def
+    = TargetSources_key Default.def Default.def Default.def Default.def
+
+instance Hashable.Hashable TargetSources_key where
+  hashWithSalt __salt
+    (TargetSources_key _target _headers _exportedHeaders _srcs)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _target)
+              _headers)
+           _exportedHeaders)
+        _srcs
+
+data TargetOuts_key = TargetOuts_key{targetOuts_key_target ::
+                                     Target,
+                                     targetOuts_key_outputLabel :: Prelude.Maybe OutputLabel,
+                                     targetOuts_key_file :: Glean.Schema.Src.File}
+                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TargetOuts_key where
+  toJSON
+    (TargetOuts_key __field__target __field__outputLabel __field__file)
+    = Aeson.object
+        ("target" .= __field__target :
+           Prelude.maybe Prelude.id ((:) . ("outputLabel" .=))
+             __field__outputLabel
+             ("file" .= __field__file : Prelude.mempty))
+
+instance Thrift.ThriftStruct TargetOuts_key where
+  buildStruct _proxy
+    (TargetOuts_key __field__target __field__outputLabel __field__file)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__target)
+           :
+           let (__cereal__outputLabel, __id__outputLabel)
+                 = case __field__outputLabel of
+                     Prelude.Just _val -> ((:)
+                                             (Thrift.genField _proxy "outputLabel"
+                                                (Thrift.getStructType _proxy)
+                                                2
+                                                1
+                                                (Thrift.buildStruct _proxy _val)),
+                                           2)
+                     Prelude.Nothing -> (Prelude.id, 1)
+             in
+             __cereal__outputLabel
+               (Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 3
+                  __id__outputLabel
+                  (Thrift.buildStruct _proxy __field__file)
+                  : []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__target <- ST.newSTRef Default.def
+            __field__outputLabel <- ST.newSTRef Prelude.Nothing
+            __field__file <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__target
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__outputLabel
+                                                                          (Prelude.Just _val)
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__file
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__target <- ST.readSTRef
+                                                                 __field__target
+                                             !__val__outputLabel <- ST.readSTRef
+                                                                      __field__outputLabel
+                                             !__val__file <- ST.readSTRef __field__file
+                                             Prelude.pure
+                                               (TargetOuts_key __val__target __val__outputLabel
+                                                  __val__file)
+              _idMap
+                = HashMap.fromList [("target", 1), ("outputLabel", 2), ("file", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData TargetOuts_key where
+  rnf
+    (TargetOuts_key __field__target __field__outputLabel __field__file)
+    = DeepSeq.rnf __field__target `Prelude.seq`
+        DeepSeq.rnf __field__outputLabel `Prelude.seq`
+          DeepSeq.rnf __field__file `Prelude.seq` ()
+
+instance Default.Default TargetOuts_key where
+  def = TargetOuts_key Default.def Prelude.Nothing Default.def
+
+instance Hashable.Hashable TargetOuts_key where
+  hashWithSalt __salt (TargetOuts_key _target _outputLabel _file)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _target)
+           _outputLabel)
+        _file
+
+data TargetOut_key = TargetOut_key{targetOut_key_target :: Target,
+                                   targetOut_key_file :: Glean.Schema.Src.File}
+                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TargetOut_key where
+  toJSON (TargetOut_key __field__target __field__file)
+    = Aeson.object
+        ("target" .= __field__target :
+           "file" .= __field__file : Prelude.mempty)
+
+instance Thrift.ThriftStruct TargetOut_key where
+  buildStruct _proxy (TargetOut_key __field__target __field__file)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__target)
+           :
+           Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__file)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__target <- ST.newSTRef Default.def
+            __field__file <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__target
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__file
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__target <- ST.readSTRef
+                                                                 __field__target
+                                             !__val__file <- ST.readSTRef __field__file
+                                             Prelude.pure (TargetOut_key __val__target __val__file)
+              _idMap = HashMap.fromList [("target", 1), ("file", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData TargetOut_key where
+  rnf (TargetOut_key __field__target __field__file)
+    = DeepSeq.rnf __field__target `Prelude.seq`
+        DeepSeq.rnf __field__file `Prelude.seq` ()
+
+instance Default.Default TargetOut_key where
+  def = TargetOut_key Default.def Default.def
+
+instance Hashable.Hashable TargetOut_key where
+  hashWithSalt __salt (TargetOut_key _target _file)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _target)
+        _file
+
+data TargetMode_key = TargetMode_key{targetMode_key_target ::
+                                     Target,
+                                     targetMode_key_mode :: Text.Text}
+                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TargetMode_key where
+  toJSON (TargetMode_key __field__target __field__mode)
+    = Aeson.object
+        ("target" .= __field__target :
+           "mode" .= __field__mode : Prelude.mempty)
+
+instance Thrift.ThriftStruct TargetMode_key where
+  buildStruct _proxy (TargetMode_key __field__target __field__mode)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__target)
+           :
+           Thrift.genField _proxy "mode" (Thrift.getStringType _proxy) 2 1
+             (Thrift.genText _proxy __field__mode)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__target <- ST.newSTRef Default.def
+            __field__mode <- ST.newSTRef ""
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__target
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__mode
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__target <- ST.readSTRef
+                                                                 __field__target
+                                             !__val__mode <- ST.readSTRef __field__mode
+                                             Prelude.pure (TargetMode_key __val__target __val__mode)
+              _idMap = HashMap.fromList [("target", 1), ("mode", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData TargetMode_key where
+  rnf (TargetMode_key __field__target __field__mode)
+    = DeepSeq.rnf __field__target `Prelude.seq`
+        DeepSeq.rnf __field__mode `Prelude.seq` ()
+
+instance Default.Default TargetMode_key where
+  def = TargetMode_key Default.def ""
+
+instance Hashable.Hashable TargetMode_key where
+  hashWithSalt __salt (TargetMode_key _target _mode)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _target)
+        _mode
+
+data TargetLocation_key = TargetLocation_key{targetLocation_key_locator
+                                             :: Locator,
+                                             targetLocation_key_file :: Glean.Schema.Src.File,
+                                             targetLocation_key_span :: Glean.Schema.Src.ByteSpan}
+                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TargetLocation_key where
+  toJSON
+    (TargetLocation_key __field__locator __field__file __field__span)
+    = Aeson.object
+        ("locator" .= __field__locator :
+           "file" .= __field__file : "span" .= __field__span : Prelude.mempty)
+
+instance Thrift.ThriftStruct TargetLocation_key where
+  buildStruct _proxy
+    (TargetLocation_key __field__locator __field__file __field__span)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "locator" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__locator)
+           :
+           Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__file)
+             :
+             Thrift.genField _proxy "span" (Thrift.getStructType _proxy) 3 2
+               (Thrift.buildStruct _proxy __field__span)
+               : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__locator <- ST.newSTRef Default.def
+            __field__file <- ST.newSTRef Default.def
+            __field__span <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__locator
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__file
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__span
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__locator <- ST.readSTRef
+                                                                  __field__locator
+                                             !__val__file <- ST.readSTRef __field__file
+                                             !__val__span <- ST.readSTRef __field__span
+                                             Prelude.pure
+                                               (TargetLocation_key __val__locator __val__file
+                                                  __val__span)
+              _idMap
+                = HashMap.fromList [("locator", 1), ("file", 2), ("span", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData TargetLocation_key where
+  rnf
+    (TargetLocation_key __field__locator __field__file __field__span)
+    = DeepSeq.rnf __field__locator `Prelude.seq`
+        DeepSeq.rnf __field__file `Prelude.seq`
+          DeepSeq.rnf __field__span `Prelude.seq` ()
+
+instance Default.Default TargetLocation_key where
+  def = TargetLocation_key Default.def Default.def Default.def
+
+instance Hashable.Hashable TargetLocation_key where
+  hashWithSalt __salt (TargetLocation_key _locator _file _span)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _locator)
+           _file)
+        _span
+
+data TargetIndexer_key = TargetIndexer_key{targetIndexer_key_name
+                                           :: TargetIndexerName,
+                                           targetIndexer_key_target :: Target}
+                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TargetIndexer_key where
+  toJSON (TargetIndexer_key __field__name __field__target)
+    = Aeson.object
+        ("name" .= __field__name :
+           "target" .= __field__target : Prelude.mempty)
+
+instance Thrift.ThriftStruct TargetIndexer_key where
+  buildStruct _proxy
+    (TargetIndexer_key __field__name __field__target)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__name)
+           :
+           Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__target)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef Default.def
+            __field__target <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__target
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__target <- ST.readSTRef __field__target
+                                             Prelude.pure
+                                               (TargetIndexer_key __val__name __val__target)
+              _idMap = HashMap.fromList [("name", 1), ("target", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData TargetIndexer_key where
+  rnf (TargetIndexer_key __field__name __field__target)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__target `Prelude.seq` ()
+
+instance Default.Default TargetIndexer_key where
+  def = TargetIndexer_key Default.def Default.def
+
+instance Hashable.Hashable TargetIndexer_key where
+  hashWithSalt __salt (TargetIndexer_key _name _target)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+        _target
+
+data TargetHash_key = TargetHash_key{targetHash_key_locator ::
+                                     Locator,
+                                     targetHash_key_targetHash :: Text.Text}
+                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TargetHash_key where
+  toJSON (TargetHash_key __field__locator __field__targetHash)
+    = Aeson.object
+        ("locator" .= __field__locator :
+           "targetHash" .= __field__targetHash : Prelude.mempty)
+
+instance Thrift.ThriftStruct TargetHash_key where
+  buildStruct _proxy
+    (TargetHash_key __field__locator __field__targetHash)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "locator" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__locator)
+           :
+           Thrift.genField _proxy "targetHash" (Thrift.getStringType _proxy) 2
+             1
+             (Thrift.genText _proxy __field__targetHash)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__locator <- ST.newSTRef Default.def
+            __field__targetHash <- ST.newSTRef ""
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__locator
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__targetHash
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__locator <- ST.readSTRef
+                                                                  __field__locator
+                                             !__val__targetHash <- ST.readSTRef __field__targetHash
+                                             Prelude.pure
+                                               (TargetHash_key __val__locator __val__targetHash)
+              _idMap = HashMap.fromList [("locator", 1), ("targetHash", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData TargetHash_key where
+  rnf (TargetHash_key __field__locator __field__targetHash)
+    = DeepSeq.rnf __field__locator `Prelude.seq`
+        DeepSeq.rnf __field__targetHash `Prelude.seq` ()
+
+instance Default.Default TargetHash_key where
+  def = TargetHash_key Default.def ""
+
+instance Hashable.Hashable TargetHash_key where
+  hashWithSalt __salt (TargetHash_key _locator _targetHash)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _locator)
+        _targetHash
+
+data TargetCallByCallExpr_key = TargetCallByCallExpr_key{targetCallByCallExpr_key_callExpr
+                                                         :: CallExpr,
+                                                         targetCallByCallExpr_key_target ::
+                                                         TargetCall}
+                                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TargetCallByCallExpr_key where
+  toJSON (TargetCallByCallExpr_key __field__callExpr __field__target)
+    = Aeson.object
+        ("callExpr" .= __field__callExpr :
+           "target" .= __field__target : Prelude.mempty)
+
+instance Thrift.ThriftStruct TargetCallByCallExpr_key where
+  buildStruct _proxy
+    (TargetCallByCallExpr_key __field__callExpr __field__target)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "callExpr" (Thrift.getStructType _proxy) 1
+           0
+           (Thrift.buildStruct _proxy __field__callExpr)
+           :
+           Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__target)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__callExpr <- ST.newSTRef Default.def
+            __field__target <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__callExpr
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__target
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__callExpr <- ST.readSTRef
+                                                                   __field__callExpr
+                                             !__val__target <- ST.readSTRef __field__target
+                                             Prelude.pure
+                                               (TargetCallByCallExpr_key __val__callExpr
+                                                  __val__target)
+              _idMap = HashMap.fromList [("callExpr", 1), ("target", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData TargetCallByCallExpr_key where
+  rnf (TargetCallByCallExpr_key __field__callExpr __field__target)
+    = DeepSeq.rnf __field__callExpr `Prelude.seq`
+        DeepSeq.rnf __field__target `Prelude.seq` ()
+
+instance Default.Default TargetCallByCallExpr_key where
+  def = TargetCallByCallExpr_key Default.def Default.def
+
+instance Hashable.Hashable TargetCallByCallExpr_key where
+  hashWithSalt __salt (TargetCallByCallExpr_key _callExpr _target)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _callExpr)
+        _target
+
+data TargetCall_key = TargetCall_key{targetCall_key_locator ::
+                                     Locator,
+                                     targetCall_key_arguments :: [CallArgument],
+                                     targetCall_key_file :: Glean.Schema.Src.File,
+                                     targetCall_key_span :: Glean.Schema.Src.ByteSpan,
+                                     targetCall_key_callExpr :: Prelude.Maybe CallExpr}
+                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TargetCall_key where
+  toJSON
+    (TargetCall_key __field__locator __field__arguments __field__file
+       __field__span __field__callExpr)
+    = Aeson.object
+        ("locator" .= __field__locator :
+           "arguments" .= __field__arguments :
+             "file" .= __field__file :
+               "span" .= __field__span :
+                 Prelude.maybe Prelude.id ((:) . ("callExpr" .=)) __field__callExpr
+                   Prelude.mempty)
+
+instance Thrift.ThriftStruct TargetCall_key where
+  buildStruct _proxy
+    (TargetCall_key __field__locator __field__arguments __field__file
+       __field__span __field__callExpr)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "locator" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__locator)
+           :
+           Thrift.genField _proxy "arguments" (Thrift.getListType _proxy) 2 1
+             (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                (Thrift.buildStruct _proxy)
+                __field__arguments)
+             :
+             Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 3 2
+               (Thrift.buildStruct _proxy __field__file)
+               :
+               Thrift.genField _proxy "span" (Thrift.getStructType _proxy) 4 3
+                 (Thrift.buildStruct _proxy __field__span)
+                 :
+                 case __field__callExpr of
+                   Prelude.Just _val -> Thrift.genField _proxy "callExpr"
+                                          (Thrift.getStructType _proxy)
+                                          5
+                                          4
+                                          (Thrift.buildStruct _proxy _val)
+                                          : []
+                   Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__locator <- ST.newSTRef Default.def
+            __field__arguments <- ST.newSTRef Default.def
+            __field__file <- ST.newSTRef Default.def
+            __field__span <- ST.newSTRef Default.def
+            __field__callExpr <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__locator
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__arguments
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__file
+                                                                          _val
+                                                                 4 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__span
+                                                                          _val
+                                                                 5 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__callExpr
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__locator <- ST.readSTRef
+                                                                  __field__locator
+                                             !__val__arguments <- ST.readSTRef __field__arguments
+                                             !__val__file <- ST.readSTRef __field__file
+                                             !__val__span <- ST.readSTRef __field__span
+                                             !__val__callExpr <- ST.readSTRef __field__callExpr
+                                             Prelude.pure
+                                               (TargetCall_key __val__locator __val__arguments
+                                                  __val__file
+                                                  __val__span
+                                                  __val__callExpr)
+              _idMap
+                = HashMap.fromList
+                    [("locator", 1), ("arguments", 2), ("file", 3), ("span", 4),
+                     ("callExpr", 5)]
+            _parse 0)
+
+instance DeepSeq.NFData TargetCall_key where
+  rnf
+    (TargetCall_key __field__locator __field__arguments __field__file
+       __field__span __field__callExpr)
+    = DeepSeq.rnf __field__locator `Prelude.seq`
+        DeepSeq.rnf __field__arguments `Prelude.seq`
+          DeepSeq.rnf __field__file `Prelude.seq`
+            DeepSeq.rnf __field__span `Prelude.seq`
+              DeepSeq.rnf __field__callExpr `Prelude.seq` ()
+
+instance Default.Default TargetCall_key where
+  def
+    = TargetCall_key Default.def Default.def Default.def Default.def
+        Prelude.Nothing
+
+instance Hashable.Hashable TargetCall_key where
+  hashWithSalt __salt
+    (TargetCall_key _locator _arguments _file _span _callExpr)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt
+              (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _locator)
+                 _arguments)
+              _file)
+           _span)
+        _callExpr
+
+data TargetByType_key = TargetByType_key{targetByType_key_type_ ::
+                                         Type,
+                                         targetByType_key_target :: Target}
+                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TargetByType_key where
+  toJSON (TargetByType_key __field__type_ __field__target)
+    = Aeson.object
+        ("type_" .= __field__type_ :
+           "target" .= __field__target : Prelude.mempty)
+
+instance Thrift.ThriftStruct TargetByType_key where
+  buildStruct _proxy
+    (TargetByType_key __field__type_ __field__target)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "type_" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__type_)
+           :
+           Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__target)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__type_ <- ST.newSTRef Default.def
+            __field__target <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__type_
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__target
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__type_ <- ST.readSTRef __field__type_
+                                             !__val__target <- ST.readSTRef __field__target
+                                             Prelude.pure
+                                               (TargetByType_key __val__type_ __val__target)
+              _idMap = HashMap.fromList [("type_", 1), ("target", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData TargetByType_key where
+  rnf (TargetByType_key __field__type_ __field__target)
+    = DeepSeq.rnf __field__type_ `Prelude.seq`
+        DeepSeq.rnf __field__target `Prelude.seq` ()
+
+instance Default.Default TargetByType_key where
+  def = TargetByType_key Default.def Default.def
+
+instance Hashable.Hashable TargetByType_key where
+  hashWithSalt __salt (TargetByType_key _type_ _target)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _type_)
+        _target
+
+data TargetAttribute_key = TargetAttribute_key{targetAttribute_key_target
+                                               :: Target,
+                                               targetAttribute_key_attribute :: AttributeName,
+                                               targetAttribute_key_value :: AttributeValue}
+                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TargetAttribute_key where
+  toJSON
+    (TargetAttribute_key __field__target __field__attribute
+       __field__value)
+    = Aeson.object
+        ("target" .= __field__target :
+           "attribute" .= __field__attribute :
+             "value" .= __field__value : Prelude.mempty)
+
+instance Thrift.ThriftStruct TargetAttribute_key where
+  buildStruct _proxy
+    (TargetAttribute_key __field__target __field__attribute
+       __field__value)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__target)
+           :
+           Thrift.genField _proxy "attribute" (Thrift.getStructType _proxy) 2
+             1
+             (Thrift.buildStruct _proxy __field__attribute)
+             :
+             Thrift.genField _proxy "value" (Thrift.getStructType _proxy) 3 2
+               (Thrift.buildStruct _proxy __field__value)
+               : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__target <- ST.newSTRef Default.def
+            __field__attribute <- ST.newSTRef Default.def
+            __field__value <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__target
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__attribute
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__value
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__target <- ST.readSTRef
+                                                                 __field__target
+                                             !__val__attribute <- ST.readSTRef __field__attribute
+                                             !__val__value <- ST.readSTRef __field__value
+                                             Prelude.pure
+                                               (TargetAttribute_key __val__target __val__attribute
+                                                  __val__value)
+              _idMap
+                = HashMap.fromList [("target", 1), ("attribute", 2), ("value", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData TargetAttribute_key where
+  rnf
+    (TargetAttribute_key __field__target __field__attribute
+       __field__value)
+    = DeepSeq.rnf __field__target `Prelude.seq`
+        DeepSeq.rnf __field__attribute `Prelude.seq`
+          DeepSeq.rnf __field__value `Prelude.seq` ()
+
+instance Default.Default TargetAttribute_key where
+  def = TargetAttribute_key Default.def Default.def Default.def
+
+instance Hashable.Hashable TargetAttribute_key where
+  hashWithSalt __salt (TargetAttribute_key _target _attribute _value)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _target)
+           _attribute)
+        _value
+
+data Target_key = Target_key{target_key_locator :: Locator,
+                             target_key_type_ :: Type,
+                             target_key_defaultPlatform :: Prelude.Maybe Platform,
+                             target_key_labels :: Labels}
+                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Target_key where
+  toJSON
+    (Target_key __field__locator __field__type_
+       __field__defaultPlatform __field__labels)
+    = Aeson.object
+        ("locator" .= __field__locator :
+           "type_" .= __field__type_ :
+             Prelude.maybe Prelude.id ((:) . ("defaultPlatform" .=))
+               __field__defaultPlatform
+               ("labels" .= __field__labels : Prelude.mempty))
+
+instance Thrift.ThriftStruct Target_key where
+  buildStruct _proxy
+    (Target_key __field__locator __field__type_
+       __field__defaultPlatform __field__labels)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "locator" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__locator)
+           :
+           Thrift.genField _proxy "type_" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__type_)
+             :
+             let (__cereal__defaultPlatform, __id__defaultPlatform)
+                   = case __field__defaultPlatform of
+                       Prelude.Just _val -> ((:)
+                                               (Thrift.genField _proxy "defaultPlatform"
+                                                  (Thrift.getStructType _proxy)
+                                                  3
+                                                  2
+                                                  (Thrift.buildStruct _proxy _val)),
+                                             3)
+                       Prelude.Nothing -> (Prelude.id, 2)
+               in
+               __cereal__defaultPlatform
+                 (Thrift.genField _proxy "labels" (Thrift.getStructType _proxy) 4
+                    __id__defaultPlatform
+                    (Thrift.buildStruct _proxy __field__labels)
+                    : []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__locator <- ST.newSTRef Default.def
+            __field__type_ <- ST.newSTRef Default.def
+            __field__defaultPlatform <- ST.newSTRef Prelude.Nothing
+            __field__labels <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__locator
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__type_
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__defaultPlatform
+                                                                          (Prelude.Just _val)
+                                                                 4 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__labels
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__locator <- ST.readSTRef
+                                                                  __field__locator
+                                             !__val__type_ <- ST.readSTRef __field__type_
+                                             !__val__defaultPlatform <- ST.readSTRef
+                                                                          __field__defaultPlatform
+                                             !__val__labels <- ST.readSTRef __field__labels
+                                             Prelude.pure
+                                               (Target_key __val__locator __val__type_
+                                                  __val__defaultPlatform
+                                                  __val__labels)
+              _idMap
+                = HashMap.fromList
+                    [("locator", 1), ("type_", 2), ("defaultPlatform", 3),
+                     ("labels", 4)]
+            _parse 0)
+
+instance DeepSeq.NFData Target_key where
+  rnf
+    (Target_key __field__locator __field__type_
+       __field__defaultPlatform __field__labels)
+    = DeepSeq.rnf __field__locator `Prelude.seq`
+        DeepSeq.rnf __field__type_ `Prelude.seq`
+          DeepSeq.rnf __field__defaultPlatform `Prelude.seq`
+            DeepSeq.rnf __field__labels `Prelude.seq` ()
+
+instance Default.Default Target_key where
+  def
+    = Target_key Default.def Default.def Prelude.Nothing Default.def
+
+instance Hashable.Hashable Target_key where
+  hashWithSalt __salt
+    (Target_key _locator _type_ _defaultPlatform _labels)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _locator)
+              _type_)
+           _defaultPlatform)
+        _labels
+
+data SourceFileLocation_key = SourceFileLocation_key{sourceFileLocation_key_file
+                                                     :: Glean.Schema.Src.File,
+                                                     sourceFileLocation_key_span ::
+                                                     Glean.Schema.Src.ByteSpan}
+                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SourceFileLocation_key where
+  toJSON (SourceFileLocation_key __field__file __field__span)
+    = Aeson.object
+        ("file" .= __field__file :
+           "span" .= __field__span : Prelude.mempty)
+
+instance Thrift.ThriftStruct SourceFileLocation_key where
+  buildStruct _proxy
+    (SourceFileLocation_key __field__file __field__span)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__file)
+           :
+           Thrift.genField _proxy "span" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__span)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__file <- ST.newSTRef Default.def
+            __field__span <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__file
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__span
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__file <- ST.readSTRef __field__file
+                                             !__val__span <- ST.readSTRef __field__span
+                                             Prelude.pure
+                                               (SourceFileLocation_key __val__file __val__span)
+              _idMap = HashMap.fromList [("file", 1), ("span", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SourceFileLocation_key where
+  rnf (SourceFileLocation_key __field__file __field__span)
+    = DeepSeq.rnf __field__file `Prelude.seq`
+        DeepSeq.rnf __field__span `Prelude.seq` ()
+
+instance Default.Default SourceFileLocation_key where
+  def = SourceFileLocation_key Default.def Default.def
+
+instance Hashable.Hashable SourceFileLocation_key where
+  hashWithSalt __salt (SourceFileLocation_key _file _span)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _file) _span
+
+data SearchByLocalName_key = SearchByLocalName_key{searchByLocalName_key_name
+                                                   :: LocalName,
+                                                   searchByLocalName_key_decl :: XRefDestination}
+                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchByLocalName_key where
+  toJSON (SearchByLocalName_key __field__name __field__decl)
+    = Aeson.object
+        ("name" .= __field__name :
+           "decl" .= __field__decl : Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchByLocalName_key where
+  buildStruct _proxy
+    (SearchByLocalName_key __field__name __field__decl)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__name)
+           :
+           Thrift.genField _proxy "decl" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__decl)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef Default.def
+            __field__decl <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__decl
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__decl <- ST.readSTRef __field__decl
+                                             Prelude.pure
+                                               (SearchByLocalName_key __val__name __val__decl)
+              _idMap = HashMap.fromList [("name", 1), ("decl", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchByLocalName_key where
+  rnf (SearchByLocalName_key __field__name __field__decl)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__decl `Prelude.seq` ()
+
+instance Default.Default SearchByLocalName_key where
+  def = SearchByLocalName_key Default.def Default.def
+
+instance Hashable.Hashable SearchByLocalName_key where
+  hashWithSalt __salt (SearchByLocalName_key _name _decl)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _decl
+
+data RuleKey_key = RuleKey_key{ruleKey_key_locator :: Locator,
+                               ruleKey_key_ruleKey :: Text.Text}
+                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON RuleKey_key where
+  toJSON (RuleKey_key __field__locator __field__ruleKey)
+    = Aeson.object
+        ("locator" .= __field__locator :
+           "ruleKey" .= __field__ruleKey : Prelude.mempty)
+
+instance Thrift.ThriftStruct RuleKey_key where
+  buildStruct _proxy (RuleKey_key __field__locator __field__ruleKey)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "locator" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__locator)
+           :
+           Thrift.genField _proxy "ruleKey" (Thrift.getStringType _proxy) 2 1
+             (Thrift.genText _proxy __field__ruleKey)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__locator <- ST.newSTRef Default.def
+            __field__ruleKey <- ST.newSTRef ""
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__locator
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__ruleKey
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__locator <- ST.readSTRef
+                                                                  __field__locator
+                                             !__val__ruleKey <- ST.readSTRef __field__ruleKey
+                                             Prelude.pure
+                                               (RuleKey_key __val__locator __val__ruleKey)
+              _idMap = HashMap.fromList [("locator", 1), ("ruleKey", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData RuleKey_key where
+  rnf (RuleKey_key __field__locator __field__ruleKey)
+    = DeepSeq.rnf __field__locator `Prelude.seq`
+        DeepSeq.rnf __field__ruleKey `Prelude.seq` ()
+
+instance Default.Default RuleKey_key where
+  def = RuleKey_key Default.def ""
+
+instance Hashable.Hashable RuleKey_key where
+  hashWithSalt __salt (RuleKey_key _locator _ruleKey)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _locator)
+        _ruleKey
+
+data Owner_key = Owner_key{owner_key_source ::
+                           Glean.Schema.Src.File,
+                           owner_key_owner :: TargetSources}
+                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Owner_key where
+  toJSON (Owner_key __field__source __field__owner)
+    = Aeson.object
+        ("source" .= __field__source :
+           "owner" .= __field__owner : Prelude.mempty)
+
+instance Thrift.ThriftStruct Owner_key where
+  buildStruct _proxy (Owner_key __field__source __field__owner)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "source" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__source)
+           :
+           Thrift.genField _proxy "owner" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__owner)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__source <- ST.newSTRef Default.def
+            __field__owner <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__source
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__owner
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__source <- ST.readSTRef
+                                                                 __field__source
+                                             !__val__owner <- ST.readSTRef __field__owner
+                                             Prelude.pure (Owner_key __val__source __val__owner)
+              _idMap = HashMap.fromList [("source", 1), ("owner", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData Owner_key where
+  rnf (Owner_key __field__source __field__owner)
+    = DeepSeq.rnf __field__source `Prelude.seq`
+        DeepSeq.rnf __field__owner `Prelude.seq` ()
+
+instance Default.Default Owner_key where
+  def = Owner_key Default.def Default.def
+
+instance Hashable.Hashable Owner_key where
+  hashWithSalt __salt (Owner_key _source _owner)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _source)
+        _owner
+
+data OutsTarget_key = OutsTarget_key{outsTarget_key_file ::
+                                     Glean.Schema.Src.File,
+                                     outsTarget_key_target :: Target,
+                                     outsTarget_key_outputLabel :: Prelude.Maybe OutputLabel}
+                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON OutsTarget_key where
+  toJSON
+    (OutsTarget_key __field__file __field__target __field__outputLabel)
+    = Aeson.object
+        ("file" .= __field__file :
+           "target" .= __field__target :
+             Prelude.maybe Prelude.id ((:) . ("outputLabel" .=))
+               __field__outputLabel
+               Prelude.mempty)
+
+instance Thrift.ThriftStruct OutsTarget_key where
+  buildStruct _proxy
+    (OutsTarget_key __field__file __field__target __field__outputLabel)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__file)
+           :
+           Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__target)
+             :
+             case __field__outputLabel of
+               Prelude.Just _val -> Thrift.genField _proxy "outputLabel"
+                                      (Thrift.getStructType _proxy)
+                                      3
+                                      2
+                                      (Thrift.buildStruct _proxy _val)
+                                      : []
+               Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__file <- ST.newSTRef Default.def
+            __field__target <- ST.newSTRef Default.def
+            __field__outputLabel <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__file
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__target
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__outputLabel
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__file <- ST.readSTRef __field__file
+                                             !__val__target <- ST.readSTRef __field__target
+                                             !__val__outputLabel <- ST.readSTRef
+                                                                      __field__outputLabel
+                                             Prelude.pure
+                                               (OutsTarget_key __val__file __val__target
+                                                  __val__outputLabel)
+              _idMap
+                = HashMap.fromList [("file", 1), ("target", 2), ("outputLabel", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData OutsTarget_key where
+  rnf
+    (OutsTarget_key __field__file __field__target __field__outputLabel)
+    = DeepSeq.rnf __field__file `Prelude.seq`
+        DeepSeq.rnf __field__target `Prelude.seq`
+          DeepSeq.rnf __field__outputLabel `Prelude.seq` ()
+
+instance Default.Default OutsTarget_key where
+  def = OutsTarget_key Default.def Default.def Prelude.Nothing
+
+instance Hashable.Hashable OutsTarget_key where
+  hashWithSalt __salt (OutsTarget_key _file _target _outputLabel)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _file)
+           _target)
+        _outputLabel
+
+data OutTarget_key = OutTarget_key{outTarget_key_file ::
+                                   Glean.Schema.Src.File,
+                                   outTarget_key_target :: Target}
+                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON OutTarget_key where
+  toJSON (OutTarget_key __field__file __field__target)
+    = Aeson.object
+        ("file" .= __field__file :
+           "target" .= __field__target : Prelude.mempty)
+
+instance Thrift.ThriftStruct OutTarget_key where
+  buildStruct _proxy (OutTarget_key __field__file __field__target)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__file)
+           :
+           Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__target)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__file <- ST.newSTRef Default.def
+            __field__target <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__file
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__target
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__file <- ST.readSTRef __field__file
+                                             !__val__target <- ST.readSTRef __field__target
+                                             Prelude.pure (OutTarget_key __val__file __val__target)
+              _idMap = HashMap.fromList [("file", 1), ("target", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData OutTarget_key where
+  rnf (OutTarget_key __field__file __field__target)
+    = DeepSeq.rnf __field__file `Prelude.seq`
+        DeepSeq.rnf __field__target `Prelude.seq` ()
+
+instance Default.Default OutTarget_key where
+  def = OutTarget_key Default.def Default.def
+
+instance Hashable.Hashable OutTarget_key where
+  hashWithSalt __salt (OutTarget_key _file _target)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _file)
+        _target
+
+data LocatorWithLabel_key = LocatorWithLabel_key{locatorWithLabel_key_locator
+                                                 :: Locator,
+                                                 locatorWithLabel_key_label :: OutputLabel}
+                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON LocatorWithLabel_key where
+  toJSON (LocatorWithLabel_key __field__locator __field__label)
+    = Aeson.object
+        ("locator" .= __field__locator :
+           "label" .= __field__label : Prelude.mempty)
+
+instance Thrift.ThriftStruct LocatorWithLabel_key where
+  buildStruct _proxy
+    (LocatorWithLabel_key __field__locator __field__label)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "locator" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__locator)
+           :
+           Thrift.genField _proxy "label" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__label)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__locator <- ST.newSTRef Default.def
+            __field__label <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__locator
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__label
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__locator <- ST.readSTRef
+                                                                  __field__locator
+                                             !__val__label <- ST.readSTRef __field__label
+                                             Prelude.pure
+                                               (LocatorWithLabel_key __val__locator __val__label)
+              _idMap = HashMap.fromList [("locator", 1), ("label", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData LocatorWithLabel_key where
+  rnf (LocatorWithLabel_key __field__locator __field__label)
+    = DeepSeq.rnf __field__locator `Prelude.seq`
+        DeepSeq.rnf __field__label `Prelude.seq` ()
+
+instance Default.Default LocatorWithLabel_key where
+  def = LocatorWithLabel_key Default.def Default.def
+
+instance Hashable.Hashable LocatorWithLabel_key where
+  hashWithSalt __salt (LocatorWithLabel_key _locator _label)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _locator)
+        _label
+
+data LocatorReverseDeps_key = LocatorReverseDeps_key{locatorReverseDeps_key_locator
+                                                     :: Locator,
+                                                     locatorReverseDeps_key_rdeps :: [Locator]}
+                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON LocatorReverseDeps_key where
+  toJSON (LocatorReverseDeps_key __field__locator __field__rdeps)
+    = Aeson.object
+        ("locator" .= __field__locator :
+           "rdeps" .= __field__rdeps : Prelude.mempty)
+
+instance Thrift.ThriftStruct LocatorReverseDeps_key where
+  buildStruct _proxy
+    (LocatorReverseDeps_key __field__locator __field__rdeps)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "locator" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__locator)
+           :
+           Thrift.genField _proxy "rdeps" (Thrift.getListType _proxy) 2 1
+             (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                (Thrift.buildStruct _proxy)
+                __field__rdeps)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__locator <- ST.newSTRef Default.def
+            __field__rdeps <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__locator
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef __field__rdeps
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__locator <- ST.readSTRef
+                                                                  __field__locator
+                                             !__val__rdeps <- ST.readSTRef __field__rdeps
+                                             Prelude.pure
+                                               (LocatorReverseDeps_key __val__locator __val__rdeps)
+              _idMap = HashMap.fromList [("locator", 1), ("rdeps", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData LocatorReverseDeps_key where
+  rnf (LocatorReverseDeps_key __field__locator __field__rdeps)
+    = DeepSeq.rnf __field__locator `Prelude.seq`
+        DeepSeq.rnf __field__rdeps `Prelude.seq` ()
+
+instance Default.Default LocatorReverseDeps_key where
+  def = LocatorReverseDeps_key Default.def Default.def
+
+instance Hashable.Hashable LocatorReverseDeps_key where
+  hashWithSalt __salt (LocatorReverseDeps_key _locator _rdeps)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _locator)
+        _rdeps
+
+data LocatorReverseDep_key = LocatorReverseDep_key{locatorReverseDep_key_locator
+                                                   :: Locator,
+                                                   locatorReverseDep_key_rdep :: Locator}
+                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON LocatorReverseDep_key where
+  toJSON (LocatorReverseDep_key __field__locator __field__rdep)
+    = Aeson.object
+        ("locator" .= __field__locator :
+           "rdep" .= __field__rdep : Prelude.mempty)
+
+instance Thrift.ThriftStruct LocatorReverseDep_key where
+  buildStruct _proxy
+    (LocatorReverseDep_key __field__locator __field__rdep)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "locator" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__locator)
+           :
+           Thrift.genField _proxy "rdep" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__rdep)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__locator <- ST.newSTRef Default.def
+            __field__rdep <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__locator
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__rdep
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__locator <- ST.readSTRef
+                                                                  __field__locator
+                                             !__val__rdep <- ST.readSTRef __field__rdep
+                                             Prelude.pure
+                                               (LocatorReverseDep_key __val__locator __val__rdep)
+              _idMap = HashMap.fromList [("locator", 1), ("rdep", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData LocatorReverseDep_key where
+  rnf (LocatorReverseDep_key __field__locator __field__rdep)
+    = DeepSeq.rnf __field__locator `Prelude.seq`
+        DeepSeq.rnf __field__rdep `Prelude.seq` ()
+
+instance Default.Default LocatorReverseDep_key where
+  def = LocatorReverseDep_key Default.def Default.def
+
+instance Hashable.Hashable LocatorReverseDep_key where
+  hashWithSalt __salt (LocatorReverseDep_key _locator _rdep)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _locator)
+        _rdep
+
+data Locator_key = Locator_key{locator_key_subdir ::
+                               Prelude.Maybe Text.Text,
+                               locator_key_path :: Text.Text, locator_key_name :: Text.Text}
+                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Locator_key where
+  toJSON (Locator_key __field__subdir __field__path __field__name)
+    = Aeson.object
+        (Prelude.maybe Prelude.id ((:) . ("subdir" .=)) __field__subdir
+           ("path" .= __field__path :
+              "name" .= __field__name : Prelude.mempty))
+
+instance Thrift.ThriftStruct Locator_key where
+  buildStruct _proxy
+    (Locator_key __field__subdir __field__path __field__name)
+    = Thrift.genStruct _proxy
+        (let (__cereal__subdir, __id__subdir)
+               = case __field__subdir of
+                   Prelude.Just _val -> ((:)
+                                           (Thrift.genField _proxy "subdir"
+                                              (Thrift.getStringType _proxy)
+                                              1
+                                              0
+                                              (Thrift.genText _proxy _val)),
+                                         1)
+                   Prelude.Nothing -> (Prelude.id, 0)
+           in
+           __cereal__subdir
+             (Thrift.genField _proxy "path" (Thrift.getStringType _proxy) 2
+                __id__subdir
+                (Thrift.genText _proxy __field__path)
+                :
+                Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 3 2
+                  (Thrift.genText _proxy __field__name)
+                  : []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__subdir <- ST.newSTRef Prelude.Nothing
+            __field__path <- ST.newSTRef ""
+            __field__name <- ST.newSTRef ""
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__subdir
+                                                                          (Prelude.Just _val)
+                                                                 2 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__path
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__subdir <- ST.readSTRef
+                                                                 __field__subdir
+                                             !__val__path <- ST.readSTRef __field__path
+                                             !__val__name <- ST.readSTRef __field__name
+                                             Prelude.pure
+                                               (Locator_key __val__subdir __val__path __val__name)
+              _idMap = HashMap.fromList [("subdir", 1), ("path", 2), ("name", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData Locator_key where
+  rnf (Locator_key __field__subdir __field__path __field__name)
+    = DeepSeq.rnf __field__subdir `Prelude.seq`
+        DeepSeq.rnf __field__path `Prelude.seq`
+          DeepSeq.rnf __field__name `Prelude.seq` ()
+
+instance Default.Default Locator_key where
+  def = Locator_key Prelude.Nothing "" ""
+
+instance Hashable.Hashable Locator_key where
+  hashWithSalt __salt (Locator_key _subdir _path _name)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _subdir)
+           _path)
+        _name
+
+data LocalNameLowerCase_key = LocalNameLowerCase_key{localNameLowerCase_key_lowercase
+                                                     :: Text.Text,
+                                                     localNameLowerCase_key_name :: LocalName}
+                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON LocalNameLowerCase_key where
+  toJSON (LocalNameLowerCase_key __field__lowercase __field__name)
+    = Aeson.object
+        ("lowercase" .= __field__lowercase :
+           "name" .= __field__name : Prelude.mempty)
+
+instance Thrift.ThriftStruct LocalNameLowerCase_key where
+  buildStruct _proxy
+    (LocalNameLowerCase_key __field__lowercase __field__name)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "lowercase" (Thrift.getStringType _proxy) 1
+           0
+           (Thrift.genText _proxy __field__lowercase)
+           :
+           Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__name)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__lowercase <- ST.newSTRef ""
+            __field__name <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__lowercase
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__lowercase <- ST.readSTRef
+                                                                    __field__lowercase
+                                             !__val__name <- ST.readSTRef __field__name
+                                             Prelude.pure
+                                               (LocalNameLowerCase_key __val__lowercase __val__name)
+              _idMap = HashMap.fromList [("lowercase", 1), ("name", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData LocalNameLowerCase_key where
+  rnf (LocalNameLowerCase_key __field__lowercase __field__name)
+    = DeepSeq.rnf __field__lowercase `Prelude.seq`
+        DeepSeq.rnf __field__name `Prelude.seq` ()
+
+instance Default.Default LocalNameLowerCase_key where
+  def = LocalNameLowerCase_key "" Default.def
+
+instance Hashable.Hashable LocalNameLowerCase_key where
+  hashWithSalt __salt (LocalNameLowerCase_key _lowercase _name)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _lowercase)
+        _name
+
+data Kind = Kind_Function
+          | Kind_Variable
+          | Kind__UNKNOWN Prelude.Int
+            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Kind where
+  toJSON = Aeson.toJSON . Thrift.fromThriftEnum
+
+instance DeepSeq.NFData Kind where
+  rnf __Kind = Prelude.seq __Kind ()
+
+instance Default.Default Kind where
+  def = Kind_Function
+
+instance Hashable.Hashable Kind where
+  hashWithSalt _salt _val
+    = Hashable.hashWithSalt _salt (Thrift.fromThriftEnum _val)
+
+instance Thrift.ThriftEnum Kind where
+  toThriftEnum 0 = Kind_Function
+  toThriftEnum 1 = Kind_Variable
+  toThriftEnum val = Kind__UNKNOWN val
+  fromThriftEnum Kind_Function = 0
+  fromThriftEnum Kind_Variable = 1
+  fromThriftEnum (Kind__UNKNOWN val) = val
+  allThriftEnumValues = [Kind_Function, Kind_Variable]
+  toThriftEnumEither 0 = Prelude.Right Kind_Function
+  toThriftEnumEither 1 = Prelude.Right Kind_Variable
+  toThriftEnumEither val
+    = Prelude.Left
+        ("toThriftEnumEither: not a valid identifier for enum Kind: " ++
+           Prelude.show val)
+
+data FileXRefs_key = FileXRefs_key{fileXRefs_key_file ::
+                                   Glean.Schema.Src.File,
+                                   fileXRefs_key_xrefs :: [XRef]}
+                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FileXRefs_key where
+  toJSON (FileXRefs_key __field__file __field__xrefs)
+    = Aeson.object
+        ("file" .= __field__file :
+           "xrefs" .= __field__xrefs : Prelude.mempty)
+
+instance Thrift.ThriftStruct FileXRefs_key where
+  buildStruct _proxy (FileXRefs_key __field__file __field__xrefs)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__file)
+           :
+           Thrift.genField _proxy "xrefs" (Thrift.getListType _proxy) 2 1
+             (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                (Thrift.buildStruct _proxy)
+                __field__xrefs)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__file <- ST.newSTRef Default.def
+            __field__xrefs <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__file
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef __field__xrefs
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__file <- ST.readSTRef __field__file
+                                             !__val__xrefs <- ST.readSTRef __field__xrefs
+                                             Prelude.pure (FileXRefs_key __val__file __val__xrefs)
+              _idMap = HashMap.fromList [("file", 1), ("xrefs", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData FileXRefs_key where
+  rnf (FileXRefs_key __field__file __field__xrefs)
+    = DeepSeq.rnf __field__file `Prelude.seq`
+        DeepSeq.rnf __field__xrefs `Prelude.seq` ()
+
+instance Default.Default FileXRefs_key where
+  def = FileXRefs_key Default.def Default.def
+
+instance Hashable.Hashable FileXRefs_key where
+  hashWithSalt __salt (FileXRefs_key _file _xrefs)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _file) _xrefs
+
+data FileToTarget_key = FileToTarget_key{fileToTarget_key_source ::
+                                         Glean.Schema.Src.File,
+                                         fileToTarget_key_locator :: Locator}
+                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FileToTarget_key where
+  toJSON (FileToTarget_key __field__source __field__locator)
+    = Aeson.object
+        ("source" .= __field__source :
+           "locator" .= __field__locator : Prelude.mempty)
+
+instance Thrift.ThriftStruct FileToTarget_key where
+  buildStruct _proxy
+    (FileToTarget_key __field__source __field__locator)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "source" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__source)
+           :
+           Thrift.genField _proxy "locator" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__locator)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__source <- ST.newSTRef Default.def
+            __field__locator <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__source
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__locator
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__source <- ST.readSTRef
+                                                                 __field__source
+                                             !__val__locator <- ST.readSTRef __field__locator
+                                             Prelude.pure
+                                               (FileToTarget_key __val__source __val__locator)
+              _idMap = HashMap.fromList [("source", 1), ("locator", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData FileToTarget_key where
+  rnf (FileToTarget_key __field__source __field__locator)
+    = DeepSeq.rnf __field__source `Prelude.seq`
+        DeepSeq.rnf __field__locator `Prelude.seq` ()
+
+instance Default.Default FileToTarget_key where
+  def = FileToTarget_key Default.def Default.def
+
+instance Hashable.Hashable FileToTarget_key where
+  hashWithSalt __salt (FileToTarget_key _source _locator)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _source)
+        _locator
+
+data FileTarget_key = FileTarget_key{fileTarget_key_file ::
+                                     Glean.Schema.Src.File,
+                                     fileTarget_key_locator :: Locator}
+                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FileTarget_key where
+  toJSON (FileTarget_key __field__file __field__locator)
+    = Aeson.object
+        ("file" .= __field__file :
+           "locator" .= __field__locator : Prelude.mempty)
+
+instance Thrift.ThriftStruct FileTarget_key where
+  buildStruct _proxy (FileTarget_key __field__file __field__locator)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__file)
+           :
+           Thrift.genField _proxy "locator" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__locator)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__file <- ST.newSTRef Default.def
+            __field__locator <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__file
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__locator
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__file <- ST.readSTRef __field__file
+                                             !__val__locator <- ST.readSTRef __field__locator
+                                             Prelude.pure
+                                               (FileTarget_key __val__file __val__locator)
+              _idMap = HashMap.fromList [("file", 1), ("locator", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData FileTarget_key where
+  rnf (FileTarget_key __field__file __field__locator)
+    = DeepSeq.rnf __field__file `Prelude.seq`
+        DeepSeq.rnf __field__locator `Prelude.seq` ()
+
+instance Default.Default FileTarget_key where
+  def = FileTarget_key Default.def Default.def
+
+instance Hashable.Hashable FileTarget_key where
+  hashWithSalt __salt (FileTarget_key _file _locator)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _file)
+        _locator
+
+data FileResolved_key = FileResolved_key{fileResolved_key_buckFile
+                                         :: File,
+                                         fileResolved_key_srcFile :: Glean.Schema.Src.File}
+                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FileResolved_key where
+  toJSON (FileResolved_key __field__buckFile __field__srcFile)
+    = Aeson.object
+        ("buckFile" .= __field__buckFile :
+           "srcFile" .= __field__srcFile : Prelude.mempty)
+
+instance Thrift.ThriftStruct FileResolved_key where
+  buildStruct _proxy
+    (FileResolved_key __field__buckFile __field__srcFile)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "buckFile" (Thrift.getStructType _proxy) 1
+           0
+           (Thrift.buildStruct _proxy __field__buckFile)
+           :
+           Thrift.genField _proxy "srcFile" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__srcFile)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__buckFile <- ST.newSTRef Default.def
+            __field__srcFile <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__buckFile
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__srcFile
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__buckFile <- ST.readSTRef
+                                                                   __field__buckFile
+                                             !__val__srcFile <- ST.readSTRef __field__srcFile
+                                             Prelude.pure
+                                               (FileResolved_key __val__buckFile __val__srcFile)
+              _idMap = HashMap.fromList [("buckFile", 1), ("srcFile", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData FileResolved_key where
+  rnf (FileResolved_key __field__buckFile __field__srcFile)
+    = DeepSeq.rnf __field__buckFile `Prelude.seq`
+        DeepSeq.rnf __field__srcFile `Prelude.seq` ()
+
+instance Default.Default FileResolved_key where
+  def = FileResolved_key Default.def Default.def
+
+instance Hashable.Hashable FileResolved_key where
+  hashWithSalt __salt (FileResolved_key _buckFile _srcFile)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _buckFile)
+        _srcFile
+
+data FileEntity_key = FileEntity_key{fileEntity_key_file ::
+                                     Glean.Schema.Src.File,
+                                     fileEntity_key_entity :: XRefDestination}
+                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FileEntity_key where
+  toJSON (FileEntity_key __field__file __field__entity)
+    = Aeson.object
+        ("file" .= __field__file :
+           "entity" .= __field__entity : Prelude.mempty)
+
+instance Thrift.ThriftStruct FileEntity_key where
+  buildStruct _proxy (FileEntity_key __field__file __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__file)
+           :
+           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__entity)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__file <- ST.newSTRef Default.def
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__file
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__file <- ST.readSTRef __field__file
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure (FileEntity_key __val__file __val__entity)
+              _idMap = HashMap.fromList [("file", 1), ("entity", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData FileEntity_key where
+  rnf (FileEntity_key __field__file __field__entity)
+    = DeepSeq.rnf __field__file `Prelude.seq`
+        DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default FileEntity_key where
+  def = FileEntity_key Default.def Default.def
+
+instance Hashable.Hashable FileEntity_key where
+  hashWithSalt __salt (FileEntity_key _file _entity)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _file)
+        _entity
+
+data FileDefinition_key = FileDefinition_key{fileDefinition_key_file
+                                             :: Glean.Schema.Src.File,
+                                             fileDefinition_key_definition :: Definition}
+                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FileDefinition_key where
+  toJSON (FileDefinition_key __field__file __field__definition)
+    = Aeson.object
+        ("file" .= __field__file :
+           "definition" .= __field__definition : Prelude.mempty)
+
+instance Thrift.ThriftStruct FileDefinition_key where
+  buildStruct _proxy
+    (FileDefinition_key __field__file __field__definition)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__file)
+           :
+           Thrift.genField _proxy "definition" (Thrift.getStructType _proxy) 2
+             1
+             (Thrift.buildStruct _proxy __field__definition)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__file <- ST.newSTRef Default.def
+            __field__definition <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__file
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__definition
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__file <- ST.readSTRef __field__file
+                                             !__val__definition <- ST.readSTRef __field__definition
+                                             Prelude.pure
+                                               (FileDefinition_key __val__file __val__definition)
+              _idMap = HashMap.fromList [("file", 1), ("definition", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData FileDefinition_key where
+  rnf (FileDefinition_key __field__file __field__definition)
+    = DeepSeq.rnf __field__file `Prelude.seq`
+        DeepSeq.rnf __field__definition `Prelude.seq` ()
+
+instance Default.Default FileDefinition_key where
+  def = FileDefinition_key Default.def Default.def
+
+instance Hashable.Hashable FileDefinition_key where
+  hashWithSalt __salt (FileDefinition_key _file _definition)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _file)
+        _definition
+
+data FileCall_key = FileCall_key{fileCall_key_file ::
+                                 Glean.Schema.Src.File,
+                                 fileCall_key_callee_span :: Glean.Schema.Src.ByteSpan,
+                                 fileCall_key_callExpr :: Prelude.Maybe CallExpr,
+                                 fileCall_key_arguments :: [CallArgument],
+                                 fileCall_key_locator :: Prelude.Maybe Locator}
+                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FileCall_key where
+  toJSON
+    (FileCall_key __field__file __field__callee_span __field__callExpr
+       __field__arguments __field__locator)
+    = Aeson.object
+        ("file" .= __field__file :
+           "callee_span" .= __field__callee_span :
+             Prelude.maybe Prelude.id ((:) . ("callExpr" .=)) __field__callExpr
+               ("arguments" .= __field__arguments :
+                  Prelude.maybe Prelude.id ((:) . ("locator" .=)) __field__locator
+                    Prelude.mempty))
+
+instance Thrift.ThriftStruct FileCall_key where
+  buildStruct _proxy
+    (FileCall_key __field__file __field__callee_span __field__callExpr
+       __field__arguments __field__locator)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__file)
+           :
+           Thrift.genField _proxy "callee_span" (Thrift.getStructType _proxy)
+             2
+             1
+             (Thrift.buildStruct _proxy __field__callee_span)
+             :
+             let (__cereal__callExpr, __id__callExpr)
+                   = case __field__callExpr of
+                       Prelude.Just _val -> ((:)
+                                               (Thrift.genField _proxy "callExpr"
+                                                  (Thrift.getStructType _proxy)
+                                                  3
+                                                  2
+                                                  (Thrift.buildStruct _proxy _val)),
+                                             3)
+                       Prelude.Nothing -> (Prelude.id, 2)
+               in
+               __cereal__callExpr
+                 (Thrift.genField _proxy "arguments" (Thrift.getListType _proxy) 4
+                    __id__callExpr
+                    (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                       (Thrift.buildStruct _proxy)
+                       __field__arguments)
+                    :
+                    case __field__locator of
+                      Prelude.Just _val -> Thrift.genField _proxy "locator"
+                                             (Thrift.getStructType _proxy)
+                                             5
+                                             4
+                                             (Thrift.buildStruct _proxy _val)
+                                             : []
+                      Prelude.Nothing -> []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__file <- ST.newSTRef Default.def
+            __field__callee_span <- ST.newSTRef Default.def
+            __field__callExpr <- ST.newSTRef Prelude.Nothing
+            __field__arguments <- ST.newSTRef Default.def
+            __field__locator <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__file
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__callee_span
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__callExpr
+                                                                          (Prelude.Just _val)
+                                                                 4 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__arguments
+                                                                          _val
+                                                                 5 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__locator
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__file <- ST.readSTRef __field__file
+                                             !__val__callee_span <- ST.readSTRef
+                                                                      __field__callee_span
+                                             !__val__callExpr <- ST.readSTRef __field__callExpr
+                                             !__val__arguments <- ST.readSTRef __field__arguments
+                                             !__val__locator <- ST.readSTRef __field__locator
+                                             Prelude.pure
+                                               (FileCall_key __val__file __val__callee_span
+                                                  __val__callExpr
+                                                  __val__arguments
+                                                  __val__locator)
+              _idMap
+                = HashMap.fromList
+                    [("file", 1), ("callee_span", 2), ("callExpr", 3),
+                     ("arguments", 4), ("locator", 5)]
+            _parse 0)
+
+instance DeepSeq.NFData FileCall_key where
+  rnf
+    (FileCall_key __field__file __field__callee_span __field__callExpr
+       __field__arguments __field__locator)
+    = DeepSeq.rnf __field__file `Prelude.seq`
+        DeepSeq.rnf __field__callee_span `Prelude.seq`
+          DeepSeq.rnf __field__callExpr `Prelude.seq`
+            DeepSeq.rnf __field__arguments `Prelude.seq`
+              DeepSeq.rnf __field__locator `Prelude.seq` ()
+
+instance Default.Default FileCall_key where
+  def
+    = FileCall_key Default.def Default.def Prelude.Nothing Default.def
+        Prelude.Nothing
+
+instance Hashable.Hashable FileCall_key where
+  hashWithSalt __salt
+    (FileCall_key _file _callee_span _callExpr _arguments _locator)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt
+              (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _file)
+                 _callee_span)
+              _callExpr)
+           _arguments)
+        _locator
+
+data File_key = File_key_source Glean.Schema.Src.File
+              | File_key_generated Locator
+              | File_key_generatedLabel LocatorWithLabel
+              | File_key_EMPTY
+                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON File_key where
+  toJSON (File_key_source __source)
+    = Aeson.object ["source" .= __source]
+  toJSON (File_key_generated __generated)
+    = Aeson.object ["generated" .= __generated]
+  toJSON (File_key_generatedLabel __generatedLabel)
+    = Aeson.object ["generatedLabel" .= __generatedLabel]
+  toJSON File_key_EMPTY = Aeson.object []
+
+instance Thrift.ThriftStruct File_key where
+  buildStruct _proxy (File_key_source __source)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "source" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __source)]
+  buildStruct _proxy (File_key_generated __generated)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "generated" (Thrift.getStructType _proxy) 2
+           0
+           (Thrift.buildStruct _proxy __generated)]
+  buildStruct _proxy (File_key_generatedLabel __generatedLabel)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "generatedLabel"
+           (Thrift.getStructType _proxy)
+           3
+           0
+           (Thrift.buildStruct _proxy __generatedLabel)]
+  buildStruct _proxy File_key_EMPTY = Thrift.genStruct _proxy []
+  parseStruct _proxy
+    = do _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap
+         case _fieldBegin of
+           Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                     1 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return (File_key_source _val)
+                                                     2 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return (File_key_generated _val)
+                                                     3 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (File_key_generatedLabel _val)
+                                                     _ -> do Thrift.parseSkip _proxy _type
+                                                               Prelude.Nothing
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return File_key_EMPTY
+           Thrift.FieldEnd -> Prelude.return File_key_EMPTY
+    where
+      _idMap
+        = HashMap.fromList
+            [("source", 1), ("generated", 2), ("generatedLabel", 3)]
+
+instance DeepSeq.NFData File_key where
+  rnf (File_key_source __source) = DeepSeq.rnf __source
+  rnf (File_key_generated __generated) = DeepSeq.rnf __generated
+  rnf (File_key_generatedLabel __generatedLabel)
+    = DeepSeq.rnf __generatedLabel
+  rnf File_key_EMPTY = ()
+
+instance Default.Default File_key where
+  def = File_key_EMPTY
+
+instance Hashable.Hashable File_key where
+  hashWithSalt __salt (File_key_source _source)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 1 _source)
+  hashWithSalt __salt (File_key_generated _generated)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 2 _generated)
+  hashWithSalt __salt (File_key_generatedLabel _generatedLabel)
+    = Hashable.hashWithSalt __salt
+        (Hashable.hashWithSalt 3 _generatedLabel)
+  hashWithSalt __salt File_key_EMPTY
+    = Hashable.hashWithSalt __salt (0 :: Prelude.Int)
+
+data FailureReason = FailureReason_Skipped
+                   | FailureReason_Blocked
+                   | FailureReason_EmptyCdb
+                   | FailureReason_FailedCdb
+                   | FailureReason_QueryFailed
+                   | FailureReason_Unclassified
+                   | FailureReason__UNKNOWN Prelude.Int
+                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FailureReason where
+  toJSON = Aeson.toJSON . Thrift.fromThriftEnum
+
+instance DeepSeq.NFData FailureReason where
+  rnf __FailureReason = Prelude.seq __FailureReason ()
+
+instance Default.Default FailureReason where
+  def = FailureReason_Skipped
+
+instance Hashable.Hashable FailureReason where
+  hashWithSalt _salt _val
+    = Hashable.hashWithSalt _salt (Thrift.fromThriftEnum _val)
+
+instance Thrift.ThriftEnum FailureReason where
+  toThriftEnum 0 = FailureReason_Skipped
+  toThriftEnum 1 = FailureReason_Blocked
+  toThriftEnum 2 = FailureReason_EmptyCdb
+  toThriftEnum 3 = FailureReason_FailedCdb
+  toThriftEnum 4 = FailureReason_QueryFailed
+  toThriftEnum 5 = FailureReason_Unclassified
+  toThriftEnum val = FailureReason__UNKNOWN val
+  fromThriftEnum FailureReason_Skipped = 0
+  fromThriftEnum FailureReason_Blocked = 1
+  fromThriftEnum FailureReason_EmptyCdb = 2
+  fromThriftEnum FailureReason_FailedCdb = 3
+  fromThriftEnum FailureReason_QueryFailed = 4
+  fromThriftEnum FailureReason_Unclassified = 5
+  fromThriftEnum (FailureReason__UNKNOWN val) = val
+  allThriftEnumValues
+    = [FailureReason_Skipped, FailureReason_Blocked,
+       FailureReason_EmptyCdb, FailureReason_FailedCdb,
+       FailureReason_QueryFailed, FailureReason_Unclassified]
+  toThriftEnumEither 0 = Prelude.Right FailureReason_Skipped
+  toThriftEnumEither 1 = Prelude.Right FailureReason_Blocked
+  toThriftEnumEither 2 = Prelude.Right FailureReason_EmptyCdb
+  toThriftEnumEither 3 = Prelude.Right FailureReason_FailedCdb
+  toThriftEnumEither 4 = Prelude.Right FailureReason_QueryFailed
+  toThriftEnumEither 5 = Prelude.Right FailureReason_Unclassified
+  toThriftEnumEither val
+    = Prelude.Left
+        ("toThriftEnumEither: not a valid identifier for enum FailureReason: "
+           ++ Prelude.show val)
+
+data IndexFailureX_source = IndexFailureX_source_locator Locator
+                          | IndexFailureX_source_buildFile Glean.Schema.Src.File
+                          | IndexFailureX_source_EMPTY
+                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON IndexFailureX_source where
+  toJSON (IndexFailureX_source_locator __locator)
+    = Aeson.object ["locator" .= __locator]
+  toJSON (IndexFailureX_source_buildFile __buildFile)
+    = Aeson.object ["buildFile" .= __buildFile]
+  toJSON IndexFailureX_source_EMPTY = Aeson.object []
+
+instance Thrift.ThriftStruct IndexFailureX_source where
+  buildStruct _proxy (IndexFailureX_source_locator __locator)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "locator" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __locator)]
+  buildStruct _proxy (IndexFailureX_source_buildFile __buildFile)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "buildFile" (Thrift.getStructType _proxy) 2
+           0
+           (Thrift.buildStruct _proxy __buildFile)]
+  buildStruct _proxy IndexFailureX_source_EMPTY
+    = Thrift.genStruct _proxy []
+  parseStruct _proxy
+    = do _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap
+         case _fieldBegin of
+           Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                     1 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (IndexFailureX_source_locator _val)
+                                                     2 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (IndexFailureX_source_buildFile _val)
+                                                     _ -> do Thrift.parseSkip _proxy _type
+                                                               Prelude.Nothing
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return
+                                                               IndexFailureX_source_EMPTY
+           Thrift.FieldEnd -> Prelude.return IndexFailureX_source_EMPTY
+    where
+      _idMap = HashMap.fromList [("locator", 1), ("buildFile", 2)]
+
+instance DeepSeq.NFData IndexFailureX_source where
+  rnf (IndexFailureX_source_locator __locator)
+    = DeepSeq.rnf __locator
+  rnf (IndexFailureX_source_buildFile __buildFile)
+    = DeepSeq.rnf __buildFile
+  rnf IndexFailureX_source_EMPTY = ()
+
+instance Default.Default IndexFailureX_source where
+  def = IndexFailureX_source_EMPTY
+
+instance Hashable.Hashable IndexFailureX_source where
+  hashWithSalt __salt (IndexFailureX_source_locator _locator)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 1 _locator)
+  hashWithSalt __salt (IndexFailureX_source_buildFile _buildFile)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 2 _buildFile)
+  hashWithSalt __salt IndexFailureX_source_EMPTY
+    = Hashable.hashWithSalt __salt (0 :: Prelude.Int)
+
+data IndexFailureX_key = IndexFailureX_key{indexFailureX_key_source
+                                           :: IndexFailureX_source,
+                                           indexFailureX_key_indexer :: IndexerName,
+                                           indexFailureX_key_reason :: FailureReason,
+                                           indexFailureX_key_details :: Text.Text,
+                                           indexFailureX_key_repro :: Prelude.Maybe Text.Text}
+                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON IndexFailureX_key where
+  toJSON
+    (IndexFailureX_key __field__source __field__indexer __field__reason
+       __field__details __field__repro)
+    = Aeson.object
+        ("source" .= __field__source :
+           "indexer" .= __field__indexer :
+             "reason" .= __field__reason :
+               "details" .= __field__details :
+                 Prelude.maybe Prelude.id ((:) . ("repro" .=)) __field__repro
+                   Prelude.mempty)
+
+instance Thrift.ThriftStruct IndexFailureX_key where
+  buildStruct _proxy
+    (IndexFailureX_key __field__source __field__indexer __field__reason
+       __field__details __field__repro)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "source" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__source)
+           :
+           Thrift.genField _proxy "indexer" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__indexer)
+             :
+             Thrift.genField _proxy "reason" (Thrift.getI32Type _proxy) 3 2
+               ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                   Thrift.fromThriftEnum)
+                  __field__reason)
+               :
+               Thrift.genField _proxy "details" (Thrift.getStringType _proxy) 4 3
+                 (Thrift.genText _proxy __field__details)
+                 :
+                 case __field__repro of
+                   Prelude.Just _val -> Thrift.genField _proxy "repro"
+                                          (Thrift.getStringType _proxy)
+                                          5
+                                          4
+                                          (Thrift.genText _proxy _val)
+                                          : []
+                   Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__source <- ST.newSTRef Default.def
+            __field__indexer <- ST.newSTRef Default.def
+            __field__reason <- ST.newSTRef Default.def
+            __field__details <- ST.newSTRef ""
+            __field__repro <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__source
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__indexer
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "FailureReason")
+                                                                        ST.writeSTRef
+                                                                          __field__reason
+                                                                          _val
+                                                                 4 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__details
+                                                                          _val
+                                                                 5 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__repro
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__source <- ST.readSTRef
+                                                                 __field__source
+                                             !__val__indexer <- ST.readSTRef __field__indexer
+                                             !__val__reason <- ST.readSTRef __field__reason
+                                             !__val__details <- ST.readSTRef __field__details
+                                             !__val__repro <- ST.readSTRef __field__repro
+                                             Prelude.pure
+                                               (IndexFailureX_key __val__source __val__indexer
+                                                  __val__reason
+                                                  __val__details
+                                                  __val__repro)
+              _idMap
+                = HashMap.fromList
+                    [("source", 1), ("indexer", 2), ("reason", 3), ("details", 4),
+                     ("repro", 5)]
+            _parse 0)
+
+instance DeepSeq.NFData IndexFailureX_key where
+  rnf
+    (IndexFailureX_key __field__source __field__indexer __field__reason
+       __field__details __field__repro)
+    = DeepSeq.rnf __field__source `Prelude.seq`
+        DeepSeq.rnf __field__indexer `Prelude.seq`
+          DeepSeq.rnf __field__reason `Prelude.seq`
+            DeepSeq.rnf __field__details `Prelude.seq`
+              DeepSeq.rnf __field__repro `Prelude.seq` ()
+
+instance Default.Default IndexFailureX_key where
+  def
+    = IndexFailureX_key Default.def Default.def Default.def ""
+        Prelude.Nothing
+
+instance Hashable.Hashable IndexFailureX_key where
+  hashWithSalt __salt
+    (IndexFailureX_key _source _indexer _reason _details _repro)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt
+              (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _source)
+                 _indexer)
+              _reason)
+           _details)
+        _repro
+
+data DestinationUses_key = DestinationUses_key{destinationUses_key_destination
+                                               :: XRefDestination,
+                                               destinationUses_key_file :: Glean.Schema.Src.File,
+                                               destinationUses_key_spans ::
+                                               [Glean.Schema.Src.ByteSpan]}
+                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON DestinationUses_key where
+  toJSON
+    (DestinationUses_key __field__destination __field__file
+       __field__spans)
+    = Aeson.object
+        ("destination" .= __field__destination :
+           "file" .= __field__file :
+             "spans" .= __field__spans : Prelude.mempty)
+
+instance Thrift.ThriftStruct DestinationUses_key where
+  buildStruct _proxy
+    (DestinationUses_key __field__destination __field__file
+       __field__spans)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "destination" (Thrift.getStructType _proxy)
+           1
+           0
+           (Thrift.buildStruct _proxy __field__destination)
+           :
+           Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__file)
+             :
+             Thrift.genField _proxy "spans" (Thrift.getListType _proxy) 3 2
+               (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                  (Thrift.buildStruct _proxy)
+                  __field__spans)
+               : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__destination <- ST.newSTRef Default.def
+            __field__file <- ST.newSTRef Default.def
+            __field__spans <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__destination
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__file
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef __field__spans
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__destination <- ST.readSTRef
+                                                                      __field__destination
+                                             !__val__file <- ST.readSTRef __field__file
+                                             !__val__spans <- ST.readSTRef __field__spans
+                                             Prelude.pure
+                                               (DestinationUses_key __val__destination __val__file
+                                                  __val__spans)
+              _idMap
+                = HashMap.fromList [("destination", 1), ("file", 2), ("spans", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData DestinationUses_key where
+  rnf
+    (DestinationUses_key __field__destination __field__file
+       __field__spans)
+    = DeepSeq.rnf __field__destination `Prelude.seq`
+        DeepSeq.rnf __field__file `Prelude.seq`
+          DeepSeq.rnf __field__spans `Prelude.seq` ()
+
+instance Default.Default DestinationUses_key where
+  def = DestinationUses_key Default.def Default.def Default.def
+
+instance Hashable.Hashable DestinationUses_key where
+  hashWithSalt __salt (DestinationUses_key _destination _file _spans)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _destination)
+           _file)
+        _spans
+
+data Dependency = Dependency{dependency_target :: Locator,
+                             dependency_explicit_ :: Prelude.Bool,
+                             dependency_exported :: Prelude.Bool}
+                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Dependency where
+  toJSON
+    (Dependency __field__target __field__explicit_ __field__exported)
+    = Aeson.object
+        ("target" .= __field__target :
+           "explicit_" .= __field__explicit_ :
+             "exported" .= __field__exported : Prelude.mempty)
+
+instance Thrift.ThriftStruct Dependency where
+  buildStruct _proxy
+    (Dependency __field__target __field__explicit_ __field__exported)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__target)
+           :
+           Thrift.genFieldBool _proxy "explicit_" 2 1 __field__explicit_ :
+             Thrift.genFieldBool _proxy "exported" 3 2 __field__exported : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__target <- ST.newSTRef Default.def
+            __field__explicit_ <- ST.newSTRef Prelude.False
+            __field__exported <- ST.newSTRef Prelude.False
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__target
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getBoolType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseBoolF
+                                                                                      _proxy
+                                                                                      _bool)
+                                                                        ST.writeSTRef
+                                                                          __field__explicit_
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getBoolType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseBoolF
+                                                                                      _proxy
+                                                                                      _bool)
+                                                                        ST.writeSTRef
+                                                                          __field__exported
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__target <- ST.readSTRef
+                                                                 __field__target
+                                             !__val__explicit_ <- ST.readSTRef __field__explicit_
+                                             !__val__exported <- ST.readSTRef __field__exported
+                                             Prelude.pure
+                                               (Dependency __val__target __val__explicit_
+                                                  __val__exported)
+              _idMap
+                = HashMap.fromList
+                    [("target", 1), ("explicit_", 2), ("exported", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData Dependency where
+  rnf
+    (Dependency __field__target __field__explicit_ __field__exported)
+    = DeepSeq.rnf __field__target `Prelude.seq`
+        DeepSeq.rnf __field__explicit_ `Prelude.seq`
+          DeepSeq.rnf __field__exported `Prelude.seq` ()
+
+instance Default.Default Dependency where
+  def = Dependency Default.def Prelude.False Prelude.False
+
+instance Hashable.Hashable Dependency where
+  hashWithSalt __salt (Dependency _target _explicit_ _exported)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _target)
+           _explicit_)
+        _exported
+
+data TargetDependencies_key = TargetDependencies_key{targetDependencies_key_target
+                                                     :: Target,
+                                                     targetDependencies_key_dependencies ::
+                                                     [Dependency]}
+                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TargetDependencies_key where
+  toJSON
+    (TargetDependencies_key __field__target __field__dependencies)
+    = Aeson.object
+        ("target" .= __field__target :
+           "dependencies" .= __field__dependencies : Prelude.mempty)
+
+instance Thrift.ThriftStruct TargetDependencies_key where
+  buildStruct _proxy
+    (TargetDependencies_key __field__target __field__dependencies)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__target)
+           :
+           Thrift.genField _proxy "dependencies" (Thrift.getListType _proxy) 2
+             1
+             (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                (Thrift.buildStruct _proxy)
+                __field__dependencies)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__target <- ST.newSTRef Default.def
+            __field__dependencies <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__target
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__dependencies
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__target <- ST.readSTRef
+                                                                 __field__target
+                                             !__val__dependencies <- ST.readSTRef
+                                                                       __field__dependencies
+                                             Prelude.pure
+                                               (TargetDependencies_key __val__target
+                                                  __val__dependencies)
+              _idMap = HashMap.fromList [("target", 1), ("dependencies", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData TargetDependencies_key where
+  rnf (TargetDependencies_key __field__target __field__dependencies)
+    = DeepSeq.rnf __field__target `Prelude.seq`
+        DeepSeq.rnf __field__dependencies `Prelude.seq` ()
+
+instance Default.Default TargetDependencies_key where
+  def = TargetDependencies_key Default.def Default.def
+
+instance Hashable.Hashable TargetDependencies_key where
+  hashWithSalt __salt (TargetDependencies_key _target _dependencies)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _target)
+        _dependencies
+
+data DefinitionMetadata_key = DefinitionMetadata_key{definitionMetadata_key_definition
+                                                     :: Definition,
+                                                     definitionMetadata_key_kind :: Kind,
+                                                     definitionMetadata_key_span ::
+                                                     Glean.Schema.Src.ByteSpan}
+                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON DefinitionMetadata_key where
+  toJSON
+    (DefinitionMetadata_key __field__definition __field__kind
+       __field__span)
+    = Aeson.object
+        ("definition" .= __field__definition :
+           "kind" .= __field__kind : "span" .= __field__span : Prelude.mempty)
+
+instance Thrift.ThriftStruct DefinitionMetadata_key where
+  buildStruct _proxy
+    (DefinitionMetadata_key __field__definition __field__kind
+       __field__span)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "definition" (Thrift.getStructType _proxy)
+           1
+           0
+           (Thrift.buildStruct _proxy __field__definition)
+           :
+           Thrift.genField _proxy "kind" (Thrift.getI32Type _proxy) 2 1
+             ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                 Thrift.fromThriftEnum)
+                __field__kind)
+             :
+             Thrift.genField _proxy "span" (Thrift.getStructType _proxy) 3 2
+               (Thrift.buildStruct _proxy __field__span)
+               : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__definition <- ST.newSTRef Default.def
+            __field__kind <- ST.newSTRef Default.def
+            __field__span <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__definition
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "Kind")
+                                                                        ST.writeSTRef __field__kind
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__span
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__definition <- ST.readSTRef
+                                                                     __field__definition
+                                             !__val__kind <- ST.readSTRef __field__kind
+                                             !__val__span <- ST.readSTRef __field__span
+                                             Prelude.pure
+                                               (DefinitionMetadata_key __val__definition __val__kind
+                                                  __val__span)
+              _idMap
+                = HashMap.fromList [("definition", 1), ("kind", 2), ("span", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData DefinitionMetadata_key where
+  rnf
+    (DefinitionMetadata_key __field__definition __field__kind
+       __field__span)
+    = DeepSeq.rnf __field__definition `Prelude.seq`
+        DeepSeq.rnf __field__kind `Prelude.seq`
+          DeepSeq.rnf __field__span `Prelude.seq` ()
+
+instance Default.Default DefinitionMetadata_key where
+  def = DefinitionMetadata_key Default.def Default.def Default.def
+
+instance Hashable.Hashable DefinitionMetadata_key where
+  hashWithSalt __salt
+    (DefinitionMetadata_key _definition _kind _span)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _definition)
+           _kind)
+        _span
+
+data DefinitionLocation_key = DefinitionLocation_key{definitionLocation_key_definition
+                                                     :: Definition,
+                                                     definitionLocation_key_file ::
+                                                     Glean.Schema.Src.File,
+                                                     definitionLocation_key_span ::
+                                                     Glean.Schema.Src.ByteSpan}
+                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON DefinitionLocation_key where
+  toJSON
+    (DefinitionLocation_key __field__definition __field__file
+       __field__span)
+    = Aeson.object
+        ("definition" .= __field__definition :
+           "file" .= __field__file : "span" .= __field__span : Prelude.mempty)
+
+instance Thrift.ThriftStruct DefinitionLocation_key where
+  buildStruct _proxy
+    (DefinitionLocation_key __field__definition __field__file
+       __field__span)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "definition" (Thrift.getStructType _proxy)
+           1
+           0
+           (Thrift.buildStruct _proxy __field__definition)
+           :
+           Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__file)
+             :
+             Thrift.genField _proxy "span" (Thrift.getStructType _proxy) 3 2
+               (Thrift.buildStruct _proxy __field__span)
+               : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__definition <- ST.newSTRef Default.def
+            __field__file <- ST.newSTRef Default.def
+            __field__span <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__definition
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__file
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__span
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__definition <- ST.readSTRef
+                                                                     __field__definition
+                                             !__val__file <- ST.readSTRef __field__file
+                                             !__val__span <- ST.readSTRef __field__span
+                                             Prelude.pure
+                                               (DefinitionLocation_key __val__definition __val__file
+                                                  __val__span)
+              _idMap
+                = HashMap.fromList [("definition", 1), ("file", 2), ("span", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData DefinitionLocation_key where
+  rnf
+    (DefinitionLocation_key __field__definition __field__file
+       __field__span)
+    = DeepSeq.rnf __field__definition `Prelude.seq`
+        DeepSeq.rnf __field__file `Prelude.seq`
+          DeepSeq.rnf __field__span `Prelude.seq` ()
+
+instance Default.Default DefinitionLocation_key where
+  def = DefinitionLocation_key Default.def Default.def Default.def
+
+instance Hashable.Hashable DefinitionLocation_key where
+  hashWithSalt __salt
+    (DefinitionLocation_key _definition _file _span)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _definition)
+           _file)
+        _span
+
+data DefinitionKind_key = DefinitionKind_key{definitionKind_key_definition
+                                             :: Definition,
+                                             definitionKind_key_kind :: Kind}
+                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON DefinitionKind_key where
+  toJSON (DefinitionKind_key __field__definition __field__kind)
+    = Aeson.object
+        ("definition" .= __field__definition :
+           "kind" .= __field__kind : Prelude.mempty)
+
+instance Thrift.ThriftStruct DefinitionKind_key where
+  buildStruct _proxy
+    (DefinitionKind_key __field__definition __field__kind)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "definition" (Thrift.getStructType _proxy)
+           1
+           0
+           (Thrift.buildStruct _proxy __field__definition)
+           :
+           Thrift.genField _proxy "kind" (Thrift.getI32Type _proxy) 2 1
+             ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                 Thrift.fromThriftEnum)
+                __field__kind)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__definition <- ST.newSTRef Default.def
+            __field__kind <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__definition
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "Kind")
+                                                                        ST.writeSTRef __field__kind
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__definition <- ST.readSTRef
+                                                                     __field__definition
+                                             !__val__kind <- ST.readSTRef __field__kind
+                                             Prelude.pure
+                                               (DefinitionKind_key __val__definition __val__kind)
+              _idMap = HashMap.fromList [("definition", 1), ("kind", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData DefinitionKind_key where
+  rnf (DefinitionKind_key __field__definition __field__kind)
+    = DeepSeq.rnf __field__definition `Prelude.seq`
+        DeepSeq.rnf __field__kind `Prelude.seq` ()
+
+instance Default.Default DefinitionKind_key where
+  def = DefinitionKind_key Default.def Default.def
+
+instance Hashable.Hashable DefinitionKind_key where
+  hashWithSalt __salt (DefinitionKind_key _definition _kind)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _definition)
+        _kind
+
+data Definition_key = Definition_key{definition_key_module ::
+                                     Glean.Schema.Src.File,
+                                     definition_key_name :: Text.Text}
+                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Definition_key where
+  toJSON (Definition_key __field__module __field__name)
+    = Aeson.object
+        ("module" .= __field__module :
+           "name" .= __field__name : Prelude.mempty)
+
+instance Thrift.ThriftStruct Definition_key where
+  buildStruct _proxy (Definition_key __field__module __field__name)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "module" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__module)
+           :
+           Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 2 1
+             (Thrift.genText _proxy __field__name)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__module <- ST.newSTRef Default.def
+            __field__name <- ST.newSTRef ""
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__module
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__module <- ST.readSTRef
+                                                                 __field__module
+                                             !__val__name <- ST.readSTRef __field__name
+                                             Prelude.pure (Definition_key __val__module __val__name)
+              _idMap = HashMap.fromList [("module", 1), ("name", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData Definition_key where
+  rnf (Definition_key __field__module __field__name)
+    = DeepSeq.rnf __field__module `Prelude.seq`
+        DeepSeq.rnf __field__name `Prelude.seq` ()
+
+instance Default.Default Definition_key where
+  def = Definition_key Default.def ""
+
+instance Hashable.Hashable Definition_key where
+  hashWithSalt __salt (Definition_key _module _name)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _module)
+        _name
+
+data Consumer_key = Consumer_key{consumer_key_source ::
+                                 Glean.Schema.Src.File,
+                                 consumer_key_consumer :: TargetSources}
+                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Consumer_key where
+  toJSON (Consumer_key __field__source __field__consumer)
+    = Aeson.object
+        ("source" .= __field__source :
+           "consumer" .= __field__consumer : Prelude.mempty)
+
+instance Thrift.ThriftStruct Consumer_key where
+  buildStruct _proxy (Consumer_key __field__source __field__consumer)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "source" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__source)
+           :
+           Thrift.genField _proxy "consumer" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__consumer)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__source <- ST.newSTRef Default.def
+            __field__consumer <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__source
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__consumer
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__source <- ST.readSTRef
+                                                                 __field__source
+                                             !__val__consumer <- ST.readSTRef __field__consumer
+                                             Prelude.pure
+                                               (Consumer_key __val__source __val__consumer)
+              _idMap = HashMap.fromList [("source", 1), ("consumer", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData Consumer_key where
+  rnf (Consumer_key __field__source __field__consumer)
+    = DeepSeq.rnf __field__source `Prelude.seq`
+        DeepSeq.rnf __field__consumer `Prelude.seq` ()
+
+instance Default.Default Consumer_key where
+  def = Consumer_key Default.def Default.def
+
+instance Hashable.Hashable Consumer_key where
+  hashWithSalt __salt (Consumer_key _source _consumer)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _source)
+        _consumer
+
+data CallName = CallName_prim Text.Text
+              | CallName_definition Definition
+              | CallName_EMPTY
+                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON CallName where
+  toJSON (CallName_prim __prim) = Aeson.object ["prim" .= __prim]
+  toJSON (CallName_definition __definition)
+    = Aeson.object ["definition" .= __definition]
+  toJSON CallName_EMPTY = Aeson.object []
+
+instance Thrift.ThriftStruct CallName where
+  buildStruct _proxy (CallName_prim __prim)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "prim" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __prim)]
+  buildStruct _proxy (CallName_definition __definition)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "definition" (Thrift.getStructType _proxy)
+           2
+           0
+           (Thrift.buildStruct _proxy __definition)]
+  buildStruct _proxy CallName_EMPTY = Thrift.genStruct _proxy []
+  parseStruct _proxy
+    = do _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap
+         case _fieldBegin of
+           Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                     1 | _type == Thrift.getStringType _proxy ->
+                                                         do _val <- Thrift.parseText _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return (CallName_prim _val)
+                                                     2 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (CallName_definition _val)
+                                                     _ -> do Thrift.parseSkip _proxy _type
+                                                               Prelude.Nothing
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return CallName_EMPTY
+           Thrift.FieldEnd -> Prelude.return CallName_EMPTY
+    where
+      _idMap = HashMap.fromList [("prim", 1), ("definition", 2)]
+
+instance DeepSeq.NFData CallName where
+  rnf (CallName_prim __prim) = DeepSeq.rnf __prim
+  rnf (CallName_definition __definition) = DeepSeq.rnf __definition
+  rnf CallName_EMPTY = ()
+
+instance Default.Default CallName where
+  def = CallName_EMPTY
+
+instance Hashable.Hashable CallName where
+  hashWithSalt __salt (CallName_prim _prim)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 1 _prim)
+  hashWithSalt __salt (CallName_definition _definition)
+    = Hashable.hashWithSalt __salt
+        (Hashable.hashWithSalt 2 _definition)
+  hashWithSalt __salt CallName_EMPTY
+    = Hashable.hashWithSalt __salt (0 :: Prelude.Int)
+
+data CallExpr_accessor_ = CallExpr_accessor_{callExpr_accessor__name
+                                             :: CallExpr,
+                                             callExpr_accessor__field :: Text.Text}
+                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON CallExpr_accessor_ where
+  toJSON (CallExpr_accessor_ __field__name __field__field)
+    = Aeson.object
+        ("name" .= __field__name :
+           "field" .= __field__field : Prelude.mempty)
+
+instance Thrift.ThriftStruct CallExpr_accessor_ where
+  buildStruct _proxy
+    (CallExpr_accessor_ __field__name __field__field)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__name)
+           :
+           Thrift.genField _proxy "field" (Thrift.getStringType _proxy) 2 1
+             (Thrift.genText _proxy __field__field)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef Default.def
+            __field__field <- ST.newSTRef ""
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__field
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__field <- ST.readSTRef __field__field
+                                             Prelude.pure
+                                               (CallExpr_accessor_ __val__name __val__field)
+              _idMap = HashMap.fromList [("name", 1), ("field", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData CallExpr_accessor_ where
+  rnf (CallExpr_accessor_ __field__name __field__field)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__field `Prelude.seq` ()
+
+instance Default.Default CallExpr_accessor_ where
+  def = CallExpr_accessor_ Default.def ""
+
+instance Hashable.Hashable CallExpr_accessor_ where
+  hashWithSalt __salt (CallExpr_accessor_ _name _field)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _field
+
+data CallExpr_key = CallExpr_key_name CallName
+                  | CallExpr_key_accessor CallExpr_accessor_
+                  | CallExpr_key_EMPTY
+                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON CallExpr_key where
+  toJSON (CallExpr_key_name __name) = Aeson.object ["name" .= __name]
+  toJSON (CallExpr_key_accessor __accessor)
+    = Aeson.object ["accessor" .= __accessor]
+  toJSON CallExpr_key_EMPTY = Aeson.object []
+
+instance Thrift.ThriftStruct CallExpr_key where
+  buildStruct _proxy (CallExpr_key_name __name)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __name)]
+  buildStruct _proxy (CallExpr_key_accessor __accessor)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "accessor" (Thrift.getStructType _proxy) 2
+           0
+           (Thrift.buildStruct _proxy __accessor)]
+  buildStruct _proxy CallExpr_key_EMPTY = Thrift.genStruct _proxy []
+  parseStruct _proxy
+    = do _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap
+         case _fieldBegin of
+           Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                     1 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return (CallExpr_key_name _val)
+                                                     2 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (CallExpr_key_accessor _val)
+                                                     _ -> do Thrift.parseSkip _proxy _type
+                                                               Prelude.Nothing
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return CallExpr_key_EMPTY
+           Thrift.FieldEnd -> Prelude.return CallExpr_key_EMPTY
+    where
+      _idMap = HashMap.fromList [("name", 1), ("accessor", 2)]
+
+instance DeepSeq.NFData CallExpr_key where
+  rnf (CallExpr_key_name __name) = DeepSeq.rnf __name
+  rnf (CallExpr_key_accessor __accessor) = DeepSeq.rnf __accessor
+  rnf CallExpr_key_EMPTY = ()
+
+instance Default.Default CallExpr_key where
+  def = CallExpr_key_EMPTY
+
+instance Hashable.Hashable CallExpr_key where
+  hashWithSalt __salt (CallExpr_key_name _name)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 1 _name)
+  hashWithSalt __salt (CallExpr_key_accessor _accessor)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 2 _accessor)
+  hashWithSalt __salt CallExpr_key_EMPTY
+    = Hashable.hashWithSalt __salt (0 :: Prelude.Int)
+
+data CallArgument_key = CallArgument_key{callArgument_key_label ::
+                                         Prelude.Maybe Text.Text,
+                                         callArgument_key_value :: ArgumentValue,
+                                         callArgument_key_file :: Glean.Schema.Src.File,
+                                         callArgument_key_span :: Glean.Schema.Src.ByteSpan}
+                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON CallArgument_key where
+  toJSON
+    (CallArgument_key __field__label __field__value __field__file
+       __field__span)
+    = Aeson.object
+        (Prelude.maybe Prelude.id ((:) . ("label" .=)) __field__label
+           ("value" .= __field__value :
+              "file" .= __field__file :
+                "span" .= __field__span : Prelude.mempty))
+
+instance Thrift.ThriftStruct CallArgument_key where
+  buildStruct _proxy
+    (CallArgument_key __field__label __field__value __field__file
+       __field__span)
+    = Thrift.genStruct _proxy
+        (let (__cereal__label, __id__label)
+               = case __field__label of
+                   Prelude.Just _val -> ((:)
+                                           (Thrift.genField _proxy "label"
+                                              (Thrift.getStringType _proxy)
+                                              1
+                                              0
+                                              (Thrift.genText _proxy _val)),
+                                         1)
+                   Prelude.Nothing -> (Prelude.id, 0)
+           in
+           __cereal__label
+             (Thrift.genField _proxy "value" (Thrift.getStructType _proxy) 2
+                __id__label
+                (Thrift.buildStruct _proxy __field__value)
+                :
+                Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 3 2
+                  (Thrift.buildStruct _proxy __field__file)
+                  :
+                  Thrift.genField _proxy "span" (Thrift.getStructType _proxy) 4 3
+                    (Thrift.buildStruct _proxy __field__span)
+                    : []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__label <- ST.newSTRef Prelude.Nothing
+            __field__value <- ST.newSTRef Default.def
+            __field__file <- ST.newSTRef Default.def
+            __field__span <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__label
+                                                                          (Prelude.Just _val)
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__value
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__file
+                                                                          _val
+                                                                 4 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__span
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__label <- ST.readSTRef __field__label
+                                             !__val__value <- ST.readSTRef __field__value
+                                             !__val__file <- ST.readSTRef __field__file
+                                             !__val__span <- ST.readSTRef __field__span
+                                             Prelude.pure
+                                               (CallArgument_key __val__label __val__value
+                                                  __val__file
+                                                  __val__span)
+              _idMap
+                = HashMap.fromList
+                    [("label", 1), ("value", 2), ("file", 3), ("span", 4)]
+            _parse 0)
+
+instance DeepSeq.NFData CallArgument_key where
+  rnf
+    (CallArgument_key __field__label __field__value __field__file
+       __field__span)
+    = DeepSeq.rnf __field__label `Prelude.seq`
+        DeepSeq.rnf __field__value `Prelude.seq`
+          DeepSeq.rnf __field__file `Prelude.seq`
+            DeepSeq.rnf __field__span `Prelude.seq` ()
+
+instance Default.Default CallArgument_key where
+  def
+    = CallArgument_key Prelude.Nothing Default.def Default.def
+        Default.def
+
+instance Hashable.Hashable CallArgument_key where
+  hashWithSalt __salt (CallArgument_key _label _value _file _span)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _label)
+              _value)
+           _file)
+        _span
+
+data AttributeMapping = AttributeMapping{attributeMapping_key ::
+                                         Text.Text,
+                                         attributeMapping_value :: AttributeValue}
+                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON AttributeMapping where
+  toJSON (AttributeMapping __field__key __field__value)
+    = Aeson.object
+        ("key" .= __field__key :
+           "value" .= __field__value : Prelude.mempty)
+
+instance Thrift.ThriftStruct AttributeMapping where
+  buildStruct _proxy (AttributeMapping __field__key __field__value)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "key" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__key)
+           :
+           Thrift.genField _proxy "value" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__value)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__key <- ST.newSTRef ""
+            __field__value <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__value
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__key <- ST.readSTRef __field__key
+                                             !__val__value <- ST.readSTRef __field__value
+                                             Prelude.pure (AttributeMapping __val__key __val__value)
+              _idMap = HashMap.fromList [("key", 1), ("value", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData AttributeMapping where
+  rnf (AttributeMapping __field__key __field__value)
+    = DeepSeq.rnf __field__key `Prelude.seq`
+        DeepSeq.rnf __field__value `Prelude.seq` ()
+
+instance Default.Default AttributeMapping where
+  def = AttributeMapping "" Default.def
+
+instance Hashable.Hashable AttributeMapping where
+  hashWithSalt __salt (AttributeMapping _key _value)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _key) _value
+
+data AttributeValue_key = AttributeValue_key_str Text.Text
+                        | AttributeValue_key_sequence [AttributeValue]
+                        | AttributeValue_key_mapping [AttributeMapping]
+                        | AttributeValue_key_EMPTY
+                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON AttributeValue_key where
+  toJSON (AttributeValue_key_str __str)
+    = Aeson.object ["str" .= __str]
+  toJSON (AttributeValue_key_sequence __sequence)
+    = Aeson.object ["sequence" .= __sequence]
+  toJSON (AttributeValue_key_mapping __mapping)
+    = Aeson.object ["mapping" .= __mapping]
+  toJSON AttributeValue_key_EMPTY = Aeson.object []
+
+instance Thrift.ThriftStruct AttributeValue_key where
+  buildStruct _proxy (AttributeValue_key_str __str)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "str" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __str)]
+  buildStruct _proxy (AttributeValue_key_sequence __sequence)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "sequence" (Thrift.getListType _proxy) 2 0
+           (Thrift.genList _proxy (Thrift.getStructType _proxy)
+              (Thrift.buildStruct _proxy)
+              __sequence)]
+  buildStruct _proxy (AttributeValue_key_mapping __mapping)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "mapping" (Thrift.getListType _proxy) 3 0
+           (Thrift.genList _proxy (Thrift.getStructType _proxy)
+              (Thrift.buildStruct _proxy)
+              __mapping)]
+  buildStruct _proxy AttributeValue_key_EMPTY
+    = Thrift.genStruct _proxy []
+  parseStruct _proxy
+    = do _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap
+         case _fieldBegin of
+           Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                     1 | _type == Thrift.getStringType _proxy ->
+                                                         do _val <- Thrift.parseText _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (AttributeValue_key_str _val)
+                                                     2 | _type == Thrift.getListType _proxy ->
+                                                         do _val <- Prelude.snd <$>
+                                                                      Thrift.parseList _proxy
+                                                                        (Thrift.parseStruct _proxy)
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (AttributeValue_key_sequence _val)
+                                                     3 | _type == Thrift.getListType _proxy ->
+                                                         do _val <- Prelude.snd <$>
+                                                                      Thrift.parseList _proxy
+                                                                        (Thrift.parseStruct _proxy)
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (AttributeValue_key_mapping _val)
+                                                     _ -> do Thrift.parseSkip _proxy _type
+                                                               Prelude.Nothing
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return AttributeValue_key_EMPTY
+           Thrift.FieldEnd -> Prelude.return AttributeValue_key_EMPTY
+    where
+      _idMap
+        = HashMap.fromList [("str", 1), ("sequence", 2), ("mapping", 3)]
+
+instance DeepSeq.NFData AttributeValue_key where
+  rnf (AttributeValue_key_str __str) = DeepSeq.rnf __str
+  rnf (AttributeValue_key_sequence __sequence)
+    = DeepSeq.rnf __sequence
+  rnf (AttributeValue_key_mapping __mapping) = DeepSeq.rnf __mapping
+  rnf AttributeValue_key_EMPTY = ()
+
+instance Default.Default AttributeValue_key where
+  def = AttributeValue_key_EMPTY
+
+instance Hashable.Hashable AttributeValue_key where
+  hashWithSalt __salt (AttributeValue_key_str _str)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 1 _str)
+  hashWithSalt __salt (AttributeValue_key_sequence _sequence)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 2 _sequence)
+  hashWithSalt __salt (AttributeValue_key_mapping _mapping)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 3 _mapping)
+  hashWithSalt __salt AttributeValue_key_EMPTY
+    = Hashable.hashWithSalt __salt (0 :: Prelude.Int)
+
+data ArgumentMapping = ArgumentMapping{argumentMapping_key ::
+                                       Text.Text,
+                                       argumentMapping_value :: ArgumentValue}
+                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ArgumentMapping where
+  toJSON (ArgumentMapping __field__key __field__value)
+    = Aeson.object
+        ("key" .= __field__key :
+           "value" .= __field__value : Prelude.mempty)
+
+instance Thrift.ThriftStruct ArgumentMapping where
+  buildStruct _proxy (ArgumentMapping __field__key __field__value)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "key" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__key)
+           :
+           Thrift.genField _proxy "value" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__value)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__key <- ST.newSTRef ""
+            __field__value <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__value
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__key <- ST.readSTRef __field__key
+                                             !__val__value <- ST.readSTRef __field__value
+                                             Prelude.pure (ArgumentMapping __val__key __val__value)
+              _idMap = HashMap.fromList [("key", 1), ("value", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ArgumentMapping where
+  rnf (ArgumentMapping __field__key __field__value)
+    = DeepSeq.rnf __field__key `Prelude.seq`
+        DeepSeq.rnf __field__value `Prelude.seq` ()
+
+instance Default.Default ArgumentMapping where
+  def = ArgumentMapping "" Default.def
+
+instance Hashable.Hashable ArgumentMapping where
+  hashWithSalt __salt (ArgumentMapping _key _value)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _key) _value
+
+data ArgumentValue_key = ArgumentValue_key_lit Text.Text
+                       | ArgumentValue_key_sequence [ArgumentValue]
+                       | ArgumentValue_key_mapping [ArgumentMapping]
+                       | ArgumentValue_key_none Glean.Schema.Builtin.Unit
+                       | ArgumentValue_key_def_ Definition
+                       | ArgumentValue_key_other Glean.Schema.Src.ByteSpan
+                       | ArgumentValue_key_EMPTY
+                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ArgumentValue_key where
+  toJSON (ArgumentValue_key_lit __lit)
+    = Aeson.object ["lit" .= __lit]
+  toJSON (ArgumentValue_key_sequence __sequence)
+    = Aeson.object ["sequence" .= __sequence]
+  toJSON (ArgumentValue_key_mapping __mapping)
+    = Aeson.object ["mapping" .= __mapping]
+  toJSON (ArgumentValue_key_none __none)
+    = Aeson.object ["none" .= __none]
+  toJSON (ArgumentValue_key_def_ __def_)
+    = Aeson.object ["def_" .= __def_]
+  toJSON (ArgumentValue_key_other __other)
+    = Aeson.object ["other" .= __other]
+  toJSON ArgumentValue_key_EMPTY = Aeson.object []
+
+instance Thrift.ThriftStruct ArgumentValue_key where
+  buildStruct _proxy (ArgumentValue_key_lit __lit)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "lit" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __lit)]
+  buildStruct _proxy (ArgumentValue_key_sequence __sequence)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "sequence" (Thrift.getListType _proxy) 2 0
+           (Thrift.genList _proxy (Thrift.getStructType _proxy)
+              (Thrift.buildStruct _proxy)
+              __sequence)]
+  buildStruct _proxy (ArgumentValue_key_mapping __mapping)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "mapping" (Thrift.getListType _proxy) 3 0
+           (Thrift.genList _proxy (Thrift.getStructType _proxy)
+              (Thrift.buildStruct _proxy)
+              __mapping)]
+  buildStruct _proxy (ArgumentValue_key_none __none)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "none" (Thrift.getStructType _proxy) 4 0
+           (Thrift.buildStruct _proxy __none)]
+  buildStruct _proxy (ArgumentValue_key_def_ __def_)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "def_" (Thrift.getStructType _proxy) 5 0
+           (Thrift.buildStruct _proxy __def_)]
+  buildStruct _proxy (ArgumentValue_key_other __other)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "other" (Thrift.getStructType _proxy) 6 0
+           (Thrift.buildStruct _proxy __other)]
+  buildStruct _proxy ArgumentValue_key_EMPTY
+    = Thrift.genStruct _proxy []
+  parseStruct _proxy
+    = do _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap
+         case _fieldBegin of
+           Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                     1 | _type == Thrift.getStringType _proxy ->
+                                                         do _val <- Thrift.parseText _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (ArgumentValue_key_lit _val)
+                                                     2 | _type == Thrift.getListType _proxy ->
+                                                         do _val <- Prelude.snd <$>
+                                                                      Thrift.parseList _proxy
+                                                                        (Thrift.parseStruct _proxy)
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (ArgumentValue_key_sequence _val)
+                                                     3 | _type == Thrift.getListType _proxy ->
+                                                         do _val <- Prelude.snd <$>
+                                                                      Thrift.parseList _proxy
+                                                                        (Thrift.parseStruct _proxy)
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (ArgumentValue_key_mapping _val)
+                                                     4 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (ArgumentValue_key_none _val)
+                                                     5 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (ArgumentValue_key_def_ _val)
+                                                     6 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (ArgumentValue_key_other _val)
+                                                     _ -> do Thrift.parseSkip _proxy _type
+                                                               Prelude.Nothing
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return ArgumentValue_key_EMPTY
+           Thrift.FieldEnd -> Prelude.return ArgumentValue_key_EMPTY
+    where
+      _idMap
+        = HashMap.fromList
+            [("lit", 1), ("sequence", 2), ("mapping", 3), ("none", 4),
+             ("def_", 5), ("other", 6)]
+
+instance DeepSeq.NFData ArgumentValue_key where
+  rnf (ArgumentValue_key_lit __lit) = DeepSeq.rnf __lit
+  rnf (ArgumentValue_key_sequence __sequence)
+    = DeepSeq.rnf __sequence
+  rnf (ArgumentValue_key_mapping __mapping) = DeepSeq.rnf __mapping
+  rnf (ArgumentValue_key_none __none) = DeepSeq.rnf __none
+  rnf (ArgumentValue_key_def_ __def_) = DeepSeq.rnf __def_
+  rnf (ArgumentValue_key_other __other) = DeepSeq.rnf __other
+  rnf ArgumentValue_key_EMPTY = ()
+
+instance Default.Default ArgumentValue_key where
+  def = ArgumentValue_key_EMPTY
+
+instance Hashable.Hashable ArgumentValue_key where
+  hashWithSalt __salt (ArgumentValue_key_lit _lit)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 1 _lit)
+  hashWithSalt __salt (ArgumentValue_key_sequence _sequence)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 2 _sequence)
+  hashWithSalt __salt (ArgumentValue_key_mapping _mapping)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 3 _mapping)
+  hashWithSalt __salt (ArgumentValue_key_none _none)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 4 _none)
+  hashWithSalt __salt (ArgumentValue_key_def_ _def_)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 5 _def_)
+  hashWithSalt __salt (ArgumentValue_key_other _other)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 6 _other)
+  hashWithSalt __salt ArgumentValue_key_EMPTY
+    = Hashable.hashWithSalt __salt (0 :: Prelude.Int)
+{-# LINE 18 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.CallArgument_key where
+  buildRtsValue b
+    (Glean.Schema.Buck.Types.CallArgument_key x1 x2 x3 x4)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.CallArgument_key <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.CallArgument_key" (Prelude.Just 0))
+{-# LINE 31 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Buck.Types.CallArgument_key =
+     'Angle.TField "label" (Prelude.Maybe Data.Text.Text)
+       ('Angle.TField "value"
+          (Glean.KeyType Glean.Schema.Buck.Types.ArgumentValue)
+          ('Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
+             ('Angle.TField "span" (Glean.Schema.Src.Types.ByteSpan)
+                ('Angle.TNoFields))))
+{-# LINE 33 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.CallArgument where
+  type KeyType Glean.Schema.Buck.Types.CallArgument =
+       Glean.Schema.Buck.Types.CallArgument_key
+  getName _proxy = Glean.PredicateRef "buck.CallArgument" 4
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.callArgument_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.CallArgument x k
+  getFactKey = Glean.Schema.Buck.Types.callArgument_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 42 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.CallArgument where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 48 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.RuleKey_key where
+  buildRtsValue b (Glean.Schema.Buck.Types.RuleKey_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.RuleKey_key <$> Glean.decodeRtsValue <*>
+        Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.RuleKey_key" (Prelude.Just 0))
+{-# LINE 57 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Buck.Types.RuleKey_key =
+     'Angle.TField "locator"
+       (Glean.KeyType Glean.Schema.Buck.Types.Locator)
+       ('Angle.TField "ruleKey" (Data.Text.Text) ('Angle.TNoFields))
+{-# LINE 59 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.RuleKey where
+  type KeyType Glean.Schema.Buck.Types.RuleKey =
+       Glean.Schema.Buck.Types.RuleKey_key
+  getName _proxy = Glean.PredicateRef "buck.RuleKey" 4
+  getId = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.ruleKey_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.RuleKey x k
+  getFactKey = Glean.Schema.Buck.Types.ruleKey_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 68 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.RuleKey where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 74 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.Label where
+  type KeyType Glean.Schema.Buck.Types.Label = Data.Text.Text
+  getName _proxy = Glean.PredicateRef "buck.Label" 4
+  getId = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.label_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.Label x k
+  getFactKey = Glean.Schema.Buck.Types.label_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 82 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.Label where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 88 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.SearchByLocalName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Buck.Types.SearchByLocalName_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.SearchByLocalName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.SearchByLocalName_key" (Prelude.Just 0))
+{-# LINE 97 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Buck.Types.SearchByLocalName_key =
+     'Angle.TField "name"
+       (Glean.KeyType Glean.Schema.Buck.Types.LocalName)
+       ('Angle.TField "decl" (Glean.Schema.Buck.Types.XRefDestination)
+          ('Angle.TNoFields))
+{-# LINE 99 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.SearchByLocalName
+         where
+  type KeyType Glean.Schema.Buck.Types.SearchByLocalName =
+       Glean.Schema.Buck.Types.SearchByLocalName_key
+  getName _proxy = Glean.PredicateRef "buck.SearchByLocalName" 4
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Buck.Types.searchByLocalName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.SearchByLocalName x k
+  getFactKey = Glean.Schema.Buck.Types.searchByLocalName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 108 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.SearchByLocalName where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 114 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.TargetIndexerName
+         where
+  type KeyType Glean.Schema.Buck.Types.TargetIndexerName =
+       Data.Text.Text
+  getName _proxy = Glean.PredicateRef "buck.TargetIndexerName" 4
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Buck.Types.targetIndexerName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.TargetIndexerName x k
+  getFactKey = Glean.Schema.Buck.Types.targetIndexerName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 122 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.TargetIndexerName where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 128 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Buck.Types.TargetCallByCallExpr_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Buck.Types.TargetCallByCallExpr_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.TargetCallByCallExpr_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.TargetCallByCallExpr_key" (Prelude.Just 0))
+{-# LINE 137 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Buck.Types.TargetCallByCallExpr_key
+     =
+     'Angle.TField "callExpr"
+       (Glean.KeyType Glean.Schema.Buck.Types.CallExpr)
+       ('Angle.TField "target"
+          (Glean.KeyType Glean.Schema.Buck.Types.TargetCall)
+          ('Angle.TNoFields))
+{-# LINE 139 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Buck.Types.TargetCallByCallExpr
+         where
+  type KeyType Glean.Schema.Buck.Types.TargetCallByCallExpr =
+       Glean.Schema.Buck.Types.TargetCallByCallExpr_key
+  getName _proxy = Glean.PredicateRef "buck.TargetCallByCallExpr" 4
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Buck.Types.targetCallByCallExpr_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.TargetCallByCallExpr x k
+  getFactKey = Glean.Schema.Buck.Types.targetCallByCallExpr_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 148 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.TargetCallByCallExpr
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 154 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.OutsTarget_key where
+  buildRtsValue b (Glean.Schema.Buck.Types.OutsTarget_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.OutsTarget_key <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.OutsTarget_key" (Prelude.Just 0))
+{-# LINE 165 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Buck.Types.OutsTarget_key =
+     'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
+       ('Angle.TField "target"
+          (Glean.KeyType Glean.Schema.Buck.Types.Target)
+          ('Angle.TField "outputLabel"
+             (Prelude.Maybe Glean.Schema.Buck.Types.OutputLabel)
+             ('Angle.TNoFields)))
+{-# LINE 167 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.OutsTarget where
+  type KeyType Glean.Schema.Buck.Types.OutsTarget =
+       Glean.Schema.Buck.Types.OutsTarget_key
+  getName _proxy = Glean.PredicateRef "buck.OutsTarget" 4
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.outsTarget_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.OutsTarget x k
+  getFactKey = Glean.Schema.Buck.Types.outsTarget_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 176 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.OutsTarget where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 182 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.LocalNameLowerCase_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Buck.Types.LocalNameLowerCase_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.LocalNameLowerCase_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.LocalNameLowerCase_key" (Prelude.Just 0))
+{-# LINE 191 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Buck.Types.LocalNameLowerCase_key =
+     'Angle.TField "lowercase" (Data.Text.Text)
+       ('Angle.TField "name"
+          (Glean.KeyType Glean.Schema.Buck.Types.LocalName)
+          ('Angle.TNoFields))
+{-# LINE 193 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.LocalNameLowerCase
+         where
+  type KeyType Glean.Schema.Buck.Types.LocalNameLowerCase =
+       Glean.Schema.Buck.Types.LocalNameLowerCase_key
+  getName _proxy = Glean.PredicateRef "buck.LocalNameLowerCase" 4
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Buck.Types.localNameLowerCase_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.LocalNameLowerCase x k
+  getFactKey = Glean.Schema.Buck.Types.localNameLowerCase_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 202 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.LocalNameLowerCase
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 208 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.LocalName where
+  type KeyType Glean.Schema.Buck.Types.LocalName = Data.Text.Text
+  getName _proxy = Glean.PredicateRef "buck.LocalName" 4
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.localName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.LocalName x k
+  getFactKey = Glean.Schema.Buck.Types.localName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 216 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.LocalName where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 222 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.FileTarget_key where
+  buildRtsValue b (Glean.Schema.Buck.Types.FileTarget_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.FileTarget_key <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.FileTarget_key" (Prelude.Just 0))
+{-# LINE 231 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Buck.Types.FileTarget_key =
+     'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
+       ('Angle.TField "locator"
+          (Glean.KeyType Glean.Schema.Buck.Types.Locator)
+          ('Angle.TNoFields))
+{-# LINE 233 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.FileTarget where
+  type KeyType Glean.Schema.Buck.Types.FileTarget =
+       Glean.Schema.Buck.Types.FileTarget_key
+  getName _proxy = Glean.PredicateRef "buck.FileTarget" 4
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.fileTarget_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.FileTarget x k
+  getFactKey = Glean.Schema.Buck.Types.fileTarget_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 242 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.FileTarget where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 248 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.Labels where
+  type KeyType Glean.Schema.Buck.Types.Labels =
+       [Glean.Schema.Buck.Types.Label]
+  getName _proxy = Glean.PredicateRef "buck.Labels" 4
+  getId = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.labels_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.Labels x k
+  getFactKey = Glean.Schema.Buck.Types.labels_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 257 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.Labels where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 263 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.TargetLocation_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Buck.Types.TargetLocation_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.TargetLocation_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.TargetLocation_key" (Prelude.Just 0))
+{-# LINE 274 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Buck.Types.TargetLocation_key =
+     'Angle.TField "locator"
+       (Glean.KeyType Glean.Schema.Buck.Types.Locator)
+       ('Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
+          ('Angle.TField "span" (Glean.Schema.Src.Types.ByteSpan)
+             ('Angle.TNoFields)))
+{-# LINE 276 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.TargetLocation
+         where
+  type KeyType Glean.Schema.Buck.Types.TargetLocation =
+       Glean.Schema.Buck.Types.TargetLocation_key
+  getName _proxy = Glean.PredicateRef "buck.TargetLocation" 4
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Buck.Types.targetLocation_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.TargetLocation x k
+  getFactKey = Glean.Schema.Buck.Types.targetLocation_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 285 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.TargetLocation where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 291 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.FileDefinition_key
+         where
+  buildRtsValue b (Glean.Schema.Buck.Types.FileDefinition_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.FileDefinition_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.FileDefinition_key" (Prelude.Just 0))
+{-# LINE 300 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Buck.Types.FileDefinition_key =
+     'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
+       ('Angle.TField "definition"
+          (Glean.KeyType Glean.Schema.Buck.Types.Definition)
+          ('Angle.TNoFields))
+{-# LINE 302 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.FileDefinition
+         where
+  type KeyType Glean.Schema.Buck.Types.FileDefinition =
+       Glean.Schema.Buck.Types.FileDefinition_key
+  getName _proxy = Glean.PredicateRef "buck.FileDefinition" 4
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Buck.Types.fileDefinition_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.FileDefinition x k
+  getFactKey = Glean.Schema.Buck.Types.fileDefinition_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 311 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.FileDefinition where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 317 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.LocatorReverseDep_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Buck.Types.LocatorReverseDep_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.LocatorReverseDep_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.LocatorReverseDep_key" (Prelude.Just 0))
+{-# LINE 326 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Buck.Types.LocatorReverseDep_key =
+     'Angle.TField "locator"
+       (Glean.KeyType Glean.Schema.Buck.Types.Locator)
+       ('Angle.TField "rdep"
+          (Glean.KeyType Glean.Schema.Buck.Types.Locator)
+          ('Angle.TNoFields))
+{-# LINE 328 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.LocatorReverseDep
+         where
+  type KeyType Glean.Schema.Buck.Types.LocatorReverseDep =
+       Glean.Schema.Buck.Types.LocatorReverseDep_key
+  getName _proxy = Glean.PredicateRef "buck.LocatorReverseDep" 4
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Buck.Types.locatorReverseDep_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.LocatorReverseDep x k
+  getFactKey = Glean.Schema.Buck.Types.locatorReverseDep_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 337 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.LocatorReverseDep where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 343 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.FileEntity_key where
+  buildRtsValue b (Glean.Schema.Buck.Types.FileEntity_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.FileEntity_key <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.FileEntity_key" (Prelude.Just 0))
+{-# LINE 352 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Buck.Types.FileEntity_key =
+     'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
+       ('Angle.TField "entity" (Glean.Schema.Buck.Types.XRefDestination)
+          ('Angle.TNoFields))
+{-# LINE 354 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.FileEntity where
+  type KeyType Glean.Schema.Buck.Types.FileEntity =
+       Glean.Schema.Buck.Types.FileEntity_key
+  getName _proxy = Glean.PredicateRef "buck.FileEntity" 4
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.fileEntity_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.FileEntity x k
+  getFactKey = Glean.Schema.Buck.Types.fileEntity_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 363 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.FileEntity where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 369 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.Locator_key where
+  buildRtsValue b (Glean.Schema.Buck.Types.Locator_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.Locator_key <$> Glean.decodeRtsValue <*>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.Locator_key" (Prelude.Just 0))
+{-# LINE 380 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Buck.Types.Locator_key =
+     'Angle.TField "subdir" (Prelude.Maybe Data.Text.Text)
+       ('Angle.TField "path" (Data.Text.Text)
+          ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields)))
+{-# LINE 382 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.Locator where
+  type KeyType Glean.Schema.Buck.Types.Locator =
+       Glean.Schema.Buck.Types.Locator_key
+  getName _proxy = Glean.PredicateRef "buck.Locator" 4
+  getId = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.locator_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.Locator x k
+  getFactKey = Glean.Schema.Buck.Types.locator_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 391 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.Locator where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 397 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.DefinitionLocation_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Buck.Types.DefinitionLocation_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.DefinitionLocation_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.DefinitionLocation_key" (Prelude.Just 0))
+{-# LINE 408 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Buck.Types.DefinitionLocation_key =
+     'Angle.TField "definition"
+       (Glean.KeyType Glean.Schema.Buck.Types.Definition)
+       ('Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
+          ('Angle.TField "span" (Glean.Schema.Src.Types.ByteSpan)
+             ('Angle.TNoFields)))
+{-# LINE 410 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.DefinitionLocation
+         where
+  type KeyType Glean.Schema.Buck.Types.DefinitionLocation =
+       Glean.Schema.Buck.Types.DefinitionLocation_key
+  getName _proxy = Glean.PredicateRef "buck.DefinitionLocation" 4
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Buck.Types.definitionLocation_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.DefinitionLocation x k
+  getFactKey = Glean.Schema.Buck.Types.definitionLocation_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 419 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.DefinitionLocation
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 425 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.CallExpr_key where
+  buildRtsValue b Glean.Schema.Buck.Types.CallExpr_key_EMPTY
+    = Glean.buildRtsSelector b 2
+  buildRtsValue b (Glean.Schema.Buck.Types.CallExpr_key_name x)
+    = do Glean.buildRtsSelector b 0
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Buck.Types.CallExpr_key_accessor x)
+    = do Glean.buildRtsSelector b 1
+         Glean.buildRtsValue b x
+  decodeRtsValue
+    = Glean.sumD
+        (Prelude.pure Glean.Schema.Buck.Types.CallExpr_key_EMPTY)
+        [Glean.mapD Glean.Schema.Buck.Types.CallExpr_key_name,
+         Glean.mapD Glean.Schema.Buck.Types.CallExpr_key_accessor]
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.CallExpr_key" (Prelude.Just 0))
+{-# LINE 441 "glean/schema/thrift/buck_include.hs" #-}
+type instance Angle.SumFields Glean.Schema.Buck.Types.CallExpr_key
+     =
+     'Angle.TField "name" (Glean.Schema.Buck.Types.CallName)
+       ('Angle.TField "accessor"
+          (Glean.Schema.Buck.Types.CallExpr_accessor_)
+          ('Angle.TNoFields))
+{-# LINE 443 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.CallExpr where
+  type KeyType Glean.Schema.Buck.Types.CallExpr =
+       Glean.Schema.Buck.Types.CallExpr_key
+  getName _proxy = Glean.PredicateRef "buck.CallExpr" 4
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.callExpr_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.CallExpr x k
+  getFactKey = Glean.Schema.Buck.Types.callExpr_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 452 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.CallExpr where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 458 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.TargetIndexer_key where
+  buildRtsValue b (Glean.Schema.Buck.Types.TargetIndexer_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.TargetIndexer_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.TargetIndexer_key" (Prelude.Just 0))
+{-# LINE 467 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Buck.Types.TargetIndexer_key =
+     'Angle.TField "name"
+       (Glean.KeyType Glean.Schema.Buck.Types.TargetIndexerName)
+       ('Angle.TField "target"
+          (Glean.KeyType Glean.Schema.Buck.Types.Target)
+          ('Angle.TNoFields))
+{-# LINE 469 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.TargetIndexer
+         where
+  type KeyType Glean.Schema.Buck.Types.TargetIndexer =
+       Glean.Schema.Buck.Types.TargetIndexer_key
+  getName _proxy = Glean.PredicateRef "buck.TargetIndexer" 4
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.targetIndexer_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.TargetIndexer x k
+  getFactKey = Glean.Schema.Buck.Types.targetIndexer_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 478 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.TargetIndexer where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 484 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.TargetUses_key where
+  buildRtsValue b (Glean.Schema.Buck.Types.TargetUses_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.TargetUses_key <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.TargetUses_key" (Prelude.Just 0))
+{-# LINE 495 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Buck.Types.TargetUses_key =
+     'Angle.TField "locator"
+       (Glean.KeyType Glean.Schema.Buck.Types.Locator)
+       ('Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
+          ('Angle.TField "spans" ([Glean.Schema.Src.Types.ByteSpan])
+             ('Angle.TNoFields)))
+{-# LINE 497 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.TargetUses where
+  type KeyType Glean.Schema.Buck.Types.TargetUses =
+       Glean.Schema.Buck.Types.TargetUses_key
+  getName _proxy = Glean.PredicateRef "buck.TargetUses" 4
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.targetUses_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.TargetUses x k
+  getFactKey = Glean.Schema.Buck.Types.targetUses_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 506 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.TargetUses where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 512 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.Platform where
+  type KeyType Glean.Schema.Buck.Types.Platform = Data.Text.Text
+  getName _proxy = Glean.PredicateRef "buck.Platform" 4
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.platform_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.Platform x k
+  getFactKey = Glean.Schema.Buck.Types.platform_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 520 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.Platform where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 526 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.Consumer_key where
+  buildRtsValue b (Glean.Schema.Buck.Types.Consumer_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.Consumer_key <$> Glean.decodeRtsValue <*>
+        Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.Consumer_key" (Prelude.Just 0))
+{-# LINE 535 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Buck.Types.Consumer_key =
+     'Angle.TField "source" (Glean.KeyType Glean.Schema.Src.Types.File)
+       ('Angle.TField "consumer"
+          (Glean.KeyType Glean.Schema.Buck.Types.TargetSources)
+          ('Angle.TNoFields))
+{-# LINE 537 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.Consumer where
+  type KeyType Glean.Schema.Buck.Types.Consumer =
+       Glean.Schema.Buck.Types.Consumer_key
+  getName _proxy = Glean.PredicateRef "buck.Consumer" 4
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.consumer_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.Consumer x k
+  getFactKey = Glean.Schema.Buck.Types.consumer_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 546 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.Consumer where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 552 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.TargetLinkWhole
+         where
+  type KeyType Glean.Schema.Buck.Types.TargetLinkWhole =
+       Glean.Schema.Buck.Types.Target
+  getName _proxy = Glean.PredicateRef "buck.TargetLinkWhole" 4
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Buck.Types.targetLinkWhole_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.TargetLinkWhole x k
+  getFactKey = Glean.Schema.Buck.Types.targetLinkWhole_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 561 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.TargetLinkWhole where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 567 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.FileCall_key where
+  buildRtsValue b
+    (Glean.Schema.Buck.Types.FileCall_key x1 x2 x3 x4 x5)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+         Glean.buildRtsValue b x5
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.FileCall_key <$> Glean.decodeRtsValue <*>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.FileCall_key" (Prelude.Just 0))
+{-# LINE 582 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Buck.Types.FileCall_key =
+     'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
+       ('Angle.TField "callee_span" (Glean.Schema.Src.Types.ByteSpan)
+          ('Angle.TField "callExpr"
+             (Prelude.Maybe Glean.Schema.Buck.Types.CallExpr)
+             ('Angle.TField "arguments" ([Glean.Schema.Buck.Types.CallArgument])
+                ('Angle.TField "locator"
+                   (Prelude.Maybe Glean.Schema.Buck.Types.Locator)
+                   ('Angle.TNoFields)))))
+{-# LINE 584 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.FileCall where
+  type KeyType Glean.Schema.Buck.Types.FileCall =
+       Glean.Schema.Buck.Types.FileCall_key
+  getName _proxy = Glean.PredicateRef "buck.FileCall" 4
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.fileCall_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.FileCall x k
+  getFactKey = Glean.Schema.Buck.Types.fileCall_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 593 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.FileCall where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 599 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.DestinationUses_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Buck.Types.DestinationUses_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.DestinationUses_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.DestinationUses_key" (Prelude.Just 0))
+{-# LINE 610 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Buck.Types.DestinationUses_key =
+     'Angle.TField "destination"
+       (Glean.Schema.Buck.Types.XRefDestination)
+       ('Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
+          ('Angle.TField "spans" ([Glean.Schema.Src.Types.ByteSpan])
+             ('Angle.TNoFields)))
+{-# LINE 612 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.DestinationUses
+         where
+  type KeyType Glean.Schema.Buck.Types.DestinationUses =
+       Glean.Schema.Buck.Types.DestinationUses_key
+  getName _proxy = Glean.PredicateRef "buck.DestinationUses" 4
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Buck.Types.destinationUses_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.DestinationUses x k
+  getFactKey = Glean.Schema.Buck.Types.destinationUses_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 621 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.DestinationUses where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 627 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.SourceFileLocation_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Buck.Types.SourceFileLocation_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.SourceFileLocation_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.SourceFileLocation_key" (Prelude.Just 0))
+{-# LINE 636 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Buck.Types.SourceFileLocation_key =
+     'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
+       ('Angle.TField "span" (Glean.Schema.Src.Types.ByteSpan)
+          ('Angle.TNoFields))
+{-# LINE 638 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.SourceFileLocation
+         where
+  type KeyType Glean.Schema.Buck.Types.SourceFileLocation =
+       Glean.Schema.Buck.Types.SourceFileLocation_key
+  getName _proxy = Glean.PredicateRef "buck.SourceFileLocation" 4
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Buck.Types.sourceFileLocation_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.SourceFileLocation x k
+  getFactKey = Glean.Schema.Buck.Types.sourceFileLocation_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 647 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.SourceFileLocation
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 653 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Buck.Types.TargetSourcesBaseModule_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Buck.Types.TargetSourcesBaseModule_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.TargetSourcesBaseModule_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.TargetSourcesBaseModule_key"
+           (Prelude.Just 0))
+{-# LINE 664 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.Buck.Types.TargetSourcesBaseModule_key
+     =
+     'Angle.TField "locator"
+       (Glean.KeyType Glean.Schema.Buck.Types.Target)
+       ('Angle.TField "srcs" ([Glean.Schema.Buck.Types.File])
+          ('Angle.TField "baseModule"
+             (Prelude.Maybe Glean.Schema.Buck.Types.AttributeValue)
+             ('Angle.TNoFields)))
+{-# LINE 666 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Buck.Types.TargetSourcesBaseModule
+         where
+  type KeyType Glean.Schema.Buck.Types.TargetSourcesBaseModule =
+       Glean.Schema.Buck.Types.TargetSourcesBaseModule_key
+  getName _proxy
+    = Glean.PredicateRef "buck.TargetSourcesBaseModule" 4
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Buck.Types.targetSourcesBaseModule_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.TargetSourcesBaseModule x k
+  getFactKey = Glean.Schema.Buck.Types.targetSourcesBaseModule_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 675 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.TargetSourcesBaseModule
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 681 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.ArgumentValue_key where
+  buildRtsValue b Glean.Schema.Buck.Types.ArgumentValue_key_EMPTY
+    = Glean.buildRtsSelector b 6
+  buildRtsValue b (Glean.Schema.Buck.Types.ArgumentValue_key_lit x)
+    = do Glean.buildRtsSelector b 0
+         Glean.buildRtsValue b x
+  buildRtsValue b
+    (Glean.Schema.Buck.Types.ArgumentValue_key_sequence x)
+    = do Glean.buildRtsSelector b 1
+         Glean.buildRtsValue b x
+  buildRtsValue b
+    (Glean.Schema.Buck.Types.ArgumentValue_key_mapping x)
+    = do Glean.buildRtsSelector b 2
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Buck.Types.ArgumentValue_key_none x)
+    = do Glean.buildRtsSelector b 3
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Buck.Types.ArgumentValue_key_def_ x)
+    = do Glean.buildRtsSelector b 4
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Buck.Types.ArgumentValue_key_other x)
+    = do Glean.buildRtsSelector b 5
+         Glean.buildRtsValue b x
+  decodeRtsValue
+    = Glean.sumD
+        (Prelude.pure Glean.Schema.Buck.Types.ArgumentValue_key_EMPTY)
+        [Glean.mapD Glean.Schema.Buck.Types.ArgumentValue_key_lit,
+         Glean.mapD Glean.Schema.Buck.Types.ArgumentValue_key_sequence,
+         Glean.mapD Glean.Schema.Buck.Types.ArgumentValue_key_mapping,
+         Glean.mapD Glean.Schema.Buck.Types.ArgumentValue_key_none,
+         Glean.mapD Glean.Schema.Buck.Types.ArgumentValue_key_def_,
+         Glean.mapD Glean.Schema.Buck.Types.ArgumentValue_key_other]
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.ArgumentValue_key" (Prelude.Just 0))
+{-# LINE 713 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.SumFields Glean.Schema.Buck.Types.ArgumentValue_key =
+     'Angle.TField "lit" (Data.Text.Text)
+       ('Angle.TField "sequence" ([Glean.Schema.Buck.Types.ArgumentValue])
+          ('Angle.TField "mapping"
+             ([Glean.Schema.Buck.Types.ArgumentMapping])
+             ('Angle.TField "none" (Glean.Schema.Builtin.Types.Unit)
+                ('Angle.TField "def_"
+                   (Glean.KeyType Glean.Schema.Buck.Types.Definition)
+                   ('Angle.TField "other" (Glean.Schema.Src.Types.ByteSpan)
+                      ('Angle.TNoFields))))))
+{-# LINE 715 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.ArgumentValue
+         where
+  type KeyType Glean.Schema.Buck.Types.ArgumentValue =
+       Glean.Schema.Buck.Types.ArgumentValue_key
+  getName _proxy = Glean.PredicateRef "buck.ArgumentValue" 4
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.argumentValue_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.ArgumentValue x k
+  getFactKey = Glean.Schema.Buck.Types.argumentValue_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 724 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.ArgumentValue where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 730 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.IndexFailureX_key where
+  buildRtsValue b
+    (Glean.Schema.Buck.Types.IndexFailureX_key x1 x2 x3 x4 x5)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+         Glean.buildRtsValue b x5
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.IndexFailureX_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.IndexFailureX_key" (Prelude.Just 0))
+{-# LINE 745 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Buck.Types.IndexFailureX_key =
+     'Angle.TField "source"
+       (Glean.Schema.Buck.Types.IndexFailureX_source)
+       ('Angle.TField "indexer"
+          (Glean.KeyType Glean.Schema.Buck.Types.IndexerName)
+          ('Angle.TField "reason" (Glean.Schema.Buck.Types.FailureReason)
+             ('Angle.TField "details" (Data.Text.Text)
+                ('Angle.TField "repro" (Prelude.Maybe Data.Text.Text)
+                   ('Angle.TNoFields)))))
+{-# LINE 747 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.IndexFailureX
+         where
+  type KeyType Glean.Schema.Buck.Types.IndexFailureX =
+       Glean.Schema.Buck.Types.IndexFailureX_key
+  getName _proxy = Glean.PredicateRef "buck.IndexFailureX" 4
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.indexFailureX_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.IndexFailureX x k
+  getFactKey = Glean.Schema.Buck.Types.indexFailureX_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 756 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.IndexFailureX where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 762 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.TargetOut_key where
+  buildRtsValue b (Glean.Schema.Buck.Types.TargetOut_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.TargetOut_key <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.TargetOut_key" (Prelude.Just 0))
+{-# LINE 771 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Buck.Types.TargetOut_key =
+     'Angle.TField "target"
+       (Glean.KeyType Glean.Schema.Buck.Types.Target)
+       ('Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
+          ('Angle.TNoFields))
+{-# LINE 773 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.TargetOut where
+  type KeyType Glean.Schema.Buck.Types.TargetOut =
+       Glean.Schema.Buck.Types.TargetOut_key
+  getName _proxy = Glean.PredicateRef "buck.TargetOut" 4
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.targetOut_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.TargetOut x k
+  getFactKey = Glean.Schema.Buck.Types.targetOut_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 782 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.TargetOut where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 788 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.FileToTarget_key where
+  buildRtsValue b (Glean.Schema.Buck.Types.FileToTarget_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.FileToTarget_key <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.FileToTarget_key" (Prelude.Just 0))
+{-# LINE 797 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Buck.Types.FileToTarget_key =
+     'Angle.TField "source" (Glean.KeyType Glean.Schema.Src.Types.File)
+       ('Angle.TField "locator"
+          (Glean.KeyType Glean.Schema.Buck.Types.Locator)
+          ('Angle.TNoFields))
+{-# LINE 799 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.FileToTarget where
+  type KeyType Glean.Schema.Buck.Types.FileToTarget =
+       Glean.Schema.Buck.Types.FileToTarget_key
+  getName _proxy = Glean.PredicateRef "buck.FileToTarget" 4
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.fileToTarget_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.FileToTarget x k
+  getFactKey = Glean.Schema.Buck.Types.fileToTarget_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 808 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.FileToTarget where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 814 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.FileXRefs_key where
+  buildRtsValue b (Glean.Schema.Buck.Types.FileXRefs_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.FileXRefs_key <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.FileXRefs_key" (Prelude.Just 0))
+{-# LINE 823 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Buck.Types.FileXRefs_key =
+     'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
+       ('Angle.TField "xrefs" ([Glean.Schema.Buck.Types.XRef])
+          ('Angle.TNoFields))
+{-# LINE 825 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.FileXRefs where
+  type KeyType Glean.Schema.Buck.Types.FileXRefs =
+       Glean.Schema.Buck.Types.FileXRefs_key
+  getName _proxy = Glean.PredicateRef "buck.FileXRefs" 4
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.fileXRefs_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.FileXRefs x k
+  getFactKey = Glean.Schema.Buck.Types.fileXRefs_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 834 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.FileXRefs where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 840 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.File_key where
+  buildRtsValue b Glean.Schema.Buck.Types.File_key_EMPTY
+    = Glean.buildRtsSelector b 3
+  buildRtsValue b (Glean.Schema.Buck.Types.File_key_source x)
+    = do Glean.buildRtsSelector b 0
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Buck.Types.File_key_generated x)
+    = do Glean.buildRtsSelector b 1
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Buck.Types.File_key_generatedLabel x)
+    = do Glean.buildRtsSelector b 2
+         Glean.buildRtsValue b x
+  decodeRtsValue
+    = Glean.sumD (Prelude.pure Glean.Schema.Buck.Types.File_key_EMPTY)
+        [Glean.mapD Glean.Schema.Buck.Types.File_key_source,
+         Glean.mapD Glean.Schema.Buck.Types.File_key_generated,
+         Glean.mapD Glean.Schema.Buck.Types.File_key_generatedLabel]
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.File_key" (Prelude.Just 0))
+{-# LINE 860 "glean/schema/thrift/buck_include.hs" #-}
+type instance Angle.SumFields Glean.Schema.Buck.Types.File_key =
+     'Angle.TField "source" (Glean.KeyType Glean.Schema.Src.Types.File)
+       ('Angle.TField "generated"
+          (Glean.KeyType Glean.Schema.Buck.Types.Locator)
+          ('Angle.TField "generatedLabel"
+             (Glean.KeyType Glean.Schema.Buck.Types.LocatorWithLabel)
+             ('Angle.TNoFields)))
+{-# LINE 862 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.File where
+  type KeyType Glean.Schema.Buck.Types.File =
+       Glean.Schema.Buck.Types.File_key
+  getName _proxy = Glean.PredicateRef "buck.File" 4
+  getId = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.file_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.File x k
+  getFactKey = Glean.Schema.Buck.Types.file_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 870 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.File where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 876 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.FileResolved_key where
+  buildRtsValue b (Glean.Schema.Buck.Types.FileResolved_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.FileResolved_key <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.FileResolved_key" (Prelude.Just 0))
+{-# LINE 885 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Buck.Types.FileResolved_key =
+     'Angle.TField "buckFile"
+       (Glean.KeyType Glean.Schema.Buck.Types.File)
+       ('Angle.TField "srcFile"
+          (Glean.KeyType Glean.Schema.Src.Types.File)
+          ('Angle.TNoFields))
+{-# LINE 887 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.FileResolved where
+  type KeyType Glean.Schema.Buck.Types.FileResolved =
+       Glean.Schema.Buck.Types.FileResolved_key
+  getName _proxy = Glean.PredicateRef "buck.FileResolved" 4
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.fileResolved_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.FileResolved x k
+  getFactKey = Glean.Schema.Buck.Types.fileResolved_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 896 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.FileResolved where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 902 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.DefinitionKind_key
+         where
+  buildRtsValue b (Glean.Schema.Buck.Types.DefinitionKind_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.DefinitionKind_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.DefinitionKind_key" (Prelude.Just 0))
+{-# LINE 911 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Buck.Types.DefinitionKind_key =
+     'Angle.TField "definition"
+       (Glean.KeyType Glean.Schema.Buck.Types.Definition)
+       ('Angle.TField "kind" (Glean.Schema.Buck.Types.Kind)
+          ('Angle.TNoFields))
+{-# LINE 913 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.DefinitionKind
+         where
+  type KeyType Glean.Schema.Buck.Types.DefinitionKind =
+       Glean.Schema.Buck.Types.DefinitionKind_key
+  getName _proxy = Glean.PredicateRef "buck.DefinitionKind" 4
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Buck.Types.definitionKind_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.DefinitionKind x k
+  getFactKey = Glean.Schema.Buck.Types.definitionKind_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 922 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.DefinitionKind where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 928 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.Type where
+  type KeyType Glean.Schema.Buck.Types.Type = Data.Text.Text
+  getName _proxy = Glean.PredicateRef "buck.Type" 4
+  getId = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.type_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.Type x k
+  getFactKey = Glean.Schema.Buck.Types.type_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 936 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.Type where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 942 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.OutputLabel where
+  type KeyType Glean.Schema.Buck.Types.OutputLabel = Data.Text.Text
+  getName _proxy = Glean.PredicateRef "buck.OutputLabel" 4
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.outputLabel_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.OutputLabel x k
+  getFactKey = Glean.Schema.Buck.Types.outputLabel_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 950 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.OutputLabel where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 956 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.Definition_key where
+  buildRtsValue b (Glean.Schema.Buck.Types.Definition_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.Definition_key <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.Definition_key" (Prelude.Just 0))
+{-# LINE 965 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Buck.Types.Definition_key =
+     'Angle.TField "module" (Glean.KeyType Glean.Schema.Src.Types.File)
+       ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields))
+{-# LINE 967 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.Definition where
+  type KeyType Glean.Schema.Buck.Types.Definition =
+       Glean.Schema.Buck.Types.Definition_key
+  getName _proxy = Glean.PredicateRef "buck.Definition" 4
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.definition_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.Definition x k
+  getFactKey = Glean.Schema.Buck.Types.definition_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 976 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.Definition where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 982 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.TargetByType_key where
+  buildRtsValue b (Glean.Schema.Buck.Types.TargetByType_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.TargetByType_key <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.TargetByType_key" (Prelude.Just 0))
+{-# LINE 991 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Buck.Types.TargetByType_key =
+     'Angle.TField "type_" (Glean.KeyType Glean.Schema.Buck.Types.Type)
+       ('Angle.TField "target"
+          (Glean.KeyType Glean.Schema.Buck.Types.Target)
+          ('Angle.TNoFields))
+{-# LINE 993 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.TargetByType where
+  type KeyType Glean.Schema.Buck.Types.TargetByType =
+       Glean.Schema.Buck.Types.TargetByType_key
+  getName _proxy = Glean.PredicateRef "buck.TargetByType" 4
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.targetByType_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.TargetByType x k
+  getFactKey = Glean.Schema.Buck.Types.targetByType_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1002 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.TargetByType where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1008 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.AttributeName
+         where
+  type KeyType Glean.Schema.Buck.Types.AttributeName = Data.Text.Text
+  getName _proxy = Glean.PredicateRef "buck.AttributeName" 4
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.attributeName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.AttributeName x k
+  getFactKey = Glean.Schema.Buck.Types.attributeName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1016 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.AttributeName where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1022 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.DefinitionMetadata_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Buck.Types.DefinitionMetadata_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.DefinitionMetadata_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.DefinitionMetadata_key" (Prelude.Just 0))
+{-# LINE 1033 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Buck.Types.DefinitionMetadata_key =
+     'Angle.TField "definition"
+       (Glean.KeyType Glean.Schema.Buck.Types.Definition)
+       ('Angle.TField "kind" (Glean.Schema.Buck.Types.Kind)
+          ('Angle.TField "span" (Glean.Schema.Src.Types.ByteSpan)
+             ('Angle.TNoFields)))
+{-# LINE 1035 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.DefinitionMetadata
+         where
+  type KeyType Glean.Schema.Buck.Types.DefinitionMetadata =
+       Glean.Schema.Buck.Types.DefinitionMetadata_key
+  getName _proxy = Glean.PredicateRef "buck.DefinitionMetadata" 4
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Buck.Types.definitionMetadata_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.DefinitionMetadata x k
+  getFactKey = Glean.Schema.Buck.Types.definitionMetadata_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1044 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.DefinitionMetadata
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1050 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.OutTarget_key where
+  buildRtsValue b (Glean.Schema.Buck.Types.OutTarget_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.OutTarget_key <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.OutTarget_key" (Prelude.Just 0))
+{-# LINE 1059 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Buck.Types.OutTarget_key =
+     'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
+       ('Angle.TField "target"
+          (Glean.KeyType Glean.Schema.Buck.Types.Target)
+          ('Angle.TNoFields))
+{-# LINE 1061 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.OutTarget where
+  type KeyType Glean.Schema.Buck.Types.OutTarget =
+       Glean.Schema.Buck.Types.OutTarget_key
+  getName _proxy = Glean.PredicateRef "buck.OutTarget" 4
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.outTarget_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.OutTarget x k
+  getFactKey = Glean.Schema.Buck.Types.outTarget_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1070 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.OutTarget where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1076 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.AttributeValue_key
+         where
+  buildRtsValue b Glean.Schema.Buck.Types.AttributeValue_key_EMPTY
+    = Glean.buildRtsSelector b 3
+  buildRtsValue b (Glean.Schema.Buck.Types.AttributeValue_key_str x)
+    = do Glean.buildRtsSelector b 0
+         Glean.buildRtsValue b x
+  buildRtsValue b
+    (Glean.Schema.Buck.Types.AttributeValue_key_sequence x)
+    = do Glean.buildRtsSelector b 1
+         Glean.buildRtsValue b x
+  buildRtsValue b
+    (Glean.Schema.Buck.Types.AttributeValue_key_mapping x)
+    = do Glean.buildRtsSelector b 2
+         Glean.buildRtsValue b x
+  decodeRtsValue
+    = Glean.sumD
+        (Prelude.pure Glean.Schema.Buck.Types.AttributeValue_key_EMPTY)
+        [Glean.mapD Glean.Schema.Buck.Types.AttributeValue_key_str,
+         Glean.mapD Glean.Schema.Buck.Types.AttributeValue_key_sequence,
+         Glean.mapD Glean.Schema.Buck.Types.AttributeValue_key_mapping]
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.AttributeValue_key" (Prelude.Just 0))
+{-# LINE 1096 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.SumFields Glean.Schema.Buck.Types.AttributeValue_key =
+     'Angle.TField "str" (Data.Text.Text)
+       ('Angle.TField "sequence"
+          ([Glean.Schema.Buck.Types.AttributeValue])
+          ('Angle.TField "mapping"
+             ([Glean.Schema.Buck.Types.AttributeMapping])
+             ('Angle.TNoFields)))
+{-# LINE 1098 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.AttributeValue
+         where
+  type KeyType Glean.Schema.Buck.Types.AttributeValue =
+       Glean.Schema.Buck.Types.AttributeValue_key
+  getName _proxy = Glean.PredicateRef "buck.AttributeValue" 4
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Buck.Types.attributeValue_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.AttributeValue x k
+  getFactKey = Glean.Schema.Buck.Types.attributeValue_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1107 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.AttributeValue where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1113 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.TargetAttribute_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Buck.Types.TargetAttribute_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.TargetAttribute_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.TargetAttribute_key" (Prelude.Just 0))
+{-# LINE 1124 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Buck.Types.TargetAttribute_key =
+     'Angle.TField "target"
+       (Glean.KeyType Glean.Schema.Buck.Types.Target)
+       ('Angle.TField "attribute"
+          (Glean.KeyType Glean.Schema.Buck.Types.AttributeName)
+          ('Angle.TField "value"
+             (Glean.KeyType Glean.Schema.Buck.Types.AttributeValue)
+             ('Angle.TNoFields)))
+{-# LINE 1126 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.TargetAttribute
+         where
+  type KeyType Glean.Schema.Buck.Types.TargetAttribute =
+       Glean.Schema.Buck.Types.TargetAttribute_key
+  getName _proxy = Glean.PredicateRef "buck.TargetAttribute" 4
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Buck.Types.targetAttribute_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.TargetAttribute x k
+  getFactKey = Glean.Schema.Buck.Types.targetAttribute_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1135 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.TargetAttribute where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1141 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.TargetCall_key where
+  buildRtsValue b
+    (Glean.Schema.Buck.Types.TargetCall_key x1 x2 x3 x4 x5)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+         Glean.buildRtsValue b x5
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.TargetCall_key <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.TargetCall_key" (Prelude.Just 0))
+{-# LINE 1156 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Buck.Types.TargetCall_key =
+     'Angle.TField "locator"
+       (Glean.KeyType Glean.Schema.Buck.Types.Locator)
+       ('Angle.TField "arguments" ([Glean.Schema.Buck.Types.CallArgument])
+          ('Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
+             ('Angle.TField "span" (Glean.Schema.Src.Types.ByteSpan)
+                ('Angle.TField "callExpr"
+                   (Prelude.Maybe Glean.Schema.Buck.Types.CallExpr)
+                   ('Angle.TNoFields)))))
+{-# LINE 1158 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.TargetCall where
+  type KeyType Glean.Schema.Buck.Types.TargetCall =
+       Glean.Schema.Buck.Types.TargetCall_key
+  getName _proxy = Glean.PredicateRef "buck.TargetCall" 4
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.targetCall_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.TargetCall x k
+  getFactKey = Glean.Schema.Buck.Types.targetCall_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1167 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.TargetCall where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1173 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.Target_key where
+  buildRtsValue b (Glean.Schema.Buck.Types.Target_key x1 x2 x3 x4)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.Target_key <$> Glean.decodeRtsValue <*>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.Target_key" (Prelude.Just 0))
+{-# LINE 1186 "glean/schema/thrift/buck_include.hs" #-}
+type instance Angle.RecordFields Glean.Schema.Buck.Types.Target_key
+     =
+     'Angle.TField "locator"
+       (Glean.KeyType Glean.Schema.Buck.Types.Locator)
+       ('Angle.TField "type_" (Glean.KeyType Glean.Schema.Buck.Types.Type)
+          ('Angle.TField "defaultPlatform"
+             (Prelude.Maybe Glean.Schema.Buck.Types.Platform)
+             ('Angle.TField "labels"
+                (Glean.KeyType Glean.Schema.Buck.Types.Labels)
+                ('Angle.TNoFields))))
+{-# LINE 1188 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.Target where
+  type KeyType Glean.Schema.Buck.Types.Target =
+       Glean.Schema.Buck.Types.Target_key
+  getName _proxy = Glean.PredicateRef "buck.Target" 4
+  getId = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.target_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.Target x k
+  getFactKey = Glean.Schema.Buck.Types.target_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1197 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.Target where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1203 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.TargetMode_key where
+  buildRtsValue b (Glean.Schema.Buck.Types.TargetMode_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.TargetMode_key <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.TargetMode_key" (Prelude.Just 0))
+{-# LINE 1212 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Buck.Types.TargetMode_key =
+     'Angle.TField "target"
+       (Glean.KeyType Glean.Schema.Buck.Types.Target)
+       ('Angle.TField "mode" (Data.Text.Text) ('Angle.TNoFields))
+{-# LINE 1214 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.TargetMode where
+  type KeyType Glean.Schema.Buck.Types.TargetMode =
+       Glean.Schema.Buck.Types.TargetMode_key
+  getName _proxy = Glean.PredicateRef "buck.TargetMode" 4
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.targetMode_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.TargetMode x k
+  getFactKey = Glean.Schema.Buck.Types.targetMode_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1223 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.TargetMode where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1229 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.TargetHash_key where
+  buildRtsValue b (Glean.Schema.Buck.Types.TargetHash_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.TargetHash_key <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.TargetHash_key" (Prelude.Just 0))
+{-# LINE 1238 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Buck.Types.TargetHash_key =
+     'Angle.TField "locator"
+       (Glean.KeyType Glean.Schema.Buck.Types.Locator)
+       ('Angle.TField "targetHash" (Data.Text.Text) ('Angle.TNoFields))
+{-# LINE 1240 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.TargetHash where
+  type KeyType Glean.Schema.Buck.Types.TargetHash =
+       Glean.Schema.Buck.Types.TargetHash_key
+  getName _proxy = Glean.PredicateRef "buck.TargetHash" 4
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.targetHash_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.TargetHash x k
+  getFactKey = Glean.Schema.Buck.Types.targetHash_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1249 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.TargetHash where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1255 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.Owner_key where
+  buildRtsValue b (Glean.Schema.Buck.Types.Owner_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.Owner_key <$> Glean.decodeRtsValue <*>
+        Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.Owner_key" (Prelude.Just 0))
+{-# LINE 1264 "glean/schema/thrift/buck_include.hs" #-}
+type instance Angle.RecordFields Glean.Schema.Buck.Types.Owner_key
+     =
+     'Angle.TField "source" (Glean.KeyType Glean.Schema.Src.Types.File)
+       ('Angle.TField "owner"
+          (Glean.KeyType Glean.Schema.Buck.Types.TargetSources)
+          ('Angle.TNoFields))
+{-# LINE 1266 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.Owner where
+  type KeyType Glean.Schema.Buck.Types.Owner =
+       Glean.Schema.Buck.Types.Owner_key
+  getName _proxy = Glean.PredicateRef "buck.Owner" 4
+  getId = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.owner_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.Owner x k
+  getFactKey = Glean.Schema.Buck.Types.owner_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1275 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.Owner where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1281 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.TargetDependencies_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Buck.Types.TargetDependencies_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.TargetDependencies_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.TargetDependencies_key" (Prelude.Just 0))
+{-# LINE 1290 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Buck.Types.TargetDependencies_key =
+     'Angle.TField "target"
+       (Glean.KeyType Glean.Schema.Buck.Types.Target)
+       ('Angle.TField "dependencies"
+          ([Glean.Schema.Buck.Types.Dependency])
+          ('Angle.TNoFields))
+{-# LINE 1292 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.TargetDependencies
+         where
+  type KeyType Glean.Schema.Buck.Types.TargetDependencies =
+       Glean.Schema.Buck.Types.TargetDependencies_key
+  getName _proxy = Glean.PredicateRef "buck.TargetDependencies" 4
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Buck.Types.targetDependencies_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.TargetDependencies x k
+  getFactKey = Glean.Schema.Buck.Types.targetDependencies_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1301 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.TargetDependencies
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1307 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.TargetOuts_key where
+  buildRtsValue b (Glean.Schema.Buck.Types.TargetOuts_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.TargetOuts_key <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.TargetOuts_key" (Prelude.Just 0))
+{-# LINE 1318 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Buck.Types.TargetOuts_key =
+     'Angle.TField "target"
+       (Glean.KeyType Glean.Schema.Buck.Types.Target)
+       ('Angle.TField "outputLabel"
+          (Prelude.Maybe Glean.Schema.Buck.Types.OutputLabel)
+          ('Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
+             ('Angle.TNoFields)))
+{-# LINE 1320 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.TargetOuts where
+  type KeyType Glean.Schema.Buck.Types.TargetOuts =
+       Glean.Schema.Buck.Types.TargetOuts_key
+  getName _proxy = Glean.PredicateRef "buck.TargetOuts" 4
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.targetOuts_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.TargetOuts x k
+  getFactKey = Glean.Schema.Buck.Types.targetOuts_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1329 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.TargetOuts where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1335 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.LocatorReverseDeps_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Buck.Types.LocatorReverseDeps_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.LocatorReverseDeps_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.LocatorReverseDeps_key" (Prelude.Just 0))
+{-# LINE 1344 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Buck.Types.LocatorReverseDeps_key =
+     'Angle.TField "locator"
+       (Glean.KeyType Glean.Schema.Buck.Types.Locator)
+       ('Angle.TField "rdeps" ([Glean.Schema.Buck.Types.Locator])
+          ('Angle.TNoFields))
+{-# LINE 1346 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.LocatorReverseDeps
+         where
+  type KeyType Glean.Schema.Buck.Types.LocatorReverseDeps =
+       Glean.Schema.Buck.Types.LocatorReverseDeps_key
+  getName _proxy = Glean.PredicateRef "buck.LocatorReverseDeps" 4
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Buck.Types.locatorReverseDeps_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.LocatorReverseDeps x k
+  getFactKey = Glean.Schema.Buck.Types.locatorReverseDeps_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1355 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.LocatorReverseDeps
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1361 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.TargetSources_key where
+  buildRtsValue b
+    (Glean.Schema.Buck.Types.TargetSources_key x1 x2 x3 x4)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.TargetSources_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.TargetSources_key" (Prelude.Just 0))
+{-# LINE 1374 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Buck.Types.TargetSources_key =
+     'Angle.TField "target"
+       (Glean.KeyType Glean.Schema.Buck.Types.Target)
+       ('Angle.TField "headers" ([Glean.Schema.Buck.Types.File])
+          ('Angle.TField "exportedHeaders" ([Glean.Schema.Buck.Types.File])
+             ('Angle.TField "srcs" ([Glean.Schema.Buck.Types.File])
+                ('Angle.TNoFields))))
+{-# LINE 1376 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.TargetSources
+         where
+  type KeyType Glean.Schema.Buck.Types.TargetSources =
+       Glean.Schema.Buck.Types.TargetSources_key
+  getName _proxy = Glean.PredicateRef "buck.TargetSources" 4
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.targetSources_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.TargetSources x k
+  getFactKey = Glean.Schema.Buck.Types.targetSources_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1385 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.TargetSources where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1391 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.LocatorWithLabel_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Buck.Types.LocatorWithLabel_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.LocatorWithLabel_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.LocatorWithLabel_key" (Prelude.Just 0))
+{-# LINE 1400 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Buck.Types.LocatorWithLabel_key =
+     'Angle.TField "locator"
+       (Glean.KeyType Glean.Schema.Buck.Types.Locator)
+       ('Angle.TField "label"
+          (Glean.KeyType Glean.Schema.Buck.Types.OutputLabel)
+          ('Angle.TNoFields))
+{-# LINE 1402 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.LocatorWithLabel
+         where
+  type KeyType Glean.Schema.Buck.Types.LocatorWithLabel =
+       Glean.Schema.Buck.Types.LocatorWithLabel_key
+  getName _proxy = Glean.PredicateRef "buck.LocatorWithLabel" 4
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Buck.Types.locatorWithLabel_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.LocatorWithLabel x k
+  getFactKey = Glean.Schema.Buck.Types.locatorWithLabel_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1411 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.LocatorWithLabel where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1417 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.IndexerName where
+  type KeyType Glean.Schema.Buck.Types.IndexerName = Data.Text.Text
+  getName _proxy = Glean.PredicateRef "buck.IndexerName" 4
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Buck.Types.indexerName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.IndexerName x k
+  getFactKey = Glean.Schema.Buck.Types.indexerName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1425 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.IndexerName where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1431 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.TranslationUnit_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Buck.Types.TranslationUnit_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.TranslationUnit_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.TranslationUnit_key" (Prelude.Just 0))
+{-# LINE 1442 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Buck.Types.TranslationUnit_key =
+     'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
+       ('Angle.TField "target"
+          (Glean.KeyType Glean.Schema.Buck.Types.Locator)
+          ('Angle.TField "platform"
+             (Prelude.Maybe Glean.Schema.Buck.Types.Platform)
+             ('Angle.TNoFields)))
+{-# LINE 1444 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Buck.Types.TranslationUnit
+         where
+  type KeyType Glean.Schema.Buck.Types.TranslationUnit =
+       Glean.Schema.Buck.Types.TranslationUnit_key
+  getName _proxy = Glean.PredicateRef "buck.TranslationUnit" 4
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Buck.Types.translationUnit_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Buck.Types.TranslationUnit x k
+  getFactKey = Glean.Schema.Buck.Types.translationUnit_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1453 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.TranslationUnit where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1459 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.Kind where
+  buildRtsValue = Glean.thriftEnum_buildRtsValue
+  decodeRtsValue = Glean.thriftEnumD
+  sourceType _
+    = Angle.NamedTy () (Angle.SourceRef "buck.Kind" (Prelude.Just 4))
+{-# LINE 1464 "glean/schema/thrift/buck_include.hs" #-}
+type instance Angle.SumFields Glean.Schema.Buck.Types.Kind =
+     'Angle.TField "Function" (Glean.Schema.Builtin.Types.Unit)
+       ('Angle.TField "Variable" (Glean.Schema.Builtin.Types.Unit)
+          ('Angle.TNoFields))
+{-# LINE 1466 "glean/schema/thrift/buck_include.hs" #-}
+instance Angle.AngleEnum Glean.Schema.Buck.Types.Kind where
+  type AngleEnumTy Glean.Schema.Buck.Types.Kind =
+       Glean.Schema.Buck.Types.Kind
+  enumName v = Text.pack (Prelude.drop 5 (Prelude.show v))
+{-# LINE 1470 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.AttributeMapping where
+  buildRtsValue b (Glean.Schema.Buck.Types.AttributeMapping x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.AttributeMapping <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.AttributeMapping" (Prelude.Just 4))
+{-# LINE 1479 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Buck.Types.AttributeMapping =
+     'Angle.TField "key" (Data.Text.Text)
+       ('Angle.TField "value"
+          (Glean.KeyType Glean.Schema.Buck.Types.AttributeValue)
+          ('Angle.TNoFields))
+{-# LINE 1481 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.ArgumentMapping where
+  buildRtsValue b (Glean.Schema.Buck.Types.ArgumentMapping x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.ArgumentMapping <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.ArgumentMapping" (Prelude.Just 4))
+{-# LINE 1490 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Buck.Types.ArgumentMapping =
+     'Angle.TField "key" (Data.Text.Text)
+       ('Angle.TField "value"
+          (Glean.KeyType Glean.Schema.Buck.Types.ArgumentValue)
+          ('Angle.TNoFields))
+{-# LINE 1492 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.XRefDestination where
+  buildRtsValue b Glean.Schema.Buck.Types.XRefDestination_EMPTY
+    = Glean.buildRtsSelector b 3
+  buildRtsValue b (Glean.Schema.Buck.Types.XRefDestination_locator x)
+    = do Glean.buildRtsSelector b 0
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Buck.Types.XRefDestination_file x)
+    = do Glean.buildRtsSelector b 1
+         Glean.buildRtsValue b x
+  buildRtsValue b
+    (Glean.Schema.Buck.Types.XRefDestination_definition x)
+    = do Glean.buildRtsSelector b 2
+         Glean.buildRtsValue b x
+  decodeRtsValue
+    = Glean.sumD
+        (Prelude.pure Glean.Schema.Buck.Types.XRefDestination_EMPTY)
+        [Glean.mapD Glean.Schema.Buck.Types.XRefDestination_locator,
+         Glean.mapD Glean.Schema.Buck.Types.XRefDestination_file,
+         Glean.mapD Glean.Schema.Buck.Types.XRefDestination_definition]
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.XRefDestination" (Prelude.Just 4))
+{-# LINE 1512 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.SumFields Glean.Schema.Buck.Types.XRefDestination =
+     'Angle.TField "locator"
+       (Glean.KeyType Glean.Schema.Buck.Types.Locator)
+       ('Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
+          ('Angle.TField "definition"
+             (Glean.KeyType Glean.Schema.Buck.Types.Definition)
+             ('Angle.TNoFields)))
+{-# LINE 1514 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.CallName where
+  buildRtsValue b Glean.Schema.Buck.Types.CallName_EMPTY
+    = Glean.buildRtsSelector b 2
+  buildRtsValue b (Glean.Schema.Buck.Types.CallName_prim x)
+    = do Glean.buildRtsSelector b 0
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Buck.Types.CallName_definition x)
+    = do Glean.buildRtsSelector b 1
+         Glean.buildRtsValue b x
+  decodeRtsValue
+    = Glean.sumD (Prelude.pure Glean.Schema.Buck.Types.CallName_EMPTY)
+        [Glean.mapD Glean.Schema.Buck.Types.CallName_prim,
+         Glean.mapD Glean.Schema.Buck.Types.CallName_definition]
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.CallName" (Prelude.Just 4))
+{-# LINE 1530 "glean/schema/thrift/buck_include.hs" #-}
+type instance Angle.SumFields Glean.Schema.Buck.Types.CallName =
+     'Angle.TField "prim" (Data.Text.Text)
+       ('Angle.TField "definition"
+          (Glean.KeyType Glean.Schema.Buck.Types.Definition)
+          ('Angle.TNoFields))
+{-# LINE 1532 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.FailureReason where
+  buildRtsValue = Glean.thriftEnum_buildRtsValue
+  decodeRtsValue = Glean.thriftEnumD
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.FailureReason" (Prelude.Just 4))
+{-# LINE 1537 "glean/schema/thrift/buck_include.hs" #-}
+type instance Angle.SumFields Glean.Schema.Buck.Types.FailureReason
+     =
+     'Angle.TField "Skipped" (Glean.Schema.Builtin.Types.Unit)
+       ('Angle.TField "Blocked" (Glean.Schema.Builtin.Types.Unit)
+          ('Angle.TField "EmptyCdb" (Glean.Schema.Builtin.Types.Unit)
+             ('Angle.TField "FailedCdb" (Glean.Schema.Builtin.Types.Unit)
+                ('Angle.TField "QueryFailed" (Glean.Schema.Builtin.Types.Unit)
+                   ('Angle.TField "Unclassified" (Glean.Schema.Builtin.Types.Unit)
+                      ('Angle.TNoFields))))))
+{-# LINE 1539 "glean/schema/thrift/buck_include.hs" #-}
+instance Angle.AngleEnum Glean.Schema.Buck.Types.FailureReason
+         where
+  type AngleEnumTy Glean.Schema.Buck.Types.FailureReason =
+       Glean.Schema.Buck.Types.FailureReason
+  enumName v = Text.pack (Prelude.drop 14 (Prelude.show v))
+{-# LINE 1543 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.XRef where
+  buildRtsValue b (Glean.Schema.Buck.Types.XRef x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.XRef <$> Glean.decodeRtsValue <*>
+        Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy () (Angle.SourceRef "buck.XRef" (Prelude.Just 4))
+{-# LINE 1552 "glean/schema/thrift/buck_include.hs" #-}
+type instance Angle.RecordFields Glean.Schema.Buck.Types.XRef =
+     'Angle.TField "destination"
+       (Glean.Schema.Buck.Types.XRefDestination)
+       ('Angle.TField "ranges" ([Glean.Schema.Src.Types.ByteSpan])
+          ('Angle.TNoFields))
+{-# LINE 1554 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.Dependency where
+  buildRtsValue b (Glean.Schema.Buck.Types.Dependency x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.Dependency <$> Glean.decodeRtsValue <*>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.Dependency" (Prelude.Just 4))
+{-# LINE 1565 "glean/schema/thrift/buck_include.hs" #-}
+type instance Angle.RecordFields Glean.Schema.Buck.Types.Dependency
+     =
+     'Angle.TField "target"
+       (Glean.KeyType Glean.Schema.Buck.Types.Locator)
+       ('Angle.TField "explicit_" (Prelude.Bool)
+          ('Angle.TField "exported" (Prelude.Bool) ('Angle.TNoFields)))
+{-# LINE 1567 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.CallExpr_accessor_
+         where
+  buildRtsValue b (Glean.Schema.Buck.Types.CallExpr_accessor_ x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Buck.Types.CallExpr_accessor_ <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.CallExpr_accessor_" (Prelude.Just 0))
+{-# LINE 1576 "glean/schema/thrift/buck_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Buck.Types.CallExpr_accessor_ =
+     'Angle.TField "name"
+       (Glean.KeyType Glean.Schema.Buck.Types.CallExpr)
+       ('Angle.TField "field" (Data.Text.Text) ('Angle.TNoFields))
+{-# LINE 1578 "glean/schema/thrift/buck_include.hs" #-}
+instance Glean.Type Glean.Schema.Buck.Types.IndexFailureX_source
+         where
+  buildRtsValue b Glean.Schema.Buck.Types.IndexFailureX_source_EMPTY
+    = Glean.buildRtsSelector b 2
+  buildRtsValue b
+    (Glean.Schema.Buck.Types.IndexFailureX_source_locator x)
+    = do Glean.buildRtsSelector b 0
+         Glean.buildRtsValue b x
+  buildRtsValue b
+    (Glean.Schema.Buck.Types.IndexFailureX_source_buildFile x)
+    = do Glean.buildRtsSelector b 1
+         Glean.buildRtsValue b x
+  decodeRtsValue
+    = Glean.sumD
+        (Prelude.pure Glean.Schema.Buck.Types.IndexFailureX_source_EMPTY)
+        [Glean.mapD Glean.Schema.Buck.Types.IndexFailureX_source_locator,
+         Glean.mapD Glean.Schema.Buck.Types.IndexFailureX_source_buildFile]
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "buck.IndexFailureX_source" (Prelude.Just 0))
+{-# LINE 1594 "glean/schema/thrift/buck_include.hs" #-}
 type instance
      Angle.SumFields Glean.Schema.Buck.Types.IndexFailureX_source =
      'Angle.TField "locator"
diff --git a/glean/schema/thrift/gen-hs2/Glean/Schema/Builtin/Types.hs b/glean/schema/thrift/gen-hs2/Glean/Schema/Builtin/Types.hs
--- a/glean/schema/thrift/gen-hs2/Glean/Schema/Builtin/Types.hs
+++ b/glean/schema/thrift/gen-hs2/Glean/Schema/Builtin/Types.hs
@@ -70,7 +70,7 @@
 version = 1
 
 schema_id :: Glean.SchemaId
-schema_id = Glean.SchemaId "344b23f7820658f9b2eca6304246a029"
+schema_id = Glean.SchemaId "7cb6848b063ef55290e3a4bfa824a6f3"
 
 data Unit = Unit{}
             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
diff --git a/glean/schema/thrift/gen-hs2/Glean/Schema/Chef/Types.hs b/glean/schema/thrift/gen-hs2/Glean/Schema/Chef/Types.hs
new file mode 100644
--- /dev/null
+++ b/glean/schema/thrift/gen-hs2/Glean/Schema/Chef/Types.hs
@@ -0,0 +1,1909 @@
+-----------------------------------------------------------------
+-- Autogenerated by Thrift
+--
+-- DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+--  @generated
+-----------------------------------------------------------------
+{-# LINE 2 "glean/schema/thrift/chef_include.hs" #-}
+{-# LANGUAGE TypeFamilies, MultiParamTypeClasses, DataKinds #-}
+{-# LINE 3 "glean/schema/thrift/chef_include.hs" #-}
+{-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-}
+{-# LINE 4 "glean/schema/thrift/chef_include.hs" #-}
+{-# LANGUAGE UndecidableInstances #-}
+{-# LINE 14 ".build/def/codegen/thrift-schema-hs/glean/schema/thrift/gen-hs2/Glean/Schema/Chef/Types.hs" #-}
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE BangPatterns #-}
+{-# OPTIONS_GHC -fno-warn-unused-imports#-}
+{-# OPTIONS_GHC -fno-warn-overlapping-patterns#-}
+{-# OPTIONS_GHC -fno-warn-incomplete-patterns#-}
+{-# OPTIONS_GHC -fno-warn-incomplete-uni-patterns#-}
+{-# OPTIONS_GHC -fno-warn-incomplete-record-updates#-}
+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
+module Glean.Schema.Chef.Types
+       (pREDICATE_VERSIONS, Symbol_id,
+        Symbol(Symbol, symbol_id, symbol_key), ReferencedAt_id,
+        ReferencedAt(ReferencedAt, referencedAt_id, referencedAt_key),
+        RefLocationSymbol_id,
+        RefLocationSymbol(RefLocationSymbol, refLocationSymbol_id,
+                          refLocationSymbol_key),
+        Name_id, Name(Name, name_id, name_key), Location_id,
+        Location(Location, location_id, location_key), DefinedAt_id,
+        DefinedAt(DefinedAt, definedAt_id, definedAt_key),
+        DefLocationSymbol_id,
+        DefLocationSymbol(DefLocationSymbol, defLocationSymbol_id,
+                          defLocationSymbol_key),
+        CookbookDependsOn_id,
+        CookbookDependsOn(CookbookDependsOn, cookbookDependsOn_id,
+                          cookbookDependsOn_key),
+        CookbookDependedOnBy_id,
+        CookbookDependedOnBy(CookbookDependedOnBy, cookbookDependedOnBy_id,
+                             cookbookDependedOnBy_key),
+        Cookbook_id, Cookbook(Cookbook, cookbook_id, cookbook_key),
+        Symbol_key(Symbol_key, symbol_key_identifier,
+                   symbol_key_qualifiedName),
+        ReferencedAt_key(ReferencedAt_key, referencedAt_key_symbol,
+                         referencedAt_key_referenceLocation),
+        RefLocationSymbol_key(RefLocationSymbol_key,
+                              refLocationSymbol_key_referenceLocation,
+                              refLocationSymbol_key_symbol),
+        DefinedAt_key(DefinedAt_key, definedAt_key_symbol,
+                      definedAt_key_definitionLocation),
+        DefLocationSymbol_key(DefLocationSymbol_key,
+                              defLocationSymbol_key_definitionLocation,
+                              defLocationSymbol_key_symbol),
+        CookbookDependsOn_key(CookbookDependsOn_key,
+                              cookbookDependsOn_key_cookbook, cookbookDependsOn_key_dependsOn),
+        CookbookDependedOnBy_key(CookbookDependedOnBy_key,
+                                 cookbookDependedOnBy_key_cookbook,
+                                 cookbookDependedOnBy_key_dependedOnBy),
+        Cookbook_key(Cookbook_key, cookbook_key_cookbookName,
+                     cookbook_key_cookbookLocation))
+       where
+import qualified Control.DeepSeq as DeepSeq
+import qualified Control.Monad as Monad
+import qualified Control.Monad.ST.Trans as ST
+import qualified Control.Monad.Trans.Class as Trans
+import qualified Data.Aeson as Aeson
+import qualified Data.Aeson.Types as Aeson
+import qualified Data.Default as Default
+import qualified Data.HashMap.Strict as HashMap
+import qualified Data.Hashable as Hashable
+import qualified Data.Int as Int
+import qualified Data.List as List
+import qualified Data.Map.Strict as Map
+import qualified Data.Ord as Ord
+import qualified Data.Text as Text
+import qualified Data.Text.Encoding as Text
+import qualified Facebook.Thrift.Annotation.Thrift.Thrift.Types
+       as Facebook.Thrift.Annotation.Thrift.Thrift
+import qualified Glean.Schema.Builtin.Types as Glean.Schema.Builtin
+import qualified Glean.Schema.Src.Types as Glean.Schema.Src
+import qualified Glean.Types as Glean
+import qualified Prelude as Prelude
+import qualified Rust.Types as Rust
+import qualified Thrift.Binary.Parser as Parser
+import qualified Thrift.CodegenTypesOnly as Thrift
+import Control.Applicative ((<|>), (*>), (<*))
+import Data.Aeson ((.:), (.:?), (.=), (.!=))
+import Data.Monoid ((<>))
+import Prelude ((.), (<$>), (<*>), (>>=), (==), (/=), (<), (++))
+{-# LINE 5 "glean/schema/thrift/chef_include.hs" #-}
+import qualified Data.ByteString
+{-# LINE 6 "glean/schema/thrift/chef_include.hs" #-}
+import qualified Data.Default
+{-# LINE 7 "glean/schema/thrift/chef_include.hs" #-}
+import qualified Data.Text
+{-# LINE 9 "glean/schema/thrift/chef_include.hs" #-}
+import qualified Glean.Types as Glean
+{-# LINE 10 "glean/schema/thrift/chef_include.hs" #-}
+import qualified Glean.Typed as Glean
+{-# LINE 11 "glean/schema/thrift/chef_include.hs" #-}
+import qualified Glean.Query.Angle as Angle
+{-# LINE 12 "glean/schema/thrift/chef_include.hs" #-}
+import qualified Glean.Angle.Types as Angle
+{-# LINE 14 "glean/schema/thrift/chef_include.hs" #-}
+import qualified Glean.Schema.Builtin.Types
+{-# LINE 15 "glean/schema/thrift/chef_include.hs" #-}
+import qualified Glean.Schema.Src.Types
+{-# LINE 109 ".build/def/codegen/thrift-schema-hs/glean/schema/thrift/gen-hs2/Glean/Schema/Chef/Types.hs" #-}
+
+pREDICATE_VERSIONS :: Map.Map Text.Text Int.Int64
+pREDICATE_VERSIONS
+  = Map.fromList
+      [("Cookbook", 1), ("ReferencedAt", 1), ("CookbookDependedOnBy", 1),
+       ("CookbookDependsOn", 1), ("DefinedAt", 1), ("Symbol", 1),
+       ("DefLocationSymbol", 1), ("Name", 1), ("RefLocationSymbol", 1),
+       ("Location", 1)]
+
+type Symbol_id = Glean.Id
+
+data Symbol = Symbol{symbol_id :: {-# UNPACK #-} !Symbol_id,
+                     symbol_key :: Prelude.Maybe Symbol_key}
+              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Symbol where
+  toJSON (Symbol __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct Symbol where
+  buildStruct _proxy (Symbol __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (Symbol __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData Symbol where
+  rnf (Symbol __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default Symbol where
+  def = Symbol Default.def Prelude.Nothing
+
+instance Hashable.Hashable Symbol where
+  hashWithSalt __salt (Symbol _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type ReferencedAt_id = Glean.Id
+
+data ReferencedAt = ReferencedAt{referencedAt_id ::
+                                 {-# UNPACK #-} !ReferencedAt_id,
+                                 referencedAt_key :: Prelude.Maybe ReferencedAt_key}
+                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ReferencedAt where
+  toJSON (ReferencedAt __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct ReferencedAt where
+  buildStruct _proxy (ReferencedAt __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (ReferencedAt __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ReferencedAt where
+  rnf (ReferencedAt __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default ReferencedAt where
+  def = ReferencedAt Default.def Prelude.Nothing
+
+instance Hashable.Hashable ReferencedAt where
+  hashWithSalt __salt (ReferencedAt _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type RefLocationSymbol_id = Glean.Id
+
+data RefLocationSymbol = RefLocationSymbol{refLocationSymbol_id ::
+                                           {-# UNPACK #-} !RefLocationSymbol_id,
+                                           refLocationSymbol_key ::
+                                           Prelude.Maybe RefLocationSymbol_key}
+                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON RefLocationSymbol where
+  toJSON (RefLocationSymbol __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct RefLocationSymbol where
+  buildStruct _proxy (RefLocationSymbol __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (RefLocationSymbol __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData RefLocationSymbol where
+  rnf (RefLocationSymbol __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default RefLocationSymbol where
+  def = RefLocationSymbol Default.def Prelude.Nothing
+
+instance Hashable.Hashable RefLocationSymbol where
+  hashWithSalt __salt (RefLocationSymbol _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type Name_id = Glean.Id
+
+data Name = Name{name_id :: {-# UNPACK #-} !Name_id,
+                 name_key :: Prelude.Maybe Text.Text}
+            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Name where
+  toJSON (Name __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct Name where
+  buildStruct _proxy (Name __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStringType _proxy)
+                                    2
+                                    1
+                                    (Thrift.genText _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (Name __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData Name where
+  rnf (Name __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default Name where
+  def = Name Default.def Prelude.Nothing
+
+instance Hashable.Hashable Name where
+  hashWithSalt __salt (Name _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type Location_id = Glean.Id
+
+data Location = Location{location_id ::
+                         {-# UNPACK #-} !Location_id,
+                         location_key :: Prelude.Maybe Glean.Schema.Src.FileLocation}
+                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Location where
+  toJSON (Location __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct Location where
+  buildStruct _proxy (Location __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (Location __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData Location where
+  rnf (Location __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default Location where
+  def = Location Default.def Prelude.Nothing
+
+instance Hashable.Hashable Location where
+  hashWithSalt __salt (Location _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type DefinedAt_id = Glean.Id
+
+data DefinedAt = DefinedAt{definedAt_id ::
+                           {-# UNPACK #-} !DefinedAt_id,
+                           definedAt_key :: Prelude.Maybe DefinedAt_key}
+                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON DefinedAt where
+  toJSON (DefinedAt __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct DefinedAt where
+  buildStruct _proxy (DefinedAt __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (DefinedAt __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData DefinedAt where
+  rnf (DefinedAt __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default DefinedAt where
+  def = DefinedAt Default.def Prelude.Nothing
+
+instance Hashable.Hashable DefinedAt where
+  hashWithSalt __salt (DefinedAt _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type DefLocationSymbol_id = Glean.Id
+
+data DefLocationSymbol = DefLocationSymbol{defLocationSymbol_id ::
+                                           {-# UNPACK #-} !DefLocationSymbol_id,
+                                           defLocationSymbol_key ::
+                                           Prelude.Maybe DefLocationSymbol_key}
+                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON DefLocationSymbol where
+  toJSON (DefLocationSymbol __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct DefLocationSymbol where
+  buildStruct _proxy (DefLocationSymbol __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (DefLocationSymbol __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData DefLocationSymbol where
+  rnf (DefLocationSymbol __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default DefLocationSymbol where
+  def = DefLocationSymbol Default.def Prelude.Nothing
+
+instance Hashable.Hashable DefLocationSymbol where
+  hashWithSalt __salt (DefLocationSymbol _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type CookbookDependsOn_id = Glean.Id
+
+data CookbookDependsOn = CookbookDependsOn{cookbookDependsOn_id ::
+                                           {-# UNPACK #-} !CookbookDependsOn_id,
+                                           cookbookDependsOn_key ::
+                                           Prelude.Maybe CookbookDependsOn_key}
+                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON CookbookDependsOn where
+  toJSON (CookbookDependsOn __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct CookbookDependsOn where
+  buildStruct _proxy (CookbookDependsOn __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (CookbookDependsOn __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData CookbookDependsOn where
+  rnf (CookbookDependsOn __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default CookbookDependsOn where
+  def = CookbookDependsOn Default.def Prelude.Nothing
+
+instance Hashable.Hashable CookbookDependsOn where
+  hashWithSalt __salt (CookbookDependsOn _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type CookbookDependedOnBy_id = Glean.Id
+
+data CookbookDependedOnBy = CookbookDependedOnBy{cookbookDependedOnBy_id
+                                                 :: {-# UNPACK #-} !CookbookDependedOnBy_id,
+                                                 cookbookDependedOnBy_key ::
+                                                 Prelude.Maybe CookbookDependedOnBy_key}
+                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON CookbookDependedOnBy where
+  toJSON (CookbookDependedOnBy __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct CookbookDependedOnBy where
+  buildStruct _proxy (CookbookDependedOnBy __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (CookbookDependedOnBy __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData CookbookDependedOnBy where
+  rnf (CookbookDependedOnBy __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default CookbookDependedOnBy where
+  def = CookbookDependedOnBy Default.def Prelude.Nothing
+
+instance Hashable.Hashable CookbookDependedOnBy where
+  hashWithSalt __salt (CookbookDependedOnBy _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type Cookbook_id = Glean.Id
+
+data Cookbook = Cookbook{cookbook_id ::
+                         {-# UNPACK #-} !Cookbook_id,
+                         cookbook_key :: Prelude.Maybe Cookbook_key}
+                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Cookbook where
+  toJSON (Cookbook __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct Cookbook where
+  buildStruct _proxy (Cookbook __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (Cookbook __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData Cookbook where
+  rnf (Cookbook __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default Cookbook where
+  def = Cookbook Default.def Prelude.Nothing
+
+instance Hashable.Hashable Cookbook where
+  hashWithSalt __salt (Cookbook _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+data Symbol_key = Symbol_key{symbol_key_identifier :: Name,
+                             symbol_key_qualifiedName :: [Name]}
+                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Symbol_key where
+  toJSON (Symbol_key __field__identifier __field__qualifiedName)
+    = Aeson.object
+        ("identifier" .= __field__identifier :
+           "qualifiedName" .= __field__qualifiedName : Prelude.mempty)
+
+instance Thrift.ThriftStruct Symbol_key where
+  buildStruct _proxy
+    (Symbol_key __field__identifier __field__qualifiedName)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "identifier" (Thrift.getStructType _proxy)
+           1
+           0
+           (Thrift.buildStruct _proxy __field__identifier)
+           :
+           Thrift.genField _proxy "qualifiedName" (Thrift.getListType _proxy)
+             2
+             1
+             (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                (Thrift.buildStruct _proxy)
+                __field__qualifiedName)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__identifier <- ST.newSTRef Default.def
+            __field__qualifiedName <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__identifier
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__qualifiedName
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__identifier <- ST.readSTRef
+                                                                     __field__identifier
+                                             !__val__qualifiedName <- ST.readSTRef
+                                                                        __field__qualifiedName
+                                             Prelude.pure
+                                               (Symbol_key __val__identifier __val__qualifiedName)
+              _idMap = HashMap.fromList [("identifier", 1), ("qualifiedName", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData Symbol_key where
+  rnf (Symbol_key __field__identifier __field__qualifiedName)
+    = DeepSeq.rnf __field__identifier `Prelude.seq`
+        DeepSeq.rnf __field__qualifiedName `Prelude.seq` ()
+
+instance Default.Default Symbol_key where
+  def = Symbol_key Default.def Default.def
+
+instance Hashable.Hashable Symbol_key where
+  hashWithSalt __salt (Symbol_key _identifier _qualifiedName)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _identifier)
+        _qualifiedName
+
+data ReferencedAt_key = ReferencedAt_key{referencedAt_key_symbol ::
+                                         Symbol,
+                                         referencedAt_key_referenceLocation :: Location}
+                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ReferencedAt_key where
+  toJSON
+    (ReferencedAt_key __field__symbol __field__referenceLocation)
+    = Aeson.object
+        ("symbol" .= __field__symbol :
+           "referenceLocation" .= __field__referenceLocation : Prelude.mempty)
+
+instance Thrift.ThriftStruct ReferencedAt_key where
+  buildStruct _proxy
+    (ReferencedAt_key __field__symbol __field__referenceLocation)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "symbol" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__symbol)
+           :
+           Thrift.genField _proxy "referenceLocation"
+             (Thrift.getStructType _proxy)
+             2
+             1
+             (Thrift.buildStruct _proxy __field__referenceLocation)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__symbol <- ST.newSTRef Default.def
+            __field__referenceLocation <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__symbol
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__referenceLocation
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__symbol <- ST.readSTRef
+                                                                 __field__symbol
+                                             !__val__referenceLocation <- ST.readSTRef
+                                                                            __field__referenceLocation
+                                             Prelude.pure
+                                               (ReferencedAt_key __val__symbol
+                                                  __val__referenceLocation)
+              _idMap = HashMap.fromList [("symbol", 1), ("referenceLocation", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ReferencedAt_key where
+  rnf (ReferencedAt_key __field__symbol __field__referenceLocation)
+    = DeepSeq.rnf __field__symbol `Prelude.seq`
+        DeepSeq.rnf __field__referenceLocation `Prelude.seq` ()
+
+instance Default.Default ReferencedAt_key where
+  def = ReferencedAt_key Default.def Default.def
+
+instance Hashable.Hashable ReferencedAt_key where
+  hashWithSalt __salt (ReferencedAt_key _symbol _referenceLocation)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _symbol)
+        _referenceLocation
+
+data RefLocationSymbol_key = RefLocationSymbol_key{refLocationSymbol_key_referenceLocation
+                                                   :: Location,
+                                                   refLocationSymbol_key_symbol :: Symbol}
+                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON RefLocationSymbol_key where
+  toJSON
+    (RefLocationSymbol_key __field__referenceLocation __field__symbol)
+    = Aeson.object
+        ("referenceLocation" .= __field__referenceLocation :
+           "symbol" .= __field__symbol : Prelude.mempty)
+
+instance Thrift.ThriftStruct RefLocationSymbol_key where
+  buildStruct _proxy
+    (RefLocationSymbol_key __field__referenceLocation __field__symbol)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "referenceLocation"
+           (Thrift.getStructType _proxy)
+           1
+           0
+           (Thrift.buildStruct _proxy __field__referenceLocation)
+           :
+           Thrift.genField _proxy "symbol" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__symbol)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__referenceLocation <- ST.newSTRef Default.def
+            __field__symbol <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__referenceLocation
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__symbol
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__referenceLocation <- ST.readSTRef
+                                                                            __field__referenceLocation
+                                             !__val__symbol <- ST.readSTRef __field__symbol
+                                             Prelude.pure
+                                               (RefLocationSymbol_key __val__referenceLocation
+                                                  __val__symbol)
+              _idMap = HashMap.fromList [("referenceLocation", 1), ("symbol", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData RefLocationSymbol_key where
+  rnf
+    (RefLocationSymbol_key __field__referenceLocation __field__symbol)
+    = DeepSeq.rnf __field__referenceLocation `Prelude.seq`
+        DeepSeq.rnf __field__symbol `Prelude.seq` ()
+
+instance Default.Default RefLocationSymbol_key where
+  def = RefLocationSymbol_key Default.def Default.def
+
+instance Hashable.Hashable RefLocationSymbol_key where
+  hashWithSalt __salt
+    (RefLocationSymbol_key _referenceLocation _symbol)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt __salt _referenceLocation)
+        _symbol
+
+data DefinedAt_key = DefinedAt_key{definedAt_key_symbol :: Symbol,
+                                   definedAt_key_definitionLocation :: Location}
+                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON DefinedAt_key where
+  toJSON (DefinedAt_key __field__symbol __field__definitionLocation)
+    = Aeson.object
+        ("symbol" .= __field__symbol :
+           "definitionLocation" .= __field__definitionLocation :
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct DefinedAt_key where
+  buildStruct _proxy
+    (DefinedAt_key __field__symbol __field__definitionLocation)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "symbol" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__symbol)
+           :
+           Thrift.genField _proxy "definitionLocation"
+             (Thrift.getStructType _proxy)
+             2
+             1
+             (Thrift.buildStruct _proxy __field__definitionLocation)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__symbol <- ST.newSTRef Default.def
+            __field__definitionLocation <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__symbol
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__definitionLocation
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__symbol <- ST.readSTRef
+                                                                 __field__symbol
+                                             !__val__definitionLocation <- ST.readSTRef
+                                                                             __field__definitionLocation
+                                             Prelude.pure
+                                               (DefinedAt_key __val__symbol
+                                                  __val__definitionLocation)
+              _idMap
+                = HashMap.fromList [("symbol", 1), ("definitionLocation", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData DefinedAt_key where
+  rnf (DefinedAt_key __field__symbol __field__definitionLocation)
+    = DeepSeq.rnf __field__symbol `Prelude.seq`
+        DeepSeq.rnf __field__definitionLocation `Prelude.seq` ()
+
+instance Default.Default DefinedAt_key where
+  def = DefinedAt_key Default.def Default.def
+
+instance Hashable.Hashable DefinedAt_key where
+  hashWithSalt __salt (DefinedAt_key _symbol _definitionLocation)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _symbol)
+        _definitionLocation
+
+data DefLocationSymbol_key = DefLocationSymbol_key{defLocationSymbol_key_definitionLocation
+                                                   :: Location,
+                                                   defLocationSymbol_key_symbol :: Symbol}
+                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON DefLocationSymbol_key where
+  toJSON
+    (DefLocationSymbol_key __field__definitionLocation __field__symbol)
+    = Aeson.object
+        ("definitionLocation" .= __field__definitionLocation :
+           "symbol" .= __field__symbol : Prelude.mempty)
+
+instance Thrift.ThriftStruct DefLocationSymbol_key where
+  buildStruct _proxy
+    (DefLocationSymbol_key __field__definitionLocation __field__symbol)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "definitionLocation"
+           (Thrift.getStructType _proxy)
+           1
+           0
+           (Thrift.buildStruct _proxy __field__definitionLocation)
+           :
+           Thrift.genField _proxy "symbol" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__symbol)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__definitionLocation <- ST.newSTRef Default.def
+            __field__symbol <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__definitionLocation
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__symbol
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__definitionLocation <- ST.readSTRef
+                                                                             __field__definitionLocation
+                                             !__val__symbol <- ST.readSTRef __field__symbol
+                                             Prelude.pure
+                                               (DefLocationSymbol_key __val__definitionLocation
+                                                  __val__symbol)
+              _idMap
+                = HashMap.fromList [("definitionLocation", 1), ("symbol", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData DefLocationSymbol_key where
+  rnf
+    (DefLocationSymbol_key __field__definitionLocation __field__symbol)
+    = DeepSeq.rnf __field__definitionLocation `Prelude.seq`
+        DeepSeq.rnf __field__symbol `Prelude.seq` ()
+
+instance Default.Default DefLocationSymbol_key where
+  def = DefLocationSymbol_key Default.def Default.def
+
+instance Hashable.Hashable DefLocationSymbol_key where
+  hashWithSalt __salt
+    (DefLocationSymbol_key _definitionLocation _symbol)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt __salt _definitionLocation)
+        _symbol
+
+data CookbookDependsOn_key = CookbookDependsOn_key{cookbookDependsOn_key_cookbook
+                                                   :: Cookbook,
+                                                   cookbookDependsOn_key_dependsOn :: Cookbook}
+                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON CookbookDependsOn_key where
+  toJSON (CookbookDependsOn_key __field__cookbook __field__dependsOn)
+    = Aeson.object
+        ("cookbook" .= __field__cookbook :
+           "dependsOn" .= __field__dependsOn : Prelude.mempty)
+
+instance Thrift.ThriftStruct CookbookDependsOn_key where
+  buildStruct _proxy
+    (CookbookDependsOn_key __field__cookbook __field__dependsOn)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "cookbook" (Thrift.getStructType _proxy) 1
+           0
+           (Thrift.buildStruct _proxy __field__cookbook)
+           :
+           Thrift.genField _proxy "dependsOn" (Thrift.getStructType _proxy) 2
+             1
+             (Thrift.buildStruct _proxy __field__dependsOn)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__cookbook <- ST.newSTRef Default.def
+            __field__dependsOn <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__cookbook
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__dependsOn
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__cookbook <- ST.readSTRef
+                                                                   __field__cookbook
+                                             !__val__dependsOn <- ST.readSTRef __field__dependsOn
+                                             Prelude.pure
+                                               (CookbookDependsOn_key __val__cookbook
+                                                  __val__dependsOn)
+              _idMap = HashMap.fromList [("cookbook", 1), ("dependsOn", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData CookbookDependsOn_key where
+  rnf (CookbookDependsOn_key __field__cookbook __field__dependsOn)
+    = DeepSeq.rnf __field__cookbook `Prelude.seq`
+        DeepSeq.rnf __field__dependsOn `Prelude.seq` ()
+
+instance Default.Default CookbookDependsOn_key where
+  def = CookbookDependsOn_key Default.def Default.def
+
+instance Hashable.Hashable CookbookDependsOn_key where
+  hashWithSalt __salt (CookbookDependsOn_key _cookbook _dependsOn)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _cookbook)
+        _dependsOn
+
+data CookbookDependedOnBy_key = CookbookDependedOnBy_key{cookbookDependedOnBy_key_cookbook
+                                                         :: Cookbook,
+                                                         cookbookDependedOnBy_key_dependedOnBy ::
+                                                         Cookbook}
+                                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON CookbookDependedOnBy_key where
+  toJSON
+    (CookbookDependedOnBy_key __field__cookbook __field__dependedOnBy)
+    = Aeson.object
+        ("cookbook" .= __field__cookbook :
+           "dependedOnBy" .= __field__dependedOnBy : Prelude.mempty)
+
+instance Thrift.ThriftStruct CookbookDependedOnBy_key where
+  buildStruct _proxy
+    (CookbookDependedOnBy_key __field__cookbook __field__dependedOnBy)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "cookbook" (Thrift.getStructType _proxy) 1
+           0
+           (Thrift.buildStruct _proxy __field__cookbook)
+           :
+           Thrift.genField _proxy "dependedOnBy" (Thrift.getStructType _proxy)
+             2
+             1
+             (Thrift.buildStruct _proxy __field__dependedOnBy)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__cookbook <- ST.newSTRef Default.def
+            __field__dependedOnBy <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__cookbook
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__dependedOnBy
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__cookbook <- ST.readSTRef
+                                                                   __field__cookbook
+                                             !__val__dependedOnBy <- ST.readSTRef
+                                                                       __field__dependedOnBy
+                                             Prelude.pure
+                                               (CookbookDependedOnBy_key __val__cookbook
+                                                  __val__dependedOnBy)
+              _idMap = HashMap.fromList [("cookbook", 1), ("dependedOnBy", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData CookbookDependedOnBy_key where
+  rnf
+    (CookbookDependedOnBy_key __field__cookbook __field__dependedOnBy)
+    = DeepSeq.rnf __field__cookbook `Prelude.seq`
+        DeepSeq.rnf __field__dependedOnBy `Prelude.seq` ()
+
+instance Default.Default CookbookDependedOnBy_key where
+  def = CookbookDependedOnBy_key Default.def Default.def
+
+instance Hashable.Hashable CookbookDependedOnBy_key where
+  hashWithSalt __salt
+    (CookbookDependedOnBy_key _cookbook _dependedOnBy)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _cookbook)
+        _dependedOnBy
+
+data Cookbook_key = Cookbook_key{cookbook_key_cookbookName :: Name,
+                                 cookbook_key_cookbookLocation :: Location}
+                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Cookbook_key where
+  toJSON
+    (Cookbook_key __field__cookbookName __field__cookbookLocation)
+    = Aeson.object
+        ("cookbookName" .= __field__cookbookName :
+           "cookbookLocation" .= __field__cookbookLocation : Prelude.mempty)
+
+instance Thrift.ThriftStruct Cookbook_key where
+  buildStruct _proxy
+    (Cookbook_key __field__cookbookName __field__cookbookLocation)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "cookbookName"
+           (Thrift.getStructType _proxy)
+           1
+           0
+           (Thrift.buildStruct _proxy __field__cookbookName)
+           :
+           Thrift.genField _proxy "cookbookLocation"
+             (Thrift.getStructType _proxy)
+             2
+             1
+             (Thrift.buildStruct _proxy __field__cookbookLocation)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__cookbookName <- ST.newSTRef Default.def
+            __field__cookbookLocation <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__cookbookName
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__cookbookLocation
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__cookbookName <- ST.readSTRef
+                                                                       __field__cookbookName
+                                             !__val__cookbookLocation <- ST.readSTRef
+                                                                           __field__cookbookLocation
+                                             Prelude.pure
+                                               (Cookbook_key __val__cookbookName
+                                                  __val__cookbookLocation)
+              _idMap
+                = HashMap.fromList [("cookbookName", 1), ("cookbookLocation", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData Cookbook_key where
+  rnf (Cookbook_key __field__cookbookName __field__cookbookLocation)
+    = DeepSeq.rnf __field__cookbookName `Prelude.seq`
+        DeepSeq.rnf __field__cookbookLocation `Prelude.seq` ()
+
+instance Default.Default Cookbook_key where
+  def = Cookbook_key Default.def Default.def
+
+instance Hashable.Hashable Cookbook_key where
+  hashWithSalt __salt (Cookbook_key _cookbookName _cookbookLocation)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt __salt _cookbookName)
+        _cookbookLocation
+{-# LINE 18 "glean/schema/thrift/chef_include.hs" #-}
+instance Glean.Type Glean.Schema.Chef.Types.Cookbook_key where
+  buildRtsValue b (Glean.Schema.Chef.Types.Cookbook_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Chef.Types.Cookbook_key <$> Glean.decodeRtsValue <*>
+        Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "chef.Cookbook_key" (Prelude.Just 0))
+{-# LINE 27 "glean/schema/thrift/chef_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Chef.Types.Cookbook_key =
+     'Angle.TField "cookbookName"
+       (Glean.KeyType Glean.Schema.Chef.Types.Name)
+       ('Angle.TField "cookbookLocation"
+          (Glean.KeyType Glean.Schema.Chef.Types.Location)
+          ('Angle.TNoFields))
+{-# LINE 29 "glean/schema/thrift/chef_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Chef.Types.Cookbook where
+  type KeyType Glean.Schema.Chef.Types.Cookbook =
+       Glean.Schema.Chef.Types.Cookbook_key
+  getName _proxy = Glean.PredicateRef "chef.Cookbook" 1
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Chef.Types.cookbook_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Chef.Types.Cookbook x k
+  getFactKey = Glean.Schema.Chef.Types.cookbook_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 38 "glean/schema/thrift/chef_include.hs" #-}
+instance Glean.Type Glean.Schema.Chef.Types.Cookbook where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 44 "glean/schema/thrift/chef_include.hs" #-}
+instance Glean.Type Glean.Schema.Chef.Types.ReferencedAt_key where
+  buildRtsValue b (Glean.Schema.Chef.Types.ReferencedAt_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Chef.Types.ReferencedAt_key <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "chef.ReferencedAt_key" (Prelude.Just 0))
+{-# LINE 53 "glean/schema/thrift/chef_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Chef.Types.ReferencedAt_key =
+     'Angle.TField "symbol"
+       (Glean.KeyType Glean.Schema.Chef.Types.Symbol)
+       ('Angle.TField "referenceLocation"
+          (Glean.KeyType Glean.Schema.Chef.Types.Location)
+          ('Angle.TNoFields))
+{-# LINE 55 "glean/schema/thrift/chef_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Chef.Types.ReferencedAt where
+  type KeyType Glean.Schema.Chef.Types.ReferencedAt =
+       Glean.Schema.Chef.Types.ReferencedAt_key
+  getName _proxy = Glean.PredicateRef "chef.ReferencedAt" 1
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Chef.Types.referencedAt_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Chef.Types.ReferencedAt x k
+  getFactKey = Glean.Schema.Chef.Types.referencedAt_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 64 "glean/schema/thrift/chef_include.hs" #-}
+instance Glean.Type Glean.Schema.Chef.Types.ReferencedAt where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 70 "glean/schema/thrift/chef_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Chef.Types.CookbookDependedOnBy_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Chef.Types.CookbookDependedOnBy_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Chef.Types.CookbookDependedOnBy_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "chef.CookbookDependedOnBy_key" (Prelude.Just 0))
+{-# LINE 79 "glean/schema/thrift/chef_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Chef.Types.CookbookDependedOnBy_key
+     =
+     'Angle.TField "cookbook"
+       (Glean.KeyType Glean.Schema.Chef.Types.Cookbook)
+       ('Angle.TField "dependedOnBy"
+          (Glean.KeyType Glean.Schema.Chef.Types.Cookbook)
+          ('Angle.TNoFields))
+{-# LINE 81 "glean/schema/thrift/chef_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Chef.Types.CookbookDependedOnBy
+         where
+  type KeyType Glean.Schema.Chef.Types.CookbookDependedOnBy =
+       Glean.Schema.Chef.Types.CookbookDependedOnBy_key
+  getName _proxy = Glean.PredicateRef "chef.CookbookDependedOnBy" 1
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Chef.Types.cookbookDependedOnBy_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Chef.Types.CookbookDependedOnBy x k
+  getFactKey = Glean.Schema.Chef.Types.cookbookDependedOnBy_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 90 "glean/schema/thrift/chef_include.hs" #-}
+instance Glean.Type Glean.Schema.Chef.Types.CookbookDependedOnBy
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 96 "glean/schema/thrift/chef_include.hs" #-}
+instance Glean.Type Glean.Schema.Chef.Types.CookbookDependsOn_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Chef.Types.CookbookDependsOn_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Chef.Types.CookbookDependsOn_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "chef.CookbookDependsOn_key" (Prelude.Just 0))
+{-# LINE 105 "glean/schema/thrift/chef_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Chef.Types.CookbookDependsOn_key =
+     'Angle.TField "cookbook"
+       (Glean.KeyType Glean.Schema.Chef.Types.Cookbook)
+       ('Angle.TField "dependsOn"
+          (Glean.KeyType Glean.Schema.Chef.Types.Cookbook)
+          ('Angle.TNoFields))
+{-# LINE 107 "glean/schema/thrift/chef_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Chef.Types.CookbookDependsOn
+         where
+  type KeyType Glean.Schema.Chef.Types.CookbookDependsOn =
+       Glean.Schema.Chef.Types.CookbookDependsOn_key
+  getName _proxy = Glean.PredicateRef "chef.CookbookDependsOn" 1
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Chef.Types.cookbookDependsOn_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Chef.Types.CookbookDependsOn x k
+  getFactKey = Glean.Schema.Chef.Types.cookbookDependsOn_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 116 "glean/schema/thrift/chef_include.hs" #-}
+instance Glean.Type Glean.Schema.Chef.Types.CookbookDependsOn where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 122 "glean/schema/thrift/chef_include.hs" #-}
+instance Glean.Type Glean.Schema.Chef.Types.DefinedAt_key where
+  buildRtsValue b (Glean.Schema.Chef.Types.DefinedAt_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Chef.Types.DefinedAt_key <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "chef.DefinedAt_key" (Prelude.Just 0))
+{-# LINE 131 "glean/schema/thrift/chef_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Chef.Types.DefinedAt_key =
+     'Angle.TField "symbol"
+       (Glean.KeyType Glean.Schema.Chef.Types.Symbol)
+       ('Angle.TField "definitionLocation"
+          (Glean.KeyType Glean.Schema.Chef.Types.Location)
+          ('Angle.TNoFields))
+{-# LINE 133 "glean/schema/thrift/chef_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Chef.Types.DefinedAt where
+  type KeyType Glean.Schema.Chef.Types.DefinedAt =
+       Glean.Schema.Chef.Types.DefinedAt_key
+  getName _proxy = Glean.PredicateRef "chef.DefinedAt" 1
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Chef.Types.definedAt_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Chef.Types.DefinedAt x k
+  getFactKey = Glean.Schema.Chef.Types.definedAt_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 142 "glean/schema/thrift/chef_include.hs" #-}
+instance Glean.Type Glean.Schema.Chef.Types.DefinedAt where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 148 "glean/schema/thrift/chef_include.hs" #-}
+instance Glean.Type Glean.Schema.Chef.Types.Symbol_key where
+  buildRtsValue b (Glean.Schema.Chef.Types.Symbol_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Chef.Types.Symbol_key <$> Glean.decodeRtsValue <*>
+        Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "chef.Symbol_key" (Prelude.Just 0))
+{-# LINE 157 "glean/schema/thrift/chef_include.hs" #-}
+type instance Angle.RecordFields Glean.Schema.Chef.Types.Symbol_key
+     =
+     'Angle.TField "identifier"
+       (Glean.KeyType Glean.Schema.Chef.Types.Name)
+       ('Angle.TField "qualifiedName" ([Glean.Schema.Chef.Types.Name])
+          ('Angle.TNoFields))
+{-# LINE 159 "glean/schema/thrift/chef_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Chef.Types.Symbol where
+  type KeyType Glean.Schema.Chef.Types.Symbol =
+       Glean.Schema.Chef.Types.Symbol_key
+  getName _proxy = Glean.PredicateRef "chef.Symbol" 1
+  getId = Glean.IdOf . Glean.Fid . Glean.Schema.Chef.Types.symbol_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Chef.Types.Symbol x k
+  getFactKey = Glean.Schema.Chef.Types.symbol_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 168 "glean/schema/thrift/chef_include.hs" #-}
+instance Glean.Type Glean.Schema.Chef.Types.Symbol where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 174 "glean/schema/thrift/chef_include.hs" #-}
+instance Glean.Type Glean.Schema.Chef.Types.DefLocationSymbol_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Chef.Types.DefLocationSymbol_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Chef.Types.DefLocationSymbol_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "chef.DefLocationSymbol_key" (Prelude.Just 0))
+{-# LINE 183 "glean/schema/thrift/chef_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Chef.Types.DefLocationSymbol_key =
+     'Angle.TField "definitionLocation"
+       (Glean.KeyType Glean.Schema.Chef.Types.Location)
+       ('Angle.TField "symbol"
+          (Glean.KeyType Glean.Schema.Chef.Types.Symbol)
+          ('Angle.TNoFields))
+{-# LINE 185 "glean/schema/thrift/chef_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Chef.Types.DefLocationSymbol
+         where
+  type KeyType Glean.Schema.Chef.Types.DefLocationSymbol =
+       Glean.Schema.Chef.Types.DefLocationSymbol_key
+  getName _proxy = Glean.PredicateRef "chef.DefLocationSymbol" 1
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Chef.Types.defLocationSymbol_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Chef.Types.DefLocationSymbol x k
+  getFactKey = Glean.Schema.Chef.Types.defLocationSymbol_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 194 "glean/schema/thrift/chef_include.hs" #-}
+instance Glean.Type Glean.Schema.Chef.Types.DefLocationSymbol where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 200 "glean/schema/thrift/chef_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Chef.Types.Name where
+  type KeyType Glean.Schema.Chef.Types.Name = Data.Text.Text
+  getName _proxy = Glean.PredicateRef "chef.Name" 1
+  getId = Glean.IdOf . Glean.Fid . Glean.Schema.Chef.Types.name_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Chef.Types.Name x k
+  getFactKey = Glean.Schema.Chef.Types.name_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 208 "glean/schema/thrift/chef_include.hs" #-}
+instance Glean.Type Glean.Schema.Chef.Types.Name where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 214 "glean/schema/thrift/chef_include.hs" #-}
+instance Glean.Type Glean.Schema.Chef.Types.RefLocationSymbol_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Chef.Types.RefLocationSymbol_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Chef.Types.RefLocationSymbol_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "chef.RefLocationSymbol_key" (Prelude.Just 0))
+{-# LINE 223 "glean/schema/thrift/chef_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Chef.Types.RefLocationSymbol_key =
+     'Angle.TField "referenceLocation"
+       (Glean.KeyType Glean.Schema.Chef.Types.Location)
+       ('Angle.TField "symbol"
+          (Glean.KeyType Glean.Schema.Chef.Types.Symbol)
+          ('Angle.TNoFields))
+{-# LINE 225 "glean/schema/thrift/chef_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Chef.Types.RefLocationSymbol
+         where
+  type KeyType Glean.Schema.Chef.Types.RefLocationSymbol =
+       Glean.Schema.Chef.Types.RefLocationSymbol_key
+  getName _proxy = Glean.PredicateRef "chef.RefLocationSymbol" 1
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Chef.Types.refLocationSymbol_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Chef.Types.RefLocationSymbol x k
+  getFactKey = Glean.Schema.Chef.Types.refLocationSymbol_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 234 "glean/schema/thrift/chef_include.hs" #-}
+instance Glean.Type Glean.Schema.Chef.Types.RefLocationSymbol where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 240 "glean/schema/thrift/chef_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Chef.Types.Location where
+  type KeyType Glean.Schema.Chef.Types.Location =
+       Glean.Schema.Src.Types.FileLocation
+  getName _proxy = Glean.PredicateRef "chef.Location" 1
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Chef.Types.location_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Chef.Types.Location x k
+  getFactKey = Glean.Schema.Chef.Types.location_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 249 "glean/schema/thrift/chef_include.hs" #-}
+instance Glean.Type Glean.Schema.Chef.Types.Location where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
diff --git a/glean/schema/thrift/gen-hs2/Glean/Schema/Code/Types.hs b/glean/schema/thrift/gen-hs2/Glean/Schema/Code/Types.hs
--- a/glean/schema/thrift/gen-hs2/Glean/Schema/Code/Types.hs
+++ b/glean/schema/thrift/gen-hs2/Glean/Schema/Code/Types.hs
@@ -29,14 +29,17 @@
         EntityLanguage_id,
         EntityLanguage(EntityLanguage, entityLanguage_id,
                        entityLanguage_key),
-        SymbolId(SymbolId_EMPTY, SymbolId_scip, SymbolId_cxx),
+        SymbolId(SymbolId_EMPTY, SymbolId_scip, SymbolId_cxx,
+                 SymbolId_swift),
         Language(Language_Cpp, Language_PreProcessor, Language_Java,
                  Language_Haskell, Language_Python, Language_Hack,
                  Language_JavaScript, Language_Rust, Language_Thrift, Language_Buck,
                  Language_Erlang, Language_FSharp, Language_Go, Language_Kotlin,
                  Language_OCaml, Language_Scala, Language_Swift,
                  Language_TypeScript, Language_CSharp, Language_GraphQL,
-                 Language_Dataswarm, Language_Yaml, Language_Angle,
+                 Language_Dataswarm, Language_Yaml, Language_Angle, Language_Chef,
+                 Language_C, Language_TypeScriptReact, Language_JavaScriptReact,
+                 Language_Ruby, Language_VisualBasic, Language_Dart, Language_PHP,
                  Language__UNKNOWN),
         EntityLanguageSCIP_key(EntityLanguageSCIP_key,
                                entityLanguageSCIP_key_entity, entityLanguageSCIP_key_language),
@@ -46,7 +49,7 @@
                Entity_kotlin, Entity_hs, Entity_python, Entity_hack, Entity_flow,
                Entity_fbthrift, Entity_buck, Entity_erlang, Entity_lsif,
                Entity_scip, Entity_csharp, Entity_graphql, Entity_dataswarm,
-               Entity_angle),
+               Entity_angle, Entity_chef),
         EntityLanguage_key(EntityLanguage_key, entityLanguage_key_entity,
                            entityLanguage_key_language),
         IdlEntity(IdlEntity, idlEntity_lang, idlEntity_file,
@@ -82,6 +85,8 @@
        as Glean.Schema.CodeAnglelang
 import qualified Glean.Schema.CodeBuck.Types
        as Glean.Schema.CodeBuck
+import qualified Glean.Schema.CodeChef.Types
+       as Glean.Schema.CodeChef
 import qualified Glean.Schema.CodeCsharp.Types
        as Glean.Schema.CodeCsharp
 import qualified Glean.Schema.CodeCxx.Types as Glean.Schema.CodeCxx
@@ -109,6 +114,8 @@
        as Glean.Schema.CodePython
 import qualified Glean.Schema.CodeScip.Types
        as Glean.Schema.CodeScip
+import qualified Glean.Schema.CodeSwift.Types
+       as Glean.Schema.CodeSwift
 import qualified Glean.Schema.Src.Types as Glean.Schema.Src
 import qualified Glean.Types as Glean
 import qualified Prelude as Prelude
@@ -143,38 +150,42 @@
 {-# LINE 16 "glean/schema/thrift/code_include.hs" #-}
 import qualified Glean.Schema.CodeBuck.Types
 {-# LINE 17 "glean/schema/thrift/code_include.hs" #-}
-import qualified Glean.Schema.CodeCsharp.Types
+import qualified Glean.Schema.CodeChef.Types
 {-# LINE 18 "glean/schema/thrift/code_include.hs" #-}
-import qualified Glean.Schema.CodeCxx.Types
+import qualified Glean.Schema.CodeCsharp.Types
 {-# LINE 19 "glean/schema/thrift/code_include.hs" #-}
-import qualified Glean.Schema.CodeDataswarm.Types
+import qualified Glean.Schema.CodeCxx.Types
 {-# LINE 20 "glean/schema/thrift/code_include.hs" #-}
-import qualified Glean.Schema.CodeErlang.Types
+import qualified Glean.Schema.CodeDataswarm.Types
 {-# LINE 21 "glean/schema/thrift/code_include.hs" #-}
-import qualified Glean.Schema.CodeFbthrift.Types
+import qualified Glean.Schema.CodeErlang.Types
 {-# LINE 22 "glean/schema/thrift/code_include.hs" #-}
-import qualified Glean.Schema.CodeFlow.Types
+import qualified Glean.Schema.CodeFbthrift.Types
 {-# LINE 23 "glean/schema/thrift/code_include.hs" #-}
-import qualified Glean.Schema.CodeGraphql.Types
+import qualified Glean.Schema.CodeFlow.Types
 {-# LINE 24 "glean/schema/thrift/code_include.hs" #-}
-import qualified Glean.Schema.CodeHack.Types
+import qualified Glean.Schema.CodeGraphql.Types
 {-# LINE 25 "glean/schema/thrift/code_include.hs" #-}
-import qualified Glean.Schema.CodeHs.Types
+import qualified Glean.Schema.CodeHack.Types
 {-# LINE 26 "glean/schema/thrift/code_include.hs" #-}
-import qualified Glean.Schema.CodeJava.Types
+import qualified Glean.Schema.CodeHs.Types
 {-# LINE 27 "glean/schema/thrift/code_include.hs" #-}
-import qualified Glean.Schema.CodeKotlin.Types
+import qualified Glean.Schema.CodeJava.Types
 {-# LINE 28 "glean/schema/thrift/code_include.hs" #-}
-import qualified Glean.Schema.CodeLsif.Types
+import qualified Glean.Schema.CodeKotlin.Types
 {-# LINE 29 "glean/schema/thrift/code_include.hs" #-}
-import qualified Glean.Schema.CodePp.Types
+import qualified Glean.Schema.CodeLsif.Types
 {-# LINE 30 "glean/schema/thrift/code_include.hs" #-}
-import qualified Glean.Schema.CodePython.Types
+import qualified Glean.Schema.CodePp.Types
 {-# LINE 31 "glean/schema/thrift/code_include.hs" #-}
-import qualified Glean.Schema.CodeScip.Types
+import qualified Glean.Schema.CodePython.Types
 {-# LINE 32 "glean/schema/thrift/code_include.hs" #-}
+import qualified Glean.Schema.CodeScip.Types
+{-# LINE 33 "glean/schema/thrift/code_include.hs" #-}
+import qualified Glean.Schema.CodeSwift.Types
+{-# LINE 34 "glean/schema/thrift/code_include.hs" #-}
 import qualified Glean.Schema.Src.Types
-{-# LINE 178 ".build/def/codegen/thrift-schema-hs/glean/schema/thrift/gen-hs2/Glean/Schema/Code/Types.hs" #-}
+{-# LINE 189 ".build/def/codegen/thrift-schema-hs/glean/schema/thrift/gen-hs2/Glean/Schema/Code/Types.hs" #-}
 
 pREDICATE_VERSIONS :: Map.Map Text.Text Int.Int64
 pREDICATE_VERSIONS
@@ -420,12 +431,14 @@
 
 data SymbolId = SymbolId_scip Glean.Schema.CodeScip.SymbolId
               | SymbolId_cxx Glean.Schema.CodeCxx.SymbolId
+              | SymbolId_swift Glean.Schema.CodeSwift.SymbolId
               | SymbolId_EMPTY
                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
 
 instance Aeson.ToJSON SymbolId where
   toJSON (SymbolId_scip __scip) = Aeson.object ["scip" .= __scip]
   toJSON (SymbolId_cxx __cxx) = Aeson.object ["cxx" .= __cxx]
+  toJSON (SymbolId_swift __swift) = Aeson.object ["swift" .= __swift]
   toJSON SymbolId_EMPTY = Aeson.object []
 
 instance Thrift.ThriftStruct SymbolId where
@@ -437,6 +450,10 @@
     = Thrift.genStruct _proxy
         [Thrift.genField _proxy "cxx" (Thrift.getStringType _proxy) 2 0
            (Thrift.genText _proxy __cxx)]
+  buildStruct _proxy (SymbolId_swift __swift)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "swift" (Thrift.getStructType _proxy) 3 0
+           (Thrift.buildStruct _proxy __swift)]
   buildStruct _proxy SymbolId_EMPTY = Thrift.genStruct _proxy []
   parseStruct _proxy
     = do _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap
@@ -450,17 +467,22 @@
                                                          do _val <- Thrift.parseText _proxy
                                                             Thrift.parseStop _proxy
                                                             Prelude.return (SymbolId_cxx _val)
+                                                     3 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return (SymbolId_swift _val)
                                                      _ -> do Thrift.parseSkip _proxy _type
                                                                Prelude.Nothing
                                                              Thrift.parseStop _proxy
                                                              Prelude.return SymbolId_EMPTY
            Thrift.FieldEnd -> Prelude.return SymbolId_EMPTY
     where
-      _idMap = HashMap.fromList [("scip", 1), ("cxx", 2)]
+      _idMap = HashMap.fromList [("scip", 1), ("cxx", 2), ("swift", 3)]
 
 instance DeepSeq.NFData SymbolId where
   rnf (SymbolId_scip __scip) = DeepSeq.rnf __scip
   rnf (SymbolId_cxx __cxx) = DeepSeq.rnf __cxx
+  rnf (SymbolId_swift __swift) = DeepSeq.rnf __swift
   rnf SymbolId_EMPTY = ()
 
 instance Default.Default SymbolId where
@@ -471,6 +493,8 @@
     = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 1 _scip)
   hashWithSalt __salt (SymbolId_cxx _cxx)
     = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 2 _cxx)
+  hashWithSalt __salt (SymbolId_swift _swift)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 3 _swift)
   hashWithSalt __salt SymbolId_EMPTY
     = Hashable.hashWithSalt __salt (0 :: Prelude.Int)
 
@@ -497,6 +521,14 @@
               | Language_Dataswarm
               | Language_Yaml
               | Language_Angle
+              | Language_Chef
+              | Language_C
+              | Language_TypeScriptReact
+              | Language_JavaScriptReact
+              | Language_Ruby
+              | Language_VisualBasic
+              | Language_Dart
+              | Language_PHP
               | Language__UNKNOWN Prelude.Int
                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
 
@@ -537,6 +569,14 @@
   toThriftEnum 20 = Language_Dataswarm
   toThriftEnum 21 = Language_Yaml
   toThriftEnum 22 = Language_Angle
+  toThriftEnum 23 = Language_Chef
+  toThriftEnum 24 = Language_C
+  toThriftEnum 25 = Language_TypeScriptReact
+  toThriftEnum 26 = Language_JavaScriptReact
+  toThriftEnum 27 = Language_Ruby
+  toThriftEnum 28 = Language_VisualBasic
+  toThriftEnum 29 = Language_Dart
+  toThriftEnum 30 = Language_PHP
   toThriftEnum val = Language__UNKNOWN val
   fromThriftEnum Language_Cpp = 0
   fromThriftEnum Language_PreProcessor = 1
@@ -561,6 +601,14 @@
   fromThriftEnum Language_Dataswarm = 20
   fromThriftEnum Language_Yaml = 21
   fromThriftEnum Language_Angle = 22
+  fromThriftEnum Language_Chef = 23
+  fromThriftEnum Language_C = 24
+  fromThriftEnum Language_TypeScriptReact = 25
+  fromThriftEnum Language_JavaScriptReact = 26
+  fromThriftEnum Language_Ruby = 27
+  fromThriftEnum Language_VisualBasic = 28
+  fromThriftEnum Language_Dart = 29
+  fromThriftEnum Language_PHP = 30
   fromThriftEnum (Language__UNKNOWN val) = val
   allThriftEnumValues
     = [Language_Cpp, Language_PreProcessor, Language_Java,
@@ -569,7 +617,9 @@
        Language_Erlang, Language_FSharp, Language_Go, Language_Kotlin,
        Language_OCaml, Language_Scala, Language_Swift,
        Language_TypeScript, Language_CSharp, Language_GraphQL,
-       Language_Dataswarm, Language_Yaml, Language_Angle]
+       Language_Dataswarm, Language_Yaml, Language_Angle, Language_Chef,
+       Language_C, Language_TypeScriptReact, Language_JavaScriptReact,
+       Language_Ruby, Language_VisualBasic, Language_Dart, Language_PHP]
   toThriftEnumEither 0 = Prelude.Right Language_Cpp
   toThriftEnumEither 1 = Prelude.Right Language_PreProcessor
   toThriftEnumEither 2 = Prelude.Right Language_Java
@@ -593,6 +643,14 @@
   toThriftEnumEither 20 = Prelude.Right Language_Dataswarm
   toThriftEnumEither 21 = Prelude.Right Language_Yaml
   toThriftEnumEither 22 = Prelude.Right Language_Angle
+  toThriftEnumEither 23 = Prelude.Right Language_Chef
+  toThriftEnumEither 24 = Prelude.Right Language_C
+  toThriftEnumEither 25 = Prelude.Right Language_TypeScriptReact
+  toThriftEnumEither 26 = Prelude.Right Language_JavaScriptReact
+  toThriftEnumEither 27 = Prelude.Right Language_Ruby
+  toThriftEnumEither 28 = Prelude.Right Language_VisualBasic
+  toThriftEnumEither 29 = Prelude.Right Language_Dart
+  toThriftEnumEither 30 = Prelude.Right Language_PHP
   toThriftEnumEither val
     = Prelude.Left
         ("toThriftEnumEither: not a valid identifier for enum Language: "
@@ -775,6 +833,7 @@
             | Entity_graphql Glean.Schema.CodeGraphql.Entity
             | Entity_dataswarm Glean.Schema.CodeDataswarm.Entity
             | Entity_angle Glean.Schema.CodeAnglelang.Entity
+            | Entity_chef Glean.Schema.CodeChef.Entity
             | Entity_EMPTY
               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
 
@@ -803,6 +862,7 @@
   toJSON (Entity_dataswarm __dataswarm)
     = Aeson.object ["dataswarm" .= __dataswarm]
   toJSON (Entity_angle __angle) = Aeson.object ["angle" .= __angle]
+  toJSON (Entity_chef __chef) = Aeson.object ["chef" .= __chef]
   toJSON Entity_EMPTY = Aeson.object []
 
 instance Thrift.ThriftStruct Entity where
@@ -878,6 +938,10 @@
     = Thrift.genStruct _proxy
         [Thrift.genField _proxy "angle" (Thrift.getStructType _proxy) 17 0
            (Thrift.buildStruct _proxy __angle)]
+  buildStruct _proxy (Entity_chef __chef)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "chef" (Thrift.getStructType _proxy) 18 0
+           (Thrift.buildStruct _proxy __chef)]
   buildStruct _proxy Entity_EMPTY = Thrift.genStruct _proxy []
   parseStruct _proxy
     = do _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap
@@ -951,6 +1015,10 @@
                                                           do _val <- Thrift.parseStruct _proxy
                                                              Thrift.parseStop _proxy
                                                              Prelude.return (Entity_angle _val)
+                                                     18 | _type == Thrift.getStructType _proxy ->
+                                                          do _val <- Thrift.parseStruct _proxy
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return (Entity_chef _val)
                                                      _ -> do Thrift.parseSkip _proxy _type
                                                                Prelude.Nothing
                                                              Thrift.parseStop _proxy
@@ -962,7 +1030,8 @@
             [("cxx", 1), ("pp", 2), ("java", 3), ("kotlin", 4), ("hs", 5),
              ("python", 6), ("hack", 7), ("flow", 8), ("fbthrift", 9),
              ("buck", 10), ("erlang", 11), ("lsif", 12), ("scip", 13),
-             ("csharp", 14), ("graphql", 15), ("dataswarm", 16), ("angle", 17)]
+             ("csharp", 14), ("graphql", 15), ("dataswarm", 16), ("angle", 17),
+             ("chef", 18)]
 
 instance DeepSeq.NFData Entity where
   rnf (Entity_cxx __cxx) = DeepSeq.rnf __cxx
@@ -982,6 +1051,7 @@
   rnf (Entity_graphql __graphql) = DeepSeq.rnf __graphql
   rnf (Entity_dataswarm __dataswarm) = DeepSeq.rnf __dataswarm
   rnf (Entity_angle __angle) = DeepSeq.rnf __angle
+  rnf (Entity_chef __chef) = DeepSeq.rnf __chef
   rnf Entity_EMPTY = ()
 
 instance Default.Default Entity where
@@ -1023,6 +1093,8 @@
         (Hashable.hashWithSalt 16 _dataswarm)
   hashWithSalt __salt (Entity_angle _angle)
     = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 17 _angle)
+  hashWithSalt __salt (Entity_chef _chef)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 18 _chef)
   hashWithSalt __salt Entity_EMPTY
     = Hashable.hashWithSalt __salt (0 :: Prelude.Int)
 
@@ -1507,7 +1579,7 @@
     = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 5 _fbthrift)
   hashWithSalt __salt Annotations_EMPTY
     = Hashable.hashWithSalt __salt (0 :: Prelude.Int)
-{-# LINE 35 "glean/schema/thrift/code_include.hs" #-}
+{-# LINE 37 "glean/schema/thrift/code_include.hs" #-}
 instance Glean.Type Glean.Schema.Code.Types.EntityLanguageSCIP_key
          where
   buildRtsValue b
@@ -1521,13 +1593,13 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "code.EntityLanguageSCIP_key" (Prelude.Just 0))
-{-# LINE 44 "glean/schema/thrift/code_include.hs" #-}
+{-# LINE 46 "glean/schema/thrift/code_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Code.Types.EntityLanguageSCIP_key =
      'Angle.TField "entity" (Glean.Schema.CodeScip.Types.Entity)
        ('Angle.TField "language" (Glean.Schema.Code.Types.Language)
           ('Angle.TNoFields))
-{-# LINE 46 "glean/schema/thrift/code_include.hs" #-}
+{-# LINE 48 "glean/schema/thrift/code_include.hs" #-}
 instance Glean.Predicate Glean.Schema.Code.Types.EntityLanguageSCIP
          where
   type KeyType Glean.Schema.Code.Types.EntityLanguageSCIP =
@@ -1540,14 +1612,14 @@
     = Glean.Schema.Code.Types.EntityLanguageSCIP x k
   getFactKey = Glean.Schema.Code.Types.entityLanguageSCIP_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 55 "glean/schema/thrift/code_include.hs" #-}
+{-# LINE 57 "glean/schema/thrift/code_include.hs" #-}
 instance Glean.Type Glean.Schema.Code.Types.EntityLanguageSCIP
          where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 61 "glean/schema/thrift/code_include.hs" #-}
+{-# LINE 63 "glean/schema/thrift/code_include.hs" #-}
 instance Glean.Type Glean.Schema.Code.Types.EntityLanguage_key
          where
   buildRtsValue b (Glean.Schema.Code.Types.EntityLanguage_key x1 x2)
@@ -1560,13 +1632,13 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "code.EntityLanguage_key" (Prelude.Just 0))
-{-# LINE 70 "glean/schema/thrift/code_include.hs" #-}
+{-# LINE 72 "glean/schema/thrift/code_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Code.Types.EntityLanguage_key =
      'Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
        ('Angle.TField "language" (Glean.Schema.Code.Types.Language)
           ('Angle.TNoFields))
-{-# LINE 72 "glean/schema/thrift/code_include.hs" #-}
+{-# LINE 74 "glean/schema/thrift/code_include.hs" #-}
 instance Glean.Predicate Glean.Schema.Code.Types.EntityLanguage
          where
   type KeyType Glean.Schema.Code.Types.EntityLanguage =
@@ -1579,13 +1651,13 @@
     = Glean.Schema.Code.Types.EntityLanguage x k
   getFactKey = Glean.Schema.Code.Types.entityLanguage_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 81 "glean/schema/thrift/code_include.hs" #-}
+{-# LINE 83 "glean/schema/thrift/code_include.hs" #-}
 instance Glean.Type Glean.Schema.Code.Types.EntityLanguage where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 87 "glean/schema/thrift/code_include.hs" #-}
+{-# LINE 89 "glean/schema/thrift/code_include.hs" #-}
 instance Glean.Type Glean.Schema.Code.Types.EntityLanguageLSIF_key
          where
   buildRtsValue b
@@ -1599,13 +1671,13 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "code.EntityLanguageLSIF_key" (Prelude.Just 0))
-{-# LINE 96 "glean/schema/thrift/code_include.hs" #-}
+{-# LINE 98 "glean/schema/thrift/code_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Code.Types.EntityLanguageLSIF_key =
      'Angle.TField "entity" (Glean.Schema.CodeLsif.Types.Entity)
        ('Angle.TField "language" (Glean.Schema.Code.Types.Language)
           ('Angle.TNoFields))
-{-# LINE 98 "glean/schema/thrift/code_include.hs" #-}
+{-# LINE 100 "glean/schema/thrift/code_include.hs" #-}
 instance Glean.Predicate Glean.Schema.Code.Types.EntityLanguageLSIF
          where
   type KeyType Glean.Schema.Code.Types.EntityLanguageLSIF =
@@ -1618,17 +1690,17 @@
     = Glean.Schema.Code.Types.EntityLanguageLSIF x k
   getFactKey = Glean.Schema.Code.Types.entityLanguageLSIF_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 107 "glean/schema/thrift/code_include.hs" #-}
+{-# LINE 109 "glean/schema/thrift/code_include.hs" #-}
 instance Glean.Type Glean.Schema.Code.Types.EntityLanguageLSIF
          where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 113 "glean/schema/thrift/code_include.hs" #-}
+{-# LINE 115 "glean/schema/thrift/code_include.hs" #-}
 instance Glean.Type Glean.Schema.Code.Types.Entity where
   buildRtsValue b Glean.Schema.Code.Types.Entity_EMPTY
-    = Glean.buildRtsSelector b 17
+    = Glean.buildRtsSelector b 18
   buildRtsValue b (Glean.Schema.Code.Types.Entity_cxx x)
     = do Glean.buildRtsSelector b 0
          Glean.buildRtsValue b x
@@ -1680,6 +1752,9 @@
   buildRtsValue b (Glean.Schema.Code.Types.Entity_angle x)
     = do Glean.buildRtsSelector b 16
          Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Code.Types.Entity_chef x)
+    = do Glean.buildRtsSelector b 17
+         Glean.buildRtsValue b x
   decodeRtsValue
     = Glean.sumD (Prelude.pure Glean.Schema.Code.Types.Entity_EMPTY)
         [Glean.mapD Glean.Schema.Code.Types.Entity_cxx,
@@ -1698,11 +1773,12 @@
          Glean.mapD Glean.Schema.Code.Types.Entity_csharp,
          Glean.mapD Glean.Schema.Code.Types.Entity_graphql,
          Glean.mapD Glean.Schema.Code.Types.Entity_dataswarm,
-         Glean.mapD Glean.Schema.Code.Types.Entity_angle]
+         Glean.mapD Glean.Schema.Code.Types.Entity_angle,
+         Glean.mapD Glean.Schema.Code.Types.Entity_chef]
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "code.Entity" (Prelude.Just 24))
-{-# LINE 189 "glean/schema/thrift/code_include.hs" #-}
+{-# LINE 195 "glean/schema/thrift/code_include.hs" #-}
 type instance Angle.SumFields Glean.Schema.Code.Types.Entity =
      'Angle.TField "cxx" (Glean.Schema.CodeCxx.Types.Entity)
        ('Angle.TField "pp" (Glean.Schema.CodePp.Types.Entity)
@@ -1725,8 +1801,10 @@
                                                     (Glean.Schema.CodeDataswarm.Types.Entity)
                                                     ('Angle.TField "angle"
                                                        (Glean.Schema.CodeAnglelang.Types.Entity)
-                                                       ('Angle.TNoFields)))))))))))))))))
-{-# LINE 191 "glean/schema/thrift/code_include.hs" #-}
+                                                       ('Angle.TField "chef"
+                                                          (Glean.Schema.CodeChef.Types.Entity)
+                                                          ('Angle.TNoFields))))))))))))))))))
+{-# LINE 197 "glean/schema/thrift/code_include.hs" #-}
 instance Glean.Type Glean.Schema.Code.Types.Argument where
   buildRtsValue b Glean.Schema.Code.Types.Argument_EMPTY
     = Glean.buildRtsSelector b 2
@@ -1743,19 +1821,19 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "code.Argument" (Prelude.Just 24))
-{-# LINE 207 "glean/schema/thrift/code_include.hs" #-}
+{-# LINE 213 "glean/schema/thrift/code_include.hs" #-}
 type instance Angle.SumFields Glean.Schema.Code.Types.Argument =
      'Angle.TField "lit" (Data.Text.Text)
        ('Angle.TField "xref" (Glean.Schema.Code.Types.Entity)
           ('Angle.TNoFields))
-{-# LINE 209 "glean/schema/thrift/code_include.hs" #-}
+{-# LINE 215 "glean/schema/thrift/code_include.hs" #-}
 instance Glean.Type Glean.Schema.Code.Types.Language where
   buildRtsValue = Glean.thriftEnum_buildRtsValue
   decodeRtsValue = Glean.thriftEnumD
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "code.Language" (Prelude.Just 24))
-{-# LINE 214 "glean/schema/thrift/code_include.hs" #-}
+{-# LINE 220 "glean/schema/thrift/code_include.hs" #-}
 type instance Angle.SumFields Glean.Schema.Code.Types.Language =
      'Angle.TField "Cpp" (Glean.Schema.Builtin.Types.Unit)
        ('Angle.TField "PreProcessor" (Glean.Schema.Builtin.Types.Unit)
@@ -1789,35 +1867,62 @@
                                                                       (Glean.Schema.Builtin.Types.Unit)
                                                                       ('Angle.TField "Angle"
                                                                          (Glean.Schema.Builtin.Types.Unit)
-                                                                         ('Angle.TNoFields)))))))))))))))))))))))
-{-# LINE 216 "glean/schema/thrift/code_include.hs" #-}
+                                                                         ('Angle.TField "Chef"
+                                                                            (Glean.Schema.Builtin.Types.Unit)
+                                                                            ('Angle.TField "C"
+                                                                               (Glean.Schema.Builtin.Types.Unit)
+                                                                               ('Angle.TField
+                                                                                  "TypeScriptReact"
+                                                                                  (Glean.Schema.Builtin.Types.Unit)
+                                                                                  ('Angle.TField
+                                                                                     "JavaScriptReact"
+                                                                                     (Glean.Schema.Builtin.Types.Unit)
+                                                                                     ('Angle.TField
+                                                                                        "Ruby"
+                                                                                        (Glean.Schema.Builtin.Types.Unit)
+                                                                                        ('Angle.TField
+                                                                                           "VisualBasic"
+                                                                                           (Glean.Schema.Builtin.Types.Unit)
+                                                                                           ('Angle.TField
+                                                                                              "Dart"
+                                                                                              (Glean.Schema.Builtin.Types.Unit)
+                                                                                              ('Angle.TField
+                                                                                                 "PHP"
+                                                                                                 (Glean.Schema.Builtin.Types.Unit)
+                                                                                                 ('Angle.TNoFields)))))))))))))))))))))))))))))))
+{-# LINE 222 "glean/schema/thrift/code_include.hs" #-}
 instance Angle.AngleEnum Glean.Schema.Code.Types.Language where
   type AngleEnumTy Glean.Schema.Code.Types.Language =
        Glean.Schema.Code.Types.Language
   enumName v = Text.pack (Prelude.drop 9 (Prelude.show v))
-{-# LINE 220 "glean/schema/thrift/code_include.hs" #-}
+{-# LINE 226 "glean/schema/thrift/code_include.hs" #-}
 instance Glean.Type Glean.Schema.Code.Types.SymbolId where
   buildRtsValue b Glean.Schema.Code.Types.SymbolId_EMPTY
-    = Glean.buildRtsSelector b 2
+    = Glean.buildRtsSelector b 3
   buildRtsValue b (Glean.Schema.Code.Types.SymbolId_scip x)
     = do Glean.buildRtsSelector b 0
          Glean.buildRtsValue b x
   buildRtsValue b (Glean.Schema.Code.Types.SymbolId_cxx x)
     = do Glean.buildRtsSelector b 1
          Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Code.Types.SymbolId_swift x)
+    = do Glean.buildRtsSelector b 2
+         Glean.buildRtsValue b x
   decodeRtsValue
     = Glean.sumD (Prelude.pure Glean.Schema.Code.Types.SymbolId_EMPTY)
         [Glean.mapD Glean.Schema.Code.Types.SymbolId_scip,
-         Glean.mapD Glean.Schema.Code.Types.SymbolId_cxx]
+         Glean.mapD Glean.Schema.Code.Types.SymbolId_cxx,
+         Glean.mapD Glean.Schema.Code.Types.SymbolId_swift]
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "code.SymbolId" (Prelude.Just 24))
-{-# LINE 236 "glean/schema/thrift/code_include.hs" #-}
+{-# LINE 246 "glean/schema/thrift/code_include.hs" #-}
 type instance Angle.SumFields Glean.Schema.Code.Types.SymbolId =
      'Angle.TField "scip" (Glean.Schema.CodeScip.Types.SymbolId)
        ('Angle.TField "cxx" (Glean.Schema.CodeCxx.Types.SymbolId)
-          ('Angle.TNoFields))
-{-# LINE 238 "glean/schema/thrift/code_include.hs" #-}
+          ('Angle.TField "swift" (Glean.Schema.CodeSwift.Types.SymbolId)
+             ('Angle.TNoFields)))
+{-# LINE 248 "glean/schema/thrift/code_include.hs" #-}
 instance Glean.Type Glean.Schema.Code.Types.CallArgument where
   buildRtsValue b (Glean.Schema.Code.Types.CallArgument x1 x2 x3)
     = do Glean.buildRtsValue b x1
@@ -1830,7 +1935,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "code.CallArgument" (Prelude.Just 24))
-{-# LINE 249 "glean/schema/thrift/code_include.hs" #-}
+{-# LINE 259 "glean/schema/thrift/code_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Code.Types.CallArgument =
      'Angle.TField "label" (Prelude.Maybe Data.Text.Text)
@@ -1838,7 +1943,7 @@
           ('Angle.TField "argument"
              (Prelude.Maybe Glean.Schema.Code.Types.Argument)
              ('Angle.TNoFields)))
-{-# LINE 251 "glean/schema/thrift/code_include.hs" #-}
+{-# LINE 261 "glean/schema/thrift/code_include.hs" #-}
 instance Glean.Type Glean.Schema.Code.Types.IdlEntity where
   buildRtsValue b (Glean.Schema.Code.Types.IdlEntity x1 x2 x3 x4)
     = do Glean.buildRtsValue b x1
@@ -1853,7 +1958,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "code.IdlEntity" (Prelude.Just 24))
-{-# LINE 264 "glean/schema/thrift/code_include.hs" #-}
+{-# LINE 274 "glean/schema/thrift/code_include.hs" #-}
 type instance Angle.RecordFields Glean.Schema.Code.Types.IdlEntity
      =
      'Angle.TField "lang" (Glean.Schema.Code.Types.Language)
@@ -1862,7 +1967,7 @@
              (Prelude.Maybe Glean.Schema.Code.Types.Entity)
              ('Angle.TField "range" (Prelude.Maybe Glean.Schema.Src.Types.Range)
                 ('Angle.TNoFields))))
-{-# LINE 266 "glean/schema/thrift/code_include.hs" #-}
+{-# LINE 276 "glean/schema/thrift/code_include.hs" #-}
 instance Glean.Type Glean.Schema.Code.Types.Annotations where
   buildRtsValue b Glean.Schema.Code.Types.Annotations_EMPTY
     = Glean.buildRtsSelector b 5
@@ -1892,7 +1997,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "code.Annotations" (Prelude.Just 24))
-{-# LINE 294 "glean/schema/thrift/code_include.hs" #-}
+{-# LINE 304 "glean/schema/thrift/code_include.hs" #-}
 type instance Angle.SumFields Glean.Schema.Code.Types.Annotations =
      'Angle.TField "cxx" (Glean.Schema.CodeCxx.Types.Annotations)
        ('Angle.TField "java" (Glean.Schema.CodeJava.Types.Annotations)
diff --git a/glean/schema/thrift/gen-hs2/Glean/Schema/CodeChef/Types.hs b/glean/schema/thrift/gen-hs2/Glean/Schema/CodeChef/Types.hs
new file mode 100644
--- /dev/null
+++ b/glean/schema/thrift/gen-hs2/Glean/Schema/CodeChef/Types.hs
@@ -0,0 +1,132 @@
+-----------------------------------------------------------------
+-- Autogenerated by Thrift
+--
+-- DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+--  @generated
+-----------------------------------------------------------------
+{-# LINE 2 "glean/schema/thrift/code_chef_include.hs" #-}
+{-# LANGUAGE TypeFamilies, MultiParamTypeClasses, DataKinds #-}
+{-# LINE 3 "glean/schema/thrift/code_chef_include.hs" #-}
+{-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-}
+{-# LINE 4 "glean/schema/thrift/code_chef_include.hs" #-}
+{-# LANGUAGE UndecidableInstances #-}
+{-# LINE 14 ".build/def/codegen/thrift-schema-hs/glean/schema/thrift/gen-hs2/Glean/Schema/CodeChef/Types.hs" #-}
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE BangPatterns #-}
+{-# OPTIONS_GHC -fno-warn-unused-imports#-}
+{-# OPTIONS_GHC -fno-warn-overlapping-patterns#-}
+{-# OPTIONS_GHC -fno-warn-incomplete-patterns#-}
+{-# OPTIONS_GHC -fno-warn-incomplete-uni-patterns#-}
+{-# OPTIONS_GHC -fno-warn-incomplete-record-updates#-}
+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
+module Glean.Schema.CodeChef.Types
+       (pREDICATE_VERSIONS, Entity(Entity_EMPTY, Entity_symbol)) where
+import qualified Control.DeepSeq as DeepSeq
+import qualified Control.Exception as Exception
+import qualified Data.Aeson as Aeson
+import qualified Data.Aeson.Types as Aeson
+import qualified Data.Default as Default
+import qualified Data.HashMap.Strict as HashMap
+import qualified Data.Hashable as Hashable
+import qualified Data.Int as Int
+import qualified Data.List as List
+import qualified Data.Map.Strict as Map
+import qualified Data.Ord as Ord
+import qualified Data.Text as Text
+import qualified Data.Text.Encoding as Text
+import qualified Facebook.Thrift.Annotation.Thrift.Thrift.Types
+       as Facebook.Thrift.Annotation.Thrift.Thrift
+import qualified Glean.Schema.Builtin.Types as Glean.Schema.Builtin
+import qualified Glean.Schema.Chef.Types as Glean.Schema.Chef
+import qualified Glean.Types as Glean
+import qualified Prelude as Prelude
+import qualified Rust.Types as Rust
+import qualified Thrift.CodegenTypesOnly as Thrift
+import Data.Aeson ((.:), (.=))
+import Data.Monoid ((<>))
+import Prelude ((.), (<$>), (<*>), (>>=), (==), (++))
+{-# LINE 5 "glean/schema/thrift/code_chef_include.hs" #-}
+import qualified Data.ByteString
+{-# LINE 6 "glean/schema/thrift/code_chef_include.hs" #-}
+import qualified Data.Default
+{-# LINE 7 "glean/schema/thrift/code_chef_include.hs" #-}
+import qualified Data.Text
+{-# LINE 9 "glean/schema/thrift/code_chef_include.hs" #-}
+import qualified Glean.Types as Glean
+{-# LINE 10 "glean/schema/thrift/code_chef_include.hs" #-}
+import qualified Glean.Typed as Glean
+{-# LINE 11 "glean/schema/thrift/code_chef_include.hs" #-}
+import qualified Glean.Query.Angle as Angle
+{-# LINE 12 "glean/schema/thrift/code_chef_include.hs" #-}
+import qualified Glean.Angle.Types as Angle
+{-# LINE 14 "glean/schema/thrift/code_chef_include.hs" #-}
+import qualified Glean.Schema.Builtin.Types
+{-# LINE 15 "glean/schema/thrift/code_chef_include.hs" #-}
+import qualified Glean.Schema.Chef.Types
+{-# LINE 67 ".build/def/codegen/thrift-schema-hs/glean/schema/thrift/gen-hs2/Glean/Schema/CodeChef/Types.hs" #-}
+
+pREDICATE_VERSIONS :: Map.Map Text.Text Int.Int64
+pREDICATE_VERSIONS = Map.fromList []
+
+data Entity = Entity_symbol Glean.Schema.Chef.Symbol
+            | Entity_EMPTY
+              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Entity where
+  toJSON (Entity_symbol __symbol)
+    = Aeson.object ["symbol" .= __symbol]
+  toJSON Entity_EMPTY = Aeson.object []
+
+instance Thrift.ThriftStruct Entity where
+  buildStruct _proxy (Entity_symbol __symbol)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "symbol" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __symbol)]
+  buildStruct _proxy Entity_EMPTY = Thrift.genStruct _proxy []
+  parseStruct _proxy
+    = do _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap
+         case _fieldBegin of
+           Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                     1 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return (Entity_symbol _val)
+                                                     _ -> do Thrift.parseSkip _proxy _type
+                                                               Prelude.Nothing
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return Entity_EMPTY
+           Thrift.FieldEnd -> Prelude.return Entity_EMPTY
+    where
+      _idMap = HashMap.fromList [("symbol", 1)]
+
+instance DeepSeq.NFData Entity where
+  rnf (Entity_symbol __symbol) = DeepSeq.rnf __symbol
+  rnf Entity_EMPTY = ()
+
+instance Default.Default Entity where
+  def = Entity_EMPTY
+
+instance Hashable.Hashable Entity where
+  hashWithSalt __salt (Entity_symbol _symbol)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 1 _symbol)
+  hashWithSalt __salt Entity_EMPTY
+    = Hashable.hashWithSalt __salt (0 :: Prelude.Int)
+{-# LINE 18 "glean/schema/thrift/code_chef_include.hs" #-}
+instance Glean.Type Glean.Schema.CodeChef.Types.Entity where
+  buildRtsValue b Glean.Schema.CodeChef.Types.Entity_EMPTY
+    = Glean.buildRtsSelector b 1
+  buildRtsValue b (Glean.Schema.CodeChef.Types.Entity_symbol x)
+    = do Glean.buildRtsSelector b 0
+         Glean.buildRtsValue b x
+  decodeRtsValue
+    = Glean.sumD
+        (Prelude.pure Glean.Schema.CodeChef.Types.Entity_EMPTY)
+        [Glean.mapD Glean.Schema.CodeChef.Types.Entity_symbol]
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "code.chef.Entity" (Prelude.Just 1))
+{-# LINE 30 "glean/schema/thrift/code_chef_include.hs" #-}
+type instance Angle.SumFields Glean.Schema.CodeChef.Types.Entity =
+     'Angle.TField "symbol"
+       (Glean.KeyType Glean.Schema.Chef.Types.Symbol)
+       ('Angle.TNoFields)
diff --git a/glean/schema/thrift/gen-hs2/Glean/Schema/CodeScip/Types.hs b/glean/schema/thrift/gen-hs2/Glean/Schema/CodeScip/Types.hs
--- a/glean/schema/thrift/gen-hs2/Glean/Schema/CodeScip/Types.hs
+++ b/glean/schema/thrift/gen-hs2/Glean/Schema/CodeScip/Types.hs
@@ -22,7 +22,10 @@
 module Glean.Schema.CodeScip.Types
        (pREDICATE_VERSIONS, SymbolId,
         Entity(Entity_EMPTY, Entity_rust, Entity_go, Entity_typescript,
-               Entity_java, Entity_kotlin, Entity_swift))
+               Entity_java, Entity_kotlin, Entity_swift, Entity_python,
+               Entity_typescriptReact, Entity_javascript, Entity_javascriptReact,
+               Entity_c, Entity_cpp, Entity_ruby, Entity_csharp,
+               Entity_visualBasic, Entity_dart, Entity_php))
        where
 import qualified Control.DeepSeq as DeepSeq
 import qualified Control.Exception as Exception
@@ -66,7 +69,7 @@
 import qualified Glean.Schema.Builtin.Types
 {-# LINE 15 "glean/schema/thrift/code_scip_include.hs" #-}
 import qualified Glean.Schema.Scip.Types
-{-# LINE 70 ".build/def/codegen/thrift-schema-hs/glean/schema/thrift/gen-hs2/Glean/Schema/CodeScip/Types.hs" #-}
+{-# LINE 73 ".build/def/codegen/thrift-schema-hs/glean/schema/thrift/gen-hs2/Glean/Schema/CodeScip/Types.hs" #-}
 
 pREDICATE_VERSIONS :: Map.Map Text.Text Int.Int64
 pREDICATE_VERSIONS = Map.fromList []
@@ -79,6 +82,17 @@
             | Entity_java Glean.Schema.Scip.SomeEntity
             | Entity_kotlin Glean.Schema.Scip.SomeEntity
             | Entity_swift Glean.Schema.Scip.SomeEntity
+            | Entity_python Glean.Schema.Scip.SomeEntity
+            | Entity_typescriptReact Glean.Schema.Scip.SomeEntity
+            | Entity_javascript Glean.Schema.Scip.SomeEntity
+            | Entity_javascriptReact Glean.Schema.Scip.SomeEntity
+            | Entity_c Glean.Schema.Scip.SomeEntity
+            | Entity_cpp Glean.Schema.Scip.SomeEntity
+            | Entity_ruby Glean.Schema.Scip.SomeEntity
+            | Entity_csharp Glean.Schema.Scip.SomeEntity
+            | Entity_visualBasic Glean.Schema.Scip.SomeEntity
+            | Entity_dart Glean.Schema.Scip.SomeEntity
+            | Entity_php Glean.Schema.Scip.SomeEntity
             | Entity_EMPTY
               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
 
@@ -91,6 +105,23 @@
   toJSON (Entity_kotlin __kotlin)
     = Aeson.object ["kotlin" .= __kotlin]
   toJSON (Entity_swift __swift) = Aeson.object ["swift" .= __swift]
+  toJSON (Entity_python __python)
+    = Aeson.object ["python" .= __python]
+  toJSON (Entity_typescriptReact __typescriptReact)
+    = Aeson.object ["typescriptReact" .= __typescriptReact]
+  toJSON (Entity_javascript __javascript)
+    = Aeson.object ["javascript" .= __javascript]
+  toJSON (Entity_javascriptReact __javascriptReact)
+    = Aeson.object ["javascriptReact" .= __javascriptReact]
+  toJSON (Entity_c __c) = Aeson.object ["c" .= __c]
+  toJSON (Entity_cpp __cpp) = Aeson.object ["cpp" .= __cpp]
+  toJSON (Entity_ruby __ruby) = Aeson.object ["ruby" .= __ruby]
+  toJSON (Entity_csharp __csharp)
+    = Aeson.object ["csharp" .= __csharp]
+  toJSON (Entity_visualBasic __visualBasic)
+    = Aeson.object ["visualBasic" .= __visualBasic]
+  toJSON (Entity_dart __dart) = Aeson.object ["dart" .= __dart]
+  toJSON (Entity_php __php) = Aeson.object ["php" .= __php]
   toJSON Entity_EMPTY = Aeson.object []
 
 instance Thrift.ThriftStruct Entity where
@@ -120,6 +151,60 @@
     = Thrift.genStruct _proxy
         [Thrift.genField _proxy "swift" (Thrift.getStructType _proxy) 6 0
            (Thrift.buildStruct _proxy __swift)]
+  buildStruct _proxy (Entity_python __python)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "python" (Thrift.getStructType _proxy) 7 0
+           (Thrift.buildStruct _proxy __python)]
+  buildStruct _proxy (Entity_typescriptReact __typescriptReact)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "typescriptReact"
+           (Thrift.getStructType _proxy)
+           8
+           0
+           (Thrift.buildStruct _proxy __typescriptReact)]
+  buildStruct _proxy (Entity_javascript __javascript)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "javascript" (Thrift.getStructType _proxy)
+           9
+           0
+           (Thrift.buildStruct _proxy __javascript)]
+  buildStruct _proxy (Entity_javascriptReact __javascriptReact)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "javascriptReact"
+           (Thrift.getStructType _proxy)
+           10
+           0
+           (Thrift.buildStruct _proxy __javascriptReact)]
+  buildStruct _proxy (Entity_c __c)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "c" (Thrift.getStructType _proxy) 11 0
+           (Thrift.buildStruct _proxy __c)]
+  buildStruct _proxy (Entity_cpp __cpp)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "cpp" (Thrift.getStructType _proxy) 12 0
+           (Thrift.buildStruct _proxy __cpp)]
+  buildStruct _proxy (Entity_ruby __ruby)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "ruby" (Thrift.getStructType _proxy) 13 0
+           (Thrift.buildStruct _proxy __ruby)]
+  buildStruct _proxy (Entity_csharp __csharp)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "csharp" (Thrift.getStructType _proxy) 14 0
+           (Thrift.buildStruct _proxy __csharp)]
+  buildStruct _proxy (Entity_visualBasic __visualBasic)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "visualBasic" (Thrift.getStructType _proxy)
+           15
+           0
+           (Thrift.buildStruct _proxy __visualBasic)]
+  buildStruct _proxy (Entity_dart __dart)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "dart" (Thrift.getStructType _proxy) 16 0
+           (Thrift.buildStruct _proxy __dart)]
+  buildStruct _proxy (Entity_php __php)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "php" (Thrift.getStructType _proxy) 17 0
+           (Thrift.buildStruct _proxy __php)]
   buildStruct _proxy Entity_EMPTY = Thrift.genStruct _proxy []
   parseStruct _proxy
     = do _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap
@@ -149,6 +234,53 @@
                                                          do _val <- Thrift.parseStruct _proxy
                                                             Thrift.parseStop _proxy
                                                             Prelude.return (Entity_swift _val)
+                                                     7 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return (Entity_python _val)
+                                                     8 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (Entity_typescriptReact _val)
+                                                     9 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return (Entity_javascript _val)
+                                                     10 | _type == Thrift.getStructType _proxy ->
+                                                          do _val <- Thrift.parseStruct _proxy
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return
+                                                               (Entity_javascriptReact _val)
+                                                     11 | _type == Thrift.getStructType _proxy ->
+                                                          do _val <- Thrift.parseStruct _proxy
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return (Entity_c _val)
+                                                     12 | _type == Thrift.getStructType _proxy ->
+                                                          do _val <- Thrift.parseStruct _proxy
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return (Entity_cpp _val)
+                                                     13 | _type == Thrift.getStructType _proxy ->
+                                                          do _val <- Thrift.parseStruct _proxy
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return (Entity_ruby _val)
+                                                     14 | _type == Thrift.getStructType _proxy ->
+                                                          do _val <- Thrift.parseStruct _proxy
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return (Entity_csharp _val)
+                                                     15 | _type == Thrift.getStructType _proxy ->
+                                                          do _val <- Thrift.parseStruct _proxy
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return
+                                                               (Entity_visualBasic _val)
+                                                     16 | _type == Thrift.getStructType _proxy ->
+                                                          do _val <- Thrift.parseStruct _proxy
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return (Entity_dart _val)
+                                                     17 | _type == Thrift.getStructType _proxy ->
+                                                          do _val <- Thrift.parseStruct _proxy
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return (Entity_php _val)
                                                      _ -> do Thrift.parseSkip _proxy _type
                                                                Prelude.Nothing
                                                              Thrift.parseStop _proxy
@@ -158,7 +290,10 @@
       _idMap
         = HashMap.fromList
             [("rust", 1), ("go", 2), ("typescript", 3), ("java", 4),
-             ("kotlin", 5), ("swift", 6)]
+             ("kotlin", 5), ("swift", 6), ("python", 7), ("typescriptReact", 8),
+             ("javascript", 9), ("javascriptReact", 10), ("c", 11), ("cpp", 12),
+             ("ruby", 13), ("csharp", 14), ("visualBasic", 15), ("dart", 16),
+             ("php", 17)]
 
 instance DeepSeq.NFData Entity where
   rnf (Entity_rust __rust) = DeepSeq.rnf __rust
@@ -167,6 +302,19 @@
   rnf (Entity_java __java) = DeepSeq.rnf __java
   rnf (Entity_kotlin __kotlin) = DeepSeq.rnf __kotlin
   rnf (Entity_swift __swift) = DeepSeq.rnf __swift
+  rnf (Entity_python __python) = DeepSeq.rnf __python
+  rnf (Entity_typescriptReact __typescriptReact)
+    = DeepSeq.rnf __typescriptReact
+  rnf (Entity_javascript __javascript) = DeepSeq.rnf __javascript
+  rnf (Entity_javascriptReact __javascriptReact)
+    = DeepSeq.rnf __javascriptReact
+  rnf (Entity_c __c) = DeepSeq.rnf __c
+  rnf (Entity_cpp __cpp) = DeepSeq.rnf __cpp
+  rnf (Entity_ruby __ruby) = DeepSeq.rnf __ruby
+  rnf (Entity_csharp __csharp) = DeepSeq.rnf __csharp
+  rnf (Entity_visualBasic __visualBasic) = DeepSeq.rnf __visualBasic
+  rnf (Entity_dart __dart) = DeepSeq.rnf __dart
+  rnf (Entity_php __php) = DeepSeq.rnf __php
   rnf Entity_EMPTY = ()
 
 instance Default.Default Entity where
@@ -186,12 +334,38 @@
     = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 5 _kotlin)
   hashWithSalt __salt (Entity_swift _swift)
     = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 6 _swift)
+  hashWithSalt __salt (Entity_python _python)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 7 _python)
+  hashWithSalt __salt (Entity_typescriptReact _typescriptReact)
+    = Hashable.hashWithSalt __salt
+        (Hashable.hashWithSalt 8 _typescriptReact)
+  hashWithSalt __salt (Entity_javascript _javascript)
+    = Hashable.hashWithSalt __salt
+        (Hashable.hashWithSalt 9 _javascript)
+  hashWithSalt __salt (Entity_javascriptReact _javascriptReact)
+    = Hashable.hashWithSalt __salt
+        (Hashable.hashWithSalt 10 _javascriptReact)
+  hashWithSalt __salt (Entity_c _c)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 11 _c)
+  hashWithSalt __salt (Entity_cpp _cpp)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 12 _cpp)
+  hashWithSalt __salt (Entity_ruby _ruby)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 13 _ruby)
+  hashWithSalt __salt (Entity_csharp _csharp)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 14 _csharp)
+  hashWithSalt __salt (Entity_visualBasic _visualBasic)
+    = Hashable.hashWithSalt __salt
+        (Hashable.hashWithSalt 15 _visualBasic)
+  hashWithSalt __salt (Entity_dart _dart)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 16 _dart)
+  hashWithSalt __salt (Entity_php _php)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 17 _php)
   hashWithSalt __salt Entity_EMPTY
     = Hashable.hashWithSalt __salt (0 :: Prelude.Int)
 {-# LINE 18 "glean/schema/thrift/code_scip_include.hs" #-}
 instance Glean.Type Glean.Schema.CodeScip.Types.Entity where
   buildRtsValue b Glean.Schema.CodeScip.Types.Entity_EMPTY
-    = Glean.buildRtsSelector b 6
+    = Glean.buildRtsSelector b 17
   buildRtsValue b (Glean.Schema.CodeScip.Types.Entity_rust x)
     = do Glean.buildRtsSelector b 0
          Glean.buildRtsValue b x
@@ -210,6 +384,41 @@
   buildRtsValue b (Glean.Schema.CodeScip.Types.Entity_swift x)
     = do Glean.buildRtsSelector b 5
          Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.CodeScip.Types.Entity_python x)
+    = do Glean.buildRtsSelector b 6
+         Glean.buildRtsValue b x
+  buildRtsValue b
+    (Glean.Schema.CodeScip.Types.Entity_typescriptReact x)
+    = do Glean.buildRtsSelector b 7
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.CodeScip.Types.Entity_javascript x)
+    = do Glean.buildRtsSelector b 8
+         Glean.buildRtsValue b x
+  buildRtsValue b
+    (Glean.Schema.CodeScip.Types.Entity_javascriptReact x)
+    = do Glean.buildRtsSelector b 9
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.CodeScip.Types.Entity_c x)
+    = do Glean.buildRtsSelector b 10
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.CodeScip.Types.Entity_cpp x)
+    = do Glean.buildRtsSelector b 11
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.CodeScip.Types.Entity_ruby x)
+    = do Glean.buildRtsSelector b 12
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.CodeScip.Types.Entity_csharp x)
+    = do Glean.buildRtsSelector b 13
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.CodeScip.Types.Entity_visualBasic x)
+    = do Glean.buildRtsSelector b 14
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.CodeScip.Types.Entity_dart x)
+    = do Glean.buildRtsSelector b 15
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.CodeScip.Types.Entity_php x)
+    = do Glean.buildRtsSelector b 16
+         Glean.buildRtsValue b x
   decodeRtsValue
     = Glean.sumD
         (Prelude.pure Glean.Schema.CodeScip.Types.Entity_EMPTY)
@@ -218,11 +427,22 @@
          Glean.mapD Glean.Schema.CodeScip.Types.Entity_typescript,
          Glean.mapD Glean.Schema.CodeScip.Types.Entity_java,
          Glean.mapD Glean.Schema.CodeScip.Types.Entity_kotlin,
-         Glean.mapD Glean.Schema.CodeScip.Types.Entity_swift]
+         Glean.mapD Glean.Schema.CodeScip.Types.Entity_swift,
+         Glean.mapD Glean.Schema.CodeScip.Types.Entity_python,
+         Glean.mapD Glean.Schema.CodeScip.Types.Entity_typescriptReact,
+         Glean.mapD Glean.Schema.CodeScip.Types.Entity_javascript,
+         Glean.mapD Glean.Schema.CodeScip.Types.Entity_javascriptReact,
+         Glean.mapD Glean.Schema.CodeScip.Types.Entity_c,
+         Glean.mapD Glean.Schema.CodeScip.Types.Entity_cpp,
+         Glean.mapD Glean.Schema.CodeScip.Types.Entity_ruby,
+         Glean.mapD Glean.Schema.CodeScip.Types.Entity_csharp,
+         Glean.mapD Glean.Schema.CodeScip.Types.Entity_visualBasic,
+         Glean.mapD Glean.Schema.CodeScip.Types.Entity_dart,
+         Glean.mapD Glean.Schema.CodeScip.Types.Entity_php]
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "code.scip.Entity" (Prelude.Just 1))
-{-# LINE 50 "glean/schema/thrift/code_scip_include.hs" #-}
+{-# LINE 94 "glean/schema/thrift/code_scip_include.hs" #-}
 type instance Angle.SumFields Glean.Schema.CodeScip.Types.Entity =
      'Angle.TField "rust" (Glean.Schema.Scip.Types.SomeEntity)
        ('Angle.TField "go" (Glean.Schema.Scip.Types.SomeEntity)
@@ -230,4 +450,21 @@
              ('Angle.TField "java" (Glean.Schema.Scip.Types.SomeEntity)
                 ('Angle.TField "kotlin" (Glean.Schema.Scip.Types.SomeEntity)
                    ('Angle.TField "swift" (Glean.Schema.Scip.Types.SomeEntity)
-                      ('Angle.TNoFields))))))
+                      ('Angle.TField "python" (Glean.Schema.Scip.Types.SomeEntity)
+                         ('Angle.TField "typescriptReact"
+                            (Glean.Schema.Scip.Types.SomeEntity)
+                            ('Angle.TField "javascript" (Glean.Schema.Scip.Types.SomeEntity)
+                               ('Angle.TField "javascriptReact"
+                                  (Glean.Schema.Scip.Types.SomeEntity)
+                                  ('Angle.TField "c" (Glean.Schema.Scip.Types.SomeEntity)
+                                     ('Angle.TField "cpp" (Glean.Schema.Scip.Types.SomeEntity)
+                                        ('Angle.TField "ruby" (Glean.Schema.Scip.Types.SomeEntity)
+                                           ('Angle.TField "csharp"
+                                              (Glean.Schema.Scip.Types.SomeEntity)
+                                              ('Angle.TField "visualBasic"
+                                                 (Glean.Schema.Scip.Types.SomeEntity)
+                                                 ('Angle.TField "dart"
+                                                    (Glean.Schema.Scip.Types.SomeEntity)
+                                                    ('Angle.TField "php"
+                                                       (Glean.Schema.Scip.Types.SomeEntity)
+                                                       ('Angle.TNoFields)))))))))))))))))
diff --git a/glean/schema/thrift/gen-hs2/Glean/Schema/CodeSwift/Types.hs b/glean/schema/thrift/gen-hs2/Glean/Schema/CodeSwift/Types.hs
new file mode 100644
--- /dev/null
+++ b/glean/schema/thrift/gen-hs2/Glean/Schema/CodeSwift/Types.hs
@@ -0,0 +1,60 @@
+-----------------------------------------------------------------
+-- Autogenerated by Thrift
+--
+-- DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+--  @generated
+-----------------------------------------------------------------
+{-# LINE 2 "glean/schema/thrift/code_swift_include.hs" #-}
+{-# LANGUAGE TypeFamilies, MultiParamTypeClasses, DataKinds #-}
+{-# LINE 3 "glean/schema/thrift/code_swift_include.hs" #-}
+{-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-}
+{-# LINE 4 "glean/schema/thrift/code_swift_include.hs" #-}
+{-# LANGUAGE UndecidableInstances #-}
+{-# LINE 14 ".build/def/codegen/thrift-schema-hs/glean/schema/thrift/gen-hs2/Glean/Schema/CodeSwift/Types.hs" #-}
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE BangPatterns #-}
+{-# OPTIONS_GHC -fno-warn-unused-imports#-}
+{-# OPTIONS_GHC -fno-warn-overlapping-patterns#-}
+{-# OPTIONS_GHC -fno-warn-incomplete-patterns#-}
+{-# OPTIONS_GHC -fno-warn-incomplete-uni-patterns#-}
+{-# OPTIONS_GHC -fno-warn-incomplete-record-updates#-}
+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
+module Glean.Schema.CodeSwift.Types (pREDICATE_VERSIONS, SymbolId)
+       where
+import qualified Data.Default as Default
+import qualified Data.Int as Int
+import qualified Data.Map.Strict as Map
+import qualified Data.Text as Text
+import qualified Data.Text.Encoding as Text
+import qualified Facebook.Thrift.Annotation.Thrift.Thrift.Types
+       as Facebook.Thrift.Annotation.Thrift.Thrift
+import qualified Glean.Schema.Builtin.Types as Glean.Schema.Builtin
+import qualified Glean.Schema.Scip.Types as Glean.Schema.Scip
+import qualified Glean.Types as Glean
+import qualified Prelude as Prelude
+import qualified Rust.Types as Rust
+import qualified Thrift.CodegenTypesOnly as Thrift
+{-# LINE 5 "glean/schema/thrift/code_swift_include.hs" #-}
+import qualified Data.ByteString
+{-# LINE 6 "glean/schema/thrift/code_swift_include.hs" #-}
+import qualified Data.Default
+{-# LINE 7 "glean/schema/thrift/code_swift_include.hs" #-}
+import qualified Data.Text
+{-# LINE 9 "glean/schema/thrift/code_swift_include.hs" #-}
+import qualified Glean.Types as Glean
+{-# LINE 10 "glean/schema/thrift/code_swift_include.hs" #-}
+import qualified Glean.Typed as Glean
+{-# LINE 11 "glean/schema/thrift/code_swift_include.hs" #-}
+import qualified Glean.Query.Angle as Angle
+{-# LINE 12 "glean/schema/thrift/code_swift_include.hs" #-}
+import qualified Glean.Angle.Types as Angle
+{-# LINE 14 "glean/schema/thrift/code_swift_include.hs" #-}
+import qualified Glean.Schema.Builtin.Types
+{-# LINE 15 "glean/schema/thrift/code_swift_include.hs" #-}
+import qualified Glean.Schema.Scip.Types
+{-# LINE 56 ".build/def/codegen/thrift-schema-hs/glean/schema/thrift/gen-hs2/Glean/Schema/CodeSwift/Types.hs" #-}
+
+pREDICATE_VERSIONS :: Map.Map Text.Text Int.Int64
+pREDICATE_VERSIONS = Map.fromList []
+
+type SymbolId = Glean.Schema.Scip.Symbol
diff --git a/glean/schema/thrift/gen-hs2/Glean/Schema/CodemarkupChef/Types.hs b/glean/schema/thrift/gen-hs2/Glean/Schema/CodemarkupChef/Types.hs
new file mode 100644
--- /dev/null
+++ b/glean/schema/thrift/gen-hs2/Glean/Schema/CodemarkupChef/Types.hs
@@ -0,0 +1,990 @@
+-----------------------------------------------------------------
+-- Autogenerated by Thrift
+--
+-- DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+--  @generated
+-----------------------------------------------------------------
+{-# LINE 2 "glean/schema/thrift/codemarkup_chef_include.hs" #-}
+{-# LANGUAGE TypeFamilies, MultiParamTypeClasses, DataKinds #-}
+{-# LINE 3 "glean/schema/thrift/codemarkup_chef_include.hs" #-}
+{-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-}
+{-# LINE 4 "glean/schema/thrift/codemarkup_chef_include.hs" #-}
+{-# LANGUAGE UndecidableInstances #-}
+{-# LINE 14 ".build/def/codegen/thrift-schema-hs/glean/schema/thrift/gen-hs2/Glean/Schema/CodemarkupChef/Types.hs" #-}
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE BangPatterns #-}
+{-# OPTIONS_GHC -fno-warn-unused-imports#-}
+{-# OPTIONS_GHC -fno-warn-overlapping-patterns#-}
+{-# OPTIONS_GHC -fno-warn-incomplete-patterns#-}
+{-# OPTIONS_GHC -fno-warn-incomplete-uni-patterns#-}
+{-# OPTIONS_GHC -fno-warn-incomplete-record-updates#-}
+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
+module Glean.Schema.CodemarkupChef.Types
+       (pREDICATE_VERSIONS, ChefResolveLocation_id,
+        ChefResolveLocation(ChefResolveLocation, chefResolveLocation_id,
+                            chefResolveLocation_key),
+        ChefFileEntityXRefLocations_id,
+        ChefFileEntityXRefLocations(ChefFileEntityXRefLocations,
+                                    chefFileEntityXRefLocations_id,
+                                    chefFileEntityXRefLocations_key),
+        ChefEntityUses_id,
+        ChefEntityUses(ChefEntityUses, chefEntityUses_id,
+                       chefEntityUses_key),
+        ChefEntityLocation_id,
+        ChefEntityLocation(ChefEntityLocation, chefEntityLocation_id,
+                           chefEntityLocation_key),
+        ChefResolveLocation_key(ChefResolveLocation_key,
+                                chefResolveLocation_key_location, chefResolveLocation_key_entity),
+        ChefFileEntityXRefLocations_key(ChefFileEntityXRefLocations_key,
+                                        chefFileEntityXRefLocations_key_file,
+                                        chefFileEntityXRefLocations_key_xref,
+                                        chefFileEntityXRefLocations_key_entity),
+        ChefEntityUses_key(ChefEntityUses_key, chefEntityUses_key_target,
+                           chefEntityUses_key_file, chefEntityUses_key_range),
+        ChefEntityLocation_key(ChefEntityLocation_key,
+                               chefEntityLocation_key_entity, chefEntityLocation_key_location))
+       where
+import qualified Control.DeepSeq as DeepSeq
+import qualified Control.Monad as Monad
+import qualified Control.Monad.ST.Trans as ST
+import qualified Control.Monad.Trans.Class as Trans
+import qualified Data.Aeson as Aeson
+import qualified Data.Aeson.Types as Aeson
+import qualified Data.Default as Default
+import qualified Data.HashMap.Strict as HashMap
+import qualified Data.Hashable as Hashable
+import qualified Data.Int as Int
+import qualified Data.List as List
+import qualified Data.Map.Strict as Map
+import qualified Data.Ord as Ord
+import qualified Data.Text as Text
+import qualified Data.Text.Encoding as Text
+import qualified Facebook.Thrift.Annotation.Thrift.Thrift.Types
+       as Facebook.Thrift.Annotation.Thrift.Thrift
+import qualified Glean.Schema.Builtin.Types as Glean.Schema.Builtin
+import qualified Glean.Schema.CodeChef.Types
+       as Glean.Schema.CodeChef
+import qualified Glean.Schema.CodemarkupTypes.Types
+       as Glean.Schema.CodemarkupTypes
+import qualified Glean.Schema.Src.Types as Glean.Schema.Src
+import qualified Glean.Types as Glean
+import qualified Prelude as Prelude
+import qualified Rust.Types as Rust
+import qualified Thrift.Binary.Parser as Parser
+import qualified Thrift.CodegenTypesOnly as Thrift
+import Control.Applicative ((<|>), (*>), (<*))
+import Data.Aeson ((.:), (.:?), (.=), (.!=))
+import Data.Monoid ((<>))
+import Prelude ((.), (<$>), (<*>), (>>=), (==), (/=), (<), (++))
+{-# LINE 5 "glean/schema/thrift/codemarkup_chef_include.hs" #-}
+import qualified Data.ByteString
+{-# LINE 6 "glean/schema/thrift/codemarkup_chef_include.hs" #-}
+import qualified Data.Default
+{-# LINE 7 "glean/schema/thrift/codemarkup_chef_include.hs" #-}
+import qualified Data.Text
+{-# LINE 9 "glean/schema/thrift/codemarkup_chef_include.hs" #-}
+import qualified Glean.Types as Glean
+{-# LINE 10 "glean/schema/thrift/codemarkup_chef_include.hs" #-}
+import qualified Glean.Typed as Glean
+{-# LINE 11 "glean/schema/thrift/codemarkup_chef_include.hs" #-}
+import qualified Glean.Query.Angle as Angle
+{-# LINE 12 "glean/schema/thrift/codemarkup_chef_include.hs" #-}
+import qualified Glean.Angle.Types as Angle
+{-# LINE 14 "glean/schema/thrift/codemarkup_chef_include.hs" #-}
+import qualified Glean.Schema.Builtin.Types
+{-# LINE 15 "glean/schema/thrift/codemarkup_chef_include.hs" #-}
+import qualified Glean.Schema.CodeChef.Types
+{-# LINE 16 "glean/schema/thrift/codemarkup_chef_include.hs" #-}
+import qualified Glean.Schema.CodemarkupTypes.Types
+{-# LINE 17 "glean/schema/thrift/codemarkup_chef_include.hs" #-}
+import qualified Glean.Schema.Src.Types
+{-# LINE 102 ".build/def/codegen/thrift-schema-hs/glean/schema/thrift/gen-hs2/Glean/Schema/CodemarkupChef/Types.hs" #-}
+
+pREDICATE_VERSIONS :: Map.Map Text.Text Int.Int64
+pREDICATE_VERSIONS
+  = Map.fromList
+      [("ChefFileEntityXRefLocations", 1), ("ChefEntityLocation", 1),
+       ("ChefResolveLocation", 1), ("ChefEntityUses", 1)]
+
+type ChefResolveLocation_id = Glean.Id
+
+data ChefResolveLocation = ChefResolveLocation{chefResolveLocation_id
+                                               :: {-# UNPACK #-} !ChefResolveLocation_id,
+                                               chefResolveLocation_key ::
+                                               Prelude.Maybe ChefResolveLocation_key}
+                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ChefResolveLocation where
+  toJSON (ChefResolveLocation __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct ChefResolveLocation where
+  buildStruct _proxy (ChefResolveLocation __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (ChefResolveLocation __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ChefResolveLocation where
+  rnf (ChefResolveLocation __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default ChefResolveLocation where
+  def = ChefResolveLocation Default.def Prelude.Nothing
+
+instance Hashable.Hashable ChefResolveLocation where
+  hashWithSalt __salt (ChefResolveLocation _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type ChefFileEntityXRefLocations_id = Glean.Id
+
+data ChefFileEntityXRefLocations = ChefFileEntityXRefLocations{chefFileEntityXRefLocations_id
+                                                               ::
+                                                               {-# UNPACK #-} !ChefFileEntityXRefLocations_id,
+                                                               chefFileEntityXRefLocations_key ::
+                                                               Prelude.Maybe
+                                                                 ChefFileEntityXRefLocations_key}
+                                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ChefFileEntityXRefLocations where
+  toJSON (ChefFileEntityXRefLocations __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct ChefFileEntityXRefLocations where
+  buildStruct _proxy
+    (ChefFileEntityXRefLocations __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (ChefFileEntityXRefLocations __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ChefFileEntityXRefLocations where
+  rnf (ChefFileEntityXRefLocations __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default ChefFileEntityXRefLocations where
+  def = ChefFileEntityXRefLocations Default.def Prelude.Nothing
+
+instance Hashable.Hashable ChefFileEntityXRefLocations where
+  hashWithSalt __salt (ChefFileEntityXRefLocations _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type ChefEntityUses_id = Glean.Id
+
+data ChefEntityUses = ChefEntityUses{chefEntityUses_id ::
+                                     {-# UNPACK #-} !ChefEntityUses_id,
+                                     chefEntityUses_key :: Prelude.Maybe ChefEntityUses_key}
+                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ChefEntityUses where
+  toJSON (ChefEntityUses __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct ChefEntityUses where
+  buildStruct _proxy (ChefEntityUses __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (ChefEntityUses __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ChefEntityUses where
+  rnf (ChefEntityUses __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default ChefEntityUses where
+  def = ChefEntityUses Default.def Prelude.Nothing
+
+instance Hashable.Hashable ChefEntityUses where
+  hashWithSalt __salt (ChefEntityUses _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type ChefEntityLocation_id = Glean.Id
+
+data ChefEntityLocation = ChefEntityLocation{chefEntityLocation_id
+                                             :: {-# UNPACK #-} !ChefEntityLocation_id,
+                                             chefEntityLocation_key ::
+                                             Prelude.Maybe ChefEntityLocation_key}
+                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ChefEntityLocation where
+  toJSON (ChefEntityLocation __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct ChefEntityLocation where
+  buildStruct _proxy (ChefEntityLocation __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (ChefEntityLocation __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ChefEntityLocation where
+  rnf (ChefEntityLocation __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default ChefEntityLocation where
+  def = ChefEntityLocation Default.def Prelude.Nothing
+
+instance Hashable.Hashable ChefEntityLocation where
+  hashWithSalt __salt (ChefEntityLocation _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+data ChefResolveLocation_key = ChefResolveLocation_key{chefResolveLocation_key_location
+                                                       :: Glean.Schema.CodemarkupTypes.Location,
+                                                       chefResolveLocation_key_entity ::
+                                                       Glean.Schema.CodeChef.Entity}
+                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ChefResolveLocation_key where
+  toJSON (ChefResolveLocation_key __field__location __field__entity)
+    = Aeson.object
+        ("location" .= __field__location :
+           "entity" .= __field__entity : Prelude.mempty)
+
+instance Thrift.ThriftStruct ChefResolveLocation_key where
+  buildStruct _proxy
+    (ChefResolveLocation_key __field__location __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "location" (Thrift.getStructType _proxy) 1
+           0
+           (Thrift.buildStruct _proxy __field__location)
+           :
+           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__entity)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__location <- ST.newSTRef Default.def
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__location
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__location <- ST.readSTRef
+                                                                   __field__location
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (ChefResolveLocation_key __val__location
+                                                  __val__entity)
+              _idMap = HashMap.fromList [("location", 1), ("entity", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ChefResolveLocation_key where
+  rnf (ChefResolveLocation_key __field__location __field__entity)
+    = DeepSeq.rnf __field__location `Prelude.seq`
+        DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default ChefResolveLocation_key where
+  def = ChefResolveLocation_key Default.def Default.def
+
+instance Hashable.Hashable ChefResolveLocation_key where
+  hashWithSalt __salt (ChefResolveLocation_key _location _entity)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _location)
+        _entity
+
+data ChefFileEntityXRefLocations_key = ChefFileEntityXRefLocations_key{chefFileEntityXRefLocations_key_file
+                                                                       :: Glean.Schema.Src.File,
+                                                                       chefFileEntityXRefLocations_key_xref
+                                                                       ::
+                                                                       Glean.Schema.CodemarkupTypes.XRefLocation,
+                                                                       chefFileEntityXRefLocations_key_entity
+                                                                       ::
+                                                                       Glean.Schema.CodeChef.Entity}
+                                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ChefFileEntityXRefLocations_key where
+  toJSON
+    (ChefFileEntityXRefLocations_key __field__file __field__xref
+       __field__entity)
+    = Aeson.object
+        ("file" .= __field__file :
+           "xref" .= __field__xref :
+             "entity" .= __field__entity : Prelude.mempty)
+
+instance Thrift.ThriftStruct ChefFileEntityXRefLocations_key where
+  buildStruct _proxy
+    (ChefFileEntityXRefLocations_key __field__file __field__xref
+       __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__file)
+           :
+           Thrift.genField _proxy "xref" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__xref)
+             :
+             Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 3 2
+               (Thrift.buildStruct _proxy __field__entity)
+               : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__file <- ST.newSTRef Default.def
+            __field__xref <- ST.newSTRef Default.def
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__file
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__xref
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__file <- ST.readSTRef __field__file
+                                             !__val__xref <- ST.readSTRef __field__xref
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (ChefFileEntityXRefLocations_key __val__file
+                                                  __val__xref
+                                                  __val__entity)
+              _idMap = HashMap.fromList [("file", 1), ("xref", 2), ("entity", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData ChefFileEntityXRefLocations_key where
+  rnf
+    (ChefFileEntityXRefLocations_key __field__file __field__xref
+       __field__entity)
+    = DeepSeq.rnf __field__file `Prelude.seq`
+        DeepSeq.rnf __field__xref `Prelude.seq`
+          DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default ChefFileEntityXRefLocations_key where
+  def
+    = ChefFileEntityXRefLocations_key Default.def Default.def
+        Default.def
+
+instance Hashable.Hashable ChefFileEntityXRefLocations_key where
+  hashWithSalt __salt
+    (ChefFileEntityXRefLocations_key _file _xref _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _file) _xref)
+        _entity
+
+data ChefEntityUses_key = ChefEntityUses_key{chefEntityUses_key_target
+                                             :: Glean.Schema.CodeChef.Entity,
+                                             chefEntityUses_key_file :: Glean.Schema.Src.File,
+                                             chefEntityUses_key_range :: Glean.Schema.Src.ByteSpan}
+                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ChefEntityUses_key where
+  toJSON
+    (ChefEntityUses_key __field__target __field__file __field__range)
+    = Aeson.object
+        ("target" .= __field__target :
+           "file" .= __field__file :
+             "range" .= __field__range : Prelude.mempty)
+
+instance Thrift.ThriftStruct ChefEntityUses_key where
+  buildStruct _proxy
+    (ChefEntityUses_key __field__target __field__file __field__range)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__target)
+           :
+           Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__file)
+             :
+             Thrift.genField _proxy "range" (Thrift.getStructType _proxy) 3 2
+               (Thrift.buildStruct _proxy __field__range)
+               : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__target <- ST.newSTRef Default.def
+            __field__file <- ST.newSTRef Default.def
+            __field__range <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__target
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__file
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__range
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__target <- ST.readSTRef
+                                                                 __field__target
+                                             !__val__file <- ST.readSTRef __field__file
+                                             !__val__range <- ST.readSTRef __field__range
+                                             Prelude.pure
+                                               (ChefEntityUses_key __val__target __val__file
+                                                  __val__range)
+              _idMap
+                = HashMap.fromList [("target", 1), ("file", 2), ("range", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData ChefEntityUses_key where
+  rnf
+    (ChefEntityUses_key __field__target __field__file __field__range)
+    = DeepSeq.rnf __field__target `Prelude.seq`
+        DeepSeq.rnf __field__file `Prelude.seq`
+          DeepSeq.rnf __field__range `Prelude.seq` ()
+
+instance Default.Default ChefEntityUses_key where
+  def = ChefEntityUses_key Default.def Default.def Default.def
+
+instance Hashable.Hashable ChefEntityUses_key where
+  hashWithSalt __salt (ChefEntityUses_key _target _file _range)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _target)
+           _file)
+        _range
+
+data ChefEntityLocation_key = ChefEntityLocation_key{chefEntityLocation_key_entity
+                                                     :: Glean.Schema.CodeChef.Entity,
+                                                     chefEntityLocation_key_location ::
+                                                     Glean.Schema.CodemarkupTypes.Location}
+                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ChefEntityLocation_key where
+  toJSON (ChefEntityLocation_key __field__entity __field__location)
+    = Aeson.object
+        ("entity" .= __field__entity :
+           "location" .= __field__location : Prelude.mempty)
+
+instance Thrift.ThriftStruct ChefEntityLocation_key where
+  buildStruct _proxy
+    (ChefEntityLocation_key __field__entity __field__location)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__entity)
+           :
+           Thrift.genField _proxy "location" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__location)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__entity <- ST.newSTRef Default.def
+            __field__location <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__location
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__entity <- ST.readSTRef
+                                                                 __field__entity
+                                             !__val__location <- ST.readSTRef __field__location
+                                             Prelude.pure
+                                               (ChefEntityLocation_key __val__entity
+                                                  __val__location)
+              _idMap = HashMap.fromList [("entity", 1), ("location", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ChefEntityLocation_key where
+  rnf (ChefEntityLocation_key __field__entity __field__location)
+    = DeepSeq.rnf __field__entity `Prelude.seq`
+        DeepSeq.rnf __field__location `Prelude.seq` ()
+
+instance Default.Default ChefEntityLocation_key where
+  def = ChefEntityLocation_key Default.def Default.def
+
+instance Hashable.Hashable ChefEntityLocation_key where
+  hashWithSalt __salt (ChefEntityLocation_key _entity _location)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _entity)
+        _location
+{-# LINE 20 "glean/schema/thrift/codemarkup_chef_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.CodemarkupChef.Types.ChefFileEntityXRefLocations_key
+         where
+  buildRtsValue b
+    (Glean.Schema.CodemarkupChef.Types.ChefFileEntityXRefLocations_key
+       x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.CodemarkupChef.Types.ChefFileEntityXRefLocations_key
+        <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "codemarkup.chef.ChefFileEntityXRefLocations_key"
+           (Prelude.Just 0))
+{-# LINE 31 "glean/schema/thrift/codemarkup_chef_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.CodemarkupChef.Types.ChefFileEntityXRefLocations_key
+     =
+     'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
+       ('Angle.TField "xref"
+          (Glean.Schema.CodemarkupTypes.Types.XRefLocation)
+          ('Angle.TField "entity" (Glean.Schema.CodeChef.Types.Entity)
+             ('Angle.TNoFields)))
+{-# LINE 33 "glean/schema/thrift/codemarkup_chef_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.CodemarkupChef.Types.ChefFileEntityXRefLocations
+         where
+  type KeyType
+         Glean.Schema.CodemarkupChef.Types.ChefFileEntityXRefLocations
+       = Glean.Schema.CodemarkupChef.Types.ChefFileEntityXRefLocations_key
+  getName _proxy
+    = Glean.PredicateRef "codemarkup.chef.ChefFileEntityXRefLocations"
+        1
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.CodemarkupChef.Types.chefFileEntityXRefLocations_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.CodemarkupChef.Types.ChefFileEntityXRefLocations x k
+  getFactKey
+    = Glean.Schema.CodemarkupChef.Types.chefFileEntityXRefLocations_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 43 "glean/schema/thrift/codemarkup_chef_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.CodemarkupChef.Types.ChefFileEntityXRefLocations
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 49 "glean/schema/thrift/codemarkup_chef_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.CodemarkupChef.Types.ChefEntityLocation_key
+         where
+  buildRtsValue b
+    (Glean.Schema.CodemarkupChef.Types.ChefEntityLocation_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.CodemarkupChef.Types.ChefEntityLocation_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "codemarkup.chef.ChefEntityLocation_key"
+           (Prelude.Just 0))
+{-# LINE 58 "glean/schema/thrift/codemarkup_chef_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.CodemarkupChef.Types.ChefEntityLocation_key
+     =
+     'Angle.TField "entity" (Glean.Schema.CodeChef.Types.Entity)
+       ('Angle.TField "location"
+          (Glean.Schema.CodemarkupTypes.Types.Location)
+          ('Angle.TNoFields))
+{-# LINE 60 "glean/schema/thrift/codemarkup_chef_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.CodemarkupChef.Types.ChefEntityLocation
+         where
+  type KeyType Glean.Schema.CodemarkupChef.Types.ChefEntityLocation =
+       Glean.Schema.CodemarkupChef.Types.ChefEntityLocation_key
+  getName _proxy
+    = Glean.PredicateRef "codemarkup.chef.ChefEntityLocation" 1
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.CodemarkupChef.Types.chefEntityLocation_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.CodemarkupChef.Types.ChefEntityLocation x k
+  getFactKey
+    = Glean.Schema.CodemarkupChef.Types.chefEntityLocation_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 69 "glean/schema/thrift/codemarkup_chef_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.CodemarkupChef.Types.ChefEntityLocation
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 75 "glean/schema/thrift/codemarkup_chef_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.CodemarkupChef.Types.ChefResolveLocation_key
+         where
+  buildRtsValue b
+    (Glean.Schema.CodemarkupChef.Types.ChefResolveLocation_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.CodemarkupChef.Types.ChefResolveLocation_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "codemarkup.chef.ChefResolveLocation_key"
+           (Prelude.Just 0))
+{-# LINE 84 "glean/schema/thrift/codemarkup_chef_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.CodemarkupChef.Types.ChefResolveLocation_key
+     =
+     'Angle.TField "location"
+       (Glean.Schema.CodemarkupTypes.Types.Location)
+       ('Angle.TField "entity" (Glean.Schema.CodeChef.Types.Entity)
+          ('Angle.TNoFields))
+{-# LINE 86 "glean/schema/thrift/codemarkup_chef_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.CodemarkupChef.Types.ChefResolveLocation
+         where
+  type KeyType Glean.Schema.CodemarkupChef.Types.ChefResolveLocation
+       = Glean.Schema.CodemarkupChef.Types.ChefResolveLocation_key
+  getName _proxy
+    = Glean.PredicateRef "codemarkup.chef.ChefResolveLocation" 1
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.CodemarkupChef.Types.chefResolveLocation_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.CodemarkupChef.Types.ChefResolveLocation x k
+  getFactKey
+    = Glean.Schema.CodemarkupChef.Types.chefResolveLocation_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 95 "glean/schema/thrift/codemarkup_chef_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.CodemarkupChef.Types.ChefResolveLocation
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 101 "glean/schema/thrift/codemarkup_chef_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.CodemarkupChef.Types.ChefEntityUses_key
+         where
+  buildRtsValue b
+    (Glean.Schema.CodemarkupChef.Types.ChefEntityUses_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.CodemarkupChef.Types.ChefEntityUses_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "codemarkup.chef.ChefEntityUses_key"
+           (Prelude.Just 0))
+{-# LINE 112 "glean/schema/thrift/codemarkup_chef_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.CodemarkupChef.Types.ChefEntityUses_key
+     =
+     'Angle.TField "target" (Glean.Schema.CodeChef.Types.Entity)
+       ('Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
+          ('Angle.TField "range" (Glean.Schema.Src.Types.ByteSpan)
+             ('Angle.TNoFields)))
+{-# LINE 114 "glean/schema/thrift/codemarkup_chef_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.CodemarkupChef.Types.ChefEntityUses
+         where
+  type KeyType Glean.Schema.CodemarkupChef.Types.ChefEntityUses =
+       Glean.Schema.CodemarkupChef.Types.ChefEntityUses_key
+  getName _proxy
+    = Glean.PredicateRef "codemarkup.chef.ChefEntityUses" 1
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.CodemarkupChef.Types.chefEntityUses_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.CodemarkupChef.Types.ChefEntityUses x k
+  getFactKey = Glean.Schema.CodemarkupChef.Types.chefEntityUses_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 123 "glean/schema/thrift/codemarkup_chef_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.CodemarkupChef.Types.ChefEntityUses
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
diff --git a/glean/schema/thrift/gen-hs2/Glean/Schema/CodemarkupHaskell/Types.hs b/glean/schema/thrift/gen-hs2/Glean/Schema/CodemarkupHaskell/Types.hs
--- a/glean/schema/thrift/gen-hs2/Glean/Schema/CodemarkupHaskell/Types.hs
+++ b/glean/schema/thrift/gen-hs2/Glean/Schema/CodemarkupHaskell/Types.hs
@@ -33,6 +33,9 @@
         HaskellEntityLocation_id,
         HaskellEntityLocation(HaskellEntityLocation,
                               haskellEntityLocation_id, haskellEntityLocation_key),
+        HaskellEntityKind_id,
+        HaskellEntityKind(HaskellEntityKind, haskellEntityKind_id,
+                          haskellEntityKind_key),
         HaskellContainsParentEntity_id,
         HaskellContainsParentEntity(HaskellContainsParentEntity,
                                     haskellContainsParentEntity_id,
@@ -53,6 +56,8 @@
         HaskellEntityLocation_key(HaskellEntityLocation_key,
                                   haskellEntityLocation_key_entity,
                                   haskellEntityLocation_key_location),
+        HaskellEntityKind_key(HaskellEntityKind_key,
+                              haskellEntityKind_key_entity, haskellEntityKind_key_kind),
         HaskellContainsParentEntity_key(HaskellContainsParentEntity_key,
                                         haskellContainsParentEntity_key_child,
                                         haskellContainsParentEntity_key_parent),
@@ -113,14 +118,14 @@
 import qualified Glean.Schema.CodemarkupTypes.Types
 {-# LINE 17 "glean/schema/thrift/codemarkup_haskell_include.hs" #-}
 import qualified Glean.Schema.Src.Types
-{-# LINE 117 ".build/def/codegen/thrift-schema-hs/glean/schema/thrift/gen-hs2/Glean/Schema/CodemarkupHaskell/Types.hs" #-}
+{-# LINE 122 ".build/def/codegen/thrift-schema-hs/glean/schema/thrift/gen-hs2/Glean/Schema/CodemarkupHaskell/Types.hs" #-}
 
 pREDICATE_VERSIONS :: Map.Map Text.Text Int.Int64
 pREDICATE_VERSIONS
   = Map.fromList
       [("HaskellContainsChildEntity", 2),
-       ("HaskellContainsParentEntity", 2), ("HaskellEntityUses", 2),
-       ("HaskellFileEntityXRefLocations", 2),
+       ("HaskellContainsParentEntity", 2), ("HaskellEntityKind", 2),
+       ("HaskellEntityUses", 2), ("HaskellFileEntityXRefLocations", 2),
        ("HaskellResolveLocation", 2), ("HaskellEntityLocation", 2)]
 
 type HaskellResolveLocation_id = Glean.Id
@@ -447,6 +452,85 @@
   hashWithSalt __salt (HaskellEntityLocation _id _key)
     = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
 
+type HaskellEntityKind_id = Glean.Id
+
+data HaskellEntityKind = HaskellEntityKind{haskellEntityKind_id ::
+                                           {-# UNPACK #-} !HaskellEntityKind_id,
+                                           haskellEntityKind_key ::
+                                           Prelude.Maybe HaskellEntityKind_key}
+                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON HaskellEntityKind where
+  toJSON (HaskellEntityKind __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct HaskellEntityKind where
+  buildStruct _proxy (HaskellEntityKind __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (HaskellEntityKind __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData HaskellEntityKind where
+  rnf (HaskellEntityKind __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default HaskellEntityKind where
+  def = HaskellEntityKind Default.def Prelude.Nothing
+
+instance Hashable.Hashable HaskellEntityKind where
+  hashWithSalt __salt (HaskellEntityKind _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
 type HaskellContainsParentEntity_id = Glean.Id
 
 data HaskellContainsParentEntity = HaskellContainsParentEntity{haskellContainsParentEntity_id
@@ -977,6 +1061,85 @@
     = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _entity)
         _location
 
+data HaskellEntityKind_key = HaskellEntityKind_key{haskellEntityKind_key_entity
+                                                   :: Glean.Schema.CodeHs.Entity,
+                                                   haskellEntityKind_key_kind ::
+                                                   Glean.Schema.CodemarkupTypes.SymbolKind}
+                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON HaskellEntityKind_key where
+  toJSON (HaskellEntityKind_key __field__entity __field__kind)
+    = Aeson.object
+        ("entity" .= __field__entity :
+           "kind" .= __field__kind : Prelude.mempty)
+
+instance Thrift.ThriftStruct HaskellEntityKind_key where
+  buildStruct _proxy
+    (HaskellEntityKind_key __field__entity __field__kind)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__entity)
+           :
+           Thrift.genField _proxy "kind" (Thrift.getI32Type _proxy) 2 1
+             ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                 Thrift.fromThriftEnum)
+                __field__kind)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__entity <- ST.newSTRef Default.def
+            __field__kind <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "SymbolKind")
+                                                                        ST.writeSTRef __field__kind
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__entity <- ST.readSTRef
+                                                                 __field__entity
+                                             !__val__kind <- ST.readSTRef __field__kind
+                                             Prelude.pure
+                                               (HaskellEntityKind_key __val__entity __val__kind)
+              _idMap = HashMap.fromList [("entity", 1), ("kind", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData HaskellEntityKind_key where
+  rnf (HaskellEntityKind_key __field__entity __field__kind)
+    = DeepSeq.rnf __field__entity `Prelude.seq`
+        DeepSeq.rnf __field__kind `Prelude.seq` ()
+
+instance Default.Default HaskellEntityKind_key where
+  def = HaskellEntityKind_key Default.def Default.def
+
+instance Hashable.Hashable HaskellEntityKind_key where
+  hashWithSalt __salt (HaskellEntityKind_key _entity _kind)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _entity)
+        _kind
+
 data HaskellContainsParentEntity_key = HaskellContainsParentEntity_key{haskellContainsParentEntity_key_child
                                                                        ::
                                                                        Glean.Schema.CodeHs.Entity,
@@ -1250,6 +1413,56 @@
   sourceType = Glean.predicateSourceType
 {-# LINE 74 "glean/schema/thrift/codemarkup_haskell_include.hs" #-}
 instance Glean.Type
+           Glean.Schema.CodemarkupHaskell.Types.HaskellEntityKind_key
+         where
+  buildRtsValue b
+    (Glean.Schema.CodemarkupHaskell.Types.HaskellEntityKind_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.CodemarkupHaskell.Types.HaskellEntityKind_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "codemarkup.haskell.HaskellEntityKind_key"
+           (Prelude.Just 0))
+{-# LINE 83 "glean/schema/thrift/codemarkup_haskell_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.CodemarkupHaskell.Types.HaskellEntityKind_key
+     =
+     'Angle.TField "entity" (Glean.Schema.CodeHs.Types.Entity)
+       ('Angle.TField "kind"
+          (Glean.Schema.CodemarkupTypes.Types.SymbolKind)
+          ('Angle.TNoFields))
+{-# LINE 85 "glean/schema/thrift/codemarkup_haskell_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.CodemarkupHaskell.Types.HaskellEntityKind
+         where
+  type KeyType Glean.Schema.CodemarkupHaskell.Types.HaskellEntityKind
+       = Glean.Schema.CodemarkupHaskell.Types.HaskellEntityKind_key
+  getName _proxy
+    = Glean.PredicateRef "codemarkup.haskell.HaskellEntityKind" 2
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.CodemarkupHaskell.Types.haskellEntityKind_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.CodemarkupHaskell.Types.HaskellEntityKind x k
+  getFactKey
+    = Glean.Schema.CodemarkupHaskell.Types.haskellEntityKind_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 94 "glean/schema/thrift/codemarkup_haskell_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.CodemarkupHaskell.Types.HaskellEntityKind
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 100 "glean/schema/thrift/codemarkup_haskell_include.hs" #-}
+instance Glean.Type
            Glean.Schema.CodemarkupHaskell.Types.HaskellEntityUses_key
          where
   buildRtsValue b
@@ -1267,7 +1480,7 @@
     = Angle.NamedTy ()
         (Angle.SourceRef "codemarkup.haskell.HaskellEntityUses_key"
            (Prelude.Just 0))
-{-# LINE 85 "glean/schema/thrift/codemarkup_haskell_include.hs" #-}
+{-# LINE 111 "glean/schema/thrift/codemarkup_haskell_include.hs" #-}
 type instance
      Angle.RecordFields
        Glean.Schema.CodemarkupHaskell.Types.HaskellEntityUses_key
@@ -1276,7 +1489,7 @@
        ('Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
           ('Angle.TField "span" (Glean.Schema.Src.Types.ByteSpan)
              ('Angle.TNoFields)))
-{-# LINE 87 "glean/schema/thrift/codemarkup_haskell_include.hs" #-}
+{-# LINE 113 "glean/schema/thrift/codemarkup_haskell_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.CodemarkupHaskell.Types.HaskellEntityUses
          where
@@ -1293,7 +1506,7 @@
   getFactKey
     = Glean.Schema.CodemarkupHaskell.Types.haskellEntityUses_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 96 "glean/schema/thrift/codemarkup_haskell_include.hs" #-}
+{-# LINE 122 "glean/schema/thrift/codemarkup_haskell_include.hs" #-}
 instance Glean.Type
            Glean.Schema.CodemarkupHaskell.Types.HaskellEntityUses
          where
@@ -1301,7 +1514,7 @@
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 102 "glean/schema/thrift/codemarkup_haskell_include.hs" #-}
+{-# LINE 128 "glean/schema/thrift/codemarkup_haskell_include.hs" #-}
 instance Glean.Type
            Glean.Schema.CodemarkupHaskell.Types.HaskellFileEntityXRefLocations_key
          where
@@ -1321,7 +1534,7 @@
         (Angle.SourceRef
            "codemarkup.haskell.HaskellFileEntityXRefLocations_key"
            (Prelude.Just 0))
-{-# LINE 113 "glean/schema/thrift/codemarkup_haskell_include.hs" #-}
+{-# LINE 139 "glean/schema/thrift/codemarkup_haskell_include.hs" #-}
 type instance
      Angle.RecordFields
        Glean.Schema.CodemarkupHaskell.Types.HaskellFileEntityXRefLocations_key
@@ -1331,7 +1544,7 @@
           (Glean.Schema.CodemarkupTypes.Types.XRefLocation)
           ('Angle.TField "entity" (Glean.Schema.CodeHs.Types.Entity)
              ('Angle.TNoFields)))
-{-# LINE 115 "glean/schema/thrift/codemarkup_haskell_include.hs" #-}
+{-# LINE 141 "glean/schema/thrift/codemarkup_haskell_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.CodemarkupHaskell.Types.HaskellFileEntityXRefLocations
          where
@@ -1354,7 +1567,7 @@
   getFactKey
     = Glean.Schema.CodemarkupHaskell.Types.haskellFileEntityXRefLocations_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 125 "glean/schema/thrift/codemarkup_haskell_include.hs" #-}
+{-# LINE 151 "glean/schema/thrift/codemarkup_haskell_include.hs" #-}
 instance Glean.Type
            Glean.Schema.CodemarkupHaskell.Types.HaskellFileEntityXRefLocations
          where
@@ -1362,7 +1575,7 @@
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 131 "glean/schema/thrift/codemarkup_haskell_include.hs" #-}
+{-# LINE 157 "glean/schema/thrift/codemarkup_haskell_include.hs" #-}
 instance Glean.Type
            Glean.Schema.CodemarkupHaskell.Types.HaskellResolveLocation_key
          where
@@ -1379,7 +1592,7 @@
     = Angle.NamedTy ()
         (Angle.SourceRef "codemarkup.haskell.HaskellResolveLocation_key"
            (Prelude.Just 0))
-{-# LINE 140 "glean/schema/thrift/codemarkup_haskell_include.hs" #-}
+{-# LINE 166 "glean/schema/thrift/codemarkup_haskell_include.hs" #-}
 type instance
      Angle.RecordFields
        Glean.Schema.CodemarkupHaskell.Types.HaskellResolveLocation_key
@@ -1388,7 +1601,7 @@
        (Glean.Schema.CodemarkupTypes.Types.Location)
        ('Angle.TField "entity" (Glean.Schema.CodeHs.Types.Entity)
           ('Angle.TNoFields))
-{-# LINE 142 "glean/schema/thrift/codemarkup_haskell_include.hs" #-}
+{-# LINE 168 "glean/schema/thrift/codemarkup_haskell_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.CodemarkupHaskell.Types.HaskellResolveLocation
          where
@@ -1406,7 +1619,7 @@
   getFactKey
     = Glean.Schema.CodemarkupHaskell.Types.haskellResolveLocation_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 152 "glean/schema/thrift/codemarkup_haskell_include.hs" #-}
+{-# LINE 178 "glean/schema/thrift/codemarkup_haskell_include.hs" #-}
 instance Glean.Type
            Glean.Schema.CodemarkupHaskell.Types.HaskellResolveLocation
          where
@@ -1414,7 +1627,7 @@
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 158 "glean/schema/thrift/codemarkup_haskell_include.hs" #-}
+{-# LINE 184 "glean/schema/thrift/codemarkup_haskell_include.hs" #-}
 instance Glean.Type
            Glean.Schema.CodemarkupHaskell.Types.HaskellEntityLocation_key
          where
@@ -1431,7 +1644,7 @@
     = Angle.NamedTy ()
         (Angle.SourceRef "codemarkup.haskell.HaskellEntityLocation_key"
            (Prelude.Just 0))
-{-# LINE 167 "glean/schema/thrift/codemarkup_haskell_include.hs" #-}
+{-# LINE 193 "glean/schema/thrift/codemarkup_haskell_include.hs" #-}
 type instance
      Angle.RecordFields
        Glean.Schema.CodemarkupHaskell.Types.HaskellEntityLocation_key
@@ -1440,7 +1653,7 @@
        ('Angle.TField "location"
           (Glean.Schema.CodemarkupTypes.Types.Location)
           ('Angle.TNoFields))
-{-# LINE 169 "glean/schema/thrift/codemarkup_haskell_include.hs" #-}
+{-# LINE 195 "glean/schema/thrift/codemarkup_haskell_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.CodemarkupHaskell.Types.HaskellEntityLocation
          where
@@ -1458,7 +1671,7 @@
   getFactKey
     = Glean.Schema.CodemarkupHaskell.Types.haskellEntityLocation_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 179 "glean/schema/thrift/codemarkup_haskell_include.hs" #-}
+{-# LINE 205 "glean/schema/thrift/codemarkup_haskell_include.hs" #-}
 instance Glean.Type
            Glean.Schema.CodemarkupHaskell.Types.HaskellEntityLocation
          where
diff --git a/glean/schema/thrift/gen-hs2/Glean/Schema/CodemarkupScip/Types.hs b/glean/schema/thrift/gen-hs2/Glean/Schema/CodemarkupScip/Types.hs
--- a/glean/schema/thrift/gen-hs2/Glean/Schema/CodemarkupScip/Types.hs
+++ b/glean/schema/thrift/gen-hs2/Glean/Schema/CodemarkupScip/Types.hs
@@ -39,11 +39,11 @@
         LsifKindToKind_id,
         LsifKindToKind(LsifKindToKind, lsifKindToKind_id,
                        lsifKindToKind_key),
-        FileXLangSymbolRefs_id,
-        FileXLangSymbolRefs(FileXLangSymbolRefs, fileXLangSymbolRefs_id,
-                            fileXLangSymbolRefs_key),
         EntityInfo_id,
         EntityInfo(EntityInfo, entityInfo_id, entityInfo_key),
+        EnclosingSrcRange_id,
+        EnclosingSrcRange(EnclosingSrcRange, enclosingSrcRange_id,
+                          enclosingSrcRange_key),
         ScipResolveLocation_key(ScipResolveLocation_key,
                                 scipResolveLocation_key_location, scipResolveLocation_key_entity),
         ScipFileEntityXRefLocations_key(ScipFileEntityXRefLocations_key,
@@ -59,11 +59,10 @@
                                     scipEntityDocumentation_key_documentation),
         LsifKindToKind_key(LsifKindToKind_key, lsifKindToKind_key_lsif,
                            lsifKindToKind_key_kind),
-        FileXLangSymbolRefs_key(FileXLangSymbolRefs_key,
-                                fileXLangSymbolRefs_key_file, fileXLangSymbolRefs_key_source,
-                                fileXLangSymbolRefs_key_symbol),
         EntityInfo_key(EntityInfo_key, entityInfo_key_entity,
-                       entityInfo_key_info))
+                       entityInfo_key_info),
+        EnclosingSrcRange_key(EnclosingSrcRange_key,
+                              enclosingSrcRange_key_range, enclosingSrcRange_key_enclosingRange))
        where
 import qualified Control.DeepSeq as DeepSeq
 import qualified Control.Monad as Monad
@@ -126,14 +125,14 @@
 import qualified Glean.Schema.Scip.Types
 {-# LINE 19 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
 import qualified Glean.Schema.Src.Types
-{-# LINE 130 ".build/def/codegen/thrift-schema-hs/glean/schema/thrift/gen-hs2/Glean/Schema/CodemarkupScip/Types.hs" #-}
+{-# LINE 129 ".build/def/codegen/thrift-schema-hs/glean/schema/thrift/gen-hs2/Glean/Schema/CodemarkupScip/Types.hs" #-}
 
 pREDICATE_VERSIONS :: Map.Map Text.Text Int.Int64
 pREDICATE_VERSIONS
   = Map.fromList
-      [("ScipFileEntityXRefLocations", 1), ("FileXLangSymbolRefs", 1),
-       ("LsifKindToKind", 1), ("EntityInfo", 1),
-       ("ScipEntityDocumentation", 1), ("ScipResolveLocation", 1),
+      [("ScipFileEntityXRefLocations", 1), ("LsifKindToKind", 1),
+       ("EntityInfo", 1), ("ScipEntityDocumentation", 1),
+       ("ScipResolveLocation", 1), ("EnclosingSrcRange", 1),
        ("ScipEntityLocation", 1), ("ScipEntityUses", 1)]
 
 type ScipResolveLocation_id = Glean.Id
@@ -615,23 +614,22 @@
   hashWithSalt __salt (LsifKindToKind _id _key)
     = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
 
-type FileXLangSymbolRefs_id = Glean.Id
+type EntityInfo_id = Glean.Id
 
-data FileXLangSymbolRefs = FileXLangSymbolRefs{fileXLangSymbolRefs_id
-                                               :: {-# UNPACK #-} !FileXLangSymbolRefs_id,
-                                               fileXLangSymbolRefs_key ::
-                                               Prelude.Maybe FileXLangSymbolRefs_key}
-                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+data EntityInfo = EntityInfo{entityInfo_id ::
+                             {-# UNPACK #-} !EntityInfo_id,
+                             entityInfo_key :: Prelude.Maybe EntityInfo_key}
+                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
 
-instance Aeson.ToJSON FileXLangSymbolRefs where
-  toJSON (FileXLangSymbolRefs __field__id __field__key)
+instance Aeson.ToJSON EntityInfo where
+  toJSON (EntityInfo __field__id __field__key)
     = Aeson.object
         ("id" .= __field__id :
            Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
              Prelude.mempty)
 
-instance Thrift.ThriftStruct FileXLangSymbolRefs where
-  buildStruct _proxy (FileXLangSymbolRefs __field__id __field__key)
+instance Thrift.ThriftStruct EntityInfo where
+  buildStruct _proxy (EntityInfo __field__id __field__key)
     = Thrift.genStruct _proxy
         (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
            (Thrift.genI64 _proxy __field__id)
@@ -678,38 +676,39 @@
                                                                _parse _id
                        Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
                                              !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (FileXLangSymbolRefs __val__id __val__key)
+                                             Prelude.pure (EntityInfo __val__id __val__key)
               _idMap = HashMap.fromList [("id", 1), ("key", 2)]
             _parse 0)
 
-instance DeepSeq.NFData FileXLangSymbolRefs where
-  rnf (FileXLangSymbolRefs __field__id __field__key)
+instance DeepSeq.NFData EntityInfo where
+  rnf (EntityInfo __field__id __field__key)
     = DeepSeq.rnf __field__id `Prelude.seq`
         DeepSeq.rnf __field__key `Prelude.seq` ()
 
-instance Default.Default FileXLangSymbolRefs where
-  def = FileXLangSymbolRefs Default.def Prelude.Nothing
+instance Default.Default EntityInfo where
+  def = EntityInfo Default.def Prelude.Nothing
 
-instance Hashable.Hashable FileXLangSymbolRefs where
-  hashWithSalt __salt (FileXLangSymbolRefs _id _key)
+instance Hashable.Hashable EntityInfo where
+  hashWithSalt __salt (EntityInfo _id _key)
     = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
 
-type EntityInfo_id = Glean.Id
+type EnclosingSrcRange_id = Glean.Id
 
-data EntityInfo = EntityInfo{entityInfo_id ::
-                             {-# UNPACK #-} !EntityInfo_id,
-                             entityInfo_key :: Prelude.Maybe EntityInfo_key}
-                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+data EnclosingSrcRange = EnclosingSrcRange{enclosingSrcRange_id ::
+                                           {-# UNPACK #-} !EnclosingSrcRange_id,
+                                           enclosingSrcRange_key ::
+                                           Prelude.Maybe EnclosingSrcRange_key}
+                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
 
-instance Aeson.ToJSON EntityInfo where
-  toJSON (EntityInfo __field__id __field__key)
+instance Aeson.ToJSON EnclosingSrcRange where
+  toJSON (EnclosingSrcRange __field__id __field__key)
     = Aeson.object
         ("id" .= __field__id :
            Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
              Prelude.mempty)
 
-instance Thrift.ThriftStruct EntityInfo where
-  buildStruct _proxy (EntityInfo __field__id __field__key)
+instance Thrift.ThriftStruct EnclosingSrcRange where
+  buildStruct _proxy (EnclosingSrcRange __field__id __field__key)
     = Thrift.genStruct _proxy
         (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
            (Thrift.genI64 _proxy __field__id)
@@ -756,20 +755,20 @@
                                                                _parse _id
                        Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
                                              !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (EntityInfo __val__id __val__key)
+                                             Prelude.pure (EnclosingSrcRange __val__id __val__key)
               _idMap = HashMap.fromList [("id", 1), ("key", 2)]
             _parse 0)
 
-instance DeepSeq.NFData EntityInfo where
-  rnf (EntityInfo __field__id __field__key)
+instance DeepSeq.NFData EnclosingSrcRange where
+  rnf (EnclosingSrcRange __field__id __field__key)
     = DeepSeq.rnf __field__id `Prelude.seq`
         DeepSeq.rnf __field__key `Prelude.seq` ()
 
-instance Default.Default EntityInfo where
-  def = EntityInfo Default.def Prelude.Nothing
+instance Default.Default EnclosingSrcRange where
+  def = EnclosingSrcRange Default.def Prelude.Nothing
 
-instance Hashable.Hashable EntityInfo where
-  hashWithSalt __salt (EntityInfo _id _key)
+instance Hashable.Hashable EnclosingSrcRange where
+  hashWithSalt __salt (EnclosingSrcRange _id _key)
     = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
 
 data ScipResolveLocation_key = ScipResolveLocation_key{scipResolveLocation_key_location
@@ -1297,43 +1296,31 @@
   hashWithSalt __salt (LsifKindToKind_key _lsif _kind)
     = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _lsif) _kind
 
-data FileXLangSymbolRefs_key = FileXLangSymbolRefs_key{fileXLangSymbolRefs_key_file
-                                                       :: Glean.Schema.Src.File,
-                                                       fileXLangSymbolRefs_key_source ::
-                                                       Glean.Schema.CodemarkupTypes.RangeSpan,
-                                                       fileXLangSymbolRefs_key_symbol ::
-                                                       Glean.Schema.Scip.Symbol}
-                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+data EntityInfo_key = EntityInfo_key{entityInfo_key_entity ::
+                                     Glean.Schema.CodeScip.Entity,
+                                     entityInfo_key_info :: Glean.Schema.CodemarkupTypes.SymbolInfo}
+                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
 
-instance Aeson.ToJSON FileXLangSymbolRefs_key where
-  toJSON
-    (FileXLangSymbolRefs_key __field__file __field__source
-       __field__symbol)
+instance Aeson.ToJSON EntityInfo_key where
+  toJSON (EntityInfo_key __field__entity __field__info)
     = Aeson.object
-        ("file" .= __field__file :
-           "source" .= __field__source :
-             "symbol" .= __field__symbol : Prelude.mempty)
+        ("entity" .= __field__entity :
+           "info" .= __field__info : Prelude.mempty)
 
-instance Thrift.ThriftStruct FileXLangSymbolRefs_key where
-  buildStruct _proxy
-    (FileXLangSymbolRefs_key __field__file __field__source
-       __field__symbol)
+instance Thrift.ThriftStruct EntityInfo_key where
+  buildStruct _proxy (EntityInfo_key __field__entity __field__info)
     = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__file)
+        (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__entity)
            :
-           Thrift.genField _proxy "source" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__source)
-             :
-             Thrift.genField _proxy "symbol" (Thrift.getStructType _proxy) 3 2
-               (Thrift.buildStruct _proxy __field__symbol)
-               : [])
+           Thrift.genField _proxy "info" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__info)
+             : [])
   parseStruct _proxy
     = ST.runSTT
         (do Prelude.return ()
-            __field__file <- ST.newSTRef Default.def
-            __field__source <- ST.newSTRef Default.def
-            __field__symbol <- ST.newSTRef Default.def
+            __field__entity <- ST.newSTRef Default.def
+            __field__info <- ST.newSTRef Default.def
             let
               _parse _lastId
                 = do _fieldBegin <- Trans.lift
@@ -1346,84 +1333,73 @@
                                                                      do !_val <- Trans.lift
                                                                                    (Thrift.parseStruct
                                                                                       _proxy)
-                                                                        ST.writeSTRef __field__file
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
                                                                         ST.writeSTRef
-                                                                          __field__source
+                                                                          __field__entity
                                                                           _val
-                                                                 3 | _type ==
+                                                                 2 | _type ==
                                                                        Thrift.getStructType _proxy
                                                                      ->
                                                                      do !_val <- Trans.lift
                                                                                    (Thrift.parseStruct
                                                                                       _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__symbol
+                                                                        ST.writeSTRef __field__info
                                                                           _val
                                                                  _ -> Trans.lift
                                                                         (Thrift.parseSkip _proxy
                                                                            _type
                                                                            (Prelude.Just _bool))
                                                                _parse _id
-                       Thrift.FieldEnd -> do !__val__file <- ST.readSTRef __field__file
-                                             !__val__source <- ST.readSTRef __field__source
-                                             !__val__symbol <- ST.readSTRef __field__symbol
-                                             Prelude.pure
-                                               (FileXLangSymbolRefs_key __val__file __val__source
-                                                  __val__symbol)
-              _idMap
-                = HashMap.fromList [("file", 1), ("source", 2), ("symbol", 3)]
+                       Thrift.FieldEnd -> do !__val__entity <- ST.readSTRef
+                                                                 __field__entity
+                                             !__val__info <- ST.readSTRef __field__info
+                                             Prelude.pure (EntityInfo_key __val__entity __val__info)
+              _idMap = HashMap.fromList [("entity", 1), ("info", 2)]
             _parse 0)
 
-instance DeepSeq.NFData FileXLangSymbolRefs_key where
-  rnf
-    (FileXLangSymbolRefs_key __field__file __field__source
-       __field__symbol)
-    = DeepSeq.rnf __field__file `Prelude.seq`
-        DeepSeq.rnf __field__source `Prelude.seq`
-          DeepSeq.rnf __field__symbol `Prelude.seq` ()
+instance DeepSeq.NFData EntityInfo_key where
+  rnf (EntityInfo_key __field__entity __field__info)
+    = DeepSeq.rnf __field__entity `Prelude.seq`
+        DeepSeq.rnf __field__info `Prelude.seq` ()
 
-instance Default.Default FileXLangSymbolRefs_key where
-  def = FileXLangSymbolRefs_key Default.def Default.def Default.def
+instance Default.Default EntityInfo_key where
+  def = EntityInfo_key Default.def Default.def
 
-instance Hashable.Hashable FileXLangSymbolRefs_key where
-  hashWithSalt __salt (FileXLangSymbolRefs_key _file _source _symbol)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _file)
-           _source)
-        _symbol
+instance Hashable.Hashable EntityInfo_key where
+  hashWithSalt __salt (EntityInfo_key _entity _info)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _entity)
+        _info
 
-data EntityInfo_key = EntityInfo_key{entityInfo_key_entity ::
-                                     Glean.Schema.CodeScip.Entity,
-                                     entityInfo_key_info :: Glean.Schema.CodemarkupTypes.SymbolInfo}
-                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+data EnclosingSrcRange_key = EnclosingSrcRange_key{enclosingSrcRange_key_range
+                                                   :: Glean.Schema.Src.Range,
+                                                   enclosingSrcRange_key_enclosingRange ::
+                                                   Glean.Schema.Src.Range}
+                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
 
-instance Aeson.ToJSON EntityInfo_key where
-  toJSON (EntityInfo_key __field__entity __field__info)
+instance Aeson.ToJSON EnclosingSrcRange_key where
+  toJSON
+    (EnclosingSrcRange_key __field__range __field__enclosingRange)
     = Aeson.object
-        ("entity" .= __field__entity :
-           "info" .= __field__info : Prelude.mempty)
+        ("range" .= __field__range :
+           "enclosingRange" .= __field__enclosingRange : Prelude.mempty)
 
-instance Thrift.ThriftStruct EntityInfo_key where
-  buildStruct _proxy (EntityInfo_key __field__entity __field__info)
+instance Thrift.ThriftStruct EnclosingSrcRange_key where
+  buildStruct _proxy
+    (EnclosingSrcRange_key __field__range __field__enclosingRange)
     = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__entity)
+        (Thrift.genField _proxy "range" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__range)
            :
-           Thrift.genField _proxy "info" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__info)
+           Thrift.genField _proxy "enclosingRange"
+             (Thrift.getStructType _proxy)
+             2
+             1
+             (Thrift.buildStruct _proxy __field__enclosingRange)
              : [])
   parseStruct _proxy
     = ST.runSTT
         (do Prelude.return ()
-            __field__entity <- ST.newSTRef Default.def
-            __field__info <- ST.newSTRef Default.def
+            __field__range <- ST.newSTRef Default.def
+            __field__enclosingRange <- ST.newSTRef Default.def
             let
               _parse _lastId
                 = do _fieldBegin <- Trans.lift
@@ -1436,8 +1412,7 @@
                                                                      do !_val <- Trans.lift
                                                                                    (Thrift.parseStruct
                                                                                       _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
+                                                                        ST.writeSTRef __field__range
                                                                           _val
                                                                  2 | _type ==
                                                                        Thrift.getStructType _proxy
@@ -1445,32 +1420,35 @@
                                                                      do !_val <- Trans.lift
                                                                                    (Thrift.parseStruct
                                                                                       _proxy)
-                                                                        ST.writeSTRef __field__info
+                                                                        ST.writeSTRef
+                                                                          __field__enclosingRange
                                                                           _val
                                                                  _ -> Trans.lift
                                                                         (Thrift.parseSkip _proxy
                                                                            _type
                                                                            (Prelude.Just _bool))
                                                                _parse _id
-                       Thrift.FieldEnd -> do !__val__entity <- ST.readSTRef
-                                                                 __field__entity
-                                             !__val__info <- ST.readSTRef __field__info
-                                             Prelude.pure (EntityInfo_key __val__entity __val__info)
-              _idMap = HashMap.fromList [("entity", 1), ("info", 2)]
+                       Thrift.FieldEnd -> do !__val__range <- ST.readSTRef __field__range
+                                             !__val__enclosingRange <- ST.readSTRef
+                                                                         __field__enclosingRange
+                                             Prelude.pure
+                                               (EnclosingSrcRange_key __val__range
+                                                  __val__enclosingRange)
+              _idMap = HashMap.fromList [("range", 1), ("enclosingRange", 2)]
             _parse 0)
 
-instance DeepSeq.NFData EntityInfo_key where
-  rnf (EntityInfo_key __field__entity __field__info)
-    = DeepSeq.rnf __field__entity `Prelude.seq`
-        DeepSeq.rnf __field__info `Prelude.seq` ()
+instance DeepSeq.NFData EnclosingSrcRange_key where
+  rnf (EnclosingSrcRange_key __field__range __field__enclosingRange)
+    = DeepSeq.rnf __field__range `Prelude.seq`
+        DeepSeq.rnf __field__enclosingRange `Prelude.seq` ()
 
-instance Default.Default EntityInfo_key where
-  def = EntityInfo_key Default.def Default.def
+instance Default.Default EnclosingSrcRange_key where
+  def = EnclosingSrcRange_key Default.def Default.def
 
-instance Hashable.Hashable EntityInfo_key where
-  hashWithSalt __salt (EntityInfo_key _entity _info)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _entity)
-        _info
+instance Hashable.Hashable EnclosingSrcRange_key where
+  hashWithSalt __salt (EnclosingSrcRange_key _range _enclosingRange)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _range)
+        _enclosingRange
 {-# LINE 22 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
 instance Glean.Type
            Glean.Schema.CodemarkupScip.Types.ScipFileEntityXRefLocations_key
@@ -1529,61 +1507,6 @@
   sourceType = Glean.predicateSourceType
 {-# LINE 51 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
 instance Glean.Type
-           Glean.Schema.CodemarkupScip.Types.FileXLangSymbolRefs_key
-         where
-  buildRtsValue b
-    (Glean.Schema.CodemarkupScip.Types.FileXLangSymbolRefs_key x1 x2
-       x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.CodemarkupScip.Types.FileXLangSymbolRefs_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "codemarkup.scip.FileXLangSymbolRefs_key"
-           (Prelude.Just 0))
-{-# LINE 62 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.CodemarkupScip.Types.FileXLangSymbolRefs_key
-     =
-     'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
-       ('Angle.TField "source"
-          (Glean.Schema.CodemarkupTypes.Types.RangeSpan)
-          ('Angle.TField "symbol"
-             (Glean.KeyType Glean.Schema.Scip.Types.Symbol)
-             ('Angle.TNoFields)))
-{-# LINE 64 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.CodemarkupScip.Types.FileXLangSymbolRefs
-         where
-  type KeyType Glean.Schema.CodemarkupScip.Types.FileXLangSymbolRefs
-       = Glean.Schema.CodemarkupScip.Types.FileXLangSymbolRefs_key
-  getName _proxy
-    = Glean.PredicateRef "codemarkup.scip.FileXLangSymbolRefs" 1
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.CodemarkupScip.Types.fileXLangSymbolRefs_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.CodemarkupScip.Types.FileXLangSymbolRefs x k
-  getFactKey
-    = Glean.Schema.CodemarkupScip.Types.fileXLangSymbolRefs_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 73 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.CodemarkupScip.Types.FileXLangSymbolRefs
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 79 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
-instance Glean.Type
            Glean.Schema.CodemarkupScip.Types.LsifKindToKind_key
          where
   buildRtsValue b
@@ -1598,7 +1521,7 @@
     = Angle.NamedTy ()
         (Angle.SourceRef "codemarkup.scip.LsifKindToKind_key"
            (Prelude.Just 0))
-{-# LINE 88 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
+{-# LINE 60 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
 type instance
      Angle.RecordFields
        Glean.Schema.CodemarkupScip.Types.LsifKindToKind_key
@@ -1607,7 +1530,7 @@
        ('Angle.TField "kind"
           (Glean.Schema.CodemarkupTypes.Types.SymbolKind)
           ('Angle.TNoFields))
-{-# LINE 90 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
+{-# LINE 62 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.CodemarkupScip.Types.LsifKindToKind
          where
@@ -1622,7 +1545,7 @@
     = Glean.Schema.CodemarkupScip.Types.LsifKindToKind x k
   getFactKey = Glean.Schema.CodemarkupScip.Types.lsifKindToKind_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 99 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
+{-# LINE 71 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
 instance Glean.Type
            Glean.Schema.CodemarkupScip.Types.LsifKindToKind
          where
@@ -1630,7 +1553,7 @@
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 105 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
+{-# LINE 77 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
 instance Glean.Type
            Glean.Schema.CodemarkupScip.Types.EntityInfo_key
          where
@@ -1645,7 +1568,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "codemarkup.scip.EntityInfo_key" (Prelude.Just 0))
-{-# LINE 114 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
+{-# LINE 86 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.CodemarkupScip.Types.EntityInfo_key
      =
@@ -1653,7 +1576,7 @@
        ('Angle.TField "info"
           (Glean.Schema.CodemarkupTypes.Types.SymbolInfo)
           ('Angle.TNoFields))
-{-# LINE 116 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
+{-# LINE 88 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.CodemarkupScip.Types.EntityInfo
          where
@@ -1667,14 +1590,14 @@
     = Glean.Schema.CodemarkupScip.Types.EntityInfo x k
   getFactKey = Glean.Schema.CodemarkupScip.Types.entityInfo_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 125 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
+{-# LINE 97 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
 instance Glean.Type Glean.Schema.CodemarkupScip.Types.EntityInfo
          where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 131 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
+{-# LINE 103 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
 instance Glean.Type
            Glean.Schema.CodemarkupScip.Types.ScipEntityDocumentation_key
          where
@@ -1691,7 +1614,7 @@
     = Angle.NamedTy ()
         (Angle.SourceRef "codemarkup.scip.ScipEntityDocumentation_key"
            (Prelude.Just 0))
-{-# LINE 140 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
+{-# LINE 112 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
 type instance
      Angle.RecordFields
        Glean.Schema.CodemarkupScip.Types.ScipEntityDocumentation_key
@@ -1700,7 +1623,7 @@
        ('Angle.TField "documentation"
           (Glean.KeyType Glean.Schema.Scip.Types.Documentation)
           ('Angle.TNoFields))
-{-# LINE 142 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
+{-# LINE 114 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.CodemarkupScip.Types.ScipEntityDocumentation
          where
@@ -1718,7 +1641,7 @@
   getFactKey
     = Glean.Schema.CodemarkupScip.Types.scipEntityDocumentation_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 152 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
+{-# LINE 124 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
 instance Glean.Type
            Glean.Schema.CodemarkupScip.Types.ScipEntityDocumentation
          where
@@ -1726,7 +1649,7 @@
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 158 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
+{-# LINE 130 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
 instance Glean.Type
            Glean.Schema.CodemarkupScip.Types.ScipResolveLocation_key
          where
@@ -1742,7 +1665,7 @@
     = Angle.NamedTy ()
         (Angle.SourceRef "codemarkup.scip.ScipResolveLocation_key"
            (Prelude.Just 0))
-{-# LINE 167 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
+{-# LINE 139 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
 type instance
      Angle.RecordFields
        Glean.Schema.CodemarkupScip.Types.ScipResolveLocation_key
@@ -1751,7 +1674,7 @@
        (Glean.Schema.CodemarkupTypes.Types.Location)
        ('Angle.TField "entity" (Glean.Schema.CodeScip.Types.Entity)
           ('Angle.TNoFields))
-{-# LINE 169 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
+{-# LINE 141 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.CodemarkupScip.Types.ScipResolveLocation
          where
@@ -1768,7 +1691,7 @@
   getFactKey
     = Glean.Schema.CodemarkupScip.Types.scipResolveLocation_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 178 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
+{-# LINE 150 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
 instance Glean.Type
            Glean.Schema.CodemarkupScip.Types.ScipResolveLocation
          where
@@ -1776,8 +1699,56 @@
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 184 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
+{-# LINE 156 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
 instance Glean.Type
+           Glean.Schema.CodemarkupScip.Types.EnclosingSrcRange_key
+         where
+  buildRtsValue b
+    (Glean.Schema.CodemarkupScip.Types.EnclosingSrcRange_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.CodemarkupScip.Types.EnclosingSrcRange_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "codemarkup.scip.EnclosingSrcRange_key"
+           (Prelude.Just 0))
+{-# LINE 165 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.CodemarkupScip.Types.EnclosingSrcRange_key
+     =
+     'Angle.TField "range" (Glean.Schema.Src.Types.Range)
+       ('Angle.TField "enclosingRange" (Glean.Schema.Src.Types.Range)
+          ('Angle.TNoFields))
+{-# LINE 167 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.CodemarkupScip.Types.EnclosingSrcRange
+         where
+  type KeyType Glean.Schema.CodemarkupScip.Types.EnclosingSrcRange =
+       Glean.Schema.CodemarkupScip.Types.EnclosingSrcRange_key
+  getName _proxy
+    = Glean.PredicateRef "codemarkup.scip.EnclosingSrcRange" 1
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.CodemarkupScip.Types.enclosingSrcRange_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.CodemarkupScip.Types.EnclosingSrcRange x k
+  getFactKey
+    = Glean.Schema.CodemarkupScip.Types.enclosingSrcRange_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 176 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.CodemarkupScip.Types.EnclosingSrcRange
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 182 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
+instance Glean.Type
            Glean.Schema.CodemarkupScip.Types.ScipEntityLocation_key
          where
   buildRtsValue b
@@ -1792,7 +1763,7 @@
     = Angle.NamedTy ()
         (Angle.SourceRef "codemarkup.scip.ScipEntityLocation_key"
            (Prelude.Just 0))
-{-# LINE 193 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
+{-# LINE 191 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
 type instance
      Angle.RecordFields
        Glean.Schema.CodemarkupScip.Types.ScipEntityLocation_key
@@ -1801,7 +1772,7 @@
        ('Angle.TField "location"
           (Glean.Schema.CodemarkupTypes.Types.Location)
           ('Angle.TNoFields))
-{-# LINE 195 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
+{-# LINE 193 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.CodemarkupScip.Types.ScipEntityLocation
          where
@@ -1817,7 +1788,7 @@
   getFactKey
     = Glean.Schema.CodemarkupScip.Types.scipEntityLocation_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 204 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
+{-# LINE 202 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
 instance Glean.Type
            Glean.Schema.CodemarkupScip.Types.ScipEntityLocation
          where
@@ -1825,7 +1796,7 @@
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 210 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
+{-# LINE 208 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
 instance Glean.Type
            Glean.Schema.CodemarkupScip.Types.ScipEntityUses_key
          where
@@ -1843,7 +1814,7 @@
     = Angle.NamedTy ()
         (Angle.SourceRef "codemarkup.scip.ScipEntityUses_key"
            (Prelude.Just 0))
-{-# LINE 221 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
+{-# LINE 219 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
 type instance
      Angle.RecordFields
        Glean.Schema.CodemarkupScip.Types.ScipEntityUses_key
@@ -1852,7 +1823,7 @@
        ('Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
           ('Angle.TField "range" (Glean.Schema.Src.Types.Range)
              ('Angle.TNoFields)))
-{-# LINE 223 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
+{-# LINE 221 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.CodemarkupScip.Types.ScipEntityUses
          where
@@ -1867,7 +1838,7 @@
     = Glean.Schema.CodemarkupScip.Types.ScipEntityUses x k
   getFactKey = Glean.Schema.CodemarkupScip.Types.scipEntityUses_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 232 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
+{-# LINE 230 "glean/schema/thrift/codemarkup_scip_include.hs" #-}
 instance Glean.Type
            Glean.Schema.CodemarkupScip.Types.ScipEntityUses
          where
diff --git a/glean/schema/thrift/gen-hs2/Glean/Schema/CodemarkupSwift/Types.hs b/glean/schema/thrift/gen-hs2/Glean/Schema/CodemarkupSwift/Types.hs
new file mode 100644
--- /dev/null
+++ b/glean/schema/thrift/gen-hs2/Glean/Schema/CodemarkupSwift/Types.hs
@@ -0,0 +1,322 @@
+-----------------------------------------------------------------
+-- Autogenerated by Thrift
+--
+-- DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+--  @generated
+-----------------------------------------------------------------
+{-# LINE 2 "glean/schema/thrift/codemarkup_swift_include.hs" #-}
+{-# LANGUAGE TypeFamilies, MultiParamTypeClasses, DataKinds #-}
+{-# LINE 3 "glean/schema/thrift/codemarkup_swift_include.hs" #-}
+{-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-}
+{-# LINE 4 "glean/schema/thrift/codemarkup_swift_include.hs" #-}
+{-# LANGUAGE UndecidableInstances #-}
+{-# LINE 14 ".build/def/codegen/thrift-schema-hs/glean/schema/thrift/gen-hs2/Glean/Schema/CodemarkupSwift/Types.hs" #-}
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE BangPatterns #-}
+{-# OPTIONS_GHC -fno-warn-unused-imports#-}
+{-# OPTIONS_GHC -fno-warn-overlapping-patterns#-}
+{-# OPTIONS_GHC -fno-warn-incomplete-patterns#-}
+{-# OPTIONS_GHC -fno-warn-incomplete-uni-patterns#-}
+{-# OPTIONS_GHC -fno-warn-incomplete-record-updates#-}
+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
+module Glean.Schema.CodemarkupSwift.Types
+       (pREDICATE_VERSIONS, FileXLangSymbolRef_id,
+        FileXLangSymbolRef(FileXLangSymbolRef, fileXLangSymbolRef_id,
+                           fileXLangSymbolRef_key),
+        FileXLangSymbolRef_key(FileXLangSymbolRef_key,
+                               fileXLangSymbolRef_key_file, fileXLangSymbolRef_key_source,
+                               fileXLangSymbolRef_key_symbol))
+       where
+import qualified Control.DeepSeq as DeepSeq
+import qualified Control.Monad as Monad
+import qualified Control.Monad.ST.Trans as ST
+import qualified Control.Monad.Trans.Class as Trans
+import qualified Data.Aeson as Aeson
+import qualified Data.Aeson.Types as Aeson
+import qualified Data.Default as Default
+import qualified Data.HashMap.Strict as HashMap
+import qualified Data.Hashable as Hashable
+import qualified Data.Int as Int
+import qualified Data.List as List
+import qualified Data.Map.Strict as Map
+import qualified Data.Ord as Ord
+import qualified Data.Text as Text
+import qualified Data.Text.Encoding as Text
+import qualified Facebook.Thrift.Annotation.Thrift.Thrift.Types
+       as Facebook.Thrift.Annotation.Thrift.Thrift
+import qualified Glean.Schema.Builtin.Types as Glean.Schema.Builtin
+import qualified Glean.Schema.CodemarkupTypes.Types
+       as Glean.Schema.CodemarkupTypes
+import qualified Glean.Schema.Scip.Types as Glean.Schema.Scip
+import qualified Glean.Schema.Src.Types as Glean.Schema.Src
+import qualified Glean.Types as Glean
+import qualified Prelude as Prelude
+import qualified Rust.Types as Rust
+import qualified Thrift.Binary.Parser as Parser
+import qualified Thrift.CodegenTypesOnly as Thrift
+import Control.Applicative ((<|>), (*>), (<*))
+import Data.Aeson ((.:), (.:?), (.=), (.!=))
+import Data.Monoid ((<>))
+import Prelude ((.), (<$>), (<*>), (>>=), (==), (/=), (<), (++))
+{-# LINE 5 "glean/schema/thrift/codemarkup_swift_include.hs" #-}
+import qualified Data.ByteString
+{-# LINE 6 "glean/schema/thrift/codemarkup_swift_include.hs" #-}
+import qualified Data.Default
+{-# LINE 7 "glean/schema/thrift/codemarkup_swift_include.hs" #-}
+import qualified Data.Text
+{-# LINE 9 "glean/schema/thrift/codemarkup_swift_include.hs" #-}
+import qualified Glean.Types as Glean
+{-# LINE 10 "glean/schema/thrift/codemarkup_swift_include.hs" #-}
+import qualified Glean.Typed as Glean
+{-# LINE 11 "glean/schema/thrift/codemarkup_swift_include.hs" #-}
+import qualified Glean.Query.Angle as Angle
+{-# LINE 12 "glean/schema/thrift/codemarkup_swift_include.hs" #-}
+import qualified Glean.Angle.Types as Angle
+{-# LINE 14 "glean/schema/thrift/codemarkup_swift_include.hs" #-}
+import qualified Glean.Schema.Builtin.Types
+{-# LINE 15 "glean/schema/thrift/codemarkup_swift_include.hs" #-}
+import qualified Glean.Schema.CodemarkupTypes.Types
+{-# LINE 16 "glean/schema/thrift/codemarkup_swift_include.hs" #-}
+import qualified Glean.Schema.Scip.Types
+{-# LINE 17 "glean/schema/thrift/codemarkup_swift_include.hs" #-}
+import qualified Glean.Schema.Src.Types
+{-# LINE 84 ".build/def/codegen/thrift-schema-hs/glean/schema/thrift/gen-hs2/Glean/Schema/CodemarkupSwift/Types.hs" #-}
+
+pREDICATE_VERSIONS :: Map.Map Text.Text Int.Int64
+pREDICATE_VERSIONS = Map.fromList [("FileXLangSymbolRef", 1)]
+
+type FileXLangSymbolRef_id = Glean.Id
+
+data FileXLangSymbolRef = FileXLangSymbolRef{fileXLangSymbolRef_id
+                                             :: {-# UNPACK #-} !FileXLangSymbolRef_id,
+                                             fileXLangSymbolRef_key ::
+                                             Prelude.Maybe FileXLangSymbolRef_key}
+                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FileXLangSymbolRef where
+  toJSON (FileXLangSymbolRef __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct FileXLangSymbolRef where
+  buildStruct _proxy (FileXLangSymbolRef __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (FileXLangSymbolRef __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData FileXLangSymbolRef where
+  rnf (FileXLangSymbolRef __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default FileXLangSymbolRef where
+  def = FileXLangSymbolRef Default.def Prelude.Nothing
+
+instance Hashable.Hashable FileXLangSymbolRef where
+  hashWithSalt __salt (FileXLangSymbolRef _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+data FileXLangSymbolRef_key = FileXLangSymbolRef_key{fileXLangSymbolRef_key_file
+                                                     :: Glean.Schema.Src.File,
+                                                     fileXLangSymbolRef_key_source ::
+                                                     Glean.Schema.CodemarkupTypes.RangeSpan,
+                                                     fileXLangSymbolRef_key_symbol ::
+                                                     Glean.Schema.Scip.Symbol}
+                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FileXLangSymbolRef_key where
+  toJSON
+    (FileXLangSymbolRef_key __field__file __field__source
+       __field__symbol)
+    = Aeson.object
+        ("file" .= __field__file :
+           "source" .= __field__source :
+             "symbol" .= __field__symbol : Prelude.mempty)
+
+instance Thrift.ThriftStruct FileXLangSymbolRef_key where
+  buildStruct _proxy
+    (FileXLangSymbolRef_key __field__file __field__source
+       __field__symbol)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__file)
+           :
+           Thrift.genField _proxy "source" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__source)
+             :
+             Thrift.genField _proxy "symbol" (Thrift.getStructType _proxy) 3 2
+               (Thrift.buildStruct _proxy __field__symbol)
+               : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__file <- ST.newSTRef Default.def
+            __field__source <- ST.newSTRef Default.def
+            __field__symbol <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__file
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__source
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__symbol
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__file <- ST.readSTRef __field__file
+                                             !__val__source <- ST.readSTRef __field__source
+                                             !__val__symbol <- ST.readSTRef __field__symbol
+                                             Prelude.pure
+                                               (FileXLangSymbolRef_key __val__file __val__source
+                                                  __val__symbol)
+              _idMap
+                = HashMap.fromList [("file", 1), ("source", 2), ("symbol", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData FileXLangSymbolRef_key where
+  rnf
+    (FileXLangSymbolRef_key __field__file __field__source
+       __field__symbol)
+    = DeepSeq.rnf __field__file `Prelude.seq`
+        DeepSeq.rnf __field__source `Prelude.seq`
+          DeepSeq.rnf __field__symbol `Prelude.seq` ()
+
+instance Default.Default FileXLangSymbolRef_key where
+  def = FileXLangSymbolRef_key Default.def Default.def Default.def
+
+instance Hashable.Hashable FileXLangSymbolRef_key where
+  hashWithSalt __salt (FileXLangSymbolRef_key _file _source _symbol)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _file)
+           _source)
+        _symbol
+{-# LINE 20 "glean/schema/thrift/codemarkup_swift_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.CodemarkupSwift.Types.FileXLangSymbolRef_key
+         where
+  buildRtsValue b
+    (Glean.Schema.CodemarkupSwift.Types.FileXLangSymbolRef_key x1 x2
+       x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.CodemarkupSwift.Types.FileXLangSymbolRef_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "codemarkup.swift.FileXLangSymbolRef_key"
+           (Prelude.Just 0))
+{-# LINE 31 "glean/schema/thrift/codemarkup_swift_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.CodemarkupSwift.Types.FileXLangSymbolRef_key
+     =
+     'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
+       ('Angle.TField "source"
+          (Glean.Schema.CodemarkupTypes.Types.RangeSpan)
+          ('Angle.TField "symbol"
+             (Glean.KeyType Glean.Schema.Scip.Types.Symbol)
+             ('Angle.TNoFields)))
+{-# LINE 33 "glean/schema/thrift/codemarkup_swift_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.CodemarkupSwift.Types.FileXLangSymbolRef
+         where
+  type KeyType Glean.Schema.CodemarkupSwift.Types.FileXLangSymbolRef
+       = Glean.Schema.CodemarkupSwift.Types.FileXLangSymbolRef_key
+  getName _proxy
+    = Glean.PredicateRef "codemarkup.swift.FileXLangSymbolRef" 1
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.CodemarkupSwift.Types.fileXLangSymbolRef_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.CodemarkupSwift.Types.FileXLangSymbolRef x k
+  getFactKey
+    = Glean.Schema.CodemarkupSwift.Types.fileXLangSymbolRef_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 42 "glean/schema/thrift/codemarkup_swift_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.CodemarkupSwift.Types.FileXLangSymbolRef
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
diff --git a/glean/schema/thrift/gen-hs2/Glean/Schema/Cxx1/Types.hs b/glean/schema/thrift/gen-hs2/Glean/Schema/Cxx1/Types.hs
--- a/glean/schema/thrift/gen-hs2/Glean/Schema/Cxx1/Types.hs
+++ b/glean/schema/thrift/gen-hs2/Glean/Schema/Cxx1/Types.hs
@@ -104,6 +104,12 @@
         ObjcContainerDeclaration_id,
         ObjcContainerDeclaration(ObjcContainerDeclaration,
                                  objcContainerDeclaration_id, objcContainerDeclaration_key),
+        ObjcContainerMethods_id,
+        ObjcContainerMethods(ObjcContainerMethods, objcContainerMethods_id,
+                             objcContainerMethods_key),
+        ObjcContainerProperties_id,
+        ObjcContainerProperties(ObjcContainerProperties,
+                                objcContainerProperties_id, objcContainerProperties_key),
         ObjcMethodDeclaration_id,
         ObjcMethodDeclaration(ObjcMethodDeclaration,
                               objcMethodDeclaration_id, objcMethodDeclaration_key),
@@ -402,6 +408,12 @@
         ObjcContainerDeclaration_key(ObjcContainerDeclaration_key,
                                      objcContainerDeclaration_key_id,
                                      objcContainerDeclaration_key_source),
+        ObjcContainerMethods_key(ObjcContainerMethods_key,
+                                 objcContainerMethods_key_container,
+                                 objcContainerMethods_key_method),
+        ObjcContainerProperties_key(ObjcContainerProperties_key,
+                                    objcContainerProperties_key_container,
+                                    objcContainerProperties_key_property),
         ObjcMethodDeclaration_key(ObjcMethodDeclaration_key,
                                   objcMethodDeclaration_key_selector,
                                   objcMethodDeclaration_key_locations,
@@ -715,7 +727,7 @@
 import qualified Glean.Schema.Pp1.Types
 {-# LINE 18 "glean/schema/thrift/cxx1_include.hs" #-}
 import qualified Glean.Schema.Src.Types
-{-# LINE 719 ".build/def/codegen/thrift-schema-hs/glean/schema/thrift/gen-hs2/Glean/Schema/Cxx1/Types.hs" #-}
+{-# LINE 731 ".build/def/codegen/thrift-schema-hs/glean/schema/thrift/gen-hs2/Glean/Schema/Cxx1/Types.hs" #-}
 
 pREDICATE_VERSIONS :: Map.Map Text.Text Int.Int64
 pREDICATE_VERSIONS
@@ -745,12 +757,12 @@
        ("DeclFamily", 5), ("ObjcPropertyImplementation", 5),
        ("ObjcContainerDefinition", 5),
        ("VariableDeclarationNonLocalByName", 5),
-       ("NamespaceDeclaration", 5), ("RecordDeclarationStruct", 5),
-       ("DeclFamilyOf", 5), ("DeclInObjcContainer", 5),
-       ("TranslationUnitXRefs", 5), ("EnumDefinition", 5),
-       ("NamespaceDefinition", 5), ("DeclarationTargets", 5),
-       ("UsingDirective", 5), ("XRefIndirectTarget", 5),
-       ("ObjcContainerDeclaration", 5),
+       ("ObjcContainerProperties", 5), ("NamespaceDeclaration", 5),
+       ("RecordDeclarationStruct", 5), ("DeclFamilyOf", 5),
+       ("DeclInObjcContainer", 5), ("TranslationUnitXRefs", 5),
+       ("EnumDefinition", 5), ("NamespaceDefinition", 5),
+       ("DeclarationTargets", 5), ("UsingDirective", 5),
+       ("XRefIndirectTarget", 5), ("ObjcContainerDeclaration", 5),
        ("MangledNameHashToDeclaration", 5), ("Type", 5),
        ("ObjcContainerInterfaceLowerCase", 5), ("FunctionName", 5),
        ("ObjcContainerDeclarationInterface", 5), ("FileXRefs", 5),
@@ -771,8 +783,8 @@
        ("NamespaceLowerCase", 5), ("NamespaceQName", 5),
        ("FilePPUseTraceXRefs", 5), ("EnumDeclarationByName", 5),
        ("ObjcPropertyDeclaration", 5), ("EnumLowerCase", 5),
-       ("TypeAliasLowerCase", 5), ("FunctionAttribute", 5), ("Trace", 5),
-       ("FunctionDefinition", 5)]
+       ("ObjcContainerMethods", 5), ("TypeAliasLowerCase", 5),
+       ("FunctionAttribute", 5), ("Trace", 5), ("FunctionDefinition", 5)]
 
 type VariableLowerCase_id = Glean.Id
 
@@ -3183,6 +3195,168 @@
   hashWithSalt __salt (ObjcContainerDeclaration _id _key)
     = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
 
+type ObjcContainerMethods_id = Glean.Id
+
+data ObjcContainerMethods = ObjcContainerMethods{objcContainerMethods_id
+                                                 :: {-# UNPACK #-} !ObjcContainerMethods_id,
+                                                 objcContainerMethods_key ::
+                                                 Prelude.Maybe ObjcContainerMethods_key}
+                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ObjcContainerMethods where
+  toJSON (ObjcContainerMethods __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct ObjcContainerMethods where
+  buildStruct _proxy (ObjcContainerMethods __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (ObjcContainerMethods __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ObjcContainerMethods where
+  rnf (ObjcContainerMethods __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default ObjcContainerMethods where
+  def = ObjcContainerMethods Default.def Prelude.Nothing
+
+instance Hashable.Hashable ObjcContainerMethods where
+  hashWithSalt __salt (ObjcContainerMethods _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type ObjcContainerProperties_id = Glean.Id
+
+data ObjcContainerProperties = ObjcContainerProperties{objcContainerProperties_id
+                                                       ::
+                                                       {-# UNPACK #-} !ObjcContainerProperties_id,
+                                                       objcContainerProperties_key ::
+                                                       Prelude.Maybe ObjcContainerProperties_key}
+                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ObjcContainerProperties where
+  toJSON (ObjcContainerProperties __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct ObjcContainerProperties where
+  buildStruct _proxy
+    (ObjcContainerProperties __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (ObjcContainerProperties __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ObjcContainerProperties where
+  rnf (ObjcContainerProperties __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default ObjcContainerProperties where
+  def = ObjcContainerProperties Default.def Prelude.Nothing
+
+instance Hashable.Hashable ObjcContainerProperties where
+  hashWithSalt __salt (ObjcContainerProperties _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
 type ObjcMethodDeclaration_id = Glean.Id
 
 data ObjcMethodDeclaration = ObjcMethodDeclaration{objcMethodDeclaration_id
@@ -12428,6 +12602,168 @@
   hashWithSalt __salt (ObjcContainerDeclaration_key _id _source)
     = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _source
 
+data ObjcContainerMethods_key = ObjcContainerMethods_key{objcContainerMethods_key_container
+                                                         :: ObjcContainerId,
+                                                         objcContainerMethods_key_method ::
+                                                         ObjcMethodDeclaration}
+                                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ObjcContainerMethods_key where
+  toJSON
+    (ObjcContainerMethods_key __field__container __field__method)
+    = Aeson.object
+        ("container" .= __field__container :
+           "method" .= __field__method : Prelude.mempty)
+
+instance Thrift.ThriftStruct ObjcContainerMethods_key where
+  buildStruct _proxy
+    (ObjcContainerMethods_key __field__container __field__method)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "container" (Thrift.getStructType _proxy) 1
+           0
+           (Thrift.buildStruct _proxy __field__container)
+           :
+           Thrift.genField _proxy "method" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__method)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__container <- ST.newSTRef Default.def
+            __field__method <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__container
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__method
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__container <- ST.readSTRef
+                                                                    __field__container
+                                             !__val__method <- ST.readSTRef __field__method
+                                             Prelude.pure
+                                               (ObjcContainerMethods_key __val__container
+                                                  __val__method)
+              _idMap = HashMap.fromList [("container", 1), ("method", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ObjcContainerMethods_key where
+  rnf (ObjcContainerMethods_key __field__container __field__method)
+    = DeepSeq.rnf __field__container `Prelude.seq`
+        DeepSeq.rnf __field__method `Prelude.seq` ()
+
+instance Default.Default ObjcContainerMethods_key where
+  def = ObjcContainerMethods_key Default.def Default.def
+
+instance Hashable.Hashable ObjcContainerMethods_key where
+  hashWithSalt __salt (ObjcContainerMethods_key _container _method)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _container)
+        _method
+
+data ObjcContainerProperties_key = ObjcContainerProperties_key{objcContainerProperties_key_container
+                                                               :: ObjcContainerId,
+                                                               objcContainerProperties_key_property
+                                                               :: ObjcPropertyDeclaration}
+                                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ObjcContainerProperties_key where
+  toJSON
+    (ObjcContainerProperties_key __field__container __field__property)
+    = Aeson.object
+        ("container" .= __field__container :
+           "property" .= __field__property : Prelude.mempty)
+
+instance Thrift.ThriftStruct ObjcContainerProperties_key where
+  buildStruct _proxy
+    (ObjcContainerProperties_key __field__container __field__property)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "container" (Thrift.getStructType _proxy) 1
+           0
+           (Thrift.buildStruct _proxy __field__container)
+           :
+           Thrift.genField _proxy "property" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__property)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__container <- ST.newSTRef Default.def
+            __field__property <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__container
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__property
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__container <- ST.readSTRef
+                                                                    __field__container
+                                             !__val__property <- ST.readSTRef __field__property
+                                             Prelude.pure
+                                               (ObjcContainerProperties_key __val__container
+                                                  __val__property)
+              _idMap = HashMap.fromList [("container", 1), ("property", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ObjcContainerProperties_key where
+  rnf
+    (ObjcContainerProperties_key __field__container __field__property)
+    = DeepSeq.rnf __field__container `Prelude.seq`
+        DeepSeq.rnf __field__property `Prelude.seq` ()
+
+instance Default.Default ObjcContainerProperties_key where
+  def = ObjcContainerProperties_key Default.def Default.def
+
+instance Hashable.Hashable ObjcContainerProperties_key where
+  hashWithSalt __salt
+    (ObjcContainerProperties_key _container _property)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _container)
+        _property
+
 data ObjcMethodDeclaration_key = ObjcMethodDeclaration_key{objcMethodDeclaration_key_selector
                                                            :: ObjcSelector,
                                                            objcMethodDeclaration_key_locations ::
@@ -23134,6 +23470,53 @@
   sourceType = Glean.predicateSourceType
 {-# LINE 1410 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type
+           Glean.Schema.Cxx1.Types.ObjcContainerProperties_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Cxx1.Types.ObjcContainerProperties_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Cxx1.Types.ObjcContainerProperties_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "cxx1.ObjcContainerProperties_key"
+           (Prelude.Just 0))
+{-# LINE 1419 "glean/schema/thrift/cxx1_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.Cxx1.Types.ObjcContainerProperties_key
+     =
+     'Angle.TField "container" (Glean.Schema.Cxx1.Types.ObjcContainerId)
+       ('Angle.TField "property"
+          (Glean.KeyType Glean.Schema.Cxx1.Types.ObjcPropertyDeclaration)
+          ('Angle.TNoFields))
+{-# LINE 1421 "glean/schema/thrift/cxx1_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Cxx1.Types.ObjcContainerProperties
+         where
+  type KeyType Glean.Schema.Cxx1.Types.ObjcContainerProperties =
+       Glean.Schema.Cxx1.Types.ObjcContainerProperties_key
+  getName _proxy
+    = Glean.PredicateRef "cxx1.ObjcContainerProperties" 5
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Cxx1.Types.objcContainerProperties_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Cxx1.Types.ObjcContainerProperties x k
+  getFactKey = Glean.Schema.Cxx1.Types.objcContainerProperties_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1430 "glean/schema/thrift/cxx1_include.hs" #-}
+instance Glean.Type Glean.Schema.Cxx1.Types.ObjcContainerProperties
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1436 "glean/schema/thrift/cxx1_include.hs" #-}
+instance Glean.Type
            Glean.Schema.Cxx1.Types.NamespaceDeclaration_key
          where
   buildRtsValue b
@@ -23147,7 +23530,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.NamespaceDeclaration_key" (Prelude.Just 0))
-{-# LINE 1419 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1445 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Cxx1.Types.NamespaceDeclaration_key
      =
@@ -23155,7 +23538,7 @@
        (Glean.KeyType Glean.Schema.Cxx1.Types.NamespaceQName)
        ('Angle.TField "source" (Glean.Schema.Src.Types.Range)
           ('Angle.TNoFields))
-{-# LINE 1421 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1447 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.Cxx1.Types.NamespaceDeclaration
          where
@@ -23169,14 +23552,14 @@
     = Glean.Schema.Cxx1.Types.NamespaceDeclaration x k
   getFactKey = Glean.Schema.Cxx1.Types.namespaceDeclaration_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 1430 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1456 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.NamespaceDeclaration
          where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 1436 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1462 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type
            Glean.Schema.Cxx1.Types.RecordDeclarationStruct_key
          where
@@ -23194,7 +23577,7 @@
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.RecordDeclarationStruct_key"
            (Prelude.Just 0))
-{-# LINE 1447 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1473 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields
        Glean.Schema.Cxx1.Types.RecordDeclarationStruct_key
@@ -23204,7 +23587,7 @@
           ('Angle.TField "decl"
              (Glean.KeyType Glean.Schema.Cxx1.Types.RecordDeclaration)
              ('Angle.TNoFields)))
-{-# LINE 1449 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1475 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.Cxx1.Types.RecordDeclarationStruct
          where
@@ -23219,14 +23602,14 @@
     = Glean.Schema.Cxx1.Types.RecordDeclarationStruct x k
   getFactKey = Glean.Schema.Cxx1.Types.recordDeclarationStruct_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 1458 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1484 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.RecordDeclarationStruct
          where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 1464 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1490 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.DeclFamilyOf_key where
   buildRtsValue b (Glean.Schema.Cxx1.Types.DeclFamilyOf_key x1 x2)
     = do Glean.buildRtsValue b x1
@@ -23237,13 +23620,13 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.DeclFamilyOf_key" (Prelude.Just 0))
-{-# LINE 1473 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1499 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Cxx1.Types.DeclFamilyOf_key =
      'Angle.TField "decl" (Glean.Schema.Cxx1.Types.Declaration)
        ('Angle.TField "family" (Glean.Schema.Cxx1.Types.Declaration)
           ('Angle.TNoFields))
-{-# LINE 1475 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1501 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate Glean.Schema.Cxx1.Types.DeclFamilyOf where
   type KeyType Glean.Schema.Cxx1.Types.DeclFamilyOf =
        Glean.Schema.Cxx1.Types.DeclFamilyOf_key
@@ -23254,13 +23637,13 @@
     = Glean.Schema.Cxx1.Types.DeclFamilyOf x k
   getFactKey = Glean.Schema.Cxx1.Types.declFamilyOf_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 1484 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1510 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.DeclFamilyOf where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 1490 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1516 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.DeclInObjcContainer_key
          where
   buildRtsValue b
@@ -23274,7 +23657,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.DeclInObjcContainer_key" (Prelude.Just 0))
-{-# LINE 1499 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1525 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Cxx1.Types.DeclInObjcContainer_key
      =
@@ -23282,7 +23665,7 @@
        ('Angle.TField "record"
           (Glean.KeyType Glean.Schema.Cxx1.Types.ObjcContainerDefinition)
           ('Angle.TNoFields))
-{-# LINE 1501 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1527 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.Cxx1.Types.DeclInObjcContainer
          where
@@ -23296,14 +23679,14 @@
     = Glean.Schema.Cxx1.Types.DeclInObjcContainer x k
   getFactKey = Glean.Schema.Cxx1.Types.declInObjcContainer_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 1510 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1536 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.DeclInObjcContainer
          where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 1516 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1542 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type
            Glean.Schema.Cxx1.Types.TranslationUnitXRefs_key
          where
@@ -23318,7 +23701,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.TranslationUnitXRefs_key" (Prelude.Just 0))
-{-# LINE 1525 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1551 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Cxx1.Types.TranslationUnitXRefs_key
      =
@@ -23326,7 +23709,7 @@
        (Glean.KeyType Glean.Schema.Buck.Types.TranslationUnit)
        ('Angle.TField "xrefs" ([Glean.Schema.Cxx1.Types.FileXRefs])
           ('Angle.TNoFields))
-{-# LINE 1527 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1553 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.Cxx1.Types.TranslationUnitXRefs
          where
@@ -23340,14 +23723,14 @@
     = Glean.Schema.Cxx1.Types.TranslationUnitXRefs x k
   getFactKey = Glean.Schema.Cxx1.Types.translationUnitXRefs_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 1536 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1562 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.TranslationUnitXRefs
          where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 1542 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1568 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.EnumDefinition_key
          where
   buildRtsValue b (Glean.Schema.Cxx1.Types.EnumDefinition_key x1 x2)
@@ -23360,14 +23743,14 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.EnumDefinition_key" (Prelude.Just 0))
-{-# LINE 1551 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1577 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Cxx1.Types.EnumDefinition_key =
      'Angle.TField "declaration"
        (Glean.KeyType Glean.Schema.Cxx1.Types.EnumDeclaration)
        ('Angle.TField "enumerators" ([Glean.Schema.Cxx1.Types.Enumerator])
           ('Angle.TNoFields))
-{-# LINE 1553 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1579 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate Glean.Schema.Cxx1.Types.EnumDefinition
          where
   type KeyType Glean.Schema.Cxx1.Types.EnumDefinition =
@@ -23380,13 +23763,13 @@
     = Glean.Schema.Cxx1.Types.EnumDefinition x k
   getFactKey = Glean.Schema.Cxx1.Types.enumDefinition_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 1562 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1588 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.EnumDefinition where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 1568 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1594 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.NamespaceDefinition_key
          where
   buildRtsValue b
@@ -23400,7 +23783,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.NamespaceDefinition_key" (Prelude.Just 0))
-{-# LINE 1577 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1603 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Cxx1.Types.NamespaceDefinition_key
      =
@@ -23409,7 +23792,7 @@
        ('Angle.TField "members"
           (Glean.KeyType Glean.Schema.Cxx1.Types.Declarations)
           ('Angle.TNoFields))
-{-# LINE 1579 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1605 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.Cxx1.Types.NamespaceDefinition
          where
@@ -23423,14 +23806,14 @@
     = Glean.Schema.Cxx1.Types.NamespaceDefinition x k
   getFactKey = Glean.Schema.Cxx1.Types.namespaceDefinition_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 1588 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1614 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.NamespaceDefinition
          where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 1594 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1620 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.DeclarationTargets_key
          where
   buildRtsValue b
@@ -23444,13 +23827,13 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.DeclarationTargets_key" (Prelude.Just 0))
-{-# LINE 1603 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1629 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Cxx1.Types.DeclarationTargets_key =
      'Angle.TField "source" (Glean.Schema.Cxx1.Types.Declaration)
        ('Angle.TField "targets" ([Glean.Schema.Cxx1.Types.Declaration])
           ('Angle.TNoFields))
-{-# LINE 1605 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1631 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate Glean.Schema.Cxx1.Types.DeclarationTargets
          where
   type KeyType Glean.Schema.Cxx1.Types.DeclarationTargets =
@@ -23463,14 +23846,14 @@
     = Glean.Schema.Cxx1.Types.DeclarationTargets x k
   getFactKey = Glean.Schema.Cxx1.Types.declarationTargets_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 1614 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1640 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.DeclarationTargets
          where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 1620 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1646 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.UsingDirective_key
          where
   buildRtsValue b (Glean.Schema.Cxx1.Types.UsingDirective_key x1 x2)
@@ -23483,13 +23866,13 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.UsingDirective_key" (Prelude.Just 0))
-{-# LINE 1629 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1655 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Cxx1.Types.UsingDirective_key =
      'Angle.TField "name" (Glean.KeyType Glean.Schema.Cxx1.Types.QName)
        ('Angle.TField "source" (Glean.Schema.Src.Types.Range)
           ('Angle.TNoFields))
-{-# LINE 1631 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1657 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate Glean.Schema.Cxx1.Types.UsingDirective
          where
   type KeyType Glean.Schema.Cxx1.Types.UsingDirective =
@@ -23502,13 +23885,13 @@
     = Glean.Schema.Cxx1.Types.UsingDirective x k
   getFactKey = Glean.Schema.Cxx1.Types.usingDirective_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 1640 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1666 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.UsingDirective where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 1646 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1672 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.XRefIndirectTarget_key
          where
   buildRtsValue b
@@ -23522,13 +23905,13 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.XRefIndirectTarget_key" (Prelude.Just 0))
-{-# LINE 1655 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1681 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Cxx1.Types.XRefIndirectTarget_key =
      'Angle.TField "via" (Glean.Schema.Cxx1.Types.XRefVia)
        ('Angle.TField "target" (Glean.Schema.Cxx1.Types.XRefTarget)
           ('Angle.TNoFields))
-{-# LINE 1657 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1683 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate Glean.Schema.Cxx1.Types.XRefIndirectTarget
          where
   type KeyType Glean.Schema.Cxx1.Types.XRefIndirectTarget =
@@ -23541,14 +23924,14 @@
     = Glean.Schema.Cxx1.Types.XRefIndirectTarget x k
   getFactKey = Glean.Schema.Cxx1.Types.xRefIndirectTarget_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 1666 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1692 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.XRefIndirectTarget
          where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 1672 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1698 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type
            Glean.Schema.Cxx1.Types.ObjcContainerDeclaration_key
          where
@@ -23564,7 +23947,7 @@
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.ObjcContainerDeclaration_key"
            (Prelude.Just 0))
-{-# LINE 1681 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1707 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields
        Glean.Schema.Cxx1.Types.ObjcContainerDeclaration_key
@@ -23572,7 +23955,7 @@
      'Angle.TField "id" (Glean.Schema.Cxx1.Types.ObjcContainerId)
        ('Angle.TField "source" (Glean.Schema.Src.Types.Range)
           ('Angle.TNoFields))
-{-# LINE 1683 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1709 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.Cxx1.Types.ObjcContainerDeclaration
          where
@@ -23587,7 +23970,7 @@
     = Glean.Schema.Cxx1.Types.ObjcContainerDeclaration x k
   getFactKey = Glean.Schema.Cxx1.Types.objcContainerDeclaration_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 1692 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1718 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type
            Glean.Schema.Cxx1.Types.ObjcContainerDeclaration
          where
@@ -23595,7 +23978,7 @@
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 1698 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1724 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type
            Glean.Schema.Cxx1.Types.MangledNameHashToDeclaration_key
          where
@@ -23611,7 +23994,7 @@
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.MangledNameHashToDeclaration_key"
            (Prelude.Just 0))
-{-# LINE 1707 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1733 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields
        Glean.Schema.Cxx1.Types.MangledNameHashToDeclaration_key
@@ -23619,7 +24002,7 @@
      'Angle.TField "hash" (Glean.Schema.Cxx1.Types.MangledNameHash)
        ('Angle.TField "declaration" (Glean.Schema.Cxx1.Types.Declaration)
           ('Angle.TNoFields))
-{-# LINE 1709 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1735 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.Cxx1.Types.MangledNameHashToDeclaration
          where
@@ -23635,7 +24018,7 @@
   getFactKey
     = Glean.Schema.Cxx1.Types.mangledNameHashToDeclaration_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 1718 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1744 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type
            Glean.Schema.Cxx1.Types.MangledNameHashToDeclaration
          where
@@ -23643,7 +24026,7 @@
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 1724 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1750 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate Glean.Schema.Cxx1.Types.Type where
   type KeyType Glean.Schema.Cxx1.Types.Type = Data.Text.Text
   getName _proxy = Glean.PredicateRef "cxx1.Type" 5
@@ -23652,13 +24035,13 @@
     = Glean.Schema.Cxx1.Types.Type x k
   getFactKey = Glean.Schema.Cxx1.Types.type_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 1732 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1758 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.Type where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 1738 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1764 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type
            Glean.Schema.Cxx1.Types.ObjcContainerInterfaceLowerCase_key
          where
@@ -23674,14 +24057,14 @@
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.ObjcContainerInterfaceLowerCase_key"
            (Prelude.Just 0))
-{-# LINE 1747 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1773 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields
        Glean.Schema.Cxx1.Types.ObjcContainerInterfaceLowerCase_key
      =
      'Angle.TField "name_lowercase" (Data.Text.Text)
        ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields))
-{-# LINE 1749 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1775 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.Cxx1.Types.ObjcContainerInterfaceLowerCase
          where
@@ -23699,7 +24082,7 @@
   getFactKey
     = Glean.Schema.Cxx1.Types.objcContainerInterfaceLowerCase_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 1758 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1784 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type
            Glean.Schema.Cxx1.Types.ObjcContainerInterfaceLowerCase
          where
@@ -23707,7 +24090,7 @@
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 1764 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1790 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.FunctionName_key where
   buildRtsValue b Glean.Schema.Cxx1.Types.FunctionName_key_EMPTY
     = Glean.buildRtsSelector b 6
@@ -23748,7 +24131,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.FunctionName_key" (Prelude.Just 0))
-{-# LINE 1796 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1822 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.SumFields Glean.Schema.Cxx1.Types.FunctionName_key =
      'Angle.TField "name" (Glean.KeyType Glean.Schema.Cxx1.Types.Name)
@@ -23760,7 +24143,7 @@
                    ('Angle.TField "conversionOperator"
                       (Glean.KeyType Glean.Schema.Cxx1.Types.Type)
                       ('Angle.TNoFields))))))
-{-# LINE 1798 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1824 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate Glean.Schema.Cxx1.Types.FunctionName where
   type KeyType Glean.Schema.Cxx1.Types.FunctionName =
        Glean.Schema.Cxx1.Types.FunctionName_key
@@ -23771,13 +24154,13 @@
     = Glean.Schema.Cxx1.Types.FunctionName x k
   getFactKey = Glean.Schema.Cxx1.Types.functionName_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 1807 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1833 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.FunctionName where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 1813 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1839 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type
            Glean.Schema.Cxx1.Types.ObjcContainerDeclarationInterface_key
          where
@@ -23794,7 +24177,7 @@
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.ObjcContainerDeclarationInterface_key"
            (Prelude.Just 0))
-{-# LINE 1822 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1848 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields
        Glean.Schema.Cxx1.Types.ObjcContainerDeclarationInterface_key
@@ -23803,7 +24186,7 @@
        ('Angle.TField "decl"
           (Glean.KeyType Glean.Schema.Cxx1.Types.ObjcContainerDeclaration)
           ('Angle.TNoFields))
-{-# LINE 1824 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1850 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.Cxx1.Types.ObjcContainerDeclarationInterface
          where
@@ -23821,7 +24204,7 @@
   getFactKey
     = Glean.Schema.Cxx1.Types.objcContainerDeclarationInterface_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 1834 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1860 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type
            Glean.Schema.Cxx1.Types.ObjcContainerDeclarationInterface
          where
@@ -23829,7 +24212,7 @@
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 1840 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1866 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.FileXRefs_key where
   buildRtsValue b (Glean.Schema.Cxx1.Types.FileXRefs_key x1 x2)
     = do Glean.buildRtsValue b x1
@@ -23840,14 +24223,14 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.FileXRefs_key" (Prelude.Just 0))
-{-# LINE 1849 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1875 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Cxx1.Types.FileXRefs_key =
      'Angle.TField "xmap"
        (Glean.KeyType Glean.Schema.Cxx1.Types.FileXRefMap)
        ('Angle.TField "targets" ([Glean.Schema.Cxx1.Types.XRefTargets])
           ('Angle.TNoFields))
-{-# LINE 1851 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1877 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate Glean.Schema.Cxx1.Types.FileXRefs where
   type KeyType Glean.Schema.Cxx1.Types.FileXRefs =
        Glean.Schema.Cxx1.Types.FileXRefs_key
@@ -23858,13 +24241,13 @@
     = Glean.Schema.Cxx1.Types.FileXRefs x k
   getFactKey = Glean.Schema.Cxx1.Types.fileXRefs_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 1860 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1886 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.FileXRefs where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 1866 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1892 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type
            Glean.Schema.Cxx1.Types.DeclarationLocationNameSpan_key
          where
@@ -23887,7 +24270,7 @@
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.DeclarationLocationNameSpan_key"
            (Prelude.Just 0))
-{-# LINE 1881 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1907 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields
        Glean.Schema.Cxx1.Types.DeclarationLocationNameSpan_key
@@ -23898,7 +24281,7 @@
              ('Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
                 ('Angle.TField "span" (Glean.Schema.Src.Types.ByteSpan)
                    ('Angle.TNoFields)))))
-{-# LINE 1883 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1909 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.Cxx1.Types.DeclarationLocationNameSpan
          where
@@ -23914,7 +24297,7 @@
   getFactKey
     = Glean.Schema.Cxx1.Types.declarationLocationNameSpan_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 1892 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1918 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type
            Glean.Schema.Cxx1.Types.DeclarationLocationNameSpan
          where
@@ -23922,7 +24305,7 @@
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 1898 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1924 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type
            Glean.Schema.Cxx1.Types.NamespaceDeclarationByName_key
          where
@@ -23940,7 +24323,7 @@
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.NamespaceDeclarationByName_key"
            (Prelude.Just 0))
-{-# LINE 1909 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1935 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields
        Glean.Schema.Cxx1.Types.NamespaceDeclarationByName_key
@@ -23951,7 +24334,7 @@
           ('Angle.TField "decl"
              (Glean.KeyType Glean.Schema.Cxx1.Types.NamespaceDeclaration)
              ('Angle.TNoFields)))
-{-# LINE 1911 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1937 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.Cxx1.Types.NamespaceDeclarationByName
          where
@@ -23966,7 +24349,7 @@
     = Glean.Schema.Cxx1.Types.NamespaceDeclarationByName x k
   getFactKey = Glean.Schema.Cxx1.Types.namespaceDeclarationByName_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 1920 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1946 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type
            Glean.Schema.Cxx1.Types.NamespaceDeclarationByName
          where
@@ -23974,7 +24357,7 @@
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 1926 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1952 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type
            Glean.Schema.Cxx1.Types.TranslationUnitIncludeTree_key
          where
@@ -23990,7 +24373,7 @@
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.TranslationUnitIncludeTree_key"
            (Prelude.Just 0))
-{-# LINE 1935 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1961 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields
        Glean.Schema.Cxx1.Types.TranslationUnitIncludeTree_key
@@ -24000,7 +24383,7 @@
        ('Angle.TField "tree"
           (Glean.KeyType Glean.Schema.Cxx1.Types.IncludeTree)
           ('Angle.TNoFields))
-{-# LINE 1937 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1963 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.Cxx1.Types.TranslationUnitIncludeTree
          where
@@ -24015,7 +24398,7 @@
     = Glean.Schema.Cxx1.Types.TranslationUnitIncludeTree x k
   getFactKey = Glean.Schema.Cxx1.Types.translationUnitIncludeTree_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 1946 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1972 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type
            Glean.Schema.Cxx1.Types.TranslationUnitIncludeTree
          where
@@ -24023,7 +24406,7 @@
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 1952 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1978 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.FileXRefMap_key where
   buildRtsValue b (Glean.Schema.Cxx1.Types.FileXRefMap_key x1 x2 x3)
     = do Glean.buildRtsValue b x1
@@ -24036,14 +24419,14 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.FileXRefMap_key" (Prelude.Just 0))
-{-# LINE 1963 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1989 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Cxx1.Types.FileXRefMap_key =
      'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
        ('Angle.TField "fixed" ([Glean.Schema.Cxx1.Types.FixedXRef])
           ('Angle.TField "froms" ([Glean.Schema.Cxx1.Types.From])
              ('Angle.TNoFields)))
-{-# LINE 1965 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 1991 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate Glean.Schema.Cxx1.Types.FileXRefMap where
   type KeyType Glean.Schema.Cxx1.Types.FileXRefMap =
        Glean.Schema.Cxx1.Types.FileXRefMap_key
@@ -24054,13 +24437,13 @@
     = Glean.Schema.Cxx1.Types.FileXRefMap x k
   getFactKey = Glean.Schema.Cxx1.Types.fileXRefMap_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 1974 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2000 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.FileXRefMap where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 1980 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2006 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type
            Glean.Schema.Cxx1.Types.IncludeTreeTranslationUnit_key
          where
@@ -24076,7 +24459,7 @@
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.IncludeTreeTranslationUnit_key"
            (Prelude.Just 0))
-{-# LINE 1989 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2015 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields
        Glean.Schema.Cxx1.Types.IncludeTreeTranslationUnit_key
@@ -24086,7 +24469,7 @@
        ('Angle.TField "tunit"
           (Glean.KeyType Glean.Schema.Buck.Types.TranslationUnit)
           ('Angle.TNoFields))
-{-# LINE 1991 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2017 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.Cxx1.Types.IncludeTreeTranslationUnit
          where
@@ -24101,7 +24484,7 @@
     = Glean.Schema.Cxx1.Types.IncludeTreeTranslationUnit x k
   getFactKey = Glean.Schema.Cxx1.Types.includeTreeTranslationUnit_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 2000 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2026 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type
            Glean.Schema.Cxx1.Types.IncludeTreeTranslationUnit
          where
@@ -24109,7 +24492,7 @@
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 2006 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2032 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.DefnInRecord_key where
   buildRtsValue b (Glean.Schema.Cxx1.Types.DefnInRecord_key x1 x2)
     = do Glean.buildRtsValue b x1
@@ -24120,14 +24503,14 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.DefnInRecord_key" (Prelude.Just 0))
-{-# LINE 2015 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2041 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Cxx1.Types.DefnInRecord_key =
      'Angle.TField "defn" (Glean.Schema.Cxx1.Types.DefinitionEntity)
        ('Angle.TField "record"
           (Glean.KeyType Glean.Schema.Cxx1.Types.RecordDefinition)
           ('Angle.TNoFields))
-{-# LINE 2017 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2043 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate Glean.Schema.Cxx1.Types.DefnInRecord where
   type KeyType Glean.Schema.Cxx1.Types.DefnInRecord =
        Glean.Schema.Cxx1.Types.DefnInRecord_key
@@ -24138,13 +24521,13 @@
     = Glean.Schema.Cxx1.Types.DefnInRecord x k
   getFactKey = Glean.Schema.Cxx1.Types.defnInRecord_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 2026 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2052 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.DefnInRecord where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 2032 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2058 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.Enumerator_key where
   buildRtsValue b (Glean.Schema.Cxx1.Types.Enumerator_key x1 x2 x3)
     = do Glean.buildRtsValue b x1
@@ -24157,7 +24540,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.Enumerator_key" (Prelude.Just 0))
-{-# LINE 2043 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2069 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Cxx1.Types.Enumerator_key =
      'Angle.TField "name" (Glean.KeyType Glean.Schema.Cxx1.Types.Name)
@@ -24165,7 +24548,7 @@
           (Glean.KeyType Glean.Schema.Cxx1.Types.EnumDeclaration)
           ('Angle.TField "source" (Glean.Schema.Src.Types.Range)
              ('Angle.TNoFields)))
-{-# LINE 2045 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2071 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate Glean.Schema.Cxx1.Types.Enumerator where
   type KeyType Glean.Schema.Cxx1.Types.Enumerator =
        Glean.Schema.Cxx1.Types.Enumerator_key
@@ -24176,13 +24559,13 @@
     = Glean.Schema.Cxx1.Types.Enumerator x k
   getFactKey = Glean.Schema.Cxx1.Types.enumerator_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 2054 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2080 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.Enumerator where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 2060 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2086 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.EnumeratorLowerCase_key
          where
   buildRtsValue b
@@ -24196,13 +24579,13 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.EnumeratorLowerCase_key" (Prelude.Just 0))
-{-# LINE 2069 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2095 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Cxx1.Types.EnumeratorLowerCase_key
      =
      'Angle.TField "name_lowercase" (Data.Text.Text)
        ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields))
-{-# LINE 2071 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2097 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.Cxx1.Types.EnumeratorLowerCase
          where
@@ -24216,14 +24599,14 @@
     = Glean.Schema.Cxx1.Types.EnumeratorLowerCase x k
   getFactKey = Glean.Schema.Cxx1.Types.enumeratorLowerCase_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 2080 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2106 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.EnumeratorLowerCase
          where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 2086 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2112 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.IncludeTreeParent_key
          where
   buildRtsValue b
@@ -24237,7 +24620,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.IncludeTreeParent_key" (Prelude.Just 0))
-{-# LINE 2095 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2121 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Cxx1.Types.IncludeTreeParent_key =
      'Angle.TField "tree"
@@ -24245,7 +24628,7 @@
        ('Angle.TField "parent"
           (Glean.KeyType Glean.Schema.Cxx1.Types.IncludeTree)
           ('Angle.TNoFields))
-{-# LINE 2097 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2123 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate Glean.Schema.Cxx1.Types.IncludeTreeParent
          where
   type KeyType Glean.Schema.Cxx1.Types.IncludeTreeParent =
@@ -24258,13 +24641,13 @@
     = Glean.Schema.Cxx1.Types.IncludeTreeParent x k
   getFactKey = Glean.Schema.Cxx1.Types.includeTreeParent_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 2106 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2132 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.IncludeTreeParent where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 2112 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2138 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.DeclInRecord_key where
   buildRtsValue b (Glean.Schema.Cxx1.Types.DeclInRecord_key x1 x2)
     = do Glean.buildRtsValue b x1
@@ -24275,14 +24658,14 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.DeclInRecord_key" (Prelude.Just 0))
-{-# LINE 2121 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2147 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Cxx1.Types.DeclInRecord_key =
      'Angle.TField "decl" (Glean.Schema.Cxx1.Types.Declaration)
        ('Angle.TField "record"
           (Glean.KeyType Glean.Schema.Cxx1.Types.RecordDefinition)
           ('Angle.TNoFields))
-{-# LINE 2123 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2149 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate Glean.Schema.Cxx1.Types.DeclInRecord where
   type KeyType Glean.Schema.Cxx1.Types.DeclInRecord =
        Glean.Schema.Cxx1.Types.DeclInRecord_key
@@ -24293,13 +24676,13 @@
     = Glean.Schema.Cxx1.Types.DeclInRecord x k
   getFactKey = Glean.Schema.Cxx1.Types.declInRecord_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 2132 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2158 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.DeclInRecord where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 2138 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2164 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type
            Glean.Schema.Cxx1.Types.RecordStructLowerCase_key
          where
@@ -24314,14 +24697,14 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.RecordStructLowerCase_key" (Prelude.Just 0))
-{-# LINE 2147 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2173 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields
        Glean.Schema.Cxx1.Types.RecordStructLowerCase_key
      =
      'Angle.TField "name_lowercase" (Data.Text.Text)
        ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields))
-{-# LINE 2149 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2175 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.Cxx1.Types.RecordStructLowerCase
          where
@@ -24335,14 +24718,14 @@
     = Glean.Schema.Cxx1.Types.RecordStructLowerCase x k
   getFactKey = Glean.Schema.Cxx1.Types.recordStructLowerCase_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 2158 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2184 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.RecordStructLowerCase
          where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 2164 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2190 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.Cxx1.Types.ObjcMethodDefinition
          where
@@ -24356,14 +24739,14 @@
     = Glean.Schema.Cxx1.Types.ObjcMethodDefinition x k
   getFactKey = Glean.Schema.Cxx1.Types.objcMethodDefinition_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 2173 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2199 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.ObjcMethodDefinition
          where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 2179 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2205 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.ObjcContainerBase_key
          where
   buildRtsValue b
@@ -24377,7 +24760,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.ObjcContainerBase_key" (Prelude.Just 0))
-{-# LINE 2188 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2214 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Cxx1.Types.ObjcContainerBase_key =
      'Angle.TField "declaration"
@@ -24385,7 +24768,7 @@
        ('Angle.TField "base"
           (Glean.KeyType Glean.Schema.Cxx1.Types.ObjcContainerDeclaration)
           ('Angle.TNoFields))
-{-# LINE 2190 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2216 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate Glean.Schema.Cxx1.Types.ObjcContainerBase
          where
   type KeyType Glean.Schema.Cxx1.Types.ObjcContainerBase =
@@ -24398,13 +24781,13 @@
     = Glean.Schema.Cxx1.Types.ObjcContainerBase x k
   getFactKey = Glean.Schema.Cxx1.Types.objcContainerBase_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 2199 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2225 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.ObjcContainerBase where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 2205 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2231 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.VariableLowerCase_key
          where
   buildRtsValue b
@@ -24418,12 +24801,12 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.VariableLowerCase_key" (Prelude.Just 0))
-{-# LINE 2214 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2240 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Cxx1.Types.VariableLowerCase_key =
      'Angle.TField "name_lowercase" (Data.Text.Text)
        ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields))
-{-# LINE 2216 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2242 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate Glean.Schema.Cxx1.Types.VariableLowerCase
          where
   type KeyType Glean.Schema.Cxx1.Types.VariableLowerCase =
@@ -24436,13 +24819,13 @@
     = Glean.Schema.Cxx1.Types.VariableLowerCase x k
   getFactKey = Glean.Schema.Cxx1.Types.variableLowerCase_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 2225 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2251 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.VariableLowerCase where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 2231 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2257 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.FunctionDeclaration_key
          where
   buildRtsValue b
@@ -24460,7 +24843,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.FunctionDeclaration_key" (Prelude.Just 0))
-{-# LINE 2244 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2270 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Cxx1.Types.FunctionDeclaration_key
      =
@@ -24472,7 +24855,7 @@
              (Prelude.Maybe Glean.Schema.Cxx1.Types.MethodSignature)
              ('Angle.TField "source" (Glean.Schema.Src.Types.Range)
                 ('Angle.TNoFields))))
-{-# LINE 2246 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2272 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.Cxx1.Types.FunctionDeclaration
          where
@@ -24486,14 +24869,14 @@
     = Glean.Schema.Cxx1.Types.FunctionDeclaration x k
   getFactKey = Glean.Schema.Cxx1.Types.functionDeclaration_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 2255 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2281 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.FunctionDeclaration
          where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 2261 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2287 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.RecordDerived_key where
   buildRtsValue b (Glean.Schema.Cxx1.Types.RecordDerived_key x1 x2)
     = do Glean.buildRtsValue b x1
@@ -24505,7 +24888,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.RecordDerived_key" (Prelude.Just 0))
-{-# LINE 2270 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2296 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Cxx1.Types.RecordDerived_key =
      'Angle.TField "base"
@@ -24513,7 +24896,7 @@
        ('Angle.TField "derived"
           (Glean.KeyType Glean.Schema.Cxx1.Types.RecordDeclaration)
           ('Angle.TNoFields))
-{-# LINE 2272 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2298 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate Glean.Schema.Cxx1.Types.RecordDerived
          where
   type KeyType Glean.Schema.Cxx1.Types.RecordDerived =
@@ -24525,13 +24908,13 @@
     = Glean.Schema.Cxx1.Types.RecordDerived x k
   getFactKey = Glean.Schema.Cxx1.Types.recordDerived_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 2281 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2307 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.RecordDerived where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 2287 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2313 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.UsingDeclaration_key
          where
   buildRtsValue b
@@ -24545,14 +24928,14 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.UsingDeclaration_key" (Prelude.Just 0))
-{-# LINE 2296 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2322 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Cxx1.Types.UsingDeclaration_key =
      'Angle.TField "name"
        (Glean.KeyType Glean.Schema.Cxx1.Types.FunctionQName)
        ('Angle.TField "source" (Glean.Schema.Src.Types.Range)
           ('Angle.TNoFields))
-{-# LINE 2298 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2324 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate Glean.Schema.Cxx1.Types.UsingDeclaration
          where
   type KeyType Glean.Schema.Cxx1.Types.UsingDeclaration =
@@ -24565,13 +24948,13 @@
     = Glean.Schema.Cxx1.Types.UsingDeclaration x k
   getFactKey = Glean.Schema.Cxx1.Types.usingDeclaration_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 2307 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2333 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.UsingDeclaration where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 2313 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2339 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.RecordDeclaration_key
          where
   buildRtsValue b
@@ -24587,14 +24970,14 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.RecordDeclaration_key" (Prelude.Just 0))
-{-# LINE 2324 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2350 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Cxx1.Types.RecordDeclaration_key =
      'Angle.TField "name" (Glean.KeyType Glean.Schema.Cxx1.Types.QName)
        ('Angle.TField "kind" (Glean.Schema.Cxx1.Types.RecordKind)
           ('Angle.TField "source" (Glean.Schema.Src.Types.Range)
              ('Angle.TNoFields)))
-{-# LINE 2326 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2352 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate Glean.Schema.Cxx1.Types.RecordDeclaration
          where
   type KeyType Glean.Schema.Cxx1.Types.RecordDeclaration =
@@ -24607,13 +24990,13 @@
     = Glean.Schema.Cxx1.Types.RecordDeclaration x k
   getFactKey = Glean.Schema.Cxx1.Types.recordDeclaration_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 2335 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2361 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.RecordDeclaration where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 2341 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2367 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type
            Glean.Schema.Cxx1.Types.FunctionDeclarationNameString_key
          where
@@ -24629,7 +25012,7 @@
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.FunctionDeclarationNameString_key"
            (Prelude.Just 0))
-{-# LINE 2350 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2376 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields
        Glean.Schema.Cxx1.Types.FunctionDeclarationNameString_key
@@ -24637,7 +25020,7 @@
      'Angle.TField "fname"
        (Glean.KeyType Glean.Schema.Cxx1.Types.FunctionName)
        ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields))
-{-# LINE 2352 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2378 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.Cxx1.Types.FunctionDeclarationNameString
          where
@@ -24654,7 +25037,7 @@
   getFactKey
     = Glean.Schema.Cxx1.Types.functionDeclarationNameString_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 2361 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2387 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type
            Glean.Schema.Cxx1.Types.FunctionDeclarationNameString
          where
@@ -24662,7 +25045,7 @@
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 2367 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2393 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type
            Glean.Schema.Cxx1.Types.RecordDeclarationUnion_key
          where
@@ -24680,7 +25063,7 @@
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.RecordDeclarationUnion_key"
            (Prelude.Just 0))
-{-# LINE 2378 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2404 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields
        Glean.Schema.Cxx1.Types.RecordDeclarationUnion_key
@@ -24690,7 +25073,7 @@
           ('Angle.TField "decl"
              (Glean.KeyType Glean.Schema.Cxx1.Types.RecordDeclaration)
              ('Angle.TNoFields)))
-{-# LINE 2380 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2406 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.Cxx1.Types.RecordDeclarationUnion
          where
@@ -24704,14 +25087,14 @@
     = Glean.Schema.Cxx1.Types.RecordDeclarationUnion x k
   getFactKey = Glean.Schema.Cxx1.Types.recordDeclarationUnion_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 2389 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2415 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.RecordDeclarationUnion
          where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 2395 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2421 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type
            Glean.Schema.Cxx1.Types.RecordDeclarationClass_key
          where
@@ -24729,7 +25112,7 @@
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.RecordDeclarationClass_key"
            (Prelude.Just 0))
-{-# LINE 2406 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2432 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields
        Glean.Schema.Cxx1.Types.RecordDeclarationClass_key
@@ -24739,7 +25122,7 @@
           ('Angle.TField "decl"
              (Glean.KeyType Glean.Schema.Cxx1.Types.RecordDeclaration)
              ('Angle.TNoFields)))
-{-# LINE 2408 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2434 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.Cxx1.Types.RecordDeclarationClass
          where
@@ -24753,14 +25136,14 @@
     = Glean.Schema.Cxx1.Types.RecordDeclarationClass x k
   getFactKey = Glean.Schema.Cxx1.Types.recordDeclarationClass_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 2417 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2443 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.RecordDeclarationClass
          where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 2423 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2449 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type
            Glean.Schema.Cxx1.Types.ObjcInterfaceToImplementation_key
          where
@@ -24776,7 +25159,7 @@
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.ObjcInterfaceToImplementation_key"
            (Prelude.Just 0))
-{-# LINE 2432 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2458 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields
        Glean.Schema.Cxx1.Types.ObjcInterfaceToImplementation_key
@@ -24786,7 +25169,7 @@
        ('Angle.TField "implementation"
           (Glean.KeyType Glean.Schema.Cxx1.Types.ObjcContainerDeclaration)
           ('Angle.TNoFields))
-{-# LINE 2434 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2460 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.Cxx1.Types.ObjcInterfaceToImplementation
          where
@@ -24803,7 +25186,7 @@
   getFactKey
     = Glean.Schema.Cxx1.Types.objcInterfaceToImplementation_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 2443 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2469 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type
            Glean.Schema.Cxx1.Types.ObjcInterfaceToImplementation
          where
@@ -24811,7 +25194,7 @@
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 2449 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2475 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.PPDefineLocation_key
          where
   buildRtsValue b
@@ -24829,7 +25212,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.PPDefineLocation_key" (Prelude.Just 0))
-{-# LINE 2462 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2488 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Cxx1.Types.PPDefineLocation_key =
      'Angle.TField "define"
@@ -24838,7 +25221,7 @@
           ('Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
              ('Angle.TField "range" (Glean.Schema.Src.Types.Range)
                 ('Angle.TNoFields))))
-{-# LINE 2464 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2490 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate Glean.Schema.Cxx1.Types.PPDefineLocation
          where
   type KeyType Glean.Schema.Cxx1.Types.PPDefineLocation =
@@ -24851,13 +25234,13 @@
     = Glean.Schema.Cxx1.Types.PPDefineLocation x k
   getFactKey = Glean.Schema.Cxx1.Types.pPDefineLocation_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 2473 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2499 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.PPDefineLocation where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 2479 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2505 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.DeclarationScope_key
          where
   buildRtsValue b
@@ -24871,13 +25254,13 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.DeclarationScope_key" (Prelude.Just 0))
-{-# LINE 2488 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2514 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Cxx1.Types.DeclarationScope_key =
      'Angle.TField "decl" (Glean.Schema.Cxx1.Types.Declaration)
        ('Angle.TField "scope" (Glean.Schema.Cxx1.Types.Scope)
           ('Angle.TNoFields))
-{-# LINE 2490 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2516 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate Glean.Schema.Cxx1.Types.DeclarationScope
          where
   type KeyType Glean.Schema.Cxx1.Types.DeclarationScope =
@@ -24890,13 +25273,13 @@
     = Glean.Schema.Cxx1.Types.DeclarationScope x k
   getFactKey = Glean.Schema.Cxx1.Types.declarationScope_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 2499 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2525 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.DeclarationScope where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 2505 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2531 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.DeclarationComment_key
          where
   buildRtsValue b
@@ -24912,14 +25295,14 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.DeclarationComment_key" (Prelude.Just 0))
-{-# LINE 2516 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2542 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Cxx1.Types.DeclarationComment_key =
      'Angle.TField "declaration" (Glean.Schema.Cxx1.Types.Declaration)
        ('Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
           ('Angle.TField "span" (Glean.Schema.Src.Types.ByteSpan)
              ('Angle.TNoFields)))
-{-# LINE 2518 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2544 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate Glean.Schema.Cxx1.Types.DeclarationComment
          where
   type KeyType Glean.Schema.Cxx1.Types.DeclarationComment =
@@ -24932,14 +25315,14 @@
     = Glean.Schema.Cxx1.Types.DeclarationComment x k
   getFactKey = Glean.Schema.Cxx1.Types.declarationComment_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 2527 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2553 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.DeclarationComment
          where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 2533 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2559 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.NamespaceLowerCase_key
          where
   buildRtsValue b
@@ -24953,12 +25336,12 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.NamespaceLowerCase_key" (Prelude.Just 0))
-{-# LINE 2542 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2568 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Cxx1.Types.NamespaceLowerCase_key =
      'Angle.TField "name_lowercase" (Data.Text.Text)
        ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields))
-{-# LINE 2544 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2570 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate Glean.Schema.Cxx1.Types.NamespaceLowerCase
          where
   type KeyType Glean.Schema.Cxx1.Types.NamespaceLowerCase =
@@ -24971,14 +25354,14 @@
     = Glean.Schema.Cxx1.Types.NamespaceLowerCase x k
   getFactKey = Glean.Schema.Cxx1.Types.namespaceLowerCase_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 2553 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2579 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.NamespaceLowerCase
          where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 2559 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2585 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.NamespaceQName_key
          where
   buildRtsValue b (Glean.Schema.Cxx1.Types.NamespaceQName_key x1 x2)
@@ -24991,14 +25374,14 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.NamespaceQName_key" (Prelude.Just 0))
-{-# LINE 2568 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2594 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Cxx1.Types.NamespaceQName_key =
      'Angle.TField "name" (Prelude.Maybe Glean.Schema.Cxx1.Types.Name)
        ('Angle.TField "parent"
           (Prelude.Maybe Glean.Schema.Cxx1.Types.NamespaceQName)
           ('Angle.TNoFields))
-{-# LINE 2570 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2596 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate Glean.Schema.Cxx1.Types.NamespaceQName
          where
   type KeyType Glean.Schema.Cxx1.Types.NamespaceQName =
@@ -25011,13 +25394,13 @@
     = Glean.Schema.Cxx1.Types.NamespaceQName x k
   getFactKey = Glean.Schema.Cxx1.Types.namespaceQName_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 2579 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2605 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.NamespaceQName where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 2585 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2611 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.FilePPUseTraceXRefs_key
          where
   buildRtsValue b
@@ -25035,7 +25418,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.FilePPUseTraceXRefs_key" (Prelude.Just 0))
-{-# LINE 2598 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2624 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Cxx1.Types.FilePPUseTraceXRefs_key
      =
@@ -25046,7 +25429,7 @@
              ('Angle.TField "define"
                 (Glean.KeyType Glean.Schema.Pp1.Types.Define)
                 ('Angle.TNoFields))))
-{-# LINE 2600 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2626 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.Cxx1.Types.FilePPUseTraceXRefs
          where
@@ -25060,14 +25443,14 @@
     = Glean.Schema.Cxx1.Types.FilePPUseTraceXRefs x k
   getFactKey = Glean.Schema.Cxx1.Types.filePPUseTraceXRefs_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 2609 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2635 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.FilePPUseTraceXRefs
          where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 2615 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2641 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type
            Glean.Schema.Cxx1.Types.EnumDeclarationByName_key
          where
@@ -25084,7 +25467,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.EnumDeclarationByName_key" (Prelude.Just 0))
-{-# LINE 2626 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2652 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields
        Glean.Schema.Cxx1.Types.EnumDeclarationByName_key
@@ -25094,7 +25477,7 @@
           ('Angle.TField "decl"
              (Glean.KeyType Glean.Schema.Cxx1.Types.EnumDeclaration)
              ('Angle.TNoFields)))
-{-# LINE 2628 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2654 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.Cxx1.Types.EnumDeclarationByName
          where
@@ -25108,14 +25491,14 @@
     = Glean.Schema.Cxx1.Types.EnumDeclarationByName x k
   getFactKey = Glean.Schema.Cxx1.Types.enumDeclarationByName_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 2637 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2663 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.EnumDeclarationByName
          where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 2643 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2669 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type
            Glean.Schema.Cxx1.Types.ObjcPropertyDeclaration_key
          where
@@ -25144,7 +25527,7 @@
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.ObjcPropertyDeclaration_key"
            (Prelude.Just 0))
-{-# LINE 2664 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2690 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields
        Glean.Schema.Cxx1.Types.ObjcPropertyDeclaration_key
@@ -25159,7 +25542,7 @@
                       ('Angle.TField "isAtomic" (Prelude.Bool)
                          ('Angle.TField "source" (Glean.Schema.Src.Types.Range)
                             ('Angle.TNoFields))))))))
-{-# LINE 2666 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2692 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.Cxx1.Types.ObjcPropertyDeclaration
          where
@@ -25174,14 +25557,14 @@
     = Glean.Schema.Cxx1.Types.ObjcPropertyDeclaration x k
   getFactKey = Glean.Schema.Cxx1.Types.objcPropertyDeclaration_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 2675 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2701 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.ObjcPropertyDeclaration
          where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 2681 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2707 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.EnumLowerCase_key where
   buildRtsValue b (Glean.Schema.Cxx1.Types.EnumLowerCase_key x1 x2)
     = do Glean.buildRtsValue b x1
@@ -25193,12 +25576,12 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.EnumLowerCase_key" (Prelude.Just 0))
-{-# LINE 2690 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2716 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Cxx1.Types.EnumLowerCase_key =
      'Angle.TField "name_lowercase" (Data.Text.Text)
        ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields))
-{-# LINE 2692 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2718 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate Glean.Schema.Cxx1.Types.EnumLowerCase
          where
   type KeyType Glean.Schema.Cxx1.Types.EnumLowerCase =
@@ -25210,13 +25593,57 @@
     = Glean.Schema.Cxx1.Types.EnumLowerCase x k
   getFactKey = Glean.Schema.Cxx1.Types.enumLowerCase_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 2701 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2727 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.EnumLowerCase where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 2707 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2733 "glean/schema/thrift/cxx1_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Cxx1.Types.ObjcContainerMethods_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Cxx1.Types.ObjcContainerMethods_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Cxx1.Types.ObjcContainerMethods_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "cxx1.ObjcContainerMethods_key" (Prelude.Just 0))
+{-# LINE 2742 "glean/schema/thrift/cxx1_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Cxx1.Types.ObjcContainerMethods_key
+     =
+     'Angle.TField "container" (Glean.Schema.Cxx1.Types.ObjcContainerId)
+       ('Angle.TField "method"
+          (Glean.KeyType Glean.Schema.Cxx1.Types.ObjcMethodDeclaration)
+          ('Angle.TNoFields))
+{-# LINE 2744 "glean/schema/thrift/cxx1_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Cxx1.Types.ObjcContainerMethods
+         where
+  type KeyType Glean.Schema.Cxx1.Types.ObjcContainerMethods =
+       Glean.Schema.Cxx1.Types.ObjcContainerMethods_key
+  getName _proxy = Glean.PredicateRef "cxx1.ObjcContainerMethods" 5
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Cxx1.Types.objcContainerMethods_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Cxx1.Types.ObjcContainerMethods x k
+  getFactKey = Glean.Schema.Cxx1.Types.objcContainerMethods_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 2753 "glean/schema/thrift/cxx1_include.hs" #-}
+instance Glean.Type Glean.Schema.Cxx1.Types.ObjcContainerMethods
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 2759 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.TypeAliasLowerCase_key
          where
   buildRtsValue b
@@ -25230,12 +25657,12 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.TypeAliasLowerCase_key" (Prelude.Just 0))
-{-# LINE 2716 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2768 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Cxx1.Types.TypeAliasLowerCase_key =
      'Angle.TField "name_lowercase" (Data.Text.Text)
        ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields))
-{-# LINE 2718 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2770 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate Glean.Schema.Cxx1.Types.TypeAliasLowerCase
          where
   type KeyType Glean.Schema.Cxx1.Types.TypeAliasLowerCase =
@@ -25248,14 +25675,14 @@
     = Glean.Schema.Cxx1.Types.TypeAliasLowerCase x k
   getFactKey = Glean.Schema.Cxx1.Types.typeAliasLowerCase_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 2727 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2779 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.TypeAliasLowerCase
          where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 2733 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2785 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.FunctionAttribute_key
          where
   buildRtsValue b
@@ -25269,7 +25696,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.FunctionAttribute_key" (Prelude.Just 0))
-{-# LINE 2742 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2794 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Cxx1.Types.FunctionAttribute_key =
      'Angle.TField "attr"
@@ -25277,7 +25704,7 @@
        ('Angle.TField "declaration"
           (Glean.KeyType Glean.Schema.Cxx1.Types.FunctionDeclaration)
           ('Angle.TNoFields))
-{-# LINE 2744 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2796 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate Glean.Schema.Cxx1.Types.FunctionAttribute
          where
   type KeyType Glean.Schema.Cxx1.Types.FunctionAttribute =
@@ -25290,13 +25717,13 @@
     = Glean.Schema.Cxx1.Types.FunctionAttribute x k
   getFactKey = Glean.Schema.Cxx1.Types.functionAttribute_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 2753 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2805 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.FunctionAttribute where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 2759 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2811 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.Trace_key where
   buildRtsValue b (Glean.Schema.Cxx1.Types.Trace_key x1 x2 x3)
     = do Glean.buildRtsValue b x1
@@ -25309,7 +25736,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.Trace_key" (Prelude.Just 0))
-{-# LINE 2770 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2822 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance Angle.RecordFields Glean.Schema.Cxx1.Types.Trace_key
      =
      'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
@@ -25318,7 +25745,7 @@
           ('Angle.TField "preprocessor"
              (Glean.KeyType Glean.Schema.Cxx1.Types.PPTrace)
              ('Angle.TNoFields)))
-{-# LINE 2772 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2824 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate Glean.Schema.Cxx1.Types.Trace where
   type KeyType Glean.Schema.Cxx1.Types.Trace =
        Glean.Schema.Cxx1.Types.Trace_key
@@ -25328,13 +25755,13 @@
     = Glean.Schema.Cxx1.Types.Trace x k
   getFactKey = Glean.Schema.Cxx1.Types.trace_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 2781 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2833 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.Trace where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 2787 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2839 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.FunctionDefinition_key
          where
   buildRtsValue b
@@ -25348,13 +25775,13 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.FunctionDefinition_key" (Prelude.Just 0))
-{-# LINE 2796 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2848 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Cxx1.Types.FunctionDefinition_key =
      'Angle.TField "declaration"
        (Glean.KeyType Glean.Schema.Cxx1.Types.FunctionDeclaration)
        ('Angle.TField "isInline" (Prelude.Bool) ('Angle.TNoFields))
-{-# LINE 2798 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2850 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Predicate Glean.Schema.Cxx1.Types.FunctionDefinition
          where
   type KeyType Glean.Schema.Cxx1.Types.FunctionDefinition =
@@ -25367,14 +25794,14 @@
     = Glean.Schema.Cxx1.Types.FunctionDefinition x k
   getFactKey = Glean.Schema.Cxx1.Types.functionDefinition_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 2807 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2859 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.FunctionDefinition
          where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 2813 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2865 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.GlobalVariableKind
          where
   buildRtsValue = Glean.thriftEnum_buildRtsValue
@@ -25382,20 +25809,20 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.GlobalVariableKind" (Prelude.Just 5))
-{-# LINE 2818 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2870 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.SumFields Glean.Schema.Cxx1.Types.GlobalVariableKind =
      'Angle.TField "SimpleVariable" (Glean.Schema.Builtin.Types.Unit)
        ('Angle.TField "StaticVariable" (Glean.Schema.Builtin.Types.Unit)
           ('Angle.TField "StaticMember" (Glean.Schema.Builtin.Types.Unit)
              ('Angle.TNoFields)))
-{-# LINE 2820 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2872 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Angle.AngleEnum Glean.Schema.Cxx1.Types.GlobalVariableKind
          where
   type AngleEnumTy Glean.Schema.Cxx1.Types.GlobalVariableKind =
        Glean.Schema.Cxx1.Types.GlobalVariableKind
   enumName v = Text.pack (Prelude.drop 19 (Prelude.show v))
-{-# LINE 2824 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2876 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.IncludeTrace where
   buildRtsValue b (Glean.Schema.Cxx1.Types.IncludeTrace x1 x2)
     = do Glean.buildRtsValue b x1
@@ -25406,7 +25833,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.IncludeTrace" (Prelude.Just 5))
-{-# LINE 2833 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2885 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Cxx1.Types.IncludeTrace =
      'Angle.TField "include_"
@@ -25414,27 +25841,27 @@
        ('Angle.TField "trace"
           (Prelude.Maybe Glean.Schema.Cxx1.Types.Trace)
           ('Angle.TNoFields))
-{-# LINE 2835 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2887 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.LocalVariableKind where
   buildRtsValue = Glean.thriftEnum_buildRtsValue
   decodeRtsValue = Glean.thriftEnumD
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.LocalVariableKind" (Prelude.Just 5))
-{-# LINE 2840 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2892 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.SumFields Glean.Schema.Cxx1.Types.LocalVariableKind =
      'Angle.TField "SimpleVariable" (Glean.Schema.Builtin.Types.Unit)
        ('Angle.TField "StaticVariable" (Glean.Schema.Builtin.Types.Unit)
           ('Angle.TField "Parameter" (Glean.Schema.Builtin.Types.Unit)
              ('Angle.TNoFields)))
-{-# LINE 2842 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2894 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Angle.AngleEnum Glean.Schema.Cxx1.Types.LocalVariableKind
          where
   type AngleEnumTy Glean.Schema.Cxx1.Types.LocalVariableKind =
        Glean.Schema.Cxx1.Types.LocalVariableKind
   enumName v = Text.pack (Prelude.drop 18 (Prelude.show v))
-{-# LINE 2846 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2898 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.Scope where
   buildRtsValue b Glean.Schema.Cxx1.Types.Scope_EMPTY
     = Glean.buildRtsSelector b 4
@@ -25458,7 +25885,7 @@
          Glean.mapD Glean.Schema.Cxx1.Types.Scope_local]
   sourceType _
     = Angle.NamedTy () (Angle.SourceRef "cxx1.Scope" (Prelude.Just 5))
-{-# LINE 2870 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2922 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance Angle.SumFields Glean.Schema.Cxx1.Types.Scope =
      'Angle.TField "global_" (Glean.Schema.Builtin.Types.Unit)
        ('Angle.TField "namespace_"
@@ -25468,7 +25895,7 @@
              ('Angle.TField "local"
                 (Glean.KeyType Glean.Schema.Cxx1.Types.FunctionQName)
                 ('Angle.TNoFields))))
-{-# LINE 2872 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2924 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.XRefVia where
   buildRtsValue b Glean.Schema.Cxx1.Types.XRefVia_EMPTY
     = Glean.buildRtsSelector b 3
@@ -25490,7 +25917,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.XRefVia" (Prelude.Just 5))
-{-# LINE 2892 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2944 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance Angle.SumFields Glean.Schema.Cxx1.Types.XRefVia =
      'Angle.TField "usingDeclaration"
        (Glean.KeyType Glean.Schema.Cxx1.Types.UsingDeclaration)
@@ -25498,7 +25925,7 @@
           (Glean.KeyType Glean.Schema.Cxx1.Types.UsingDirective)
           ('Angle.TField "macro" (Glean.KeyType Glean.Schema.Pp1.Types.Use)
              ('Angle.TNoFields)))
-{-# LINE 2894 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2946 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.RecordBase where
   buildRtsValue b (Glean.Schema.Cxx1.Types.RecordBase x1 x2 x3)
     = do Glean.buildRtsValue b x1
@@ -25511,14 +25938,14 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.RecordBase" (Prelude.Just 5))
-{-# LINE 2905 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2957 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance Angle.RecordFields Glean.Schema.Cxx1.Types.RecordBase
      =
      'Angle.TField "base"
        (Glean.KeyType Glean.Schema.Cxx1.Types.RecordDeclaration)
        ('Angle.TField "access" (Glean.Schema.Cxx1.Types.Access)
           ('Angle.TField "isVirtual" (Prelude.Bool) ('Angle.TNoFields)))
-{-# LINE 2907 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2959 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.PPEvent where
   buildRtsValue b Glean.Schema.Cxx1.Types.PPEvent_EMPTY
     = Glean.buildRtsSelector b 4
@@ -25543,7 +25970,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.PPEvent" (Prelude.Just 5))
-{-# LINE 2931 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2983 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance Angle.SumFields Glean.Schema.Cxx1.Types.PPEvent =
      'Angle.TField "include_" (Glean.Schema.Cxx1.Types.IncludeTrace)
        ('Angle.TField "define"
@@ -25551,7 +25978,7 @@
           ('Angle.TField "undef" (Glean.KeyType Glean.Schema.Pp1.Types.Undef)
              ('Angle.TField "use" (Glean.KeyType Glean.Schema.Pp1.Types.Use)
                 ('Angle.TNoFields))))
-{-# LINE 2933 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2985 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.GlobalVariableAttribute
          where
   buildRtsValue = Glean.thriftEnum_buildRtsValue
@@ -25559,21 +25986,21 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.GlobalVariableAttribute" (Prelude.Just 5))
-{-# LINE 2938 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2990 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.SumFields Glean.Schema.Cxx1.Types.GlobalVariableAttribute =
      'Angle.TField "Plain" (Glean.Schema.Builtin.Types.Unit)
        ('Angle.TField "Inline" (Glean.Schema.Builtin.Types.Unit)
           ('Angle.TField "Constexpr" (Glean.Schema.Builtin.Types.Unit)
              ('Angle.TNoFields)))
-{-# LINE 2940 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2992 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Angle.AngleEnum
            Glean.Schema.Cxx1.Types.GlobalVariableAttribute
          where
   type AngleEnumTy Glean.Schema.Cxx1.Types.GlobalVariableAttribute =
        Glean.Schema.Cxx1.Types.GlobalVariableAttribute
   enumName v = Text.pack (Prelude.drop 24 (Prelude.show v))
-{-# LINE 2944 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 2996 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.MaybeIncludeTree where
   buildRtsValue b (Glean.Schema.Cxx1.Types.MaybeIncludeTree x1)
     = do Glean.buildRtsValue b x1
@@ -25582,13 +26009,13 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.MaybeIncludeTree" (Prelude.Just 5))
-{-# LINE 2951 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3003 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Cxx1.Types.MaybeIncludeTree =
      'Angle.TField "tree"
        (Prelude.Maybe Glean.Schema.Cxx1.Types.IncludeTree)
        ('Angle.TNoFields)
-{-# LINE 2953 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3005 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.ObjcContainerId where
   buildRtsValue b Glean.Schema.Cxx1.Types.ObjcContainerId_EMPTY
     = Glean.buildRtsSelector b 6
@@ -25631,7 +26058,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.ObjcContainerId" (Prelude.Just 5))
-{-# LINE 2985 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3037 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.SumFields Glean.Schema.Cxx1.Types.ObjcContainerId =
      'Angle.TField "protocol"
@@ -25647,7 +26074,7 @@
                    ('Angle.TField "categoryImplementation"
                       (Glean.Schema.Cxx1.Types.ObjcCategoryId)
                       ('Angle.TNoFields))))))
-{-# LINE 2987 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3039 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.DefinitionEntity where
   buildRtsValue b Glean.Schema.Cxx1.Types.DefinitionEntity_EMPTY
     = Glean.buildRtsSelector b 7
@@ -25691,7 +26118,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.DefinitionEntity" (Prelude.Just 5))
-{-# LINE 3023 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3075 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.SumFields Glean.Schema.Cxx1.Types.DefinitionEntity =
      'Angle.TField "record_"
@@ -25709,7 +26136,7 @@
                       ('Angle.TField "namespace_"
                          (Glean.KeyType Glean.Schema.Cxx1.Types.NamespaceDefinition)
                          ('Angle.TNoFields)))))))
-{-# LINE 3025 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3077 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.VariableKind where
   buildRtsValue b Glean.Schema.Cxx1.Types.VariableKind_EMPTY
     = Glean.buildRtsSelector b 4
@@ -25735,7 +26162,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.VariableKind" (Prelude.Just 5))
-{-# LINE 3049 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3101 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance Angle.SumFields Glean.Schema.Cxx1.Types.VariableKind
      =
      'Angle.TField "global_" (Glean.Schema.Cxx1.Types.GlobalVariable)
@@ -25743,7 +26170,7 @@
           ('Angle.TField "field" (Glean.Schema.Cxx1.Types.Field)
              ('Angle.TField "ivar" (Glean.Schema.Cxx1.Types.ObjcIVar)
                 ('Angle.TNoFields))))
-{-# LINE 3051 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3103 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.RecordKind where
   buildRtsValue b Glean.Schema.Cxx1.Types.RecordKind_EMPTY
     = Glean.buildRtsSelector b 3
@@ -25765,32 +26192,32 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.RecordKind" (Prelude.Just 5))
-{-# LINE 3071 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3123 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance Angle.SumFields Glean.Schema.Cxx1.Types.RecordKind =
      'Angle.TField "struct_" (Glean.Schema.Builtin.Types.Unit)
        ('Angle.TField "class_" (Glean.Schema.Builtin.Types.Unit)
           ('Angle.TField "union_" (Glean.Schema.Builtin.Types.Unit)
              ('Angle.TNoFields)))
-{-# LINE 3073 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3125 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.TypeAliasKind where
   buildRtsValue = Glean.thriftEnum_buildRtsValue
   decodeRtsValue = Glean.thriftEnumD
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.TypeAliasKind" (Prelude.Just 5))
-{-# LINE 3078 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3130 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance Angle.SumFields Glean.Schema.Cxx1.Types.TypeAliasKind
      =
      'Angle.TField "Typedef" (Glean.Schema.Builtin.Types.Unit)
        ('Angle.TField "Using" (Glean.Schema.Builtin.Types.Unit)
           ('Angle.TNoFields))
-{-# LINE 3080 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3132 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Angle.AngleEnum Glean.Schema.Cxx1.Types.TypeAliasKind
          where
   type AngleEnumTy Glean.Schema.Cxx1.Types.TypeAliasKind =
        Glean.Schema.Cxx1.Types.TypeAliasKind
   enumName v = Text.pack (Prelude.drop 14 (Prelude.show v))
-{-# LINE 3084 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3136 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.Declaration where
   buildRtsValue b Glean.Schema.Cxx1.Types.Declaration_EMPTY
     = Glean.buildRtsSelector b 12
@@ -25853,7 +26280,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.Declaration" (Prelude.Just 5))
-{-# LINE 3140 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3192 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance Angle.SumFields Glean.Schema.Cxx1.Types.Declaration =
      'Angle.TField "namespace_"
        (Glean.KeyType Glean.Schema.Cxx1.Types.NamespaceDeclaration)
@@ -25881,7 +26308,7 @@
                                         (Glean.KeyType
                                            Glean.Schema.Cxx1.Types.NamespaceAliasDeclaration)
                                         ('Angle.TNoFields))))))))))))
-{-# LINE 3142 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3194 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.Parameter where
   buildRtsValue b (Glean.Schema.Cxx1.Types.Parameter x1 x2)
     = do Glean.buildRtsValue b x1
@@ -25892,13 +26319,13 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.Parameter" (Prelude.Just 5))
-{-# LINE 3151 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3203 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance Angle.RecordFields Glean.Schema.Cxx1.Types.Parameter
      =
      'Angle.TField "name" (Glean.KeyType Glean.Schema.Cxx1.Types.Name)
        ('Angle.TField "type" (Glean.KeyType Glean.Schema.Cxx1.Types.Type)
           ('Angle.TNoFields))
-{-# LINE 3153 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3205 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.From where
   buildRtsValue b (Glean.Schema.Cxx1.Types.From x1 x2 x3)
     = do Glean.buildRtsValue b x1
@@ -25910,14 +26337,14 @@
         <*> Glean.decodeRtsValue
   sourceType _
     = Angle.NamedTy () (Angle.SourceRef "cxx1.From" (Prelude.Just 5))
-{-# LINE 3164 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3216 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance Angle.RecordFields Glean.Schema.Cxx1.Types.From =
      'Angle.TField "spans" (Glean.Schema.Src.Types.PackedByteSpans)
        ('Angle.TField "expansions"
           (Glean.Schema.Src.Types.PackedByteSpans)
           ('Angle.TField "spellings" (Glean.Schema.Src.Types.PackedByteSpans)
              ('Angle.TNoFields)))
-{-# LINE 3166 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3218 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.ObjcIVar where
   buildRtsValue b (Glean.Schema.Cxx1.Types.ObjcIVar x1 x2)
     = do Glean.buildRtsValue b x1
@@ -25928,12 +26355,12 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.ObjcIVar" (Prelude.Just 5))
-{-# LINE 3175 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3227 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance Angle.RecordFields Glean.Schema.Cxx1.Types.ObjcIVar =
      'Angle.TField "synthesize" (Prelude.Bool)
        ('Angle.TField "bitsize" (Prelude.Maybe Glean.Nat)
           ('Angle.TNoFields))
-{-# LINE 3177 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3229 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.XRefTarget where
   buildRtsValue b Glean.Schema.Cxx1.Types.XRefTarget_EMPTY
     = Glean.buildRtsSelector b 6
@@ -25968,7 +26395,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.XRefTarget" (Prelude.Just 5))
-{-# LINE 3209 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3261 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance Angle.SumFields Glean.Schema.Cxx1.Types.XRefTarget =
      'Angle.TField "declaration" (Glean.Schema.Cxx1.Types.Declaration)
        ('Angle.TField "enumerator"
@@ -25981,7 +26408,7 @@
                    ('Angle.TField "indirect"
                       (Glean.KeyType Glean.Schema.Cxx1.Types.XRefIndirectTarget)
                       ('Angle.TNoFields))))))
-{-# LINE 3211 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3263 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.PpEntity where
   buildRtsValue b Glean.Schema.Cxx1.Types.PpEntity_EMPTY
     = Glean.buildRtsSelector b 3
@@ -26002,7 +26429,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.PpEntity" (Prelude.Just 5))
-{-# LINE 3231 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3283 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance Angle.SumFields Glean.Schema.Cxx1.Types.PpEntity =
      'Angle.TField "define"
        (Glean.KeyType Glean.Schema.Pp1.Types.Define)
@@ -26010,7 +26437,7 @@
           ('Angle.TField "include_"
              (Glean.KeyType Glean.Schema.Src.Types.File)
              ('Angle.TNoFields)))
-{-# LINE 3233 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3285 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.NamespaceTarget where
   buildRtsValue b Glean.Schema.Cxx1.Types.NamespaceTarget_EMPTY
     = Glean.buildRtsSelector b 2
@@ -26030,7 +26457,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.NamespaceTarget" (Prelude.Just 5))
-{-# LINE 3249 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3301 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.SumFields Glean.Schema.Cxx1.Types.NamespaceTarget =
      'Angle.TField "namespace_"
@@ -26038,7 +26465,7 @@
        ('Angle.TField "namespaceAlias"
           (Glean.KeyType Glean.Schema.Cxx1.Types.NamespaceAliasDeclaration)
           ('Angle.TNoFields))
-{-# LINE 3251 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3303 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.MethodSignature where
   buildRtsValue b
     (Glean.Schema.Cxx1.Types.MethodSignature x1 x2 x3 x4)
@@ -26054,7 +26481,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.MethodSignature" (Prelude.Just 5))
-{-# LINE 3264 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3316 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Cxx1.Types.MethodSignature =
      'Angle.TField "isVirtual" (Prelude.Bool)
@@ -26063,7 +26490,7 @@
              ('Angle.TField "refQualifier"
                 (Glean.Schema.Cxx1.Types.RefQualifier)
                 ('Angle.TNoFields))))
-{-# LINE 3266 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3318 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.LocalVariable where
   buildRtsValue b (Glean.Schema.Cxx1.Types.LocalVariable x1 x2)
     = do Glean.buildRtsValue b x1
@@ -26074,14 +26501,14 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.LocalVariable" (Prelude.Just 5))
-{-# LINE 3275 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3327 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Cxx1.Types.LocalVariable =
      'Angle.TField "kind" (Glean.Schema.Cxx1.Types.LocalVariableKind)
        ('Angle.TField "attribute"
           (Glean.Schema.Cxx1.Types.LocalVariableAttribute)
           ('Angle.TNoFields))
-{-# LINE 3277 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3329 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.LocalVariableAttribute
          where
   buildRtsValue = Glean.thriftEnum_buildRtsValue
@@ -26089,20 +26516,20 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.LocalVariableAttribute" (Prelude.Just 5))
-{-# LINE 3282 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3334 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.SumFields Glean.Schema.Cxx1.Types.LocalVariableAttribute =
      'Angle.TField "Plain" (Glean.Schema.Builtin.Types.Unit)
        ('Angle.TField "Constexpr" (Glean.Schema.Builtin.Types.Unit)
           ('Angle.TNoFields))
-{-# LINE 3284 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3336 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Angle.AngleEnum
            Glean.Schema.Cxx1.Types.LocalVariableAttribute
          where
   type AngleEnumTy Glean.Schema.Cxx1.Types.LocalVariableAttribute =
        Glean.Schema.Cxx1.Types.LocalVariableAttribute
   enumName v = Text.pack (Prelude.drop 23 (Prelude.show v))
-{-# LINE 3288 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3340 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.GlobalVariable where
   buildRtsValue b (Glean.Schema.Cxx1.Types.GlobalVariable x1 x2 x3)
     = do Glean.buildRtsValue b x1
@@ -26115,14 +26542,14 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.GlobalVariable" (Prelude.Just 5))
-{-# LINE 3299 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3351 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Cxx1.Types.GlobalVariable =
      'Angle.TField "kind" (Glean.Schema.Cxx1.Types.GlobalVariableKind)
        ('Angle.TField "attribute"
           (Glean.Schema.Cxx1.Types.GlobalVariableAttribute)
           ('Angle.TField "definition" (Prelude.Bool) ('Angle.TNoFields)))
-{-# LINE 3301 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3353 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.ObjcCategoryId where
   buildRtsValue b (Glean.Schema.Cxx1.Types.ObjcCategoryId x1 x2)
     = do Glean.buildRtsValue b x1
@@ -26133,7 +26560,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.ObjcCategoryId" (Prelude.Just 5))
-{-# LINE 3310 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3362 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Cxx1.Types.ObjcCategoryId =
      'Angle.TField "className"
@@ -26141,7 +26568,7 @@
        ('Angle.TField "categoryName"
           (Glean.KeyType Glean.Schema.Cxx1.Types.Name)
           ('Angle.TNoFields))
-{-# LINE 3312 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3364 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.ObjcSelectorSlot where
   buildRtsValue b (Glean.Schema.Cxx1.Types.ObjcSelectorSlot x1 x2)
     = do Glean.buildRtsValue b x1
@@ -26152,49 +26579,49 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.ObjcSelectorSlot" (Prelude.Just 5))
-{-# LINE 3321 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3373 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Cxx1.Types.ObjcSelectorSlot =
      'Angle.TField "objcMethod"
        (Glean.KeyType Glean.Schema.Cxx1.Types.ObjcMethodDeclaration)
        ('Angle.TField "index" (Glean.Nat) ('Angle.TNoFields))
-{-# LINE 3323 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3375 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.ObjcPropertyKind where
   buildRtsValue = Glean.thriftEnum_buildRtsValue
   decodeRtsValue = Glean.thriftEnumD
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.ObjcPropertyKind" (Prelude.Just 5))
-{-# LINE 3328 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3380 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.SumFields Glean.Schema.Cxx1.Types.ObjcPropertyKind =
      'Angle.TField "Synthesize" (Glean.Schema.Builtin.Types.Unit)
        ('Angle.TField "Dynamic" (Glean.Schema.Builtin.Types.Unit)
           ('Angle.TNoFields))
-{-# LINE 3330 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3382 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Angle.AngleEnum Glean.Schema.Cxx1.Types.ObjcPropertyKind
          where
   type AngleEnumTy Glean.Schema.Cxx1.Types.ObjcPropertyKind =
        Glean.Schema.Cxx1.Types.ObjcPropertyKind
   enumName v = Text.pack (Prelude.drop 17 (Prelude.show v))
-{-# LINE 3334 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3386 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.Access where
   buildRtsValue = Glean.thriftEnum_buildRtsValue
   decodeRtsValue = Glean.thriftEnumD
   sourceType _
     = Angle.NamedTy () (Angle.SourceRef "cxx1.Access" (Prelude.Just 5))
-{-# LINE 3339 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3391 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance Angle.SumFields Glean.Schema.Cxx1.Types.Access =
      'Angle.TField "Public" (Glean.Schema.Builtin.Types.Unit)
        ('Angle.TField "Protected" (Glean.Schema.Builtin.Types.Unit)
           ('Angle.TField "Private" (Glean.Schema.Builtin.Types.Unit)
              ('Angle.TNoFields)))
-{-# LINE 3341 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3393 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Angle.AngleEnum Glean.Schema.Cxx1.Types.Access where
   type AngleEnumTy Glean.Schema.Cxx1.Types.Access =
        Glean.Schema.Cxx1.Types.Access
   enumName v = Text.pack (Prelude.drop 7 (Prelude.show v))
-{-# LINE 3345 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3397 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.FixedXRef where
   buildRtsValue b (Glean.Schema.Cxx1.Types.FixedXRef x1 x2)
     = do Glean.buildRtsValue b x1
@@ -26205,13 +26632,13 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.FixedXRef" (Prelude.Just 5))
-{-# LINE 3354 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3406 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance Angle.RecordFields Glean.Schema.Cxx1.Types.FixedXRef
      =
      'Angle.TField "target" (Glean.Schema.Cxx1.Types.XRefTarget)
        ('Angle.TField "from" (Glean.Schema.Cxx1.Types.From)
           ('Angle.TNoFields))
-{-# LINE 3356 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3408 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.Field where
   buildRtsValue b (Glean.Schema.Cxx1.Types.Field x1 x2)
     = do Glean.buildRtsValue b x1
@@ -26221,31 +26648,31 @@
         Glean.decodeRtsValue
   sourceType _
     = Angle.NamedTy () (Angle.SourceRef "cxx1.Field" (Prelude.Just 5))
-{-# LINE 3365 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3417 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance Angle.RecordFields Glean.Schema.Cxx1.Types.Field =
      'Angle.TField "mutable_" (Prelude.Bool)
        ('Angle.TField "bitsize" (Prelude.Maybe Glean.Nat)
           ('Angle.TNoFields))
-{-# LINE 3367 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3419 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.RefQualifier where
   buildRtsValue = Glean.thriftEnum_buildRtsValue
   decodeRtsValue = Glean.thriftEnumD
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.RefQualifier" (Prelude.Just 5))
-{-# LINE 3372 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3424 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance Angle.SumFields Glean.Schema.Cxx1.Types.RefQualifier
      =
      'Angle.TField "None_" (Glean.Schema.Builtin.Types.Unit)
        ('Angle.TField "LValue" (Glean.Schema.Builtin.Types.Unit)
           ('Angle.TField "RValue" (Glean.Schema.Builtin.Types.Unit)
              ('Angle.TNoFields)))
-{-# LINE 3374 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3426 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Angle.AngleEnum Glean.Schema.Cxx1.Types.RefQualifier where
   type AngleEnumTy Glean.Schema.Cxx1.Types.RefQualifier =
        Glean.Schema.Cxx1.Types.RefQualifier
   enumName v = Text.pack (Prelude.drop 13 (Prelude.show v))
-{-# LINE 3378 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3430 "glean/schema/thrift/cxx1_include.hs" #-}
 instance Glean.Type Glean.Schema.Cxx1.Types.Scope_recordWithAccess_
          where
   buildRtsValue b
@@ -26259,7 +26686,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "cxx1.Scope_recordWithAccess_" (Prelude.Just 0))
-{-# LINE 3387 "glean/schema/thrift/cxx1_include.hs" #-}
+{-# LINE 3439 "glean/schema/thrift/cxx1_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Cxx1.Types.Scope_recordWithAccess_
      =
diff --git a/glean/schema/thrift/gen-hs2/Glean/Schema/Erlang/Types.hs b/glean/schema/thrift/gen-hs2/Glean/Schema/Erlang/Types.hs
--- a/glean/schema/thrift/gen-hs2/Glean/Schema/Erlang/Types.hs
+++ b/glean/schema/thrift/gen-hs2/Glean/Schema/Erlang/Types.hs
@@ -22,6 +22,7 @@
 module Glean.Schema.Erlang.Types
        (pREDICATE_VERSIONS, NameLowerCase_id,
         NameLowerCase(NameLowerCase, nameLowerCase_id, nameLowerCase_key),
+        Module_id, Module(Module, module_id, module_key),
         FunctionDeclaration_id,
         FunctionDeclaration(FunctionDeclaration, functionDeclaration_id,
                             functionDeclaration_key),
@@ -53,6 +54,9 @@
         SearchByName(SearchByName, searchByName_id, searchByName_key),
         NameLowerCase_key(NameLowerCase_key,
                           nameLowerCase_key_nameLowercase, nameLowerCase_key_name),
+        Module_key(Module_key, module_key_file, module_key_name,
+                   module_key_oncall, module_key_exports, module_key_behaviours,
+                   module_key_module_doc, module_key_exdoc_link),
         Fqn(Fqn, fqn_module, fqn_name, fqn_arity),
         FunctionDeclaration_key(FunctionDeclaration_key,
                                 functionDeclaration_key_fqn, functionDeclaration_key_file,
@@ -130,7 +134,7 @@
 import qualified Glean.Schema.Builtin.Types
 {-# LINE 15 "glean/schema/thrift/erlang_include.hs" #-}
 import qualified Glean.Schema.Src.Types
-{-# LINE 134 ".build/def/codegen/thrift-schema-hs/glean/schema/thrift/gen-hs2/Glean/Schema/Erlang/Types.hs" #-}
+{-# LINE 138 ".build/def/codegen/thrift-schema-hs/glean/schema/thrift/gen-hs2/Glean/Schema/Erlang/Types.hs" #-}
 
 pREDICATE_VERSIONS :: Map.Map Text.Text Int.Int64
 pREDICATE_VERSIONS
@@ -140,7 +144,7 @@
        ("DeclarationLocation", 1), ("DeclarationWithFqn", 1),
        ("FunctionDeclaration", 1), ("XRefsViaFqnByFile", 1),
        ("DeclarationToFqn", 1), ("DeclarationUses", 1),
-       ("SearchByName", 1)]
+       ("SearchByName", 1), ("Module", 1)]
 
 type NameLowerCase_id = Glean.Id
 
@@ -220,6 +224,83 @@
   hashWithSalt __salt (NameLowerCase _id _key)
     = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
 
+type Module_id = Glean.Id
+
+data Module = Module{module_id :: {-# UNPACK #-} !Module_id,
+                     module_key :: Prelude.Maybe Module_key}
+              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Module where
+  toJSON (Module __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct Module where
+  buildStruct _proxy (Module __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (Module __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData Module where
+  rnf (Module __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default Module where
+  def = Module Default.def Prelude.Nothing
+
+instance Hashable.Hashable Module where
+  hashWithSalt __salt (Module _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
 type FunctionDeclaration_id = Glean.Id
 
 data FunctionDeclaration = FunctionDeclaration{functionDeclaration_id
@@ -1117,6 +1198,251 @@
         (Hashable.hashWithSalt __salt _nameLowercase)
         _name
 
+data Module_key = Module_key{module_key_file ::
+                             Glean.Schema.Src.File,
+                             module_key_name :: Text.Text,
+                             module_key_oncall :: Prelude.Maybe Text.Text,
+                             module_key_exports :: Prelude.Maybe [Text.Text],
+                             module_key_behaviours :: Prelude.Maybe [Text.Text],
+                             module_key_module_doc :: Prelude.Maybe Text.Text,
+                             module_key_exdoc_link :: Prelude.Maybe Text.Text}
+                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Module_key where
+  toJSON
+    (Module_key __field__file __field__name __field__oncall
+       __field__exports __field__behaviours __field__module_doc
+       __field__exdoc_link)
+    = Aeson.object
+        ("file" .= __field__file :
+           "name" .= __field__name :
+             Prelude.maybe Prelude.id ((:) . ("oncall" .=)) __field__oncall
+               (Prelude.maybe Prelude.id ((:) . ("exports" .=)) __field__exports
+                  (Prelude.maybe Prelude.id ((:) . ("behaviours" .=))
+                     __field__behaviours
+                     (Prelude.maybe Prelude.id ((:) . ("module_doc" .=))
+                        __field__module_doc
+                        (Prelude.maybe Prelude.id ((:) . ("exdoc_link" .=))
+                           __field__exdoc_link
+                           Prelude.mempty)))))
+
+instance Thrift.ThriftStruct Module_key where
+  buildStruct _proxy
+    (Module_key __field__file __field__name __field__oncall
+       __field__exports __field__behaviours __field__module_doc
+       __field__exdoc_link)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__file)
+           :
+           Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 2 1
+             (Thrift.genText _proxy __field__name)
+             :
+             let (__cereal__oncall, __id__oncall)
+                   = case __field__oncall of
+                       Prelude.Just _val -> ((:)
+                                               (Thrift.genField _proxy "oncall"
+                                                  (Thrift.getStringType _proxy)
+                                                  3
+                                                  2
+                                                  (Thrift.genText _proxy _val)),
+                                             3)
+                       Prelude.Nothing -> (Prelude.id, 2)
+               in
+               __cereal__oncall
+                 (let (__cereal__exports, __id__exports)
+                        = case __field__exports of
+                            Prelude.Just _val -> ((:)
+                                                    (Thrift.genField _proxy "exports"
+                                                       (Thrift.getListType _proxy)
+                                                       4
+                                                       __id__oncall
+                                                       (Thrift.genList _proxy
+                                                          (Thrift.getStringType _proxy)
+                                                          (Thrift.genText _proxy)
+                                                          _val)),
+                                                  4)
+                            Prelude.Nothing -> (Prelude.id, __id__oncall)
+                    in
+                    __cereal__exports
+                      (let (__cereal__behaviours, __id__behaviours)
+                             = case __field__behaviours of
+                                 Prelude.Just _val -> ((:)
+                                                         (Thrift.genField _proxy "behaviours"
+                                                            (Thrift.getListType _proxy)
+                                                            5
+                                                            __id__exports
+                                                            (Thrift.genList _proxy
+                                                               (Thrift.getStringType _proxy)
+                                                               (Thrift.genText _proxy)
+                                                               _val)),
+                                                       5)
+                                 Prelude.Nothing -> (Prelude.id, __id__exports)
+                         in
+                         __cereal__behaviours
+                           (let (__cereal__module_doc, __id__module_doc)
+                                  = case __field__module_doc of
+                                      Prelude.Just _val -> ((:)
+                                                              (Thrift.genField _proxy "module_doc"
+                                                                 (Thrift.getStringType _proxy)
+                                                                 6
+                                                                 __id__behaviours
+                                                                 (Thrift.genText _proxy _val)),
+                                                            6)
+                                      Prelude.Nothing -> (Prelude.id, __id__behaviours)
+                              in
+                              __cereal__module_doc
+                                (case __field__exdoc_link of
+                                   Prelude.Just _val -> Thrift.genField _proxy "exdoc_link"
+                                                          (Thrift.getStringType _proxy)
+                                                          7
+                                                          __id__module_doc
+                                                          (Thrift.genText _proxy _val)
+                                                          : []
+                                   Prelude.Nothing -> [])))))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__file <- ST.newSTRef Default.def
+            __field__name <- ST.newSTRef ""
+            __field__oncall <- ST.newSTRef Prelude.Nothing
+            __field__exports <- ST.newSTRef Prelude.Nothing
+            __field__behaviours <- ST.newSTRef Prelude.Nothing
+            __field__module_doc <- ST.newSTRef Prelude.Nothing
+            __field__exdoc_link <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__file
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__oncall
+                                                                          (Prelude.Just _val)
+                                                                 4 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseText
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__exports
+                                                                          (Prelude.Just _val)
+                                                                 5 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseText
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__behaviours
+                                                                          (Prelude.Just _val)
+                                                                 6 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__module_doc
+                                                                          (Prelude.Just _val)
+                                                                 7 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__exdoc_link
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__file <- ST.readSTRef __field__file
+                                             !__val__name <- ST.readSTRef __field__name
+                                             !__val__oncall <- ST.readSTRef __field__oncall
+                                             !__val__exports <- ST.readSTRef __field__exports
+                                             !__val__behaviours <- ST.readSTRef __field__behaviours
+                                             !__val__module_doc <- ST.readSTRef __field__module_doc
+                                             !__val__exdoc_link <- ST.readSTRef __field__exdoc_link
+                                             Prelude.pure
+                                               (Module_key __val__file __val__name __val__oncall
+                                                  __val__exports
+                                                  __val__behaviours
+                                                  __val__module_doc
+                                                  __val__exdoc_link)
+              _idMap
+                = HashMap.fromList
+                    [("file", 1), ("name", 2), ("oncall", 3), ("exports", 4),
+                     ("behaviours", 5), ("module_doc", 6), ("exdoc_link", 7)]
+            _parse 0)
+
+instance DeepSeq.NFData Module_key where
+  rnf
+    (Module_key __field__file __field__name __field__oncall
+       __field__exports __field__behaviours __field__module_doc
+       __field__exdoc_link)
+    = DeepSeq.rnf __field__file `Prelude.seq`
+        DeepSeq.rnf __field__name `Prelude.seq`
+          DeepSeq.rnf __field__oncall `Prelude.seq`
+            DeepSeq.rnf __field__exports `Prelude.seq`
+              DeepSeq.rnf __field__behaviours `Prelude.seq`
+                DeepSeq.rnf __field__module_doc `Prelude.seq`
+                  DeepSeq.rnf __field__exdoc_link `Prelude.seq` ()
+
+instance Default.Default Module_key where
+  def
+    = Module_key Default.def "" Prelude.Nothing Prelude.Nothing
+        Prelude.Nothing
+        Prelude.Nothing
+        Prelude.Nothing
+
+instance Hashable.Hashable Module_key where
+  hashWithSalt __salt
+    (Module_key _file _name _oncall _exports _behaviours _module_doc
+       _exdoc_link)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt
+              (Hashable.hashWithSalt
+                 (Hashable.hashWithSalt
+                    (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _file) _name)
+                    _oncall)
+                 _exports)
+              _behaviours)
+           _module_doc)
+        _exdoc_link
+
 data Fqn = Fqn{fqn_module :: Text.Text, fqn_name :: Text.Text,
                fqn_arity :: Glean.Nat}
            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
@@ -2634,6 +2960,56 @@
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
 {-# LINE 307 "glean/schema/thrift/erlang_include.hs" #-}
+instance Glean.Type Glean.Schema.Erlang.Types.Module_key where
+  buildRtsValue b
+    (Glean.Schema.Erlang.Types.Module_key x1 x2 x3 x4 x5 x6 x7)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+         Glean.buildRtsValue b x5
+         Glean.buildRtsValue b x6
+         Glean.buildRtsValue b x7
+  decodeRtsValue
+    = Glean.Schema.Erlang.Types.Module_key <$> Glean.decodeRtsValue <*>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "erlang.Module_key" (Prelude.Just 0))
+{-# LINE 326 "glean/schema/thrift/erlang_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Erlang.Types.Module_key =
+     'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
+       ('Angle.TField "name" (Data.Text.Text)
+          ('Angle.TField "oncall" (Prelude.Maybe Data.Text.Text)
+             ('Angle.TField "exports" (Prelude.Maybe [Data.Text.Text])
+                ('Angle.TField "behaviours" (Prelude.Maybe [Data.Text.Text])
+                   ('Angle.TField "module_doc" (Prelude.Maybe Data.Text.Text)
+                      ('Angle.TField "exdoc_link" (Prelude.Maybe Data.Text.Text)
+                         ('Angle.TNoFields)))))))
+{-# LINE 328 "glean/schema/thrift/erlang_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Erlang.Types.Module where
+  type KeyType Glean.Schema.Erlang.Types.Module =
+       Glean.Schema.Erlang.Types.Module_key
+  getName _proxy = Glean.PredicateRef "erlang.Module" 1
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Erlang.Types.module_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Erlang.Types.Module x k
+  getFactKey = Glean.Schema.Erlang.Types.module_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 337 "glean/schema/thrift/erlang_include.hs" #-}
+instance Glean.Type Glean.Schema.Erlang.Types.Module where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 343 "glean/schema/thrift/erlang_include.hs" #-}
 instance Glean.Type Glean.Schema.Erlang.Types.Declaration where
   buildRtsValue b Glean.Schema.Erlang.Types.Declaration_EMPTY
     = Glean.buildRtsSelector b 1
@@ -2647,13 +3023,13 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "erlang.Declaration" (Prelude.Just 1))
-{-# LINE 319 "glean/schema/thrift/erlang_include.hs" #-}
+{-# LINE 355 "glean/schema/thrift/erlang_include.hs" #-}
 type instance Angle.SumFields Glean.Schema.Erlang.Types.Declaration
      =
      'Angle.TField "func"
        (Glean.KeyType Glean.Schema.Erlang.Types.FunctionDeclaration)
        ('Angle.TNoFields)
-{-# LINE 321 "glean/schema/thrift/erlang_include.hs" #-}
+{-# LINE 357 "glean/schema/thrift/erlang_include.hs" #-}
 instance Glean.Type Glean.Schema.Erlang.Types.XRefViaFqn where
   buildRtsValue b (Glean.Schema.Erlang.Types.XRefViaFqn x1 x2)
     = do Glean.buildRtsValue b x1
@@ -2664,13 +3040,13 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "erlang.XRefViaFqn" (Prelude.Just 1))
-{-# LINE 330 "glean/schema/thrift/erlang_include.hs" #-}
+{-# LINE 366 "glean/schema/thrift/erlang_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Erlang.Types.XRefViaFqn =
      'Angle.TField "target" (Glean.Schema.Erlang.Types.Fqn)
        ('Angle.TField "source" (Glean.Schema.Src.Types.ByteSpan)
           ('Angle.TNoFields))
-{-# LINE 332 "glean/schema/thrift/erlang_include.hs" #-}
+{-# LINE 368 "glean/schema/thrift/erlang_include.hs" #-}
 instance Glean.Type Glean.Schema.Erlang.Types.Fqn where
   buildRtsValue b (Glean.Schema.Erlang.Types.Fqn x1 x2 x3)
     = do Glean.buildRtsValue b x1
@@ -2682,7 +3058,7 @@
         <*> Glean.decodeRtsValue
   sourceType _
     = Angle.NamedTy () (Angle.SourceRef "erlang.Fqn" (Prelude.Just 1))
-{-# LINE 343 "glean/schema/thrift/erlang_include.hs" #-}
+{-# LINE 379 "glean/schema/thrift/erlang_include.hs" #-}
 type instance Angle.RecordFields Glean.Schema.Erlang.Types.Fqn =
      'Angle.TField "module" (Data.Text.Text)
        ('Angle.TField "name" (Data.Text.Text)
diff --git a/glean/schema/thrift/gen-hs2/Glean/Schema/GleanTest/Types.hs b/glean/schema/thrift/gen-hs2/Glean/Schema/GleanTest/Types.hs
--- a/glean/schema/thrift/gen-hs2/Glean/Schema/GleanTest/Types.hs
+++ b/glean/schema/thrift/gen-hs2/Glean/Schema/GleanTest/Types.hs
@@ -76,7 +76,8 @@
         Name(Name, name_id, name_key), MatchOneAlt_id,
         MatchOneAlt(MatchOneAlt, matchOneAlt_id, matchOneAlt_key),
         LeftOr2_id, LeftOr2(LeftOr2, leftOr2_id, leftOr2_key), LeftOr_id,
-        LeftOr(LeftOr, leftOr_id, leftOr_key), KeyValue_id,
+        LeftOr(LeftOr, leftOr_id, leftOr_key), LargeKey_id,
+        LargeKey(LargeKey, largeKey_id, largeKey_key), KeyValue_id,
         KeyValue(KeyValue, keyValue_id, keyValue_key, keyValue_value),
         IsThree_id, IsThree(IsThree, isThree_id, isThree_key), IsParent_id,
         IsParent(IsParent, isParent_id, isParent_key), IsGlean_id,
@@ -251,18 +252,18 @@
 import qualified Glean.Schema.Pp1.Types
 {-# LINE 17 "glean/schema/thrift/glean_test_include.hs" #-}
 import qualified Glean.Schema.Sys.Types
-{-# LINE 255 ".build/def/codegen/thrift-schema-hs/glean/schema/thrift/gen-hs2/Glean/Schema/GleanTest/Types.hs" #-}
+{-# LINE 256 ".build/def/codegen/thrift-schema-hs/glean/schema/thrift/gen-hs2/Glean/Schema/GleanTest/Types.hs" #-}
 
 pREDICATE_VERSIONS :: Map.Map Text.Text Int.Int64
 pREDICATE_VERSIONS
   = Map.fromList
       [("StoredRevStringPairSum", 6), ("MatchOneAlt", 6),
-       ("DerivedKeyValue", 6), ("ViaStringPair", 6), ("Predicate", 6),
-       ("EmptyPred", 6), ("Node", 6), ("EdgeWrapper", 6), ("Unbound", 6),
-       ("TreeToTree", 6), ("StoredRevStringPairWithA", 6),
-       ("RevRevStringPair", 6), ("Bar", 6), ("KeyValue", 6),
-       ("RevStringPairs", 6), ("LeftOr", 6), ("IsGlean", 6),
-       ("StoredDualStringPair", 6), ("SkipRevEdge", 6),
+       ("DerivedKeyValue", 6), ("ViaStringPair", 6), ("LargeKey", 6),
+       ("Predicate", 6), ("EmptyPred", 6), ("Node", 6),
+       ("EdgeWrapper", 6), ("Unbound", 6), ("TreeToTree", 6),
+       ("StoredRevStringPairWithA", 6), ("RevRevStringPair", 6),
+       ("Bar", 6), ("KeyValue", 6), ("RevStringPairs", 6), ("LeftOr", 6),
+       ("IsGlean", 6), ("StoredDualStringPair", 6), ("SkipRevEdge", 6),
        ("DualStringPair", 6), ("Foo", 6), ("Predicate_0", 0),
        ("RevStringPair", 6), ("StringPairBox", 6), ("IsParent", 6),
        ("IsThree", 6), ("FooToFoo", 6), ("RevStringPairRec", 6),
@@ -2726,6 +2727,84 @@
   hashWithSalt __salt (LeftOr _id _key)
     = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
 
+type LargeKey_id = Glean.Id
+
+data LargeKey = LargeKey{largeKey_id ::
+                         {-# UNPACK #-} !LargeKey_id,
+                         largeKey_key :: Prelude.Maybe Text.Text}
+                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON LargeKey where
+  toJSON (LargeKey __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct LargeKey where
+  buildStruct _proxy (LargeKey __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStringType _proxy)
+                                    2
+                                    1
+                                    (Thrift.genText _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (LargeKey __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData LargeKey where
+  rnf (LargeKey __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default LargeKey where
+  def = LargeKey Default.def Prelude.Nothing
+
+instance Hashable.Hashable LargeKey where
+  hashWithSalt __salt (LargeKey _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
 type KeyValue_id = Glean.Id
 
 data KeyValue = KeyValue{keyValue_id ::
@@ -8385,6 +8464,23 @@
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
 {-# LINE 128 "glean/schema/thrift/glean_test_include.hs" #-}
+instance Glean.Predicate Glean.Schema.GleanTest.Types.LargeKey
+         where
+  type KeyType Glean.Schema.GleanTest.Types.LargeKey = Data.Text.Text
+  getName _proxy = Glean.PredicateRef "glean.test.LargeKey" 6
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.GleanTest.Types.largeKey_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.GleanTest.Types.LargeKey x k
+  getFactKey = Glean.Schema.GleanTest.Types.largeKey_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 136 "glean/schema/thrift/glean_test_include.hs" #-}
+instance Glean.Type Glean.Schema.GleanTest.Types.LargeKey where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 142 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Predicate Glean.Schema.GleanTest.Types.Predicate
          where
   type KeyType Glean.Schema.GleanTest.Types.Predicate =
@@ -8397,13 +8493,13 @@
     = Glean.Schema.GleanTest.Types.Predicate x k
   getFactKey = Glean.Schema.GleanTest.Types.predicate_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 137 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 151 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.Predicate where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 143 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 157 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Predicate Glean.Schema.GleanTest.Types.EmptyPred
          where
   type KeyType Glean.Schema.GleanTest.Types.EmptyPred =
@@ -8416,13 +8512,13 @@
     = Glean.Schema.GleanTest.Types.EmptyPred x k
   getFactKey = Glean.Schema.GleanTest.Types.emptyPred_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 151 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 165 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.EmptyPred where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 157 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 171 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.Node_key where
   buildRtsValue b (Glean.Schema.GleanTest.Types.Node_key x1)
     = do Glean.buildRtsValue b x1
@@ -8431,11 +8527,11 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "glean.test.Node_key" (Prelude.Just 0))
-{-# LINE 164 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 178 "glean/schema/thrift/glean_test_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.GleanTest.Types.Node_key =
      'Angle.TField "label" (Data.Text.Text) ('Angle.TNoFields)
-{-# LINE 166 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 180 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Predicate Glean.Schema.GleanTest.Types.Node where
   type KeyType Glean.Schema.GleanTest.Types.Node =
        Glean.Schema.GleanTest.Types.Node_key
@@ -8446,13 +8542,13 @@
     = Glean.Schema.GleanTest.Types.Node x k
   getFactKey = Glean.Schema.GleanTest.Types.node_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 175 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 189 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.Node where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 181 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 195 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.EdgeWrapper_key
          where
   buildRtsValue b (Glean.Schema.GleanTest.Types.EdgeWrapper_key x1)
@@ -8463,13 +8559,13 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "glean.test.EdgeWrapper_key" (Prelude.Just 0))
-{-# LINE 188 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 202 "glean/schema/thrift/glean_test_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.GleanTest.Types.EdgeWrapper_key =
      'Angle.TField "edge"
        (Glean.KeyType Glean.Schema.GleanTest.Types.Edge)
        ('Angle.TNoFields)
-{-# LINE 190 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 204 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Predicate Glean.Schema.GleanTest.Types.EdgeWrapper
          where
   type KeyType Glean.Schema.GleanTest.Types.EdgeWrapper =
@@ -8482,13 +8578,13 @@
     = Glean.Schema.GleanTest.Types.EdgeWrapper x k
   getFactKey = Glean.Schema.GleanTest.Types.edgeWrapper_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 199 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 213 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.EdgeWrapper where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 205 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 219 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.Unbound_key where
   buildRtsValue b (Glean.Schema.GleanTest.Types.Unbound_key x1 x2)
     = do Glean.buildRtsValue b x1
@@ -8499,12 +8595,12 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "glean.test.Unbound_key" (Prelude.Just 0))
-{-# LINE 214 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 228 "glean/schema/thrift/glean_test_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.GleanTest.Types.Unbound_key =
      'Angle.TField "x" (Data.Text.Text)
        ('Angle.TField "y" (Data.Text.Text) ('Angle.TNoFields))
-{-# LINE 216 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 230 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Predicate Glean.Schema.GleanTest.Types.Unbound where
   type KeyType Glean.Schema.GleanTest.Types.Unbound =
        Glean.Schema.GleanTest.Types.Unbound_key
@@ -8515,13 +8611,13 @@
     = Glean.Schema.GleanTest.Types.Unbound x k
   getFactKey = Glean.Schema.GleanTest.Types.unbound_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 225 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 239 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.Unbound where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 231 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 245 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Predicate Glean.Schema.GleanTest.Types.TreeToTree
          where
   type KeyType Glean.Schema.GleanTest.Types.TreeToTree =
@@ -8536,13 +8632,13 @@
     = Glean.Schema.GleanTest.Types.TreeToTree x k v
   getFactKey = Glean.Schema.GleanTest.Types.treeToTree_key
   getFactValue = Glean.Schema.GleanTest.Types.treeToTree_value
-{-# LINE 242 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 256 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.TreeToTree where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 248 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 262 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type
            Glean.Schema.GleanTest.Types.StoredRevStringPairWithA_key
          where
@@ -8558,14 +8654,14 @@
     = Angle.NamedTy ()
         (Angle.SourceRef "glean.test.StoredRevStringPairWithA_key"
            (Prelude.Just 0))
-{-# LINE 257 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 271 "glean/schema/thrift/glean_test_include.hs" #-}
 type instance
      Angle.RecordFields
        Glean.Schema.GleanTest.Types.StoredRevStringPairWithA_key
      =
      'Angle.TField "fst" (Data.Text.Text)
        ('Angle.TField "snd" (Data.Text.Text) ('Angle.TNoFields))
-{-# LINE 259 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 273 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.GleanTest.Types.StoredRevStringPairWithA
          where
@@ -8582,7 +8678,7 @@
   getFactKey
     = Glean.Schema.GleanTest.Types.storedRevStringPairWithA_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 268 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 282 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type
            Glean.Schema.GleanTest.Types.StoredRevStringPairWithA
          where
@@ -8590,7 +8686,7 @@
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 274 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 288 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type
            Glean.Schema.GleanTest.Types.RevRevStringPair_key
          where
@@ -8606,14 +8702,14 @@
     = Angle.NamedTy ()
         (Angle.SourceRef "glean.test.RevRevStringPair_key"
            (Prelude.Just 0))
-{-# LINE 283 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 297 "glean/schema/thrift/glean_test_include.hs" #-}
 type instance
      Angle.RecordFields
        Glean.Schema.GleanTest.Types.RevRevStringPair_key
      =
      'Angle.TField "fst" (Data.Text.Text)
        ('Angle.TField "snd" (Data.Text.Text) ('Angle.TNoFields))
-{-# LINE 285 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 299 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.GleanTest.Types.RevRevStringPair
          where
@@ -8627,14 +8723,14 @@
     = Glean.Schema.GleanTest.Types.RevRevStringPair x k
   getFactKey = Glean.Schema.GleanTest.Types.revRevStringPair_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 294 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 308 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.RevRevStringPair
          where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 300 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 314 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Predicate Glean.Schema.GleanTest.Types.Bar where
   type KeyType Glean.Schema.GleanTest.Types.Bar = Data.Text.Text
   type ValueType Glean.Schema.GleanTest.Types.Bar =
@@ -8646,13 +8742,13 @@
     = Glean.Schema.GleanTest.Types.Bar x k v
   getFactKey = Glean.Schema.GleanTest.Types.bar_key
   getFactValue = Glean.Schema.GleanTest.Types.bar_value
-{-# LINE 310 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 324 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.Bar where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 316 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 330 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.KeyValue_key where
   buildRtsValue b (Glean.Schema.GleanTest.Types.KeyValue_key x1 x2)
     = do Glean.buildRtsValue b x1
@@ -8664,12 +8760,12 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "glean.test.KeyValue_key" (Prelude.Just 0))
-{-# LINE 325 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 339 "glean/schema/thrift/glean_test_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.GleanTest.Types.KeyValue_key =
      'Angle.TField "kstring" (Data.Text.Text)
        ('Angle.TField "knat" (Glean.Nat) ('Angle.TNoFields))
-{-# LINE 327 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 341 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.KeyValue_value
          where
   buildRtsValue b (Glean.Schema.GleanTest.Types.KeyValue_value x1 x2)
@@ -8682,12 +8778,12 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "glean.test.KeyValue_value" (Prelude.Just 0))
-{-# LINE 336 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 350 "glean/schema/thrift/glean_test_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.GleanTest.Types.KeyValue_value =
      'Angle.TField "vnat" (Glean.Nat)
        ('Angle.TField "vstring" (Data.Text.Text) ('Angle.TNoFields))
-{-# LINE 338 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 352 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Predicate Glean.Schema.GleanTest.Types.KeyValue
          where
   type KeyType Glean.Schema.GleanTest.Types.KeyValue =
@@ -8701,13 +8797,13 @@
     = Glean.Schema.GleanTest.Types.KeyValue x k v
   getFactKey = Glean.Schema.GleanTest.Types.keyValue_key
   getFactValue = Glean.Schema.GleanTest.Types.keyValue_value
-{-# LINE 349 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 363 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.KeyValue where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 355 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 369 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.RevStringPairs_key
          where
   buildRtsValue b
@@ -8721,7 +8817,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "glean.test.RevStringPairs_key" (Prelude.Just 0))
-{-# LINE 364 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 378 "glean/schema/thrift/glean_test_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.GleanTest.Types.RevStringPairs_key
      =
@@ -8729,7 +8825,7 @@
        ('Angle.TField "r"
           (Glean.KeyType Glean.Schema.GleanTest.Types.RevStringPair)
           ('Angle.TNoFields))
-{-# LINE 366 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 380 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.GleanTest.Types.RevStringPairs
          where
@@ -8743,14 +8839,14 @@
     = Glean.Schema.GleanTest.Types.RevStringPairs x k
   getFactKey = Glean.Schema.GleanTest.Types.revStringPairs_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 375 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 389 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.RevStringPairs
          where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 381 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 395 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.LeftOr_key where
   buildRtsValue b (Glean.Schema.GleanTest.Types.LeftOr_key x1 x2)
     = do Glean.buildRtsValue b x1
@@ -8761,12 +8857,12 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "glean.test.LeftOr_key" (Prelude.Just 0))
-{-# LINE 390 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 404 "glean/schema/thrift/glean_test_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.GleanTest.Types.LeftOr_key =
      'Angle.TField "x" (Data.Text.Text)
        ('Angle.TField "y" (Glean.Nat) ('Angle.TNoFields))
-{-# LINE 392 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 406 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Predicate Glean.Schema.GleanTest.Types.LeftOr where
   type KeyType Glean.Schema.GleanTest.Types.LeftOr =
        Glean.Schema.GleanTest.Types.LeftOr_key
@@ -8777,13 +8873,13 @@
     = Glean.Schema.GleanTest.Types.LeftOr x k
   getFactKey = Glean.Schema.GleanTest.Types.leftOr_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 401 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 415 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.LeftOr where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 407 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 421 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Predicate Glean.Schema.GleanTest.Types.IsGlean where
   type KeyType Glean.Schema.GleanTest.Types.IsGlean = Data.Text.Text
   getName _proxy = Glean.PredicateRef "glean.test.IsGlean" 6
@@ -8793,13 +8889,13 @@
     = Glean.Schema.GleanTest.Types.IsGlean x k
   getFactKey = Glean.Schema.GleanTest.Types.isGlean_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 415 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 429 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.IsGlean where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 421 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 435 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type
            Glean.Schema.GleanTest.Types.StoredDualStringPair_key
          where
@@ -8815,7 +8911,7 @@
     = Angle.NamedTy ()
         (Angle.SourceRef "glean.test.StoredDualStringPair_key"
            (Prelude.Just 0))
-{-# LINE 430 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 444 "glean/schema/thrift/glean_test_include.hs" #-}
 type instance
      Angle.RecordFields
        Glean.Schema.GleanTest.Types.StoredDualStringPair_key
@@ -8825,7 +8921,7 @@
        ('Angle.TField "snd"
           (Glean.KeyType Glean.Schema.GleanTest.Types.StringPair)
           ('Angle.TNoFields))
-{-# LINE 432 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 446 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.GleanTest.Types.StoredDualStringPair
          where
@@ -8840,7 +8936,7 @@
     = Glean.Schema.GleanTest.Types.StoredDualStringPair x k
   getFactKey = Glean.Schema.GleanTest.Types.storedDualStringPair_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 441 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 455 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type
            Glean.Schema.GleanTest.Types.StoredDualStringPair
          where
@@ -8848,7 +8944,7 @@
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 447 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 461 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.SkipRevEdge_key
          where
   buildRtsValue b
@@ -8862,7 +8958,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "glean.test.SkipRevEdge_key" (Prelude.Just 0))
-{-# LINE 456 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 470 "glean/schema/thrift/glean_test_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.GleanTest.Types.SkipRevEdge_key =
      'Angle.TField "child"
@@ -8870,7 +8966,7 @@
        ('Angle.TField "grandparent"
           (Glean.KeyType Glean.Schema.GleanTest.Types.Node)
           ('Angle.TNoFields))
-{-# LINE 458 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 472 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Predicate Glean.Schema.GleanTest.Types.SkipRevEdge
          where
   type KeyType Glean.Schema.GleanTest.Types.SkipRevEdge =
@@ -8883,13 +8979,13 @@
     = Glean.Schema.GleanTest.Types.SkipRevEdge x k
   getFactKey = Glean.Schema.GleanTest.Types.skipRevEdge_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 467 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 481 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.SkipRevEdge where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 473 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 487 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.DualStringPair_key
          where
   buildRtsValue b
@@ -8903,7 +8999,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "glean.test.DualStringPair_key" (Prelude.Just 0))
-{-# LINE 482 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 496 "glean/schema/thrift/glean_test_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.GleanTest.Types.DualStringPair_key
      =
@@ -8912,7 +9008,7 @@
        ('Angle.TField "snd"
           (Glean.KeyType Glean.Schema.GleanTest.Types.StringPair)
           ('Angle.TNoFields))
-{-# LINE 484 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 498 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.GleanTest.Types.DualStringPair
          where
@@ -8926,14 +9022,14 @@
     = Glean.Schema.GleanTest.Types.DualStringPair x k
   getFactKey = Glean.Schema.GleanTest.Types.dualStringPair_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 493 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 507 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.DualStringPair
          where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 499 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 513 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Predicate Glean.Schema.GleanTest.Types.Foo where
   type KeyType Glean.Schema.GleanTest.Types.Foo = Data.Text.Text
   type ValueType Glean.Schema.GleanTest.Types.Foo =
@@ -8945,13 +9041,13 @@
     = Glean.Schema.GleanTest.Types.Foo x k v
   getFactKey = Glean.Schema.GleanTest.Types.foo_key
   getFactValue = Glean.Schema.GleanTest.Types.foo_value
-{-# LINE 509 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 523 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.Foo where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 515 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 529 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Predicate Glean.Schema.GleanTest.Types.Predicate_0
          where
   type KeyType Glean.Schema.GleanTest.Types.Predicate_0 =
@@ -8964,13 +9060,13 @@
     = Glean.Schema.GleanTest.Types.Predicate_0 x k
   getFactKey = Glean.Schema.GleanTest.Types.predicate_0_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 523 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 537 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.Predicate_0 where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 529 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 543 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.RevStringPair_key
          where
   buildRtsValue b
@@ -8984,12 +9080,12 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "glean.test.RevStringPair_key" (Prelude.Just 0))
-{-# LINE 538 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 552 "glean/schema/thrift/glean_test_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.GleanTest.Types.RevStringPair_key =
      'Angle.TField "fst" (Data.Text.Text)
        ('Angle.TField "snd" (Data.Text.Text) ('Angle.TNoFields))
-{-# LINE 540 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 554 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Predicate Glean.Schema.GleanTest.Types.RevStringPair
          where
   type KeyType Glean.Schema.GleanTest.Types.RevStringPair =
@@ -9002,14 +9098,14 @@
     = Glean.Schema.GleanTest.Types.RevStringPair x k
   getFactKey = Glean.Schema.GleanTest.Types.revStringPair_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 549 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 563 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.RevStringPair
          where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 555 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 569 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.StringPairBox_key
          where
   buildRtsValue b (Glean.Schema.GleanTest.Types.StringPairBox_key x1)
@@ -9020,13 +9116,13 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "glean.test.StringPairBox_key" (Prelude.Just 0))
-{-# LINE 562 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 576 "glean/schema/thrift/glean_test_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.GleanTest.Types.StringPairBox_key =
      'Angle.TField "box"
        (Glean.KeyType Glean.Schema.GleanTest.Types.StringPair)
        ('Angle.TNoFields)
-{-# LINE 564 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 578 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Predicate Glean.Schema.GleanTest.Types.StringPairBox
          where
   type KeyType Glean.Schema.GleanTest.Types.StringPairBox =
@@ -9039,14 +9135,14 @@
     = Glean.Schema.GleanTest.Types.StringPairBox x k
   getFactKey = Glean.Schema.GleanTest.Types.stringPairBox_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 573 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 587 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.StringPairBox
          where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 579 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 593 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Predicate Glean.Schema.GleanTest.Types.IsParent
          where
   type KeyType Glean.Schema.GleanTest.Types.IsParent =
@@ -9058,13 +9154,13 @@
     = Glean.Schema.GleanTest.Types.IsParent x k
   getFactKey = Glean.Schema.GleanTest.Types.isParent_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 588 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 602 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.IsParent where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 594 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 608 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Predicate Glean.Schema.GleanTest.Types.IsThree where
   type KeyType Glean.Schema.GleanTest.Types.IsThree = Glean.Nat
   getName _proxy = Glean.PredicateRef "glean.test.IsThree" 6
@@ -9074,13 +9170,13 @@
     = Glean.Schema.GleanTest.Types.IsThree x k
   getFactKey = Glean.Schema.GleanTest.Types.isThree_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 602 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 616 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.IsThree where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 608 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 622 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Predicate Glean.Schema.GleanTest.Types.FooToFoo
          where
   type KeyType Glean.Schema.GleanTest.Types.FooToFoo =
@@ -9094,13 +9190,13 @@
     = Glean.Schema.GleanTest.Types.FooToFoo x k v
   getFactKey = Glean.Schema.GleanTest.Types.fooToFoo_key
   getFactValue = Glean.Schema.GleanTest.Types.fooToFoo_value
-{-# LINE 619 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 633 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.FooToFoo where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 625 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 639 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type
            Glean.Schema.GleanTest.Types.RevStringPairRec_key
          where
@@ -9116,14 +9212,14 @@
     = Angle.NamedTy ()
         (Angle.SourceRef "glean.test.RevStringPairRec_key"
            (Prelude.Just 0))
-{-# LINE 634 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 648 "glean/schema/thrift/glean_test_include.hs" #-}
 type instance
      Angle.RecordFields
        Glean.Schema.GleanTest.Types.RevStringPairRec_key
      =
      'Angle.TField "fst" (Data.Text.Text)
        ('Angle.TField "snd" (Data.Text.Text) ('Angle.TNoFields))
-{-# LINE 636 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 650 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.GleanTest.Types.RevStringPairRec
          where
@@ -9137,14 +9233,14 @@
     = Glean.Schema.GleanTest.Types.RevStringPairRec x k
   getFactKey = Glean.Schema.GleanTest.Types.revStringPairRec_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 645 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 659 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.RevStringPairRec
          where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 651 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 665 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.NothingTest_key
          where
   buildRtsValue b
@@ -9158,12 +9254,12 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "glean.test.nothingTest_key" (Prelude.Just 0))
-{-# LINE 660 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 674 "glean/schema/thrift/glean_test_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.GleanTest.Types.NothingTest_key =
      'Angle.TField "a" (Prelude.Maybe Data.Text.Text)
        ('Angle.TField "b" (Glean.Nat) ('Angle.TNoFields))
-{-# LINE 662 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 676 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Predicate Glean.Schema.GleanTest.Types.NothingTest
          where
   type KeyType Glean.Schema.GleanTest.Types.NothingTest =
@@ -9176,13 +9272,13 @@
     = Glean.Schema.GleanTest.Types.NothingTest x k
   getFactKey = Glean.Schema.GleanTest.Types.nothingTest_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 671 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 685 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.NothingTest where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 677 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 691 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Predicate Glean.Schema.GleanTest.Types.RefRef where
   type KeyType Glean.Schema.GleanTest.Types.RefRef =
        Glean.Schema.GleanTest.Types.Ref
@@ -9193,13 +9289,13 @@
     = Glean.Schema.GleanTest.Types.RefRef x k
   getFactKey = Glean.Schema.GleanTest.Types.refRef_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 686 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 700 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.RefRef where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 692 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 706 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Predicate Glean.Schema.GleanTest.Types.Qux where
   type KeyType Glean.Schema.GleanTest.Types.Qux = Data.Text.Text
   getName _proxy = Glean.PredicateRef "glean.test.Qux" 6
@@ -9209,13 +9305,13 @@
     = Glean.Schema.GleanTest.Types.Qux x k
   getFactKey = Glean.Schema.GleanTest.Types.qux_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 700 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 714 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.Qux where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 706 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 720 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type
            Glean.Schema.GleanTest.Types.StoredRevStringPair_key
          where
@@ -9231,14 +9327,14 @@
     = Angle.NamedTy ()
         (Angle.SourceRef "glean.test.StoredRevStringPair_key"
            (Prelude.Just 0))
-{-# LINE 715 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 729 "glean/schema/thrift/glean_test_include.hs" #-}
 type instance
      Angle.RecordFields
        Glean.Schema.GleanTest.Types.StoredRevStringPair_key
      =
      'Angle.TField "fst" (Data.Text.Text)
        ('Angle.TField "snd" (Data.Text.Text) ('Angle.TNoFields))
-{-# LINE 717 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 731 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.GleanTest.Types.StoredRevStringPair
          where
@@ -9253,7 +9349,7 @@
     = Glean.Schema.GleanTest.Types.StoredRevStringPair x k
   getFactKey = Glean.Schema.GleanTest.Types.storedRevStringPair_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 726 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 740 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type
            Glean.Schema.GleanTest.Types.StoredRevStringPair
          where
@@ -9261,7 +9357,7 @@
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 732 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 746 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type
            Glean.Schema.GleanTest.Types.EmptyStoredStringPair_key
          where
@@ -9277,14 +9373,14 @@
     = Angle.NamedTy ()
         (Angle.SourceRef "glean.test.EmptyStoredStringPair_key"
            (Prelude.Just 0))
-{-# LINE 741 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 755 "glean/schema/thrift/glean_test_include.hs" #-}
 type instance
      Angle.RecordFields
        Glean.Schema.GleanTest.Types.EmptyStoredStringPair_key
      =
      'Angle.TField "fst" (Data.Text.Text)
        ('Angle.TField "snd" (Data.Text.Text) ('Angle.TNoFields))
-{-# LINE 743 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 757 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.GleanTest.Types.EmptyStoredStringPair
          where
@@ -9299,7 +9395,7 @@
     = Glean.Schema.GleanTest.Types.EmptyStoredStringPair x k
   getFactKey = Glean.Schema.GleanTest.Types.emptyStoredStringPair_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 752 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 766 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type
            Glean.Schema.GleanTest.Types.EmptyStoredStringPair
          where
@@ -9307,7 +9403,7 @@
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 758 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 772 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Predicate Glean.Schema.GleanTest.Types.Ref where
   type KeyType Glean.Schema.GleanTest.Types.Ref =
        Glean.Schema.GleanTest.Types.Predicate
@@ -9318,13 +9414,13 @@
     = Glean.Schema.GleanTest.Types.Ref x k
   getFactKey = Glean.Schema.GleanTest.Types.ref_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 767 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 781 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.Ref where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 773 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 787 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.StringPair_key
          where
   buildRtsValue b (Glean.Schema.GleanTest.Types.StringPair_key x1 x2)
@@ -9337,12 +9433,12 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "glean.test.StringPair_key" (Prelude.Just 0))
-{-# LINE 782 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 796 "glean/schema/thrift/glean_test_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.GleanTest.Types.StringPair_key =
      'Angle.TField "fst" (Data.Text.Text)
        ('Angle.TField "snd" (Data.Text.Text) ('Angle.TNoFields))
-{-# LINE 784 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 798 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Predicate Glean.Schema.GleanTest.Types.StringPair
          where
   type KeyType Glean.Schema.GleanTest.Types.StringPair =
@@ -9355,13 +9451,13 @@
     = Glean.Schema.GleanTest.Types.StringPair x k
   getFactKey = Glean.Schema.GleanTest.Types.stringPair_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 793 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 807 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.StringPair where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 799 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 813 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type
            Glean.Schema.GleanTest.Types.DerivedKeyValue2_key
          where
@@ -9377,14 +9473,14 @@
     = Angle.NamedTy ()
         (Angle.SourceRef "glean.test.DerivedKeyValue2_key"
            (Prelude.Just 0))
-{-# LINE 808 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 822 "glean/schema/thrift/glean_test_include.hs" #-}
 type instance
      Angle.RecordFields
        Glean.Schema.GleanTest.Types.DerivedKeyValue2_key
      =
      'Angle.TField "kstring" (Data.Text.Text)
        ('Angle.TField "knat" (Glean.Nat) ('Angle.TNoFields))
-{-# LINE 810 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 824 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type
            Glean.Schema.GleanTest.Types.DerivedKeyValue2_value
          where
@@ -9400,14 +9496,14 @@
     = Angle.NamedTy ()
         (Angle.SourceRef "glean.test.DerivedKeyValue2_value"
            (Prelude.Just 0))
-{-# LINE 819 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 833 "glean/schema/thrift/glean_test_include.hs" #-}
 type instance
      Angle.RecordFields
        Glean.Schema.GleanTest.Types.DerivedKeyValue2_value
      =
      'Angle.TField "vnat" (Glean.Nat)
        ('Angle.TField "vstring" (Data.Text.Text) ('Angle.TNoFields))
-{-# LINE 821 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 835 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.GleanTest.Types.DerivedKeyValue2
          where
@@ -9423,14 +9519,14 @@
     = Glean.Schema.GleanTest.Types.DerivedKeyValue2 x k v
   getFactKey = Glean.Schema.GleanTest.Types.derivedKeyValue2_key
   getFactValue = Glean.Schema.GleanTest.Types.derivedKeyValue2_value
-{-# LINE 832 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 846 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.DerivedKeyValue2
          where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 838 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 852 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.NodePair_key where
   buildRtsValue b (Glean.Schema.GleanTest.Types.NodePair_key x1 x2)
     = do Glean.buildRtsValue b x1
@@ -9442,7 +9538,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "glean.test.NodePair_key" (Prelude.Just 0))
-{-# LINE 847 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 861 "glean/schema/thrift/glean_test_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.GleanTest.Types.NodePair_key =
      'Angle.TField "fst"
@@ -9450,7 +9546,7 @@
        ('Angle.TField "snd"
           (Glean.KeyType Glean.Schema.GleanTest.Types.Node)
           ('Angle.TNoFields))
-{-# LINE 849 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 863 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Predicate Glean.Schema.GleanTest.Types.NodePair
          where
   type KeyType Glean.Schema.GleanTest.Types.NodePair =
@@ -9462,13 +9558,13 @@
     = Glean.Schema.GleanTest.Types.NodePair x k
   getFactKey = Glean.Schema.GleanTest.Types.nodePair_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 858 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 872 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.NodePair where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 864 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 878 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.GleanTest.Types.ReflStringPair
          where
@@ -9482,14 +9578,14 @@
     = Glean.Schema.GleanTest.Types.ReflStringPair x k
   getFactKey = Glean.Schema.GleanTest.Types.reflStringPair_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 872 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 886 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.ReflStringPair
          where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 878 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 892 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.LeftOr2_key where
   buildRtsValue b (Glean.Schema.GleanTest.Types.LeftOr2_key x1 x2)
     = do Glean.buildRtsValue b x1
@@ -9500,12 +9596,12 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "glean.test.LeftOr2_key" (Prelude.Just 0))
-{-# LINE 887 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 901 "glean/schema/thrift/glean_test_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.GleanTest.Types.LeftOr2_key =
      'Angle.TField "x" (Data.Text.Text)
        ('Angle.TField "y" (Glean.Nat) ('Angle.TNoFields))
-{-# LINE 889 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 903 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Predicate Glean.Schema.GleanTest.Types.LeftOr2 where
   type KeyType Glean.Schema.GleanTest.Types.LeftOr2 =
        Glean.Schema.GleanTest.Types.LeftOr2_key
@@ -9516,13 +9612,13 @@
     = Glean.Schema.GleanTest.Types.LeftOr2 x k
   getFactKey = Glean.Schema.GleanTest.Types.leftOr2_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 898 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 912 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.LeftOr2 where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 904 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 918 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.Expr_key where
   buildRtsValue b Glean.Schema.GleanTest.Types.Expr_key_EMPTY
     = Glean.buildRtsSelector b 5
@@ -9552,7 +9648,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "glean.test.Expr_key" (Prelude.Just 0))
-{-# LINE 932 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 946 "glean/schema/thrift/glean_test_include.hs" #-}
 type instance Angle.SumFields Glean.Schema.GleanTest.Types.Expr_key
      =
      'Angle.TField "var_"
@@ -9563,7 +9659,7 @@
              ('Angle.TField "ap" (Glean.Schema.GleanTest.Types.Expr_ap_)
                 ('Angle.TField "lam" (Glean.Schema.GleanTest.Types.Expr_lam_)
                    ('Angle.TNoFields)))))
-{-# LINE 934 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 948 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Predicate Glean.Schema.GleanTest.Types.Expr where
   type KeyType Glean.Schema.GleanTest.Types.Expr =
        Glean.Schema.GleanTest.Types.Expr_key
@@ -9574,13 +9670,13 @@
     = Glean.Schema.GleanTest.Types.Expr x k
   getFactKey = Glean.Schema.GleanTest.Types.expr_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 943 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 957 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.Expr where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 949 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 963 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Predicate Glean.Schema.GleanTest.Types.EdgeFromNotA
          where
   type KeyType Glean.Schema.GleanTest.Types.EdgeFromNotA =
@@ -9593,13 +9689,13 @@
     = Glean.Schema.GleanTest.Types.EdgeFromNotA x k
   getFactKey = Glean.Schema.GleanTest.Types.edgeFromNotA_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 958 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 972 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.EdgeFromNotA where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 964 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 978 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.Unbound2_key where
   buildRtsValue b (Glean.Schema.GleanTest.Types.Unbound2_key x1 x2)
     = do Glean.buildRtsValue b x1
@@ -9611,12 +9707,12 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "glean.test.Unbound2_key" (Prelude.Just 0))
-{-# LINE 973 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 987 "glean/schema/thrift/glean_test_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.GleanTest.Types.Unbound2_key =
      'Angle.TField "x" (Data.Text.Text)
        ('Angle.TField "y" (Data.Text.Text) ('Angle.TNoFields))
-{-# LINE 975 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 989 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Predicate Glean.Schema.GleanTest.Types.Unbound2
          where
   type KeyType Glean.Schema.GleanTest.Types.Unbound2 =
@@ -9628,13 +9724,13 @@
     = Glean.Schema.GleanTest.Types.Unbound2 x k
   getFactKey = Glean.Schema.GleanTest.Types.unbound2_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 984 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 998 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.Unbound2 where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 990 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1004 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type
            Glean.Schema.GleanTest.Types.StoredRevStringPairWithRev_key
          where
@@ -9650,14 +9746,14 @@
     = Angle.NamedTy ()
         (Angle.SourceRef "glean.test.StoredRevStringPairWithRev_key"
            (Prelude.Just 0))
-{-# LINE 999 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1013 "glean/schema/thrift/glean_test_include.hs" #-}
 type instance
      Angle.RecordFields
        Glean.Schema.GleanTest.Types.StoredRevStringPairWithRev_key
      =
      'Angle.TField "fst" (Data.Text.Text)
        ('Angle.TField "snd" (Data.Text.Text) ('Angle.TNoFields))
-{-# LINE 1001 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1015 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Predicate
            Glean.Schema.GleanTest.Types.StoredRevStringPairWithRev
          where
@@ -9675,7 +9771,7 @@
   getFactKey
     = Glean.Schema.GleanTest.Types.storedRevStringPairWithRev_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 1011 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1025 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type
            Glean.Schema.GleanTest.Types.StoredRevStringPairWithRev
          where
@@ -9683,7 +9779,7 @@
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 1017 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1031 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.RevEdge_key where
   buildRtsValue b (Glean.Schema.GleanTest.Types.RevEdge_key x1 x2)
     = do Glean.buildRtsValue b x1
@@ -9694,7 +9790,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "glean.test.RevEdge_key" (Prelude.Just 0))
-{-# LINE 1026 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1040 "glean/schema/thrift/glean_test_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.GleanTest.Types.RevEdge_key =
      'Angle.TField "child"
@@ -9702,7 +9798,7 @@
        ('Angle.TField "parent"
           (Glean.KeyType Glean.Schema.GleanTest.Types.Node)
           ('Angle.TNoFields))
-{-# LINE 1028 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1042 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Predicate Glean.Schema.GleanTest.Types.RevEdge where
   type KeyType Glean.Schema.GleanTest.Types.RevEdge =
        Glean.Schema.GleanTest.Types.RevEdge_key
@@ -9713,13 +9809,13 @@
     = Glean.Schema.GleanTest.Types.RevEdge x k
   getFactKey = Glean.Schema.GleanTest.Types.revEdge_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 1037 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1051 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.RevEdge where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 1043 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1057 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.Edge_key where
   buildRtsValue b (Glean.Schema.GleanTest.Types.Edge_key x1 x2)
     = do Glean.buildRtsValue b x1
@@ -9730,7 +9826,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "glean.test.Edge_key" (Prelude.Just 0))
-{-# LINE 1052 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1066 "glean/schema/thrift/glean_test_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.GleanTest.Types.Edge_key =
      'Angle.TField "parent"
@@ -9738,7 +9834,7 @@
        ('Angle.TField "child"
           (Glean.KeyType Glean.Schema.GleanTest.Types.Node)
           ('Angle.TNoFields))
-{-# LINE 1054 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1068 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Predicate Glean.Schema.GleanTest.Types.Edge where
   type KeyType Glean.Schema.GleanTest.Types.Edge =
        Glean.Schema.GleanTest.Types.Edge_key
@@ -9749,13 +9845,13 @@
     = Glean.Schema.GleanTest.Types.Edge x k
   getFactKey = Glean.Schema.GleanTest.Types.edge_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 1063 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1077 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.Edge where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 1069 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1083 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Predicate Glean.Schema.GleanTest.Types.Name where
   type KeyType Glean.Schema.GleanTest.Types.Name = Data.Text.Text
   getName _proxy = Glean.PredicateRef "glean.test.Name" 6
@@ -9765,13 +9861,13 @@
     = Glean.Schema.GleanTest.Types.Name x k
   getFactKey = Glean.Schema.GleanTest.Types.name_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 1077 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1091 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.Name where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 1083 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1097 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.SameString_key
          where
   buildRtsValue b (Glean.Schema.GleanTest.Types.SameString_key x1 x2)
@@ -9784,12 +9880,12 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "glean.test.SameString_key" (Prelude.Just 0))
-{-# LINE 1092 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1106 "glean/schema/thrift/glean_test_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.GleanTest.Types.SameString_key =
      'Angle.TField "x" (Data.Text.Text)
        ('Angle.TField "y" (Data.Text.Text) ('Angle.TNoFields))
-{-# LINE 1094 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1108 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Predicate Glean.Schema.GleanTest.Types.SameString
          where
   type KeyType Glean.Schema.GleanTest.Types.SameString =
@@ -9802,13 +9898,13 @@
     = Glean.Schema.GleanTest.Types.SameString x k
   getFactKey = Glean.Schema.GleanTest.Types.sameString_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 1103 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1117 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.SameString where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 1109 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1123 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.Tree_key where
   buildRtsValue b (Glean.Schema.GleanTest.Types.Tree_key x1 x2 x3)
     = do Glean.buildRtsValue b x1
@@ -9821,7 +9917,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "glean.test.Tree_key" (Prelude.Just 0))
-{-# LINE 1120 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1134 "glean/schema/thrift/glean_test_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.GleanTest.Types.Tree_key =
      'Angle.TField "node"
@@ -9831,7 +9927,7 @@
           ('Angle.TField "right"
              (Prelude.Maybe Glean.Schema.GleanTest.Types.Tree)
              ('Angle.TNoFields)))
-{-# LINE 1122 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1136 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Predicate Glean.Schema.GleanTest.Types.Tree where
   type KeyType Glean.Schema.GleanTest.Types.Tree =
        Glean.Schema.GleanTest.Types.Tree_key
@@ -9842,13 +9938,13 @@
     = Glean.Schema.GleanTest.Types.Tree x k
   getFactKey = Glean.Schema.GleanTest.Types.tree_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 1131 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1145 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.Tree where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 1137 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1151 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.Rec where
   buildRtsValue b (Glean.Schema.GleanTest.Types.Rec x1 x2)
     = do Glean.buildRtsValue b x1
@@ -9859,12 +9955,12 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "glean.test.Rec" (Prelude.Just 6))
-{-# LINE 1146 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1160 "glean/schema/thrift/glean_test_include.hs" #-}
 type instance Angle.RecordFields Glean.Schema.GleanTest.Types.Rec =
      'Angle.TField "alpha" (Glean.Schema.GleanTest.Types.Enum_)
        ('Angle.TField "beta" (Glean.Schema.GleanTest.Types.Sum)
           ('Angle.TNoFields))
-{-# LINE 1148 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1162 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.EdgeSum where
   buildRtsValue b Glean.Schema.GleanTest.Types.EdgeSum_EMPTY
     = Glean.buildRtsSelector b 2
@@ -9882,7 +9978,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "glean.test.EdgeSum" (Prelude.Just 6))
-{-# LINE 1164 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1178 "glean/schema/thrift/glean_test_include.hs" #-}
 type instance Angle.SumFields Glean.Schema.GleanTest.Types.EdgeSum
      =
      'Angle.TField "fst"
@@ -9890,7 +9986,7 @@
        ('Angle.TField "snd"
           (Glean.KeyType Glean.Schema.GleanTest.Types.EdgeWrapper)
           ('Angle.TNoFields))
-{-# LINE 1166 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1180 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.WrappedStringPair
          where
   buildRtsValue b (Glean.Schema.GleanTest.Types.WrappedStringPair x1)
@@ -9901,13 +9997,13 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "glean.test.WrappedStringPair" (Prelude.Just 6))
-{-# LINE 1173 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1187 "glean/schema/thrift/glean_test_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.GleanTest.Types.WrappedStringPair =
      'Angle.TField "wrapped"
        (Glean.KeyType Glean.Schema.GleanTest.Types.StringPair)
        ('Angle.TNoFields)
-{-# LINE 1175 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1189 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.KitchenSink where
   buildRtsValue b
     (Glean.Schema.GleanTest.Types.KitchenSink x1 x2 x3 x4 x5 x6 x7 x8
@@ -9971,7 +10067,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "glean.test.KitchenSink" (Prelude.Just 6))
-{-# LINE 1234 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1248 "glean/schema/thrift/glean_test_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.GleanTest.Types.KitchenSink =
      'Angle.TField "byt" (Glean.Byte)
@@ -10023,7 +10119,7 @@
                                                                                      "set_of_pred"
                                                                                      ([Glean.Schema.GleanTest.Types.Predicate])
                                                                                      ('Angle.TNoFields)))))))))))))))))))))))))))
-{-# LINE 1236 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1250 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.Sum where
   buildRtsValue b Glean.Schema.GleanTest.Types.Sum_EMPTY
     = Glean.buildRtsSelector b 3
@@ -10044,12 +10140,12 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "glean.test.Sum" (Prelude.Just 6))
-{-# LINE 1256 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1270 "glean/schema/thrift/glean_test_include.hs" #-}
 type instance Angle.SumFields Glean.Schema.GleanTest.Types.Sum =
      'Angle.TField "mon" (Glean.Byte)
        ('Angle.TField "tue" (Glean.Nat)
           ('Angle.TField "wed" (Prelude.Bool) ('Angle.TNoFields)))
-{-# LINE 1258 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1272 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.Entity where
   buildRtsValue b Glean.Schema.GleanTest.Types.Entity_EMPTY
     = Glean.buildRtsSelector b 2
@@ -10067,30 +10163,30 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "glean.test.Entity" (Prelude.Just 6))
-{-# LINE 1274 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1288 "glean/schema/thrift/glean_test_include.hs" #-}
 type instance Angle.SumFields Glean.Schema.GleanTest.Types.Entity =
      'Angle.TField "cxx" (Glean.Schema.CodeCxx.Types.Entity)
        ('Angle.TField "pp" (Glean.KeyType Glean.Schema.Pp1.Types.Define)
           ('Angle.TNoFields))
-{-# LINE 1276 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1290 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.Enum_ where
   buildRtsValue = Glean.thriftEnum_buildRtsValue
   decodeRtsValue = Glean.thriftEnumD
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "glean.test.Enum_" (Prelude.Just 6))
-{-# LINE 1281 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1295 "glean/schema/thrift/glean_test_include.hs" #-}
 type instance Angle.SumFields Glean.Schema.GleanTest.Types.Enum_ =
      'Angle.TField "red" (Glean.Schema.Builtin.Types.Unit)
        ('Angle.TField "green" (Glean.Schema.Builtin.Types.Unit)
           ('Angle.TField "blue" (Glean.Schema.Builtin.Types.Unit)
              ('Angle.TNoFields)))
-{-# LINE 1283 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1297 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Angle.AngleEnum Glean.Schema.GleanTest.Types.Enum_ where
   type AngleEnumTy Glean.Schema.GleanTest.Types.Enum_ =
        Glean.Schema.GleanTest.Types.Enum_
   enumName v = Text.pack (Prelude.drop 6 (Prelude.show v))
-{-# LINE 1287 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1301 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.Expr_ap_ where
   buildRtsValue b (Glean.Schema.GleanTest.Types.Expr_ap_ x1 x2)
     = do Glean.buildRtsValue b x1
@@ -10101,7 +10197,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "glean.test.Expr_ap_" (Prelude.Just 0))
-{-# LINE 1296 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1310 "glean/schema/thrift/glean_test_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.GleanTest.Types.Expr_ap_ =
      'Angle.TField "fun"
@@ -10109,7 +10205,7 @@
        ('Angle.TField "arg"
           (Glean.KeyType Glean.Schema.GleanTest.Types.Expr)
           ('Angle.TNoFields))
-{-# LINE 1298 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1312 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.Expr_lam_ where
   buildRtsValue b (Glean.Schema.GleanTest.Types.Expr_lam_ x1 x2)
     = do Glean.buildRtsValue b x1
@@ -10120,7 +10216,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "glean.test.Expr_lam_" (Prelude.Just 0))
-{-# LINE 1307 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1321 "glean/schema/thrift/glean_test_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.GleanTest.Types.Expr_lam_ =
      'Angle.TField "var_"
@@ -10128,7 +10224,7 @@
        ('Angle.TField "body"
           (Glean.KeyType Glean.Schema.GleanTest.Types.Expr)
           ('Angle.TNoFields))
-{-# LINE 1309 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1323 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type
            Glean.Schema.GleanTest.Types.KitchenSink_record_
          where
@@ -10143,13 +10239,13 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "glean.test.KitchenSink_record_" (Prelude.Just 0))
-{-# LINE 1318 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1332 "glean/schema/thrift/glean_test_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.GleanTest.Types.KitchenSink_record_
      =
      'Angle.TField "a" (Glean.Byte)
        ('Angle.TField "b" (Glean.Nat) ('Angle.TNoFields))
-{-# LINE 1320 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1334 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.KitchenSink_sum_
          where
   buildRtsValue b Glean.Schema.GleanTest.Types.KitchenSink_sum__EMPTY
@@ -10168,14 +10264,14 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "glean.test.KitchenSink_sum_" (Prelude.Just 0))
-{-# LINE 1336 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1350 "glean/schema/thrift/glean_test_include.hs" #-}
 type instance
      Angle.SumFields Glean.Schema.GleanTest.Types.KitchenSink_sum_ =
      'Angle.TField "c"
        (Glean.KeyType Glean.Schema.GleanTest.Types.Predicate)
        ('Angle.TField "d" (Glean.KeyType Glean.Schema.Sys.Types.Blob)
           ('Angle.TNoFields))
-{-# LINE 1338 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1352 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Glean.Type Glean.Schema.GleanTest.Types.KitchenSink_enum_
          where
   buildRtsValue = Glean.thriftEnum_buildRtsValue
@@ -10183,14 +10279,14 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "glean.test.KitchenSink_enum_" (Prelude.Just 0))
-{-# LINE 1343 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1357 "glean/schema/thrift/glean_test_include.hs" #-}
 type instance
      Angle.SumFields Glean.Schema.GleanTest.Types.KitchenSink_enum_ =
      'Angle.TField "e" (Glean.Schema.Builtin.Types.Unit)
        ('Angle.TField "f" (Glean.Schema.Builtin.Types.Unit)
           ('Angle.TField "g" (Glean.Schema.Builtin.Types.Unit)
              ('Angle.TNoFields)))
-{-# LINE 1345 "glean/schema/thrift/glean_test_include.hs" #-}
+{-# LINE 1359 "glean/schema/thrift/glean_test_include.hs" #-}
 instance Angle.AngleEnum
            Glean.Schema.GleanTest.Types.KitchenSink_enum_
          where
diff --git a/glean/schema/thrift/gen-hs2/Glean/Schema/Hack/Types.hs b/glean/schema/thrift/gen-hs2/Glean/Schema/Hack/Types.hs
--- a/glean/schema/thrift/gen-hs2/Glean/Schema/Hack/Types.hs
+++ b/glean/schema/thrift/gen-hs2/Glean/Schema/Hack/Types.hs
@@ -90,25161 +90,25976 @@
         PropertyDefinition(PropertyDefinition, propertyDefinition_id,
                            propertyDefinition_key),
         Signature_id, Signature(Signature, signature_id, signature_key),
-        NamespaceQName_id,
-        NamespaceQName(NamespaceQName, namespaceQName_id,
-                       namespaceQName_key),
-        NamespaceDeclaration_id,
-        NamespaceDeclaration(NamespaceDeclaration, namespaceDeclaration_id,
-                             namespaceDeclaration_key),
-        NameLowerCase_id,
-        NameLowerCase(NameLowerCase, nameLowerCase_id, nameLowerCase_key),
-        Name_id, Name(Name, name_id, name_key), ModuleDefinition_id,
-        ModuleDefinition(ModuleDefinition, moduleDefinition_id,
-                         moduleDefinition_key),
-        ModuleDeclaration_id,
-        ModuleDeclaration(ModuleDeclaration, moduleDeclaration_id,
-                          moduleDeclaration_key),
-        MethodOverrides_id,
-        MethodOverrides(MethodOverrides, methodOverrides_id,
-                        methodOverrides_key),
-        MethodOverridden_id,
-        MethodOverridden(MethodOverridden, methodOverridden_id,
-                         methodOverridden_key),
-        MethodOccurrence_id,
-        MethodOccurrence(MethodOccurrence, methodOccurrence_id,
-                         methodOccurrence_key),
-        InterfaceDeclaration_id,
-        InterfaceDeclaration(InterfaceDeclaration, interfaceDeclaration_id,
-                             interfaceDeclaration_key),
-        IndexerInputsHash_id,
-        IndexerInputsHash(IndexerInputsHash, indexerInputsHash_id,
-                          indexerInputsHash_key, indexerInputsHash_value),
-        GlobalNamespaceAlias_id,
-        GlobalNamespaceAlias(GlobalNamespaceAlias, globalNamespaceAlias_id,
-                             globalNamespaceAlias_key),
-        GlobalConstDefinition_id,
-        GlobalConstDefinition(GlobalConstDefinition,
-                              globalConstDefinition_id, globalConstDefinition_key),
-        GlobalConstDeclaration_id,
-        GlobalConstDeclaration(GlobalConstDeclaration,
-                               globalConstDeclaration_id, globalConstDeclaration_key),
-        FunctionDeclaration_id,
-        FunctionDeclaration(FunctionDeclaration, functionDeclaration_id,
-                            functionDeclaration_key),
-        Hint_id, Hint(Hint, hint_id, hint_key), Enumerator_id,
-        Enumerator(Enumerator, enumerator_id, enumerator_key),
-        EnumDefinition_id,
-        EnumDefinition(EnumDefinition, enumDefinition_id,
-                       enumDefinition_key),
-        EnumDeclaration_id,
-        EnumDeclaration(EnumDeclaration, enumDeclaration_id,
-                        enumDeclaration_key),
-        Context__id, Context_(Context_, context__id, context__key),
-        ContainerDeclarationQName_id,
-        ContainerDeclarationQName(ContainerDeclarationQName,
-                                  containerDeclarationQName_id, containerDeclarationQName_key,
-                                  containerDeclarationQName_value),
-        ContainerParent_id,
-        ContainerParent(ContainerParent, containerParent_id,
-                        containerParent_key),
-        DeclarationComment_id,
-        DeclarationComment(DeclarationComment, declarationComment_id,
-                           declarationComment_key),
-        DeclarationLocation_id,
-        DeclarationLocation(DeclarationLocation, declarationLocation_id,
-                            declarationLocation_key),
-        DeclarationName_id,
-        DeclarationName(DeclarationName, declarationName_id,
-                        declarationName_key, declarationName_value),
-        DeclarationNamespace_id,
-        DeclarationNamespace(DeclarationNamespace, declarationNamespace_id,
-                             declarationNamespace_key),
-        DeclarationSource_id,
-        DeclarationSource(DeclarationSource, declarationSource_id,
-                          declarationSource_key),
-        DeclarationSpan_id,
-        DeclarationSpan(DeclarationSpan, declarationSpan_id,
-                        declarationSpan_key),
-        DeclarationTarget_id,
-        DeclarationTarget(DeclarationTarget, declarationTarget_id,
-                          declarationTarget_key),
-        FileDeclarations_id,
-        FileDeclarations(FileDeclarations, fileDeclarations_id,
-                         fileDeclarations_key),
-        HackToThrift_id,
-        HackToThrift(HackToThrift, hackToThrift_id, hackToThrift_key),
-        MemberCluster_id,
-        MemberCluster(MemberCluster, memberCluster_id, memberCluster_key),
-        ModuleChild_id,
-        ModuleChild(ModuleChild, moduleChild_id, moduleChild_key),
-        ModuleParent_id,
-        ModuleParent(ModuleParent, moduleParent_id, moduleParent_key),
-        NamespaceMember_id,
-        NamespaceMember(NamespaceMember, namespaceMember_id,
-                        namespaceMember_key),
-        SearchClassByName_id,
-        SearchClassByName(SearchClassByName, searchClassByName_id,
-                          searchClassByName_key),
-        SearchClassConstByName_id,
-        SearchClassConstByName(SearchClassConstByName,
-                               searchClassConstByName_id, searchClassConstByName_key),
-        SearchEnumByName_id,
-        SearchEnumByName(SearchEnumByName, searchEnumByName_id,
-                         searchEnumByName_key),
-        SearchEnumeratorByName_id,
-        SearchEnumeratorByName(SearchEnumeratorByName,
-                               searchEnumeratorByName_id, searchEnumeratorByName_key),
-        SearchFunctionByName_id,
-        SearchFunctionByName(SearchFunctionByName, searchFunctionByName_id,
-                             searchFunctionByName_key),
-        SearchGlobalConstByName_id,
-        SearchGlobalConstByName(SearchGlobalConstByName,
-                                searchGlobalConstByName_id, searchGlobalConstByName_key),
-        SearchInterfaceByName_id,
-        SearchInterfaceByName(SearchInterfaceByName,
-                              searchInterfaceByName_id, searchInterfaceByName_key),
-        SearchMethodByName_id,
-        SearchMethodByName(SearchMethodByName, searchMethodByName_id,
-                           searchMethodByName_key),
-        SearchModuleByName_id,
-        SearchModuleByName(SearchModuleByName, searchModuleByName_id,
-                           searchModuleByName_key),
-        SearchNamespaceByName_id,
-        SearchNamespaceByName(SearchNamespaceByName,
-                              searchNamespaceByName_id, searchNamespaceByName_key),
-        SearchPropertyByName_id,
-        SearchPropertyByName(SearchPropertyByName, searchPropertyByName_id,
-                             searchPropertyByName_key),
-        SearchTraitByName_id,
-        SearchTraitByName(SearchTraitByName, searchTraitByName_id,
-                          searchTraitByName_key),
-        SearchTypeConstByName_id,
-        SearchTypeConstByName(SearchTypeConstByName,
-                              searchTypeConstByName_id, searchTypeConstByName_key),
-        SearchTypedefByName_id,
-        SearchTypedefByName(SearchTypedefByName, searchTypedefByName_id,
-                            searchTypedefByName_key),
-        ThriftToHack_id,
-        ThriftToHack(ThriftToHack, thriftToHack_id, thriftToHack_key),
-        TargetUses_id,
-        TargetUses(TargetUses, targetUses_id, targetUses_key),
-        TargetUsesAbs_id,
-        TargetUsesAbs(TargetUsesAbs, targetUsesAbs_id, targetUsesAbs_key),
-        FileXRefs_id, FileXRefs(FileXRefs, fileXRefs_id, fileXRefs_key),
-        TypeInfo_id, TypeInfo(TypeInfo, typeInfo_id, typeInfo_key),
-        InheritedMembers_id,
-        InheritedMembers(InheritedMembers, inheritedMembers_id,
-                         inheritedMembers_key),
-        MethodDeclaration_id,
-        MethodDeclaration(MethodDeclaration, methodDeclaration_id,
-                          methodDeclaration_key),
-        PropertyDeclaration_id,
-        PropertyDeclaration(PropertyDeclaration, propertyDeclaration_id,
-                            propertyDeclaration_key),
-        TypeConstDeclaration_id,
-        TypeConstDeclaration(TypeConstDeclaration, typeConstDeclaration_id,
-                             typeConstDeclaration_key),
-        ContainerChild_id,
-        ContainerChild(ContainerChild, containerChild_id,
-                       containerChild_key),
-        FunctionDefinition_id,
-        FunctionDefinition(FunctionDefinition, functionDefinition_id,
-                           functionDefinition_key),
-        InterfaceDefinition_id,
-        InterfaceDefinition(InterfaceDefinition, interfaceDefinition_id,
-                            interfaceDefinition_key),
-        MethodDefinition_id,
-        MethodDefinition(MethodDefinition, methodDefinition_id,
-                         methodDefinition_key),
-        TraitDefinition_id,
-        TraitDefinition(TraitDefinition, traitDefinition_id,
-                        traitDefinition_key),
-        TypedefDefinition_id,
-        TypedefDefinition(TypedefDefinition, typedefDefinition_id,
-                          typedefDefinition_key),
-        ClassDefinition_id,
-        ClassDefinition(ClassDefinition, classDefinition_id,
-                        classDefinition_key),
-        ClassDeclaration_id,
-        ClassDeclaration(ClassDeclaration, classDeclaration_id,
-                         classDeclaration_key),
-        ClassConstDefinition_id,
-        ClassConstDefinition(ClassConstDefinition, classConstDefinition_id,
-                             classConstDefinition_key),
-        ClassConstDeclaration_id,
-        ClassConstDeclaration(ClassConstDeclaration,
-                              classConstDeclaration_id, classConstDeclaration_key),
-        AttributeToDefinition_id,
-        AttributeToDefinition(AttributeToDefinition,
-                              attributeToDefinition_id, attributeToDefinition_key),
-        AttributeToDeclaration_id,
-        AttributeToDeclaration(AttributeToDeclaration,
-                               attributeToDeclaration_id, attributeToDeclaration_key),
-        AttributeHasParameter_id,
-        AttributeHasParameter(AttributeHasParameter,
-                              attributeHasParameter_id, attributeHasParameter_key),
-        FileCall_id, FileCall(FileCall, fileCall_id, fileCall_key),
-        Visibility(Visibility_Private, Visibility_Protected,
-                   Visibility_Public, Visibility_Internal, Visibility__UNKNOWN),
-        Variance(Variance_Contravariant, Variance_Covariant,
-                 Variance_Invariant, Variance__UNKNOWN),
-        UserAttribute_key(UserAttribute_key, userAttribute_key_name,
-                          userAttribute_key_parameters, userAttribute_key_qname),
-        TypedefDeclaration_key(TypedefDeclaration_key,
-                               typedefDeclaration_key_name),
-        TypeConstKind(TypeConstKind_Abstract, TypeConstKind_Concrete,
-                      TypeConstKind_PartiallyAbstract, TypeConstKind__UNKNOWN),
-        TypeConstDefinition_key(TypeConstDefinition_key,
-                                typeConstDefinition_key_declaration, typeConstDefinition_key_type,
-                                typeConstDefinition_key_kind, typeConstDefinition_key_attributes,
-                                typeConstDefinition_key_typeInfo),
-        TraitDeclaration_key(TraitDeclaration_key,
-                             traitDeclaration_key_name),
-        SearchTypedefByLowerCaseName_key(SearchTypedefByLowerCaseName_key,
-                                         searchTypedefByLowerCaseName_key_name_lowercase,
-                                         searchTypedefByLowerCaseName_key_name),
-        SearchTypeConstByLowerCaseName_key(SearchTypeConstByLowerCaseName_key,
-                                           searchTypeConstByLowerCaseName_key_name_lowercase,
-                                           searchTypeConstByLowerCaseName_key_name),
-        SearchTraitByLowerCaseName_key(SearchTraitByLowerCaseName_key,
-                                       searchTraitByLowerCaseName_key_name_lowercase,
-                                       searchTraitByLowerCaseName_key_name),
-        SearchPropertyByLowerCaseName_key(SearchPropertyByLowerCaseName_key,
-                                          searchPropertyByLowerCaseName_key_name_lowercase,
-                                          searchPropertyByLowerCaseName_key_name),
-        SearchNamespaceByLowerCaseName_key(SearchNamespaceByLowerCaseName_key,
-                                           searchNamespaceByLowerCaseName_key_name_lowercase,
-                                           searchNamespaceByLowerCaseName_key_name),
-        SearchModuleByLowerCaseName_key(SearchModuleByLowerCaseName_key,
-                                        searchModuleByLowerCaseName_key_name_lowercase,
-                                        searchModuleByLowerCaseName_key_name),
-        SearchMethodByLowerCaseName_key(SearchMethodByLowerCaseName_key,
-                                        searchMethodByLowerCaseName_key_name_lowercase,
-                                        searchMethodByLowerCaseName_key_name),
-        SearchInterfaceByLowerCaseName_key(SearchInterfaceByLowerCaseName_key,
-                                           searchInterfaceByLowerCaseName_key_name_lowercase,
-                                           searchInterfaceByLowerCaseName_key_name),
-        SearchGlobalConstByLowerCaseName_key(SearchGlobalConstByLowerCaseName_key,
-                                             searchGlobalConstByLowerCaseName_key_name_lowercase,
-                                             searchGlobalConstByLowerCaseName_key_name),
-        SearchFunctionByLowerCaseName_key(SearchFunctionByLowerCaseName_key,
-                                          searchFunctionByLowerCaseName_key_name_lowercase,
-                                          searchFunctionByLowerCaseName_key_name),
-        SearchEnumeratorByLowerCaseName_key(SearchEnumeratorByLowerCaseName_key,
-                                            searchEnumeratorByLowerCaseName_key_name_lowercase,
-                                            searchEnumeratorByLowerCaseName_key_name),
-        SearchEnumByLowerCaseName_key(SearchEnumByLowerCaseName_key,
-                                      searchEnumByLowerCaseName_key_name_lowercase,
-                                      searchEnumByLowerCaseName_key_name),
-        SearchClassConstByLowerCaseName_key(SearchClassConstByLowerCaseName_key,
-                                            searchClassConstByLowerCaseName_key_name_lowercase,
-                                            searchClassConstByLowerCaseName_key_name),
-        SearchClassByLowerCaseName_key(SearchClassByLowerCaseName_key,
-                                       searchClassByLowerCaseName_key_name_lowercase,
-                                       searchClassByLowerCaseName_key_name),
-        ReifyKind(ReifyKind_Erased, ReifyKind_Reified,
-                  ReifyKind_SoftReified, ReifyKind__UNKNOWN),
-        ReadonlyKind(ReadonlyKind_Readonly, ReadonlyKind__UNKNOWN),
-        QName_key(QName_key, qName_key_name, qName_key_namespace_),
-        PropertyDefinition_key(PropertyDefinition_key,
-                               propertyDefinition_key_declaration, propertyDefinition_key_type,
-                               propertyDefinition_key_visibility, propertyDefinition_key_isFinal,
-                               propertyDefinition_key_isAbstract, propertyDefinition_key_isStatic,
-                               propertyDefinition_key_attributes,
-                               propertyDefinition_key_typeInfo),
-        Parameter(Parameter, parameter_name, parameter_type,
-                  parameter_isInout, parameter_isVariadic, parameter_defaultValue,
-                  parameter_attributes, parameter_typeInfo, parameter_readonly),
-        Signature_key(Signature_key, signature_key_returns,
-                      signature_key_parameters, signature_key_contexts,
-                      signature_key_returnsTypeInfo),
-        Occurrence(Occurrence_EMPTY, Occurrence_method),
-        NamespaceQName_key(NamespaceQName_key, namespaceQName_key_name,
-                           namespaceQName_key_parent),
-        NamespaceDeclaration_key(NamespaceDeclaration_key,
-                                 namespaceDeclaration_key_name),
-        NameLowerCase_key(NameLowerCase_key,
-                          nameLowerCase_key_nameLowercase, nameLowerCase_key_name),
-        ModuleMembership(ModuleMembership, moduleMembership_declaration,
-                         moduleMembership_internal),
-        ModuleDefinition_key(ModuleDefinition_key,
-                             moduleDefinition_key_declaration, moduleDefinition_key_attributes),
-        ModuleDeclaration_key(ModuleDeclaration_key,
-                              moduleDeclaration_key_name),
-        MethodOverrides_key(MethodOverrides_key,
-                            methodOverrides_key_derived, methodOverrides_key_base,
-                            methodOverrides_key_annotation),
-        MethodOverridden_key(MethodOverridden_key,
-                             methodOverridden_key_base, methodOverridden_key_derived,
-                             methodOverridden_key_annotation),
-        MethodOccurrence_key(MethodOccurrence_key,
-                             methodOccurrence_key_name, methodOccurrence_key_className),
-        InterfaceDeclaration_key(InterfaceDeclaration_key,
-                                 interfaceDeclaration_key_name),
-        IndexerInputsHash_value,
-        GlobalNamespaceAlias_key(GlobalNamespaceAlias_key,
-                                 globalNamespaceAlias_key_from, globalNamespaceAlias_key_to),
-        GlobalConstDefinition_key(GlobalConstDefinition_key,
-                                  globalConstDefinition_key_declaration,
-                                  globalConstDefinition_key_type, globalConstDefinition_key_value,
-                                  globalConstDefinition_key_typeInfo),
-        GlobalConstDeclaration_key(GlobalConstDeclaration_key,
-                                   globalConstDeclaration_key_name),
-        FunctionDeclaration_key(FunctionDeclaration_key,
-                                functionDeclaration_key_name),
-        FieldClassConst(FieldClassConst, fieldClassConst_container,
-                        fieldClassConst_name),
-        ShapeKV_key(ShapeKV_key_EMPTY, ShapeKV_key_sf_regex_group,
-                    ShapeKV_key_sf_lit_string, ShapeKV_key_sf_class_const),
-        ShapeKV(ShapeKV, shapeKV_key, shapeKV_value, shapeKV_opt),
-        Hint_apply_(Hint_apply_, hint_apply__class_name,
-                    hint_apply__values),
-        Hint_tuple_(Hint_tuple_, hint_tuple__req, hint_tuple__opt,
-                    hint_tuple__variadic),
-        Hint_shape_(Hint_shape_, hint_shape__open_, hint_shape__map_),
-        Hint_vect_or_dict_(Hint_vect_or_dict_,
-                           hint_vect_or_dict__maybe_key, hint_vect_or_dict__value_),
-        Hint_key(Hint_key_EMPTY, Hint_key_apply, Hint_key_option,
-                 Hint_key_like, Hint_key_tuple, Hint_key_class_args, Hint_key_shape,
-                 Hint_key_soft, Hint_key_intersection, Hint_key_union_,
-                 Hint_key_vect_or_dict, Hint_key_prim, Hint_key_var_,
-                 Hint_key_fun_context, Hint_key_mixed, Hint_key_wildcard,
-                 Hint_key_nonnull, Hint_key_this_, Hint_key_dynamic,
-                 Hint_key_nothing, Hint_key_other),
-        Enumerator_key(Enumerator_key, enumerator_key_name,
-                       enumerator_key_enumeration),
-        EnumDefinition_key(EnumDefinition_key,
-                           enumDefinition_key_declaration, enumDefinition_key_enumBase,
-                           enumDefinition_key_enumBaseTypeInfo,
-                           enumDefinition_key_enumConstraint,
-                           enumDefinition_key_enumConstraintTypeInfo,
-                           enumDefinition_key_enumerators, enumDefinition_key_attributes,
-                           enumDefinition_key_includes, enumDefinition_key_isEnumClass,
-                           enumDefinition_key_module_),
-        EnumDeclaration_key(EnumDeclaration_key, enumDeclaration_key_name),
-        Definition(Definition_EMPTY, Definition_class_,
-                   Definition_classConst, Definition_enum_, Definition_function_,
-                   Definition_globalConst, Definition_interface_, Definition_trait,
-                   Definition_method, Definition_property_, Definition_typeConst,
-                   Definition_typedef_, Definition_module),
-        ContainerDeclaration(ContainerDeclaration_EMPTY,
-                             ContainerDeclaration_class_, ContainerDeclaration_enum_,
-                             ContainerDeclaration_interface_, ContainerDeclaration_trait),
-        ContainerDeclarationQName_value,
-        ContainerParent_key(ContainerParent_key,
-                            containerParent_key_container, containerParent_key_parent),
-        Declaration(Declaration_EMPTY, Declaration_classConst,
-                    Declaration_container, Declaration_enumerator,
-                    Declaration_function_, Declaration_globalConst,
-                    Declaration_namespace_, Declaration_method, Declaration_property_,
-                    Declaration_typeConst, Declaration_typedef_, Declaration_module),
-        DeclarationComment_key(DeclarationComment_key,
-                               declarationComment_key_declaration, declarationComment_key_file,
-                               declarationComment_key_span),
-        DeclarationLocation_key(DeclarationLocation_key,
-                                declarationLocation_key_declaration, declarationLocation_key_file,
-                                declarationLocation_key_span),
-        DeclarationName_value,
-        DeclarationNamespace_key(DeclarationNamespace_key,
-                                 declarationNamespace_key_decl,
-                                 declarationNamespace_key_namespace_),
-        DeclarationSource_key(DeclarationSource_key,
-                              declarationSource_key_target, declarationSource_key_source),
-        DeclarationSpan_key(DeclarationSpan_key,
-                            declarationSpan_key_declaration, declarationSpan_key_file,
-                            declarationSpan_key_span),
-        DeclarationTarget_key(DeclarationTarget_key,
-                              declarationTarget_key_source, declarationTarget_key_target),
-        FileDeclarations_key(FileDeclarations_key,
-                             fileDeclarations_key_file, fileDeclarations_key_declarations),
-        HackToThrift_key(HackToThrift_key, hackToThrift_key_from,
-                         hackToThrift_key_to),
-        MemberCluster_key(MemberCluster_key, memberCluster_key_members),
-        ModuleChild_key(ModuleChild_key, moduleChild_key_module,
-                        moduleChild_key_decl),
-        ModuleParent_key(ModuleParent_key, moduleParent_key_decl,
-                         moduleParent_key_module),
-        NamespaceMember_key(NamespaceMember_key,
-                            namespaceMember_key_namespace_, namespaceMember_key_decl),
-        SearchClassByName_key(SearchClassByName_key,
-                              searchClassByName_key_name, searchClassByName_key_parent,
-                              searchClassByName_key_decl),
-        SearchClassConstByName_key(SearchClassConstByName_key,
-                                   searchClassConstByName_key_name,
-                                   searchClassConstByName_key_parent,
-                                   searchClassConstByName_key_decl),
-        SearchEnumByName_key(SearchEnumByName_key,
-                             searchEnumByName_key_name, searchEnumByName_key_parent,
-                             searchEnumByName_key_decl),
-        SearchEnumeratorByName_key(SearchEnumeratorByName_key,
-                                   searchEnumeratorByName_key_name,
-                                   searchEnumeratorByName_key_parent,
-                                   searchEnumeratorByName_key_decl),
-        SearchFunctionByName_key(SearchFunctionByName_key,
-                                 searchFunctionByName_key_name, searchFunctionByName_key_parent,
-                                 searchFunctionByName_key_decl),
-        SearchGlobalConstByName_key(SearchGlobalConstByName_key,
-                                    searchGlobalConstByName_key_name,
-                                    searchGlobalConstByName_key_parent,
-                                    searchGlobalConstByName_key_decl),
-        SearchInterfaceByName_key(SearchInterfaceByName_key,
-                                  searchInterfaceByName_key_name, searchInterfaceByName_key_parent,
-                                  searchInterfaceByName_key_decl),
-        SearchMethodByName_key(SearchMethodByName_key,
-                               searchMethodByName_key_name, searchMethodByName_key_parent,
-                               searchMethodByName_key_decl),
-        SearchModuleByName_key(SearchModuleByName_key,
-                               searchModuleByName_key_name, searchModuleByName_key_decl),
-        SearchNamespaceByName_key(SearchNamespaceByName_key,
-                                  searchNamespaceByName_key_name, searchNamespaceByName_key_parent,
-                                  searchNamespaceByName_key_decl),
-        SearchPropertyByName_key(SearchPropertyByName_key,
-                                 searchPropertyByName_key_name, searchPropertyByName_key_parent,
-                                 searchPropertyByName_key_decl),
-        SearchTraitByName_key(SearchTraitByName_key,
-                              searchTraitByName_key_name, searchTraitByName_key_parent,
-                              searchTraitByName_key_decl),
-        SearchTypeConstByName_key(SearchTypeConstByName_key,
-                                  searchTypeConstByName_key_name, searchTypeConstByName_key_parent,
-                                  searchTypeConstByName_key_decl),
-        SearchTypedefByName_key(SearchTypedefByName_key,
-                                searchTypedefByName_key_name, searchTypedefByName_key_parent,
-                                searchTypedefByName_key_decl),
-        ThriftToHack_key(ThriftToHack_key, thriftToHack_key_to,
-                         thriftToHack_key_from),
-        XRefTarget(XRefTarget_EMPTY, XRefTarget_declaration,
-                   XRefTarget_occurrence),
-        TargetUses_key(TargetUses_key, targetUses_key_target,
-                       targetUses_key_file, targetUses_key_uses),
-        TargetUsesAbs_key(TargetUsesAbs_key, targetUsesAbs_key_target,
-                          targetUsesAbs_key_file, targetUsesAbs_key_uses),
-        XRef(XRef, xRef_target, xRef_ranges),
-        FileXRefs_key(FileXRefs_key, fileXRefs_key_file,
-                      fileXRefs_key_xrefs),
-        TypeInfo_key(TypeInfo_key, typeInfo_key_displayType,
-                     typeInfo_key_xrefs, typeInfo_key_hint),
-        InheritedMembers_key(InheritedMembers_key,
-                             inheritedMembers_key_container,
-                             inheritedMembers_key_inheritedMembers),
-        MethodDeclaration_key(MethodDeclaration_key,
-                              methodDeclaration_key_name, methodDeclaration_key_container),
-        PropertyDeclaration_key(PropertyDeclaration_key,
-                                propertyDeclaration_key_name, propertyDeclaration_key_container),
-        TypeConstDeclaration_key(TypeConstDeclaration_key,
-                                 typeConstDeclaration_key_name, typeConstDeclaration_key_container),
-        ContainerChild_key(ContainerChild_key,
-                           containerChild_key_container, containerChild_key_child),
-        ConstraintKind(ConstraintKind_As, ConstraintKind_Equal,
-                       ConstraintKind_Super, ConstraintKind__UNKNOWN),
-        Constraint(Constraint, constraint_constraintKind, constraint_type,
-                   constraint_typeInfo),
-        TypeParameter(TypeParameter, typeParameter_name,
-                      typeParameter_variance, typeParameter_reifyKind,
-                      typeParameter_constraints, typeParameter_attributes),
-        FunctionDefinition_key(FunctionDefinition_key,
-                               functionDefinition_key_declaration,
-                               functionDefinition_key_signature, functionDefinition_key_isAsync,
-                               functionDefinition_key_attributes,
-                               functionDefinition_key_typeParams, functionDefinition_key_module_,
-                               functionDefinition_key_readonlyRet),
-        InterfaceDefinition_key(InterfaceDefinition_key,
-                                interfaceDefinition_key_declaration,
-                                interfaceDefinition_key_members, interfaceDefinition_key_extends_,
-                                interfaceDefinition_key_attributes,
-                                interfaceDefinition_key_typeParams,
-                                interfaceDefinition_key_requireExtends,
-                                interfaceDefinition_key_module_),
-        MethodDefinition_key(MethodDefinition_key,
-                             methodDefinition_key_declaration, methodDefinition_key_signature,
-                             methodDefinition_key_visibility, methodDefinition_key_isAbstract,
-                             methodDefinition_key_isAsync, methodDefinition_key_isFinal,
-                             methodDefinition_key_isStatic, methodDefinition_key_attributes,
-                             methodDefinition_key_typeParams,
-                             methodDefinition_key_isReadonlyThis,
-                             methodDefinition_key_readonlyRet),
-        TraitDefinition_key(TraitDefinition_key,
-                            traitDefinition_key_declaration, traitDefinition_key_members,
-                            traitDefinition_key_implements_, traitDefinition_key_uses,
-                            traitDefinition_key_attributes, traitDefinition_key_typeParams,
-                            traitDefinition_key_requireExtends,
-                            traitDefinition_key_requireImplements, traitDefinition_key_module_,
-                            traitDefinition_key_requireClass),
-        TypedefDefinition_key(TypedefDefinition_key,
-                              typedefDefinition_key_declaration,
-                              typedefDefinition_key_isTransparent,
-                              typedefDefinition_key_attributes, typedefDefinition_key_typeParams,
-                              typedefDefinition_key_module_),
-        ClassDefinition_key(ClassDefinition_key,
-                            classDefinition_key_declaration, classDefinition_key_isAbstract,
-                            classDefinition_key_isFinal, classDefinition_key_members,
-                            classDefinition_key_extends_, classDefinition_key_implements_,
-                            classDefinition_key_uses, classDefinition_key_attributes,
-                            classDefinition_key_typeParams, classDefinition_key_module_),
-        ClassDeclaration_key(ClassDeclaration_key,
-                             classDeclaration_key_name),
-        ClassConstDefinition_key(ClassConstDefinition_key,
-                                 classConstDefinition_key_declaration,
-                                 classConstDefinition_key_type, classConstDefinition_key_value,
-                                 classConstDefinition_key_typeInfo),
-        ClassConstDeclaration_key(ClassConstDeclaration_key,
-                                  classConstDeclaration_key_name,
-                                  classConstDeclaration_key_container),
-        AttributeToDefinition_key(AttributeToDefinition_key,
-                                  attributeToDefinition_key_attribute,
-                                  attributeToDefinition_key_definition),
-        AttributeToDeclaration_key(AttributeToDeclaration_key,
-                                   attributeToDeclaration_key_attribute,
-                                   attributeToDeclaration_key_declaration,
-                                   attributeToDeclaration_key_file),
-        AttributeHasParameter_key(AttributeHasParameter_key,
-                                  attributeHasParameter_key_name,
-                                  attributeHasParameter_key_parameter,
-                                  attributeHasParameter_key_attribute),
-        Argument(Argument_EMPTY, Argument_lit, Argument_xref),
-        CallArgument(CallArgument, callArgument_span,
-                     callArgument_argument),
-        FileCall_key(FileCall_key, fileCall_key_file,
-                     fileCall_key_callee_span, fileCall_key_call_args,
-                     fileCall_key_callee_xref, fileCall_key_dispatch_arg,
-                     fileCall_key_receiver_type, fileCall_key_callee_xrefs))
-       where
-import qualified Control.DeepSeq as DeepSeq
-import qualified Control.Exception as Exception
-import qualified Control.Monad as Monad
-import qualified Control.Monad.ST.Trans as ST
-import qualified Control.Monad.Trans.Class as Trans
-import qualified Data.Aeson as Aeson
-import qualified Data.Aeson.Types as Aeson
-import qualified Data.ByteString as ByteString
-import qualified Data.Default as Default
-import qualified Data.Function as Function
-import qualified Data.HashMap.Strict as HashMap
-import qualified Data.Hashable as Hashable
-import qualified Data.Int as Int
-import qualified Data.List as List
-import qualified Data.Map.Strict as Map
-import qualified Data.Ord as Ord
-import qualified Data.Text as Text
-import qualified Data.Text.Encoding as Text
-import qualified Facebook.Thrift.Annotation.Thrift.Thrift.Types
-       as Facebook.Thrift.Annotation.Thrift.Thrift
-import qualified GHC.Magic as GHC
-import qualified Glean.Schema.Builtin.Types as Glean.Schema.Builtin
-import qualified Glean.Schema.Fbthrift.Types
-       as Glean.Schema.Fbthrift
-import qualified Glean.Schema.Src.Types as Glean.Schema.Src
-import qualified Glean.Types as Glean
-import qualified Prelude as Prelude
-import qualified Rust.Types as Rust
-import qualified Thrift.Binary.Parser as Parser
-import qualified Thrift.CodegenTypesOnly as Thrift
-import Control.Applicative ((<|>), (*>), (<*))
-import Data.Aeson ((.:), (.:?), (.=), (.!=))
-import Data.Aeson ((.:), (.=))
-import Data.Monoid ((<>))
-import Prelude ((.), (++), (>), (==))
-import Prelude ((.), (<$>), (<*>), (>>=), (==), (++))
-import Prelude ((.), (<$>), (<*>), (>>=), (==), (/=), (<), (++))
-{-# LINE 5 "glean/schema/thrift/hack_include.hs" #-}
-import qualified Data.ByteString
-{-# LINE 6 "glean/schema/thrift/hack_include.hs" #-}
-import qualified Data.Default
-{-# LINE 7 "glean/schema/thrift/hack_include.hs" #-}
-import qualified Data.Text
-{-# LINE 9 "glean/schema/thrift/hack_include.hs" #-}
-import qualified Glean.Types as Glean
-{-# LINE 10 "glean/schema/thrift/hack_include.hs" #-}
-import qualified Glean.Typed as Glean
-{-# LINE 11 "glean/schema/thrift/hack_include.hs" #-}
-import qualified Glean.Query.Angle as Angle
-{-# LINE 12 "glean/schema/thrift/hack_include.hs" #-}
-import qualified Glean.Angle.Types as Angle
-{-# LINE 14 "glean/schema/thrift/hack_include.hs" #-}
-import qualified Glean.Schema.Builtin.Types
-{-# LINE 15 "glean/schema/thrift/hack_include.hs" #-}
-import qualified Glean.Schema.Fbthrift.Types
-{-# LINE 16 "glean/schema/thrift/hack_include.hs" #-}
-import qualified Glean.Schema.Src.Types
-{-# LINE 669 ".build/def/codegen/thrift-schema-hs/glean/schema/thrift/gen-hs2/Glean/Schema/Hack/Types.hs" #-}
-
-pREDICATE_VERSIONS :: Map.Map Text.Text Int.Int64
-pREDICATE_VERSIONS
-  = Map.fromList
-      [("TargetUsesAbs", 6), ("ClassConstDeclaration", 6),
-       ("NamespaceQName", 6), ("TypedefDefinition", 6),
-       ("SearchClassConstByName", 6), ("InterfaceDefinition", 6),
-       ("SearchGlobalConstByLowerCaseName", 6),
-       ("FunctionDeclaration", 6), ("SearchTraitByLowerCaseName", 6),
-       ("EnumDefinition", 6), ("SearchEnumeratorByLowerCaseName", 6),
-       ("SearchMethodByName", 6), ("FileDeclarations", 6),
-       ("MethodDefinition", 6), ("InterfaceDeclaration", 6),
-       ("SearchEnumByName", 6), ("MethodOverrides", 6), ("Signature", 6),
-       ("TraitDefinition", 6), ("TargetUses", 6),
-       ("SearchClassByName", 6), ("SearchInterfaceByLowerCaseName", 6),
-       ("SearchFunctionByName", 6), ("ClassDefinition", 6),
-       ("NamespaceDeclaration", 6), ("Enumerator", 6),
-       ("SearchNamespaceByName", 6), ("NameLowerCase", 6),
-       ("StringLiteral", 6), ("GlobalNamespaceAlias", 6),
-       ("SearchInterfaceByName", 6), ("SearchClassByLowerCaseName", 6),
-       ("ContainerDeclarationQName", 6), ("UserAttribute", 6),
-       ("SearchPropertyByName", 6), ("DeclarationNamespace", 6),
-       ("ModuleDeclaration", 6), ("NamespaceMember", 6),
-       ("PropertyDefinition", 6), ("FunctionDefinition", 6),
-       ("SearchPropertyByLowerCaseName", 6),
-       ("GlobalConstDeclaration", 6), ("SearchGlobalConstByName", 6),
-       ("DeclarationSpan", 6), ("FileCall", 6), ("QName", 6),
-       ("HackToThrift", 6), ("TypedefDeclaration", 6),
-       ("ModuleParent", 6), ("ModuleChild", 6),
-       ("DeclarationLocation", 6), ("DeclarationSource", 6),
-       ("MethodOccurrence", 6), ("MemberCluster", 6),
-       ("SearchClassConstByLowerCaseName", 6), ("FileXRefs", 6),
-       ("TypeConstDeclaration", 6), ("DeclarationName", 6),
-       ("MethodOverridden", 6), ("DeclarationTarget", 6), ("Name", 6),
-       ("MethodDeclaration", 6), ("TraitDeclaration", 6),
-       ("SearchTypeConstByName", 6), ("ClassDeclaration", 6),
-       ("SearchTypedefByName", 6), ("IndexerInputsHash", 6),
-       ("SearchFunctionByLowerCaseName", 6),
-       ("SearchModuleByLowerCaseName", 6),
-       ("SearchNamespaceByLowerCaseName", 6),
-       ("SearchMethodByLowerCaseName", 6), ("ModuleDefinition", 6),
-       ("AttributeToDefinition", 6), ("Hint", 6), ("EnumDeclaration", 6),
-       ("ThriftToHack", 6), ("TypeInfo", 6), ("InheritedMembers", 6),
-       ("ContainerChild", 6), ("TypeConstDefinition", 6),
-       ("SearchEnumByLowerCaseName", 6), ("AttributeHasParameter", 6),
-       ("ContainerParent", 6), ("SearchTypeConstByLowerCaseName", 6),
-       ("SearchTraitByName", 6), ("DeclarationComment", 6),
-       ("AttributeToDeclaration", 6), ("SearchModuleByName", 6),
-       ("Type", 6), ("ClassConstDefinition", 6),
-       ("GlobalConstDefinition", 6), ("SearchEnumeratorByName", 6),
-       ("PropertyDeclaration", 6), ("SearchTypedefByLowerCaseName", 6),
-       ("Context_", 6)]
-
-type UserAttribute_id = Glean.Id
-
-data UserAttribute = UserAttribute{userAttribute_id ::
-                                   {-# UNPACK #-} !UserAttribute_id,
-                                   userAttribute_key :: Prelude.Maybe UserAttribute_key}
-                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON UserAttribute where
-  toJSON (UserAttribute __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct UserAttribute where
-  buildStruct _proxy (UserAttribute __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (UserAttribute __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData UserAttribute where
-  rnf (UserAttribute __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default UserAttribute where
-  def = UserAttribute Default.def Prelude.Nothing
-
-instance Hashable.Hashable UserAttribute where
-  hashWithSalt __salt (UserAttribute _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type TypedefDeclaration_id = Glean.Id
-
-data TypedefDeclaration = TypedefDeclaration{typedefDeclaration_id
-                                             :: {-# UNPACK #-} !TypedefDeclaration_id,
-                                             typedefDeclaration_key ::
-                                             Prelude.Maybe TypedefDeclaration_key}
-                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TypedefDeclaration where
-  toJSON (TypedefDeclaration __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct TypedefDeclaration where
-  buildStruct _proxy (TypedefDeclaration __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (TypedefDeclaration __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData TypedefDeclaration where
-  rnf (TypedefDeclaration __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default TypedefDeclaration where
-  def = TypedefDeclaration Default.def Prelude.Nothing
-
-instance Hashable.Hashable TypedefDeclaration where
-  hashWithSalt __salt (TypedefDeclaration _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type TypeConstDefinition_id = Glean.Id
-
-data TypeConstDefinition = TypeConstDefinition{typeConstDefinition_id
-                                               :: {-# UNPACK #-} !TypeConstDefinition_id,
-                                               typeConstDefinition_key ::
-                                               Prelude.Maybe TypeConstDefinition_key}
-                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TypeConstDefinition where
-  toJSON (TypeConstDefinition __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct TypeConstDefinition where
-  buildStruct _proxy (TypeConstDefinition __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (TypeConstDefinition __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData TypeConstDefinition where
-  rnf (TypeConstDefinition __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default TypeConstDefinition where
-  def = TypeConstDefinition Default.def Prelude.Nothing
-
-instance Hashable.Hashable TypeConstDefinition where
-  hashWithSalt __salt (TypeConstDefinition _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type Type_id = Glean.Id
-
-data Type = Type{type_id :: {-# UNPACK #-} !Type_id,
-                 type_key :: Prelude.Maybe Text.Text}
-            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Type where
-  toJSON (Type __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct Type where
-  buildStruct _proxy (Type __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStringType _proxy)
-                                    2
-                                    1
-                                    (Thrift.genText _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (Type __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData Type where
-  rnf (Type __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default Type where
-  def = Type Default.def Prelude.Nothing
-
-instance Hashable.Hashable Type where
-  hashWithSalt __salt (Type _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type TraitDeclaration_id = Glean.Id
-
-data TraitDeclaration = TraitDeclaration{traitDeclaration_id ::
-                                         {-# UNPACK #-} !TraitDeclaration_id,
-                                         traitDeclaration_key :: Prelude.Maybe TraitDeclaration_key}
-                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TraitDeclaration where
-  toJSON (TraitDeclaration __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct TraitDeclaration where
-  buildStruct _proxy (TraitDeclaration __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (TraitDeclaration __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData TraitDeclaration where
-  rnf (TraitDeclaration __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default TraitDeclaration where
-  def = TraitDeclaration Default.def Prelude.Nothing
-
-instance Hashable.Hashable TraitDeclaration where
-  hashWithSalt __salt (TraitDeclaration _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type StringLiteral_id = Glean.Id
-
-data StringLiteral = StringLiteral{stringLiteral_id ::
-                                   {-# UNPACK #-} !StringLiteral_id,
-                                   stringLiteral_key :: Prelude.Maybe Text.Text}
-                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON StringLiteral where
-  toJSON (StringLiteral __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct StringLiteral where
-  buildStruct _proxy (StringLiteral __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStringType _proxy)
-                                    2
-                                    1
-                                    (Thrift.genText _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (StringLiteral __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData StringLiteral where
-  rnf (StringLiteral __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default StringLiteral where
-  def = StringLiteral Default.def Prelude.Nothing
-
-instance Hashable.Hashable StringLiteral where
-  hashWithSalt __salt (StringLiteral _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type SearchTypedefByLowerCaseName_id = Glean.Id
-
-data SearchTypedefByLowerCaseName = SearchTypedefByLowerCaseName{searchTypedefByLowerCaseName_id
-                                                                 ::
-                                                                 {-# UNPACK #-} !SearchTypedefByLowerCaseName_id,
-                                                                 searchTypedefByLowerCaseName_key ::
-                                                                 Prelude.Maybe
-                                                                   SearchTypedefByLowerCaseName_key}
-                                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchTypedefByLowerCaseName where
-  toJSON (SearchTypedefByLowerCaseName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchTypedefByLowerCaseName where
-  buildStruct _proxy
-    (SearchTypedefByLowerCaseName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (SearchTypedefByLowerCaseName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchTypedefByLowerCaseName where
-  rnf (SearchTypedefByLowerCaseName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default SearchTypedefByLowerCaseName where
-  def = SearchTypedefByLowerCaseName Default.def Prelude.Nothing
-
-instance Hashable.Hashable SearchTypedefByLowerCaseName where
-  hashWithSalt __salt (SearchTypedefByLowerCaseName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type SearchTypeConstByLowerCaseName_id = Glean.Id
-
-data SearchTypeConstByLowerCaseName = SearchTypeConstByLowerCaseName{searchTypeConstByLowerCaseName_id
-                                                                     ::
-                                                                     {-# UNPACK #-} !SearchTypeConstByLowerCaseName_id,
-                                                                     searchTypeConstByLowerCaseName_key
-                                                                     ::
-                                                                     Prelude.Maybe
-                                                                       SearchTypeConstByLowerCaseName_key}
-                                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchTypeConstByLowerCaseName where
-  toJSON (SearchTypeConstByLowerCaseName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchTypeConstByLowerCaseName where
-  buildStruct _proxy
-    (SearchTypeConstByLowerCaseName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (SearchTypeConstByLowerCaseName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchTypeConstByLowerCaseName where
-  rnf (SearchTypeConstByLowerCaseName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default SearchTypeConstByLowerCaseName where
-  def = SearchTypeConstByLowerCaseName Default.def Prelude.Nothing
-
-instance Hashable.Hashable SearchTypeConstByLowerCaseName where
-  hashWithSalt __salt (SearchTypeConstByLowerCaseName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type SearchTraitByLowerCaseName_id = Glean.Id
-
-data SearchTraitByLowerCaseName = SearchTraitByLowerCaseName{searchTraitByLowerCaseName_id
-                                                             ::
-                                                             {-# UNPACK #-} !SearchTraitByLowerCaseName_id,
-                                                             searchTraitByLowerCaseName_key ::
-                                                             Prelude.Maybe
-                                                               SearchTraitByLowerCaseName_key}
-                                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchTraitByLowerCaseName where
-  toJSON (SearchTraitByLowerCaseName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchTraitByLowerCaseName where
-  buildStruct _proxy
-    (SearchTraitByLowerCaseName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (SearchTraitByLowerCaseName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchTraitByLowerCaseName where
-  rnf (SearchTraitByLowerCaseName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default SearchTraitByLowerCaseName where
-  def = SearchTraitByLowerCaseName Default.def Prelude.Nothing
-
-instance Hashable.Hashable SearchTraitByLowerCaseName where
-  hashWithSalt __salt (SearchTraitByLowerCaseName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type SearchPropertyByLowerCaseName_id = Glean.Id
-
-data SearchPropertyByLowerCaseName = SearchPropertyByLowerCaseName{searchPropertyByLowerCaseName_id
-                                                                   ::
-                                                                   {-# UNPACK #-} !SearchPropertyByLowerCaseName_id,
-                                                                   searchPropertyByLowerCaseName_key
-                                                                   ::
-                                                                   Prelude.Maybe
-                                                                     SearchPropertyByLowerCaseName_key}
-                                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchPropertyByLowerCaseName where
-  toJSON (SearchPropertyByLowerCaseName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchPropertyByLowerCaseName where
-  buildStruct _proxy
-    (SearchPropertyByLowerCaseName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (SearchPropertyByLowerCaseName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchPropertyByLowerCaseName where
-  rnf (SearchPropertyByLowerCaseName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default SearchPropertyByLowerCaseName where
-  def = SearchPropertyByLowerCaseName Default.def Prelude.Nothing
-
-instance Hashable.Hashable SearchPropertyByLowerCaseName where
-  hashWithSalt __salt (SearchPropertyByLowerCaseName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type SearchNamespaceByLowerCaseName_id = Glean.Id
-
-data SearchNamespaceByLowerCaseName = SearchNamespaceByLowerCaseName{searchNamespaceByLowerCaseName_id
-                                                                     ::
-                                                                     {-# UNPACK #-} !SearchNamespaceByLowerCaseName_id,
-                                                                     searchNamespaceByLowerCaseName_key
-                                                                     ::
-                                                                     Prelude.Maybe
-                                                                       SearchNamespaceByLowerCaseName_key}
-                                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchNamespaceByLowerCaseName where
-  toJSON (SearchNamespaceByLowerCaseName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchNamespaceByLowerCaseName where
-  buildStruct _proxy
-    (SearchNamespaceByLowerCaseName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (SearchNamespaceByLowerCaseName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchNamespaceByLowerCaseName where
-  rnf (SearchNamespaceByLowerCaseName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default SearchNamespaceByLowerCaseName where
-  def = SearchNamespaceByLowerCaseName Default.def Prelude.Nothing
-
-instance Hashable.Hashable SearchNamespaceByLowerCaseName where
-  hashWithSalt __salt (SearchNamespaceByLowerCaseName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type SearchModuleByLowerCaseName_id = Glean.Id
-
-data SearchModuleByLowerCaseName = SearchModuleByLowerCaseName{searchModuleByLowerCaseName_id
-                                                               ::
-                                                               {-# UNPACK #-} !SearchModuleByLowerCaseName_id,
-                                                               searchModuleByLowerCaseName_key ::
-                                                               Prelude.Maybe
-                                                                 SearchModuleByLowerCaseName_key}
-                                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchModuleByLowerCaseName where
-  toJSON (SearchModuleByLowerCaseName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchModuleByLowerCaseName where
-  buildStruct _proxy
-    (SearchModuleByLowerCaseName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (SearchModuleByLowerCaseName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchModuleByLowerCaseName where
-  rnf (SearchModuleByLowerCaseName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default SearchModuleByLowerCaseName where
-  def = SearchModuleByLowerCaseName Default.def Prelude.Nothing
-
-instance Hashable.Hashable SearchModuleByLowerCaseName where
-  hashWithSalt __salt (SearchModuleByLowerCaseName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type SearchMethodByLowerCaseName_id = Glean.Id
-
-data SearchMethodByLowerCaseName = SearchMethodByLowerCaseName{searchMethodByLowerCaseName_id
-                                                               ::
-                                                               {-# UNPACK #-} !SearchMethodByLowerCaseName_id,
-                                                               searchMethodByLowerCaseName_key ::
-                                                               Prelude.Maybe
-                                                                 SearchMethodByLowerCaseName_key}
-                                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchMethodByLowerCaseName where
-  toJSON (SearchMethodByLowerCaseName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchMethodByLowerCaseName where
-  buildStruct _proxy
-    (SearchMethodByLowerCaseName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (SearchMethodByLowerCaseName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchMethodByLowerCaseName where
-  rnf (SearchMethodByLowerCaseName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default SearchMethodByLowerCaseName where
-  def = SearchMethodByLowerCaseName Default.def Prelude.Nothing
-
-instance Hashable.Hashable SearchMethodByLowerCaseName where
-  hashWithSalt __salt (SearchMethodByLowerCaseName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type SearchInterfaceByLowerCaseName_id = Glean.Id
-
-data SearchInterfaceByLowerCaseName = SearchInterfaceByLowerCaseName{searchInterfaceByLowerCaseName_id
-                                                                     ::
-                                                                     {-# UNPACK #-} !SearchInterfaceByLowerCaseName_id,
-                                                                     searchInterfaceByLowerCaseName_key
-                                                                     ::
-                                                                     Prelude.Maybe
-                                                                       SearchInterfaceByLowerCaseName_key}
-                                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchInterfaceByLowerCaseName where
-  toJSON (SearchInterfaceByLowerCaseName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchInterfaceByLowerCaseName where
-  buildStruct _proxy
-    (SearchInterfaceByLowerCaseName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (SearchInterfaceByLowerCaseName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchInterfaceByLowerCaseName where
-  rnf (SearchInterfaceByLowerCaseName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default SearchInterfaceByLowerCaseName where
-  def = SearchInterfaceByLowerCaseName Default.def Prelude.Nothing
-
-instance Hashable.Hashable SearchInterfaceByLowerCaseName where
-  hashWithSalt __salt (SearchInterfaceByLowerCaseName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type SearchGlobalConstByLowerCaseName_id = Glean.Id
-
-data SearchGlobalConstByLowerCaseName = SearchGlobalConstByLowerCaseName{searchGlobalConstByLowerCaseName_id
-                                                                         ::
-                                                                         {-# UNPACK #-} !SearchGlobalConstByLowerCaseName_id,
-                                                                         searchGlobalConstByLowerCaseName_key
-                                                                         ::
-                                                                         Prelude.Maybe
-                                                                           SearchGlobalConstByLowerCaseName_key}
-                                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchGlobalConstByLowerCaseName where
-  toJSON (SearchGlobalConstByLowerCaseName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchGlobalConstByLowerCaseName where
-  buildStruct _proxy
-    (SearchGlobalConstByLowerCaseName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (SearchGlobalConstByLowerCaseName __val__id
-                                                  __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchGlobalConstByLowerCaseName where
-  rnf (SearchGlobalConstByLowerCaseName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default SearchGlobalConstByLowerCaseName where
-  def = SearchGlobalConstByLowerCaseName Default.def Prelude.Nothing
-
-instance Hashable.Hashable SearchGlobalConstByLowerCaseName where
-  hashWithSalt __salt (SearchGlobalConstByLowerCaseName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type SearchFunctionByLowerCaseName_id = Glean.Id
-
-data SearchFunctionByLowerCaseName = SearchFunctionByLowerCaseName{searchFunctionByLowerCaseName_id
-                                                                   ::
-                                                                   {-# UNPACK #-} !SearchFunctionByLowerCaseName_id,
-                                                                   searchFunctionByLowerCaseName_key
-                                                                   ::
-                                                                   Prelude.Maybe
-                                                                     SearchFunctionByLowerCaseName_key}
-                                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchFunctionByLowerCaseName where
-  toJSON (SearchFunctionByLowerCaseName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchFunctionByLowerCaseName where
-  buildStruct _proxy
-    (SearchFunctionByLowerCaseName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (SearchFunctionByLowerCaseName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchFunctionByLowerCaseName where
-  rnf (SearchFunctionByLowerCaseName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default SearchFunctionByLowerCaseName where
-  def = SearchFunctionByLowerCaseName Default.def Prelude.Nothing
-
-instance Hashable.Hashable SearchFunctionByLowerCaseName where
-  hashWithSalt __salt (SearchFunctionByLowerCaseName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type SearchEnumeratorByLowerCaseName_id = Glean.Id
-
-data SearchEnumeratorByLowerCaseName = SearchEnumeratorByLowerCaseName{searchEnumeratorByLowerCaseName_id
-                                                                       ::
-                                                                       {-# UNPACK #-} !SearchEnumeratorByLowerCaseName_id,
-                                                                       searchEnumeratorByLowerCaseName_key
-                                                                       ::
-                                                                       Prelude.Maybe
-                                                                         SearchEnumeratorByLowerCaseName_key}
-                                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchEnumeratorByLowerCaseName where
-  toJSON (SearchEnumeratorByLowerCaseName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchEnumeratorByLowerCaseName where
-  buildStruct _proxy
-    (SearchEnumeratorByLowerCaseName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (SearchEnumeratorByLowerCaseName __val__id
-                                                  __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchEnumeratorByLowerCaseName where
-  rnf (SearchEnumeratorByLowerCaseName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default SearchEnumeratorByLowerCaseName where
-  def = SearchEnumeratorByLowerCaseName Default.def Prelude.Nothing
-
-instance Hashable.Hashable SearchEnumeratorByLowerCaseName where
-  hashWithSalt __salt (SearchEnumeratorByLowerCaseName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type SearchEnumByLowerCaseName_id = Glean.Id
-
-data SearchEnumByLowerCaseName = SearchEnumByLowerCaseName{searchEnumByLowerCaseName_id
-                                                           ::
-                                                           {-# UNPACK #-} !SearchEnumByLowerCaseName_id,
-                                                           searchEnumByLowerCaseName_key ::
-                                                           Prelude.Maybe
-                                                             SearchEnumByLowerCaseName_key}
-                                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchEnumByLowerCaseName where
-  toJSON (SearchEnumByLowerCaseName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchEnumByLowerCaseName where
-  buildStruct _proxy
-    (SearchEnumByLowerCaseName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (SearchEnumByLowerCaseName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchEnumByLowerCaseName where
-  rnf (SearchEnumByLowerCaseName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default SearchEnumByLowerCaseName where
-  def = SearchEnumByLowerCaseName Default.def Prelude.Nothing
-
-instance Hashable.Hashable SearchEnumByLowerCaseName where
-  hashWithSalt __salt (SearchEnumByLowerCaseName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type SearchClassConstByLowerCaseName_id = Glean.Id
-
-data SearchClassConstByLowerCaseName = SearchClassConstByLowerCaseName{searchClassConstByLowerCaseName_id
-                                                                       ::
-                                                                       {-# UNPACK #-} !SearchClassConstByLowerCaseName_id,
-                                                                       searchClassConstByLowerCaseName_key
-                                                                       ::
-                                                                       Prelude.Maybe
-                                                                         SearchClassConstByLowerCaseName_key}
-                                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchClassConstByLowerCaseName where
-  toJSON (SearchClassConstByLowerCaseName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchClassConstByLowerCaseName where
-  buildStruct _proxy
-    (SearchClassConstByLowerCaseName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (SearchClassConstByLowerCaseName __val__id
-                                                  __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchClassConstByLowerCaseName where
-  rnf (SearchClassConstByLowerCaseName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default SearchClassConstByLowerCaseName where
-  def = SearchClassConstByLowerCaseName Default.def Prelude.Nothing
-
-instance Hashable.Hashable SearchClassConstByLowerCaseName where
-  hashWithSalt __salt (SearchClassConstByLowerCaseName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type SearchClassByLowerCaseName_id = Glean.Id
-
-data SearchClassByLowerCaseName = SearchClassByLowerCaseName{searchClassByLowerCaseName_id
-                                                             ::
-                                                             {-# UNPACK #-} !SearchClassByLowerCaseName_id,
-                                                             searchClassByLowerCaseName_key ::
-                                                             Prelude.Maybe
-                                                               SearchClassByLowerCaseName_key}
-                                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchClassByLowerCaseName where
-  toJSON (SearchClassByLowerCaseName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchClassByLowerCaseName where
-  buildStruct _proxy
-    (SearchClassByLowerCaseName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (SearchClassByLowerCaseName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchClassByLowerCaseName where
-  rnf (SearchClassByLowerCaseName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default SearchClassByLowerCaseName where
-  def = SearchClassByLowerCaseName Default.def Prelude.Nothing
-
-instance Hashable.Hashable SearchClassByLowerCaseName where
-  hashWithSalt __salt (SearchClassByLowerCaseName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type QName_id = Glean.Id
-
-data QName = QName{qName_id :: {-# UNPACK #-} !QName_id,
-                   qName_key :: Prelude.Maybe QName_key}
-             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON QName where
-  toJSON (QName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct QName where
-  buildStruct _proxy (QName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (QName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData QName where
-  rnf (QName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default QName where
-  def = QName Default.def Prelude.Nothing
-
-instance Hashable.Hashable QName where
-  hashWithSalt __salt (QName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type PropertyDefinition_id = Glean.Id
-
-data PropertyDefinition = PropertyDefinition{propertyDefinition_id
-                                             :: {-# UNPACK #-} !PropertyDefinition_id,
-                                             propertyDefinition_key ::
-                                             Prelude.Maybe PropertyDefinition_key}
-                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON PropertyDefinition where
-  toJSON (PropertyDefinition __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct PropertyDefinition where
-  buildStruct _proxy (PropertyDefinition __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (PropertyDefinition __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData PropertyDefinition where
-  rnf (PropertyDefinition __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default PropertyDefinition where
-  def = PropertyDefinition Default.def Prelude.Nothing
-
-instance Hashable.Hashable PropertyDefinition where
-  hashWithSalt __salt (PropertyDefinition _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type Signature_id = Glean.Id
-
-data Signature = Signature{signature_id ::
-                           {-# UNPACK #-} !Signature_id,
-                           signature_key :: Prelude.Maybe Signature_key}
-                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Signature where
-  toJSON (Signature __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct Signature where
-  buildStruct _proxy (Signature __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (Signature __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData Signature where
-  rnf (Signature __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default Signature where
-  def = Signature Default.def Prelude.Nothing
-
-instance Hashable.Hashable Signature where
-  hashWithSalt __salt (Signature _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type NamespaceQName_id = Glean.Id
-
-data NamespaceQName = NamespaceQName{namespaceQName_id ::
-                                     {-# UNPACK #-} !NamespaceQName_id,
-                                     namespaceQName_key :: Prelude.Maybe NamespaceQName_key}
-                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON NamespaceQName where
-  toJSON (NamespaceQName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct NamespaceQName where
-  buildStruct _proxy (NamespaceQName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (NamespaceQName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData NamespaceQName where
-  rnf (NamespaceQName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default NamespaceQName where
-  def = NamespaceQName Default.def Prelude.Nothing
-
-instance Hashable.Hashable NamespaceQName where
-  hashWithSalt __salt (NamespaceQName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type NamespaceDeclaration_id = Glean.Id
-
-data NamespaceDeclaration = NamespaceDeclaration{namespaceDeclaration_id
-                                                 :: {-# UNPACK #-} !NamespaceDeclaration_id,
-                                                 namespaceDeclaration_key ::
-                                                 Prelude.Maybe NamespaceDeclaration_key}
-                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON NamespaceDeclaration where
-  toJSON (NamespaceDeclaration __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct NamespaceDeclaration where
-  buildStruct _proxy (NamespaceDeclaration __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (NamespaceDeclaration __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData NamespaceDeclaration where
-  rnf (NamespaceDeclaration __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default NamespaceDeclaration where
-  def = NamespaceDeclaration Default.def Prelude.Nothing
-
-instance Hashable.Hashable NamespaceDeclaration where
-  hashWithSalt __salt (NamespaceDeclaration _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type NameLowerCase_id = Glean.Id
-
-data NameLowerCase = NameLowerCase{nameLowerCase_id ::
-                                   {-# UNPACK #-} !NameLowerCase_id,
-                                   nameLowerCase_key :: Prelude.Maybe NameLowerCase_key}
-                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON NameLowerCase where
-  toJSON (NameLowerCase __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct NameLowerCase where
-  buildStruct _proxy (NameLowerCase __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (NameLowerCase __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData NameLowerCase where
-  rnf (NameLowerCase __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default NameLowerCase where
-  def = NameLowerCase Default.def Prelude.Nothing
-
-instance Hashable.Hashable NameLowerCase where
-  hashWithSalt __salt (NameLowerCase _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type Name_id = Glean.Id
-
-data Name = Name{name_id :: {-# UNPACK #-} !Name_id,
-                 name_key :: Prelude.Maybe Text.Text}
-            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Name where
-  toJSON (Name __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct Name where
-  buildStruct _proxy (Name __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStringType _proxy)
-                                    2
-                                    1
-                                    (Thrift.genText _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (Name __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData Name where
-  rnf (Name __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default Name where
-  def = Name Default.def Prelude.Nothing
-
-instance Hashable.Hashable Name where
-  hashWithSalt __salt (Name _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type ModuleDefinition_id = Glean.Id
-
-data ModuleDefinition = ModuleDefinition{moduleDefinition_id ::
-                                         {-# UNPACK #-} !ModuleDefinition_id,
-                                         moduleDefinition_key :: Prelude.Maybe ModuleDefinition_key}
-                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ModuleDefinition where
-  toJSON (ModuleDefinition __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct ModuleDefinition where
-  buildStruct _proxy (ModuleDefinition __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (ModuleDefinition __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData ModuleDefinition where
-  rnf (ModuleDefinition __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default ModuleDefinition where
-  def = ModuleDefinition Default.def Prelude.Nothing
-
-instance Hashable.Hashable ModuleDefinition where
-  hashWithSalt __salt (ModuleDefinition _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type ModuleDeclaration_id = Glean.Id
-
-data ModuleDeclaration = ModuleDeclaration{moduleDeclaration_id ::
-                                           {-# UNPACK #-} !ModuleDeclaration_id,
-                                           moduleDeclaration_key ::
-                                           Prelude.Maybe ModuleDeclaration_key}
-                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ModuleDeclaration where
-  toJSON (ModuleDeclaration __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct ModuleDeclaration where
-  buildStruct _proxy (ModuleDeclaration __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (ModuleDeclaration __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData ModuleDeclaration where
-  rnf (ModuleDeclaration __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default ModuleDeclaration where
-  def = ModuleDeclaration Default.def Prelude.Nothing
-
-instance Hashable.Hashable ModuleDeclaration where
-  hashWithSalt __salt (ModuleDeclaration _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type MethodOverrides_id = Glean.Id
-
-data MethodOverrides = MethodOverrides{methodOverrides_id ::
-                                       {-# UNPACK #-} !MethodOverrides_id,
-                                       methodOverrides_key :: Prelude.Maybe MethodOverrides_key}
-                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON MethodOverrides where
-  toJSON (MethodOverrides __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct MethodOverrides where
-  buildStruct _proxy (MethodOverrides __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (MethodOverrides __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData MethodOverrides where
-  rnf (MethodOverrides __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default MethodOverrides where
-  def = MethodOverrides Default.def Prelude.Nothing
-
-instance Hashable.Hashable MethodOverrides where
-  hashWithSalt __salt (MethodOverrides _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type MethodOverridden_id = Glean.Id
-
-data MethodOverridden = MethodOverridden{methodOverridden_id ::
-                                         {-# UNPACK #-} !MethodOverridden_id,
-                                         methodOverridden_key :: Prelude.Maybe MethodOverridden_key}
-                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON MethodOverridden where
-  toJSON (MethodOverridden __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct MethodOverridden where
-  buildStruct _proxy (MethodOverridden __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (MethodOverridden __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData MethodOverridden where
-  rnf (MethodOverridden __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default MethodOverridden where
-  def = MethodOverridden Default.def Prelude.Nothing
-
-instance Hashable.Hashable MethodOverridden where
-  hashWithSalt __salt (MethodOverridden _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type MethodOccurrence_id = Glean.Id
-
-data MethodOccurrence = MethodOccurrence{methodOccurrence_id ::
-                                         {-# UNPACK #-} !MethodOccurrence_id,
-                                         methodOccurrence_key :: Prelude.Maybe MethodOccurrence_key}
-                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON MethodOccurrence where
-  toJSON (MethodOccurrence __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct MethodOccurrence where
-  buildStruct _proxy (MethodOccurrence __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (MethodOccurrence __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData MethodOccurrence where
-  rnf (MethodOccurrence __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default MethodOccurrence where
-  def = MethodOccurrence Default.def Prelude.Nothing
-
-instance Hashable.Hashable MethodOccurrence where
-  hashWithSalt __salt (MethodOccurrence _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type InterfaceDeclaration_id = Glean.Id
-
-data InterfaceDeclaration = InterfaceDeclaration{interfaceDeclaration_id
-                                                 :: {-# UNPACK #-} !InterfaceDeclaration_id,
-                                                 interfaceDeclaration_key ::
-                                                 Prelude.Maybe InterfaceDeclaration_key}
-                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON InterfaceDeclaration where
-  toJSON (InterfaceDeclaration __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct InterfaceDeclaration where
-  buildStruct _proxy (InterfaceDeclaration __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (InterfaceDeclaration __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData InterfaceDeclaration where
-  rnf (InterfaceDeclaration __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default InterfaceDeclaration where
-  def = InterfaceDeclaration Default.def Prelude.Nothing
-
-instance Hashable.Hashable InterfaceDeclaration where
-  hashWithSalt __salt (InterfaceDeclaration _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type IndexerInputsHash_id = Glean.Id
-
-data IndexerInputsHash = IndexerInputsHash{indexerInputsHash_id ::
-                                           {-# UNPACK #-} !IndexerInputsHash_id,
-                                           indexerInputsHash_key :: Prelude.Maybe Text.Text,
-                                           indexerInputsHash_value ::
-                                           Prelude.Maybe IndexerInputsHash_value}
-                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON IndexerInputsHash where
-  toJSON (IndexerInputsHash __field__id __field__key __field__value)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             (Prelude.maybe Prelude.id ((:) . ("value" .=))
-                (Prelude.fmap Thrift.encodeBase64Text __field__value)
-                Prelude.mempty))
-
-instance Thrift.ThriftStruct IndexerInputsHash where
-  buildStruct _proxy
-    (IndexerInputsHash __field__id __field__key __field__value)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           let (__cereal__key, __id__key)
-                 = case __field__key of
-                     Prelude.Just _val -> ((:)
-                                             (Thrift.genField _proxy "key"
-                                                (Thrift.getStringType _proxy)
-                                                2
-                                                1
-                                                (Thrift.genText _proxy _val)),
-                                           2)
-                     Prelude.Nothing -> (Prelude.id, 1)
-             in
-             __cereal__key
-               (case __field__value of
-                  Prelude.Just _val -> Thrift.genField _proxy "value"
-                                         (Thrift.getStringType _proxy)
-                                         3
-                                         __id__key
-                                         (Thrift.genBytes _proxy _val)
-                                         : []
-                  Prelude.Nothing -> []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            __field__value <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 3 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseBytes
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__value
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             !__val__value <- ST.readSTRef __field__value
-                                             Prelude.pure
-                                               (IndexerInputsHash __val__id __val__key __val__value)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2), ("value", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData IndexerInputsHash where
-  rnf (IndexerInputsHash __field__id __field__key __field__value)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq`
-          DeepSeq.rnf __field__value `Prelude.seq` ()
-
-instance Default.Default IndexerInputsHash where
-  def = IndexerInputsHash Default.def Prelude.Nothing Prelude.Nothing
-
-instance Hashable.Hashable IndexerInputsHash where
-  hashWithSalt __salt (IndexerInputsHash _id _key _value)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key)
-        _value
-
-type GlobalNamespaceAlias_id = Glean.Id
-
-data GlobalNamespaceAlias = GlobalNamespaceAlias{globalNamespaceAlias_id
-                                                 :: {-# UNPACK #-} !GlobalNamespaceAlias_id,
-                                                 globalNamespaceAlias_key ::
-                                                 Prelude.Maybe GlobalNamespaceAlias_key}
-                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON GlobalNamespaceAlias where
-  toJSON (GlobalNamespaceAlias __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct GlobalNamespaceAlias where
-  buildStruct _proxy (GlobalNamespaceAlias __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (GlobalNamespaceAlias __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData GlobalNamespaceAlias where
-  rnf (GlobalNamespaceAlias __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default GlobalNamespaceAlias where
-  def = GlobalNamespaceAlias Default.def Prelude.Nothing
-
-instance Hashable.Hashable GlobalNamespaceAlias where
-  hashWithSalt __salt (GlobalNamespaceAlias _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type GlobalConstDefinition_id = Glean.Id
-
-data GlobalConstDefinition = GlobalConstDefinition{globalConstDefinition_id
-                                                   :: {-# UNPACK #-} !GlobalConstDefinition_id,
-                                                   globalConstDefinition_key ::
-                                                   Prelude.Maybe GlobalConstDefinition_key}
-                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON GlobalConstDefinition where
-  toJSON (GlobalConstDefinition __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct GlobalConstDefinition where
-  buildStruct _proxy (GlobalConstDefinition __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (GlobalConstDefinition __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData GlobalConstDefinition where
-  rnf (GlobalConstDefinition __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default GlobalConstDefinition where
-  def = GlobalConstDefinition Default.def Prelude.Nothing
-
-instance Hashable.Hashable GlobalConstDefinition where
-  hashWithSalt __salt (GlobalConstDefinition _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type GlobalConstDeclaration_id = Glean.Id
-
-data GlobalConstDeclaration = GlobalConstDeclaration{globalConstDeclaration_id
-                                                     :: {-# UNPACK #-} !GlobalConstDeclaration_id,
-                                                     globalConstDeclaration_key ::
-                                                     Prelude.Maybe GlobalConstDeclaration_key}
-                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON GlobalConstDeclaration where
-  toJSON (GlobalConstDeclaration __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct GlobalConstDeclaration where
-  buildStruct _proxy
-    (GlobalConstDeclaration __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (GlobalConstDeclaration __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData GlobalConstDeclaration where
-  rnf (GlobalConstDeclaration __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default GlobalConstDeclaration where
-  def = GlobalConstDeclaration Default.def Prelude.Nothing
-
-instance Hashable.Hashable GlobalConstDeclaration where
-  hashWithSalt __salt (GlobalConstDeclaration _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type FunctionDeclaration_id = Glean.Id
-
-data FunctionDeclaration = FunctionDeclaration{functionDeclaration_id
-                                               :: {-# UNPACK #-} !FunctionDeclaration_id,
-                                               functionDeclaration_key ::
-                                               Prelude.Maybe FunctionDeclaration_key}
-                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON FunctionDeclaration where
-  toJSON (FunctionDeclaration __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct FunctionDeclaration where
-  buildStruct _proxy (FunctionDeclaration __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (FunctionDeclaration __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData FunctionDeclaration where
-  rnf (FunctionDeclaration __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default FunctionDeclaration where
-  def = FunctionDeclaration Default.def Prelude.Nothing
-
-instance Hashable.Hashable FunctionDeclaration where
-  hashWithSalt __salt (FunctionDeclaration _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type Hint_id = Glean.Id
-
-data Hint = Hint{hint_id :: {-# UNPACK #-} !Hint_id,
-                 hint_key :: Prelude.Maybe Hint_key}
-            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Hint where
-  toJSON (Hint __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct Hint where
-  buildStruct _proxy (Hint __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (Hint __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData Hint where
-  rnf (Hint __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default Hint where
-  def = Hint Default.def Prelude.Nothing
-
-instance Hashable.Hashable Hint where
-  hashWithSalt __salt (Hint _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type Enumerator_id = Glean.Id
-
-data Enumerator = Enumerator{enumerator_id ::
-                             {-# UNPACK #-} !Enumerator_id,
-                             enumerator_key :: Prelude.Maybe Enumerator_key}
-                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Enumerator where
-  toJSON (Enumerator __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct Enumerator where
-  buildStruct _proxy (Enumerator __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (Enumerator __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData Enumerator where
-  rnf (Enumerator __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default Enumerator where
-  def = Enumerator Default.def Prelude.Nothing
-
-instance Hashable.Hashable Enumerator where
-  hashWithSalt __salt (Enumerator _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type EnumDefinition_id = Glean.Id
-
-data EnumDefinition = EnumDefinition{enumDefinition_id ::
-                                     {-# UNPACK #-} !EnumDefinition_id,
-                                     enumDefinition_key :: Prelude.Maybe EnumDefinition_key}
-                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON EnumDefinition where
-  toJSON (EnumDefinition __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct EnumDefinition where
-  buildStruct _proxy (EnumDefinition __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (EnumDefinition __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData EnumDefinition where
-  rnf (EnumDefinition __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default EnumDefinition where
-  def = EnumDefinition Default.def Prelude.Nothing
-
-instance Hashable.Hashable EnumDefinition where
-  hashWithSalt __salt (EnumDefinition _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type EnumDeclaration_id = Glean.Id
-
-data EnumDeclaration = EnumDeclaration{enumDeclaration_id ::
-                                       {-# UNPACK #-} !EnumDeclaration_id,
-                                       enumDeclaration_key :: Prelude.Maybe EnumDeclaration_key}
-                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON EnumDeclaration where
-  toJSON (EnumDeclaration __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct EnumDeclaration where
-  buildStruct _proxy (EnumDeclaration __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (EnumDeclaration __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData EnumDeclaration where
-  rnf (EnumDeclaration __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default EnumDeclaration where
-  def = EnumDeclaration Default.def Prelude.Nothing
-
-instance Hashable.Hashable EnumDeclaration where
-  hashWithSalt __salt (EnumDeclaration _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type Context__id = Glean.Id
-
-data Context_ = Context_{context__id ::
-                         {-# UNPACK #-} !Context__id,
-                         context__key :: Prelude.Maybe Text.Text}
-                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Context_ where
-  toJSON (Context_ __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct Context_ where
-  buildStruct _proxy (Context_ __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStringType _proxy)
-                                    2
-                                    1
-                                    (Thrift.genText _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (Context_ __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData Context_ where
-  rnf (Context_ __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default Context_ where
-  def = Context_ Default.def Prelude.Nothing
-
-instance Hashable.Hashable Context_ where
-  hashWithSalt __salt (Context_ _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type ContainerDeclarationQName_id = Glean.Id
-
-data ContainerDeclarationQName = ContainerDeclarationQName{containerDeclarationQName_id
-                                                           ::
-                                                           {-# UNPACK #-} !ContainerDeclarationQName_id,
-                                                           containerDeclarationQName_key ::
-                                                           Prelude.Maybe ContainerDeclaration,
-                                                           containerDeclarationQName_value ::
-                                                           Prelude.Maybe
-                                                             ContainerDeclarationQName_value}
-                                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ContainerDeclarationQName where
-  toJSON
-    (ContainerDeclarationQName __field__id __field__key __field__value)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             (Prelude.maybe Prelude.id ((:) . ("value" .=)) __field__value
-                Prelude.mempty))
-
-instance Thrift.ThriftStruct ContainerDeclarationQName where
-  buildStruct _proxy
-    (ContainerDeclarationQName __field__id __field__key __field__value)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           let (__cereal__key, __id__key)
-                 = case __field__key of
-                     Prelude.Just _val -> ((:)
-                                             (Thrift.genField _proxy "key"
-                                                (Thrift.getStructType _proxy)
-                                                2
-                                                1
-                                                (Thrift.buildStruct _proxy _val)),
-                                           2)
-                     Prelude.Nothing -> (Prelude.id, 1)
-             in
-             __cereal__key
-               (case __field__value of
-                  Prelude.Just _val -> Thrift.genField _proxy "value"
-                                         (Thrift.getStructType _proxy)
-                                         3
-                                         __id__key
-                                         (Thrift.buildStruct _proxy _val)
-                                         : []
-                  Prelude.Nothing -> []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            __field__value <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__value
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             !__val__value <- ST.readSTRef __field__value
-                                             Prelude.pure
-                                               (ContainerDeclarationQName __val__id __val__key
-                                                  __val__value)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2), ("value", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData ContainerDeclarationQName where
-  rnf
-    (ContainerDeclarationQName __field__id __field__key __field__value)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq`
-          DeepSeq.rnf __field__value `Prelude.seq` ()
-
-instance Default.Default ContainerDeclarationQName where
-  def
-    = ContainerDeclarationQName Default.def Prelude.Nothing
-        Prelude.Nothing
-
-instance Hashable.Hashable ContainerDeclarationQName where
-  hashWithSalt __salt (ContainerDeclarationQName _id _key _value)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key)
-        _value
-
-type ContainerParent_id = Glean.Id
-
-data ContainerParent = ContainerParent{containerParent_id ::
-                                       {-# UNPACK #-} !ContainerParent_id,
-                                       containerParent_key :: Prelude.Maybe ContainerParent_key}
-                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ContainerParent where
-  toJSON (ContainerParent __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct ContainerParent where
-  buildStruct _proxy (ContainerParent __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (ContainerParent __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData ContainerParent where
-  rnf (ContainerParent __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default ContainerParent where
-  def = ContainerParent Default.def Prelude.Nothing
-
-instance Hashable.Hashable ContainerParent where
-  hashWithSalt __salt (ContainerParent _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type DeclarationComment_id = Glean.Id
-
-data DeclarationComment = DeclarationComment{declarationComment_id
-                                             :: {-# UNPACK #-} !DeclarationComment_id,
-                                             declarationComment_key ::
-                                             Prelude.Maybe DeclarationComment_key}
-                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON DeclarationComment where
-  toJSON (DeclarationComment __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct DeclarationComment where
-  buildStruct _proxy (DeclarationComment __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (DeclarationComment __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData DeclarationComment where
-  rnf (DeclarationComment __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default DeclarationComment where
-  def = DeclarationComment Default.def Prelude.Nothing
-
-instance Hashable.Hashable DeclarationComment where
-  hashWithSalt __salt (DeclarationComment _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type DeclarationLocation_id = Glean.Id
-
-data DeclarationLocation = DeclarationLocation{declarationLocation_id
-                                               :: {-# UNPACK #-} !DeclarationLocation_id,
-                                               declarationLocation_key ::
-                                               Prelude.Maybe DeclarationLocation_key}
-                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON DeclarationLocation where
-  toJSON (DeclarationLocation __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct DeclarationLocation where
-  buildStruct _proxy (DeclarationLocation __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (DeclarationLocation __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData DeclarationLocation where
-  rnf (DeclarationLocation __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default DeclarationLocation where
-  def = DeclarationLocation Default.def Prelude.Nothing
-
-instance Hashable.Hashable DeclarationLocation where
-  hashWithSalt __salt (DeclarationLocation _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type DeclarationName_id = Glean.Id
-
-data DeclarationName = DeclarationName{declarationName_id ::
-                                       {-# UNPACK #-} !DeclarationName_id,
-                                       declarationName_key :: Prelude.Maybe Declaration,
-                                       declarationName_value :: Prelude.Maybe DeclarationName_value}
-                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON DeclarationName where
-  toJSON (DeclarationName __field__id __field__key __field__value)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             (Prelude.maybe Prelude.id ((:) . ("value" .=)) __field__value
-                Prelude.mempty))
-
-instance Thrift.ThriftStruct DeclarationName where
-  buildStruct _proxy
-    (DeclarationName __field__id __field__key __field__value)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           let (__cereal__key, __id__key)
-                 = case __field__key of
-                     Prelude.Just _val -> ((:)
-                                             (Thrift.genField _proxy "key"
-                                                (Thrift.getStructType _proxy)
-                                                2
-                                                1
-                                                (Thrift.buildStruct _proxy _val)),
-                                           2)
-                     Prelude.Nothing -> (Prelude.id, 1)
-             in
-             __cereal__key
-               (case __field__value of
-                  Prelude.Just _val -> Thrift.genField _proxy "value"
-                                         (Thrift.getStructType _proxy)
-                                         3
-                                         __id__key
-                                         (Thrift.buildStruct _proxy _val)
-                                         : []
-                  Prelude.Nothing -> []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            __field__value <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__value
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             !__val__value <- ST.readSTRef __field__value
-                                             Prelude.pure
-                                               (DeclarationName __val__id __val__key __val__value)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2), ("value", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData DeclarationName where
-  rnf (DeclarationName __field__id __field__key __field__value)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq`
-          DeepSeq.rnf __field__value `Prelude.seq` ()
-
-instance Default.Default DeclarationName where
-  def = DeclarationName Default.def Prelude.Nothing Prelude.Nothing
-
-instance Hashable.Hashable DeclarationName where
-  hashWithSalt __salt (DeclarationName _id _key _value)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key)
-        _value
-
-type DeclarationNamespace_id = Glean.Id
-
-data DeclarationNamespace = DeclarationNamespace{declarationNamespace_id
-                                                 :: {-# UNPACK #-} !DeclarationNamespace_id,
-                                                 declarationNamespace_key ::
-                                                 Prelude.Maybe DeclarationNamespace_key}
-                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON DeclarationNamespace where
-  toJSON (DeclarationNamespace __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct DeclarationNamespace where
-  buildStruct _proxy (DeclarationNamespace __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (DeclarationNamespace __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData DeclarationNamespace where
-  rnf (DeclarationNamespace __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default DeclarationNamespace where
-  def = DeclarationNamespace Default.def Prelude.Nothing
-
-instance Hashable.Hashable DeclarationNamespace where
-  hashWithSalt __salt (DeclarationNamespace _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type DeclarationSource_id = Glean.Id
-
-data DeclarationSource = DeclarationSource{declarationSource_id ::
-                                           {-# UNPACK #-} !DeclarationSource_id,
-                                           declarationSource_key ::
-                                           Prelude.Maybe DeclarationSource_key}
-                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON DeclarationSource where
-  toJSON (DeclarationSource __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct DeclarationSource where
-  buildStruct _proxy (DeclarationSource __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (DeclarationSource __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData DeclarationSource where
-  rnf (DeclarationSource __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default DeclarationSource where
-  def = DeclarationSource Default.def Prelude.Nothing
-
-instance Hashable.Hashable DeclarationSource where
-  hashWithSalt __salt (DeclarationSource _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type DeclarationSpan_id = Glean.Id
-
-data DeclarationSpan = DeclarationSpan{declarationSpan_id ::
-                                       {-# UNPACK #-} !DeclarationSpan_id,
-                                       declarationSpan_key :: Prelude.Maybe DeclarationSpan_key}
-                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON DeclarationSpan where
-  toJSON (DeclarationSpan __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct DeclarationSpan where
-  buildStruct _proxy (DeclarationSpan __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (DeclarationSpan __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData DeclarationSpan where
-  rnf (DeclarationSpan __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default DeclarationSpan where
-  def = DeclarationSpan Default.def Prelude.Nothing
-
-instance Hashable.Hashable DeclarationSpan where
-  hashWithSalt __salt (DeclarationSpan _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type DeclarationTarget_id = Glean.Id
-
-data DeclarationTarget = DeclarationTarget{declarationTarget_id ::
-                                           {-# UNPACK #-} !DeclarationTarget_id,
-                                           declarationTarget_key ::
-                                           Prelude.Maybe DeclarationTarget_key}
-                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON DeclarationTarget where
-  toJSON (DeclarationTarget __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct DeclarationTarget where
-  buildStruct _proxy (DeclarationTarget __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (DeclarationTarget __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData DeclarationTarget where
-  rnf (DeclarationTarget __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default DeclarationTarget where
-  def = DeclarationTarget Default.def Prelude.Nothing
-
-instance Hashable.Hashable DeclarationTarget where
-  hashWithSalt __salt (DeclarationTarget _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type FileDeclarations_id = Glean.Id
-
-data FileDeclarations = FileDeclarations{fileDeclarations_id ::
-                                         {-# UNPACK #-} !FileDeclarations_id,
-                                         fileDeclarations_key :: Prelude.Maybe FileDeclarations_key}
-                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON FileDeclarations where
-  toJSON (FileDeclarations __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct FileDeclarations where
-  buildStruct _proxy (FileDeclarations __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (FileDeclarations __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData FileDeclarations where
-  rnf (FileDeclarations __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default FileDeclarations where
-  def = FileDeclarations Default.def Prelude.Nothing
-
-instance Hashable.Hashable FileDeclarations where
-  hashWithSalt __salt (FileDeclarations _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type HackToThrift_id = Glean.Id
-
-data HackToThrift = HackToThrift{hackToThrift_id ::
-                                 {-# UNPACK #-} !HackToThrift_id,
-                                 hackToThrift_key :: Prelude.Maybe HackToThrift_key}
-                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON HackToThrift where
-  toJSON (HackToThrift __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct HackToThrift where
-  buildStruct _proxy (HackToThrift __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (HackToThrift __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData HackToThrift where
-  rnf (HackToThrift __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default HackToThrift where
-  def = HackToThrift Default.def Prelude.Nothing
-
-instance Hashable.Hashable HackToThrift where
-  hashWithSalt __salt (HackToThrift _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type MemberCluster_id = Glean.Id
-
-data MemberCluster = MemberCluster{memberCluster_id ::
-                                   {-# UNPACK #-} !MemberCluster_id,
-                                   memberCluster_key :: Prelude.Maybe MemberCluster_key}
-                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON MemberCluster where
-  toJSON (MemberCluster __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct MemberCluster where
-  buildStruct _proxy (MemberCluster __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (MemberCluster __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData MemberCluster where
-  rnf (MemberCluster __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default MemberCluster where
-  def = MemberCluster Default.def Prelude.Nothing
-
-instance Hashable.Hashable MemberCluster where
-  hashWithSalt __salt (MemberCluster _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type ModuleChild_id = Glean.Id
-
-data ModuleChild = ModuleChild{moduleChild_id ::
-                               {-# UNPACK #-} !ModuleChild_id,
-                               moduleChild_key :: Prelude.Maybe ModuleChild_key}
-                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ModuleChild where
-  toJSON (ModuleChild __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct ModuleChild where
-  buildStruct _proxy (ModuleChild __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (ModuleChild __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData ModuleChild where
-  rnf (ModuleChild __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default ModuleChild where
-  def = ModuleChild Default.def Prelude.Nothing
-
-instance Hashable.Hashable ModuleChild where
-  hashWithSalt __salt (ModuleChild _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type ModuleParent_id = Glean.Id
-
-data ModuleParent = ModuleParent{moduleParent_id ::
-                                 {-# UNPACK #-} !ModuleParent_id,
-                                 moduleParent_key :: Prelude.Maybe ModuleParent_key}
-                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ModuleParent where
-  toJSON (ModuleParent __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct ModuleParent where
-  buildStruct _proxy (ModuleParent __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (ModuleParent __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData ModuleParent where
-  rnf (ModuleParent __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default ModuleParent where
-  def = ModuleParent Default.def Prelude.Nothing
-
-instance Hashable.Hashable ModuleParent where
-  hashWithSalt __salt (ModuleParent _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type NamespaceMember_id = Glean.Id
-
-data NamespaceMember = NamespaceMember{namespaceMember_id ::
-                                       {-# UNPACK #-} !NamespaceMember_id,
-                                       namespaceMember_key :: Prelude.Maybe NamespaceMember_key}
-                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON NamespaceMember where
-  toJSON (NamespaceMember __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct NamespaceMember where
-  buildStruct _proxy (NamespaceMember __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (NamespaceMember __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData NamespaceMember where
-  rnf (NamespaceMember __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default NamespaceMember where
-  def = NamespaceMember Default.def Prelude.Nothing
-
-instance Hashable.Hashable NamespaceMember where
-  hashWithSalt __salt (NamespaceMember _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type SearchClassByName_id = Glean.Id
-
-data SearchClassByName = SearchClassByName{searchClassByName_id ::
-                                           {-# UNPACK #-} !SearchClassByName_id,
-                                           searchClassByName_key ::
-                                           Prelude.Maybe SearchClassByName_key}
-                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchClassByName where
-  toJSON (SearchClassByName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchClassByName where
-  buildStruct _proxy (SearchClassByName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (SearchClassByName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchClassByName where
-  rnf (SearchClassByName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default SearchClassByName where
-  def = SearchClassByName Default.def Prelude.Nothing
-
-instance Hashable.Hashable SearchClassByName where
-  hashWithSalt __salt (SearchClassByName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type SearchClassConstByName_id = Glean.Id
-
-data SearchClassConstByName = SearchClassConstByName{searchClassConstByName_id
-                                                     :: {-# UNPACK #-} !SearchClassConstByName_id,
-                                                     searchClassConstByName_key ::
-                                                     Prelude.Maybe SearchClassConstByName_key}
-                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchClassConstByName where
-  toJSON (SearchClassConstByName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchClassConstByName where
-  buildStruct _proxy
-    (SearchClassConstByName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (SearchClassConstByName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchClassConstByName where
-  rnf (SearchClassConstByName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default SearchClassConstByName where
-  def = SearchClassConstByName Default.def Prelude.Nothing
-
-instance Hashable.Hashable SearchClassConstByName where
-  hashWithSalt __salt (SearchClassConstByName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type SearchEnumByName_id = Glean.Id
-
-data SearchEnumByName = SearchEnumByName{searchEnumByName_id ::
-                                         {-# UNPACK #-} !SearchEnumByName_id,
-                                         searchEnumByName_key :: Prelude.Maybe SearchEnumByName_key}
-                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchEnumByName where
-  toJSON (SearchEnumByName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchEnumByName where
-  buildStruct _proxy (SearchEnumByName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (SearchEnumByName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchEnumByName where
-  rnf (SearchEnumByName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default SearchEnumByName where
-  def = SearchEnumByName Default.def Prelude.Nothing
-
-instance Hashable.Hashable SearchEnumByName where
-  hashWithSalt __salt (SearchEnumByName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type SearchEnumeratorByName_id = Glean.Id
-
-data SearchEnumeratorByName = SearchEnumeratorByName{searchEnumeratorByName_id
-                                                     :: {-# UNPACK #-} !SearchEnumeratorByName_id,
-                                                     searchEnumeratorByName_key ::
-                                                     Prelude.Maybe SearchEnumeratorByName_key}
-                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchEnumeratorByName where
-  toJSON (SearchEnumeratorByName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchEnumeratorByName where
-  buildStruct _proxy
-    (SearchEnumeratorByName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (SearchEnumeratorByName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchEnumeratorByName where
-  rnf (SearchEnumeratorByName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default SearchEnumeratorByName where
-  def = SearchEnumeratorByName Default.def Prelude.Nothing
-
-instance Hashable.Hashable SearchEnumeratorByName where
-  hashWithSalt __salt (SearchEnumeratorByName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type SearchFunctionByName_id = Glean.Id
-
-data SearchFunctionByName = SearchFunctionByName{searchFunctionByName_id
-                                                 :: {-# UNPACK #-} !SearchFunctionByName_id,
-                                                 searchFunctionByName_key ::
-                                                 Prelude.Maybe SearchFunctionByName_key}
-                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchFunctionByName where
-  toJSON (SearchFunctionByName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchFunctionByName where
-  buildStruct _proxy (SearchFunctionByName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (SearchFunctionByName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchFunctionByName where
-  rnf (SearchFunctionByName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default SearchFunctionByName where
-  def = SearchFunctionByName Default.def Prelude.Nothing
-
-instance Hashable.Hashable SearchFunctionByName where
-  hashWithSalt __salt (SearchFunctionByName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type SearchGlobalConstByName_id = Glean.Id
-
-data SearchGlobalConstByName = SearchGlobalConstByName{searchGlobalConstByName_id
-                                                       ::
-                                                       {-# UNPACK #-} !SearchGlobalConstByName_id,
-                                                       searchGlobalConstByName_key ::
-                                                       Prelude.Maybe SearchGlobalConstByName_key}
-                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchGlobalConstByName where
-  toJSON (SearchGlobalConstByName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchGlobalConstByName where
-  buildStruct _proxy
-    (SearchGlobalConstByName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (SearchGlobalConstByName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchGlobalConstByName where
-  rnf (SearchGlobalConstByName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default SearchGlobalConstByName where
-  def = SearchGlobalConstByName Default.def Prelude.Nothing
-
-instance Hashable.Hashable SearchGlobalConstByName where
-  hashWithSalt __salt (SearchGlobalConstByName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type SearchInterfaceByName_id = Glean.Id
-
-data SearchInterfaceByName = SearchInterfaceByName{searchInterfaceByName_id
-                                                   :: {-# UNPACK #-} !SearchInterfaceByName_id,
-                                                   searchInterfaceByName_key ::
-                                                   Prelude.Maybe SearchInterfaceByName_key}
-                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchInterfaceByName where
-  toJSON (SearchInterfaceByName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchInterfaceByName where
-  buildStruct _proxy (SearchInterfaceByName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (SearchInterfaceByName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchInterfaceByName where
-  rnf (SearchInterfaceByName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default SearchInterfaceByName where
-  def = SearchInterfaceByName Default.def Prelude.Nothing
-
-instance Hashable.Hashable SearchInterfaceByName where
-  hashWithSalt __salt (SearchInterfaceByName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type SearchMethodByName_id = Glean.Id
-
-data SearchMethodByName = SearchMethodByName{searchMethodByName_id
-                                             :: {-# UNPACK #-} !SearchMethodByName_id,
-                                             searchMethodByName_key ::
-                                             Prelude.Maybe SearchMethodByName_key}
-                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchMethodByName where
-  toJSON (SearchMethodByName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchMethodByName where
-  buildStruct _proxy (SearchMethodByName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (SearchMethodByName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchMethodByName where
-  rnf (SearchMethodByName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default SearchMethodByName where
-  def = SearchMethodByName Default.def Prelude.Nothing
-
-instance Hashable.Hashable SearchMethodByName where
-  hashWithSalt __salt (SearchMethodByName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type SearchModuleByName_id = Glean.Id
-
-data SearchModuleByName = SearchModuleByName{searchModuleByName_id
-                                             :: {-# UNPACK #-} !SearchModuleByName_id,
-                                             searchModuleByName_key ::
-                                             Prelude.Maybe SearchModuleByName_key}
-                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchModuleByName where
-  toJSON (SearchModuleByName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchModuleByName where
-  buildStruct _proxy (SearchModuleByName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (SearchModuleByName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchModuleByName where
-  rnf (SearchModuleByName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default SearchModuleByName where
-  def = SearchModuleByName Default.def Prelude.Nothing
-
-instance Hashable.Hashable SearchModuleByName where
-  hashWithSalt __salt (SearchModuleByName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type SearchNamespaceByName_id = Glean.Id
-
-data SearchNamespaceByName = SearchNamespaceByName{searchNamespaceByName_id
-                                                   :: {-# UNPACK #-} !SearchNamespaceByName_id,
-                                                   searchNamespaceByName_key ::
-                                                   Prelude.Maybe SearchNamespaceByName_key}
-                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchNamespaceByName where
-  toJSON (SearchNamespaceByName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchNamespaceByName where
-  buildStruct _proxy (SearchNamespaceByName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (SearchNamespaceByName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchNamespaceByName where
-  rnf (SearchNamespaceByName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default SearchNamespaceByName where
-  def = SearchNamespaceByName Default.def Prelude.Nothing
-
-instance Hashable.Hashable SearchNamespaceByName where
-  hashWithSalt __salt (SearchNamespaceByName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type SearchPropertyByName_id = Glean.Id
-
-data SearchPropertyByName = SearchPropertyByName{searchPropertyByName_id
-                                                 :: {-# UNPACK #-} !SearchPropertyByName_id,
-                                                 searchPropertyByName_key ::
-                                                 Prelude.Maybe SearchPropertyByName_key}
-                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchPropertyByName where
-  toJSON (SearchPropertyByName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchPropertyByName where
-  buildStruct _proxy (SearchPropertyByName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (SearchPropertyByName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchPropertyByName where
-  rnf (SearchPropertyByName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default SearchPropertyByName where
-  def = SearchPropertyByName Default.def Prelude.Nothing
-
-instance Hashable.Hashable SearchPropertyByName where
-  hashWithSalt __salt (SearchPropertyByName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type SearchTraitByName_id = Glean.Id
-
-data SearchTraitByName = SearchTraitByName{searchTraitByName_id ::
-                                           {-# UNPACK #-} !SearchTraitByName_id,
-                                           searchTraitByName_key ::
-                                           Prelude.Maybe SearchTraitByName_key}
-                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchTraitByName where
-  toJSON (SearchTraitByName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchTraitByName where
-  buildStruct _proxy (SearchTraitByName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (SearchTraitByName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchTraitByName where
-  rnf (SearchTraitByName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default SearchTraitByName where
-  def = SearchTraitByName Default.def Prelude.Nothing
-
-instance Hashable.Hashable SearchTraitByName where
-  hashWithSalt __salt (SearchTraitByName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type SearchTypeConstByName_id = Glean.Id
-
-data SearchTypeConstByName = SearchTypeConstByName{searchTypeConstByName_id
-                                                   :: {-# UNPACK #-} !SearchTypeConstByName_id,
-                                                   searchTypeConstByName_key ::
-                                                   Prelude.Maybe SearchTypeConstByName_key}
-                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchTypeConstByName where
-  toJSON (SearchTypeConstByName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchTypeConstByName where
-  buildStruct _proxy (SearchTypeConstByName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (SearchTypeConstByName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchTypeConstByName where
-  rnf (SearchTypeConstByName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default SearchTypeConstByName where
-  def = SearchTypeConstByName Default.def Prelude.Nothing
-
-instance Hashable.Hashable SearchTypeConstByName where
-  hashWithSalt __salt (SearchTypeConstByName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type SearchTypedefByName_id = Glean.Id
-
-data SearchTypedefByName = SearchTypedefByName{searchTypedefByName_id
-                                               :: {-# UNPACK #-} !SearchTypedefByName_id,
-                                               searchTypedefByName_key ::
-                                               Prelude.Maybe SearchTypedefByName_key}
-                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchTypedefByName where
-  toJSON (SearchTypedefByName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchTypedefByName where
-  buildStruct _proxy (SearchTypedefByName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (SearchTypedefByName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchTypedefByName where
-  rnf (SearchTypedefByName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default SearchTypedefByName where
-  def = SearchTypedefByName Default.def Prelude.Nothing
-
-instance Hashable.Hashable SearchTypedefByName where
-  hashWithSalt __salt (SearchTypedefByName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type ThriftToHack_id = Glean.Id
-
-data ThriftToHack = ThriftToHack{thriftToHack_id ::
-                                 {-# UNPACK #-} !ThriftToHack_id,
-                                 thriftToHack_key :: Prelude.Maybe ThriftToHack_key}
-                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ThriftToHack where
-  toJSON (ThriftToHack __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct ThriftToHack where
-  buildStruct _proxy (ThriftToHack __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (ThriftToHack __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData ThriftToHack where
-  rnf (ThriftToHack __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default ThriftToHack where
-  def = ThriftToHack Default.def Prelude.Nothing
-
-instance Hashable.Hashable ThriftToHack where
-  hashWithSalt __salt (ThriftToHack _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type TargetUses_id = Glean.Id
-
-data TargetUses = TargetUses{targetUses_id ::
-                             {-# UNPACK #-} !TargetUses_id,
-                             targetUses_key :: Prelude.Maybe TargetUses_key}
-                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TargetUses where
-  toJSON (TargetUses __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct TargetUses where
-  buildStruct _proxy (TargetUses __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (TargetUses __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData TargetUses where
-  rnf (TargetUses __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default TargetUses where
-  def = TargetUses Default.def Prelude.Nothing
-
-instance Hashable.Hashable TargetUses where
-  hashWithSalt __salt (TargetUses _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type TargetUsesAbs_id = Glean.Id
-
-data TargetUsesAbs = TargetUsesAbs{targetUsesAbs_id ::
-                                   {-# UNPACK #-} !TargetUsesAbs_id,
-                                   targetUsesAbs_key :: Prelude.Maybe TargetUsesAbs_key}
-                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TargetUsesAbs where
-  toJSON (TargetUsesAbs __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct TargetUsesAbs where
-  buildStruct _proxy (TargetUsesAbs __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (TargetUsesAbs __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData TargetUsesAbs where
-  rnf (TargetUsesAbs __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default TargetUsesAbs where
-  def = TargetUsesAbs Default.def Prelude.Nothing
-
-instance Hashable.Hashable TargetUsesAbs where
-  hashWithSalt __salt (TargetUsesAbs _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type FileXRefs_id = Glean.Id
-
-data FileXRefs = FileXRefs{fileXRefs_id ::
-                           {-# UNPACK #-} !FileXRefs_id,
-                           fileXRefs_key :: Prelude.Maybe FileXRefs_key}
-                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON FileXRefs where
-  toJSON (FileXRefs __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct FileXRefs where
-  buildStruct _proxy (FileXRefs __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (FileXRefs __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData FileXRefs where
-  rnf (FileXRefs __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default FileXRefs where
-  def = FileXRefs Default.def Prelude.Nothing
-
-instance Hashable.Hashable FileXRefs where
-  hashWithSalt __salt (FileXRefs _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type TypeInfo_id = Glean.Id
-
-data TypeInfo = TypeInfo{typeInfo_id ::
-                         {-# UNPACK #-} !TypeInfo_id,
-                         typeInfo_key :: Prelude.Maybe TypeInfo_key}
-                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TypeInfo where
-  toJSON (TypeInfo __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct TypeInfo where
-  buildStruct _proxy (TypeInfo __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (TypeInfo __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData TypeInfo where
-  rnf (TypeInfo __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default TypeInfo where
-  def = TypeInfo Default.def Prelude.Nothing
-
-instance Hashable.Hashable TypeInfo where
-  hashWithSalt __salt (TypeInfo _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type InheritedMembers_id = Glean.Id
-
-data InheritedMembers = InheritedMembers{inheritedMembers_id ::
-                                         {-# UNPACK #-} !InheritedMembers_id,
-                                         inheritedMembers_key :: Prelude.Maybe InheritedMembers_key}
-                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON InheritedMembers where
-  toJSON (InheritedMembers __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct InheritedMembers where
-  buildStruct _proxy (InheritedMembers __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (InheritedMembers __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData InheritedMembers where
-  rnf (InheritedMembers __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default InheritedMembers where
-  def = InheritedMembers Default.def Prelude.Nothing
-
-instance Hashable.Hashable InheritedMembers where
-  hashWithSalt __salt (InheritedMembers _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type MethodDeclaration_id = Glean.Id
-
-data MethodDeclaration = MethodDeclaration{methodDeclaration_id ::
-                                           {-# UNPACK #-} !MethodDeclaration_id,
-                                           methodDeclaration_key ::
-                                           Prelude.Maybe MethodDeclaration_key}
-                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON MethodDeclaration where
-  toJSON (MethodDeclaration __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct MethodDeclaration where
-  buildStruct _proxy (MethodDeclaration __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (MethodDeclaration __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData MethodDeclaration where
-  rnf (MethodDeclaration __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default MethodDeclaration where
-  def = MethodDeclaration Default.def Prelude.Nothing
-
-instance Hashable.Hashable MethodDeclaration where
-  hashWithSalt __salt (MethodDeclaration _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type PropertyDeclaration_id = Glean.Id
-
-data PropertyDeclaration = PropertyDeclaration{propertyDeclaration_id
-                                               :: {-# UNPACK #-} !PropertyDeclaration_id,
-                                               propertyDeclaration_key ::
-                                               Prelude.Maybe PropertyDeclaration_key}
-                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON PropertyDeclaration where
-  toJSON (PropertyDeclaration __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct PropertyDeclaration where
-  buildStruct _proxy (PropertyDeclaration __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (PropertyDeclaration __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData PropertyDeclaration where
-  rnf (PropertyDeclaration __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default PropertyDeclaration where
-  def = PropertyDeclaration Default.def Prelude.Nothing
-
-instance Hashable.Hashable PropertyDeclaration where
-  hashWithSalt __salt (PropertyDeclaration _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type TypeConstDeclaration_id = Glean.Id
-
-data TypeConstDeclaration = TypeConstDeclaration{typeConstDeclaration_id
-                                                 :: {-# UNPACK #-} !TypeConstDeclaration_id,
-                                                 typeConstDeclaration_key ::
-                                                 Prelude.Maybe TypeConstDeclaration_key}
-                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TypeConstDeclaration where
-  toJSON (TypeConstDeclaration __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct TypeConstDeclaration where
-  buildStruct _proxy (TypeConstDeclaration __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (TypeConstDeclaration __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData TypeConstDeclaration where
-  rnf (TypeConstDeclaration __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default TypeConstDeclaration where
-  def = TypeConstDeclaration Default.def Prelude.Nothing
-
-instance Hashable.Hashable TypeConstDeclaration where
-  hashWithSalt __salt (TypeConstDeclaration _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type ContainerChild_id = Glean.Id
-
-data ContainerChild = ContainerChild{containerChild_id ::
-                                     {-# UNPACK #-} !ContainerChild_id,
-                                     containerChild_key :: Prelude.Maybe ContainerChild_key}
-                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ContainerChild where
-  toJSON (ContainerChild __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct ContainerChild where
-  buildStruct _proxy (ContainerChild __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (ContainerChild __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData ContainerChild where
-  rnf (ContainerChild __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default ContainerChild where
-  def = ContainerChild Default.def Prelude.Nothing
-
-instance Hashable.Hashable ContainerChild where
-  hashWithSalt __salt (ContainerChild _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type FunctionDefinition_id = Glean.Id
-
-data FunctionDefinition = FunctionDefinition{functionDefinition_id
-                                             :: {-# UNPACK #-} !FunctionDefinition_id,
-                                             functionDefinition_key ::
-                                             Prelude.Maybe FunctionDefinition_key}
-                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON FunctionDefinition where
-  toJSON (FunctionDefinition __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct FunctionDefinition where
-  buildStruct _proxy (FunctionDefinition __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (FunctionDefinition __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData FunctionDefinition where
-  rnf (FunctionDefinition __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default FunctionDefinition where
-  def = FunctionDefinition Default.def Prelude.Nothing
-
-instance Hashable.Hashable FunctionDefinition where
-  hashWithSalt __salt (FunctionDefinition _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type InterfaceDefinition_id = Glean.Id
-
-data InterfaceDefinition = InterfaceDefinition{interfaceDefinition_id
-                                               :: {-# UNPACK #-} !InterfaceDefinition_id,
-                                               interfaceDefinition_key ::
-                                               Prelude.Maybe InterfaceDefinition_key}
-                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON InterfaceDefinition where
-  toJSON (InterfaceDefinition __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct InterfaceDefinition where
-  buildStruct _proxy (InterfaceDefinition __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (InterfaceDefinition __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData InterfaceDefinition where
-  rnf (InterfaceDefinition __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default InterfaceDefinition where
-  def = InterfaceDefinition Default.def Prelude.Nothing
-
-instance Hashable.Hashable InterfaceDefinition where
-  hashWithSalt __salt (InterfaceDefinition _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type MethodDefinition_id = Glean.Id
-
-data MethodDefinition = MethodDefinition{methodDefinition_id ::
-                                         {-# UNPACK #-} !MethodDefinition_id,
-                                         methodDefinition_key :: Prelude.Maybe MethodDefinition_key}
-                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON MethodDefinition where
-  toJSON (MethodDefinition __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct MethodDefinition where
-  buildStruct _proxy (MethodDefinition __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (MethodDefinition __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData MethodDefinition where
-  rnf (MethodDefinition __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default MethodDefinition where
-  def = MethodDefinition Default.def Prelude.Nothing
-
-instance Hashable.Hashable MethodDefinition where
-  hashWithSalt __salt (MethodDefinition _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type TraitDefinition_id = Glean.Id
-
-data TraitDefinition = TraitDefinition{traitDefinition_id ::
-                                       {-# UNPACK #-} !TraitDefinition_id,
-                                       traitDefinition_key :: Prelude.Maybe TraitDefinition_key}
-                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TraitDefinition where
-  toJSON (TraitDefinition __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct TraitDefinition where
-  buildStruct _proxy (TraitDefinition __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (TraitDefinition __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData TraitDefinition where
-  rnf (TraitDefinition __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default TraitDefinition where
-  def = TraitDefinition Default.def Prelude.Nothing
-
-instance Hashable.Hashable TraitDefinition where
-  hashWithSalt __salt (TraitDefinition _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type TypedefDefinition_id = Glean.Id
-
-data TypedefDefinition = TypedefDefinition{typedefDefinition_id ::
-                                           {-# UNPACK #-} !TypedefDefinition_id,
-                                           typedefDefinition_key ::
-                                           Prelude.Maybe TypedefDefinition_key}
-                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TypedefDefinition where
-  toJSON (TypedefDefinition __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct TypedefDefinition where
-  buildStruct _proxy (TypedefDefinition __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (TypedefDefinition __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData TypedefDefinition where
-  rnf (TypedefDefinition __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default TypedefDefinition where
-  def = TypedefDefinition Default.def Prelude.Nothing
-
-instance Hashable.Hashable TypedefDefinition where
-  hashWithSalt __salt (TypedefDefinition _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type ClassDefinition_id = Glean.Id
-
-data ClassDefinition = ClassDefinition{classDefinition_id ::
-                                       {-# UNPACK #-} !ClassDefinition_id,
-                                       classDefinition_key :: Prelude.Maybe ClassDefinition_key}
-                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ClassDefinition where
-  toJSON (ClassDefinition __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct ClassDefinition where
-  buildStruct _proxy (ClassDefinition __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (ClassDefinition __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData ClassDefinition where
-  rnf (ClassDefinition __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default ClassDefinition where
-  def = ClassDefinition Default.def Prelude.Nothing
-
-instance Hashable.Hashable ClassDefinition where
-  hashWithSalt __salt (ClassDefinition _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type ClassDeclaration_id = Glean.Id
-
-data ClassDeclaration = ClassDeclaration{classDeclaration_id ::
-                                         {-# UNPACK #-} !ClassDeclaration_id,
-                                         classDeclaration_key :: Prelude.Maybe ClassDeclaration_key}
-                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ClassDeclaration where
-  toJSON (ClassDeclaration __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct ClassDeclaration where
-  buildStruct _proxy (ClassDeclaration __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (ClassDeclaration __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData ClassDeclaration where
-  rnf (ClassDeclaration __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default ClassDeclaration where
-  def = ClassDeclaration Default.def Prelude.Nothing
-
-instance Hashable.Hashable ClassDeclaration where
-  hashWithSalt __salt (ClassDeclaration _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type ClassConstDefinition_id = Glean.Id
-
-data ClassConstDefinition = ClassConstDefinition{classConstDefinition_id
-                                                 :: {-# UNPACK #-} !ClassConstDefinition_id,
-                                                 classConstDefinition_key ::
-                                                 Prelude.Maybe ClassConstDefinition_key}
-                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ClassConstDefinition where
-  toJSON (ClassConstDefinition __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct ClassConstDefinition where
-  buildStruct _proxy (ClassConstDefinition __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (ClassConstDefinition __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData ClassConstDefinition where
-  rnf (ClassConstDefinition __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default ClassConstDefinition where
-  def = ClassConstDefinition Default.def Prelude.Nothing
-
-instance Hashable.Hashable ClassConstDefinition where
-  hashWithSalt __salt (ClassConstDefinition _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type ClassConstDeclaration_id = Glean.Id
-
-data ClassConstDeclaration = ClassConstDeclaration{classConstDeclaration_id
-                                                   :: {-# UNPACK #-} !ClassConstDeclaration_id,
-                                                   classConstDeclaration_key ::
-                                                   Prelude.Maybe ClassConstDeclaration_key}
-                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ClassConstDeclaration where
-  toJSON (ClassConstDeclaration __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct ClassConstDeclaration where
-  buildStruct _proxy (ClassConstDeclaration __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (ClassConstDeclaration __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData ClassConstDeclaration where
-  rnf (ClassConstDeclaration __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default ClassConstDeclaration where
-  def = ClassConstDeclaration Default.def Prelude.Nothing
-
-instance Hashable.Hashable ClassConstDeclaration where
-  hashWithSalt __salt (ClassConstDeclaration _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type AttributeToDefinition_id = Glean.Id
-
-data AttributeToDefinition = AttributeToDefinition{attributeToDefinition_id
-                                                   :: {-# UNPACK #-} !AttributeToDefinition_id,
-                                                   attributeToDefinition_key ::
-                                                   Prelude.Maybe AttributeToDefinition_key}
-                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON AttributeToDefinition where
-  toJSON (AttributeToDefinition __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct AttributeToDefinition where
-  buildStruct _proxy (AttributeToDefinition __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (AttributeToDefinition __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData AttributeToDefinition where
-  rnf (AttributeToDefinition __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default AttributeToDefinition where
-  def = AttributeToDefinition Default.def Prelude.Nothing
-
-instance Hashable.Hashable AttributeToDefinition where
-  hashWithSalt __salt (AttributeToDefinition _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type AttributeToDeclaration_id = Glean.Id
-
-data AttributeToDeclaration = AttributeToDeclaration{attributeToDeclaration_id
-                                                     :: {-# UNPACK #-} !AttributeToDeclaration_id,
-                                                     attributeToDeclaration_key ::
-                                                     Prelude.Maybe AttributeToDeclaration_key}
-                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON AttributeToDeclaration where
-  toJSON (AttributeToDeclaration __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct AttributeToDeclaration where
-  buildStruct _proxy
-    (AttributeToDeclaration __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (AttributeToDeclaration __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData AttributeToDeclaration where
-  rnf (AttributeToDeclaration __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default AttributeToDeclaration where
-  def = AttributeToDeclaration Default.def Prelude.Nothing
-
-instance Hashable.Hashable AttributeToDeclaration where
-  hashWithSalt __salt (AttributeToDeclaration _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type AttributeHasParameter_id = Glean.Id
-
-data AttributeHasParameter = AttributeHasParameter{attributeHasParameter_id
-                                                   :: {-# UNPACK #-} !AttributeHasParameter_id,
-                                                   attributeHasParameter_key ::
-                                                   Prelude.Maybe AttributeHasParameter_key}
-                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON AttributeHasParameter where
-  toJSON (AttributeHasParameter __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct AttributeHasParameter where
-  buildStruct _proxy (AttributeHasParameter __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (AttributeHasParameter __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData AttributeHasParameter where
-  rnf (AttributeHasParameter __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default AttributeHasParameter where
-  def = AttributeHasParameter Default.def Prelude.Nothing
-
-instance Hashable.Hashable AttributeHasParameter where
-  hashWithSalt __salt (AttributeHasParameter _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type FileCall_id = Glean.Id
-
-data FileCall = FileCall{fileCall_id ::
-                         {-# UNPACK #-} !FileCall_id,
-                         fileCall_key :: Prelude.Maybe FileCall_key}
-                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON FileCall where
-  toJSON (FileCall __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct FileCall where
-  buildStruct _proxy (FileCall __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (FileCall __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData FileCall where
-  rnf (FileCall __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default FileCall where
-  def = FileCall Default.def Prelude.Nothing
-
-instance Hashable.Hashable FileCall where
-  hashWithSalt __salt (FileCall _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-data Visibility = Visibility_Private
-                | Visibility_Protected
-                | Visibility_Public
-                | Visibility_Internal
-                | Visibility__UNKNOWN Prelude.Int
-                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Visibility where
-  toJSON = Aeson.toJSON . Thrift.fromThriftEnum
-
-instance DeepSeq.NFData Visibility where
-  rnf __Visibility = Prelude.seq __Visibility ()
-
-instance Default.Default Visibility where
-  def = Visibility_Private
-
-instance Hashable.Hashable Visibility where
-  hashWithSalt _salt _val
-    = Hashable.hashWithSalt _salt (Thrift.fromThriftEnum _val)
-
-instance Thrift.ThriftEnum Visibility where
-  toThriftEnum 0 = Visibility_Private
-  toThriftEnum 1 = Visibility_Protected
-  toThriftEnum 2 = Visibility_Public
-  toThriftEnum 3 = Visibility_Internal
-  toThriftEnum val = Visibility__UNKNOWN val
-  fromThriftEnum Visibility_Private = 0
-  fromThriftEnum Visibility_Protected = 1
-  fromThriftEnum Visibility_Public = 2
-  fromThriftEnum Visibility_Internal = 3
-  fromThriftEnum (Visibility__UNKNOWN val) = val
-  allThriftEnumValues
-    = [Visibility_Private, Visibility_Protected, Visibility_Public,
-       Visibility_Internal]
-  toThriftEnumEither 0 = Prelude.Right Visibility_Private
-  toThriftEnumEither 1 = Prelude.Right Visibility_Protected
-  toThriftEnumEither 2 = Prelude.Right Visibility_Public
-  toThriftEnumEither 3 = Prelude.Right Visibility_Internal
-  toThriftEnumEither val
-    = Prelude.Left
-        ("toThriftEnumEither: not a valid identifier for enum Visibility: "
-           ++ Prelude.show val)
-
-data Variance = Variance_Contravariant
-              | Variance_Covariant
-              | Variance_Invariant
-              | Variance__UNKNOWN Prelude.Int
-                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Variance where
-  toJSON = Aeson.toJSON . Thrift.fromThriftEnum
-
-instance DeepSeq.NFData Variance where
-  rnf __Variance = Prelude.seq __Variance ()
-
-instance Default.Default Variance where
-  def = Variance_Contravariant
-
-instance Hashable.Hashable Variance where
-  hashWithSalt _salt _val
-    = Hashable.hashWithSalt _salt (Thrift.fromThriftEnum _val)
-
-instance Thrift.ThriftEnum Variance where
-  toThriftEnum 0 = Variance_Contravariant
-  toThriftEnum 1 = Variance_Covariant
-  toThriftEnum 2 = Variance_Invariant
-  toThriftEnum val = Variance__UNKNOWN val
-  fromThriftEnum Variance_Contravariant = 0
-  fromThriftEnum Variance_Covariant = 1
-  fromThriftEnum Variance_Invariant = 2
-  fromThriftEnum (Variance__UNKNOWN val) = val
-  allThriftEnumValues
-    = [Variance_Contravariant, Variance_Covariant, Variance_Invariant]
-  toThriftEnumEither 0 = Prelude.Right Variance_Contravariant
-  toThriftEnumEither 1 = Prelude.Right Variance_Covariant
-  toThriftEnumEither 2 = Prelude.Right Variance_Invariant
-  toThriftEnumEither val
-    = Prelude.Left
-        ("toThriftEnumEither: not a valid identifier for enum Variance: "
-           ++ Prelude.show val)
-
-data UserAttribute_key = UserAttribute_key{userAttribute_key_name
-                                           :: Name,
-                                           userAttribute_key_parameters :: [Text.Text],
-                                           userAttribute_key_qname :: Prelude.Maybe QName}
-                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON UserAttribute_key where
-  toJSON
-    (UserAttribute_key __field__name __field__parameters
-       __field__qname)
-    = Aeson.object
-        ("name" .= __field__name :
-           "parameters" .= __field__parameters :
-             Prelude.maybe Prelude.id ((:) . ("qname" .=)) __field__qname
-               Prelude.mempty)
-
-instance Thrift.ThriftStruct UserAttribute_key where
-  buildStruct _proxy
-    (UserAttribute_key __field__name __field__parameters
-       __field__qname)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__name)
-           :
-           Thrift.genField _proxy "parameters" (Thrift.getListType _proxy) 2 1
-             (Thrift.genList _proxy (Thrift.getStringType _proxy)
-                (Thrift.genText _proxy)
-                __field__parameters)
-             :
-             case __field__qname of
-               Prelude.Just _val -> Thrift.genField _proxy "qname"
-                                      (Thrift.getStructType _proxy)
-                                      3
-                                      2
-                                      (Thrift.buildStruct _proxy _val)
-                                      : []
-               Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef Default.def
-            __field__parameters <- ST.newSTRef Default.def
-            __field__qname <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseText
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__parameters
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__qname
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__parameters <- ST.readSTRef __field__parameters
-                                             !__val__qname <- ST.readSTRef __field__qname
-                                             Prelude.pure
-                                               (UserAttribute_key __val__name __val__parameters
-                                                  __val__qname)
-              _idMap
-                = HashMap.fromList [("name", 1), ("parameters", 2), ("qname", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData UserAttribute_key where
-  rnf
-    (UserAttribute_key __field__name __field__parameters
-       __field__qname)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__parameters `Prelude.seq`
-          DeepSeq.rnf __field__qname `Prelude.seq` ()
-
-instance Default.Default UserAttribute_key where
-  def = UserAttribute_key Default.def Default.def Prelude.Nothing
-
-instance Hashable.Hashable UserAttribute_key where
-  hashWithSalt __salt (UserAttribute_key _name _parameters _qname)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-           _parameters)
-        _qname
-
-newtype TypedefDeclaration_key = TypedefDeclaration_key{typedefDeclaration_key_name
-                                                        :: QName}
-                                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TypedefDeclaration_key where
-  toJSON (TypedefDeclaration_key __field__name)
-    = Aeson.object ("name" .= __field__name : Prelude.mempty)
-
-instance Thrift.ThriftStruct TypedefDeclaration_key where
-  buildStruct _proxy (TypedefDeclaration_key __field__name)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__name)
-           : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             Prelude.pure (TypedefDeclaration_key __val__name)
-              _idMap = HashMap.fromList [("name", 1)]
-            _parse 0)
-
-instance DeepSeq.NFData TypedefDeclaration_key where
-  rnf (TypedefDeclaration_key __field__name)
-    = DeepSeq.rnf __field__name `Prelude.seq` ()
-
-instance Default.Default TypedefDeclaration_key where
-  def = TypedefDeclaration_key Default.def
-
-instance Hashable.Hashable TypedefDeclaration_key where
-  hashWithSalt __salt (TypedefDeclaration_key _name)
-    = Hashable.hashWithSalt __salt _name
-
-data TypeConstKind = TypeConstKind_Abstract
-                   | TypeConstKind_Concrete
-                   | TypeConstKind_PartiallyAbstract
-                   | TypeConstKind__UNKNOWN Prelude.Int
-                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TypeConstKind where
-  toJSON = Aeson.toJSON . Thrift.fromThriftEnum
-
-instance DeepSeq.NFData TypeConstKind where
-  rnf __TypeConstKind = Prelude.seq __TypeConstKind ()
-
-instance Default.Default TypeConstKind where
-  def = TypeConstKind_Abstract
-
-instance Hashable.Hashable TypeConstKind where
-  hashWithSalt _salt _val
-    = Hashable.hashWithSalt _salt (Thrift.fromThriftEnum _val)
-
-instance Thrift.ThriftEnum TypeConstKind where
-  toThriftEnum 0 = TypeConstKind_Abstract
-  toThriftEnum 1 = TypeConstKind_Concrete
-  toThriftEnum 2 = TypeConstKind_PartiallyAbstract
-  toThriftEnum val = TypeConstKind__UNKNOWN val
-  fromThriftEnum TypeConstKind_Abstract = 0
-  fromThriftEnum TypeConstKind_Concrete = 1
-  fromThriftEnum TypeConstKind_PartiallyAbstract = 2
-  fromThriftEnum (TypeConstKind__UNKNOWN val) = val
-  allThriftEnumValues
-    = [TypeConstKind_Abstract, TypeConstKind_Concrete,
-       TypeConstKind_PartiallyAbstract]
-  toThriftEnumEither 0 = Prelude.Right TypeConstKind_Abstract
-  toThriftEnumEither 1 = Prelude.Right TypeConstKind_Concrete
-  toThriftEnumEither 2
-    = Prelude.Right TypeConstKind_PartiallyAbstract
-  toThriftEnumEither val
-    = Prelude.Left
-        ("toThriftEnumEither: not a valid identifier for enum TypeConstKind: "
-           ++ Prelude.show val)
-
-data TypeConstDefinition_key = TypeConstDefinition_key{typeConstDefinition_key_declaration
-                                                       :: TypeConstDeclaration,
-                                                       typeConstDefinition_key_type ::
-                                                       Prelude.Maybe Type,
-                                                       typeConstDefinition_key_kind ::
-                                                       TypeConstKind,
-                                                       typeConstDefinition_key_attributes ::
-                                                       [UserAttribute],
-                                                       typeConstDefinition_key_typeInfo ::
-                                                       Prelude.Maybe TypeInfo}
-                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TypeConstDefinition_key where
-  toJSON
-    (TypeConstDefinition_key __field__declaration __field__type
-       __field__kind __field__attributes __field__typeInfo)
-    = Aeson.object
-        ("declaration" .= __field__declaration :
-           Prelude.maybe Prelude.id ((:) . ("type" .=)) __field__type
-             ("kind" .= __field__kind :
-                "attributes" .= __field__attributes :
-                  Prelude.maybe Prelude.id ((:) . ("typeInfo" .=)) __field__typeInfo
-                    Prelude.mempty))
-
-instance Thrift.ThriftStruct TypeConstDefinition_key where
-  buildStruct _proxy
-    (TypeConstDefinition_key __field__declaration __field__type
-       __field__kind __field__attributes __field__typeInfo)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "declaration" (Thrift.getStructType _proxy)
-           1
-           0
-           (Thrift.buildStruct _proxy __field__declaration)
-           :
-           let (__cereal__type, __id__type)
-                 = case __field__type of
-                     Prelude.Just _val -> ((:)
-                                             (Thrift.genField _proxy "type"
-                                                (Thrift.getStructType _proxy)
-                                                2
-                                                1
-                                                (Thrift.buildStruct _proxy _val)),
-                                           2)
-                     Prelude.Nothing -> (Prelude.id, 1)
-             in
-             __cereal__type
-               (Thrift.genField _proxy "kind" (Thrift.getI32Type _proxy) 3
-                  __id__type
-                  ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                      Thrift.fromThriftEnum)
-                     __field__kind)
-                  :
-                  Thrift.genField _proxy "attributes" (Thrift.getListType _proxy) 4 3
-                    (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                       (Thrift.buildStruct _proxy)
-                       __field__attributes)
-                    :
-                    case __field__typeInfo of
-                      Prelude.Just _val -> Thrift.genField _proxy "typeInfo"
-                                             (Thrift.getStructType _proxy)
-                                             5
-                                             4
-                                             (Thrift.buildStruct _proxy _val)
-                                             : []
-                      Prelude.Nothing -> []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__declaration <- ST.newSTRef Default.def
-            __field__type <- ST.newSTRef Prelude.Nothing
-            __field__kind <- ST.newSTRef Default.def
-            __field__attributes <- ST.newSTRef Default.def
-            __field__typeInfo <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__declaration
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__type
-                                                                          (Prelude.Just _val)
-                                                                 3 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "TypeConstKind")
-                                                                        ST.writeSTRef __field__kind
-                                                                          _val
-                                                                 4 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__attributes
-                                                                          _val
-                                                                 5 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__typeInfo
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__declaration <- ST.readSTRef
-                                                                      __field__declaration
-                                             !__val__type <- ST.readSTRef __field__type
-                                             !__val__kind <- ST.readSTRef __field__kind
-                                             !__val__attributes <- ST.readSTRef __field__attributes
-                                             !__val__typeInfo <- ST.readSTRef __field__typeInfo
-                                             Prelude.pure
-                                               (TypeConstDefinition_key __val__declaration
-                                                  __val__type
-                                                  __val__kind
-                                                  __val__attributes
-                                                  __val__typeInfo)
-              _idMap
-                = HashMap.fromList
-                    [("declaration", 1), ("type", 2), ("kind", 3), ("attributes", 4),
-                     ("typeInfo", 5)]
-            _parse 0)
-
-instance DeepSeq.NFData TypeConstDefinition_key where
-  rnf
-    (TypeConstDefinition_key __field__declaration __field__type
-       __field__kind __field__attributes __field__typeInfo)
-    = DeepSeq.rnf __field__declaration `Prelude.seq`
-        DeepSeq.rnf __field__type `Prelude.seq`
-          DeepSeq.rnf __field__kind `Prelude.seq`
-            DeepSeq.rnf __field__attributes `Prelude.seq`
-              DeepSeq.rnf __field__typeInfo `Prelude.seq` ()
-
-instance Default.Default TypeConstDefinition_key where
-  def
-    = TypeConstDefinition_key Default.def Prelude.Nothing Default.def
-        Default.def
-        Prelude.Nothing
-
-instance Hashable.Hashable TypeConstDefinition_key where
-  hashWithSalt __salt
-    (TypeConstDefinition_key _declaration _type _kind _attributes
-       _typeInfo)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt
-              (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _declaration)
-                 _type)
-              _kind)
-           _attributes)
-        _typeInfo
-
-newtype TraitDeclaration_key = TraitDeclaration_key{traitDeclaration_key_name
-                                                    :: QName}
-                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TraitDeclaration_key where
-  toJSON (TraitDeclaration_key __field__name)
-    = Aeson.object ("name" .= __field__name : Prelude.mempty)
-
-instance Thrift.ThriftStruct TraitDeclaration_key where
-  buildStruct _proxy (TraitDeclaration_key __field__name)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__name)
-           : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             Prelude.pure (TraitDeclaration_key __val__name)
-              _idMap = HashMap.fromList [("name", 1)]
-            _parse 0)
-
-instance DeepSeq.NFData TraitDeclaration_key where
-  rnf (TraitDeclaration_key __field__name)
-    = DeepSeq.rnf __field__name `Prelude.seq` ()
-
-instance Default.Default TraitDeclaration_key where
-  def = TraitDeclaration_key Default.def
-
-instance Hashable.Hashable TraitDeclaration_key where
-  hashWithSalt __salt (TraitDeclaration_key _name)
-    = Hashable.hashWithSalt __salt _name
-
-data SearchTypedefByLowerCaseName_key = SearchTypedefByLowerCaseName_key{searchTypedefByLowerCaseName_key_name_lowercase
-                                                                         :: Text.Text,
-                                                                         searchTypedefByLowerCaseName_key_name
-                                                                         :: Text.Text}
-                                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchTypedefByLowerCaseName_key where
-  toJSON
-    (SearchTypedefByLowerCaseName_key __field__name_lowercase
-       __field__name)
-    = Aeson.object
-        ("name_lowercase" .= __field__name_lowercase :
-           "name" .= __field__name : Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchTypedefByLowerCaseName_key where
-  buildStruct _proxy
-    (SearchTypedefByLowerCaseName_key __field__name_lowercase
-       __field__name)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name_lowercase"
-           (Thrift.getStringType _proxy)
-           1
-           0
-           (Thrift.genText _proxy __field__name_lowercase)
-           :
-           Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 2 1
-             (Thrift.genText _proxy __field__name)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name_lowercase <- ST.newSTRef ""
-            __field__name <- ST.newSTRef ""
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__name_lowercase
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name_lowercase <- ST.readSTRef
-                                                                         __field__name_lowercase
-                                             !__val__name <- ST.readSTRef __field__name
-                                             Prelude.pure
-                                               (SearchTypedefByLowerCaseName_key
-                                                  __val__name_lowercase
-                                                  __val__name)
-              _idMap = HashMap.fromList [("name_lowercase", 1), ("name", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchTypedefByLowerCaseName_key where
-  rnf
-    (SearchTypedefByLowerCaseName_key __field__name_lowercase
-       __field__name)
-    = DeepSeq.rnf __field__name_lowercase `Prelude.seq`
-        DeepSeq.rnf __field__name `Prelude.seq` ()
-
-instance Default.Default SearchTypedefByLowerCaseName_key where
-  def = SearchTypedefByLowerCaseName_key "" ""
-
-instance Hashable.Hashable SearchTypedefByLowerCaseName_key where
-  hashWithSalt __salt
-    (SearchTypedefByLowerCaseName_key _name_lowercase _name)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt __salt _name_lowercase)
-        _name
-
-data SearchTypeConstByLowerCaseName_key = SearchTypeConstByLowerCaseName_key{searchTypeConstByLowerCaseName_key_name_lowercase
-                                                                             :: Text.Text,
-                                                                             searchTypeConstByLowerCaseName_key_name
-                                                                             :: Text.Text}
-                                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchTypeConstByLowerCaseName_key where
-  toJSON
-    (SearchTypeConstByLowerCaseName_key __field__name_lowercase
-       __field__name)
-    = Aeson.object
-        ("name_lowercase" .= __field__name_lowercase :
-           "name" .= __field__name : Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchTypeConstByLowerCaseName_key
-         where
-  buildStruct _proxy
-    (SearchTypeConstByLowerCaseName_key __field__name_lowercase
-       __field__name)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name_lowercase"
-           (Thrift.getStringType _proxy)
-           1
-           0
-           (Thrift.genText _proxy __field__name_lowercase)
-           :
-           Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 2 1
-             (Thrift.genText _proxy __field__name)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name_lowercase <- ST.newSTRef ""
-            __field__name <- ST.newSTRef ""
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__name_lowercase
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name_lowercase <- ST.readSTRef
-                                                                         __field__name_lowercase
-                                             !__val__name <- ST.readSTRef __field__name
-                                             Prelude.pure
-                                               (SearchTypeConstByLowerCaseName_key
-                                                  __val__name_lowercase
-                                                  __val__name)
-              _idMap = HashMap.fromList [("name_lowercase", 1), ("name", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchTypeConstByLowerCaseName_key where
-  rnf
-    (SearchTypeConstByLowerCaseName_key __field__name_lowercase
-       __field__name)
-    = DeepSeq.rnf __field__name_lowercase `Prelude.seq`
-        DeepSeq.rnf __field__name `Prelude.seq` ()
-
-instance Default.Default SearchTypeConstByLowerCaseName_key where
-  def = SearchTypeConstByLowerCaseName_key "" ""
-
-instance Hashable.Hashable SearchTypeConstByLowerCaseName_key where
-  hashWithSalt __salt
-    (SearchTypeConstByLowerCaseName_key _name_lowercase _name)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt __salt _name_lowercase)
-        _name
-
-data SearchTraitByLowerCaseName_key = SearchTraitByLowerCaseName_key{searchTraitByLowerCaseName_key_name_lowercase
-                                                                     :: Text.Text,
-                                                                     searchTraitByLowerCaseName_key_name
-                                                                     :: Text.Text}
-                                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchTraitByLowerCaseName_key where
-  toJSON
-    (SearchTraitByLowerCaseName_key __field__name_lowercase
-       __field__name)
-    = Aeson.object
-        ("name_lowercase" .= __field__name_lowercase :
-           "name" .= __field__name : Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchTraitByLowerCaseName_key where
-  buildStruct _proxy
-    (SearchTraitByLowerCaseName_key __field__name_lowercase
-       __field__name)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name_lowercase"
-           (Thrift.getStringType _proxy)
-           1
-           0
-           (Thrift.genText _proxy __field__name_lowercase)
-           :
-           Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 2 1
-             (Thrift.genText _proxy __field__name)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name_lowercase <- ST.newSTRef ""
-            __field__name <- ST.newSTRef ""
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__name_lowercase
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name_lowercase <- ST.readSTRef
-                                                                         __field__name_lowercase
-                                             !__val__name <- ST.readSTRef __field__name
-                                             Prelude.pure
-                                               (SearchTraitByLowerCaseName_key __val__name_lowercase
-                                                  __val__name)
-              _idMap = HashMap.fromList [("name_lowercase", 1), ("name", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchTraitByLowerCaseName_key where
-  rnf
-    (SearchTraitByLowerCaseName_key __field__name_lowercase
-       __field__name)
-    = DeepSeq.rnf __field__name_lowercase `Prelude.seq`
-        DeepSeq.rnf __field__name `Prelude.seq` ()
-
-instance Default.Default SearchTraitByLowerCaseName_key where
-  def = SearchTraitByLowerCaseName_key "" ""
-
-instance Hashable.Hashable SearchTraitByLowerCaseName_key where
-  hashWithSalt __salt
-    (SearchTraitByLowerCaseName_key _name_lowercase _name)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt __salt _name_lowercase)
-        _name
-
-data SearchPropertyByLowerCaseName_key = SearchPropertyByLowerCaseName_key{searchPropertyByLowerCaseName_key_name_lowercase
-                                                                           :: Text.Text,
-                                                                           searchPropertyByLowerCaseName_key_name
-                                                                           :: Text.Text}
-                                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchPropertyByLowerCaseName_key where
-  toJSON
-    (SearchPropertyByLowerCaseName_key __field__name_lowercase
-       __field__name)
-    = Aeson.object
-        ("name_lowercase" .= __field__name_lowercase :
-           "name" .= __field__name : Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchPropertyByLowerCaseName_key
-         where
-  buildStruct _proxy
-    (SearchPropertyByLowerCaseName_key __field__name_lowercase
-       __field__name)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name_lowercase"
-           (Thrift.getStringType _proxy)
-           1
-           0
-           (Thrift.genText _proxy __field__name_lowercase)
-           :
-           Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 2 1
-             (Thrift.genText _proxy __field__name)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name_lowercase <- ST.newSTRef ""
-            __field__name <- ST.newSTRef ""
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__name_lowercase
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name_lowercase <- ST.readSTRef
-                                                                         __field__name_lowercase
-                                             !__val__name <- ST.readSTRef __field__name
-                                             Prelude.pure
-                                               (SearchPropertyByLowerCaseName_key
-                                                  __val__name_lowercase
-                                                  __val__name)
-              _idMap = HashMap.fromList [("name_lowercase", 1), ("name", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchPropertyByLowerCaseName_key where
-  rnf
-    (SearchPropertyByLowerCaseName_key __field__name_lowercase
-       __field__name)
-    = DeepSeq.rnf __field__name_lowercase `Prelude.seq`
-        DeepSeq.rnf __field__name `Prelude.seq` ()
-
-instance Default.Default SearchPropertyByLowerCaseName_key where
-  def = SearchPropertyByLowerCaseName_key "" ""
-
-instance Hashable.Hashable SearchPropertyByLowerCaseName_key where
-  hashWithSalt __salt
-    (SearchPropertyByLowerCaseName_key _name_lowercase _name)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt __salt _name_lowercase)
-        _name
-
-data SearchNamespaceByLowerCaseName_key = SearchNamespaceByLowerCaseName_key{searchNamespaceByLowerCaseName_key_name_lowercase
-                                                                             :: Text.Text,
-                                                                             searchNamespaceByLowerCaseName_key_name
-                                                                             :: Text.Text}
-                                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchNamespaceByLowerCaseName_key where
-  toJSON
-    (SearchNamespaceByLowerCaseName_key __field__name_lowercase
-       __field__name)
-    = Aeson.object
-        ("name_lowercase" .= __field__name_lowercase :
-           "name" .= __field__name : Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchNamespaceByLowerCaseName_key
-         where
-  buildStruct _proxy
-    (SearchNamespaceByLowerCaseName_key __field__name_lowercase
-       __field__name)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name_lowercase"
-           (Thrift.getStringType _proxy)
-           1
-           0
-           (Thrift.genText _proxy __field__name_lowercase)
-           :
-           Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 2 1
-             (Thrift.genText _proxy __field__name)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name_lowercase <- ST.newSTRef ""
-            __field__name <- ST.newSTRef ""
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__name_lowercase
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name_lowercase <- ST.readSTRef
-                                                                         __field__name_lowercase
-                                             !__val__name <- ST.readSTRef __field__name
-                                             Prelude.pure
-                                               (SearchNamespaceByLowerCaseName_key
-                                                  __val__name_lowercase
-                                                  __val__name)
-              _idMap = HashMap.fromList [("name_lowercase", 1), ("name", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchNamespaceByLowerCaseName_key where
-  rnf
-    (SearchNamespaceByLowerCaseName_key __field__name_lowercase
-       __field__name)
-    = DeepSeq.rnf __field__name_lowercase `Prelude.seq`
-        DeepSeq.rnf __field__name `Prelude.seq` ()
-
-instance Default.Default SearchNamespaceByLowerCaseName_key where
-  def = SearchNamespaceByLowerCaseName_key "" ""
-
-instance Hashable.Hashable SearchNamespaceByLowerCaseName_key where
-  hashWithSalt __salt
-    (SearchNamespaceByLowerCaseName_key _name_lowercase _name)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt __salt _name_lowercase)
-        _name
-
-data SearchModuleByLowerCaseName_key = SearchModuleByLowerCaseName_key{searchModuleByLowerCaseName_key_name_lowercase
-                                                                       :: Text.Text,
-                                                                       searchModuleByLowerCaseName_key_name
-                                                                       :: Text.Text}
-                                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchModuleByLowerCaseName_key where
-  toJSON
-    (SearchModuleByLowerCaseName_key __field__name_lowercase
-       __field__name)
-    = Aeson.object
-        ("name_lowercase" .= __field__name_lowercase :
-           "name" .= __field__name : Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchModuleByLowerCaseName_key where
-  buildStruct _proxy
-    (SearchModuleByLowerCaseName_key __field__name_lowercase
-       __field__name)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name_lowercase"
-           (Thrift.getStringType _proxy)
-           1
-           0
-           (Thrift.genText _proxy __field__name_lowercase)
-           :
-           Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 2 1
-             (Thrift.genText _proxy __field__name)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name_lowercase <- ST.newSTRef ""
-            __field__name <- ST.newSTRef ""
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__name_lowercase
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name_lowercase <- ST.readSTRef
-                                                                         __field__name_lowercase
-                                             !__val__name <- ST.readSTRef __field__name
-                                             Prelude.pure
-                                               (SearchModuleByLowerCaseName_key
-                                                  __val__name_lowercase
-                                                  __val__name)
-              _idMap = HashMap.fromList [("name_lowercase", 1), ("name", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchModuleByLowerCaseName_key where
-  rnf
-    (SearchModuleByLowerCaseName_key __field__name_lowercase
-       __field__name)
-    = DeepSeq.rnf __field__name_lowercase `Prelude.seq`
-        DeepSeq.rnf __field__name `Prelude.seq` ()
-
-instance Default.Default SearchModuleByLowerCaseName_key where
-  def = SearchModuleByLowerCaseName_key "" ""
-
-instance Hashable.Hashable SearchModuleByLowerCaseName_key where
-  hashWithSalt __salt
-    (SearchModuleByLowerCaseName_key _name_lowercase _name)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt __salt _name_lowercase)
-        _name
-
-data SearchMethodByLowerCaseName_key = SearchMethodByLowerCaseName_key{searchMethodByLowerCaseName_key_name_lowercase
-                                                                       :: Text.Text,
-                                                                       searchMethodByLowerCaseName_key_name
-                                                                       :: Text.Text}
-                                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchMethodByLowerCaseName_key where
-  toJSON
-    (SearchMethodByLowerCaseName_key __field__name_lowercase
-       __field__name)
-    = Aeson.object
-        ("name_lowercase" .= __field__name_lowercase :
-           "name" .= __field__name : Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchMethodByLowerCaseName_key where
-  buildStruct _proxy
-    (SearchMethodByLowerCaseName_key __field__name_lowercase
-       __field__name)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name_lowercase"
-           (Thrift.getStringType _proxy)
-           1
-           0
-           (Thrift.genText _proxy __field__name_lowercase)
-           :
-           Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 2 1
-             (Thrift.genText _proxy __field__name)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name_lowercase <- ST.newSTRef ""
-            __field__name <- ST.newSTRef ""
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__name_lowercase
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name_lowercase <- ST.readSTRef
-                                                                         __field__name_lowercase
-                                             !__val__name <- ST.readSTRef __field__name
-                                             Prelude.pure
-                                               (SearchMethodByLowerCaseName_key
-                                                  __val__name_lowercase
-                                                  __val__name)
-              _idMap = HashMap.fromList [("name_lowercase", 1), ("name", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchMethodByLowerCaseName_key where
-  rnf
-    (SearchMethodByLowerCaseName_key __field__name_lowercase
-       __field__name)
-    = DeepSeq.rnf __field__name_lowercase `Prelude.seq`
-        DeepSeq.rnf __field__name `Prelude.seq` ()
-
-instance Default.Default SearchMethodByLowerCaseName_key where
-  def = SearchMethodByLowerCaseName_key "" ""
-
-instance Hashable.Hashable SearchMethodByLowerCaseName_key where
-  hashWithSalt __salt
-    (SearchMethodByLowerCaseName_key _name_lowercase _name)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt __salt _name_lowercase)
-        _name
-
-data SearchInterfaceByLowerCaseName_key = SearchInterfaceByLowerCaseName_key{searchInterfaceByLowerCaseName_key_name_lowercase
-                                                                             :: Text.Text,
-                                                                             searchInterfaceByLowerCaseName_key_name
-                                                                             :: Text.Text}
-                                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchInterfaceByLowerCaseName_key where
-  toJSON
-    (SearchInterfaceByLowerCaseName_key __field__name_lowercase
-       __field__name)
-    = Aeson.object
-        ("name_lowercase" .= __field__name_lowercase :
-           "name" .= __field__name : Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchInterfaceByLowerCaseName_key
-         where
-  buildStruct _proxy
-    (SearchInterfaceByLowerCaseName_key __field__name_lowercase
-       __field__name)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name_lowercase"
-           (Thrift.getStringType _proxy)
-           1
-           0
-           (Thrift.genText _proxy __field__name_lowercase)
-           :
-           Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 2 1
-             (Thrift.genText _proxy __field__name)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name_lowercase <- ST.newSTRef ""
-            __field__name <- ST.newSTRef ""
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__name_lowercase
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name_lowercase <- ST.readSTRef
-                                                                         __field__name_lowercase
-                                             !__val__name <- ST.readSTRef __field__name
-                                             Prelude.pure
-                                               (SearchInterfaceByLowerCaseName_key
-                                                  __val__name_lowercase
-                                                  __val__name)
-              _idMap = HashMap.fromList [("name_lowercase", 1), ("name", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchInterfaceByLowerCaseName_key where
-  rnf
-    (SearchInterfaceByLowerCaseName_key __field__name_lowercase
-       __field__name)
-    = DeepSeq.rnf __field__name_lowercase `Prelude.seq`
-        DeepSeq.rnf __field__name `Prelude.seq` ()
-
-instance Default.Default SearchInterfaceByLowerCaseName_key where
-  def = SearchInterfaceByLowerCaseName_key "" ""
-
-instance Hashable.Hashable SearchInterfaceByLowerCaseName_key where
-  hashWithSalt __salt
-    (SearchInterfaceByLowerCaseName_key _name_lowercase _name)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt __salt _name_lowercase)
-        _name
-
-data SearchGlobalConstByLowerCaseName_key = SearchGlobalConstByLowerCaseName_key{searchGlobalConstByLowerCaseName_key_name_lowercase
-                                                                                 :: Text.Text,
-                                                                                 searchGlobalConstByLowerCaseName_key_name
-                                                                                 :: Text.Text}
-                                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchGlobalConstByLowerCaseName_key where
-  toJSON
-    (SearchGlobalConstByLowerCaseName_key __field__name_lowercase
-       __field__name)
-    = Aeson.object
-        ("name_lowercase" .= __field__name_lowercase :
-           "name" .= __field__name : Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchGlobalConstByLowerCaseName_key
-         where
-  buildStruct _proxy
-    (SearchGlobalConstByLowerCaseName_key __field__name_lowercase
-       __field__name)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name_lowercase"
-           (Thrift.getStringType _proxy)
-           1
-           0
-           (Thrift.genText _proxy __field__name_lowercase)
-           :
-           Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 2 1
-             (Thrift.genText _proxy __field__name)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name_lowercase <- ST.newSTRef ""
-            __field__name <- ST.newSTRef ""
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__name_lowercase
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name_lowercase <- ST.readSTRef
-                                                                         __field__name_lowercase
-                                             !__val__name <- ST.readSTRef __field__name
-                                             Prelude.pure
-                                               (SearchGlobalConstByLowerCaseName_key
-                                                  __val__name_lowercase
-                                                  __val__name)
-              _idMap = HashMap.fromList [("name_lowercase", 1), ("name", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchGlobalConstByLowerCaseName_key where
-  rnf
-    (SearchGlobalConstByLowerCaseName_key __field__name_lowercase
-       __field__name)
-    = DeepSeq.rnf __field__name_lowercase `Prelude.seq`
-        DeepSeq.rnf __field__name `Prelude.seq` ()
-
-instance Default.Default SearchGlobalConstByLowerCaseName_key where
-  def = SearchGlobalConstByLowerCaseName_key "" ""
-
-instance Hashable.Hashable SearchGlobalConstByLowerCaseName_key
-         where
-  hashWithSalt __salt
-    (SearchGlobalConstByLowerCaseName_key _name_lowercase _name)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt __salt _name_lowercase)
-        _name
-
-data SearchFunctionByLowerCaseName_key = SearchFunctionByLowerCaseName_key{searchFunctionByLowerCaseName_key_name_lowercase
-                                                                           :: Text.Text,
-                                                                           searchFunctionByLowerCaseName_key_name
-                                                                           :: Text.Text}
-                                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchFunctionByLowerCaseName_key where
-  toJSON
-    (SearchFunctionByLowerCaseName_key __field__name_lowercase
-       __field__name)
-    = Aeson.object
-        ("name_lowercase" .= __field__name_lowercase :
-           "name" .= __field__name : Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchFunctionByLowerCaseName_key
-         where
-  buildStruct _proxy
-    (SearchFunctionByLowerCaseName_key __field__name_lowercase
-       __field__name)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name_lowercase"
-           (Thrift.getStringType _proxy)
-           1
-           0
-           (Thrift.genText _proxy __field__name_lowercase)
-           :
-           Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 2 1
-             (Thrift.genText _proxy __field__name)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name_lowercase <- ST.newSTRef ""
-            __field__name <- ST.newSTRef ""
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__name_lowercase
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name_lowercase <- ST.readSTRef
-                                                                         __field__name_lowercase
-                                             !__val__name <- ST.readSTRef __field__name
-                                             Prelude.pure
-                                               (SearchFunctionByLowerCaseName_key
-                                                  __val__name_lowercase
-                                                  __val__name)
-              _idMap = HashMap.fromList [("name_lowercase", 1), ("name", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchFunctionByLowerCaseName_key where
-  rnf
-    (SearchFunctionByLowerCaseName_key __field__name_lowercase
-       __field__name)
-    = DeepSeq.rnf __field__name_lowercase `Prelude.seq`
-        DeepSeq.rnf __field__name `Prelude.seq` ()
-
-instance Default.Default SearchFunctionByLowerCaseName_key where
-  def = SearchFunctionByLowerCaseName_key "" ""
-
-instance Hashable.Hashable SearchFunctionByLowerCaseName_key where
-  hashWithSalt __salt
-    (SearchFunctionByLowerCaseName_key _name_lowercase _name)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt __salt _name_lowercase)
-        _name
-
-data SearchEnumeratorByLowerCaseName_key = SearchEnumeratorByLowerCaseName_key{searchEnumeratorByLowerCaseName_key_name_lowercase
-                                                                               :: Text.Text,
-                                                                               searchEnumeratorByLowerCaseName_key_name
-                                                                               :: Text.Text}
-                                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchEnumeratorByLowerCaseName_key where
-  toJSON
-    (SearchEnumeratorByLowerCaseName_key __field__name_lowercase
-       __field__name)
-    = Aeson.object
-        ("name_lowercase" .= __field__name_lowercase :
-           "name" .= __field__name : Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchEnumeratorByLowerCaseName_key
-         where
-  buildStruct _proxy
-    (SearchEnumeratorByLowerCaseName_key __field__name_lowercase
-       __field__name)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name_lowercase"
-           (Thrift.getStringType _proxy)
-           1
-           0
-           (Thrift.genText _proxy __field__name_lowercase)
-           :
-           Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 2 1
-             (Thrift.genText _proxy __field__name)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name_lowercase <- ST.newSTRef ""
-            __field__name <- ST.newSTRef ""
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__name_lowercase
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name_lowercase <- ST.readSTRef
-                                                                         __field__name_lowercase
-                                             !__val__name <- ST.readSTRef __field__name
-                                             Prelude.pure
-                                               (SearchEnumeratorByLowerCaseName_key
-                                                  __val__name_lowercase
-                                                  __val__name)
-              _idMap = HashMap.fromList [("name_lowercase", 1), ("name", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchEnumeratorByLowerCaseName_key where
-  rnf
-    (SearchEnumeratorByLowerCaseName_key __field__name_lowercase
-       __field__name)
-    = DeepSeq.rnf __field__name_lowercase `Prelude.seq`
-        DeepSeq.rnf __field__name `Prelude.seq` ()
-
-instance Default.Default SearchEnumeratorByLowerCaseName_key where
-  def = SearchEnumeratorByLowerCaseName_key "" ""
-
-instance Hashable.Hashable SearchEnumeratorByLowerCaseName_key
-         where
-  hashWithSalt __salt
-    (SearchEnumeratorByLowerCaseName_key _name_lowercase _name)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt __salt _name_lowercase)
-        _name
-
-data SearchEnumByLowerCaseName_key = SearchEnumByLowerCaseName_key{searchEnumByLowerCaseName_key_name_lowercase
-                                                                   :: Text.Text,
-                                                                   searchEnumByLowerCaseName_key_name
-                                                                   :: Text.Text}
-                                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchEnumByLowerCaseName_key where
-  toJSON
-    (SearchEnumByLowerCaseName_key __field__name_lowercase
-       __field__name)
-    = Aeson.object
-        ("name_lowercase" .= __field__name_lowercase :
-           "name" .= __field__name : Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchEnumByLowerCaseName_key where
-  buildStruct _proxy
-    (SearchEnumByLowerCaseName_key __field__name_lowercase
-       __field__name)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name_lowercase"
-           (Thrift.getStringType _proxy)
-           1
-           0
-           (Thrift.genText _proxy __field__name_lowercase)
-           :
-           Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 2 1
-             (Thrift.genText _proxy __field__name)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name_lowercase <- ST.newSTRef ""
-            __field__name <- ST.newSTRef ""
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__name_lowercase
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name_lowercase <- ST.readSTRef
-                                                                         __field__name_lowercase
-                                             !__val__name <- ST.readSTRef __field__name
-                                             Prelude.pure
-                                               (SearchEnumByLowerCaseName_key __val__name_lowercase
-                                                  __val__name)
-              _idMap = HashMap.fromList [("name_lowercase", 1), ("name", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchEnumByLowerCaseName_key where
-  rnf
-    (SearchEnumByLowerCaseName_key __field__name_lowercase
-       __field__name)
-    = DeepSeq.rnf __field__name_lowercase `Prelude.seq`
-        DeepSeq.rnf __field__name `Prelude.seq` ()
-
-instance Default.Default SearchEnumByLowerCaseName_key where
-  def = SearchEnumByLowerCaseName_key "" ""
-
-instance Hashable.Hashable SearchEnumByLowerCaseName_key where
-  hashWithSalt __salt
-    (SearchEnumByLowerCaseName_key _name_lowercase _name)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt __salt _name_lowercase)
-        _name
-
-data SearchClassConstByLowerCaseName_key = SearchClassConstByLowerCaseName_key{searchClassConstByLowerCaseName_key_name_lowercase
-                                                                               :: Text.Text,
-                                                                               searchClassConstByLowerCaseName_key_name
-                                                                               :: Text.Text}
-                                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchClassConstByLowerCaseName_key where
-  toJSON
-    (SearchClassConstByLowerCaseName_key __field__name_lowercase
-       __field__name)
-    = Aeson.object
-        ("name_lowercase" .= __field__name_lowercase :
-           "name" .= __field__name : Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchClassConstByLowerCaseName_key
-         where
-  buildStruct _proxy
-    (SearchClassConstByLowerCaseName_key __field__name_lowercase
-       __field__name)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name_lowercase"
-           (Thrift.getStringType _proxy)
-           1
-           0
-           (Thrift.genText _proxy __field__name_lowercase)
-           :
-           Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 2 1
-             (Thrift.genText _proxy __field__name)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name_lowercase <- ST.newSTRef ""
-            __field__name <- ST.newSTRef ""
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__name_lowercase
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name_lowercase <- ST.readSTRef
-                                                                         __field__name_lowercase
-                                             !__val__name <- ST.readSTRef __field__name
-                                             Prelude.pure
-                                               (SearchClassConstByLowerCaseName_key
-                                                  __val__name_lowercase
-                                                  __val__name)
-              _idMap = HashMap.fromList [("name_lowercase", 1), ("name", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchClassConstByLowerCaseName_key where
-  rnf
-    (SearchClassConstByLowerCaseName_key __field__name_lowercase
-       __field__name)
-    = DeepSeq.rnf __field__name_lowercase `Prelude.seq`
-        DeepSeq.rnf __field__name `Prelude.seq` ()
-
-instance Default.Default SearchClassConstByLowerCaseName_key where
-  def = SearchClassConstByLowerCaseName_key "" ""
-
-instance Hashable.Hashable SearchClassConstByLowerCaseName_key
-         where
-  hashWithSalt __salt
-    (SearchClassConstByLowerCaseName_key _name_lowercase _name)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt __salt _name_lowercase)
-        _name
-
-data SearchClassByLowerCaseName_key = SearchClassByLowerCaseName_key{searchClassByLowerCaseName_key_name_lowercase
-                                                                     :: Text.Text,
-                                                                     searchClassByLowerCaseName_key_name
-                                                                     :: Text.Text}
-                                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchClassByLowerCaseName_key where
-  toJSON
-    (SearchClassByLowerCaseName_key __field__name_lowercase
-       __field__name)
-    = Aeson.object
-        ("name_lowercase" .= __field__name_lowercase :
-           "name" .= __field__name : Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchClassByLowerCaseName_key where
-  buildStruct _proxy
-    (SearchClassByLowerCaseName_key __field__name_lowercase
-       __field__name)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name_lowercase"
-           (Thrift.getStringType _proxy)
-           1
-           0
-           (Thrift.genText _proxy __field__name_lowercase)
-           :
-           Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 2 1
-             (Thrift.genText _proxy __field__name)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name_lowercase <- ST.newSTRef ""
-            __field__name <- ST.newSTRef ""
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__name_lowercase
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name_lowercase <- ST.readSTRef
-                                                                         __field__name_lowercase
-                                             !__val__name <- ST.readSTRef __field__name
-                                             Prelude.pure
-                                               (SearchClassByLowerCaseName_key __val__name_lowercase
-                                                  __val__name)
-              _idMap = HashMap.fromList [("name_lowercase", 1), ("name", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchClassByLowerCaseName_key where
-  rnf
-    (SearchClassByLowerCaseName_key __field__name_lowercase
-       __field__name)
-    = DeepSeq.rnf __field__name_lowercase `Prelude.seq`
-        DeepSeq.rnf __field__name `Prelude.seq` ()
-
-instance Default.Default SearchClassByLowerCaseName_key where
-  def = SearchClassByLowerCaseName_key "" ""
-
-instance Hashable.Hashable SearchClassByLowerCaseName_key where
-  hashWithSalt __salt
-    (SearchClassByLowerCaseName_key _name_lowercase _name)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt __salt _name_lowercase)
-        _name
-
-data ReifyKind = ReifyKind_Erased
-               | ReifyKind_Reified
-               | ReifyKind_SoftReified
-               | ReifyKind__UNKNOWN Prelude.Int
-                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ReifyKind where
-  toJSON = Aeson.toJSON . Thrift.fromThriftEnum
-
-instance DeepSeq.NFData ReifyKind where
-  rnf __ReifyKind = Prelude.seq __ReifyKind ()
-
-instance Default.Default ReifyKind where
-  def = ReifyKind_Erased
-
-instance Hashable.Hashable ReifyKind where
-  hashWithSalt _salt _val
-    = Hashable.hashWithSalt _salt (Thrift.fromThriftEnum _val)
-
-instance Thrift.ThriftEnum ReifyKind where
-  toThriftEnum 0 = ReifyKind_Erased
-  toThriftEnum 1 = ReifyKind_Reified
-  toThriftEnum 2 = ReifyKind_SoftReified
-  toThriftEnum val = ReifyKind__UNKNOWN val
-  fromThriftEnum ReifyKind_Erased = 0
-  fromThriftEnum ReifyKind_Reified = 1
-  fromThriftEnum ReifyKind_SoftReified = 2
-  fromThriftEnum (ReifyKind__UNKNOWN val) = val
-  allThriftEnumValues
-    = [ReifyKind_Erased, ReifyKind_Reified, ReifyKind_SoftReified]
-  toThriftEnumEither 0 = Prelude.Right ReifyKind_Erased
-  toThriftEnumEither 1 = Prelude.Right ReifyKind_Reified
-  toThriftEnumEither 2 = Prelude.Right ReifyKind_SoftReified
-  toThriftEnumEither val
-    = Prelude.Left
-        ("toThriftEnumEither: not a valid identifier for enum ReifyKind: "
-           ++ Prelude.show val)
-
-data ReadonlyKind = ReadonlyKind_Readonly
-                  | ReadonlyKind__UNKNOWN Prelude.Int
-                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ReadonlyKind where
-  toJSON = Aeson.toJSON . Thrift.fromThriftEnum
-
-instance DeepSeq.NFData ReadonlyKind where
-  rnf __ReadonlyKind = Prelude.seq __ReadonlyKind ()
-
-instance Default.Default ReadonlyKind where
-  def = ReadonlyKind_Readonly
-
-instance Hashable.Hashable ReadonlyKind where
-  hashWithSalt _salt _val
-    = Hashable.hashWithSalt _salt (Thrift.fromThriftEnum _val)
-
-instance Thrift.ThriftEnum ReadonlyKind where
-  toThriftEnum 0 = ReadonlyKind_Readonly
-  toThriftEnum val = ReadonlyKind__UNKNOWN val
-  fromThriftEnum ReadonlyKind_Readonly = 0
-  fromThriftEnum (ReadonlyKind__UNKNOWN val) = val
-  allThriftEnumValues = [ReadonlyKind_Readonly]
-  toThriftEnumEither 0 = Prelude.Right ReadonlyKind_Readonly
-  toThriftEnumEither val
-    = Prelude.Left
-        ("toThriftEnumEither: not a valid identifier for enum ReadonlyKind: "
-           ++ Prelude.show val)
-
-data QName_key = QName_key{qName_key_name :: Name,
-                           qName_key_namespace_ :: Prelude.Maybe NamespaceQName}
-                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON QName_key where
-  toJSON (QName_key __field__name __field__namespace_)
-    = Aeson.object
-        ("name" .= __field__name :
-           Prelude.maybe Prelude.id ((:) . ("namespace_" .=))
-             __field__namespace_
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct QName_key where
-  buildStruct _proxy (QName_key __field__name __field__namespace_)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__name)
-           :
-           case __field__namespace_ of
-             Prelude.Just _val -> Thrift.genField _proxy "namespace_"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef Default.def
-            __field__namespace_ <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__namespace_
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__namespace_ <- ST.readSTRef __field__namespace_
-                                             Prelude.pure (QName_key __val__name __val__namespace_)
-              _idMap = HashMap.fromList [("name", 1), ("namespace_", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData QName_key where
-  rnf (QName_key __field__name __field__namespace_)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__namespace_ `Prelude.seq` ()
-
-instance Default.Default QName_key where
-  def = QName_key Default.def Prelude.Nothing
-
-instance Hashable.Hashable QName_key where
-  hashWithSalt __salt (QName_key _name _namespace_)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-        _namespace_
-
-data PropertyDefinition_key = PropertyDefinition_key{propertyDefinition_key_declaration
-                                                     :: PropertyDeclaration,
-                                                     propertyDefinition_key_type ::
-                                                     Prelude.Maybe Type,
-                                                     propertyDefinition_key_visibility ::
-                                                     Visibility,
-                                                     propertyDefinition_key_isFinal :: Prelude.Bool,
-                                                     propertyDefinition_key_isAbstract ::
-                                                     Prelude.Bool,
-                                                     propertyDefinition_key_isStatic ::
-                                                     Prelude.Bool,
-                                                     propertyDefinition_key_attributes ::
-                                                     [UserAttribute],
-                                                     propertyDefinition_key_typeInfo ::
-                                                     Prelude.Maybe TypeInfo}
-                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON PropertyDefinition_key where
-  toJSON
-    (PropertyDefinition_key __field__declaration __field__type
-       __field__visibility __field__isFinal __field__isAbstract
-       __field__isStatic __field__attributes __field__typeInfo)
-    = Aeson.object
-        ("declaration" .= __field__declaration :
-           Prelude.maybe Prelude.id ((:) . ("type" .=)) __field__type
-             ("visibility" .= __field__visibility :
-                "isFinal" .= __field__isFinal :
-                  "isAbstract" .= __field__isAbstract :
-                    "isStatic" .= __field__isStatic :
-                      "attributes" .= __field__attributes :
-                        Prelude.maybe Prelude.id ((:) . ("typeInfo" .=)) __field__typeInfo
-                          Prelude.mempty))
-
-instance Thrift.ThriftStruct PropertyDefinition_key where
-  buildStruct _proxy
-    (PropertyDefinition_key __field__declaration __field__type
-       __field__visibility __field__isFinal __field__isAbstract
-       __field__isStatic __field__attributes __field__typeInfo)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "declaration" (Thrift.getStructType _proxy)
-           1
-           0
-           (Thrift.buildStruct _proxy __field__declaration)
-           :
-           let (__cereal__type, __id__type)
-                 = case __field__type of
-                     Prelude.Just _val -> ((:)
-                                             (Thrift.genField _proxy "type"
-                                                (Thrift.getStructType _proxy)
-                                                2
-                                                1
-                                                (Thrift.buildStruct _proxy _val)),
-                                           2)
-                     Prelude.Nothing -> (Prelude.id, 1)
-             in
-             __cereal__type
-               (Thrift.genField _proxy "visibility" (Thrift.getI32Type _proxy) 3
-                  __id__type
-                  ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                      Thrift.fromThriftEnum)
-                     __field__visibility)
-                  :
-                  Thrift.genFieldBool _proxy "isFinal" 4 3 __field__isFinal :
-                    Thrift.genFieldBool _proxy "isAbstract" 5 4 __field__isAbstract :
-                      Thrift.genFieldBool _proxy "isStatic" 6 5 __field__isStatic :
-                        Thrift.genField _proxy "attributes" (Thrift.getListType _proxy) 7 6
-                          (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                             (Thrift.buildStruct _proxy)
-                             __field__attributes)
-                          :
-                          case __field__typeInfo of
-                            Prelude.Just _val -> Thrift.genField _proxy "typeInfo"
-                                                   (Thrift.getStructType _proxy)
-                                                   8
-                                                   7
-                                                   (Thrift.buildStruct _proxy _val)
-                                                   : []
-                            Prelude.Nothing -> []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__declaration <- ST.newSTRef Default.def
-            __field__type <- ST.newSTRef Prelude.Nothing
-            __field__visibility <- ST.newSTRef Default.def
-            __field__isFinal <- ST.newSTRef Prelude.False
-            __field__isAbstract <- ST.newSTRef Prelude.False
-            __field__isStatic <- ST.newSTRef Prelude.False
-            __field__attributes <- ST.newSTRef Default.def
-            __field__typeInfo <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__declaration
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__type
-                                                                          (Prelude.Just _val)
-                                                                 3 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "Visibility")
-                                                                        ST.writeSTRef
-                                                                          __field__visibility
-                                                                          _val
-                                                                 4 | _type ==
-                                                                       Thrift.getBoolType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseBoolF
-                                                                                      _proxy
-                                                                                      _bool)
-                                                                        ST.writeSTRef
-                                                                          __field__isFinal
-                                                                          _val
-                                                                 5 | _type ==
-                                                                       Thrift.getBoolType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseBoolF
-                                                                                      _proxy
-                                                                                      _bool)
-                                                                        ST.writeSTRef
-                                                                          __field__isAbstract
-                                                                          _val
-                                                                 6 | _type ==
-                                                                       Thrift.getBoolType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseBoolF
-                                                                                      _proxy
-                                                                                      _bool)
-                                                                        ST.writeSTRef
-                                                                          __field__isStatic
-                                                                          _val
-                                                                 7 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__attributes
-                                                                          _val
-                                                                 8 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__typeInfo
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__declaration <- ST.readSTRef
-                                                                      __field__declaration
-                                             !__val__type <- ST.readSTRef __field__type
-                                             !__val__visibility <- ST.readSTRef __field__visibility
-                                             !__val__isFinal <- ST.readSTRef __field__isFinal
-                                             !__val__isAbstract <- ST.readSTRef __field__isAbstract
-                                             !__val__isStatic <- ST.readSTRef __field__isStatic
-                                             !__val__attributes <- ST.readSTRef __field__attributes
-                                             !__val__typeInfo <- ST.readSTRef __field__typeInfo
-                                             Prelude.pure
-                                               (PropertyDefinition_key __val__declaration
-                                                  __val__type
-                                                  __val__visibility
-                                                  __val__isFinal
-                                                  __val__isAbstract
-                                                  __val__isStatic
-                                                  __val__attributes
-                                                  __val__typeInfo)
-              _idMap
-                = HashMap.fromList
-                    [("declaration", 1), ("type", 2), ("visibility", 3),
-                     ("isFinal", 4), ("isAbstract", 5), ("isStatic", 6),
-                     ("attributes", 7), ("typeInfo", 8)]
-            _parse 0)
-
-instance DeepSeq.NFData PropertyDefinition_key where
-  rnf
-    (PropertyDefinition_key __field__declaration __field__type
-       __field__visibility __field__isFinal __field__isAbstract
-       __field__isStatic __field__attributes __field__typeInfo)
-    = DeepSeq.rnf __field__declaration `Prelude.seq`
-        DeepSeq.rnf __field__type `Prelude.seq`
-          DeepSeq.rnf __field__visibility `Prelude.seq`
-            DeepSeq.rnf __field__isFinal `Prelude.seq`
-              DeepSeq.rnf __field__isAbstract `Prelude.seq`
-                DeepSeq.rnf __field__isStatic `Prelude.seq`
-                  DeepSeq.rnf __field__attributes `Prelude.seq`
-                    DeepSeq.rnf __field__typeInfo `Prelude.seq` ()
-
-instance Default.Default PropertyDefinition_key where
-  def
-    = PropertyDefinition_key Default.def Prelude.Nothing Default.def
-        Prelude.False
-        Prelude.False
-        Prelude.False
-        Default.def
-        Prelude.Nothing
-
-instance Hashable.Hashable PropertyDefinition_key where
-  hashWithSalt __salt
-    (PropertyDefinition_key _declaration _type _visibility _isFinal
-       _isAbstract _isStatic _attributes _typeInfo)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt
-              (Hashable.hashWithSalt
-                 (Hashable.hashWithSalt
-                    (Hashable.hashWithSalt
-                       (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _declaration)
-                          _type)
-                       _visibility)
-                    _isFinal)
-                 _isAbstract)
-              _isStatic)
-           _attributes)
-        _typeInfo
-
-data Parameter = Parameter{parameter_name :: Name,
-                           parameter_type :: Prelude.Maybe Type,
-                           parameter_isInout :: Prelude.Bool,
-                           parameter_isVariadic :: Prelude.Bool,
-                           parameter_defaultValue :: Prelude.Maybe Text.Text,
-                           parameter_attributes :: [UserAttribute],
-                           parameter_typeInfo :: Prelude.Maybe TypeInfo,
-                           parameter_readonly :: Prelude.Maybe ReadonlyKind}
-                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Parameter where
-  toJSON
-    (Parameter __field__name __field__type __field__isInout
-       __field__isVariadic __field__defaultValue __field__attributes
-       __field__typeInfo __field__readonly)
-    = Aeson.object
-        ("name" .= __field__name :
-           Prelude.maybe Prelude.id ((:) . ("type" .=)) __field__type
-             ("isInout" .= __field__isInout :
-                "isVariadic" .= __field__isVariadic :
-                  Prelude.maybe Prelude.id ((:) . ("defaultValue" .=))
-                    __field__defaultValue
-                    ("attributes" .= __field__attributes :
-                       Prelude.maybe Prelude.id ((:) . ("typeInfo" .=)) __field__typeInfo
-                         (Prelude.maybe Prelude.id ((:) . ("readonly" .=)) __field__readonly
-                            Prelude.mempty))))
-
-instance Thrift.ThriftStruct Parameter where
-  buildStruct _proxy
-    (Parameter __field__name __field__type __field__isInout
-       __field__isVariadic __field__defaultValue __field__attributes
-       __field__typeInfo __field__readonly)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__name)
-           :
-           let (__cereal__type, __id__type)
-                 = case __field__type of
-                     Prelude.Just _val -> ((:)
-                                             (Thrift.genField _proxy "type"
-                                                (Thrift.getStructType _proxy)
-                                                2
-                                                1
-                                                (Thrift.buildStruct _proxy _val)),
-                                           2)
-                     Prelude.Nothing -> (Prelude.id, 1)
-             in
-             __cereal__type
-               (Thrift.genFieldBool _proxy "isInout" 3 __id__type __field__isInout
-                  :
-                  Thrift.genFieldBool _proxy "isVariadic" 4 3 __field__isVariadic :
-                    let (__cereal__defaultValue, __id__defaultValue)
-                          = case __field__defaultValue of
-                              Prelude.Just _val -> ((:)
-                                                      (Thrift.genField _proxy "defaultValue"
-                                                         (Thrift.getStringType _proxy)
-                                                         5
-                                                         4
-                                                         (Thrift.genText _proxy _val)),
-                                                    5)
-                              Prelude.Nothing -> (Prelude.id, 4)
-                      in
-                      __cereal__defaultValue
-                        (Thrift.genField _proxy "attributes" (Thrift.getListType _proxy) 6
-                           __id__defaultValue
-                           (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                              (Thrift.buildStruct _proxy)
-                              __field__attributes)
-                           :
-                           let (__cereal__typeInfo, __id__typeInfo)
-                                 = case __field__typeInfo of
-                                     Prelude.Just _val -> ((:)
-                                                             (Thrift.genField _proxy "typeInfo"
-                                                                (Thrift.getStructType _proxy)
-                                                                7
-                                                                6
-                                                                (Thrift.buildStruct _proxy _val)),
-                                                           7)
-                                     Prelude.Nothing -> (Prelude.id, 6)
-                             in
-                             __cereal__typeInfo
-                               (case __field__readonly of
-                                  Prelude.Just _val -> Thrift.genField _proxy "readonly"
-                                                         (Thrift.getI32Type _proxy)
-                                                         8
-                                                         __id__typeInfo
-                                                         ((Thrift.genI32 _proxy .
-                                                             Prelude.fromIntegral
-                                                             . Thrift.fromThriftEnum)
-                                                            _val)
-                                                         : []
-                                  Prelude.Nothing -> []))))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef Default.def
-            __field__type <- ST.newSTRef Prelude.Nothing
-            __field__isInout <- ST.newSTRef Prelude.False
-            __field__isVariadic <- ST.newSTRef Prelude.False
-            __field__defaultValue <- ST.newSTRef Prelude.Nothing
-            __field__attributes <- ST.newSTRef Default.def
-            __field__typeInfo <- ST.newSTRef Prelude.Nothing
-            __field__readonly <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__type
-                                                                          (Prelude.Just _val)
-                                                                 3 | _type ==
-                                                                       Thrift.getBoolType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseBoolF
-                                                                                      _proxy
-                                                                                      _bool)
-                                                                        ST.writeSTRef
-                                                                          __field__isInout
-                                                                          _val
-                                                                 4 | _type ==
-                                                                       Thrift.getBoolType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseBoolF
-                                                                                      _proxy
-                                                                                      _bool)
-                                                                        ST.writeSTRef
-                                                                          __field__isVariadic
-                                                                          _val
-                                                                 5 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__defaultValue
-                                                                          (Prelude.Just _val)
-                                                                 6 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__attributes
-                                                                          _val
-                                                                 7 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__typeInfo
-                                                                          (Prelude.Just _val)
-                                                                 8 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "ReadonlyKind")
-                                                                        ST.writeSTRef
-                                                                          __field__readonly
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__type <- ST.readSTRef __field__type
-                                             !__val__isInout <- ST.readSTRef __field__isInout
-                                             !__val__isVariadic <- ST.readSTRef __field__isVariadic
-                                             !__val__defaultValue <- ST.readSTRef
-                                                                       __field__defaultValue
-                                             !__val__attributes <- ST.readSTRef __field__attributes
-                                             !__val__typeInfo <- ST.readSTRef __field__typeInfo
-                                             !__val__readonly <- ST.readSTRef __field__readonly
-                                             Prelude.pure
-                                               (Parameter __val__name __val__type __val__isInout
-                                                  __val__isVariadic
-                                                  __val__defaultValue
-                                                  __val__attributes
-                                                  __val__typeInfo
-                                                  __val__readonly)
-              _idMap
-                = HashMap.fromList
-                    [("name", 1), ("type", 2), ("isInout", 3), ("isVariadic", 4),
-                     ("defaultValue", 5), ("attributes", 6), ("typeInfo", 7),
-                     ("readonly", 8)]
-            _parse 0)
-
-instance DeepSeq.NFData Parameter where
-  rnf
-    (Parameter __field__name __field__type __field__isInout
-       __field__isVariadic __field__defaultValue __field__attributes
-       __field__typeInfo __field__readonly)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__type `Prelude.seq`
-          DeepSeq.rnf __field__isInout `Prelude.seq`
-            DeepSeq.rnf __field__isVariadic `Prelude.seq`
-              DeepSeq.rnf __field__defaultValue `Prelude.seq`
-                DeepSeq.rnf __field__attributes `Prelude.seq`
-                  DeepSeq.rnf __field__typeInfo `Prelude.seq`
-                    DeepSeq.rnf __field__readonly `Prelude.seq` ()
-
-instance Default.Default Parameter where
-  def
-    = Parameter Default.def Prelude.Nothing Prelude.False Prelude.False
-        Prelude.Nothing
-        Default.def
-        Prelude.Nothing
-        Prelude.Nothing
-
-instance Hashable.Hashable Parameter where
-  hashWithSalt __salt
-    (Parameter _name _type _isInout _isVariadic _defaultValue
-       _attributes _typeInfo _readonly)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt
-              (Hashable.hashWithSalt
-                 (Hashable.hashWithSalt
-                    (Hashable.hashWithSalt
-                       (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _type)
-                       _isInout)
-                    _isVariadic)
-                 _defaultValue)
-              _attributes)
-           _typeInfo)
-        _readonly
-
-data Signature_key = Signature_key{signature_key_returns ::
-                                   Prelude.Maybe Type,
-                                   signature_key_parameters :: [Parameter],
-                                   signature_key_contexts :: Prelude.Maybe [Context_],
-                                   signature_key_returnsTypeInfo :: Prelude.Maybe TypeInfo}
-                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Signature_key where
-  toJSON
-    (Signature_key __field__returns __field__parameters
-       __field__contexts __field__returnsTypeInfo)
-    = Aeson.object
-        (Prelude.maybe Prelude.id ((:) . ("returns" .=)) __field__returns
-           ("parameters" .= __field__parameters :
-              Prelude.maybe Prelude.id ((:) . ("contexts" .=)) __field__contexts
-                (Prelude.maybe Prelude.id ((:) . ("returnsTypeInfo" .=))
-                   __field__returnsTypeInfo
-                   Prelude.mempty)))
-
-instance Thrift.ThriftStruct Signature_key where
-  buildStruct _proxy
-    (Signature_key __field__returns __field__parameters
-       __field__contexts __field__returnsTypeInfo)
-    = Thrift.genStruct _proxy
-        (let (__cereal__returns, __id__returns)
-               = case __field__returns of
-                   Prelude.Just _val -> ((:)
-                                           (Thrift.genField _proxy "returns"
-                                              (Thrift.getStructType _proxy)
-                                              1
-                                              0
-                                              (Thrift.buildStruct _proxy _val)),
-                                         1)
-                   Prelude.Nothing -> (Prelude.id, 0)
-           in
-           __cereal__returns
-             (Thrift.genField _proxy "parameters" (Thrift.getListType _proxy) 2
-                __id__returns
-                (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                   (Thrift.buildStruct _proxy)
-                   __field__parameters)
-                :
-                let (__cereal__contexts, __id__contexts)
-                      = case __field__contexts of
-                          Prelude.Just _val -> ((:)
-                                                  (Thrift.genField _proxy "contexts"
-                                                     (Thrift.getListType _proxy)
-                                                     3
-                                                     2
-                                                     (Thrift.genList _proxy
-                                                        (Thrift.getStructType _proxy)
-                                                        (Thrift.buildStruct _proxy)
-                                                        _val)),
-                                                3)
-                          Prelude.Nothing -> (Prelude.id, 2)
-                  in
-                  __cereal__contexts
-                    (case __field__returnsTypeInfo of
-                       Prelude.Just _val -> Thrift.genField _proxy "returnsTypeInfo"
-                                              (Thrift.getStructType _proxy)
-                                              4
-                                              __id__contexts
-                                              (Thrift.buildStruct _proxy _val)
-                                              : []
-                       Prelude.Nothing -> [])))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__returns <- ST.newSTRef Prelude.Nothing
-            __field__parameters <- ST.newSTRef Default.def
-            __field__contexts <- ST.newSTRef Prelude.Nothing
-            __field__returnsTypeInfo <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__returns
-                                                                          (Prelude.Just _val)
-                                                                 2 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__parameters
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__contexts
-                                                                          (Prelude.Just _val)
-                                                                 4 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__returnsTypeInfo
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__returns <- ST.readSTRef
-                                                                  __field__returns
-                                             !__val__parameters <- ST.readSTRef __field__parameters
-                                             !__val__contexts <- ST.readSTRef __field__contexts
-                                             !__val__returnsTypeInfo <- ST.readSTRef
-                                                                          __field__returnsTypeInfo
-                                             Prelude.pure
-                                               (Signature_key __val__returns __val__parameters
-                                                  __val__contexts
-                                                  __val__returnsTypeInfo)
-              _idMap
-                = HashMap.fromList
-                    [("returns", 1), ("parameters", 2), ("contexts", 3),
-                     ("returnsTypeInfo", 4)]
-            _parse 0)
-
-instance DeepSeq.NFData Signature_key where
-  rnf
-    (Signature_key __field__returns __field__parameters
-       __field__contexts __field__returnsTypeInfo)
-    = DeepSeq.rnf __field__returns `Prelude.seq`
-        DeepSeq.rnf __field__parameters `Prelude.seq`
-          DeepSeq.rnf __field__contexts `Prelude.seq`
-            DeepSeq.rnf __field__returnsTypeInfo `Prelude.seq` ()
-
-instance Default.Default Signature_key where
-  def
-    = Signature_key Prelude.Nothing Default.def Prelude.Nothing
-        Prelude.Nothing
-
-instance Hashable.Hashable Signature_key where
-  hashWithSalt __salt
-    (Signature_key _returns _parameters _contexts _returnsTypeInfo)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _returns)
-              _parameters)
-           _contexts)
-        _returnsTypeInfo
-
-data Occurrence = Occurrence_method MethodOccurrence
-                | Occurrence_EMPTY
-                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Occurrence where
-  toJSON (Occurrence_method __method)
-    = Aeson.object ["method" .= __method]
-  toJSON Occurrence_EMPTY = Aeson.object []
-
-instance Thrift.ThriftStruct Occurrence where
-  buildStruct _proxy (Occurrence_method __method)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "method" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __method)]
-  buildStruct _proxy Occurrence_EMPTY = Thrift.genStruct _proxy []
-  parseStruct _proxy
-    = do _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap
-         case _fieldBegin of
-           Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                     1 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return (Occurrence_method _val)
-                                                     _ -> do Thrift.parseSkip _proxy _type
-                                                               Prelude.Nothing
-                                                             Thrift.parseStop _proxy
-                                                             Prelude.return Occurrence_EMPTY
-           Thrift.FieldEnd -> Prelude.return Occurrence_EMPTY
-    where
-      _idMap = HashMap.fromList [("method", 1)]
-
-instance DeepSeq.NFData Occurrence where
-  rnf (Occurrence_method __method) = DeepSeq.rnf __method
-  rnf Occurrence_EMPTY = ()
-
-instance Default.Default Occurrence where
-  def = Occurrence_EMPTY
-
-instance Hashable.Hashable Occurrence where
-  hashWithSalt __salt (Occurrence_method _method)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 1 _method)
-  hashWithSalt __salt Occurrence_EMPTY
-    = Hashable.hashWithSalt __salt (0 :: Prelude.Int)
-
-data NamespaceQName_key = NamespaceQName_key{namespaceQName_key_name
-                                             :: Name,
-                                             namespaceQName_key_parent ::
-                                             Prelude.Maybe NamespaceQName}
-                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON NamespaceQName_key where
-  toJSON (NamespaceQName_key __field__name __field__parent)
-    = Aeson.object
-        ("name" .= __field__name :
-           Prelude.maybe Prelude.id ((:) . ("parent" .=)) __field__parent
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct NamespaceQName_key where
-  buildStruct _proxy
-    (NamespaceQName_key __field__name __field__parent)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__name)
-           :
-           case __field__parent of
-             Prelude.Just _val -> Thrift.genField _proxy "parent"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef Default.def
-            __field__parent <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__parent
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__parent <- ST.readSTRef __field__parent
-                                             Prelude.pure
-                                               (NamespaceQName_key __val__name __val__parent)
-              _idMap = HashMap.fromList [("name", 1), ("parent", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData NamespaceQName_key where
-  rnf (NamespaceQName_key __field__name __field__parent)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__parent `Prelude.seq` ()
-
-instance Default.Default NamespaceQName_key where
-  def = NamespaceQName_key Default.def Prelude.Nothing
-
-instance Hashable.Hashable NamespaceQName_key where
-  hashWithSalt __salt (NamespaceQName_key _name _parent)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-        _parent
-
-newtype NamespaceDeclaration_key = NamespaceDeclaration_key{namespaceDeclaration_key_name
-                                                            :: NamespaceQName}
-                                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON NamespaceDeclaration_key where
-  toJSON (NamespaceDeclaration_key __field__name)
-    = Aeson.object ("name" .= __field__name : Prelude.mempty)
-
-instance Thrift.ThriftStruct NamespaceDeclaration_key where
-  buildStruct _proxy (NamespaceDeclaration_key __field__name)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__name)
-           : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             Prelude.pure (NamespaceDeclaration_key __val__name)
-              _idMap = HashMap.fromList [("name", 1)]
-            _parse 0)
-
-instance DeepSeq.NFData NamespaceDeclaration_key where
-  rnf (NamespaceDeclaration_key __field__name)
-    = DeepSeq.rnf __field__name `Prelude.seq` ()
-
-instance Default.Default NamespaceDeclaration_key where
-  def = NamespaceDeclaration_key Default.def
-
-instance Hashable.Hashable NamespaceDeclaration_key where
-  hashWithSalt __salt (NamespaceDeclaration_key _name)
-    = Hashable.hashWithSalt __salt _name
-
-data NameLowerCase_key = NameLowerCase_key{nameLowerCase_key_nameLowercase
-                                           :: Text.Text,
-                                           nameLowerCase_key_name :: Name}
-                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON NameLowerCase_key where
-  toJSON (NameLowerCase_key __field__nameLowercase __field__name)
-    = Aeson.object
-        ("nameLowercase" .= __field__nameLowercase :
-           "name" .= __field__name : Prelude.mempty)
-
-instance Thrift.ThriftStruct NameLowerCase_key where
-  buildStruct _proxy
-    (NameLowerCase_key __field__nameLowercase __field__name)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "nameLowercase"
-           (Thrift.getStringType _proxy)
-           1
-           0
-           (Thrift.genText _proxy __field__nameLowercase)
-           :
-           Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__name)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__nameLowercase <- ST.newSTRef ""
-            __field__name <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__nameLowercase
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__nameLowercase <- ST.readSTRef
-                                                                        __field__nameLowercase
-                                             !__val__name <- ST.readSTRef __field__name
-                                             Prelude.pure
-                                               (NameLowerCase_key __val__nameLowercase __val__name)
-              _idMap = HashMap.fromList [("nameLowercase", 1), ("name", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData NameLowerCase_key where
-  rnf (NameLowerCase_key __field__nameLowercase __field__name)
-    = DeepSeq.rnf __field__nameLowercase `Prelude.seq`
-        DeepSeq.rnf __field__name `Prelude.seq` ()
-
-instance Default.Default NameLowerCase_key where
-  def = NameLowerCase_key "" Default.def
-
-instance Hashable.Hashable NameLowerCase_key where
-  hashWithSalt __salt (NameLowerCase_key _nameLowercase _name)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt __salt _nameLowercase)
-        _name
-
-data ModuleMembership = ModuleMembership{moduleMembership_declaration
-                                         :: ModuleDeclaration,
-                                         moduleMembership_internal :: Prelude.Bool}
-                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ModuleMembership where
-  toJSON (ModuleMembership __field__declaration __field__internal)
-    = Aeson.object
-        ("declaration" .= __field__declaration :
-           "internal" .= __field__internal : Prelude.mempty)
-
-instance Thrift.ThriftStruct ModuleMembership where
-  buildStruct _proxy
-    (ModuleMembership __field__declaration __field__internal)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "declaration" (Thrift.getStructType _proxy)
-           1
-           0
-           (Thrift.buildStruct _proxy __field__declaration)
-           : Thrift.genFieldBool _proxy "internal" 2 1 __field__internal : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__declaration <- ST.newSTRef Default.def
-            __field__internal <- ST.newSTRef Prelude.False
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__declaration
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getBoolType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseBoolF
-                                                                                      _proxy
-                                                                                      _bool)
-                                                                        ST.writeSTRef
-                                                                          __field__internal
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__declaration <- ST.readSTRef
-                                                                      __field__declaration
-                                             !__val__internal <- ST.readSTRef __field__internal
-                                             Prelude.pure
-                                               (ModuleMembership __val__declaration __val__internal)
-              _idMap = HashMap.fromList [("declaration", 1), ("internal", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData ModuleMembership where
-  rnf (ModuleMembership __field__declaration __field__internal)
-    = DeepSeq.rnf __field__declaration `Prelude.seq`
-        DeepSeq.rnf __field__internal `Prelude.seq` ()
-
-instance Default.Default ModuleMembership where
-  def = ModuleMembership Default.def Prelude.False
-
-instance Hashable.Hashable ModuleMembership where
-  hashWithSalt __salt (ModuleMembership _declaration _internal)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _declaration)
-        _internal
-
-data ModuleDefinition_key = ModuleDefinition_key{moduleDefinition_key_declaration
-                                                 :: ModuleDeclaration,
-                                                 moduleDefinition_key_attributes :: [UserAttribute]}
-                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ModuleDefinition_key where
-  toJSON
-    (ModuleDefinition_key __field__declaration __field__attributes)
-    = Aeson.object
-        ("declaration" .= __field__declaration :
-           "attributes" .= __field__attributes : Prelude.mempty)
-
-instance Thrift.ThriftStruct ModuleDefinition_key where
-  buildStruct _proxy
-    (ModuleDefinition_key __field__declaration __field__attributes)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "declaration" (Thrift.getStructType _proxy)
-           1
-           0
-           (Thrift.buildStruct _proxy __field__declaration)
-           :
-           Thrift.genField _proxy "attributes" (Thrift.getListType _proxy) 2 1
-             (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                (Thrift.buildStruct _proxy)
-                __field__attributes)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__declaration <- ST.newSTRef Default.def
-            __field__attributes <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__declaration
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__attributes
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__declaration <- ST.readSTRef
-                                                                      __field__declaration
-                                             !__val__attributes <- ST.readSTRef __field__attributes
-                                             Prelude.pure
-                                               (ModuleDefinition_key __val__declaration
-                                                  __val__attributes)
-              _idMap = HashMap.fromList [("declaration", 1), ("attributes", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData ModuleDefinition_key where
-  rnf (ModuleDefinition_key __field__declaration __field__attributes)
-    = DeepSeq.rnf __field__declaration `Prelude.seq`
-        DeepSeq.rnf __field__attributes `Prelude.seq` ()
-
-instance Default.Default ModuleDefinition_key where
-  def = ModuleDefinition_key Default.def Default.def
-
-instance Hashable.Hashable ModuleDefinition_key where
-  hashWithSalt __salt (ModuleDefinition_key _declaration _attributes)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _declaration)
-        _attributes
-
-newtype ModuleDeclaration_key = ModuleDeclaration_key{moduleDeclaration_key_name
-                                                      :: Name}
-                                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ModuleDeclaration_key where
-  toJSON (ModuleDeclaration_key __field__name)
-    = Aeson.object ("name" .= __field__name : Prelude.mempty)
-
-instance Thrift.ThriftStruct ModuleDeclaration_key where
-  buildStruct _proxy (ModuleDeclaration_key __field__name)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__name)
-           : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             Prelude.pure (ModuleDeclaration_key __val__name)
-              _idMap = HashMap.fromList [("name", 1)]
-            _parse 0)
-
-instance DeepSeq.NFData ModuleDeclaration_key where
-  rnf (ModuleDeclaration_key __field__name)
-    = DeepSeq.rnf __field__name `Prelude.seq` ()
-
-instance Default.Default ModuleDeclaration_key where
-  def = ModuleDeclaration_key Default.def
-
-instance Hashable.Hashable ModuleDeclaration_key where
-  hashWithSalt __salt (ModuleDeclaration_key _name)
-    = Hashable.hashWithSalt __salt _name
-
-data MethodOverrides_key = MethodOverrides_key{methodOverrides_key_derived
-                                               :: MethodDeclaration,
-                                               methodOverrides_key_base :: MethodDeclaration,
-                                               methodOverrides_key_annotation ::
-                                               Prelude.Maybe Prelude.Bool}
-                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON MethodOverrides_key where
-  toJSON
-    (MethodOverrides_key __field__derived __field__base
-       __field__annotation)
-    = Aeson.object
-        ("derived" .= __field__derived :
-           "base" .= __field__base :
-             Prelude.maybe Prelude.id ((:) . ("annotation" .=))
-               __field__annotation
-               Prelude.mempty)
-
-instance Thrift.ThriftStruct MethodOverrides_key where
-  buildStruct _proxy
-    (MethodOverrides_key __field__derived __field__base
-       __field__annotation)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "derived" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__derived)
-           :
-           Thrift.genField _proxy "base" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__base)
-             :
-             case __field__annotation of
-               Prelude.Just _val -> Thrift.genFieldBool _proxy "annotation" 3 2
-                                      _val
-                                      : []
-               Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__derived <- ST.newSTRef Default.def
-            __field__base <- ST.newSTRef Default.def
-            __field__annotation <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__derived
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__base
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getBoolType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseBoolF
-                                                                                      _proxy
-                                                                                      _bool)
-                                                                        ST.writeSTRef
-                                                                          __field__annotation
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__derived <- ST.readSTRef
-                                                                  __field__derived
-                                             !__val__base <- ST.readSTRef __field__base
-                                             !__val__annotation <- ST.readSTRef __field__annotation
-                                             Prelude.pure
-                                               (MethodOverrides_key __val__derived __val__base
-                                                  __val__annotation)
-              _idMap
-                = HashMap.fromList [("derived", 1), ("base", 2), ("annotation", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData MethodOverrides_key where
-  rnf
-    (MethodOverrides_key __field__derived __field__base
-       __field__annotation)
-    = DeepSeq.rnf __field__derived `Prelude.seq`
-        DeepSeq.rnf __field__base `Prelude.seq`
-          DeepSeq.rnf __field__annotation `Prelude.seq` ()
-
-instance Default.Default MethodOverrides_key where
-  def = MethodOverrides_key Default.def Default.def Prelude.Nothing
-
-instance Hashable.Hashable MethodOverrides_key where
-  hashWithSalt __salt
-    (MethodOverrides_key _derived _base _annotation)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _derived)
-           _base)
-        _annotation
-
-data MethodOverridden_key = MethodOverridden_key{methodOverridden_key_base
-                                                 :: MethodDeclaration,
-                                                 methodOverridden_key_derived :: MethodDeclaration,
-                                                 methodOverridden_key_annotation ::
-                                                 Prelude.Maybe Prelude.Bool}
-                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON MethodOverridden_key where
-  toJSON
-    (MethodOverridden_key __field__base __field__derived
-       __field__annotation)
-    = Aeson.object
-        ("base" .= __field__base :
-           "derived" .= __field__derived :
-             Prelude.maybe Prelude.id ((:) . ("annotation" .=))
-               __field__annotation
-               Prelude.mempty)
-
-instance Thrift.ThriftStruct MethodOverridden_key where
-  buildStruct _proxy
-    (MethodOverridden_key __field__base __field__derived
-       __field__annotation)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "base" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__base)
-           :
-           Thrift.genField _proxy "derived" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__derived)
-             :
-             case __field__annotation of
-               Prelude.Just _val -> Thrift.genFieldBool _proxy "annotation" 3 2
-                                      _val
-                                      : []
-               Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__base <- ST.newSTRef Default.def
-            __field__derived <- ST.newSTRef Default.def
-            __field__annotation <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__base
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__derived
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getBoolType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseBoolF
-                                                                                      _proxy
-                                                                                      _bool)
-                                                                        ST.writeSTRef
-                                                                          __field__annotation
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__base <- ST.readSTRef __field__base
-                                             !__val__derived <- ST.readSTRef __field__derived
-                                             !__val__annotation <- ST.readSTRef __field__annotation
-                                             Prelude.pure
-                                               (MethodOverridden_key __val__base __val__derived
-                                                  __val__annotation)
-              _idMap
-                = HashMap.fromList [("base", 1), ("derived", 2), ("annotation", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData MethodOverridden_key where
-  rnf
-    (MethodOverridden_key __field__base __field__derived
-       __field__annotation)
-    = DeepSeq.rnf __field__base `Prelude.seq`
-        DeepSeq.rnf __field__derived `Prelude.seq`
-          DeepSeq.rnf __field__annotation `Prelude.seq` ()
-
-instance Default.Default MethodOverridden_key where
-  def = MethodOverridden_key Default.def Default.def Prelude.Nothing
-
-instance Hashable.Hashable MethodOverridden_key where
-  hashWithSalt __salt
-    (MethodOverridden_key _base _derived _annotation)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _base)
-           _derived)
-        _annotation
-
-data MethodOccurrence_key = MethodOccurrence_key{methodOccurrence_key_name
-                                                 :: Name,
-                                                 methodOccurrence_key_className ::
-                                                 Prelude.Maybe Name}
-                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON MethodOccurrence_key where
-  toJSON (MethodOccurrence_key __field__name __field__className)
-    = Aeson.object
-        ("name" .= __field__name :
-           Prelude.maybe Prelude.id ((:) . ("className" .=))
-             __field__className
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct MethodOccurrence_key where
-  buildStruct _proxy
-    (MethodOccurrence_key __field__name __field__className)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__name)
-           :
-           case __field__className of
-             Prelude.Just _val -> Thrift.genField _proxy "className"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef Default.def
-            __field__className <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__className
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__className <- ST.readSTRef __field__className
-                                             Prelude.pure
-                                               (MethodOccurrence_key __val__name __val__className)
-              _idMap = HashMap.fromList [("name", 1), ("className", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData MethodOccurrence_key where
-  rnf (MethodOccurrence_key __field__name __field__className)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__className `Prelude.seq` ()
-
-instance Default.Default MethodOccurrence_key where
-  def = MethodOccurrence_key Default.def Prelude.Nothing
-
-instance Hashable.Hashable MethodOccurrence_key where
-  hashWithSalt __salt (MethodOccurrence_key _name _className)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-        _className
-
-newtype InterfaceDeclaration_key = InterfaceDeclaration_key{interfaceDeclaration_key_name
-                                                            :: QName}
-                                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON InterfaceDeclaration_key where
-  toJSON (InterfaceDeclaration_key __field__name)
-    = Aeson.object ("name" .= __field__name : Prelude.mempty)
-
-instance Thrift.ThriftStruct InterfaceDeclaration_key where
-  buildStruct _proxy (InterfaceDeclaration_key __field__name)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__name)
-           : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             Prelude.pure (InterfaceDeclaration_key __val__name)
-              _idMap = HashMap.fromList [("name", 1)]
-            _parse 0)
-
-instance DeepSeq.NFData InterfaceDeclaration_key where
-  rnf (InterfaceDeclaration_key __field__name)
-    = DeepSeq.rnf __field__name `Prelude.seq` ()
-
-instance Default.Default InterfaceDeclaration_key where
-  def = InterfaceDeclaration_key Default.def
-
-instance Hashable.Hashable InterfaceDeclaration_key where
-  hashWithSalt __salt (InterfaceDeclaration_key _name)
-    = Hashable.hashWithSalt __salt _name
-
-type IndexerInputsHash_value = ByteString.ByteString
-
-data GlobalNamespaceAlias_key = GlobalNamespaceAlias_key{globalNamespaceAlias_key_from
-                                                         :: Name,
-                                                         globalNamespaceAlias_key_to ::
-                                                         NamespaceQName}
-                                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON GlobalNamespaceAlias_key where
-  toJSON (GlobalNamespaceAlias_key __field__from __field__to)
-    = Aeson.object
-        ("from" .= __field__from : "to" .= __field__to : Prelude.mempty)
-
-instance Thrift.ThriftStruct GlobalNamespaceAlias_key where
-  buildStruct _proxy
-    (GlobalNamespaceAlias_key __field__from __field__to)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "from" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__from)
-           :
-           Thrift.genField _proxy "to" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__to)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__from <- ST.newSTRef Default.def
-            __field__to <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__from
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__to
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__from <- ST.readSTRef __field__from
-                                             !__val__to <- ST.readSTRef __field__to
-                                             Prelude.pure
-                                               (GlobalNamespaceAlias_key __val__from __val__to)
-              _idMap = HashMap.fromList [("from", 1), ("to", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData GlobalNamespaceAlias_key where
-  rnf (GlobalNamespaceAlias_key __field__from __field__to)
-    = DeepSeq.rnf __field__from `Prelude.seq`
-        DeepSeq.rnf __field__to `Prelude.seq` ()
-
-instance Default.Default GlobalNamespaceAlias_key where
-  def = GlobalNamespaceAlias_key Default.def Default.def
-
-instance Hashable.Hashable GlobalNamespaceAlias_key where
-  hashWithSalt __salt (GlobalNamespaceAlias_key _from _to)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _from) _to
-
-data GlobalConstDefinition_key = GlobalConstDefinition_key{globalConstDefinition_key_declaration
-                                                           :: GlobalConstDeclaration,
-                                                           globalConstDefinition_key_type ::
-                                                           Prelude.Maybe Type,
-                                                           globalConstDefinition_key_value ::
-                                                           Text.Text,
-                                                           globalConstDefinition_key_typeInfo ::
-                                                           Prelude.Maybe TypeInfo}
-                                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON GlobalConstDefinition_key where
-  toJSON
-    (GlobalConstDefinition_key __field__declaration __field__type
-       __field__value __field__typeInfo)
-    = Aeson.object
-        ("declaration" .= __field__declaration :
-           Prelude.maybe Prelude.id ((:) . ("type" .=)) __field__type
-             ("value" .= __field__value :
-                Prelude.maybe Prelude.id ((:) . ("typeInfo" .=)) __field__typeInfo
-                  Prelude.mempty))
-
-instance Thrift.ThriftStruct GlobalConstDefinition_key where
-  buildStruct _proxy
-    (GlobalConstDefinition_key __field__declaration __field__type
-       __field__value __field__typeInfo)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "declaration" (Thrift.getStructType _proxy)
-           1
-           0
-           (Thrift.buildStruct _proxy __field__declaration)
-           :
-           let (__cereal__type, __id__type)
-                 = case __field__type of
-                     Prelude.Just _val -> ((:)
-                                             (Thrift.genField _proxy "type"
-                                                (Thrift.getStructType _proxy)
-                                                2
-                                                1
-                                                (Thrift.buildStruct _proxy _val)),
-                                           2)
-                     Prelude.Nothing -> (Prelude.id, 1)
-             in
-             __cereal__type
-               (Thrift.genField _proxy "value" (Thrift.getStringType _proxy) 3
-                  __id__type
-                  (Thrift.genText _proxy __field__value)
-                  :
-                  case __field__typeInfo of
-                    Prelude.Just _val -> Thrift.genField _proxy "typeInfo"
-                                           (Thrift.getStructType _proxy)
-                                           4
-                                           3
-                                           (Thrift.buildStruct _proxy _val)
-                                           : []
-                    Prelude.Nothing -> []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__declaration <- ST.newSTRef Default.def
-            __field__type <- ST.newSTRef Prelude.Nothing
-            __field__value <- ST.newSTRef ""
-            __field__typeInfo <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__declaration
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__type
-                                                                          (Prelude.Just _val)
-                                                                 3 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__value
-                                                                          _val
-                                                                 4 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__typeInfo
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__declaration <- ST.readSTRef
-                                                                      __field__declaration
-                                             !__val__type <- ST.readSTRef __field__type
-                                             !__val__value <- ST.readSTRef __field__value
-                                             !__val__typeInfo <- ST.readSTRef __field__typeInfo
-                                             Prelude.pure
-                                               (GlobalConstDefinition_key __val__declaration
-                                                  __val__type
-                                                  __val__value
-                                                  __val__typeInfo)
-              _idMap
-                = HashMap.fromList
-                    [("declaration", 1), ("type", 2), ("value", 3), ("typeInfo", 4)]
-            _parse 0)
-
-instance DeepSeq.NFData GlobalConstDefinition_key where
-  rnf
-    (GlobalConstDefinition_key __field__declaration __field__type
-       __field__value __field__typeInfo)
-    = DeepSeq.rnf __field__declaration `Prelude.seq`
-        DeepSeq.rnf __field__type `Prelude.seq`
-          DeepSeq.rnf __field__value `Prelude.seq`
-            DeepSeq.rnf __field__typeInfo `Prelude.seq` ()
-
-instance Default.Default GlobalConstDefinition_key where
-  def
-    = GlobalConstDefinition_key Default.def Prelude.Nothing ""
-        Prelude.Nothing
-
-instance Hashable.Hashable GlobalConstDefinition_key where
-  hashWithSalt __salt
-    (GlobalConstDefinition_key _declaration _type _value _typeInfo)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _declaration)
-              _type)
-           _value)
-        _typeInfo
-
-newtype GlobalConstDeclaration_key = GlobalConstDeclaration_key{globalConstDeclaration_key_name
-                                                                :: QName}
-                                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON GlobalConstDeclaration_key where
-  toJSON (GlobalConstDeclaration_key __field__name)
-    = Aeson.object ("name" .= __field__name : Prelude.mempty)
-
-instance Thrift.ThriftStruct GlobalConstDeclaration_key where
-  buildStruct _proxy (GlobalConstDeclaration_key __field__name)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__name)
-           : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             Prelude.pure (GlobalConstDeclaration_key __val__name)
-              _idMap = HashMap.fromList [("name", 1)]
-            _parse 0)
-
-instance DeepSeq.NFData GlobalConstDeclaration_key where
-  rnf (GlobalConstDeclaration_key __field__name)
-    = DeepSeq.rnf __field__name `Prelude.seq` ()
-
-instance Default.Default GlobalConstDeclaration_key where
-  def = GlobalConstDeclaration_key Default.def
-
-instance Hashable.Hashable GlobalConstDeclaration_key where
-  hashWithSalt __salt (GlobalConstDeclaration_key _name)
-    = Hashable.hashWithSalt __salt _name
-
-newtype FunctionDeclaration_key = FunctionDeclaration_key{functionDeclaration_key_name
-                                                          :: QName}
-                                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON FunctionDeclaration_key where
-  toJSON (FunctionDeclaration_key __field__name)
-    = Aeson.object ("name" .= __field__name : Prelude.mempty)
-
-instance Thrift.ThriftStruct FunctionDeclaration_key where
-  buildStruct _proxy (FunctionDeclaration_key __field__name)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__name)
-           : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             Prelude.pure (FunctionDeclaration_key __val__name)
-              _idMap = HashMap.fromList [("name", 1)]
-            _parse 0)
-
-instance DeepSeq.NFData FunctionDeclaration_key where
-  rnf (FunctionDeclaration_key __field__name)
-    = DeepSeq.rnf __field__name `Prelude.seq` ()
-
-instance Default.Default FunctionDeclaration_key where
-  def = FunctionDeclaration_key Default.def
-
-instance Hashable.Hashable FunctionDeclaration_key where
-  hashWithSalt __salt (FunctionDeclaration_key _name)
-    = Hashable.hashWithSalt __salt _name
-
-data FieldClassConst = FieldClassConst{fieldClassConst_container ::
-                                       QName,
-                                       fieldClassConst_name :: Name}
-                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON FieldClassConst where
-  toJSON (FieldClassConst __field__container __field__name)
-    = Aeson.object
-        ("container" .= __field__container :
-           "name" .= __field__name : Prelude.mempty)
-
-instance Thrift.ThriftStruct FieldClassConst where
-  buildStruct _proxy
-    (FieldClassConst __field__container __field__name)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "container" (Thrift.getStructType _proxy) 1
-           0
-           (Thrift.buildStruct _proxy __field__container)
-           :
-           Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__name)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__container <- ST.newSTRef Default.def
-            __field__name <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__container
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__container <- ST.readSTRef
-                                                                    __field__container
-                                             !__val__name <- ST.readSTRef __field__name
-                                             Prelude.pure
-                                               (FieldClassConst __val__container __val__name)
-              _idMap = HashMap.fromList [("container", 1), ("name", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData FieldClassConst where
-  rnf (FieldClassConst __field__container __field__name)
-    = DeepSeq.rnf __field__container `Prelude.seq`
-        DeepSeq.rnf __field__name `Prelude.seq` ()
-
-instance Default.Default FieldClassConst where
-  def = FieldClassConst Default.def Default.def
-
-instance Hashable.Hashable FieldClassConst where
-  hashWithSalt __salt (FieldClassConst _container _name)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _container)
-        _name
-
-data ShapeKV_key = ShapeKV_key_sf_regex_group Text.Text
-                 | ShapeKV_key_sf_lit_string Text.Text
-                 | ShapeKV_key_sf_class_const FieldClassConst
-                 | ShapeKV_key_EMPTY
-                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ShapeKV_key where
-  toJSON (ShapeKV_key_sf_regex_group __sf_regex_group)
-    = Aeson.object ["sf_regex_group" .= __sf_regex_group]
-  toJSON (ShapeKV_key_sf_lit_string __sf_lit_string)
-    = Aeson.object ["sf_lit_string" .= __sf_lit_string]
-  toJSON (ShapeKV_key_sf_class_const __sf_class_const)
-    = Aeson.object ["sf_class_const" .= __sf_class_const]
-  toJSON ShapeKV_key_EMPTY = Aeson.object []
-
-instance Thrift.ThriftStruct ShapeKV_key where
-  buildStruct _proxy (ShapeKV_key_sf_regex_group __sf_regex_group)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "sf_regex_group"
-           (Thrift.getStringType _proxy)
-           1
-           0
-           (Thrift.genText _proxy __sf_regex_group)]
-  buildStruct _proxy (ShapeKV_key_sf_lit_string __sf_lit_string)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "sf_lit_string"
-           (Thrift.getStringType _proxy)
-           2
-           0
-           (Thrift.genText _proxy __sf_lit_string)]
-  buildStruct _proxy (ShapeKV_key_sf_class_const __sf_class_const)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "sf_class_const"
-           (Thrift.getStructType _proxy)
-           3
-           0
-           (Thrift.buildStruct _proxy __sf_class_const)]
-  buildStruct _proxy ShapeKV_key_EMPTY = Thrift.genStruct _proxy []
-  parseStruct _proxy
-    = do _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap
-         case _fieldBegin of
-           Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                     1 | _type == Thrift.getStringType _proxy ->
-                                                         do _val <- Thrift.parseText _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return
-                                                              (ShapeKV_key_sf_regex_group _val)
-                                                     2 | _type == Thrift.getStringType _proxy ->
-                                                         do _val <- Thrift.parseText _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return
-                                                              (ShapeKV_key_sf_lit_string _val)
-                                                     3 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return
-                                                              (ShapeKV_key_sf_class_const _val)
-                                                     _ -> do Thrift.parseSkip _proxy _type
-                                                               Prelude.Nothing
-                                                             Thrift.parseStop _proxy
-                                                             Prelude.return ShapeKV_key_EMPTY
-           Thrift.FieldEnd -> Prelude.return ShapeKV_key_EMPTY
-    where
-      _idMap
-        = HashMap.fromList
-            [("sf_regex_group", 1), ("sf_lit_string", 2),
-             ("sf_class_const", 3)]
-
-instance DeepSeq.NFData ShapeKV_key where
-  rnf (ShapeKV_key_sf_regex_group __sf_regex_group)
-    = DeepSeq.rnf __sf_regex_group
-  rnf (ShapeKV_key_sf_lit_string __sf_lit_string)
-    = DeepSeq.rnf __sf_lit_string
-  rnf (ShapeKV_key_sf_class_const __sf_class_const)
-    = DeepSeq.rnf __sf_class_const
-  rnf ShapeKV_key_EMPTY = ()
-
-instance Default.Default ShapeKV_key where
-  def = ShapeKV_key_EMPTY
-
-instance Hashable.Hashable ShapeKV_key where
-  hashWithSalt __salt (ShapeKV_key_sf_regex_group _sf_regex_group)
-    = Hashable.hashWithSalt __salt
-        (Hashable.hashWithSalt 1 _sf_regex_group)
-  hashWithSalt __salt (ShapeKV_key_sf_lit_string _sf_lit_string)
-    = Hashable.hashWithSalt __salt
-        (Hashable.hashWithSalt 2 _sf_lit_string)
-  hashWithSalt __salt (ShapeKV_key_sf_class_const _sf_class_const)
-    = Hashable.hashWithSalt __salt
-        (Hashable.hashWithSalt 3 _sf_class_const)
-  hashWithSalt __salt ShapeKV_key_EMPTY
-    = Hashable.hashWithSalt __salt (0 :: Prelude.Int)
-
-data ShapeKV = ShapeKV{shapeKV_key :: ShapeKV_key,
-                       shapeKV_value :: Hint, shapeKV_opt :: Prelude.Bool}
-               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ShapeKV where
-  toJSON (ShapeKV __field__key __field__value __field__opt)
-    = Aeson.object
-        ("key" .= __field__key :
-           "value" .= __field__value : "opt" .= __field__opt : Prelude.mempty)
-
-instance Thrift.ThriftStruct ShapeKV where
-  buildStruct _proxy
-    (ShapeKV __field__key __field__value __field__opt)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "key" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__key)
-           :
-           Thrift.genField _proxy "value" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__value)
-             : Thrift.genFieldBool _proxy "opt" 3 2 __field__opt : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__key <- ST.newSTRef Default.def
-            __field__value <- ST.newSTRef Default.def
-            __field__opt <- ST.newSTRef Prelude.False
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__value
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getBoolType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseBoolF
-                                                                                      _proxy
-                                                                                      _bool)
-                                                                        ST.writeSTRef __field__opt
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__key <- ST.readSTRef __field__key
-                                             !__val__value <- ST.readSTRef __field__value
-                                             !__val__opt <- ST.readSTRef __field__opt
-                                             Prelude.pure
-                                               (ShapeKV __val__key __val__value __val__opt)
-              _idMap = HashMap.fromList [("key", 1), ("value", 2), ("opt", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData ShapeKV where
-  rnf (ShapeKV __field__key __field__value __field__opt)
-    = DeepSeq.rnf __field__key `Prelude.seq`
-        DeepSeq.rnf __field__value `Prelude.seq`
-          DeepSeq.rnf __field__opt `Prelude.seq` ()
-
-instance Default.Default ShapeKV where
-  def = ShapeKV Default.def Default.def Prelude.False
-
-instance Hashable.Hashable ShapeKV where
-  hashWithSalt __salt (ShapeKV _key _value _opt)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _key) _value)
-        _opt
-
-data Hint_apply_ = Hint_apply_{hint_apply__class_name :: QName,
-                               hint_apply__values :: [Hint]}
-                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Hint_apply_ where
-  toJSON (Hint_apply_ __field__class_name __field__values)
-    = Aeson.object
-        ("class_name" .= __field__class_name :
-           "values" .= __field__values : Prelude.mempty)
-
-instance Thrift.ThriftStruct Hint_apply_ where
-  buildStruct _proxy
-    (Hint_apply_ __field__class_name __field__values)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "class_name" (Thrift.getStructType _proxy)
-           1
-           0
-           (Thrift.buildStruct _proxy __field__class_name)
-           :
-           Thrift.genField _proxy "values" (Thrift.getListType _proxy) 2 1
-             (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                (Thrift.buildStruct _proxy)
-                __field__values)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__class_name <- ST.newSTRef Default.def
-            __field__values <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__class_name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__values
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__class_name <- ST.readSTRef
-                                                                     __field__class_name
-                                             !__val__values <- ST.readSTRef __field__values
-                                             Prelude.pure
-                                               (Hint_apply_ __val__class_name __val__values)
-              _idMap = HashMap.fromList [("class_name", 1), ("values", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData Hint_apply_ where
-  rnf (Hint_apply_ __field__class_name __field__values)
-    = DeepSeq.rnf __field__class_name `Prelude.seq`
-        DeepSeq.rnf __field__values `Prelude.seq` ()
-
-instance Default.Default Hint_apply_ where
-  def = Hint_apply_ Default.def Default.def
-
-instance Hashable.Hashable Hint_apply_ where
-  hashWithSalt __salt (Hint_apply_ _class_name _values)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _class_name)
-        _values
-
-data Hint_tuple_ = Hint_tuple_{hint_tuple__req :: [Hint],
-                               hint_tuple__opt :: [Hint],
-                               hint_tuple__variadic :: Prelude.Maybe Hint}
-                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Hint_tuple_ where
-  toJSON (Hint_tuple_ __field__req __field__opt __field__variadic)
-    = Aeson.object
-        ("req" .= __field__req :
-           "opt" .= __field__opt :
-             Prelude.maybe Prelude.id ((:) . ("variadic" .=)) __field__variadic
-               Prelude.mempty)
-
-instance Thrift.ThriftStruct Hint_tuple_ where
-  buildStruct _proxy
-    (Hint_tuple_ __field__req __field__opt __field__variadic)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "req" (Thrift.getListType _proxy) 1 0
-           (Thrift.genList _proxy (Thrift.getStructType _proxy)
-              (Thrift.buildStruct _proxy)
-              __field__req)
-           :
-           Thrift.genField _proxy "opt" (Thrift.getListType _proxy) 2 1
-             (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                (Thrift.buildStruct _proxy)
-                __field__opt)
-             :
-             case __field__variadic of
-               Prelude.Just _val -> Thrift.genField _proxy "variadic"
-                                      (Thrift.getStructType _proxy)
-                                      3
-                                      2
-                                      (Thrift.buildStruct _proxy _val)
-                                      : []
-               Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__req <- ST.newSTRef Default.def
-            __field__opt <- ST.newSTRef Default.def
-            __field__variadic <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef __field__req
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef __field__opt
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__variadic
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__req <- ST.readSTRef __field__req
-                                             !__val__opt <- ST.readSTRef __field__opt
-                                             !__val__variadic <- ST.readSTRef __field__variadic
-                                             Prelude.pure
-                                               (Hint_tuple_ __val__req __val__opt __val__variadic)
-              _idMap = HashMap.fromList [("req", 1), ("opt", 2), ("variadic", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData Hint_tuple_ where
-  rnf (Hint_tuple_ __field__req __field__opt __field__variadic)
-    = DeepSeq.rnf __field__req `Prelude.seq`
-        DeepSeq.rnf __field__opt `Prelude.seq`
-          DeepSeq.rnf __field__variadic `Prelude.seq` ()
-
-instance Default.Default Hint_tuple_ where
-  def = Hint_tuple_ Default.def Default.def Prelude.Nothing
-
-instance Hashable.Hashable Hint_tuple_ where
-  hashWithSalt __salt (Hint_tuple_ _req _opt _variadic)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _req) _opt)
-        _variadic
-
-data Hint_shape_ = Hint_shape_{hint_shape__open_ :: Prelude.Bool,
-                               hint_shape__map_ :: [ShapeKV]}
-                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Hint_shape_ where
-  toJSON (Hint_shape_ __field__open_ __field__map_)
-    = Aeson.object
-        ("open_" .= __field__open_ :
-           "map_" .= __field__map_ : Prelude.mempty)
-
-instance Thrift.ThriftStruct Hint_shape_ where
-  buildStruct _proxy (Hint_shape_ __field__open_ __field__map_)
-    = Thrift.genStruct _proxy
-        (Thrift.genFieldBool _proxy "open_" 1 0 __field__open_ :
-           Thrift.genField _proxy "map_" (Thrift.getListType _proxy) 2 1
-             (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                (Thrift.buildStruct _proxy)
-                __field__map_)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__open_ <- ST.newSTRef Prelude.False
-            __field__map_ <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getBoolType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseBoolF
-                                                                                      _proxy
-                                                                                      _bool)
-                                                                        ST.writeSTRef __field__open_
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef __field__map_
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__open_ <- ST.readSTRef __field__open_
-                                             !__val__map_ <- ST.readSTRef __field__map_
-                                             Prelude.pure (Hint_shape_ __val__open_ __val__map_)
-              _idMap = HashMap.fromList [("open_", 1), ("map_", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData Hint_shape_ where
-  rnf (Hint_shape_ __field__open_ __field__map_)
-    = DeepSeq.rnf __field__open_ `Prelude.seq`
-        DeepSeq.rnf __field__map_ `Prelude.seq` ()
-
-instance Default.Default Hint_shape_ where
-  def = Hint_shape_ Prelude.False Default.def
-
-instance Hashable.Hashable Hint_shape_ where
-  hashWithSalt __salt (Hint_shape_ _open_ _map_)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _open_) _map_
-
-data Hint_vect_or_dict_ = Hint_vect_or_dict_{hint_vect_or_dict__maybe_key
-                                             :: Prelude.Maybe Hint,
-                                             hint_vect_or_dict__value_ :: Hint}
-                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Hint_vect_or_dict_ where
-  toJSON (Hint_vect_or_dict_ __field__maybe_key __field__value_)
-    = Aeson.object
-        (Prelude.maybe Prelude.id ((:) . ("maybe_key" .=))
-           __field__maybe_key
-           ("value_" .= __field__value_ : Prelude.mempty))
-
-instance Thrift.ThriftStruct Hint_vect_or_dict_ where
-  buildStruct _proxy
-    (Hint_vect_or_dict_ __field__maybe_key __field__value_)
-    = Thrift.genStruct _proxy
-        (let (__cereal__maybe_key, __id__maybe_key)
-               = case __field__maybe_key of
-                   Prelude.Just _val -> ((:)
-                                           (Thrift.genField _proxy "maybe_key"
-                                              (Thrift.getStructType _proxy)
-                                              1
-                                              0
-                                              (Thrift.buildStruct _proxy _val)),
-                                         1)
-                   Prelude.Nothing -> (Prelude.id, 0)
-           in
-           __cereal__maybe_key
-             (Thrift.genField _proxy "value_" (Thrift.getStructType _proxy) 2
-                __id__maybe_key
-                (Thrift.buildStruct _proxy __field__value_)
-                : []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__maybe_key <- ST.newSTRef Prelude.Nothing
-            __field__value_ <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__maybe_key
-                                                                          (Prelude.Just _val)
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__value_
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__maybe_key <- ST.readSTRef
-                                                                    __field__maybe_key
-                                             !__val__value_ <- ST.readSTRef __field__value_
-                                             Prelude.pure
-                                               (Hint_vect_or_dict_ __val__maybe_key __val__value_)
-              _idMap = HashMap.fromList [("maybe_key", 1), ("value_", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData Hint_vect_or_dict_ where
-  rnf (Hint_vect_or_dict_ __field__maybe_key __field__value_)
-    = DeepSeq.rnf __field__maybe_key `Prelude.seq`
-        DeepSeq.rnf __field__value_ `Prelude.seq` ()
-
-instance Default.Default Hint_vect_or_dict_ where
-  def = Hint_vect_or_dict_ Prelude.Nothing Default.def
-
-instance Hashable.Hashable Hint_vect_or_dict_ where
-  hashWithSalt __salt (Hint_vect_or_dict_ _maybe_key _value_)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _maybe_key)
-        _value_
-
-data Hint_key = Hint_key_apply Hint_apply_
-              | Hint_key_option Hint
-              | Hint_key_like Hint
-              | Hint_key_tuple Hint_tuple_
-              | Hint_key_class_args Hint
-              | Hint_key_shape Hint_shape_
-              | Hint_key_soft Hint
-              | Hint_key_intersection [Hint]
-              | Hint_key_union_ [Hint]
-              | Hint_key_vect_or_dict Hint_vect_or_dict_
-              | Hint_key_prim Type
-              | Hint_key_var_ Text.Text
-              | Hint_key_fun_context Text.Text
-              | Hint_key_mixed Glean.Schema.Builtin.Unit
-              | Hint_key_wildcard Glean.Schema.Builtin.Unit
-              | Hint_key_nonnull Glean.Schema.Builtin.Unit
-              | Hint_key_this_ Glean.Schema.Builtin.Unit
-              | Hint_key_dynamic Glean.Schema.Builtin.Unit
-              | Hint_key_nothing Glean.Schema.Builtin.Unit
-              | Hint_key_other Type
-              | Hint_key_EMPTY
-                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Hint_key where
-  toJSON (Hint_key_apply __apply) = Aeson.object ["apply" .= __apply]
-  toJSON (Hint_key_option __option)
-    = Aeson.object ["option" .= __option]
-  toJSON (Hint_key_like __like) = Aeson.object ["like" .= __like]
-  toJSON (Hint_key_tuple __tuple) = Aeson.object ["tuple" .= __tuple]
-  toJSON (Hint_key_class_args __class_args)
-    = Aeson.object ["class_args" .= __class_args]
-  toJSON (Hint_key_shape __shape) = Aeson.object ["shape" .= __shape]
-  toJSON (Hint_key_soft __soft) = Aeson.object ["soft" .= __soft]
-  toJSON (Hint_key_intersection __intersection)
-    = Aeson.object ["intersection" .= __intersection]
-  toJSON (Hint_key_union_ __union_)
-    = Aeson.object ["union_" .= __union_]
-  toJSON (Hint_key_vect_or_dict __vect_or_dict)
-    = Aeson.object ["vect_or_dict" .= __vect_or_dict]
-  toJSON (Hint_key_prim __prim) = Aeson.object ["prim" .= __prim]
-  toJSON (Hint_key_var_ __var_) = Aeson.object ["var_" .= __var_]
-  toJSON (Hint_key_fun_context __fun_context)
-    = Aeson.object ["fun_context" .= __fun_context]
-  toJSON (Hint_key_mixed __mixed) = Aeson.object ["mixed" .= __mixed]
-  toJSON (Hint_key_wildcard __wildcard)
-    = Aeson.object ["wildcard" .= __wildcard]
-  toJSON (Hint_key_nonnull __nonnull)
-    = Aeson.object ["nonnull" .= __nonnull]
-  toJSON (Hint_key_this_ __this_) = Aeson.object ["this_" .= __this_]
-  toJSON (Hint_key_dynamic __dynamic)
-    = Aeson.object ["dynamic" .= __dynamic]
-  toJSON (Hint_key_nothing __nothing)
-    = Aeson.object ["nothing" .= __nothing]
-  toJSON (Hint_key_other __other) = Aeson.object ["other" .= __other]
-  toJSON Hint_key_EMPTY = Aeson.object []
-
-instance Thrift.ThriftStruct Hint_key where
-  buildStruct _proxy (Hint_key_apply __apply)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "apply" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __apply)]
-  buildStruct _proxy (Hint_key_option __option)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "option" (Thrift.getStructType _proxy) 2 0
-           (Thrift.buildStruct _proxy __option)]
-  buildStruct _proxy (Hint_key_like __like)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "like" (Thrift.getStructType _proxy) 3 0
-           (Thrift.buildStruct _proxy __like)]
-  buildStruct _proxy (Hint_key_tuple __tuple)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "tuple" (Thrift.getStructType _proxy) 4 0
-           (Thrift.buildStruct _proxy __tuple)]
-  buildStruct _proxy (Hint_key_class_args __class_args)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "class_args" (Thrift.getStructType _proxy)
-           5
-           0
-           (Thrift.buildStruct _proxy __class_args)]
-  buildStruct _proxy (Hint_key_shape __shape)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "shape" (Thrift.getStructType _proxy) 6 0
-           (Thrift.buildStruct _proxy __shape)]
-  buildStruct _proxy (Hint_key_soft __soft)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "soft" (Thrift.getStructType _proxy) 7 0
-           (Thrift.buildStruct _proxy __soft)]
-  buildStruct _proxy (Hint_key_intersection __intersection)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "intersection" (Thrift.getListType _proxy)
-           8
-           0
-           (Thrift.genList _proxy (Thrift.getStructType _proxy)
-              (Thrift.buildStruct _proxy)
-              __intersection)]
-  buildStruct _proxy (Hint_key_union_ __union_)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "union_" (Thrift.getListType _proxy) 9 0
-           (Thrift.genList _proxy (Thrift.getStructType _proxy)
-              (Thrift.buildStruct _proxy)
-              __union_)]
-  buildStruct _proxy (Hint_key_vect_or_dict __vect_or_dict)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "vect_or_dict"
-           (Thrift.getStructType _proxy)
-           10
-           0
-           (Thrift.buildStruct _proxy __vect_or_dict)]
-  buildStruct _proxy (Hint_key_prim __prim)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "prim" (Thrift.getStructType _proxy) 11 0
-           (Thrift.buildStruct _proxy __prim)]
-  buildStruct _proxy (Hint_key_var_ __var_)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "var_" (Thrift.getStringType _proxy) 12 0
-           (Thrift.genText _proxy __var_)]
-  buildStruct _proxy (Hint_key_fun_context __fun_context)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "fun_context" (Thrift.getStringType _proxy)
-           13
-           0
-           (Thrift.genText _proxy __fun_context)]
-  buildStruct _proxy (Hint_key_mixed __mixed)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "mixed" (Thrift.getStructType _proxy) 14 0
-           (Thrift.buildStruct _proxy __mixed)]
-  buildStruct _proxy (Hint_key_wildcard __wildcard)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "wildcard" (Thrift.getStructType _proxy) 15
-           0
-           (Thrift.buildStruct _proxy __wildcard)]
-  buildStruct _proxy (Hint_key_nonnull __nonnull)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "nonnull" (Thrift.getStructType _proxy) 16
-           0
-           (Thrift.buildStruct _proxy __nonnull)]
-  buildStruct _proxy (Hint_key_this_ __this_)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "this_" (Thrift.getStructType _proxy) 17 0
-           (Thrift.buildStruct _proxy __this_)]
-  buildStruct _proxy (Hint_key_dynamic __dynamic)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "dynamic" (Thrift.getStructType _proxy) 18
-           0
-           (Thrift.buildStruct _proxy __dynamic)]
-  buildStruct _proxy (Hint_key_nothing __nothing)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "nothing" (Thrift.getStructType _proxy) 19
-           0
-           (Thrift.buildStruct _proxy __nothing)]
-  buildStruct _proxy (Hint_key_other __other)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "other" (Thrift.getStructType _proxy) 20 0
-           (Thrift.buildStruct _proxy __other)]
-  buildStruct _proxy Hint_key_EMPTY = Thrift.genStruct _proxy []
-  parseStruct _proxy
-    = do _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap
-         case _fieldBegin of
-           Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                     1 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return (Hint_key_apply _val)
-                                                     2 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return (Hint_key_option _val)
-                                                     3 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return (Hint_key_like _val)
-                                                     4 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return (Hint_key_tuple _val)
-                                                     5 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return
-                                                              (Hint_key_class_args _val)
-                                                     6 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return (Hint_key_shape _val)
-                                                     7 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return (Hint_key_soft _val)
-                                                     8 | _type == Thrift.getListType _proxy ->
-                                                         do _val <- Prelude.snd <$>
-                                                                      Thrift.parseList _proxy
-                                                                        (Thrift.parseStruct _proxy)
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return
-                                                              (Hint_key_intersection _val)
-                                                     9 | _type == Thrift.getListType _proxy ->
-                                                         do _val <- Prelude.snd <$>
-                                                                      Thrift.parseList _proxy
-                                                                        (Thrift.parseStruct _proxy)
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return (Hint_key_union_ _val)
-                                                     10 | _type == Thrift.getStructType _proxy ->
-                                                          do _val <- Thrift.parseStruct _proxy
-                                                             Thrift.parseStop _proxy
-                                                             Prelude.return
-                                                               (Hint_key_vect_or_dict _val)
-                                                     11 | _type == Thrift.getStructType _proxy ->
-                                                          do _val <- Thrift.parseStruct _proxy
-                                                             Thrift.parseStop _proxy
-                                                             Prelude.return (Hint_key_prim _val)
-                                                     12 | _type == Thrift.getStringType _proxy ->
-                                                          do _val <- Thrift.parseText _proxy
-                                                             Thrift.parseStop _proxy
-                                                             Prelude.return (Hint_key_var_ _val)
-                                                     13 | _type == Thrift.getStringType _proxy ->
-                                                          do _val <- Thrift.parseText _proxy
-                                                             Thrift.parseStop _proxy
-                                                             Prelude.return
-                                                               (Hint_key_fun_context _val)
-                                                     14 | _type == Thrift.getStructType _proxy ->
-                                                          do _val <- Thrift.parseStruct _proxy
-                                                             Thrift.parseStop _proxy
-                                                             Prelude.return (Hint_key_mixed _val)
-                                                     15 | _type == Thrift.getStructType _proxy ->
-                                                          do _val <- Thrift.parseStruct _proxy
-                                                             Thrift.parseStop _proxy
-                                                             Prelude.return (Hint_key_wildcard _val)
-                                                     16 | _type == Thrift.getStructType _proxy ->
-                                                          do _val <- Thrift.parseStruct _proxy
-                                                             Thrift.parseStop _proxy
-                                                             Prelude.return (Hint_key_nonnull _val)
-                                                     17 | _type == Thrift.getStructType _proxy ->
-                                                          do _val <- Thrift.parseStruct _proxy
-                                                             Thrift.parseStop _proxy
-                                                             Prelude.return (Hint_key_this_ _val)
-                                                     18 | _type == Thrift.getStructType _proxy ->
-                                                          do _val <- Thrift.parseStruct _proxy
-                                                             Thrift.parseStop _proxy
-                                                             Prelude.return (Hint_key_dynamic _val)
-                                                     19 | _type == Thrift.getStructType _proxy ->
-                                                          do _val <- Thrift.parseStruct _proxy
-                                                             Thrift.parseStop _proxy
-                                                             Prelude.return (Hint_key_nothing _val)
-                                                     20 | _type == Thrift.getStructType _proxy ->
-                                                          do _val <- Thrift.parseStruct _proxy
-                                                             Thrift.parseStop _proxy
-                                                             Prelude.return (Hint_key_other _val)
-                                                     _ -> do Thrift.parseSkip _proxy _type
-                                                               Prelude.Nothing
-                                                             Thrift.parseStop _proxy
-                                                             Prelude.return Hint_key_EMPTY
-           Thrift.FieldEnd -> Prelude.return Hint_key_EMPTY
-    where
-      _idMap
-        = HashMap.fromList
-            [("apply", 1), ("option", 2), ("like", 3), ("tuple", 4),
-             ("class_args", 5), ("shape", 6), ("soft", 7), ("intersection", 8),
-             ("union_", 9), ("vect_or_dict", 10), ("prim", 11), ("var_", 12),
-             ("fun_context", 13), ("mixed", 14), ("wildcard", 15),
-             ("nonnull", 16), ("this_", 17), ("dynamic", 18), ("nothing", 19),
-             ("other", 20)]
-
-instance DeepSeq.NFData Hint_key where
-  rnf (Hint_key_apply __apply) = DeepSeq.rnf __apply
-  rnf (Hint_key_option __option) = DeepSeq.rnf __option
-  rnf (Hint_key_like __like) = DeepSeq.rnf __like
-  rnf (Hint_key_tuple __tuple) = DeepSeq.rnf __tuple
-  rnf (Hint_key_class_args __class_args) = DeepSeq.rnf __class_args
-  rnf (Hint_key_shape __shape) = DeepSeq.rnf __shape
-  rnf (Hint_key_soft __soft) = DeepSeq.rnf __soft
-  rnf (Hint_key_intersection __intersection)
-    = DeepSeq.rnf __intersection
-  rnf (Hint_key_union_ __union_) = DeepSeq.rnf __union_
-  rnf (Hint_key_vect_or_dict __vect_or_dict)
-    = DeepSeq.rnf __vect_or_dict
-  rnf (Hint_key_prim __prim) = DeepSeq.rnf __prim
-  rnf (Hint_key_var_ __var_) = DeepSeq.rnf __var_
-  rnf (Hint_key_fun_context __fun_context)
-    = DeepSeq.rnf __fun_context
-  rnf (Hint_key_mixed __mixed) = DeepSeq.rnf __mixed
-  rnf (Hint_key_wildcard __wildcard) = DeepSeq.rnf __wildcard
-  rnf (Hint_key_nonnull __nonnull) = DeepSeq.rnf __nonnull
-  rnf (Hint_key_this_ __this_) = DeepSeq.rnf __this_
-  rnf (Hint_key_dynamic __dynamic) = DeepSeq.rnf __dynamic
-  rnf (Hint_key_nothing __nothing) = DeepSeq.rnf __nothing
-  rnf (Hint_key_other __other) = DeepSeq.rnf __other
-  rnf Hint_key_EMPTY = ()
-
-instance Default.Default Hint_key where
-  def = Hint_key_EMPTY
-
-instance Hashable.Hashable Hint_key where
-  hashWithSalt __salt (Hint_key_apply _apply)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 1 _apply)
-  hashWithSalt __salt (Hint_key_option _option)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 2 _option)
-  hashWithSalt __salt (Hint_key_like _like)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 3 _like)
-  hashWithSalt __salt (Hint_key_tuple _tuple)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 4 _tuple)
-  hashWithSalt __salt (Hint_key_class_args _class_args)
-    = Hashable.hashWithSalt __salt
-        (Hashable.hashWithSalt 5 _class_args)
-  hashWithSalt __salt (Hint_key_shape _shape)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 6 _shape)
-  hashWithSalt __salt (Hint_key_soft _soft)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 7 _soft)
-  hashWithSalt __salt (Hint_key_intersection _intersection)
-    = Hashable.hashWithSalt __salt
-        (Hashable.hashWithSalt 8 _intersection)
-  hashWithSalt __salt (Hint_key_union_ _union_)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 9 _union_)
-  hashWithSalt __salt (Hint_key_vect_or_dict _vect_or_dict)
-    = Hashable.hashWithSalt __salt
-        (Hashable.hashWithSalt 10 _vect_or_dict)
-  hashWithSalt __salt (Hint_key_prim _prim)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 11 _prim)
-  hashWithSalt __salt (Hint_key_var_ _var_)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 12 _var_)
-  hashWithSalt __salt (Hint_key_fun_context _fun_context)
-    = Hashable.hashWithSalt __salt
-        (Hashable.hashWithSalt 13 _fun_context)
-  hashWithSalt __salt (Hint_key_mixed _mixed)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 14 _mixed)
-  hashWithSalt __salt (Hint_key_wildcard _wildcard)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 15 _wildcard)
-  hashWithSalt __salt (Hint_key_nonnull _nonnull)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 16 _nonnull)
-  hashWithSalt __salt (Hint_key_this_ _this_)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 17 _this_)
-  hashWithSalt __salt (Hint_key_dynamic _dynamic)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 18 _dynamic)
-  hashWithSalt __salt (Hint_key_nothing _nothing)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 19 _nothing)
-  hashWithSalt __salt (Hint_key_other _other)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 20 _other)
-  hashWithSalt __salt Hint_key_EMPTY
-    = Hashable.hashWithSalt __salt (0 :: Prelude.Int)
-
-data Enumerator_key = Enumerator_key{enumerator_key_name :: Name,
-                                     enumerator_key_enumeration :: EnumDeclaration}
-                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Enumerator_key where
-  toJSON (Enumerator_key __field__name __field__enumeration)
-    = Aeson.object
-        ("name" .= __field__name :
-           "enumeration" .= __field__enumeration : Prelude.mempty)
-
-instance Thrift.ThriftStruct Enumerator_key where
-  buildStruct _proxy
-    (Enumerator_key __field__name __field__enumeration)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__name)
-           :
-           Thrift.genField _proxy "enumeration" (Thrift.getStructType _proxy)
-             2
-             1
-             (Thrift.buildStruct _proxy __field__enumeration)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef Default.def
-            __field__enumeration <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__enumeration
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__enumeration <- ST.readSTRef
-                                                                      __field__enumeration
-                                             Prelude.pure
-                                               (Enumerator_key __val__name __val__enumeration)
-              _idMap = HashMap.fromList [("name", 1), ("enumeration", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData Enumerator_key where
-  rnf (Enumerator_key __field__name __field__enumeration)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__enumeration `Prelude.seq` ()
-
-instance Default.Default Enumerator_key where
-  def = Enumerator_key Default.def Default.def
-
-instance Hashable.Hashable Enumerator_key where
-  hashWithSalt __salt (Enumerator_key _name _enumeration)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-        _enumeration
-
-data EnumDefinition_key = EnumDefinition_key{enumDefinition_key_declaration
-                                             :: EnumDeclaration,
-                                             enumDefinition_key_enumBase :: Type,
-                                             enumDefinition_key_enumBaseTypeInfo ::
-                                             Prelude.Maybe TypeInfo,
-                                             enumDefinition_key_enumConstraint ::
-                                             Prelude.Maybe Type,
-                                             enumDefinition_key_enumConstraintTypeInfo ::
-                                             Prelude.Maybe TypeInfo,
-                                             enumDefinition_key_enumerators :: [Enumerator],
-                                             enumDefinition_key_attributes :: [UserAttribute],
-                                             enumDefinition_key_includes :: [EnumDeclaration],
-                                             enumDefinition_key_isEnumClass :: Prelude.Bool,
-                                             enumDefinition_key_module_ ::
-                                             Prelude.Maybe ModuleMembership}
-                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON EnumDefinition_key where
-  toJSON
-    (EnumDefinition_key __field__declaration __field__enumBase
-       __field__enumBaseTypeInfo __field__enumConstraint
-       __field__enumConstraintTypeInfo __field__enumerators
-       __field__attributes __field__includes __field__isEnumClass
-       __field__module_)
-    = Aeson.object
-        ("declaration" .= __field__declaration :
-           "enumBase" .= __field__enumBase :
-             Prelude.maybe Prelude.id ((:) . ("enumBaseTypeInfo" .=))
-               __field__enumBaseTypeInfo
-               (Prelude.maybe Prelude.id ((:) . ("enumConstraint" .=))
-                  __field__enumConstraint
-                  (Prelude.maybe Prelude.id ((:) . ("enumConstraintTypeInfo" .=))
-                     __field__enumConstraintTypeInfo
-                     ("enumerators" .= __field__enumerators :
-                        "attributes" .= __field__attributes :
-                          "includes" .= __field__includes :
-                            "isEnumClass" .= __field__isEnumClass :
-                              Prelude.maybe Prelude.id ((:) . ("module_" .=)) __field__module_
-                                Prelude.mempty))))
-
-instance Thrift.ThriftStruct EnumDefinition_key where
-  buildStruct _proxy
-    (EnumDefinition_key __field__declaration __field__enumBase
-       __field__enumBaseTypeInfo __field__enumConstraint
-       __field__enumConstraintTypeInfo __field__enumerators
-       __field__attributes __field__includes __field__isEnumClass
-       __field__module_)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "declaration" (Thrift.getStructType _proxy)
-           1
-           0
-           (Thrift.buildStruct _proxy __field__declaration)
-           :
-           Thrift.genField _proxy "enumBase" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__enumBase)
-             :
-             let (__cereal__enumBaseTypeInfo, __id__enumBaseTypeInfo)
-                   = case __field__enumBaseTypeInfo of
-                       Prelude.Just _val -> ((:)
-                                               (Thrift.genField _proxy "enumBaseTypeInfo"
-                                                  (Thrift.getStructType _proxy)
-                                                  3
-                                                  2
-                                                  (Thrift.buildStruct _proxy _val)),
-                                             3)
-                       Prelude.Nothing -> (Prelude.id, 2)
-               in
-               __cereal__enumBaseTypeInfo
-                 (let (__cereal__enumConstraint, __id__enumConstraint)
-                        = case __field__enumConstraint of
-                            Prelude.Just _val -> ((:)
-                                                    (Thrift.genField _proxy "enumConstraint"
-                                                       (Thrift.getStructType _proxy)
-                                                       4
-                                                       __id__enumBaseTypeInfo
-                                                       (Thrift.buildStruct _proxy _val)),
-                                                  4)
-                            Prelude.Nothing -> (Prelude.id, __id__enumBaseTypeInfo)
-                    in
-                    __cereal__enumConstraint
-                      (let (__cereal__enumConstraintTypeInfo,
-                            __id__enumConstraintTypeInfo)
-                             = case __field__enumConstraintTypeInfo of
-                                 Prelude.Just _val -> ((:)
-                                                         (Thrift.genField _proxy
-                                                            "enumConstraintTypeInfo"
-                                                            (Thrift.getStructType _proxy)
-                                                            5
-                                                            __id__enumConstraint
-                                                            (Thrift.buildStruct _proxy _val)),
-                                                       5)
-                                 Prelude.Nothing -> (Prelude.id, __id__enumConstraint)
-                         in
-                         __cereal__enumConstraintTypeInfo
-                           (Thrift.genField _proxy "enumerators" (Thrift.getListType _proxy) 6
-                              __id__enumConstraintTypeInfo
-                              (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                                 (Thrift.buildStruct _proxy)
-                                 __field__enumerators)
-                              :
-                              Thrift.genField _proxy "attributes" (Thrift.getListType _proxy) 7 6
-                                (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                                   (Thrift.buildStruct _proxy)
-                                   __field__attributes)
-                                :
-                                Thrift.genField _proxy "includes" (Thrift.getListType _proxy) 8 7
-                                  (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                                     (Thrift.buildStruct _proxy)
-                                     __field__includes)
-                                  :
-                                  Thrift.genFieldBool _proxy "isEnumClass" 9 8 __field__isEnumClass
-                                    :
-                                    case __field__module_ of
-                                      Prelude.Just _val -> Thrift.genField _proxy "module_"
-                                                             (Thrift.getStructType _proxy)
-                                                             10
-                                                             9
-                                                             (Thrift.buildStruct _proxy _val)
-                                                             : []
-                                      Prelude.Nothing -> []))))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__declaration <- ST.newSTRef Default.def
-            __field__enumBase <- ST.newSTRef Default.def
-            __field__enumBaseTypeInfo <- ST.newSTRef Prelude.Nothing
-            __field__enumConstraint <- ST.newSTRef Prelude.Nothing
-            __field__enumConstraintTypeInfo <- ST.newSTRef Prelude.Nothing
-            __field__enumerators <- ST.newSTRef Default.def
-            __field__attributes <- ST.newSTRef Default.def
-            __field__includes <- ST.newSTRef Default.def
-            __field__isEnumClass <- ST.newSTRef Prelude.False
-            __field__module_ <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__declaration
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__enumBase
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__enumBaseTypeInfo
-                                                                          (Prelude.Just _val)
-                                                                 4 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__enumConstraint
-                                                                          (Prelude.Just _val)
-                                                                 5 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__enumConstraintTypeInfo
-                                                                          (Prelude.Just _val)
-                                                                 6 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__enumerators
-                                                                          _val
-                                                                 7 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__attributes
-                                                                          _val
-                                                                 8 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__includes
-                                                                          _val
-                                                                 9 | _type ==
-                                                                       Thrift.getBoolType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseBoolF
-                                                                                      _proxy
-                                                                                      _bool)
-                                                                        ST.writeSTRef
-                                                                          __field__isEnumClass
-                                                                          _val
-                                                                 10 | _type ==
-                                                                        Thrift.getStructType _proxy
-                                                                      ->
-                                                                      do !_val <- Trans.lift
-                                                                                    (Thrift.parseStruct
-                                                                                       _proxy)
-                                                                         ST.writeSTRef
-                                                                           __field__module_
-                                                                           (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__declaration <- ST.readSTRef
-                                                                      __field__declaration
-                                             !__val__enumBase <- ST.readSTRef __field__enumBase
-                                             !__val__enumBaseTypeInfo <- ST.readSTRef
-                                                                           __field__enumBaseTypeInfo
-                                             !__val__enumConstraint <- ST.readSTRef
-                                                                         __field__enumConstraint
-                                             !__val__enumConstraintTypeInfo <- ST.readSTRef
-                                                                                 __field__enumConstraintTypeInfo
-                                             !__val__enumerators <- ST.readSTRef
-                                                                      __field__enumerators
-                                             !__val__attributes <- ST.readSTRef __field__attributes
-                                             !__val__includes <- ST.readSTRef __field__includes
-                                             !__val__isEnumClass <- ST.readSTRef
-                                                                      __field__isEnumClass
-                                             !__val__module_ <- ST.readSTRef __field__module_
-                                             Prelude.pure
-                                               (EnumDefinition_key __val__declaration
-                                                  __val__enumBase
-                                                  __val__enumBaseTypeInfo
-                                                  __val__enumConstraint
-                                                  __val__enumConstraintTypeInfo
-                                                  __val__enumerators
-                                                  __val__attributes
-                                                  __val__includes
-                                                  __val__isEnumClass
-                                                  __val__module_)
-              _idMap
-                = HashMap.fromList
-                    [("declaration", 1), ("enumBase", 2), ("enumBaseTypeInfo", 3),
-                     ("enumConstraint", 4), ("enumConstraintTypeInfo", 5),
-                     ("enumerators", 6), ("attributes", 7), ("includes", 8),
-                     ("isEnumClass", 9), ("module_", 10)]
-            _parse 0)
-
-instance DeepSeq.NFData EnumDefinition_key where
-  rnf
-    (EnumDefinition_key __field__declaration __field__enumBase
-       __field__enumBaseTypeInfo __field__enumConstraint
-       __field__enumConstraintTypeInfo __field__enumerators
-       __field__attributes __field__includes __field__isEnumClass
-       __field__module_)
-    = DeepSeq.rnf __field__declaration `Prelude.seq`
-        DeepSeq.rnf __field__enumBase `Prelude.seq`
-          DeepSeq.rnf __field__enumBaseTypeInfo `Prelude.seq`
-            DeepSeq.rnf __field__enumConstraint `Prelude.seq`
-              DeepSeq.rnf __field__enumConstraintTypeInfo `Prelude.seq`
-                DeepSeq.rnf __field__enumerators `Prelude.seq`
-                  DeepSeq.rnf __field__attributes `Prelude.seq`
-                    DeepSeq.rnf __field__includes `Prelude.seq`
-                      DeepSeq.rnf __field__isEnumClass `Prelude.seq`
-                        DeepSeq.rnf __field__module_ `Prelude.seq` ()
-
-instance Default.Default EnumDefinition_key where
-  def
-    = EnumDefinition_key Default.def Default.def Prelude.Nothing
-        Prelude.Nothing
-        Prelude.Nothing
-        Default.def
-        Default.def
-        Default.def
-        Prelude.False
-        Prelude.Nothing
-
-instance Hashable.Hashable EnumDefinition_key where
-  hashWithSalt __salt
-    (EnumDefinition_key _declaration _enumBase _enumBaseTypeInfo
-       _enumConstraint _enumConstraintTypeInfo _enumerators _attributes
-       _includes _isEnumClass _module_)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt
-              (Hashable.hashWithSalt
-                 (Hashable.hashWithSalt
-                    (Hashable.hashWithSalt
-                       (Hashable.hashWithSalt
-                          (Hashable.hashWithSalt
-                             (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _declaration)
-                                _enumBase)
-                             _enumBaseTypeInfo)
-                          _enumConstraint)
-                       _enumConstraintTypeInfo)
-                    _enumerators)
-                 _attributes)
-              _includes)
-           _isEnumClass)
-        _module_
-
-newtype EnumDeclaration_key = EnumDeclaration_key{enumDeclaration_key_name
-                                                  :: QName}
-                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON EnumDeclaration_key where
-  toJSON (EnumDeclaration_key __field__name)
-    = Aeson.object ("name" .= __field__name : Prelude.mempty)
-
-instance Thrift.ThriftStruct EnumDeclaration_key where
-  buildStruct _proxy (EnumDeclaration_key __field__name)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__name)
-           : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             Prelude.pure (EnumDeclaration_key __val__name)
-              _idMap = HashMap.fromList [("name", 1)]
-            _parse 0)
-
-instance DeepSeq.NFData EnumDeclaration_key where
-  rnf (EnumDeclaration_key __field__name)
-    = DeepSeq.rnf __field__name `Prelude.seq` ()
-
-instance Default.Default EnumDeclaration_key where
-  def = EnumDeclaration_key Default.def
-
-instance Hashable.Hashable EnumDeclaration_key where
-  hashWithSalt __salt (EnumDeclaration_key _name)
-    = Hashable.hashWithSalt __salt _name
-
-data Definition = Definition_class_ ClassDefinition
-                | Definition_classConst ClassConstDefinition
-                | Definition_enum_ EnumDefinition
-                | Definition_function_ FunctionDefinition
-                | Definition_globalConst GlobalConstDefinition
-                | Definition_interface_ InterfaceDefinition
-                | Definition_trait TraitDefinition
-                | Definition_method MethodDefinition
-                | Definition_property_ PropertyDefinition
-                | Definition_typeConst TypeConstDefinition
-                | Definition_typedef_ TypedefDefinition
-                | Definition_module ModuleDefinition
-                | Definition_EMPTY
-                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Definition where
-  toJSON (Definition_class_ __class_)
-    = Aeson.object ["class_" .= __class_]
-  toJSON (Definition_classConst __classConst)
-    = Aeson.object ["classConst" .= __classConst]
-  toJSON (Definition_enum_ __enum_)
-    = Aeson.object ["enum_" .= __enum_]
-  toJSON (Definition_function_ __function_)
-    = Aeson.object ["function_" .= __function_]
-  toJSON (Definition_globalConst __globalConst)
-    = Aeson.object ["globalConst" .= __globalConst]
-  toJSON (Definition_interface_ __interface_)
-    = Aeson.object ["interface_" .= __interface_]
-  toJSON (Definition_trait __trait)
-    = Aeson.object ["trait" .= __trait]
-  toJSON (Definition_method __method)
-    = Aeson.object ["method" .= __method]
-  toJSON (Definition_property_ __property_)
-    = Aeson.object ["property_" .= __property_]
-  toJSON (Definition_typeConst __typeConst)
-    = Aeson.object ["typeConst" .= __typeConst]
-  toJSON (Definition_typedef_ __typedef_)
-    = Aeson.object ["typedef_" .= __typedef_]
-  toJSON (Definition_module __module)
-    = Aeson.object ["module" .= __module]
-  toJSON Definition_EMPTY = Aeson.object []
-
-instance Thrift.ThriftStruct Definition where
-  buildStruct _proxy (Definition_class_ __class_)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "class_" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __class_)]
-  buildStruct _proxy (Definition_classConst __classConst)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "classConst" (Thrift.getStructType _proxy)
-           2
-           0
-           (Thrift.buildStruct _proxy __classConst)]
-  buildStruct _proxy (Definition_enum_ __enum_)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "enum_" (Thrift.getStructType _proxy) 3 0
-           (Thrift.buildStruct _proxy __enum_)]
-  buildStruct _proxy (Definition_function_ __function_)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "function_" (Thrift.getStructType _proxy) 4
-           0
-           (Thrift.buildStruct _proxy __function_)]
-  buildStruct _proxy (Definition_globalConst __globalConst)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "globalConst" (Thrift.getStructType _proxy)
-           5
-           0
-           (Thrift.buildStruct _proxy __globalConst)]
-  buildStruct _proxy (Definition_interface_ __interface_)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "interface_" (Thrift.getStructType _proxy)
-           6
-           0
-           (Thrift.buildStruct _proxy __interface_)]
-  buildStruct _proxy (Definition_trait __trait)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "trait" (Thrift.getStructType _proxy) 7 0
-           (Thrift.buildStruct _proxy __trait)]
-  buildStruct _proxy (Definition_method __method)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "method" (Thrift.getStructType _proxy) 8 0
-           (Thrift.buildStruct _proxy __method)]
-  buildStruct _proxy (Definition_property_ __property_)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "property_" (Thrift.getStructType _proxy) 9
-           0
-           (Thrift.buildStruct _proxy __property_)]
-  buildStruct _proxy (Definition_typeConst __typeConst)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "typeConst" (Thrift.getStructType _proxy)
-           10
-           0
-           (Thrift.buildStruct _proxy __typeConst)]
-  buildStruct _proxy (Definition_typedef_ __typedef_)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "typedef_" (Thrift.getStructType _proxy) 11
-           0
-           (Thrift.buildStruct _proxy __typedef_)]
-  buildStruct _proxy (Definition_module __module)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "module" (Thrift.getStructType _proxy) 12 0
-           (Thrift.buildStruct _proxy __module)]
-  buildStruct _proxy Definition_EMPTY = Thrift.genStruct _proxy []
-  parseStruct _proxy
-    = do _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap
-         case _fieldBegin of
-           Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                     1 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return (Definition_class_ _val)
-                                                     2 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return
-                                                              (Definition_classConst _val)
-                                                     3 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return (Definition_enum_ _val)
-                                                     4 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return
-                                                              (Definition_function_ _val)
-                                                     5 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return
-                                                              (Definition_globalConst _val)
-                                                     6 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return
-                                                              (Definition_interface_ _val)
-                                                     7 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return (Definition_trait _val)
-                                                     8 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return (Definition_method _val)
-                                                     9 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return
-                                                              (Definition_property_ _val)
-                                                     10 | _type == Thrift.getStructType _proxy ->
-                                                          do _val <- Thrift.parseStruct _proxy
-                                                             Thrift.parseStop _proxy
-                                                             Prelude.return
-                                                               (Definition_typeConst _val)
-                                                     11 | _type == Thrift.getStructType _proxy ->
-                                                          do _val <- Thrift.parseStruct _proxy
-                                                             Thrift.parseStop _proxy
-                                                             Prelude.return
-                                                               (Definition_typedef_ _val)
-                                                     12 | _type == Thrift.getStructType _proxy ->
-                                                          do _val <- Thrift.parseStruct _proxy
-                                                             Thrift.parseStop _proxy
-                                                             Prelude.return (Definition_module _val)
-                                                     _ -> do Thrift.parseSkip _proxy _type
-                                                               Prelude.Nothing
-                                                             Thrift.parseStop _proxy
-                                                             Prelude.return Definition_EMPTY
-           Thrift.FieldEnd -> Prelude.return Definition_EMPTY
-    where
-      _idMap
-        = HashMap.fromList
-            [("class_", 1), ("classConst", 2), ("enum_", 3), ("function_", 4),
-             ("globalConst", 5), ("interface_", 6), ("trait", 7), ("method", 8),
-             ("property_", 9), ("typeConst", 10), ("typedef_", 11),
-             ("module", 12)]
-
-instance DeepSeq.NFData Definition where
-  rnf (Definition_class_ __class_) = DeepSeq.rnf __class_
-  rnf (Definition_classConst __classConst) = DeepSeq.rnf __classConst
-  rnf (Definition_enum_ __enum_) = DeepSeq.rnf __enum_
-  rnf (Definition_function_ __function_) = DeepSeq.rnf __function_
-  rnf (Definition_globalConst __globalConst)
-    = DeepSeq.rnf __globalConst
-  rnf (Definition_interface_ __interface_) = DeepSeq.rnf __interface_
-  rnf (Definition_trait __trait) = DeepSeq.rnf __trait
-  rnf (Definition_method __method) = DeepSeq.rnf __method
-  rnf (Definition_property_ __property_) = DeepSeq.rnf __property_
-  rnf (Definition_typeConst __typeConst) = DeepSeq.rnf __typeConst
-  rnf (Definition_typedef_ __typedef_) = DeepSeq.rnf __typedef_
-  rnf (Definition_module __module) = DeepSeq.rnf __module
-  rnf Definition_EMPTY = ()
-
-instance Default.Default Definition where
-  def = Definition_EMPTY
-
-instance Hashable.Hashable Definition where
-  hashWithSalt __salt (Definition_class_ _class_)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 1 _class_)
-  hashWithSalt __salt (Definition_classConst _classConst)
-    = Hashable.hashWithSalt __salt
-        (Hashable.hashWithSalt 2 _classConst)
-  hashWithSalt __salt (Definition_enum_ _enum_)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 3 _enum_)
-  hashWithSalt __salt (Definition_function_ _function_)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 4 _function_)
-  hashWithSalt __salt (Definition_globalConst _globalConst)
-    = Hashable.hashWithSalt __salt
-        (Hashable.hashWithSalt 5 _globalConst)
-  hashWithSalt __salt (Definition_interface_ _interface_)
-    = Hashable.hashWithSalt __salt
-        (Hashable.hashWithSalt 6 _interface_)
-  hashWithSalt __salt (Definition_trait _trait)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 7 _trait)
-  hashWithSalt __salt (Definition_method _method)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 8 _method)
-  hashWithSalt __salt (Definition_property_ _property_)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 9 _property_)
-  hashWithSalt __salt (Definition_typeConst _typeConst)
-    = Hashable.hashWithSalt __salt
-        (Hashable.hashWithSalt 10 _typeConst)
-  hashWithSalt __salt (Definition_typedef_ _typedef_)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 11 _typedef_)
-  hashWithSalt __salt (Definition_module _module)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 12 _module)
-  hashWithSalt __salt Definition_EMPTY
-    = Hashable.hashWithSalt __salt (0 :: Prelude.Int)
-
-data ContainerDeclaration = ContainerDeclaration_class_ ClassDeclaration
-                          | ContainerDeclaration_enum_ EnumDeclaration
-                          | ContainerDeclaration_interface_ InterfaceDeclaration
-                          | ContainerDeclaration_trait TraitDeclaration
-                          | ContainerDeclaration_EMPTY
-                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ContainerDeclaration where
-  toJSON (ContainerDeclaration_class_ __class_)
-    = Aeson.object ["class_" .= __class_]
-  toJSON (ContainerDeclaration_enum_ __enum_)
-    = Aeson.object ["enum_" .= __enum_]
-  toJSON (ContainerDeclaration_interface_ __interface_)
-    = Aeson.object ["interface_" .= __interface_]
-  toJSON (ContainerDeclaration_trait __trait)
-    = Aeson.object ["trait" .= __trait]
-  toJSON ContainerDeclaration_EMPTY = Aeson.object []
-
-instance Thrift.ThriftStruct ContainerDeclaration where
-  buildStruct _proxy (ContainerDeclaration_class_ __class_)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "class_" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __class_)]
-  buildStruct _proxy (ContainerDeclaration_enum_ __enum_)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "enum_" (Thrift.getStructType _proxy) 2 0
-           (Thrift.buildStruct _proxy __enum_)]
-  buildStruct _proxy (ContainerDeclaration_interface_ __interface_)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "interface_" (Thrift.getStructType _proxy)
-           3
-           0
-           (Thrift.buildStruct _proxy __interface_)]
-  buildStruct _proxy (ContainerDeclaration_trait __trait)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "trait" (Thrift.getStructType _proxy) 4 0
-           (Thrift.buildStruct _proxy __trait)]
-  buildStruct _proxy ContainerDeclaration_EMPTY
-    = Thrift.genStruct _proxy []
-  parseStruct _proxy
-    = do _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap
-         case _fieldBegin of
-           Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                     1 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return
-                                                              (ContainerDeclaration_class_ _val)
-                                                     2 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return
-                                                              (ContainerDeclaration_enum_ _val)
-                                                     3 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return
-                                                              (ContainerDeclaration_interface_ _val)
-                                                     4 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return
-                                                              (ContainerDeclaration_trait _val)
-                                                     _ -> do Thrift.parseSkip _proxy _type
-                                                               Prelude.Nothing
-                                                             Thrift.parseStop _proxy
-                                                             Prelude.return
-                                                               ContainerDeclaration_EMPTY
-           Thrift.FieldEnd -> Prelude.return ContainerDeclaration_EMPTY
-    where
-      _idMap
-        = HashMap.fromList
-            [("class_", 1), ("enum_", 2), ("interface_", 3), ("trait", 4)]
-
-instance DeepSeq.NFData ContainerDeclaration where
-  rnf (ContainerDeclaration_class_ __class_) = DeepSeq.rnf __class_
-  rnf (ContainerDeclaration_enum_ __enum_) = DeepSeq.rnf __enum_
-  rnf (ContainerDeclaration_interface_ __interface_)
-    = DeepSeq.rnf __interface_
-  rnf (ContainerDeclaration_trait __trait) = DeepSeq.rnf __trait
-  rnf ContainerDeclaration_EMPTY = ()
-
-instance Default.Default ContainerDeclaration where
-  def = ContainerDeclaration_EMPTY
-
-instance Hashable.Hashable ContainerDeclaration where
-  hashWithSalt __salt (ContainerDeclaration_class_ _class_)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 1 _class_)
-  hashWithSalt __salt (ContainerDeclaration_enum_ _enum_)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 2 _enum_)
-  hashWithSalt __salt (ContainerDeclaration_interface_ _interface_)
-    = Hashable.hashWithSalt __salt
-        (Hashable.hashWithSalt 3 _interface_)
-  hashWithSalt __salt (ContainerDeclaration_trait _trait)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 4 _trait)
-  hashWithSalt __salt ContainerDeclaration_EMPTY
-    = Hashable.hashWithSalt __salt (0 :: Prelude.Int)
-
-type ContainerDeclarationQName_value = QName
-
-data ContainerParent_key = ContainerParent_key{containerParent_key_container
-                                               :: ContainerDeclaration,
-                                               containerParent_key_parent :: ContainerDeclaration}
-                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ContainerParent_key where
-  toJSON (ContainerParent_key __field__container __field__parent)
-    = Aeson.object
-        ("container" .= __field__container :
-           "parent" .= __field__parent : Prelude.mempty)
-
-instance Thrift.ThriftStruct ContainerParent_key where
-  buildStruct _proxy
-    (ContainerParent_key __field__container __field__parent)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "container" (Thrift.getStructType _proxy) 1
-           0
-           (Thrift.buildStruct _proxy __field__container)
-           :
-           Thrift.genField _proxy "parent" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__parent)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__container <- ST.newSTRef Default.def
-            __field__parent <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__container
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__parent
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__container <- ST.readSTRef
-                                                                    __field__container
-                                             !__val__parent <- ST.readSTRef __field__parent
-                                             Prelude.pure
-                                               (ContainerParent_key __val__container __val__parent)
-              _idMap = HashMap.fromList [("container", 1), ("parent", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData ContainerParent_key where
-  rnf (ContainerParent_key __field__container __field__parent)
-    = DeepSeq.rnf __field__container `Prelude.seq`
-        DeepSeq.rnf __field__parent `Prelude.seq` ()
-
-instance Default.Default ContainerParent_key where
-  def = ContainerParent_key Default.def Default.def
-
-instance Hashable.Hashable ContainerParent_key where
-  hashWithSalt __salt (ContainerParent_key _container _parent)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _container)
-        _parent
-
-data Declaration = Declaration_classConst ClassConstDeclaration
-                 | Declaration_container ContainerDeclaration
-                 | Declaration_enumerator Enumerator
-                 | Declaration_function_ FunctionDeclaration
-                 | Declaration_globalConst GlobalConstDeclaration
-                 | Declaration_namespace_ NamespaceDeclaration
-                 | Declaration_method MethodDeclaration
-                 | Declaration_property_ PropertyDeclaration
-                 | Declaration_typeConst TypeConstDeclaration
-                 | Declaration_typedef_ TypedefDeclaration
-                 | Declaration_module ModuleDeclaration
-                 | Declaration_EMPTY
-                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Declaration where
-  toJSON (Declaration_classConst __classConst)
-    = Aeson.object ["classConst" .= __classConst]
-  toJSON (Declaration_container __container)
-    = Aeson.object ["container" .= __container]
-  toJSON (Declaration_enumerator __enumerator)
-    = Aeson.object ["enumerator" .= __enumerator]
-  toJSON (Declaration_function_ __function_)
-    = Aeson.object ["function_" .= __function_]
-  toJSON (Declaration_globalConst __globalConst)
-    = Aeson.object ["globalConst" .= __globalConst]
-  toJSON (Declaration_namespace_ __namespace_)
-    = Aeson.object ["namespace_" .= __namespace_]
-  toJSON (Declaration_method __method)
-    = Aeson.object ["method" .= __method]
-  toJSON (Declaration_property_ __property_)
-    = Aeson.object ["property_" .= __property_]
-  toJSON (Declaration_typeConst __typeConst)
-    = Aeson.object ["typeConst" .= __typeConst]
-  toJSON (Declaration_typedef_ __typedef_)
-    = Aeson.object ["typedef_" .= __typedef_]
-  toJSON (Declaration_module __module)
-    = Aeson.object ["module" .= __module]
-  toJSON Declaration_EMPTY = Aeson.object []
-
-instance Thrift.ThriftStruct Declaration where
-  buildStruct _proxy (Declaration_classConst __classConst)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "classConst" (Thrift.getStructType _proxy)
-           1
-           0
-           (Thrift.buildStruct _proxy __classConst)]
-  buildStruct _proxy (Declaration_container __container)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "container" (Thrift.getStructType _proxy) 2
-           0
-           (Thrift.buildStruct _proxy __container)]
-  buildStruct _proxy (Declaration_enumerator __enumerator)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "enumerator" (Thrift.getStructType _proxy)
-           3
-           0
-           (Thrift.buildStruct _proxy __enumerator)]
-  buildStruct _proxy (Declaration_function_ __function_)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "function_" (Thrift.getStructType _proxy) 4
-           0
-           (Thrift.buildStruct _proxy __function_)]
-  buildStruct _proxy (Declaration_globalConst __globalConst)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "globalConst" (Thrift.getStructType _proxy)
-           5
-           0
-           (Thrift.buildStruct _proxy __globalConst)]
-  buildStruct _proxy (Declaration_namespace_ __namespace_)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "namespace_" (Thrift.getStructType _proxy)
-           6
-           0
-           (Thrift.buildStruct _proxy __namespace_)]
-  buildStruct _proxy (Declaration_method __method)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "method" (Thrift.getStructType _proxy) 7 0
-           (Thrift.buildStruct _proxy __method)]
-  buildStruct _proxy (Declaration_property_ __property_)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "property_" (Thrift.getStructType _proxy) 8
-           0
-           (Thrift.buildStruct _proxy __property_)]
-  buildStruct _proxy (Declaration_typeConst __typeConst)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "typeConst" (Thrift.getStructType _proxy) 9
-           0
-           (Thrift.buildStruct _proxy __typeConst)]
-  buildStruct _proxy (Declaration_typedef_ __typedef_)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "typedef_" (Thrift.getStructType _proxy) 10
-           0
-           (Thrift.buildStruct _proxy __typedef_)]
-  buildStruct _proxy (Declaration_module __module)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "module" (Thrift.getStructType _proxy) 11 0
-           (Thrift.buildStruct _proxy __module)]
-  buildStruct _proxy Declaration_EMPTY = Thrift.genStruct _proxy []
-  parseStruct _proxy
-    = do _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap
-         case _fieldBegin of
-           Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                     1 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return
-                                                              (Declaration_classConst _val)
-                                                     2 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return
-                                                              (Declaration_container _val)
-                                                     3 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return
-                                                              (Declaration_enumerator _val)
-                                                     4 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return
-                                                              (Declaration_function_ _val)
-                                                     5 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return
-                                                              (Declaration_globalConst _val)
-                                                     6 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return
-                                                              (Declaration_namespace_ _val)
-                                                     7 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return (Declaration_method _val)
-                                                     8 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return
-                                                              (Declaration_property_ _val)
-                                                     9 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return
-                                                              (Declaration_typeConst _val)
-                                                     10 | _type == Thrift.getStructType _proxy ->
-                                                          do _val <- Thrift.parseStruct _proxy
-                                                             Thrift.parseStop _proxy
-                                                             Prelude.return
-                                                               (Declaration_typedef_ _val)
-                                                     11 | _type == Thrift.getStructType _proxy ->
-                                                          do _val <- Thrift.parseStruct _proxy
-                                                             Thrift.parseStop _proxy
-                                                             Prelude.return
-                                                               (Declaration_module _val)
-                                                     _ -> do Thrift.parseSkip _proxy _type
-                                                               Prelude.Nothing
-                                                             Thrift.parseStop _proxy
-                                                             Prelude.return Declaration_EMPTY
-           Thrift.FieldEnd -> Prelude.return Declaration_EMPTY
-    where
-      _idMap
-        = HashMap.fromList
-            [("classConst", 1), ("container", 2), ("enumerator", 3),
-             ("function_", 4), ("globalConst", 5), ("namespace_", 6),
-             ("method", 7), ("property_", 8), ("typeConst", 9),
-             ("typedef_", 10), ("module", 11)]
-
-instance DeepSeq.NFData Declaration where
-  rnf (Declaration_classConst __classConst)
-    = DeepSeq.rnf __classConst
-  rnf (Declaration_container __container) = DeepSeq.rnf __container
-  rnf (Declaration_enumerator __enumerator)
-    = DeepSeq.rnf __enumerator
-  rnf (Declaration_function_ __function_) = DeepSeq.rnf __function_
-  rnf (Declaration_globalConst __globalConst)
-    = DeepSeq.rnf __globalConst
-  rnf (Declaration_namespace_ __namespace_)
-    = DeepSeq.rnf __namespace_
-  rnf (Declaration_method __method) = DeepSeq.rnf __method
-  rnf (Declaration_property_ __property_) = DeepSeq.rnf __property_
-  rnf (Declaration_typeConst __typeConst) = DeepSeq.rnf __typeConst
-  rnf (Declaration_typedef_ __typedef_) = DeepSeq.rnf __typedef_
-  rnf (Declaration_module __module) = DeepSeq.rnf __module
-  rnf Declaration_EMPTY = ()
-
-instance Default.Default Declaration where
-  def = Declaration_EMPTY
-
-instance Hashable.Hashable Declaration where
-  hashWithSalt __salt (Declaration_classConst _classConst)
-    = Hashable.hashWithSalt __salt
-        (Hashable.hashWithSalt 1 _classConst)
-  hashWithSalt __salt (Declaration_container _container)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 2 _container)
-  hashWithSalt __salt (Declaration_enumerator _enumerator)
-    = Hashable.hashWithSalt __salt
-        (Hashable.hashWithSalt 3 _enumerator)
-  hashWithSalt __salt (Declaration_function_ _function_)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 4 _function_)
-  hashWithSalt __salt (Declaration_globalConst _globalConst)
-    = Hashable.hashWithSalt __salt
-        (Hashable.hashWithSalt 5 _globalConst)
-  hashWithSalt __salt (Declaration_namespace_ _namespace_)
-    = Hashable.hashWithSalt __salt
-        (Hashable.hashWithSalt 6 _namespace_)
-  hashWithSalt __salt (Declaration_method _method)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 7 _method)
-  hashWithSalt __salt (Declaration_property_ _property_)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 8 _property_)
-  hashWithSalt __salt (Declaration_typeConst _typeConst)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 9 _typeConst)
-  hashWithSalt __salt (Declaration_typedef_ _typedef_)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 10 _typedef_)
-  hashWithSalt __salt (Declaration_module _module)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 11 _module)
-  hashWithSalt __salt Declaration_EMPTY
-    = Hashable.hashWithSalt __salt (0 :: Prelude.Int)
-
-data DeclarationComment_key = DeclarationComment_key{declarationComment_key_declaration
-                                                     :: Declaration,
-                                                     declarationComment_key_file ::
-                                                     Glean.Schema.Src.File,
-                                                     declarationComment_key_span ::
-                                                     Glean.Schema.Src.ByteSpan}
-                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON DeclarationComment_key where
-  toJSON
-    (DeclarationComment_key __field__declaration __field__file
-       __field__span)
-    = Aeson.object
-        ("declaration" .= __field__declaration :
-           "file" .= __field__file : "span" .= __field__span : Prelude.mempty)
-
-instance Thrift.ThriftStruct DeclarationComment_key where
-  buildStruct _proxy
-    (DeclarationComment_key __field__declaration __field__file
-       __field__span)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "declaration" (Thrift.getStructType _proxy)
-           1
-           0
-           (Thrift.buildStruct _proxy __field__declaration)
-           :
-           Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__file)
-             :
-             Thrift.genField _proxy "span" (Thrift.getStructType _proxy) 3 2
-               (Thrift.buildStruct _proxy __field__span)
-               : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__declaration <- ST.newSTRef Default.def
-            __field__file <- ST.newSTRef Default.def
-            __field__span <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__declaration
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__file
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__span
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__declaration <- ST.readSTRef
-                                                                      __field__declaration
-                                             !__val__file <- ST.readSTRef __field__file
-                                             !__val__span <- ST.readSTRef __field__span
-                                             Prelude.pure
-                                               (DeclarationComment_key __val__declaration
-                                                  __val__file
-                                                  __val__span)
-              _idMap
-                = HashMap.fromList [("declaration", 1), ("file", 2), ("span", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData DeclarationComment_key where
-  rnf
-    (DeclarationComment_key __field__declaration __field__file
-       __field__span)
-    = DeepSeq.rnf __field__declaration `Prelude.seq`
-        DeepSeq.rnf __field__file `Prelude.seq`
-          DeepSeq.rnf __field__span `Prelude.seq` ()
-
-instance Default.Default DeclarationComment_key where
-  def = DeclarationComment_key Default.def Default.def Default.def
-
-instance Hashable.Hashable DeclarationComment_key where
-  hashWithSalt __salt
-    (DeclarationComment_key _declaration _file _span)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _declaration)
-           _file)
-        _span
-
-data DeclarationLocation_key = DeclarationLocation_key{declarationLocation_key_declaration
-                                                       :: Declaration,
-                                                       declarationLocation_key_file ::
-                                                       Glean.Schema.Src.File,
-                                                       declarationLocation_key_span ::
-                                                       Glean.Schema.Src.ByteSpan}
-                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON DeclarationLocation_key where
-  toJSON
-    (DeclarationLocation_key __field__declaration __field__file
-       __field__span)
-    = Aeson.object
-        ("declaration" .= __field__declaration :
-           "file" .= __field__file : "span" .= __field__span : Prelude.mempty)
-
-instance Thrift.ThriftStruct DeclarationLocation_key where
-  buildStruct _proxy
-    (DeclarationLocation_key __field__declaration __field__file
-       __field__span)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "declaration" (Thrift.getStructType _proxy)
-           1
-           0
-           (Thrift.buildStruct _proxy __field__declaration)
-           :
-           Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__file)
-             :
-             Thrift.genField _proxy "span" (Thrift.getStructType _proxy) 3 2
-               (Thrift.buildStruct _proxy __field__span)
-               : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__declaration <- ST.newSTRef Default.def
-            __field__file <- ST.newSTRef Default.def
-            __field__span <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__declaration
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__file
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__span
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__declaration <- ST.readSTRef
-                                                                      __field__declaration
-                                             !__val__file <- ST.readSTRef __field__file
-                                             !__val__span <- ST.readSTRef __field__span
-                                             Prelude.pure
-                                               (DeclarationLocation_key __val__declaration
-                                                  __val__file
-                                                  __val__span)
-              _idMap
-                = HashMap.fromList [("declaration", 1), ("file", 2), ("span", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData DeclarationLocation_key where
-  rnf
-    (DeclarationLocation_key __field__declaration __field__file
-       __field__span)
-    = DeepSeq.rnf __field__declaration `Prelude.seq`
-        DeepSeq.rnf __field__file `Prelude.seq`
-          DeepSeq.rnf __field__span `Prelude.seq` ()
-
-instance Default.Default DeclarationLocation_key where
-  def = DeclarationLocation_key Default.def Default.def Default.def
-
-instance Hashable.Hashable DeclarationLocation_key where
-  hashWithSalt __salt
-    (DeclarationLocation_key _declaration _file _span)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _declaration)
-           _file)
-        _span
-
-type DeclarationName_value = Name
-
-data DeclarationNamespace_key = DeclarationNamespace_key{declarationNamespace_key_decl
-                                                         :: Declaration,
-                                                         declarationNamespace_key_namespace_ ::
-                                                         NamespaceQName}
-                                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON DeclarationNamespace_key where
-  toJSON (DeclarationNamespace_key __field__decl __field__namespace_)
-    = Aeson.object
-        ("decl" .= __field__decl :
-           "namespace_" .= __field__namespace_ : Prelude.mempty)
-
-instance Thrift.ThriftStruct DeclarationNamespace_key where
-  buildStruct _proxy
-    (DeclarationNamespace_key __field__decl __field__namespace_)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "decl" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__decl)
-           :
-           Thrift.genField _proxy "namespace_" (Thrift.getStructType _proxy) 2
-             1
-             (Thrift.buildStruct _proxy __field__namespace_)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__decl <- ST.newSTRef Default.def
-            __field__namespace_ <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__decl
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__namespace_
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__decl <- ST.readSTRef __field__decl
-                                             !__val__namespace_ <- ST.readSTRef __field__namespace_
-                                             Prelude.pure
-                                               (DeclarationNamespace_key __val__decl
-                                                  __val__namespace_)
-              _idMap = HashMap.fromList [("decl", 1), ("namespace_", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData DeclarationNamespace_key where
-  rnf (DeclarationNamespace_key __field__decl __field__namespace_)
-    = DeepSeq.rnf __field__decl `Prelude.seq`
-        DeepSeq.rnf __field__namespace_ `Prelude.seq` ()
-
-instance Default.Default DeclarationNamespace_key where
-  def = DeclarationNamespace_key Default.def Default.def
-
-instance Hashable.Hashable DeclarationNamespace_key where
-  hashWithSalt __salt (DeclarationNamespace_key _decl _namespace_)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _decl)
-        _namespace_
-
-data DeclarationSource_key = DeclarationSource_key{declarationSource_key_target
-                                                   :: Declaration,
-                                                   declarationSource_key_source :: Declaration}
-                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON DeclarationSource_key where
-  toJSON (DeclarationSource_key __field__target __field__source)
-    = Aeson.object
-        ("target" .= __field__target :
-           "source" .= __field__source : Prelude.mempty)
-
-instance Thrift.ThriftStruct DeclarationSource_key where
-  buildStruct _proxy
-    (DeclarationSource_key __field__target __field__source)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__target)
-           :
-           Thrift.genField _proxy "source" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__source)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__target <- ST.newSTRef Default.def
-            __field__source <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__target
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__source
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__target <- ST.readSTRef
-                                                                 __field__target
-                                             !__val__source <- ST.readSTRef __field__source
-                                             Prelude.pure
-                                               (DeclarationSource_key __val__target __val__source)
-              _idMap = HashMap.fromList [("target", 1), ("source", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData DeclarationSource_key where
-  rnf (DeclarationSource_key __field__target __field__source)
-    = DeepSeq.rnf __field__target `Prelude.seq`
-        DeepSeq.rnf __field__source `Prelude.seq` ()
-
-instance Default.Default DeclarationSource_key where
-  def = DeclarationSource_key Default.def Default.def
-
-instance Hashable.Hashable DeclarationSource_key where
-  hashWithSalt __salt (DeclarationSource_key _target _source)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _target)
-        _source
-
-data DeclarationSpan_key = DeclarationSpan_key{declarationSpan_key_declaration
-                                               :: Declaration,
-                                               declarationSpan_key_file :: Glean.Schema.Src.File,
-                                               declarationSpan_key_span ::
-                                               Glean.Schema.Src.ByteSpan}
-                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON DeclarationSpan_key where
-  toJSON
-    (DeclarationSpan_key __field__declaration __field__file
-       __field__span)
-    = Aeson.object
-        ("declaration" .= __field__declaration :
-           "file" .= __field__file : "span" .= __field__span : Prelude.mempty)
-
-instance Thrift.ThriftStruct DeclarationSpan_key where
-  buildStruct _proxy
-    (DeclarationSpan_key __field__declaration __field__file
-       __field__span)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "declaration" (Thrift.getStructType _proxy)
-           1
-           0
-           (Thrift.buildStruct _proxy __field__declaration)
-           :
-           Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__file)
-             :
-             Thrift.genField _proxy "span" (Thrift.getStructType _proxy) 3 2
-               (Thrift.buildStruct _proxy __field__span)
-               : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__declaration <- ST.newSTRef Default.def
-            __field__file <- ST.newSTRef Default.def
-            __field__span <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__declaration
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__file
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__span
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__declaration <- ST.readSTRef
-                                                                      __field__declaration
-                                             !__val__file <- ST.readSTRef __field__file
-                                             !__val__span <- ST.readSTRef __field__span
-                                             Prelude.pure
-                                               (DeclarationSpan_key __val__declaration __val__file
-                                                  __val__span)
-              _idMap
-                = HashMap.fromList [("declaration", 1), ("file", 2), ("span", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData DeclarationSpan_key where
-  rnf
-    (DeclarationSpan_key __field__declaration __field__file
-       __field__span)
-    = DeepSeq.rnf __field__declaration `Prelude.seq`
-        DeepSeq.rnf __field__file `Prelude.seq`
-          DeepSeq.rnf __field__span `Prelude.seq` ()
-
-instance Default.Default DeclarationSpan_key where
-  def = DeclarationSpan_key Default.def Default.def Default.def
-
-instance Hashable.Hashable DeclarationSpan_key where
-  hashWithSalt __salt (DeclarationSpan_key _declaration _file _span)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _declaration)
-           _file)
-        _span
-
-data DeclarationTarget_key = DeclarationTarget_key{declarationTarget_key_source
-                                                   :: Declaration,
-                                                   declarationTarget_key_target :: Declaration}
-                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON DeclarationTarget_key where
-  toJSON (DeclarationTarget_key __field__source __field__target)
-    = Aeson.object
-        ("source" .= __field__source :
-           "target" .= __field__target : Prelude.mempty)
-
-instance Thrift.ThriftStruct DeclarationTarget_key where
-  buildStruct _proxy
-    (DeclarationTarget_key __field__source __field__target)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "source" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__source)
-           :
-           Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__target)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__source <- ST.newSTRef Default.def
-            __field__target <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__source
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__target
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__source <- ST.readSTRef
-                                                                 __field__source
-                                             !__val__target <- ST.readSTRef __field__target
-                                             Prelude.pure
-                                               (DeclarationTarget_key __val__source __val__target)
-              _idMap = HashMap.fromList [("source", 1), ("target", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData DeclarationTarget_key where
-  rnf (DeclarationTarget_key __field__source __field__target)
-    = DeepSeq.rnf __field__source `Prelude.seq`
-        DeepSeq.rnf __field__target `Prelude.seq` ()
-
-instance Default.Default DeclarationTarget_key where
-  def = DeclarationTarget_key Default.def Default.def
-
-instance Hashable.Hashable DeclarationTarget_key where
-  hashWithSalt __salt (DeclarationTarget_key _source _target)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _source)
-        _target
-
-data FileDeclarations_key = FileDeclarations_key{fileDeclarations_key_file
-                                                 :: Glean.Schema.Src.File,
-                                                 fileDeclarations_key_declarations :: [Declaration]}
-                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON FileDeclarations_key where
-  toJSON (FileDeclarations_key __field__file __field__declarations)
-    = Aeson.object
-        ("file" .= __field__file :
-           "declarations" .= __field__declarations : Prelude.mempty)
-
-instance Thrift.ThriftStruct FileDeclarations_key where
-  buildStruct _proxy
-    (FileDeclarations_key __field__file __field__declarations)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__file)
-           :
-           Thrift.genField _proxy "declarations" (Thrift.getListType _proxy) 2
-             1
-             (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                (Thrift.buildStruct _proxy)
-                __field__declarations)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__file <- ST.newSTRef Default.def
-            __field__declarations <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__file
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__declarations
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__file <- ST.readSTRef __field__file
-                                             !__val__declarations <- ST.readSTRef
-                                                                       __field__declarations
-                                             Prelude.pure
-                                               (FileDeclarations_key __val__file
-                                                  __val__declarations)
-              _idMap = HashMap.fromList [("file", 1), ("declarations", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData FileDeclarations_key where
-  rnf (FileDeclarations_key __field__file __field__declarations)
-    = DeepSeq.rnf __field__file `Prelude.seq`
-        DeepSeq.rnf __field__declarations `Prelude.seq` ()
-
-instance Default.Default FileDeclarations_key where
-  def = FileDeclarations_key Default.def Default.def
-
-instance Hashable.Hashable FileDeclarations_key where
-  hashWithSalt __salt (FileDeclarations_key _file _declarations)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _file)
-        _declarations
-
-data HackToThrift_key = HackToThrift_key{hackToThrift_key_from ::
-                                         Declaration,
-                                         hackToThrift_key_to :: Glean.Schema.Fbthrift.Declaration}
-                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON HackToThrift_key where
-  toJSON (HackToThrift_key __field__from __field__to)
-    = Aeson.object
-        ("from" .= __field__from : "to" .= __field__to : Prelude.mempty)
-
-instance Thrift.ThriftStruct HackToThrift_key where
-  buildStruct _proxy (HackToThrift_key __field__from __field__to)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "from" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__from)
-           :
-           Thrift.genField _proxy "to" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__to)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__from <- ST.newSTRef Default.def
-            __field__to <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__from
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__to
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__from <- ST.readSTRef __field__from
-                                             !__val__to <- ST.readSTRef __field__to
-                                             Prelude.pure (HackToThrift_key __val__from __val__to)
-              _idMap = HashMap.fromList [("from", 1), ("to", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData HackToThrift_key where
-  rnf (HackToThrift_key __field__from __field__to)
-    = DeepSeq.rnf __field__from `Prelude.seq`
-        DeepSeq.rnf __field__to `Prelude.seq` ()
-
-instance Default.Default HackToThrift_key where
-  def = HackToThrift_key Default.def Default.def
-
-instance Hashable.Hashable HackToThrift_key where
-  hashWithSalt __salt (HackToThrift_key _from _to)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _from) _to
-
-newtype MemberCluster_key = MemberCluster_key{memberCluster_key_members
-                                              :: [Declaration]}
-                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON MemberCluster_key where
-  toJSON (MemberCluster_key __field__members)
-    = Aeson.object ("members" .= __field__members : Prelude.mempty)
-
-instance Thrift.ThriftStruct MemberCluster_key where
-  buildStruct _proxy (MemberCluster_key __field__members)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "members" (Thrift.getListType _proxy) 1 0
-           (Thrift.genList _proxy (Thrift.getStructType _proxy)
-              (Thrift.buildStruct _proxy)
-              __field__members)
-           : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__members <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__members
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__members <- ST.readSTRef
-                                                                  __field__members
-                                             Prelude.pure (MemberCluster_key __val__members)
-              _idMap = HashMap.fromList [("members", 1)]
-            _parse 0)
-
-instance DeepSeq.NFData MemberCluster_key where
-  rnf (MemberCluster_key __field__members)
-    = DeepSeq.rnf __field__members `Prelude.seq` ()
-
-instance Default.Default MemberCluster_key where
-  def = MemberCluster_key Default.def
-
-instance Hashable.Hashable MemberCluster_key where
-  hashWithSalt __salt (MemberCluster_key _members)
-    = Hashable.hashWithSalt __salt _members
-
-data ModuleChild_key = ModuleChild_key{moduleChild_key_module ::
-                                       ModuleDeclaration,
-                                       moduleChild_key_decl :: Declaration}
-                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ModuleChild_key where
-  toJSON (ModuleChild_key __field__module __field__decl)
-    = Aeson.object
-        ("module" .= __field__module :
-           "decl" .= __field__decl : Prelude.mempty)
-
-instance Thrift.ThriftStruct ModuleChild_key where
-  buildStruct _proxy (ModuleChild_key __field__module __field__decl)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "module" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__module)
-           :
-           Thrift.genField _proxy "decl" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__decl)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__module <- ST.newSTRef Default.def
-            __field__decl <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__module
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__decl
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__module <- ST.readSTRef
-                                                                 __field__module
-                                             !__val__decl <- ST.readSTRef __field__decl
-                                             Prelude.pure
-                                               (ModuleChild_key __val__module __val__decl)
-              _idMap = HashMap.fromList [("module", 1), ("decl", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData ModuleChild_key where
-  rnf (ModuleChild_key __field__module __field__decl)
-    = DeepSeq.rnf __field__module `Prelude.seq`
-        DeepSeq.rnf __field__decl `Prelude.seq` ()
-
-instance Default.Default ModuleChild_key where
-  def = ModuleChild_key Default.def Default.def
-
-instance Hashable.Hashable ModuleChild_key where
-  hashWithSalt __salt (ModuleChild_key _module _decl)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _module)
-        _decl
-
-data ModuleParent_key = ModuleParent_key{moduleParent_key_decl ::
-                                         Declaration,
-                                         moduleParent_key_module :: ModuleDeclaration}
-                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ModuleParent_key where
-  toJSON (ModuleParent_key __field__decl __field__module)
-    = Aeson.object
-        ("decl" .= __field__decl :
-           "module" .= __field__module : Prelude.mempty)
-
-instance Thrift.ThriftStruct ModuleParent_key where
-  buildStruct _proxy (ModuleParent_key __field__decl __field__module)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "decl" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__decl)
-           :
-           Thrift.genField _proxy "module" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__module)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__decl <- ST.newSTRef Default.def
-            __field__module <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__decl
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__module
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__decl <- ST.readSTRef __field__decl
-                                             !__val__module <- ST.readSTRef __field__module
-                                             Prelude.pure
-                                               (ModuleParent_key __val__decl __val__module)
-              _idMap = HashMap.fromList [("decl", 1), ("module", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData ModuleParent_key where
-  rnf (ModuleParent_key __field__decl __field__module)
-    = DeepSeq.rnf __field__decl `Prelude.seq`
-        DeepSeq.rnf __field__module `Prelude.seq` ()
-
-instance Default.Default ModuleParent_key where
-  def = ModuleParent_key Default.def Default.def
-
-instance Hashable.Hashable ModuleParent_key where
-  hashWithSalt __salt (ModuleParent_key _decl _module)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _decl)
-        _module
-
-data NamespaceMember_key = NamespaceMember_key{namespaceMember_key_namespace_
-                                               :: NamespaceQName,
-                                               namespaceMember_key_decl :: Declaration}
-                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON NamespaceMember_key where
-  toJSON (NamespaceMember_key __field__namespace_ __field__decl)
-    = Aeson.object
-        ("namespace_" .= __field__namespace_ :
-           "decl" .= __field__decl : Prelude.mempty)
-
-instance Thrift.ThriftStruct NamespaceMember_key where
-  buildStruct _proxy
-    (NamespaceMember_key __field__namespace_ __field__decl)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "namespace_" (Thrift.getStructType _proxy)
-           1
-           0
-           (Thrift.buildStruct _proxy __field__namespace_)
-           :
-           Thrift.genField _proxy "decl" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__decl)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__namespace_ <- ST.newSTRef Default.def
-            __field__decl <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__namespace_
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__decl
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__namespace_ <- ST.readSTRef
-                                                                     __field__namespace_
-                                             !__val__decl <- ST.readSTRef __field__decl
-                                             Prelude.pure
-                                               (NamespaceMember_key __val__namespace_ __val__decl)
-              _idMap = HashMap.fromList [("namespace_", 1), ("decl", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData NamespaceMember_key where
-  rnf (NamespaceMember_key __field__namespace_ __field__decl)
-    = DeepSeq.rnf __field__namespace_ `Prelude.seq`
-        DeepSeq.rnf __field__decl `Prelude.seq` ()
-
-instance Default.Default NamespaceMember_key where
-  def = NamespaceMember_key Default.def Default.def
-
-instance Hashable.Hashable NamespaceMember_key where
-  hashWithSalt __salt (NamespaceMember_key _namespace_ _decl)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _namespace_)
-        _decl
-
-data SearchClassByName_key = SearchClassByName_key{searchClassByName_key_name
-                                                   :: Text.Text,
-                                                   searchClassByName_key_parent ::
-                                                   Prelude.Maybe NamespaceQName,
-                                                   searchClassByName_key_decl :: Declaration}
-                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchClassByName_key where
-  toJSON
-    (SearchClassByName_key __field__name __field__parent __field__decl)
-    = Aeson.object
-        ("name" .= __field__name :
-           Prelude.maybe Prelude.id ((:) . ("parent" .=)) __field__parent
-             ("decl" .= __field__decl : Prelude.mempty))
-
-instance Thrift.ThriftStruct SearchClassByName_key where
-  buildStruct _proxy
-    (SearchClassByName_key __field__name __field__parent __field__decl)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           let (__cereal__parent, __id__parent)
-                 = case __field__parent of
-                     Prelude.Just _val -> ((:)
-                                             (Thrift.genField _proxy "parent"
-                                                (Thrift.getStructType _proxy)
-                                                2
-                                                1
-                                                (Thrift.buildStruct _proxy _val)),
-                                           2)
-                     Prelude.Nothing -> (Prelude.id, 1)
-             in
-             __cereal__parent
-               (Thrift.genField _proxy "decl" (Thrift.getStructType _proxy) 3
-                  __id__parent
-                  (Thrift.buildStruct _proxy __field__decl)
-                  : []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__parent <- ST.newSTRef Prelude.Nothing
-            __field__decl <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__parent
-                                                                          (Prelude.Just _val)
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__decl
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__parent <- ST.readSTRef __field__parent
-                                             !__val__decl <- ST.readSTRef __field__decl
-                                             Prelude.pure
-                                               (SearchClassByName_key __val__name __val__parent
-                                                  __val__decl)
-              _idMap = HashMap.fromList [("name", 1), ("parent", 2), ("decl", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchClassByName_key where
-  rnf
-    (SearchClassByName_key __field__name __field__parent __field__decl)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__parent `Prelude.seq`
-          DeepSeq.rnf __field__decl `Prelude.seq` ()
-
-instance Default.Default SearchClassByName_key where
-  def = SearchClassByName_key "" Prelude.Nothing Default.def
-
-instance Hashable.Hashable SearchClassByName_key where
-  hashWithSalt __salt (SearchClassByName_key _name _parent _decl)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-           _parent)
-        _decl
-
-data SearchClassConstByName_key = SearchClassConstByName_key{searchClassConstByName_key_name
-                                                             :: Text.Text,
-                                                             searchClassConstByName_key_parent ::
-                                                             QName,
-                                                             searchClassConstByName_key_decl ::
-                                                             Declaration}
-                                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchClassConstByName_key where
-  toJSON
-    (SearchClassConstByName_key __field__name __field__parent
-       __field__decl)
-    = Aeson.object
-        ("name" .= __field__name :
-           "parent" .= __field__parent :
-             "decl" .= __field__decl : Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchClassConstByName_key where
-  buildStruct _proxy
-    (SearchClassConstByName_key __field__name __field__parent
-       __field__decl)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "parent" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__parent)
-             :
-             Thrift.genField _proxy "decl" (Thrift.getStructType _proxy) 3 2
-               (Thrift.buildStruct _proxy __field__decl)
-               : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__parent <- ST.newSTRef Default.def
-            __field__decl <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__parent
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__decl
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__parent <- ST.readSTRef __field__parent
-                                             !__val__decl <- ST.readSTRef __field__decl
-                                             Prelude.pure
-                                               (SearchClassConstByName_key __val__name __val__parent
-                                                  __val__decl)
-              _idMap = HashMap.fromList [("name", 1), ("parent", 2), ("decl", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchClassConstByName_key where
-  rnf
-    (SearchClassConstByName_key __field__name __field__parent
-       __field__decl)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__parent `Prelude.seq`
-          DeepSeq.rnf __field__decl `Prelude.seq` ()
-
-instance Default.Default SearchClassConstByName_key where
-  def = SearchClassConstByName_key "" Default.def Default.def
-
-instance Hashable.Hashable SearchClassConstByName_key where
-  hashWithSalt __salt
-    (SearchClassConstByName_key _name _parent _decl)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-           _parent)
-        _decl
-
-data SearchEnumByName_key = SearchEnumByName_key{searchEnumByName_key_name
-                                                 :: Text.Text,
-                                                 searchEnumByName_key_parent ::
-                                                 Prelude.Maybe NamespaceQName,
-                                                 searchEnumByName_key_decl :: Declaration}
-                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchEnumByName_key where
-  toJSON
-    (SearchEnumByName_key __field__name __field__parent __field__decl)
-    = Aeson.object
-        ("name" .= __field__name :
-           Prelude.maybe Prelude.id ((:) . ("parent" .=)) __field__parent
-             ("decl" .= __field__decl : Prelude.mempty))
-
-instance Thrift.ThriftStruct SearchEnumByName_key where
-  buildStruct _proxy
-    (SearchEnumByName_key __field__name __field__parent __field__decl)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           let (__cereal__parent, __id__parent)
-                 = case __field__parent of
-                     Prelude.Just _val -> ((:)
-                                             (Thrift.genField _proxy "parent"
-                                                (Thrift.getStructType _proxy)
-                                                2
-                                                1
-                                                (Thrift.buildStruct _proxy _val)),
-                                           2)
-                     Prelude.Nothing -> (Prelude.id, 1)
-             in
-             __cereal__parent
-               (Thrift.genField _proxy "decl" (Thrift.getStructType _proxy) 3
-                  __id__parent
-                  (Thrift.buildStruct _proxy __field__decl)
-                  : []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__parent <- ST.newSTRef Prelude.Nothing
-            __field__decl <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__parent
-                                                                          (Prelude.Just _val)
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__decl
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__parent <- ST.readSTRef __field__parent
-                                             !__val__decl <- ST.readSTRef __field__decl
-                                             Prelude.pure
-                                               (SearchEnumByName_key __val__name __val__parent
-                                                  __val__decl)
-              _idMap = HashMap.fromList [("name", 1), ("parent", 2), ("decl", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchEnumByName_key where
-  rnf
-    (SearchEnumByName_key __field__name __field__parent __field__decl)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__parent `Prelude.seq`
-          DeepSeq.rnf __field__decl `Prelude.seq` ()
-
-instance Default.Default SearchEnumByName_key where
-  def = SearchEnumByName_key "" Prelude.Nothing Default.def
-
-instance Hashable.Hashable SearchEnumByName_key where
-  hashWithSalt __salt (SearchEnumByName_key _name _parent _decl)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-           _parent)
-        _decl
-
-data SearchEnumeratorByName_key = SearchEnumeratorByName_key{searchEnumeratorByName_key_name
-                                                             :: Text.Text,
-                                                             searchEnumeratorByName_key_parent ::
-                                                             QName,
-                                                             searchEnumeratorByName_key_decl ::
-                                                             Declaration}
-                                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchEnumeratorByName_key where
-  toJSON
-    (SearchEnumeratorByName_key __field__name __field__parent
-       __field__decl)
-    = Aeson.object
-        ("name" .= __field__name :
-           "parent" .= __field__parent :
-             "decl" .= __field__decl : Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchEnumeratorByName_key where
-  buildStruct _proxy
-    (SearchEnumeratorByName_key __field__name __field__parent
-       __field__decl)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "parent" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__parent)
-             :
-             Thrift.genField _proxy "decl" (Thrift.getStructType _proxy) 3 2
-               (Thrift.buildStruct _proxy __field__decl)
-               : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__parent <- ST.newSTRef Default.def
-            __field__decl <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__parent
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__decl
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__parent <- ST.readSTRef __field__parent
-                                             !__val__decl <- ST.readSTRef __field__decl
-                                             Prelude.pure
-                                               (SearchEnumeratorByName_key __val__name __val__parent
-                                                  __val__decl)
-              _idMap = HashMap.fromList [("name", 1), ("parent", 2), ("decl", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchEnumeratorByName_key where
-  rnf
-    (SearchEnumeratorByName_key __field__name __field__parent
-       __field__decl)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__parent `Prelude.seq`
-          DeepSeq.rnf __field__decl `Prelude.seq` ()
-
-instance Default.Default SearchEnumeratorByName_key where
-  def = SearchEnumeratorByName_key "" Default.def Default.def
-
-instance Hashable.Hashable SearchEnumeratorByName_key where
-  hashWithSalt __salt
-    (SearchEnumeratorByName_key _name _parent _decl)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-           _parent)
-        _decl
-
-data SearchFunctionByName_key = SearchFunctionByName_key{searchFunctionByName_key_name
-                                                         :: Text.Text,
-                                                         searchFunctionByName_key_parent ::
-                                                         Prelude.Maybe NamespaceQName,
-                                                         searchFunctionByName_key_decl ::
-                                                         Declaration}
-                                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchFunctionByName_key where
-  toJSON
-    (SearchFunctionByName_key __field__name __field__parent
-       __field__decl)
-    = Aeson.object
-        ("name" .= __field__name :
-           Prelude.maybe Prelude.id ((:) . ("parent" .=)) __field__parent
-             ("decl" .= __field__decl : Prelude.mempty))
-
-instance Thrift.ThriftStruct SearchFunctionByName_key where
-  buildStruct _proxy
-    (SearchFunctionByName_key __field__name __field__parent
-       __field__decl)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           let (__cereal__parent, __id__parent)
-                 = case __field__parent of
-                     Prelude.Just _val -> ((:)
-                                             (Thrift.genField _proxy "parent"
-                                                (Thrift.getStructType _proxy)
-                                                2
-                                                1
-                                                (Thrift.buildStruct _proxy _val)),
-                                           2)
-                     Prelude.Nothing -> (Prelude.id, 1)
-             in
-             __cereal__parent
-               (Thrift.genField _proxy "decl" (Thrift.getStructType _proxy) 3
-                  __id__parent
-                  (Thrift.buildStruct _proxy __field__decl)
-                  : []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__parent <- ST.newSTRef Prelude.Nothing
-            __field__decl <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__parent
-                                                                          (Prelude.Just _val)
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__decl
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__parent <- ST.readSTRef __field__parent
-                                             !__val__decl <- ST.readSTRef __field__decl
-                                             Prelude.pure
-                                               (SearchFunctionByName_key __val__name __val__parent
-                                                  __val__decl)
-              _idMap = HashMap.fromList [("name", 1), ("parent", 2), ("decl", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchFunctionByName_key where
-  rnf
-    (SearchFunctionByName_key __field__name __field__parent
-       __field__decl)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__parent `Prelude.seq`
-          DeepSeq.rnf __field__decl `Prelude.seq` ()
-
-instance Default.Default SearchFunctionByName_key where
-  def = SearchFunctionByName_key "" Prelude.Nothing Default.def
-
-instance Hashable.Hashable SearchFunctionByName_key where
-  hashWithSalt __salt (SearchFunctionByName_key _name _parent _decl)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-           _parent)
-        _decl
-
-data SearchGlobalConstByName_key = SearchGlobalConstByName_key{searchGlobalConstByName_key_name
-                                                               :: Text.Text,
-                                                               searchGlobalConstByName_key_parent ::
-                                                               Prelude.Maybe NamespaceQName,
-                                                               searchGlobalConstByName_key_decl ::
-                                                               Declaration}
-                                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchGlobalConstByName_key where
-  toJSON
-    (SearchGlobalConstByName_key __field__name __field__parent
-       __field__decl)
-    = Aeson.object
-        ("name" .= __field__name :
-           Prelude.maybe Prelude.id ((:) . ("parent" .=)) __field__parent
-             ("decl" .= __field__decl : Prelude.mempty))
-
-instance Thrift.ThriftStruct SearchGlobalConstByName_key where
-  buildStruct _proxy
-    (SearchGlobalConstByName_key __field__name __field__parent
-       __field__decl)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           let (__cereal__parent, __id__parent)
-                 = case __field__parent of
-                     Prelude.Just _val -> ((:)
-                                             (Thrift.genField _proxy "parent"
-                                                (Thrift.getStructType _proxy)
-                                                2
-                                                1
-                                                (Thrift.buildStruct _proxy _val)),
-                                           2)
-                     Prelude.Nothing -> (Prelude.id, 1)
-             in
-             __cereal__parent
-               (Thrift.genField _proxy "decl" (Thrift.getStructType _proxy) 3
-                  __id__parent
-                  (Thrift.buildStruct _proxy __field__decl)
-                  : []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__parent <- ST.newSTRef Prelude.Nothing
-            __field__decl <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__parent
-                                                                          (Prelude.Just _val)
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__decl
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__parent <- ST.readSTRef __field__parent
-                                             !__val__decl <- ST.readSTRef __field__decl
-                                             Prelude.pure
-                                               (SearchGlobalConstByName_key __val__name
-                                                  __val__parent
-                                                  __val__decl)
-              _idMap = HashMap.fromList [("name", 1), ("parent", 2), ("decl", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchGlobalConstByName_key where
-  rnf
-    (SearchGlobalConstByName_key __field__name __field__parent
-       __field__decl)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__parent `Prelude.seq`
-          DeepSeq.rnf __field__decl `Prelude.seq` ()
-
-instance Default.Default SearchGlobalConstByName_key where
-  def = SearchGlobalConstByName_key "" Prelude.Nothing Default.def
-
-instance Hashable.Hashable SearchGlobalConstByName_key where
-  hashWithSalt __salt
-    (SearchGlobalConstByName_key _name _parent _decl)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-           _parent)
-        _decl
-
-data SearchInterfaceByName_key = SearchInterfaceByName_key{searchInterfaceByName_key_name
-                                                           :: Text.Text,
-                                                           searchInterfaceByName_key_parent ::
-                                                           Prelude.Maybe NamespaceQName,
-                                                           searchInterfaceByName_key_decl ::
-                                                           Declaration}
-                                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchInterfaceByName_key where
-  toJSON
-    (SearchInterfaceByName_key __field__name __field__parent
-       __field__decl)
-    = Aeson.object
-        ("name" .= __field__name :
-           Prelude.maybe Prelude.id ((:) . ("parent" .=)) __field__parent
-             ("decl" .= __field__decl : Prelude.mempty))
-
-instance Thrift.ThriftStruct SearchInterfaceByName_key where
-  buildStruct _proxy
-    (SearchInterfaceByName_key __field__name __field__parent
-       __field__decl)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           let (__cereal__parent, __id__parent)
-                 = case __field__parent of
-                     Prelude.Just _val -> ((:)
-                                             (Thrift.genField _proxy "parent"
-                                                (Thrift.getStructType _proxy)
-                                                2
-                                                1
-                                                (Thrift.buildStruct _proxy _val)),
-                                           2)
-                     Prelude.Nothing -> (Prelude.id, 1)
-             in
-             __cereal__parent
-               (Thrift.genField _proxy "decl" (Thrift.getStructType _proxy) 3
-                  __id__parent
-                  (Thrift.buildStruct _proxy __field__decl)
-                  : []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__parent <- ST.newSTRef Prelude.Nothing
-            __field__decl <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__parent
-                                                                          (Prelude.Just _val)
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__decl
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__parent <- ST.readSTRef __field__parent
-                                             !__val__decl <- ST.readSTRef __field__decl
-                                             Prelude.pure
-                                               (SearchInterfaceByName_key __val__name __val__parent
-                                                  __val__decl)
-              _idMap = HashMap.fromList [("name", 1), ("parent", 2), ("decl", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchInterfaceByName_key where
-  rnf
-    (SearchInterfaceByName_key __field__name __field__parent
-       __field__decl)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__parent `Prelude.seq`
-          DeepSeq.rnf __field__decl `Prelude.seq` ()
-
-instance Default.Default SearchInterfaceByName_key where
-  def = SearchInterfaceByName_key "" Prelude.Nothing Default.def
-
-instance Hashable.Hashable SearchInterfaceByName_key where
-  hashWithSalt __salt (SearchInterfaceByName_key _name _parent _decl)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-           _parent)
-        _decl
-
-data SearchMethodByName_key = SearchMethodByName_key{searchMethodByName_key_name
-                                                     :: Text.Text,
-                                                     searchMethodByName_key_parent :: QName,
-                                                     searchMethodByName_key_decl :: Declaration}
-                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchMethodByName_key where
-  toJSON
-    (SearchMethodByName_key __field__name __field__parent
-       __field__decl)
-    = Aeson.object
-        ("name" .= __field__name :
-           "parent" .= __field__parent :
-             "decl" .= __field__decl : Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchMethodByName_key where
-  buildStruct _proxy
-    (SearchMethodByName_key __field__name __field__parent
-       __field__decl)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "parent" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__parent)
-             :
-             Thrift.genField _proxy "decl" (Thrift.getStructType _proxy) 3 2
-               (Thrift.buildStruct _proxy __field__decl)
-               : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__parent <- ST.newSTRef Default.def
-            __field__decl <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__parent
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__decl
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__parent <- ST.readSTRef __field__parent
-                                             !__val__decl <- ST.readSTRef __field__decl
-                                             Prelude.pure
-                                               (SearchMethodByName_key __val__name __val__parent
-                                                  __val__decl)
-              _idMap = HashMap.fromList [("name", 1), ("parent", 2), ("decl", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchMethodByName_key where
-  rnf
-    (SearchMethodByName_key __field__name __field__parent
-       __field__decl)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__parent `Prelude.seq`
-          DeepSeq.rnf __field__decl `Prelude.seq` ()
-
-instance Default.Default SearchMethodByName_key where
-  def = SearchMethodByName_key "" Default.def Default.def
-
-instance Hashable.Hashable SearchMethodByName_key where
-  hashWithSalt __salt (SearchMethodByName_key _name _parent _decl)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-           _parent)
-        _decl
-
-data SearchModuleByName_key = SearchModuleByName_key{searchModuleByName_key_name
-                                                     :: Text.Text,
-                                                     searchModuleByName_key_decl :: Declaration}
-                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchModuleByName_key where
-  toJSON (SearchModuleByName_key __field__name __field__decl)
-    = Aeson.object
-        ("name" .= __field__name :
-           "decl" .= __field__decl : Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchModuleByName_key where
-  buildStruct _proxy
-    (SearchModuleByName_key __field__name __field__decl)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "decl" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__decl)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__decl <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__decl
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__decl <- ST.readSTRef __field__decl
-                                             Prelude.pure
-                                               (SearchModuleByName_key __val__name __val__decl)
-              _idMap = HashMap.fromList [("name", 1), ("decl", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchModuleByName_key where
-  rnf (SearchModuleByName_key __field__name __field__decl)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__decl `Prelude.seq` ()
-
-instance Default.Default SearchModuleByName_key where
-  def = SearchModuleByName_key "" Default.def
-
-instance Hashable.Hashable SearchModuleByName_key where
-  hashWithSalt __salt (SearchModuleByName_key _name _decl)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _decl
-
-data SearchNamespaceByName_key = SearchNamespaceByName_key{searchNamespaceByName_key_name
-                                                           :: Text.Text,
-                                                           searchNamespaceByName_key_parent ::
-                                                           Prelude.Maybe NamespaceQName,
-                                                           searchNamespaceByName_key_decl ::
-                                                           Declaration}
-                                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchNamespaceByName_key where
-  toJSON
-    (SearchNamespaceByName_key __field__name __field__parent
-       __field__decl)
-    = Aeson.object
-        ("name" .= __field__name :
-           Prelude.maybe Prelude.id ((:) . ("parent" .=)) __field__parent
-             ("decl" .= __field__decl : Prelude.mempty))
-
-instance Thrift.ThriftStruct SearchNamespaceByName_key where
-  buildStruct _proxy
-    (SearchNamespaceByName_key __field__name __field__parent
-       __field__decl)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           let (__cereal__parent, __id__parent)
-                 = case __field__parent of
-                     Prelude.Just _val -> ((:)
-                                             (Thrift.genField _proxy "parent"
-                                                (Thrift.getStructType _proxy)
-                                                2
-                                                1
-                                                (Thrift.buildStruct _proxy _val)),
-                                           2)
-                     Prelude.Nothing -> (Prelude.id, 1)
-             in
-             __cereal__parent
-               (Thrift.genField _proxy "decl" (Thrift.getStructType _proxy) 3
-                  __id__parent
-                  (Thrift.buildStruct _proxy __field__decl)
-                  : []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__parent <- ST.newSTRef Prelude.Nothing
-            __field__decl <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__parent
-                                                                          (Prelude.Just _val)
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__decl
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__parent <- ST.readSTRef __field__parent
-                                             !__val__decl <- ST.readSTRef __field__decl
-                                             Prelude.pure
-                                               (SearchNamespaceByName_key __val__name __val__parent
-                                                  __val__decl)
-              _idMap = HashMap.fromList [("name", 1), ("parent", 2), ("decl", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchNamespaceByName_key where
-  rnf
-    (SearchNamespaceByName_key __field__name __field__parent
-       __field__decl)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__parent `Prelude.seq`
-          DeepSeq.rnf __field__decl `Prelude.seq` ()
-
-instance Default.Default SearchNamespaceByName_key where
-  def = SearchNamespaceByName_key "" Prelude.Nothing Default.def
-
-instance Hashable.Hashable SearchNamespaceByName_key where
-  hashWithSalt __salt (SearchNamespaceByName_key _name _parent _decl)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-           _parent)
-        _decl
-
-data SearchPropertyByName_key = SearchPropertyByName_key{searchPropertyByName_key_name
-                                                         :: Text.Text,
-                                                         searchPropertyByName_key_parent :: QName,
-                                                         searchPropertyByName_key_decl ::
-                                                         Declaration}
-                                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchPropertyByName_key where
-  toJSON
-    (SearchPropertyByName_key __field__name __field__parent
-       __field__decl)
-    = Aeson.object
-        ("name" .= __field__name :
-           "parent" .= __field__parent :
-             "decl" .= __field__decl : Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchPropertyByName_key where
-  buildStruct _proxy
-    (SearchPropertyByName_key __field__name __field__parent
-       __field__decl)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "parent" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__parent)
-             :
-             Thrift.genField _proxy "decl" (Thrift.getStructType _proxy) 3 2
-               (Thrift.buildStruct _proxy __field__decl)
-               : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__parent <- ST.newSTRef Default.def
-            __field__decl <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__parent
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__decl
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__parent <- ST.readSTRef __field__parent
-                                             !__val__decl <- ST.readSTRef __field__decl
-                                             Prelude.pure
-                                               (SearchPropertyByName_key __val__name __val__parent
-                                                  __val__decl)
-              _idMap = HashMap.fromList [("name", 1), ("parent", 2), ("decl", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchPropertyByName_key where
-  rnf
-    (SearchPropertyByName_key __field__name __field__parent
-       __field__decl)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__parent `Prelude.seq`
-          DeepSeq.rnf __field__decl `Prelude.seq` ()
-
-instance Default.Default SearchPropertyByName_key where
-  def = SearchPropertyByName_key "" Default.def Default.def
-
-instance Hashable.Hashable SearchPropertyByName_key where
-  hashWithSalt __salt (SearchPropertyByName_key _name _parent _decl)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-           _parent)
-        _decl
-
-data SearchTraitByName_key = SearchTraitByName_key{searchTraitByName_key_name
-                                                   :: Text.Text,
-                                                   searchTraitByName_key_parent ::
-                                                   Prelude.Maybe NamespaceQName,
-                                                   searchTraitByName_key_decl :: Declaration}
-                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchTraitByName_key where
-  toJSON
-    (SearchTraitByName_key __field__name __field__parent __field__decl)
-    = Aeson.object
-        ("name" .= __field__name :
-           Prelude.maybe Prelude.id ((:) . ("parent" .=)) __field__parent
-             ("decl" .= __field__decl : Prelude.mempty))
-
-instance Thrift.ThriftStruct SearchTraitByName_key where
-  buildStruct _proxy
-    (SearchTraitByName_key __field__name __field__parent __field__decl)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           let (__cereal__parent, __id__parent)
-                 = case __field__parent of
-                     Prelude.Just _val -> ((:)
-                                             (Thrift.genField _proxy "parent"
-                                                (Thrift.getStructType _proxy)
-                                                2
-                                                1
-                                                (Thrift.buildStruct _proxy _val)),
-                                           2)
-                     Prelude.Nothing -> (Prelude.id, 1)
-             in
-             __cereal__parent
-               (Thrift.genField _proxy "decl" (Thrift.getStructType _proxy) 3
-                  __id__parent
-                  (Thrift.buildStruct _proxy __field__decl)
-                  : []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__parent <- ST.newSTRef Prelude.Nothing
-            __field__decl <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__parent
-                                                                          (Prelude.Just _val)
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__decl
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__parent <- ST.readSTRef __field__parent
-                                             !__val__decl <- ST.readSTRef __field__decl
-                                             Prelude.pure
-                                               (SearchTraitByName_key __val__name __val__parent
-                                                  __val__decl)
-              _idMap = HashMap.fromList [("name", 1), ("parent", 2), ("decl", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchTraitByName_key where
-  rnf
-    (SearchTraitByName_key __field__name __field__parent __field__decl)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__parent `Prelude.seq`
-          DeepSeq.rnf __field__decl `Prelude.seq` ()
-
-instance Default.Default SearchTraitByName_key where
-  def = SearchTraitByName_key "" Prelude.Nothing Default.def
-
-instance Hashable.Hashable SearchTraitByName_key where
-  hashWithSalt __salt (SearchTraitByName_key _name _parent _decl)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-           _parent)
-        _decl
-
-data SearchTypeConstByName_key = SearchTypeConstByName_key{searchTypeConstByName_key_name
-                                                           :: Text.Text,
-                                                           searchTypeConstByName_key_parent ::
-                                                           QName,
-                                                           searchTypeConstByName_key_decl ::
-                                                           Declaration}
-                                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchTypeConstByName_key where
-  toJSON
-    (SearchTypeConstByName_key __field__name __field__parent
-       __field__decl)
-    = Aeson.object
-        ("name" .= __field__name :
-           "parent" .= __field__parent :
-             "decl" .= __field__decl : Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchTypeConstByName_key where
-  buildStruct _proxy
-    (SearchTypeConstByName_key __field__name __field__parent
-       __field__decl)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "parent" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__parent)
-             :
-             Thrift.genField _proxy "decl" (Thrift.getStructType _proxy) 3 2
-               (Thrift.buildStruct _proxy __field__decl)
-               : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__parent <- ST.newSTRef Default.def
-            __field__decl <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__parent
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__decl
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__parent <- ST.readSTRef __field__parent
-                                             !__val__decl <- ST.readSTRef __field__decl
-                                             Prelude.pure
-                                               (SearchTypeConstByName_key __val__name __val__parent
-                                                  __val__decl)
-              _idMap = HashMap.fromList [("name", 1), ("parent", 2), ("decl", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchTypeConstByName_key where
-  rnf
-    (SearchTypeConstByName_key __field__name __field__parent
-       __field__decl)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__parent `Prelude.seq`
-          DeepSeq.rnf __field__decl `Prelude.seq` ()
-
-instance Default.Default SearchTypeConstByName_key where
-  def = SearchTypeConstByName_key "" Default.def Default.def
-
-instance Hashable.Hashable SearchTypeConstByName_key where
-  hashWithSalt __salt (SearchTypeConstByName_key _name _parent _decl)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-           _parent)
-        _decl
-
-data SearchTypedefByName_key = SearchTypedefByName_key{searchTypedefByName_key_name
-                                                       :: Text.Text,
-                                                       searchTypedefByName_key_parent ::
-                                                       Prelude.Maybe NamespaceQName,
-                                                       searchTypedefByName_key_decl :: Declaration}
-                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchTypedefByName_key where
-  toJSON
-    (SearchTypedefByName_key __field__name __field__parent
-       __field__decl)
-    = Aeson.object
-        ("name" .= __field__name :
-           Prelude.maybe Prelude.id ((:) . ("parent" .=)) __field__parent
-             ("decl" .= __field__decl : Prelude.mempty))
-
-instance Thrift.ThriftStruct SearchTypedefByName_key where
-  buildStruct _proxy
-    (SearchTypedefByName_key __field__name __field__parent
-       __field__decl)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           let (__cereal__parent, __id__parent)
-                 = case __field__parent of
-                     Prelude.Just _val -> ((:)
-                                             (Thrift.genField _proxy "parent"
-                                                (Thrift.getStructType _proxy)
-                                                2
-                                                1
-                                                (Thrift.buildStruct _proxy _val)),
-                                           2)
-                     Prelude.Nothing -> (Prelude.id, 1)
-             in
-             __cereal__parent
-               (Thrift.genField _proxy "decl" (Thrift.getStructType _proxy) 3
-                  __id__parent
-                  (Thrift.buildStruct _proxy __field__decl)
-                  : []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__parent <- ST.newSTRef Prelude.Nothing
-            __field__decl <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__parent
-                                                                          (Prelude.Just _val)
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__decl
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__parent <- ST.readSTRef __field__parent
-                                             !__val__decl <- ST.readSTRef __field__decl
-                                             Prelude.pure
-                                               (SearchTypedefByName_key __val__name __val__parent
-                                                  __val__decl)
-              _idMap = HashMap.fromList [("name", 1), ("parent", 2), ("decl", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchTypedefByName_key where
-  rnf
-    (SearchTypedefByName_key __field__name __field__parent
-       __field__decl)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__parent `Prelude.seq`
-          DeepSeq.rnf __field__decl `Prelude.seq` ()
-
-instance Default.Default SearchTypedefByName_key where
-  def = SearchTypedefByName_key "" Prelude.Nothing Default.def
-
-instance Hashable.Hashable SearchTypedefByName_key where
-  hashWithSalt __salt (SearchTypedefByName_key _name _parent _decl)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-           _parent)
-        _decl
-
-data ThriftToHack_key = ThriftToHack_key{thriftToHack_key_to ::
-                                         Glean.Schema.Fbthrift.Declaration,
-                                         thriftToHack_key_from :: Declaration}
-                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ThriftToHack_key where
-  toJSON (ThriftToHack_key __field__to __field__from)
-    = Aeson.object
-        ("to" .= __field__to : "from" .= __field__from : Prelude.mempty)
-
-instance Thrift.ThriftStruct ThriftToHack_key where
-  buildStruct _proxy (ThriftToHack_key __field__to __field__from)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "to" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__to)
-           :
-           Thrift.genField _proxy "from" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__from)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__to <- ST.newSTRef Default.def
-            __field__from <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__to
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__from
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__to <- ST.readSTRef __field__to
-                                             !__val__from <- ST.readSTRef __field__from
-                                             Prelude.pure (ThriftToHack_key __val__to __val__from)
-              _idMap = HashMap.fromList [("to", 1), ("from", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData ThriftToHack_key where
-  rnf (ThriftToHack_key __field__to __field__from)
-    = DeepSeq.rnf __field__to `Prelude.seq`
-        DeepSeq.rnf __field__from `Prelude.seq` ()
-
-instance Default.Default ThriftToHack_key where
-  def = ThriftToHack_key Default.def Default.def
-
-instance Hashable.Hashable ThriftToHack_key where
-  hashWithSalt __salt (ThriftToHack_key _to _from)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _to) _from
-
-data XRefTarget = XRefTarget_declaration Declaration
-                | XRefTarget_occurrence Occurrence
-                | XRefTarget_EMPTY
-                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON XRefTarget where
-  toJSON (XRefTarget_declaration __declaration)
-    = Aeson.object ["declaration" .= __declaration]
-  toJSON (XRefTarget_occurrence __occurrence)
-    = Aeson.object ["occurrence" .= __occurrence]
-  toJSON XRefTarget_EMPTY = Aeson.object []
-
-instance Thrift.ThriftStruct XRefTarget where
-  buildStruct _proxy (XRefTarget_declaration __declaration)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "declaration" (Thrift.getStructType _proxy)
-           1
-           0
-           (Thrift.buildStruct _proxy __declaration)]
-  buildStruct _proxy (XRefTarget_occurrence __occurrence)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "occurrence" (Thrift.getStructType _proxy)
-           2
-           0
-           (Thrift.buildStruct _proxy __occurrence)]
-  buildStruct _proxy XRefTarget_EMPTY = Thrift.genStruct _proxy []
-  parseStruct _proxy
-    = do _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap
-         case _fieldBegin of
-           Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                     1 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return
-                                                              (XRefTarget_declaration _val)
-                                                     2 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return
-                                                              (XRefTarget_occurrence _val)
-                                                     _ -> do Thrift.parseSkip _proxy _type
-                                                               Prelude.Nothing
-                                                             Thrift.parseStop _proxy
-                                                             Prelude.return XRefTarget_EMPTY
-           Thrift.FieldEnd -> Prelude.return XRefTarget_EMPTY
-    where
-      _idMap = HashMap.fromList [("declaration", 1), ("occurrence", 2)]
-
-instance DeepSeq.NFData XRefTarget where
-  rnf (XRefTarget_declaration __declaration)
-    = DeepSeq.rnf __declaration
-  rnf (XRefTarget_occurrence __occurrence) = DeepSeq.rnf __occurrence
-  rnf XRefTarget_EMPTY = ()
-
-instance Default.Default XRefTarget where
-  def = XRefTarget_EMPTY
-
-instance Hashable.Hashable XRefTarget where
-  hashWithSalt __salt (XRefTarget_declaration _declaration)
-    = Hashable.hashWithSalt __salt
-        (Hashable.hashWithSalt 1 _declaration)
-  hashWithSalt __salt (XRefTarget_occurrence _occurrence)
-    = Hashable.hashWithSalt __salt
-        (Hashable.hashWithSalt 2 _occurrence)
-  hashWithSalt __salt XRefTarget_EMPTY
-    = Hashable.hashWithSalt __salt (0 :: Prelude.Int)
-
-data TargetUses_key = TargetUses_key{targetUses_key_target ::
-                                     XRefTarget,
-                                     targetUses_key_file :: Glean.Schema.Src.File,
-                                     targetUses_key_uses :: [Glean.Schema.Src.RelByteSpan]}
-                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TargetUses_key where
-  toJSON (TargetUses_key __field__target __field__file __field__uses)
-    = Aeson.object
-        ("target" .= __field__target :
-           "file" .= __field__file : "uses" .= __field__uses : Prelude.mempty)
-
-instance Thrift.ThriftStruct TargetUses_key where
-  buildStruct _proxy
-    (TargetUses_key __field__target __field__file __field__uses)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__target)
-           :
-           Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__file)
-             :
-             Thrift.genField _proxy "uses" (Thrift.getListType _proxy) 3 2
-               (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                  (Thrift.buildStruct _proxy)
-                  __field__uses)
-               : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__target <- ST.newSTRef Default.def
-            __field__file <- ST.newSTRef Default.def
-            __field__uses <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__target
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__file
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef __field__uses
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__target <- ST.readSTRef
-                                                                 __field__target
-                                             !__val__file <- ST.readSTRef __field__file
-                                             !__val__uses <- ST.readSTRef __field__uses
-                                             Prelude.pure
-                                               (TargetUses_key __val__target __val__file
-                                                  __val__uses)
-              _idMap = HashMap.fromList [("target", 1), ("file", 2), ("uses", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData TargetUses_key where
-  rnf (TargetUses_key __field__target __field__file __field__uses)
-    = DeepSeq.rnf __field__target `Prelude.seq`
-        DeepSeq.rnf __field__file `Prelude.seq`
-          DeepSeq.rnf __field__uses `Prelude.seq` ()
-
-instance Default.Default TargetUses_key where
-  def = TargetUses_key Default.def Default.def Default.def
-
-instance Hashable.Hashable TargetUses_key where
-  hashWithSalt __salt (TargetUses_key _target _file _uses)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _target)
-           _file)
-        _uses
-
-data TargetUsesAbs_key = TargetUsesAbs_key{targetUsesAbs_key_target
-                                           :: XRefTarget,
-                                           targetUsesAbs_key_file :: Glean.Schema.Src.File,
-                                           targetUsesAbs_key_uses :: [Glean.Schema.Src.ByteSpan]}
-                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TargetUsesAbs_key where
-  toJSON
-    (TargetUsesAbs_key __field__target __field__file __field__uses)
-    = Aeson.object
-        ("target" .= __field__target :
-           "file" .= __field__file : "uses" .= __field__uses : Prelude.mempty)
-
-instance Thrift.ThriftStruct TargetUsesAbs_key where
-  buildStruct _proxy
-    (TargetUsesAbs_key __field__target __field__file __field__uses)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__target)
-           :
-           Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__file)
-             :
-             Thrift.genField _proxy "uses" (Thrift.getListType _proxy) 3 2
-               (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                  (Thrift.buildStruct _proxy)
-                  __field__uses)
-               : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__target <- ST.newSTRef Default.def
-            __field__file <- ST.newSTRef Default.def
-            __field__uses <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__target
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__file
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef __field__uses
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__target <- ST.readSTRef
-                                                                 __field__target
-                                             !__val__file <- ST.readSTRef __field__file
-                                             !__val__uses <- ST.readSTRef __field__uses
-                                             Prelude.pure
-                                               (TargetUsesAbs_key __val__target __val__file
-                                                  __val__uses)
-              _idMap = HashMap.fromList [("target", 1), ("file", 2), ("uses", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData TargetUsesAbs_key where
-  rnf (TargetUsesAbs_key __field__target __field__file __field__uses)
-    = DeepSeq.rnf __field__target `Prelude.seq`
-        DeepSeq.rnf __field__file `Prelude.seq`
-          DeepSeq.rnf __field__uses `Prelude.seq` ()
-
-instance Default.Default TargetUsesAbs_key where
-  def = TargetUsesAbs_key Default.def Default.def Default.def
-
-instance Hashable.Hashable TargetUsesAbs_key where
-  hashWithSalt __salt (TargetUsesAbs_key _target _file _uses)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _target)
-           _file)
-        _uses
-
-data XRef = XRef{xRef_target :: XRefTarget,
-                 xRef_ranges :: [Glean.Schema.Src.RelByteSpan]}
-            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON XRef where
-  toJSON (XRef __field__target __field__ranges)
-    = Aeson.object
-        ("target" .= __field__target :
-           "ranges" .= __field__ranges : Prelude.mempty)
-
-instance Thrift.ThriftStruct XRef where
-  buildStruct _proxy (XRef __field__target __field__ranges)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__target)
-           :
-           Thrift.genField _proxy "ranges" (Thrift.getListType _proxy) 2 1
-             (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                (Thrift.buildStruct _proxy)
-                __field__ranges)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__target <- ST.newSTRef Default.def
-            __field__ranges <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__target
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__ranges
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__target <- ST.readSTRef
-                                                                 __field__target
-                                             !__val__ranges <- ST.readSTRef __field__ranges
-                                             Prelude.pure (XRef __val__target __val__ranges)
-              _idMap = HashMap.fromList [("target", 1), ("ranges", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData XRef where
-  rnf (XRef __field__target __field__ranges)
-    = DeepSeq.rnf __field__target `Prelude.seq`
-        DeepSeq.rnf __field__ranges `Prelude.seq` ()
-
-instance Default.Default XRef where
-  def = XRef Default.def Default.def
-
-instance Hashable.Hashable XRef where
-  hashWithSalt __salt (XRef _target _ranges)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _target)
-        _ranges
-
-data FileXRefs_key = FileXRefs_key{fileXRefs_key_file ::
-                                   Glean.Schema.Src.File,
-                                   fileXRefs_key_xrefs :: [XRef]}
-                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON FileXRefs_key where
-  toJSON (FileXRefs_key __field__file __field__xrefs)
-    = Aeson.object
-        ("file" .= __field__file :
-           "xrefs" .= __field__xrefs : Prelude.mempty)
-
-instance Thrift.ThriftStruct FileXRefs_key where
-  buildStruct _proxy (FileXRefs_key __field__file __field__xrefs)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__file)
-           :
-           Thrift.genField _proxy "xrefs" (Thrift.getListType _proxy) 2 1
-             (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                (Thrift.buildStruct _proxy)
-                __field__xrefs)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__file <- ST.newSTRef Default.def
-            __field__xrefs <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__file
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef __field__xrefs
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__file <- ST.readSTRef __field__file
-                                             !__val__xrefs <- ST.readSTRef __field__xrefs
-                                             Prelude.pure (FileXRefs_key __val__file __val__xrefs)
-              _idMap = HashMap.fromList [("file", 1), ("xrefs", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData FileXRefs_key where
-  rnf (FileXRefs_key __field__file __field__xrefs)
-    = DeepSeq.rnf __field__file `Prelude.seq`
-        DeepSeq.rnf __field__xrefs `Prelude.seq` ()
-
-instance Default.Default FileXRefs_key where
-  def = FileXRefs_key Default.def Default.def
-
-instance Hashable.Hashable FileXRefs_key where
-  hashWithSalt __salt (FileXRefs_key _file _xrefs)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _file) _xrefs
-
-data TypeInfo_key = TypeInfo_key{typeInfo_key_displayType :: Type,
-                                 typeInfo_key_xrefs :: [XRef],
-                                 typeInfo_key_hint :: Prelude.Maybe Hint}
-                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TypeInfo_key where
-  toJSON
-    (TypeInfo_key __field__displayType __field__xrefs __field__hint)
-    = Aeson.object
-        ("displayType" .= __field__displayType :
-           "xrefs" .= __field__xrefs :
-             Prelude.maybe Prelude.id ((:) . ("hint" .=)) __field__hint
-               Prelude.mempty)
-
-instance Thrift.ThriftStruct TypeInfo_key where
-  buildStruct _proxy
-    (TypeInfo_key __field__displayType __field__xrefs __field__hint)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "displayType" (Thrift.getStructType _proxy)
-           1
-           0
-           (Thrift.buildStruct _proxy __field__displayType)
-           :
-           Thrift.genField _proxy "xrefs" (Thrift.getListType _proxy) 2 1
-             (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                (Thrift.buildStruct _proxy)
-                __field__xrefs)
-             :
-             case __field__hint of
-               Prelude.Just _val -> Thrift.genField _proxy "hint"
-                                      (Thrift.getStructType _proxy)
-                                      3
-                                      2
-                                      (Thrift.buildStruct _proxy _val)
-                                      : []
-               Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__displayType <- ST.newSTRef Default.def
-            __field__xrefs <- ST.newSTRef Default.def
-            __field__hint <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__displayType
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef __field__xrefs
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__hint
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__displayType <- ST.readSTRef
-                                                                      __field__displayType
-                                             !__val__xrefs <- ST.readSTRef __field__xrefs
-                                             !__val__hint <- ST.readSTRef __field__hint
-                                             Prelude.pure
-                                               (TypeInfo_key __val__displayType __val__xrefs
-                                                  __val__hint)
-              _idMap
-                = HashMap.fromList [("displayType", 1), ("xrefs", 2), ("hint", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData TypeInfo_key where
-  rnf
-    (TypeInfo_key __field__displayType __field__xrefs __field__hint)
-    = DeepSeq.rnf __field__displayType `Prelude.seq`
-        DeepSeq.rnf __field__xrefs `Prelude.seq`
-          DeepSeq.rnf __field__hint `Prelude.seq` ()
-
-instance Default.Default TypeInfo_key where
-  def = TypeInfo_key Default.def Default.def Prelude.Nothing
-
-instance Hashable.Hashable TypeInfo_key where
-  hashWithSalt __salt (TypeInfo_key _displayType _xrefs _hint)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _displayType)
-           _xrefs)
-        _hint
-
-data InheritedMembers_key = InheritedMembers_key{inheritedMembers_key_container
-                                                 :: ContainerDeclaration,
-                                                 inheritedMembers_key_inheritedMembers ::
-                                                 [MemberCluster]}
-                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON InheritedMembers_key where
-  toJSON
-    (InheritedMembers_key __field__container __field__inheritedMembers)
-    = Aeson.object
-        ("container" .= __field__container :
-           "inheritedMembers" .= __field__inheritedMembers : Prelude.mempty)
-
-instance Thrift.ThriftStruct InheritedMembers_key where
-  buildStruct _proxy
-    (InheritedMembers_key __field__container __field__inheritedMembers)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "container" (Thrift.getStructType _proxy) 1
-           0
-           (Thrift.buildStruct _proxy __field__container)
-           :
-           Thrift.genField _proxy "inheritedMembers"
-             (Thrift.getListType _proxy)
-             2
-             1
-             (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                (Thrift.buildStruct _proxy)
-                __field__inheritedMembers)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__container <- ST.newSTRef Default.def
-            __field__inheritedMembers <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__container
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__inheritedMembers
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__container <- ST.readSTRef
-                                                                    __field__container
-                                             !__val__inheritedMembers <- ST.readSTRef
-                                                                           __field__inheritedMembers
-                                             Prelude.pure
-                                               (InheritedMembers_key __val__container
-                                                  __val__inheritedMembers)
-              _idMap
-                = HashMap.fromList [("container", 1), ("inheritedMembers", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData InheritedMembers_key where
-  rnf
-    (InheritedMembers_key __field__container __field__inheritedMembers)
-    = DeepSeq.rnf __field__container `Prelude.seq`
-        DeepSeq.rnf __field__inheritedMembers `Prelude.seq` ()
-
-instance Default.Default InheritedMembers_key where
-  def = InheritedMembers_key Default.def Default.def
-
-instance Hashable.Hashable InheritedMembers_key where
-  hashWithSalt __salt
-    (InheritedMembers_key _container _inheritedMembers)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _container)
-        _inheritedMembers
-
-data MethodDeclaration_key = MethodDeclaration_key{methodDeclaration_key_name
-                                                   :: Name,
-                                                   methodDeclaration_key_container ::
-                                                   ContainerDeclaration}
-                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON MethodDeclaration_key where
-  toJSON (MethodDeclaration_key __field__name __field__container)
-    = Aeson.object
-        ("name" .= __field__name :
-           "container" .= __field__container : Prelude.mempty)
-
-instance Thrift.ThriftStruct MethodDeclaration_key where
-  buildStruct _proxy
-    (MethodDeclaration_key __field__name __field__container)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__name)
-           :
-           Thrift.genField _proxy "container" (Thrift.getStructType _proxy) 2
-             1
-             (Thrift.buildStruct _proxy __field__container)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef Default.def
-            __field__container <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__container
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__container <- ST.readSTRef __field__container
-                                             Prelude.pure
-                                               (MethodDeclaration_key __val__name __val__container)
-              _idMap = HashMap.fromList [("name", 1), ("container", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData MethodDeclaration_key where
-  rnf (MethodDeclaration_key __field__name __field__container)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__container `Prelude.seq` ()
-
-instance Default.Default MethodDeclaration_key where
-  def = MethodDeclaration_key Default.def Default.def
-
-instance Hashable.Hashable MethodDeclaration_key where
-  hashWithSalt __salt (MethodDeclaration_key _name _container)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-        _container
-
-data PropertyDeclaration_key = PropertyDeclaration_key{propertyDeclaration_key_name
-                                                       :: Name,
-                                                       propertyDeclaration_key_container ::
-                                                       ContainerDeclaration}
-                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON PropertyDeclaration_key where
-  toJSON (PropertyDeclaration_key __field__name __field__container)
-    = Aeson.object
-        ("name" .= __field__name :
-           "container" .= __field__container : Prelude.mempty)
-
-instance Thrift.ThriftStruct PropertyDeclaration_key where
-  buildStruct _proxy
-    (PropertyDeclaration_key __field__name __field__container)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__name)
-           :
-           Thrift.genField _proxy "container" (Thrift.getStructType _proxy) 2
-             1
-             (Thrift.buildStruct _proxy __field__container)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef Default.def
-            __field__container <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__container
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__container <- ST.readSTRef __field__container
-                                             Prelude.pure
-                                               (PropertyDeclaration_key __val__name
-                                                  __val__container)
-              _idMap = HashMap.fromList [("name", 1), ("container", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData PropertyDeclaration_key where
-  rnf (PropertyDeclaration_key __field__name __field__container)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__container `Prelude.seq` ()
-
-instance Default.Default PropertyDeclaration_key where
-  def = PropertyDeclaration_key Default.def Default.def
-
-instance Hashable.Hashable PropertyDeclaration_key where
-  hashWithSalt __salt (PropertyDeclaration_key _name _container)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-        _container
-
-data TypeConstDeclaration_key = TypeConstDeclaration_key{typeConstDeclaration_key_name
-                                                         :: Name,
-                                                         typeConstDeclaration_key_container ::
-                                                         ContainerDeclaration}
-                                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TypeConstDeclaration_key where
-  toJSON (TypeConstDeclaration_key __field__name __field__container)
-    = Aeson.object
-        ("name" .= __field__name :
-           "container" .= __field__container : Prelude.mempty)
-
-instance Thrift.ThriftStruct TypeConstDeclaration_key where
-  buildStruct _proxy
-    (TypeConstDeclaration_key __field__name __field__container)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__name)
-           :
-           Thrift.genField _proxy "container" (Thrift.getStructType _proxy) 2
-             1
-             (Thrift.buildStruct _proxy __field__container)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef Default.def
-            __field__container <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__container
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__container <- ST.readSTRef __field__container
-                                             Prelude.pure
-                                               (TypeConstDeclaration_key __val__name
-                                                  __val__container)
-              _idMap = HashMap.fromList [("name", 1), ("container", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData TypeConstDeclaration_key where
-  rnf (TypeConstDeclaration_key __field__name __field__container)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__container `Prelude.seq` ()
-
-instance Default.Default TypeConstDeclaration_key where
-  def = TypeConstDeclaration_key Default.def Default.def
-
-instance Hashable.Hashable TypeConstDeclaration_key where
-  hashWithSalt __salt (TypeConstDeclaration_key _name _container)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-        _container
-
-data ContainerChild_key = ContainerChild_key{containerChild_key_container
-                                             :: ContainerDeclaration,
-                                             containerChild_key_child :: ContainerDeclaration}
-                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ContainerChild_key where
-  toJSON (ContainerChild_key __field__container __field__child)
-    = Aeson.object
-        ("container" .= __field__container :
-           "child" .= __field__child : Prelude.mempty)
-
-instance Thrift.ThriftStruct ContainerChild_key where
-  buildStruct _proxy
-    (ContainerChild_key __field__container __field__child)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "container" (Thrift.getStructType _proxy) 1
-           0
-           (Thrift.buildStruct _proxy __field__container)
-           :
-           Thrift.genField _proxy "child" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__child)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__container <- ST.newSTRef Default.def
-            __field__child <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__container
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__child
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__container <- ST.readSTRef
-                                                                    __field__container
-                                             !__val__child <- ST.readSTRef __field__child
-                                             Prelude.pure
-                                               (ContainerChild_key __val__container __val__child)
-              _idMap = HashMap.fromList [("container", 1), ("child", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData ContainerChild_key where
-  rnf (ContainerChild_key __field__container __field__child)
-    = DeepSeq.rnf __field__container `Prelude.seq`
-        DeepSeq.rnf __field__child `Prelude.seq` ()
-
-instance Default.Default ContainerChild_key where
-  def = ContainerChild_key Default.def Default.def
-
-instance Hashable.Hashable ContainerChild_key where
-  hashWithSalt __salt (ContainerChild_key _container _child)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _container)
-        _child
-
-data ConstraintKind = ConstraintKind_As
-                    | ConstraintKind_Equal
-                    | ConstraintKind_Super
-                    | ConstraintKind__UNKNOWN Prelude.Int
-                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ConstraintKind where
-  toJSON = Aeson.toJSON . Thrift.fromThriftEnum
-
-instance DeepSeq.NFData ConstraintKind where
-  rnf __ConstraintKind = Prelude.seq __ConstraintKind ()
-
-instance Default.Default ConstraintKind where
-  def = ConstraintKind_As
-
-instance Hashable.Hashable ConstraintKind where
-  hashWithSalt _salt _val
-    = Hashable.hashWithSalt _salt (Thrift.fromThriftEnum _val)
-
-instance Thrift.ThriftEnum ConstraintKind where
-  toThriftEnum 0 = ConstraintKind_As
-  toThriftEnum 1 = ConstraintKind_Equal
-  toThriftEnum 2 = ConstraintKind_Super
-  toThriftEnum val = ConstraintKind__UNKNOWN val
-  fromThriftEnum ConstraintKind_As = 0
-  fromThriftEnum ConstraintKind_Equal = 1
-  fromThriftEnum ConstraintKind_Super = 2
-  fromThriftEnum (ConstraintKind__UNKNOWN val) = val
-  allThriftEnumValues
-    = [ConstraintKind_As, ConstraintKind_Equal, ConstraintKind_Super]
-  toThriftEnumEither 0 = Prelude.Right ConstraintKind_As
-  toThriftEnumEither 1 = Prelude.Right ConstraintKind_Equal
-  toThriftEnumEither 2 = Prelude.Right ConstraintKind_Super
-  toThriftEnumEither val
-    = Prelude.Left
-        ("toThriftEnumEither: not a valid identifier for enum ConstraintKind: "
-           ++ Prelude.show val)
-
-data Constraint = Constraint{constraint_constraintKind ::
-                             ConstraintKind,
-                             constraint_type :: Type,
-                             constraint_typeInfo :: Prelude.Maybe TypeInfo}
-                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Constraint where
-  toJSON
-    (Constraint __field__constraintKind __field__type
-       __field__typeInfo)
-    = Aeson.object
-        ("constraintKind" .= __field__constraintKind :
-           "type" .= __field__type :
-             Prelude.maybe Prelude.id ((:) . ("typeInfo" .=)) __field__typeInfo
-               Prelude.mempty)
-
-instance Thrift.ThriftStruct Constraint where
-  buildStruct _proxy
-    (Constraint __field__constraintKind __field__type
-       __field__typeInfo)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "constraintKind" (Thrift.getI32Type _proxy)
-           1
-           0
-           ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-               Thrift.fromThriftEnum)
-              __field__constraintKind)
-           :
-           Thrift.genField _proxy "type" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__type)
-             :
-             case __field__typeInfo of
-               Prelude.Just _val -> Thrift.genField _proxy "typeInfo"
-                                      (Thrift.getStructType _proxy)
-                                      3
-                                      2
-                                      (Thrift.buildStruct _proxy _val)
-                                      : []
-               Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__constraintKind <- ST.newSTRef Default.def
-            __field__type <- ST.newSTRef Default.def
-            __field__typeInfo <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "ConstraintKind")
-                                                                        ST.writeSTRef
-                                                                          __field__constraintKind
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__type
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__typeInfo
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__constraintKind <- ST.readSTRef
-                                                                         __field__constraintKind
-                                             !__val__type <- ST.readSTRef __field__type
-                                             !__val__typeInfo <- ST.readSTRef __field__typeInfo
-                                             Prelude.pure
-                                               (Constraint __val__constraintKind __val__type
-                                                  __val__typeInfo)
-              _idMap
-                = HashMap.fromList
-                    [("constraintKind", 1), ("type", 2), ("typeInfo", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData Constraint where
-  rnf
-    (Constraint __field__constraintKind __field__type
-       __field__typeInfo)
-    = DeepSeq.rnf __field__constraintKind `Prelude.seq`
-        DeepSeq.rnf __field__type `Prelude.seq`
-          DeepSeq.rnf __field__typeInfo `Prelude.seq` ()
-
-instance Default.Default Constraint where
-  def = Constraint Default.def Default.def Prelude.Nothing
-
-instance Hashable.Hashable Constraint where
-  hashWithSalt __salt (Constraint _constraintKind _type _typeInfo)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt __salt _constraintKind)
-           _type)
-        _typeInfo
-
-data TypeParameter = TypeParameter{typeParameter_name :: Name,
-                                   typeParameter_variance :: Variance,
-                                   typeParameter_reifyKind :: ReifyKind,
-                                   typeParameter_constraints :: [Constraint],
-                                   typeParameter_attributes :: [UserAttribute]}
-                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TypeParameter where
-  toJSON
-    (TypeParameter __field__name __field__variance __field__reifyKind
-       __field__constraints __field__attributes)
-    = Aeson.object
-        ("name" .= __field__name :
-           "variance" .= __field__variance :
-             "reifyKind" .= __field__reifyKind :
-               "constraints" .= __field__constraints :
-                 "attributes" .= __field__attributes : Prelude.mempty)
-
-instance Thrift.ThriftStruct TypeParameter where
-  buildStruct _proxy
-    (TypeParameter __field__name __field__variance __field__reifyKind
-       __field__constraints __field__attributes)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__name)
-           :
-           Thrift.genField _proxy "variance" (Thrift.getI32Type _proxy) 2 1
-             ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                 Thrift.fromThriftEnum)
-                __field__variance)
-             :
-             Thrift.genField _proxy "reifyKind" (Thrift.getI32Type _proxy) 3 2
-               ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                   Thrift.fromThriftEnum)
-                  __field__reifyKind)
-               :
-               Thrift.genField _proxy "constraints" (Thrift.getListType _proxy) 4
-                 3
-                 (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                    (Thrift.buildStruct _proxy)
-                    __field__constraints)
-                 :
-                 Thrift.genField _proxy "attributes" (Thrift.getListType _proxy) 5 4
-                   (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                      (Thrift.buildStruct _proxy)
-                      __field__attributes)
-                   : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef Default.def
-            __field__variance <- ST.newSTRef Default.def
-            __field__reifyKind <- ST.newSTRef Default.def
-            __field__constraints <- ST.newSTRef Default.def
-            __field__attributes <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "Variance")
-                                                                        ST.writeSTRef
-                                                                          __field__variance
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "ReifyKind")
-                                                                        ST.writeSTRef
-                                                                          __field__reifyKind
-                                                                          _val
-                                                                 4 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__constraints
-                                                                          _val
-                                                                 5 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__attributes
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__variance <- ST.readSTRef __field__variance
-                                             !__val__reifyKind <- ST.readSTRef __field__reifyKind
-                                             !__val__constraints <- ST.readSTRef
-                                                                      __field__constraints
-                                             !__val__attributes <- ST.readSTRef __field__attributes
-                                             Prelude.pure
-                                               (TypeParameter __val__name __val__variance
-                                                  __val__reifyKind
-                                                  __val__constraints
-                                                  __val__attributes)
-              _idMap
-                = HashMap.fromList
-                    [("name", 1), ("variance", 2), ("reifyKind", 3),
-                     ("constraints", 4), ("attributes", 5)]
-            _parse 0)
-
-instance DeepSeq.NFData TypeParameter where
-  rnf
-    (TypeParameter __field__name __field__variance __field__reifyKind
-       __field__constraints __field__attributes)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__variance `Prelude.seq`
-          DeepSeq.rnf __field__reifyKind `Prelude.seq`
-            DeepSeq.rnf __field__constraints `Prelude.seq`
-              DeepSeq.rnf __field__attributes `Prelude.seq` ()
-
-instance Default.Default TypeParameter where
-  def
-    = TypeParameter Default.def Default.def Default.def Default.def
-        Default.def
-
-instance Hashable.Hashable TypeParameter where
-  hashWithSalt __salt
-    (TypeParameter _name _variance _reifyKind _constraints _attributes)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt
-              (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-                 _variance)
-              _reifyKind)
-           _constraints)
-        _attributes
-
-data FunctionDefinition_key = FunctionDefinition_key{functionDefinition_key_declaration
-                                                     :: FunctionDeclaration,
-                                                     functionDefinition_key_signature :: Signature,
-                                                     functionDefinition_key_isAsync :: Prelude.Bool,
-                                                     functionDefinition_key_attributes ::
-                                                     [UserAttribute],
-                                                     functionDefinition_key_typeParams ::
-                                                     [TypeParameter],
-                                                     functionDefinition_key_module_ ::
-                                                     Prelude.Maybe ModuleMembership,
-                                                     functionDefinition_key_readonlyRet ::
-                                                     Prelude.Maybe ReadonlyKind}
-                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON FunctionDefinition_key where
-  toJSON
-    (FunctionDefinition_key __field__declaration __field__signature
-       __field__isAsync __field__attributes __field__typeParams
-       __field__module_ __field__readonlyRet)
-    = Aeson.object
-        ("declaration" .= __field__declaration :
-           "signature" .= __field__signature :
-             "isAsync" .= __field__isAsync :
-               "attributes" .= __field__attributes :
-                 "typeParams" .= __field__typeParams :
-                   Prelude.maybe Prelude.id ((:) . ("module_" .=)) __field__module_
-                     (Prelude.maybe Prelude.id ((:) . ("readonlyRet" .=))
-                        __field__readonlyRet
-                        Prelude.mempty))
-
-instance Thrift.ThriftStruct FunctionDefinition_key where
-  buildStruct _proxy
-    (FunctionDefinition_key __field__declaration __field__signature
-       __field__isAsync __field__attributes __field__typeParams
-       __field__module_ __field__readonlyRet)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "declaration" (Thrift.getStructType _proxy)
-           1
-           0
-           (Thrift.buildStruct _proxy __field__declaration)
-           :
-           Thrift.genField _proxy "signature" (Thrift.getStructType _proxy) 2
-             1
-             (Thrift.buildStruct _proxy __field__signature)
-             :
-             Thrift.genFieldBool _proxy "isAsync" 3 2 __field__isAsync :
-               Thrift.genField _proxy "attributes" (Thrift.getListType _proxy) 4 3
-                 (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                    (Thrift.buildStruct _proxy)
-                    __field__attributes)
-                 :
-                 Thrift.genField _proxy "typeParams" (Thrift.getListType _proxy) 5 4
-                   (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                      (Thrift.buildStruct _proxy)
-                      __field__typeParams)
-                   :
-                   let (__cereal__module_, __id__module_)
-                         = case __field__module_ of
-                             Prelude.Just _val -> ((:)
-                                                     (Thrift.genField _proxy "module_"
-                                                        (Thrift.getStructType _proxy)
-                                                        6
-                                                        5
-                                                        (Thrift.buildStruct _proxy _val)),
-                                                   6)
-                             Prelude.Nothing -> (Prelude.id, 5)
-                     in
-                     __cereal__module_
-                       (case __field__readonlyRet of
-                          Prelude.Just _val -> Thrift.genField _proxy "readonlyRet"
-                                                 (Thrift.getI32Type _proxy)
-                                                 7
-                                                 __id__module_
-                                                 ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                                                     Thrift.fromThriftEnum)
-                                                    _val)
-                                                 : []
-                          Prelude.Nothing -> []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__declaration <- ST.newSTRef Default.def
-            __field__signature <- ST.newSTRef Default.def
-            __field__isAsync <- ST.newSTRef Prelude.False
-            __field__attributes <- ST.newSTRef Default.def
-            __field__typeParams <- ST.newSTRef Default.def
-            __field__module_ <- ST.newSTRef Prelude.Nothing
-            __field__readonlyRet <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__declaration
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__signature
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getBoolType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseBoolF
-                                                                                      _proxy
-                                                                                      _bool)
-                                                                        ST.writeSTRef
-                                                                          __field__isAsync
-                                                                          _val
-                                                                 4 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__attributes
-                                                                          _val
-                                                                 5 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__typeParams
-                                                                          _val
-                                                                 6 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__module_
-                                                                          (Prelude.Just _val)
-                                                                 7 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "ReadonlyKind")
-                                                                        ST.writeSTRef
-                                                                          __field__readonlyRet
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__declaration <- ST.readSTRef
-                                                                      __field__declaration
-                                             !__val__signature <- ST.readSTRef __field__signature
-                                             !__val__isAsync <- ST.readSTRef __field__isAsync
-                                             !__val__attributes <- ST.readSTRef __field__attributes
-                                             !__val__typeParams <- ST.readSTRef __field__typeParams
-                                             !__val__module_ <- ST.readSTRef __field__module_
-                                             !__val__readonlyRet <- ST.readSTRef
-                                                                      __field__readonlyRet
-                                             Prelude.pure
-                                               (FunctionDefinition_key __val__declaration
-                                                  __val__signature
-                                                  __val__isAsync
-                                                  __val__attributes
-                                                  __val__typeParams
-                                                  __val__module_
-                                                  __val__readonlyRet)
-              _idMap
-                = HashMap.fromList
-                    [("declaration", 1), ("signature", 2), ("isAsync", 3),
-                     ("attributes", 4), ("typeParams", 5), ("module_", 6),
-                     ("readonlyRet", 7)]
-            _parse 0)
-
-instance DeepSeq.NFData FunctionDefinition_key where
-  rnf
-    (FunctionDefinition_key __field__declaration __field__signature
-       __field__isAsync __field__attributes __field__typeParams
-       __field__module_ __field__readonlyRet)
-    = DeepSeq.rnf __field__declaration `Prelude.seq`
-        DeepSeq.rnf __field__signature `Prelude.seq`
-          DeepSeq.rnf __field__isAsync `Prelude.seq`
-            DeepSeq.rnf __field__attributes `Prelude.seq`
-              DeepSeq.rnf __field__typeParams `Prelude.seq`
-                DeepSeq.rnf __field__module_ `Prelude.seq`
-                  DeepSeq.rnf __field__readonlyRet `Prelude.seq` ()
-
-instance Default.Default FunctionDefinition_key where
-  def
-    = FunctionDefinition_key Default.def Default.def Prelude.False
-        Default.def
-        Default.def
-        Prelude.Nothing
-        Prelude.Nothing
-
-instance Hashable.Hashable FunctionDefinition_key where
-  hashWithSalt __salt
-    (FunctionDefinition_key _declaration _signature _isAsync
-       _attributes _typeParams _module_ _readonlyRet)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt
-              (Hashable.hashWithSalt
-                 (Hashable.hashWithSalt
-                    (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _declaration)
-                       _signature)
-                    _isAsync)
-                 _attributes)
-              _typeParams)
-           _module_)
-        _readonlyRet
-
-data InterfaceDefinition_key = InterfaceDefinition_key{interfaceDefinition_key_declaration
-                                                       :: InterfaceDeclaration,
-                                                       interfaceDefinition_key_members ::
-                                                       [Declaration],
-                                                       interfaceDefinition_key_extends_ ::
-                                                       [InterfaceDeclaration],
-                                                       interfaceDefinition_key_attributes ::
-                                                       [UserAttribute],
-                                                       interfaceDefinition_key_typeParams ::
-                                                       [TypeParameter],
-                                                       interfaceDefinition_key_requireExtends ::
-                                                       [ClassDeclaration],
-                                                       interfaceDefinition_key_module_ ::
-                                                       Prelude.Maybe ModuleMembership}
-                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON InterfaceDefinition_key where
-  toJSON
-    (InterfaceDefinition_key __field__declaration __field__members
-       __field__extends_ __field__attributes __field__typeParams
-       __field__requireExtends __field__module_)
-    = Aeson.object
-        ("declaration" .= __field__declaration :
-           "members" .= __field__members :
-             "extends_" .= __field__extends_ :
-               "attributes" .= __field__attributes :
-                 "typeParams" .= __field__typeParams :
-                   "requireExtends" .= __field__requireExtends :
-                     Prelude.maybe Prelude.id ((:) . ("module_" .=)) __field__module_
-                       Prelude.mempty)
-
-instance Thrift.ThriftStruct InterfaceDefinition_key where
-  buildStruct _proxy
-    (InterfaceDefinition_key __field__declaration __field__members
-       __field__extends_ __field__attributes __field__typeParams
-       __field__requireExtends __field__module_)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "declaration" (Thrift.getStructType _proxy)
-           1
-           0
-           (Thrift.buildStruct _proxy __field__declaration)
-           :
-           Thrift.genField _proxy "members" (Thrift.getListType _proxy) 2 1
-             (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                (Thrift.buildStruct _proxy)
-                __field__members)
-             :
-             Thrift.genField _proxy "extends_" (Thrift.getListType _proxy) 3 2
-               (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                  (Thrift.buildStruct _proxy)
-                  __field__extends_)
-               :
-               Thrift.genField _proxy "attributes" (Thrift.getListType _proxy) 4 3
-                 (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                    (Thrift.buildStruct _proxy)
-                    __field__attributes)
-                 :
-                 Thrift.genField _proxy "typeParams" (Thrift.getListType _proxy) 5 4
-                   (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                      (Thrift.buildStruct _proxy)
-                      __field__typeParams)
-                   :
-                   Thrift.genField _proxy "requireExtends" (Thrift.getListType _proxy)
-                     6
-                     5
-                     (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                        (Thrift.buildStruct _proxy)
-                        __field__requireExtends)
-                     :
-                     case __field__module_ of
-                       Prelude.Just _val -> Thrift.genField _proxy "module_"
-                                              (Thrift.getStructType _proxy)
-                                              7
-                                              6
-                                              (Thrift.buildStruct _proxy _val)
-                                              : []
-                       Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__declaration <- ST.newSTRef Default.def
-            __field__members <- ST.newSTRef Default.def
-            __field__extends_ <- ST.newSTRef Default.def
-            __field__attributes <- ST.newSTRef Default.def
-            __field__typeParams <- ST.newSTRef Default.def
-            __field__requireExtends <- ST.newSTRef Default.def
-            __field__module_ <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__declaration
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__members
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__extends_
-                                                                          _val
-                                                                 4 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__attributes
-                                                                          _val
-                                                                 5 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__typeParams
-                                                                          _val
-                                                                 6 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__requireExtends
-                                                                          _val
-                                                                 7 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__module_
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__declaration <- ST.readSTRef
-                                                                      __field__declaration
-                                             !__val__members <- ST.readSTRef __field__members
-                                             !__val__extends_ <- ST.readSTRef __field__extends_
-                                             !__val__attributes <- ST.readSTRef __field__attributes
-                                             !__val__typeParams <- ST.readSTRef __field__typeParams
-                                             !__val__requireExtends <- ST.readSTRef
-                                                                         __field__requireExtends
-                                             !__val__module_ <- ST.readSTRef __field__module_
-                                             Prelude.pure
-                                               (InterfaceDefinition_key __val__declaration
-                                                  __val__members
-                                                  __val__extends_
-                                                  __val__attributes
-                                                  __val__typeParams
-                                                  __val__requireExtends
-                                                  __val__module_)
-              _idMap
-                = HashMap.fromList
-                    [("declaration", 1), ("members", 2), ("extends_", 3),
-                     ("attributes", 4), ("typeParams", 5), ("requireExtends", 6),
-                     ("module_", 7)]
-            _parse 0)
-
-instance DeepSeq.NFData InterfaceDefinition_key where
-  rnf
-    (InterfaceDefinition_key __field__declaration __field__members
-       __field__extends_ __field__attributes __field__typeParams
-       __field__requireExtends __field__module_)
-    = DeepSeq.rnf __field__declaration `Prelude.seq`
-        DeepSeq.rnf __field__members `Prelude.seq`
-          DeepSeq.rnf __field__extends_ `Prelude.seq`
-            DeepSeq.rnf __field__attributes `Prelude.seq`
-              DeepSeq.rnf __field__typeParams `Prelude.seq`
-                DeepSeq.rnf __field__requireExtends `Prelude.seq`
-                  DeepSeq.rnf __field__module_ `Prelude.seq` ()
-
-instance Default.Default InterfaceDefinition_key where
-  def
-    = InterfaceDefinition_key Default.def Default.def Default.def
-        Default.def
-        Default.def
-        Default.def
-        Prelude.Nothing
-
-instance Hashable.Hashable InterfaceDefinition_key where
-  hashWithSalt __salt
-    (InterfaceDefinition_key _declaration _members _extends_
-       _attributes _typeParams _requireExtends _module_)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt
-              (Hashable.hashWithSalt
-                 (Hashable.hashWithSalt
-                    (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _declaration)
-                       _members)
-                    _extends_)
-                 _attributes)
-              _typeParams)
-           _requireExtends)
-        _module_
-
-data MethodDefinition_key = MethodDefinition_key{methodDefinition_key_declaration
-                                                 :: MethodDeclaration,
-                                                 methodDefinition_key_signature :: Signature,
-                                                 methodDefinition_key_visibility :: Visibility,
-                                                 methodDefinition_key_isAbstract :: Prelude.Bool,
-                                                 methodDefinition_key_isAsync :: Prelude.Bool,
-                                                 methodDefinition_key_isFinal :: Prelude.Bool,
-                                                 methodDefinition_key_isStatic :: Prelude.Bool,
-                                                 methodDefinition_key_attributes :: [UserAttribute],
-                                                 methodDefinition_key_typeParams :: [TypeParameter],
-                                                 methodDefinition_key_isReadonlyThis ::
-                                                 Prelude.Maybe Prelude.Bool,
-                                                 methodDefinition_key_readonlyRet ::
-                                                 Prelude.Maybe ReadonlyKind}
-                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON MethodDefinition_key where
-  toJSON
-    (MethodDefinition_key __field__declaration __field__signature
-       __field__visibility __field__isAbstract __field__isAsync
-       __field__isFinal __field__isStatic __field__attributes
-       __field__typeParams __field__isReadonlyThis __field__readonlyRet)
-    = Aeson.object
-        ("declaration" .= __field__declaration :
-           "signature" .= __field__signature :
-             "visibility" .= __field__visibility :
-               "isAbstract" .= __field__isAbstract :
-                 "isAsync" .= __field__isAsync :
-                   "isFinal" .= __field__isFinal :
-                     "isStatic" .= __field__isStatic :
-                       "attributes" .= __field__attributes :
-                         "typeParams" .= __field__typeParams :
-                           Prelude.maybe Prelude.id ((:) . ("isReadonlyThis" .=))
-                             __field__isReadonlyThis
-                             (Prelude.maybe Prelude.id ((:) . ("readonlyRet" .=))
-                                __field__readonlyRet
-                                Prelude.mempty))
-
-instance Thrift.ThriftStruct MethodDefinition_key where
-  buildStruct _proxy
-    (MethodDefinition_key __field__declaration __field__signature
-       __field__visibility __field__isAbstract __field__isAsync
-       __field__isFinal __field__isStatic __field__attributes
-       __field__typeParams __field__isReadonlyThis __field__readonlyRet)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "declaration" (Thrift.getStructType _proxy)
-           1
-           0
-           (Thrift.buildStruct _proxy __field__declaration)
-           :
-           Thrift.genField _proxy "signature" (Thrift.getStructType _proxy) 2
-             1
-             (Thrift.buildStruct _proxy __field__signature)
-             :
-             Thrift.genField _proxy "visibility" (Thrift.getI32Type _proxy) 3 2
-               ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                   Thrift.fromThriftEnum)
-                  __field__visibility)
-               :
-               Thrift.genFieldBool _proxy "isAbstract" 4 3 __field__isAbstract :
-                 Thrift.genFieldBool _proxy "isAsync" 5 4 __field__isAsync :
-                   Thrift.genFieldBool _proxy "isFinal" 6 5 __field__isFinal :
-                     Thrift.genFieldBool _proxy "isStatic" 7 6 __field__isStatic :
-                       Thrift.genField _proxy "attributes" (Thrift.getListType _proxy) 8 7
-                         (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                            (Thrift.buildStruct _proxy)
-                            __field__attributes)
-                         :
-                         Thrift.genField _proxy "typeParams" (Thrift.getListType _proxy) 9 8
-                           (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                              (Thrift.buildStruct _proxy)
-                              __field__typeParams)
-                           :
-                           let (__cereal__isReadonlyThis, __id__isReadonlyThis)
-                                 = case __field__isReadonlyThis of
-                                     Prelude.Just _val -> ((:)
-                                                             (Thrift.genFieldBool _proxy
-                                                                "isReadonlyThis"
-                                                                10
-                                                                9
-                                                                _val),
-                                                           10)
-                                     Prelude.Nothing -> (Prelude.id, 9)
-                             in
-                             __cereal__isReadonlyThis
-                               (case __field__readonlyRet of
-                                  Prelude.Just _val -> Thrift.genField _proxy "readonlyRet"
-                                                         (Thrift.getI32Type _proxy)
-                                                         11
-                                                         __id__isReadonlyThis
-                                                         ((Thrift.genI32 _proxy .
-                                                             Prelude.fromIntegral
-                                                             . Thrift.fromThriftEnum)
-                                                            _val)
-                                                         : []
-                                  Prelude.Nothing -> []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__declaration <- ST.newSTRef Default.def
-            __field__signature <- ST.newSTRef Default.def
-            __field__visibility <- ST.newSTRef Default.def
-            __field__isAbstract <- ST.newSTRef Prelude.False
-            __field__isAsync <- ST.newSTRef Prelude.False
-            __field__isFinal <- ST.newSTRef Prelude.False
-            __field__isStatic <- ST.newSTRef Prelude.False
-            __field__attributes <- ST.newSTRef Default.def
-            __field__typeParams <- ST.newSTRef Default.def
-            __field__isReadonlyThis <- ST.newSTRef Prelude.Nothing
-            __field__readonlyRet <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__declaration
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__signature
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "Visibility")
-                                                                        ST.writeSTRef
-                                                                          __field__visibility
-                                                                          _val
-                                                                 4 | _type ==
-                                                                       Thrift.getBoolType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseBoolF
-                                                                                      _proxy
-                                                                                      _bool)
-                                                                        ST.writeSTRef
-                                                                          __field__isAbstract
-                                                                          _val
-                                                                 5 | _type ==
-                                                                       Thrift.getBoolType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseBoolF
-                                                                                      _proxy
-                                                                                      _bool)
-                                                                        ST.writeSTRef
-                                                                          __field__isAsync
-                                                                          _val
-                                                                 6 | _type ==
-                                                                       Thrift.getBoolType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseBoolF
-                                                                                      _proxy
-                                                                                      _bool)
-                                                                        ST.writeSTRef
-                                                                          __field__isFinal
-                                                                          _val
-                                                                 7 | _type ==
-                                                                       Thrift.getBoolType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseBoolF
-                                                                                      _proxy
-                                                                                      _bool)
-                                                                        ST.writeSTRef
-                                                                          __field__isStatic
-                                                                          _val
-                                                                 8 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__attributes
-                                                                          _val
-                                                                 9 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__typeParams
-                                                                          _val
-                                                                 10 | _type ==
-                                                                        Thrift.getBoolType _proxy
-                                                                      ->
-                                                                      do !_val <- Trans.lift
-                                                                                    (Thrift.parseBoolF
-                                                                                       _proxy
-                                                                                       _bool)
-                                                                         ST.writeSTRef
-                                                                           __field__isReadonlyThis
-                                                                           (Prelude.Just _val)
-                                                                 11 | _type ==
-                                                                        Thrift.getI32Type _proxy
-                                                                      ->
-                                                                      do !_val <- Trans.lift
-                                                                                    (Thrift.parseEnum
-                                                                                       _proxy
-                                                                                       "ReadonlyKind")
-                                                                         ST.writeSTRef
-                                                                           __field__readonlyRet
-                                                                           (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__declaration <- ST.readSTRef
-                                                                      __field__declaration
-                                             !__val__signature <- ST.readSTRef __field__signature
-                                             !__val__visibility <- ST.readSTRef __field__visibility
-                                             !__val__isAbstract <- ST.readSTRef __field__isAbstract
-                                             !__val__isAsync <- ST.readSTRef __field__isAsync
-                                             !__val__isFinal <- ST.readSTRef __field__isFinal
-                                             !__val__isStatic <- ST.readSTRef __field__isStatic
-                                             !__val__attributes <- ST.readSTRef __field__attributes
-                                             !__val__typeParams <- ST.readSTRef __field__typeParams
-                                             !__val__isReadonlyThis <- ST.readSTRef
-                                                                         __field__isReadonlyThis
-                                             !__val__readonlyRet <- ST.readSTRef
-                                                                      __field__readonlyRet
-                                             Prelude.pure
-                                               (MethodDefinition_key __val__declaration
-                                                  __val__signature
-                                                  __val__visibility
-                                                  __val__isAbstract
-                                                  __val__isAsync
-                                                  __val__isFinal
-                                                  __val__isStatic
-                                                  __val__attributes
-                                                  __val__typeParams
-                                                  __val__isReadonlyThis
-                                                  __val__readonlyRet)
-              _idMap
-                = HashMap.fromList
-                    [("declaration", 1), ("signature", 2), ("visibility", 3),
-                     ("isAbstract", 4), ("isAsync", 5), ("isFinal", 6), ("isStatic", 7),
-                     ("attributes", 8), ("typeParams", 9), ("isReadonlyThis", 10),
-                     ("readonlyRet", 11)]
-            _parse 0)
-
-instance DeepSeq.NFData MethodDefinition_key where
-  rnf
-    (MethodDefinition_key __field__declaration __field__signature
-       __field__visibility __field__isAbstract __field__isAsync
-       __field__isFinal __field__isStatic __field__attributes
-       __field__typeParams __field__isReadonlyThis __field__readonlyRet)
-    = DeepSeq.rnf __field__declaration `Prelude.seq`
-        DeepSeq.rnf __field__signature `Prelude.seq`
-          DeepSeq.rnf __field__visibility `Prelude.seq`
-            DeepSeq.rnf __field__isAbstract `Prelude.seq`
-              DeepSeq.rnf __field__isAsync `Prelude.seq`
-                DeepSeq.rnf __field__isFinal `Prelude.seq`
-                  DeepSeq.rnf __field__isStatic `Prelude.seq`
-                    DeepSeq.rnf __field__attributes `Prelude.seq`
-                      DeepSeq.rnf __field__typeParams `Prelude.seq`
-                        DeepSeq.rnf __field__isReadonlyThis `Prelude.seq`
-                          DeepSeq.rnf __field__readonlyRet `Prelude.seq` ()
-
-instance Default.Default MethodDefinition_key where
-  def
-    = MethodDefinition_key Default.def Default.def Default.def
-        Prelude.False
-        Prelude.False
-        Prelude.False
-        Prelude.False
-        Default.def
-        Default.def
-        Prelude.Nothing
-        Prelude.Nothing
-
-instance Hashable.Hashable MethodDefinition_key where
-  hashWithSalt __salt
-    (MethodDefinition_key _declaration _signature _visibility
-       _isAbstract _isAsync _isFinal _isStatic _attributes _typeParams
-       _isReadonlyThis _readonlyRet)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt
-              (Hashable.hashWithSalt
-                 (Hashable.hashWithSalt
-                    (Hashable.hashWithSalt
-                       (Hashable.hashWithSalt
-                          (Hashable.hashWithSalt
-                             (Hashable.hashWithSalt
-                                (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _declaration)
-                                   _signature)
-                                _visibility)
-                             _isAbstract)
-                          _isAsync)
-                       _isFinal)
-                    _isStatic)
-                 _attributes)
-              _typeParams)
-           _isReadonlyThis)
-        _readonlyRet
-
-data TraitDefinition_key = TraitDefinition_key{traitDefinition_key_declaration
-                                               :: TraitDeclaration,
-                                               traitDefinition_key_members :: [Declaration],
-                                               traitDefinition_key_implements_ ::
-                                               [InterfaceDeclaration],
-                                               traitDefinition_key_uses :: [TraitDeclaration],
-                                               traitDefinition_key_attributes :: [UserAttribute],
-                                               traitDefinition_key_typeParams :: [TypeParameter],
-                                               traitDefinition_key_requireExtends ::
-                                               [ClassDeclaration],
-                                               traitDefinition_key_requireImplements ::
-                                               [InterfaceDeclaration],
-                                               traitDefinition_key_module_ ::
-                                               Prelude.Maybe ModuleMembership,
-                                               traitDefinition_key_requireClass ::
-                                               Prelude.Maybe [ClassDeclaration]}
-                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TraitDefinition_key where
-  toJSON
-    (TraitDefinition_key __field__declaration __field__members
-       __field__implements_ __field__uses __field__attributes
-       __field__typeParams __field__requireExtends
-       __field__requireImplements __field__module_ __field__requireClass)
-    = Aeson.object
-        ("declaration" .= __field__declaration :
-           "members" .= __field__members :
-             "implements_" .= __field__implements_ :
-               "uses" .= __field__uses :
-                 "attributes" .= __field__attributes :
-                   "typeParams" .= __field__typeParams :
-                     "requireExtends" .= __field__requireExtends :
-                       "requireImplements" .= __field__requireImplements :
-                         Prelude.maybe Prelude.id ((:) . ("module_" .=)) __field__module_
-                           (Prelude.maybe Prelude.id ((:) . ("requireClass" .=))
-                              __field__requireClass
-                              Prelude.mempty))
-
-instance Thrift.ThriftStruct TraitDefinition_key where
-  buildStruct _proxy
-    (TraitDefinition_key __field__declaration __field__members
-       __field__implements_ __field__uses __field__attributes
-       __field__typeParams __field__requireExtends
-       __field__requireImplements __field__module_ __field__requireClass)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "declaration" (Thrift.getStructType _proxy)
-           1
-           0
-           (Thrift.buildStruct _proxy __field__declaration)
-           :
-           Thrift.genField _proxy "members" (Thrift.getListType _proxy) 2 1
-             (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                (Thrift.buildStruct _proxy)
-                __field__members)
-             :
-             Thrift.genField _proxy "implements_" (Thrift.getListType _proxy) 3
-               2
-               (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                  (Thrift.buildStruct _proxy)
-                  __field__implements_)
-               :
-               Thrift.genField _proxy "uses" (Thrift.getListType _proxy) 4 3
-                 (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                    (Thrift.buildStruct _proxy)
-                    __field__uses)
-                 :
-                 Thrift.genField _proxy "attributes" (Thrift.getListType _proxy) 5 4
-                   (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                      (Thrift.buildStruct _proxy)
-                      __field__attributes)
-                   :
-                   Thrift.genField _proxy "typeParams" (Thrift.getListType _proxy) 6 5
-                     (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                        (Thrift.buildStruct _proxy)
-                        __field__typeParams)
-                     :
-                     Thrift.genField _proxy "requireExtends" (Thrift.getListType _proxy)
-                       7
-                       6
-                       (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                          (Thrift.buildStruct _proxy)
-                          __field__requireExtends)
-                       :
-                       Thrift.genField _proxy "requireImplements"
-                         (Thrift.getListType _proxy)
-                         8
-                         7
-                         (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                            (Thrift.buildStruct _proxy)
-                            __field__requireImplements)
-                         :
-                         let (__cereal__module_, __id__module_)
-                               = case __field__module_ of
-                                   Prelude.Just _val -> ((:)
-                                                           (Thrift.genField _proxy "module_"
-                                                              (Thrift.getStructType _proxy)
-                                                              9
-                                                              8
-                                                              (Thrift.buildStruct _proxy _val)),
-                                                         9)
-                                   Prelude.Nothing -> (Prelude.id, 8)
-                           in
-                           __cereal__module_
-                             (case __field__requireClass of
-                                Prelude.Just _val -> Thrift.genField _proxy "requireClass"
-                                                       (Thrift.getListType _proxy)
-                                                       10
-                                                       __id__module_
-                                                       (Thrift.genList _proxy
-                                                          (Thrift.getStructType _proxy)
-                                                          (Thrift.buildStruct _proxy)
-                                                          _val)
-                                                       : []
-                                Prelude.Nothing -> []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__declaration <- ST.newSTRef Default.def
-            __field__members <- ST.newSTRef Default.def
-            __field__implements_ <- ST.newSTRef Default.def
-            __field__uses <- ST.newSTRef Default.def
-            __field__attributes <- ST.newSTRef Default.def
-            __field__typeParams <- ST.newSTRef Default.def
-            __field__requireExtends <- ST.newSTRef Default.def
-            __field__requireImplements <- ST.newSTRef Default.def
-            __field__module_ <- ST.newSTRef Prelude.Nothing
-            __field__requireClass <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__declaration
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__members
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__implements_
-                                                                          _val
-                                                                 4 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef __field__uses
-                                                                          _val
-                                                                 5 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__attributes
-                                                                          _val
-                                                                 6 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__typeParams
-                                                                          _val
-                                                                 7 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__requireExtends
-                                                                          _val
-                                                                 8 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__requireImplements
-                                                                          _val
-                                                                 9 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__module_
-                                                                          (Prelude.Just _val)
-                                                                 10 | _type ==
-                                                                        Thrift.getListType _proxy
-                                                                      ->
-                                                                      do !_val <- Trans.lift
-                                                                                    (Prelude.snd <$>
-                                                                                       Thrift.parseList
-                                                                                         _proxy
-                                                                                         (Thrift.parseStruct
-                                                                                            _proxy))
-                                                                         ST.writeSTRef
-                                                                           __field__requireClass
-                                                                           (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__declaration <- ST.readSTRef
-                                                                      __field__declaration
-                                             !__val__members <- ST.readSTRef __field__members
-                                             !__val__implements_ <- ST.readSTRef
-                                                                      __field__implements_
-                                             !__val__uses <- ST.readSTRef __field__uses
-                                             !__val__attributes <- ST.readSTRef __field__attributes
-                                             !__val__typeParams <- ST.readSTRef __field__typeParams
-                                             !__val__requireExtends <- ST.readSTRef
-                                                                         __field__requireExtends
-                                             !__val__requireImplements <- ST.readSTRef
-                                                                            __field__requireImplements
-                                             !__val__module_ <- ST.readSTRef __field__module_
-                                             !__val__requireClass <- ST.readSTRef
-                                                                       __field__requireClass
-                                             Prelude.pure
-                                               (TraitDefinition_key __val__declaration
-                                                  __val__members
-                                                  __val__implements_
-                                                  __val__uses
-                                                  __val__attributes
-                                                  __val__typeParams
-                                                  __val__requireExtends
-                                                  __val__requireImplements
-                                                  __val__module_
-                                                  __val__requireClass)
-              _idMap
-                = HashMap.fromList
-                    [("declaration", 1), ("members", 2), ("implements_", 3),
-                     ("uses", 4), ("attributes", 5), ("typeParams", 6),
-                     ("requireExtends", 7), ("requireImplements", 8), ("module_", 9),
-                     ("requireClass", 10)]
-            _parse 0)
-
-instance DeepSeq.NFData TraitDefinition_key where
-  rnf
-    (TraitDefinition_key __field__declaration __field__members
-       __field__implements_ __field__uses __field__attributes
-       __field__typeParams __field__requireExtends
-       __field__requireImplements __field__module_ __field__requireClass)
-    = DeepSeq.rnf __field__declaration `Prelude.seq`
-        DeepSeq.rnf __field__members `Prelude.seq`
-          DeepSeq.rnf __field__implements_ `Prelude.seq`
-            DeepSeq.rnf __field__uses `Prelude.seq`
-              DeepSeq.rnf __field__attributes `Prelude.seq`
-                DeepSeq.rnf __field__typeParams `Prelude.seq`
-                  DeepSeq.rnf __field__requireExtends `Prelude.seq`
-                    DeepSeq.rnf __field__requireImplements `Prelude.seq`
-                      DeepSeq.rnf __field__module_ `Prelude.seq`
-                        DeepSeq.rnf __field__requireClass `Prelude.seq` ()
-
-instance Default.Default TraitDefinition_key where
-  def
-    = TraitDefinition_key Default.def Default.def Default.def
-        Default.def
-        Default.def
-        Default.def
-        Default.def
-        Default.def
-        Prelude.Nothing
-        Prelude.Nothing
-
-instance Hashable.Hashable TraitDefinition_key where
-  hashWithSalt __salt
-    (TraitDefinition_key _declaration _members _implements_ _uses
-       _attributes _typeParams _requireExtends _requireImplements _module_
-       _requireClass)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt
-              (Hashable.hashWithSalt
-                 (Hashable.hashWithSalt
-                    (Hashable.hashWithSalt
-                       (Hashable.hashWithSalt
-                          (Hashable.hashWithSalt
-                             (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _declaration)
-                                _members)
-                             _implements_)
-                          _uses)
-                       _attributes)
-                    _typeParams)
-                 _requireExtends)
-              _requireImplements)
-           _module_)
-        _requireClass
-
-data TypedefDefinition_key = TypedefDefinition_key{typedefDefinition_key_declaration
-                                                   :: TypedefDeclaration,
-                                                   typedefDefinition_key_isTransparent ::
-                                                   Prelude.Bool,
-                                                   typedefDefinition_key_attributes ::
-                                                   [UserAttribute],
-                                                   typedefDefinition_key_typeParams ::
-                                                   [TypeParameter],
-                                                   typedefDefinition_key_module_ ::
-                                                   Prelude.Maybe ModuleMembership}
-                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TypedefDefinition_key where
-  toJSON
-    (TypedefDefinition_key __field__declaration __field__isTransparent
-       __field__attributes __field__typeParams __field__module_)
-    = Aeson.object
-        ("declaration" .= __field__declaration :
-           "isTransparent" .= __field__isTransparent :
-             "attributes" .= __field__attributes :
-               "typeParams" .= __field__typeParams :
-                 Prelude.maybe Prelude.id ((:) . ("module_" .=)) __field__module_
-                   Prelude.mempty)
-
-instance Thrift.ThriftStruct TypedefDefinition_key where
-  buildStruct _proxy
-    (TypedefDefinition_key __field__declaration __field__isTransparent
-       __field__attributes __field__typeParams __field__module_)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "declaration" (Thrift.getStructType _proxy)
-           1
-           0
-           (Thrift.buildStruct _proxy __field__declaration)
-           :
-           Thrift.genFieldBool _proxy "isTransparent" 2 1
-             __field__isTransparent
-             :
-             Thrift.genField _proxy "attributes" (Thrift.getListType _proxy) 3 2
-               (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                  (Thrift.buildStruct _proxy)
-                  __field__attributes)
-               :
-               Thrift.genField _proxy "typeParams" (Thrift.getListType _proxy) 4 3
-                 (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                    (Thrift.buildStruct _proxy)
-                    __field__typeParams)
-                 :
-                 case __field__module_ of
-                   Prelude.Just _val -> Thrift.genField _proxy "module_"
-                                          (Thrift.getStructType _proxy)
-                                          5
-                                          4
-                                          (Thrift.buildStruct _proxy _val)
-                                          : []
-                   Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__declaration <- ST.newSTRef Default.def
-            __field__isTransparent <- ST.newSTRef Prelude.False
-            __field__attributes <- ST.newSTRef Default.def
-            __field__typeParams <- ST.newSTRef Default.def
-            __field__module_ <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__declaration
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getBoolType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseBoolF
-                                                                                      _proxy
-                                                                                      _bool)
-                                                                        ST.writeSTRef
-                                                                          __field__isTransparent
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__attributes
-                                                                          _val
-                                                                 4 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__typeParams
-                                                                          _val
-                                                                 5 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__module_
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__declaration <- ST.readSTRef
-                                                                      __field__declaration
-                                             !__val__isTransparent <- ST.readSTRef
-                                                                        __field__isTransparent
-                                             !__val__attributes <- ST.readSTRef __field__attributes
-                                             !__val__typeParams <- ST.readSTRef __field__typeParams
-                                             !__val__module_ <- ST.readSTRef __field__module_
-                                             Prelude.pure
-                                               (TypedefDefinition_key __val__declaration
-                                                  __val__isTransparent
-                                                  __val__attributes
-                                                  __val__typeParams
-                                                  __val__module_)
-              _idMap
-                = HashMap.fromList
-                    [("declaration", 1), ("isTransparent", 2), ("attributes", 3),
-                     ("typeParams", 4), ("module_", 5)]
-            _parse 0)
-
-instance DeepSeq.NFData TypedefDefinition_key where
-  rnf
-    (TypedefDefinition_key __field__declaration __field__isTransparent
-       __field__attributes __field__typeParams __field__module_)
-    = DeepSeq.rnf __field__declaration `Prelude.seq`
-        DeepSeq.rnf __field__isTransparent `Prelude.seq`
-          DeepSeq.rnf __field__attributes `Prelude.seq`
-            DeepSeq.rnf __field__typeParams `Prelude.seq`
-              DeepSeq.rnf __field__module_ `Prelude.seq` ()
-
-instance Default.Default TypedefDefinition_key where
-  def
-    = TypedefDefinition_key Default.def Prelude.False Default.def
-        Default.def
-        Prelude.Nothing
-
-instance Hashable.Hashable TypedefDefinition_key where
-  hashWithSalt __salt
-    (TypedefDefinition_key _declaration _isTransparent _attributes
-       _typeParams _module_)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt
-              (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _declaration)
-                 _isTransparent)
-              _attributes)
-           _typeParams)
-        _module_
-
-data ClassDefinition_key = ClassDefinition_key{classDefinition_key_declaration
-                                               :: ClassDeclaration,
-                                               classDefinition_key_isAbstract :: Prelude.Bool,
-                                               classDefinition_key_isFinal :: Prelude.Bool,
-                                               classDefinition_key_members :: [Declaration],
-                                               classDefinition_key_extends_ ::
-                                               Prelude.Maybe ClassDeclaration,
-                                               classDefinition_key_implements_ ::
-                                               [InterfaceDeclaration],
-                                               classDefinition_key_uses :: [TraitDeclaration],
-                                               classDefinition_key_attributes :: [UserAttribute],
-                                               classDefinition_key_typeParams :: [TypeParameter],
-                                               classDefinition_key_module_ ::
-                                               Prelude.Maybe ModuleMembership}
-                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ClassDefinition_key where
-  toJSON
-    (ClassDefinition_key __field__declaration __field__isAbstract
-       __field__isFinal __field__members __field__extends_
-       __field__implements_ __field__uses __field__attributes
-       __field__typeParams __field__module_)
-    = Aeson.object
-        ("declaration" .= __field__declaration :
-           "isAbstract" .= __field__isAbstract :
-             "isFinal" .= __field__isFinal :
-               "members" .= __field__members :
-                 Prelude.maybe Prelude.id ((:) . ("extends_" .=)) __field__extends_
-                   ("implements_" .= __field__implements_ :
-                      "uses" .= __field__uses :
-                        "attributes" .= __field__attributes :
-                          "typeParams" .= __field__typeParams :
-                            Prelude.maybe Prelude.id ((:) . ("module_" .=)) __field__module_
-                              Prelude.mempty))
-
-instance Thrift.ThriftStruct ClassDefinition_key where
-  buildStruct _proxy
-    (ClassDefinition_key __field__declaration __field__isAbstract
-       __field__isFinal __field__members __field__extends_
-       __field__implements_ __field__uses __field__attributes
-       __field__typeParams __field__module_)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "declaration" (Thrift.getStructType _proxy)
-           1
-           0
-           (Thrift.buildStruct _proxy __field__declaration)
-           :
-           Thrift.genFieldBool _proxy "isAbstract" 2 1 __field__isAbstract :
-             Thrift.genFieldBool _proxy "isFinal" 3 2 __field__isFinal :
-               Thrift.genField _proxy "members" (Thrift.getListType _proxy) 4 3
-                 (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                    (Thrift.buildStruct _proxy)
-                    __field__members)
-                 :
-                 let (__cereal__extends_, __id__extends_)
-                       = case __field__extends_ of
-                           Prelude.Just _val -> ((:)
-                                                   (Thrift.genField _proxy "extends_"
-                                                      (Thrift.getStructType _proxy)
-                                                      5
-                                                      4
-                                                      (Thrift.buildStruct _proxy _val)),
-                                                 5)
-                           Prelude.Nothing -> (Prelude.id, 4)
-                   in
-                   __cereal__extends_
-                     (Thrift.genField _proxy "implements_" (Thrift.getListType _proxy) 6
-                        __id__extends_
-                        (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                           (Thrift.buildStruct _proxy)
-                           __field__implements_)
-                        :
-                        Thrift.genField _proxy "uses" (Thrift.getListType _proxy) 7 6
-                          (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                             (Thrift.buildStruct _proxy)
-                             __field__uses)
-                          :
-                          Thrift.genField _proxy "attributes" (Thrift.getListType _proxy) 8 7
-                            (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                               (Thrift.buildStruct _proxy)
-                               __field__attributes)
-                            :
-                            Thrift.genField _proxy "typeParams" (Thrift.getListType _proxy) 9 8
-                              (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                                 (Thrift.buildStruct _proxy)
-                                 __field__typeParams)
-                              :
-                              case __field__module_ of
-                                Prelude.Just _val -> Thrift.genField _proxy "module_"
-                                                       (Thrift.getStructType _proxy)
-                                                       10
-                                                       9
-                                                       (Thrift.buildStruct _proxy _val)
-                                                       : []
-                                Prelude.Nothing -> []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__declaration <- ST.newSTRef Default.def
-            __field__isAbstract <- ST.newSTRef Prelude.False
-            __field__isFinal <- ST.newSTRef Prelude.False
-            __field__members <- ST.newSTRef Default.def
-            __field__extends_ <- ST.newSTRef Prelude.Nothing
-            __field__implements_ <- ST.newSTRef Default.def
-            __field__uses <- ST.newSTRef Default.def
-            __field__attributes <- ST.newSTRef Default.def
-            __field__typeParams <- ST.newSTRef Default.def
-            __field__module_ <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__declaration
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getBoolType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseBoolF
-                                                                                      _proxy
-                                                                                      _bool)
-                                                                        ST.writeSTRef
-                                                                          __field__isAbstract
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getBoolType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseBoolF
-                                                                                      _proxy
-                                                                                      _bool)
-                                                                        ST.writeSTRef
-                                                                          __field__isFinal
-                                                                          _val
-                                                                 4 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__members
-                                                                          _val
-                                                                 5 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__extends_
-                                                                          (Prelude.Just _val)
-                                                                 6 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__implements_
-                                                                          _val
-                                                                 7 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef __field__uses
-                                                                          _val
-                                                                 8 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__attributes
-                                                                          _val
-                                                                 9 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__typeParams
-                                                                          _val
-                                                                 10 | _type ==
-                                                                        Thrift.getStructType _proxy
-                                                                      ->
-                                                                      do !_val <- Trans.lift
-                                                                                    (Thrift.parseStruct
-                                                                                       _proxy)
-                                                                         ST.writeSTRef
-                                                                           __field__module_
-                                                                           (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__declaration <- ST.readSTRef
-                                                                      __field__declaration
-                                             !__val__isAbstract <- ST.readSTRef __field__isAbstract
-                                             !__val__isFinal <- ST.readSTRef __field__isFinal
-                                             !__val__members <- ST.readSTRef __field__members
-                                             !__val__extends_ <- ST.readSTRef __field__extends_
-                                             !__val__implements_ <- ST.readSTRef
-                                                                      __field__implements_
-                                             !__val__uses <- ST.readSTRef __field__uses
-                                             !__val__attributes <- ST.readSTRef __field__attributes
-                                             !__val__typeParams <- ST.readSTRef __field__typeParams
-                                             !__val__module_ <- ST.readSTRef __field__module_
-                                             Prelude.pure
-                                               (ClassDefinition_key __val__declaration
-                                                  __val__isAbstract
-                                                  __val__isFinal
-                                                  __val__members
-                                                  __val__extends_
-                                                  __val__implements_
-                                                  __val__uses
-                                                  __val__attributes
-                                                  __val__typeParams
-                                                  __val__module_)
-              _idMap
-                = HashMap.fromList
-                    [("declaration", 1), ("isAbstract", 2), ("isFinal", 3),
-                     ("members", 4), ("extends_", 5), ("implements_", 6), ("uses", 7),
-                     ("attributes", 8), ("typeParams", 9), ("module_", 10)]
-            _parse 0)
-
-instance DeepSeq.NFData ClassDefinition_key where
-  rnf
-    (ClassDefinition_key __field__declaration __field__isAbstract
-       __field__isFinal __field__members __field__extends_
-       __field__implements_ __field__uses __field__attributes
-       __field__typeParams __field__module_)
-    = DeepSeq.rnf __field__declaration `Prelude.seq`
-        DeepSeq.rnf __field__isAbstract `Prelude.seq`
-          DeepSeq.rnf __field__isFinal `Prelude.seq`
-            DeepSeq.rnf __field__members `Prelude.seq`
-              DeepSeq.rnf __field__extends_ `Prelude.seq`
-                DeepSeq.rnf __field__implements_ `Prelude.seq`
-                  DeepSeq.rnf __field__uses `Prelude.seq`
-                    DeepSeq.rnf __field__attributes `Prelude.seq`
-                      DeepSeq.rnf __field__typeParams `Prelude.seq`
-                        DeepSeq.rnf __field__module_ `Prelude.seq` ()
-
-instance Default.Default ClassDefinition_key where
-  def
-    = ClassDefinition_key Default.def Prelude.False Prelude.False
-        Default.def
-        Prelude.Nothing
-        Default.def
-        Default.def
-        Default.def
-        Default.def
-        Prelude.Nothing
-
-instance Hashable.Hashable ClassDefinition_key where
-  hashWithSalt __salt
-    (ClassDefinition_key _declaration _isAbstract _isFinal _members
-       _extends_ _implements_ _uses _attributes _typeParams _module_)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt
-              (Hashable.hashWithSalt
-                 (Hashable.hashWithSalt
-                    (Hashable.hashWithSalt
-                       (Hashable.hashWithSalt
-                          (Hashable.hashWithSalt
-                             (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _declaration)
-                                _isAbstract)
-                             _isFinal)
-                          _members)
-                       _extends_)
-                    _implements_)
-                 _uses)
-              _attributes)
-           _typeParams)
-        _module_
-
-newtype ClassDeclaration_key = ClassDeclaration_key{classDeclaration_key_name
-                                                    :: QName}
-                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ClassDeclaration_key where
-  toJSON (ClassDeclaration_key __field__name)
-    = Aeson.object ("name" .= __field__name : Prelude.mempty)
-
-instance Thrift.ThriftStruct ClassDeclaration_key where
-  buildStruct _proxy (ClassDeclaration_key __field__name)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__name)
-           : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             Prelude.pure (ClassDeclaration_key __val__name)
-              _idMap = HashMap.fromList [("name", 1)]
-            _parse 0)
-
-instance DeepSeq.NFData ClassDeclaration_key where
-  rnf (ClassDeclaration_key __field__name)
-    = DeepSeq.rnf __field__name `Prelude.seq` ()
-
-instance Default.Default ClassDeclaration_key where
-  def = ClassDeclaration_key Default.def
-
-instance Hashable.Hashable ClassDeclaration_key where
-  hashWithSalt __salt (ClassDeclaration_key _name)
-    = Hashable.hashWithSalt __salt _name
-
-data ClassConstDefinition_key = ClassConstDefinition_key{classConstDefinition_key_declaration
-                                                         :: ClassConstDeclaration,
-                                                         classConstDefinition_key_type ::
-                                                         Prelude.Maybe Type,
-                                                         classConstDefinition_key_value ::
-                                                         Prelude.Maybe Text.Text,
-                                                         classConstDefinition_key_typeInfo ::
-                                                         Prelude.Maybe TypeInfo}
-                                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ClassConstDefinition_key where
-  toJSON
-    (ClassConstDefinition_key __field__declaration __field__type
-       __field__value __field__typeInfo)
-    = Aeson.object
-        ("declaration" .= __field__declaration :
-           Prelude.maybe Prelude.id ((:) . ("type" .=)) __field__type
-             (Prelude.maybe Prelude.id ((:) . ("value" .=)) __field__value
-                (Prelude.maybe Prelude.id ((:) . ("typeInfo" .=)) __field__typeInfo
-                   Prelude.mempty)))
-
-instance Thrift.ThriftStruct ClassConstDefinition_key where
-  buildStruct _proxy
-    (ClassConstDefinition_key __field__declaration __field__type
-       __field__value __field__typeInfo)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "declaration" (Thrift.getStructType _proxy)
-           1
-           0
-           (Thrift.buildStruct _proxy __field__declaration)
-           :
-           let (__cereal__type, __id__type)
-                 = case __field__type of
-                     Prelude.Just _val -> ((:)
-                                             (Thrift.genField _proxy "type"
-                                                (Thrift.getStructType _proxy)
-                                                2
-                                                1
-                                                (Thrift.buildStruct _proxy _val)),
-                                           2)
-                     Prelude.Nothing -> (Prelude.id, 1)
-             in
-             __cereal__type
-               (let (__cereal__value, __id__value)
-                      = case __field__value of
-                          Prelude.Just _val -> ((:)
-                                                  (Thrift.genField _proxy "value"
-                                                     (Thrift.getStringType _proxy)
-                                                     3
-                                                     __id__type
-                                                     (Thrift.genText _proxy _val)),
-                                                3)
-                          Prelude.Nothing -> (Prelude.id, __id__type)
-                  in
-                  __cereal__value
-                    (case __field__typeInfo of
-                       Prelude.Just _val -> Thrift.genField _proxy "typeInfo"
-                                              (Thrift.getStructType _proxy)
-                                              4
-                                              __id__value
-                                              (Thrift.buildStruct _proxy _val)
-                                              : []
-                       Prelude.Nothing -> [])))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__declaration <- ST.newSTRef Default.def
-            __field__type <- ST.newSTRef Prelude.Nothing
-            __field__value <- ST.newSTRef Prelude.Nothing
-            __field__typeInfo <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__declaration
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__type
-                                                                          (Prelude.Just _val)
-                                                                 3 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__value
-                                                                          (Prelude.Just _val)
-                                                                 4 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__typeInfo
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__declaration <- ST.readSTRef
-                                                                      __field__declaration
-                                             !__val__type <- ST.readSTRef __field__type
-                                             !__val__value <- ST.readSTRef __field__value
-                                             !__val__typeInfo <- ST.readSTRef __field__typeInfo
-                                             Prelude.pure
-                                               (ClassConstDefinition_key __val__declaration
-                                                  __val__type
-                                                  __val__value
-                                                  __val__typeInfo)
-              _idMap
-                = HashMap.fromList
-                    [("declaration", 1), ("type", 2), ("value", 3), ("typeInfo", 4)]
-            _parse 0)
-
-instance DeepSeq.NFData ClassConstDefinition_key where
-  rnf
-    (ClassConstDefinition_key __field__declaration __field__type
-       __field__value __field__typeInfo)
-    = DeepSeq.rnf __field__declaration `Prelude.seq`
-        DeepSeq.rnf __field__type `Prelude.seq`
-          DeepSeq.rnf __field__value `Prelude.seq`
-            DeepSeq.rnf __field__typeInfo `Prelude.seq` ()
-
-instance Default.Default ClassConstDefinition_key where
-  def
-    = ClassConstDefinition_key Default.def Prelude.Nothing
-        Prelude.Nothing
-        Prelude.Nothing
-
-instance Hashable.Hashable ClassConstDefinition_key where
-  hashWithSalt __salt
-    (ClassConstDefinition_key _declaration _type _value _typeInfo)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _declaration)
-              _type)
-           _value)
-        _typeInfo
-
-data ClassConstDeclaration_key = ClassConstDeclaration_key{classConstDeclaration_key_name
-                                                           :: Name,
-                                                           classConstDeclaration_key_container ::
-                                                           ContainerDeclaration}
-                                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ClassConstDeclaration_key where
-  toJSON (ClassConstDeclaration_key __field__name __field__container)
-    = Aeson.object
-        ("name" .= __field__name :
-           "container" .= __field__container : Prelude.mempty)
-
-instance Thrift.ThriftStruct ClassConstDeclaration_key where
-  buildStruct _proxy
-    (ClassConstDeclaration_key __field__name __field__container)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__name)
-           :
-           Thrift.genField _proxy "container" (Thrift.getStructType _proxy) 2
-             1
-             (Thrift.buildStruct _proxy __field__container)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef Default.def
-            __field__container <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__container
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__container <- ST.readSTRef __field__container
-                                             Prelude.pure
-                                               (ClassConstDeclaration_key __val__name
-                                                  __val__container)
-              _idMap = HashMap.fromList [("name", 1), ("container", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData ClassConstDeclaration_key where
-  rnf (ClassConstDeclaration_key __field__name __field__container)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__container `Prelude.seq` ()
-
-instance Default.Default ClassConstDeclaration_key where
-  def = ClassConstDeclaration_key Default.def Default.def
-
-instance Hashable.Hashable ClassConstDeclaration_key where
-  hashWithSalt __salt (ClassConstDeclaration_key _name _container)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-        _container
-
-data AttributeToDefinition_key = AttributeToDefinition_key{attributeToDefinition_key_attribute
-                                                           :: UserAttribute,
-                                                           attributeToDefinition_key_definition ::
-                                                           Definition}
-                                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON AttributeToDefinition_key where
-  toJSON
-    (AttributeToDefinition_key __field__attribute __field__definition)
-    = Aeson.object
-        ("attribute" .= __field__attribute :
-           "definition" .= __field__definition : Prelude.mempty)
-
-instance Thrift.ThriftStruct AttributeToDefinition_key where
-  buildStruct _proxy
-    (AttributeToDefinition_key __field__attribute __field__definition)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "attribute" (Thrift.getStructType _proxy) 1
-           0
-           (Thrift.buildStruct _proxy __field__attribute)
-           :
-           Thrift.genField _proxy "definition" (Thrift.getStructType _proxy) 2
-             1
-             (Thrift.buildStruct _proxy __field__definition)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__attribute <- ST.newSTRef Default.def
-            __field__definition <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__attribute
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__definition
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__attribute <- ST.readSTRef
-                                                                    __field__attribute
-                                             !__val__definition <- ST.readSTRef __field__definition
-                                             Prelude.pure
-                                               (AttributeToDefinition_key __val__attribute
-                                                  __val__definition)
-              _idMap = HashMap.fromList [("attribute", 1), ("definition", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData AttributeToDefinition_key where
-  rnf
-    (AttributeToDefinition_key __field__attribute __field__definition)
-    = DeepSeq.rnf __field__attribute `Prelude.seq`
-        DeepSeq.rnf __field__definition `Prelude.seq` ()
-
-instance Default.Default AttributeToDefinition_key where
-  def = AttributeToDefinition_key Default.def Default.def
-
-instance Hashable.Hashable AttributeToDefinition_key where
-  hashWithSalt __salt
-    (AttributeToDefinition_key _attribute _definition)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _attribute)
-        _definition
-
-data AttributeToDeclaration_key = AttributeToDeclaration_key{attributeToDeclaration_key_attribute
-                                                             :: UserAttribute,
-                                                             attributeToDeclaration_key_declaration
-                                                             :: Declaration,
-                                                             attributeToDeclaration_key_file ::
-                                                             Glean.Schema.Src.File}
-                                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON AttributeToDeclaration_key where
-  toJSON
-    (AttributeToDeclaration_key __field__attribute __field__declaration
-       __field__file)
-    = Aeson.object
-        ("attribute" .= __field__attribute :
-           "declaration" .= __field__declaration :
-             "file" .= __field__file : Prelude.mempty)
-
-instance Thrift.ThriftStruct AttributeToDeclaration_key where
-  buildStruct _proxy
-    (AttributeToDeclaration_key __field__attribute __field__declaration
-       __field__file)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "attribute" (Thrift.getStructType _proxy) 1
-           0
-           (Thrift.buildStruct _proxy __field__attribute)
-           :
-           Thrift.genField _proxy "declaration" (Thrift.getStructType _proxy)
-             2
-             1
-             (Thrift.buildStruct _proxy __field__declaration)
-             :
-             Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 3 2
-               (Thrift.buildStruct _proxy __field__file)
-               : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__attribute <- ST.newSTRef Default.def
-            __field__declaration <- ST.newSTRef Default.def
-            __field__file <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__attribute
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__declaration
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__file
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__attribute <- ST.readSTRef
-                                                                    __field__attribute
-                                             !__val__declaration <- ST.readSTRef
-                                                                      __field__declaration
-                                             !__val__file <- ST.readSTRef __field__file
-                                             Prelude.pure
-                                               (AttributeToDeclaration_key __val__attribute
-                                                  __val__declaration
-                                                  __val__file)
-              _idMap
-                = HashMap.fromList
-                    [("attribute", 1), ("declaration", 2), ("file", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData AttributeToDeclaration_key where
-  rnf
-    (AttributeToDeclaration_key __field__attribute __field__declaration
-       __field__file)
-    = DeepSeq.rnf __field__attribute `Prelude.seq`
-        DeepSeq.rnf __field__declaration `Prelude.seq`
-          DeepSeq.rnf __field__file `Prelude.seq` ()
-
-instance Default.Default AttributeToDeclaration_key where
-  def
-    = AttributeToDeclaration_key Default.def Default.def Default.def
-
-instance Hashable.Hashable AttributeToDeclaration_key where
-  hashWithSalt __salt
-    (AttributeToDeclaration_key _attribute _declaration _file)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _attribute)
-           _declaration)
-        _file
-
-data AttributeHasParameter_key = AttributeHasParameter_key{attributeHasParameter_key_name
-                                                           :: Name,
-                                                           attributeHasParameter_key_parameter ::
-                                                           Text.Text,
-                                                           attributeHasParameter_key_attribute ::
-                                                           UserAttribute}
-                                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON AttributeHasParameter_key where
-  toJSON
-    (AttributeHasParameter_key __field__name __field__parameter
-       __field__attribute)
-    = Aeson.object
-        ("name" .= __field__name :
-           "parameter" .= __field__parameter :
-             "attribute" .= __field__attribute : Prelude.mempty)
-
-instance Thrift.ThriftStruct AttributeHasParameter_key where
-  buildStruct _proxy
-    (AttributeHasParameter_key __field__name __field__parameter
-       __field__attribute)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__name)
-           :
-           Thrift.genField _proxy "parameter" (Thrift.getStringType _proxy) 2
-             1
-             (Thrift.genText _proxy __field__parameter)
-             :
-             Thrift.genField _proxy "attribute" (Thrift.getStructType _proxy) 3
-               2
-               (Thrift.buildStruct _proxy __field__attribute)
-               : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef Default.def
-            __field__parameter <- ST.newSTRef ""
-            __field__attribute <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__parameter
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__attribute
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__parameter <- ST.readSTRef __field__parameter
-                                             !__val__attribute <- ST.readSTRef __field__attribute
-                                             Prelude.pure
-                                               (AttributeHasParameter_key __val__name
-                                                  __val__parameter
-                                                  __val__attribute)
-              _idMap
-                = HashMap.fromList
-                    [("name", 1), ("parameter", 2), ("attribute", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData AttributeHasParameter_key where
-  rnf
-    (AttributeHasParameter_key __field__name __field__parameter
-       __field__attribute)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__parameter `Prelude.seq`
-          DeepSeq.rnf __field__attribute `Prelude.seq` ()
-
-instance Default.Default AttributeHasParameter_key where
-  def = AttributeHasParameter_key Default.def "" Default.def
-
-instance Hashable.Hashable AttributeHasParameter_key where
-  hashWithSalt __salt
-    (AttributeHasParameter_key _name _parameter _attribute)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-           _parameter)
-        _attribute
-
-data Argument = Argument_lit StringLiteral
-              | Argument_xref XRefTarget
-              | Argument_EMPTY
-                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Argument where
-  toJSON (Argument_lit __lit) = Aeson.object ["lit" .= __lit]
-  toJSON (Argument_xref __xref) = Aeson.object ["xref" .= __xref]
-  toJSON Argument_EMPTY = Aeson.object []
-
-instance Thrift.ThriftStruct Argument where
-  buildStruct _proxy (Argument_lit __lit)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "lit" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __lit)]
-  buildStruct _proxy (Argument_xref __xref)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "xref" (Thrift.getStructType _proxy) 2 0
-           (Thrift.buildStruct _proxy __xref)]
-  buildStruct _proxy Argument_EMPTY = Thrift.genStruct _proxy []
-  parseStruct _proxy
-    = do _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap
-         case _fieldBegin of
-           Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                     1 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return (Argument_lit _val)
-                                                     2 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return (Argument_xref _val)
-                                                     _ -> do Thrift.parseSkip _proxy _type
-                                                               Prelude.Nothing
-                                                             Thrift.parseStop _proxy
-                                                             Prelude.return Argument_EMPTY
-           Thrift.FieldEnd -> Prelude.return Argument_EMPTY
-    where
-      _idMap = HashMap.fromList [("lit", 1), ("xref", 2)]
-
-instance DeepSeq.NFData Argument where
-  rnf (Argument_lit __lit) = DeepSeq.rnf __lit
-  rnf (Argument_xref __xref) = DeepSeq.rnf __xref
-  rnf Argument_EMPTY = ()
-
-instance Default.Default Argument where
-  def = Argument_EMPTY
-
-instance Hashable.Hashable Argument where
-  hashWithSalt __salt (Argument_lit _lit)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 1 _lit)
-  hashWithSalt __salt (Argument_xref _xref)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 2 _xref)
-  hashWithSalt __salt Argument_EMPTY
-    = Hashable.hashWithSalt __salt (0 :: Prelude.Int)
-
-data CallArgument = CallArgument{callArgument_span ::
-                                 Glean.Schema.Src.RelByteSpan,
-                                 callArgument_argument :: Prelude.Maybe Argument}
-                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON CallArgument where
-  toJSON (CallArgument __field__span __field__argument)
-    = Aeson.object
-        ("span" .= __field__span :
-           Prelude.maybe Prelude.id ((:) . ("argument" .=)) __field__argument
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct CallArgument where
-  buildStruct _proxy (CallArgument __field__span __field__argument)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "span" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__span)
-           :
-           case __field__argument of
-             Prelude.Just _val -> Thrift.genField _proxy "argument"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__span <- ST.newSTRef Default.def
-            __field__argument <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__span
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__argument
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__span <- ST.readSTRef __field__span
-                                             !__val__argument <- ST.readSTRef __field__argument
-                                             Prelude.pure (CallArgument __val__span __val__argument)
-              _idMap = HashMap.fromList [("span", 1), ("argument", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData CallArgument where
-  rnf (CallArgument __field__span __field__argument)
-    = DeepSeq.rnf __field__span `Prelude.seq`
-        DeepSeq.rnf __field__argument `Prelude.seq` ()
-
-instance Default.Default CallArgument where
-  def = CallArgument Default.def Prelude.Nothing
-
-instance Hashable.Hashable CallArgument where
-  hashWithSalt __salt (CallArgument _span _argument)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _span)
-        _argument
-
-data FileCall_key = FileCall_key{fileCall_key_file ::
-                                 Glean.Schema.Src.File,
-                                 fileCall_key_callee_span :: Glean.Schema.Src.ByteSpan,
-                                 fileCall_key_call_args :: [CallArgument],
-                                 fileCall_key_callee_xref :: Prelude.Maybe XRefTarget,
-                                 fileCall_key_dispatch_arg :: Prelude.Maybe CallArgument,
-                                 fileCall_key_receiver_type :: Prelude.Maybe Declaration,
-                                 fileCall_key_callee_xrefs :: [XRefTarget]}
-                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON FileCall_key where
-  toJSON
-    (FileCall_key __field__file __field__callee_span __field__call_args
-       __field__callee_xref __field__dispatch_arg __field__receiver_type
-       __field__callee_xrefs)
-    = Aeson.object
-        ("file" .= __field__file :
-           "callee_span" .= __field__callee_span :
-             "call_args" .= __field__call_args :
-               Prelude.maybe Prelude.id ((:) . ("callee_xref" .=))
-                 __field__callee_xref
-                 (Prelude.maybe Prelude.id ((:) . ("dispatch_arg" .=))
-                    __field__dispatch_arg
-                    (Prelude.maybe Prelude.id ((:) . ("receiver_type" .=))
-                       __field__receiver_type
-                       ("callee_xrefs" .= __field__callee_xrefs : Prelude.mempty))))
-
-instance Thrift.ThriftStruct FileCall_key where
-  buildStruct _proxy
-    (FileCall_key __field__file __field__callee_span __field__call_args
-       __field__callee_xref __field__dispatch_arg __field__receiver_type
-       __field__callee_xrefs)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__file)
-           :
-           Thrift.genField _proxy "callee_span" (Thrift.getStructType _proxy)
-             2
-             1
-             (Thrift.buildStruct _proxy __field__callee_span)
-             :
-             Thrift.genField _proxy "call_args" (Thrift.getListType _proxy) 3 2
-               (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                  (Thrift.buildStruct _proxy)
-                  __field__call_args)
-               :
-               let (__cereal__callee_xref, __id__callee_xref)
-                     = case __field__callee_xref of
-                         Prelude.Just _val -> ((:)
-                                                 (Thrift.genField _proxy "callee_xref"
-                                                    (Thrift.getStructType _proxy)
-                                                    4
-                                                    3
-                                                    (Thrift.buildStruct _proxy _val)),
-                                               4)
-                         Prelude.Nothing -> (Prelude.id, 3)
-                 in
-                 __cereal__callee_xref
-                   (let (__cereal__dispatch_arg, __id__dispatch_arg)
-                          = case __field__dispatch_arg of
-                              Prelude.Just _val -> ((:)
-                                                      (Thrift.genField _proxy "dispatch_arg"
-                                                         (Thrift.getStructType _proxy)
-                                                         5
-                                                         __id__callee_xref
-                                                         (Thrift.buildStruct _proxy _val)),
-                                                    5)
-                              Prelude.Nothing -> (Prelude.id, __id__callee_xref)
-                      in
-                      __cereal__dispatch_arg
-                        (let (__cereal__receiver_type, __id__receiver_type)
-                               = case __field__receiver_type of
-                                   Prelude.Just _val -> ((:)
-                                                           (Thrift.genField _proxy "receiver_type"
-                                                              (Thrift.getStructType _proxy)
-                                                              6
-                                                              __id__dispatch_arg
-                                                              (Thrift.buildStruct _proxy _val)),
-                                                         6)
-                                   Prelude.Nothing -> (Prelude.id, __id__dispatch_arg)
-                           in
-                           __cereal__receiver_type
-                             (Thrift.genField _proxy "callee_xrefs" (Thrift.getListType _proxy)
-                                7
-                                __id__receiver_type
-                                (Thrift.genList _proxy (Thrift.getStructType _proxy)
-                                   (Thrift.buildStruct _proxy)
-                                   __field__callee_xrefs)
-                                : []))))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__file <- ST.newSTRef Default.def
-            __field__callee_span <- ST.newSTRef Default.def
-            __field__call_args <- ST.newSTRef Default.def
-            __field__callee_xref <- ST.newSTRef Prelude.Nothing
-            __field__dispatch_arg <- ST.newSTRef Prelude.Nothing
-            __field__receiver_type <- ST.newSTRef Prelude.Nothing
-            __field__callee_xrefs <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__file
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__callee_span
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__call_args
-                                                                          _val
-                                                                 4 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__callee_xref
-                                                                          (Prelude.Just _val)
-                                                                 5 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__dispatch_arg
-                                                                          (Prelude.Just _val)
-                                                                 6 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__receiver_type
-                                                                          (Prelude.Just _val)
-                                                                 7 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseStruct
-                                                                                           _proxy))
-                                                                        ST.writeSTRef
-                                                                          __field__callee_xrefs
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__file <- ST.readSTRef __field__file
-                                             !__val__callee_span <- ST.readSTRef
-                                                                      __field__callee_span
-                                             !__val__call_args <- ST.readSTRef __field__call_args
-                                             !__val__callee_xref <- ST.readSTRef
-                                                                      __field__callee_xref
-                                             !__val__dispatch_arg <- ST.readSTRef
-                                                                       __field__dispatch_arg
-                                             !__val__receiver_type <- ST.readSTRef
-                                                                        __field__receiver_type
-                                             !__val__callee_xrefs <- ST.readSTRef
-                                                                       __field__callee_xrefs
-                                             Prelude.pure
-                                               (FileCall_key __val__file __val__callee_span
-                                                  __val__call_args
-                                                  __val__callee_xref
-                                                  __val__dispatch_arg
-                                                  __val__receiver_type
-                                                  __val__callee_xrefs)
-              _idMap
-                = HashMap.fromList
-                    [("file", 1), ("callee_span", 2), ("call_args", 3),
-                     ("callee_xref", 4), ("dispatch_arg", 5), ("receiver_type", 6),
-                     ("callee_xrefs", 7)]
-            _parse 0)
-
-instance DeepSeq.NFData FileCall_key where
-  rnf
-    (FileCall_key __field__file __field__callee_span __field__call_args
-       __field__callee_xref __field__dispatch_arg __field__receiver_type
-       __field__callee_xrefs)
-    = DeepSeq.rnf __field__file `Prelude.seq`
-        DeepSeq.rnf __field__callee_span `Prelude.seq`
-          DeepSeq.rnf __field__call_args `Prelude.seq`
-            DeepSeq.rnf __field__callee_xref `Prelude.seq`
-              DeepSeq.rnf __field__dispatch_arg `Prelude.seq`
-                DeepSeq.rnf __field__receiver_type `Prelude.seq`
-                  DeepSeq.rnf __field__callee_xrefs `Prelude.seq` ()
-
-instance Default.Default FileCall_key where
-  def
-    = FileCall_key Default.def Default.def Default.def Prelude.Nothing
-        Prelude.Nothing
-        Prelude.Nothing
-        Default.def
-
-instance Hashable.Hashable FileCall_key where
-  hashWithSalt __salt
-    (FileCall_key _file _callee_span _call_args _callee_xref
-       _dispatch_arg _receiver_type _callee_xrefs)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt
-              (Hashable.hashWithSalt
-                 (Hashable.hashWithSalt
-                    (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _file)
-                       _callee_span)
-                    _call_args)
-                 _callee_xref)
-              _dispatch_arg)
-           _receiver_type)
-        _callee_xrefs
-{-# LINE 19 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.TargetUsesAbs_key where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.TargetUsesAbs_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.TargetUsesAbs_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.TargetUsesAbs_key" (Prelude.Just 0))
-{-# LINE 30 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.TargetUsesAbs_key =
-     'Angle.TField "target" (Glean.Schema.Hack.Types.XRefTarget)
-       ('Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
-          ('Angle.TField "uses" ([Glean.Schema.Src.Types.ByteSpan])
-             ('Angle.TNoFields)))
-{-# LINE 32 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.TargetUsesAbs
-         where
-  type KeyType Glean.Schema.Hack.Types.TargetUsesAbs =
-       Glean.Schema.Hack.Types.TargetUsesAbs_key
-  getName _proxy = Glean.PredicateRef "hack.TargetUsesAbs" 6
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Hack.Types.targetUsesAbs_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.TargetUsesAbs x k
-  getFactKey = Glean.Schema.Hack.Types.targetUsesAbs_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 41 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.TargetUsesAbs where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 47 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.ClassConstDeclaration_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.ClassConstDeclaration_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.ClassConstDeclaration_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.ClassConstDeclaration_key" (Prelude.Just 0))
-{-# LINE 56 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.Hack.Types.ClassConstDeclaration_key
-     =
-     'Angle.TField "name" (Glean.KeyType Glean.Schema.Hack.Types.Name)
-       ('Angle.TField "container"
-          (Glean.Schema.Hack.Types.ContainerDeclaration)
-          ('Angle.TNoFields))
-{-# LINE 58 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Hack.Types.ClassConstDeclaration
-         where
-  type KeyType Glean.Schema.Hack.Types.ClassConstDeclaration =
-       Glean.Schema.Hack.Types.ClassConstDeclaration_key
-  getName _proxy = Glean.PredicateRef "hack.ClassConstDeclaration" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.classConstDeclaration_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.ClassConstDeclaration x k
-  getFactKey = Glean.Schema.Hack.Types.classConstDeclaration_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 67 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.ClassConstDeclaration
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 73 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.NamespaceQName_key
-         where
-  buildRtsValue b (Glean.Schema.Hack.Types.NamespaceQName_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.NamespaceQName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.NamespaceQName_key" (Prelude.Just 0))
-{-# LINE 82 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.NamespaceQName_key =
-     'Angle.TField "name" (Glean.KeyType Glean.Schema.Hack.Types.Name)
-       ('Angle.TField "parent"
-          (Prelude.Maybe Glean.Schema.Hack.Types.NamespaceQName)
-          ('Angle.TNoFields))
-{-# LINE 84 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.NamespaceQName
-         where
-  type KeyType Glean.Schema.Hack.Types.NamespaceQName =
-       Glean.Schema.Hack.Types.NamespaceQName_key
-  getName _proxy = Glean.PredicateRef "hack.NamespaceQName" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.namespaceQName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.NamespaceQName x k
-  getFactKey = Glean.Schema.Hack.Types.namespaceQName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 93 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.NamespaceQName where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 99 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.TypedefDefinition_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.TypedefDefinition_key x1 x2 x3 x4 x5)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-         Glean.buildRtsValue b x5
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.TypedefDefinition_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.TypedefDefinition_key" (Prelude.Just 0))
-{-# LINE 114 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.TypedefDefinition_key =
-     'Angle.TField "declaration"
-       (Glean.KeyType Glean.Schema.Hack.Types.TypedefDeclaration)
-       ('Angle.TField "isTransparent" (Prelude.Bool)
-          ('Angle.TField "attributes"
-             ([Glean.Schema.Hack.Types.UserAttribute])
-             ('Angle.TField "typeParams"
-                ([Glean.Schema.Hack.Types.TypeParameter])
-                ('Angle.TField "module_"
-                   (Prelude.Maybe Glean.Schema.Hack.Types.ModuleMembership)
-                   ('Angle.TNoFields)))))
-{-# LINE 116 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.TypedefDefinition
-         where
-  type KeyType Glean.Schema.Hack.Types.TypedefDefinition =
-       Glean.Schema.Hack.Types.TypedefDefinition_key
-  getName _proxy = Glean.PredicateRef "hack.TypedefDefinition" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.typedefDefinition_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.TypedefDefinition x k
-  getFactKey = Glean.Schema.Hack.Types.typedefDefinition_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 125 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.TypedefDefinition where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 131 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.SearchClassConstByName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.SearchClassConstByName_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.SearchClassConstByName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.SearchClassConstByName_key"
-           (Prelude.Just 0))
-{-# LINE 142 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.Hack.Types.SearchClassConstByName_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "parent"
-          (Glean.KeyType Glean.Schema.Hack.Types.QName)
-          ('Angle.TField "decl" (Glean.Schema.Hack.Types.Declaration)
-             ('Angle.TNoFields)))
-{-# LINE 144 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Hack.Types.SearchClassConstByName
-         where
-  type KeyType Glean.Schema.Hack.Types.SearchClassConstByName =
-       Glean.Schema.Hack.Types.SearchClassConstByName_key
-  getName _proxy = Glean.PredicateRef "hack.SearchClassConstByName" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.searchClassConstByName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.SearchClassConstByName x k
-  getFactKey = Glean.Schema.Hack.Types.searchClassConstByName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 153 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.SearchClassConstByName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 159 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.InterfaceDefinition_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.InterfaceDefinition_key x1 x2 x3 x4 x5 x6
-       x7)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-         Glean.buildRtsValue b x5
-         Glean.buildRtsValue b x6
-         Glean.buildRtsValue b x7
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.InterfaceDefinition_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.InterfaceDefinition_key" (Prelude.Just 0))
-{-# LINE 178 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.InterfaceDefinition_key
-     =
-     'Angle.TField "declaration"
-       (Glean.KeyType Glean.Schema.Hack.Types.InterfaceDeclaration)
-       ('Angle.TField "members" ([Glean.Schema.Hack.Types.Declaration])
-          ('Angle.TField "extends_"
-             ([Glean.Schema.Hack.Types.InterfaceDeclaration])
-             ('Angle.TField "attributes"
-                ([Glean.Schema.Hack.Types.UserAttribute])
-                ('Angle.TField "typeParams"
-                   ([Glean.Schema.Hack.Types.TypeParameter])
-                   ('Angle.TField "requireExtends"
-                      ([Glean.Schema.Hack.Types.ClassDeclaration])
-                      ('Angle.TField "module_"
-                         (Prelude.Maybe Glean.Schema.Hack.Types.ModuleMembership)
-                         ('Angle.TNoFields)))))))
-{-# LINE 180 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Hack.Types.InterfaceDefinition
-         where
-  type KeyType Glean.Schema.Hack.Types.InterfaceDefinition =
-       Glean.Schema.Hack.Types.InterfaceDefinition_key
-  getName _proxy = Glean.PredicateRef "hack.InterfaceDefinition" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.interfaceDefinition_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.InterfaceDefinition x k
-  getFactKey = Glean.Schema.Hack.Types.interfaceDefinition_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 189 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.InterfaceDefinition
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 195 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.SearchGlobalConstByLowerCaseName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.SearchGlobalConstByLowerCaseName_key x1
-       x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.SearchGlobalConstByLowerCaseName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.SearchGlobalConstByLowerCaseName_key"
-           (Prelude.Just 0))
-{-# LINE 204 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.Hack.Types.SearchGlobalConstByLowerCaseName_key
-     =
-     'Angle.TField "name_lowercase" (Data.Text.Text)
-       ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields))
-{-# LINE 206 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Hack.Types.SearchGlobalConstByLowerCaseName
-         where
-  type KeyType
-         Glean.Schema.Hack.Types.SearchGlobalConstByLowerCaseName
-       = Glean.Schema.Hack.Types.SearchGlobalConstByLowerCaseName_key
-  getName _proxy
-    = Glean.PredicateRef "hack.SearchGlobalConstByLowerCaseName" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.Hack.Types.searchGlobalConstByLowerCaseName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.SearchGlobalConstByLowerCaseName x k
-  getFactKey
-    = Glean.Schema.Hack.Types.searchGlobalConstByLowerCaseName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 216 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.SearchGlobalConstByLowerCaseName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 222 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.FunctionDeclaration_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.FunctionDeclaration_key x1)
-    = do Glean.buildRtsValue b x1
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.FunctionDeclaration_key <$>
-        Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.FunctionDeclaration_key" (Prelude.Just 0))
-{-# LINE 229 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.FunctionDeclaration_key
-     =
-     'Angle.TField "name" (Glean.KeyType Glean.Schema.Hack.Types.QName)
-       ('Angle.TNoFields)
-{-# LINE 231 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Hack.Types.FunctionDeclaration
-         where
-  type KeyType Glean.Schema.Hack.Types.FunctionDeclaration =
-       Glean.Schema.Hack.Types.FunctionDeclaration_key
-  getName _proxy = Glean.PredicateRef "hack.FunctionDeclaration" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.functionDeclaration_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.FunctionDeclaration x k
-  getFactKey = Glean.Schema.Hack.Types.functionDeclaration_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 240 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.FunctionDeclaration
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 246 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.SearchTraitByLowerCaseName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.SearchTraitByLowerCaseName_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.SearchTraitByLowerCaseName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.SearchTraitByLowerCaseName_key"
-           (Prelude.Just 0))
-{-# LINE 255 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.Hack.Types.SearchTraitByLowerCaseName_key
-     =
-     'Angle.TField "name_lowercase" (Data.Text.Text)
-       ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields))
-{-# LINE 257 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Hack.Types.SearchTraitByLowerCaseName
-         where
-  type KeyType Glean.Schema.Hack.Types.SearchTraitByLowerCaseName =
-       Glean.Schema.Hack.Types.SearchTraitByLowerCaseName_key
-  getName _proxy
-    = Glean.PredicateRef "hack.SearchTraitByLowerCaseName" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.searchTraitByLowerCaseName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.SearchTraitByLowerCaseName x k
-  getFactKey = Glean.Schema.Hack.Types.searchTraitByLowerCaseName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 266 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.SearchTraitByLowerCaseName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 272 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.EnumDefinition_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.EnumDefinition_key x1 x2 x3 x4 x5 x6 x7 x8
-       x9 x10)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-         Glean.buildRtsValue b x5
-         Glean.buildRtsValue b x6
-         Glean.buildRtsValue b x7
-         Glean.buildRtsValue b x8
-         Glean.buildRtsValue b x9
-         Glean.buildRtsValue b x10
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.EnumDefinition_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.EnumDefinition_key" (Prelude.Just 0))
-{-# LINE 297 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.EnumDefinition_key =
-     'Angle.TField "declaration"
-       (Glean.KeyType Glean.Schema.Hack.Types.EnumDeclaration)
-       ('Angle.TField "enumBase"
-          (Glean.KeyType Glean.Schema.Hack.Types.Type)
-          ('Angle.TField "enumBaseTypeInfo"
-             (Prelude.Maybe Glean.Schema.Hack.Types.TypeInfo)
-             ('Angle.TField "enumConstraint"
-                (Prelude.Maybe Glean.Schema.Hack.Types.Type)
-                ('Angle.TField "enumConstraintTypeInfo"
-                   (Prelude.Maybe Glean.Schema.Hack.Types.TypeInfo)
-                   ('Angle.TField "enumerators" ([Glean.Schema.Hack.Types.Enumerator])
-                      ('Angle.TField "attributes"
-                         ([Glean.Schema.Hack.Types.UserAttribute])
-                         ('Angle.TField "includes"
-                            ([Glean.Schema.Hack.Types.EnumDeclaration])
-                            ('Angle.TField "isEnumClass" (Prelude.Bool)
-                               ('Angle.TField "module_"
-                                  (Prelude.Maybe Glean.Schema.Hack.Types.ModuleMembership)
-                                  ('Angle.TNoFields))))))))))
-{-# LINE 299 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.EnumDefinition
-         where
-  type KeyType Glean.Schema.Hack.Types.EnumDefinition =
-       Glean.Schema.Hack.Types.EnumDefinition_key
-  getName _proxy = Glean.PredicateRef "hack.EnumDefinition" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.enumDefinition_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.EnumDefinition x k
-  getFactKey = Glean.Schema.Hack.Types.enumDefinition_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 308 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.EnumDefinition where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 314 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.SearchEnumeratorByLowerCaseName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.SearchEnumeratorByLowerCaseName_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.SearchEnumeratorByLowerCaseName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.SearchEnumeratorByLowerCaseName_key"
-           (Prelude.Just 0))
-{-# LINE 323 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.Hack.Types.SearchEnumeratorByLowerCaseName_key
-     =
-     'Angle.TField "name_lowercase" (Data.Text.Text)
-       ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields))
-{-# LINE 325 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Hack.Types.SearchEnumeratorByLowerCaseName
-         where
-  type KeyType
-         Glean.Schema.Hack.Types.SearchEnumeratorByLowerCaseName
-       = Glean.Schema.Hack.Types.SearchEnumeratorByLowerCaseName_key
-  getName _proxy
-    = Glean.PredicateRef "hack.SearchEnumeratorByLowerCaseName" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.Hack.Types.searchEnumeratorByLowerCaseName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.SearchEnumeratorByLowerCaseName x k
-  getFactKey
-    = Glean.Schema.Hack.Types.searchEnumeratorByLowerCaseName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 334 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.SearchEnumeratorByLowerCaseName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 340 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.SearchMethodByName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.SearchMethodByName_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.SearchMethodByName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.SearchMethodByName_key" (Prelude.Just 0))
-{-# LINE 351 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.SearchMethodByName_key =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "parent"
-          (Glean.KeyType Glean.Schema.Hack.Types.QName)
-          ('Angle.TField "decl" (Glean.Schema.Hack.Types.Declaration)
-             ('Angle.TNoFields)))
-{-# LINE 353 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.SearchMethodByName
-         where
-  type KeyType Glean.Schema.Hack.Types.SearchMethodByName =
-       Glean.Schema.Hack.Types.SearchMethodByName_key
-  getName _proxy = Glean.PredicateRef "hack.SearchMethodByName" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.searchMethodByName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.SearchMethodByName x k
-  getFactKey = Glean.Schema.Hack.Types.searchMethodByName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 362 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.SearchMethodByName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 368 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.FileDeclarations_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.FileDeclarations_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.FileDeclarations_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.FileDeclarations_key" (Prelude.Just 0))
-{-# LINE 377 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.FileDeclarations_key =
-     'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
-       ('Angle.TField "declarations"
-          ([Glean.Schema.Hack.Types.Declaration])
-          ('Angle.TNoFields))
-{-# LINE 379 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.FileDeclarations
-         where
-  type KeyType Glean.Schema.Hack.Types.FileDeclarations =
-       Glean.Schema.Hack.Types.FileDeclarations_key
-  getName _proxy = Glean.PredicateRef "hack.FileDeclarations" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.fileDeclarations_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.FileDeclarations x k
-  getFactKey = Glean.Schema.Hack.Types.fileDeclarations_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 388 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.FileDeclarations where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 394 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.MethodDefinition_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.MethodDefinition_key x1 x2 x3 x4 x5 x6 x7
-       x8 x9 x10 x11)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-         Glean.buildRtsValue b x5
-         Glean.buildRtsValue b x6
-         Glean.buildRtsValue b x7
-         Glean.buildRtsValue b x8
-         Glean.buildRtsValue b x9
-         Glean.buildRtsValue b x10
-         Glean.buildRtsValue b x11
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.MethodDefinition_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.MethodDefinition_key" (Prelude.Just 0))
-{-# LINE 421 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.MethodDefinition_key =
-     'Angle.TField "declaration"
-       (Glean.KeyType Glean.Schema.Hack.Types.MethodDeclaration)
-       ('Angle.TField "signature"
-          (Glean.KeyType Glean.Schema.Hack.Types.Signature)
-          ('Angle.TField "visibility" (Glean.Schema.Hack.Types.Visibility)
-             ('Angle.TField "isAbstract" (Prelude.Bool)
-                ('Angle.TField "isAsync" (Prelude.Bool)
-                   ('Angle.TField "isFinal" (Prelude.Bool)
-                      ('Angle.TField "isStatic" (Prelude.Bool)
-                         ('Angle.TField "attributes"
-                            ([Glean.Schema.Hack.Types.UserAttribute])
-                            ('Angle.TField "typeParams"
-                               ([Glean.Schema.Hack.Types.TypeParameter])
-                               ('Angle.TField "isReadonlyThis" (Prelude.Maybe Prelude.Bool)
-                                  ('Angle.TField "readonlyRet"
-                                     (Prelude.Maybe Glean.Schema.Hack.Types.ReadonlyKind)
-                                     ('Angle.TNoFields)))))))))))
-{-# LINE 423 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.MethodDefinition
-         where
-  type KeyType Glean.Schema.Hack.Types.MethodDefinition =
-       Glean.Schema.Hack.Types.MethodDefinition_key
-  getName _proxy = Glean.PredicateRef "hack.MethodDefinition" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.methodDefinition_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.MethodDefinition x k
-  getFactKey = Glean.Schema.Hack.Types.methodDefinition_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 432 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.MethodDefinition where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 438 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.InterfaceDeclaration_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.InterfaceDeclaration_key x1)
-    = do Glean.buildRtsValue b x1
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.InterfaceDeclaration_key <$>
-        Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.InterfaceDeclaration_key" (Prelude.Just 0))
-{-# LINE 445 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.InterfaceDeclaration_key
-     =
-     'Angle.TField "name" (Glean.KeyType Glean.Schema.Hack.Types.QName)
-       ('Angle.TNoFields)
-{-# LINE 447 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Hack.Types.InterfaceDeclaration
-         where
-  type KeyType Glean.Schema.Hack.Types.InterfaceDeclaration =
-       Glean.Schema.Hack.Types.InterfaceDeclaration_key
-  getName _proxy = Glean.PredicateRef "hack.InterfaceDeclaration" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.interfaceDeclaration_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.InterfaceDeclaration x k
-  getFactKey = Glean.Schema.Hack.Types.interfaceDeclaration_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 456 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.InterfaceDeclaration
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 462 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.SearchEnumByName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.SearchEnumByName_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.SearchEnumByName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.SearchEnumByName_key" (Prelude.Just 0))
-{-# LINE 473 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.SearchEnumByName_key =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "parent"
-          (Prelude.Maybe Glean.Schema.Hack.Types.NamespaceQName)
-          ('Angle.TField "decl" (Glean.Schema.Hack.Types.Declaration)
-             ('Angle.TNoFields)))
-{-# LINE 475 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.SearchEnumByName
-         where
-  type KeyType Glean.Schema.Hack.Types.SearchEnumByName =
-       Glean.Schema.Hack.Types.SearchEnumByName_key
-  getName _proxy = Glean.PredicateRef "hack.SearchEnumByName" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.searchEnumByName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.SearchEnumByName x k
-  getFactKey = Glean.Schema.Hack.Types.searchEnumByName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 484 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.SearchEnumByName where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 490 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.MethodOverrides_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.MethodOverrides_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.MethodOverrides_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.MethodOverrides_key" (Prelude.Just 0))
-{-# LINE 501 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.MethodOverrides_key =
-     'Angle.TField "derived"
-       (Glean.KeyType Glean.Schema.Hack.Types.MethodDeclaration)
-       ('Angle.TField "base"
-          (Glean.KeyType Glean.Schema.Hack.Types.MethodDeclaration)
-          ('Angle.TField "annotation" (Prelude.Maybe Prelude.Bool)
-             ('Angle.TNoFields)))
-{-# LINE 503 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.MethodOverrides
-         where
-  type KeyType Glean.Schema.Hack.Types.MethodOverrides =
-       Glean.Schema.Hack.Types.MethodOverrides_key
-  getName _proxy = Glean.PredicateRef "hack.MethodOverrides" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.methodOverrides_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.MethodOverrides x k
-  getFactKey = Glean.Schema.Hack.Types.methodOverrides_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 512 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.MethodOverrides where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 518 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.Signature_key where
-  buildRtsValue b (Glean.Schema.Hack.Types.Signature_key x1 x2 x3 x4)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.Signature_key <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.Signature_key" (Prelude.Just 0))
-{-# LINE 531 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.Signature_key =
-     'Angle.TField "returns"
-       (Prelude.Maybe Glean.Schema.Hack.Types.Type)
-       ('Angle.TField "parameters" ([Glean.Schema.Hack.Types.Parameter])
-          ('Angle.TField "contexts"
-             (Prelude.Maybe [Glean.Schema.Hack.Types.Context_])
-             ('Angle.TField "returnsTypeInfo"
-                (Prelude.Maybe Glean.Schema.Hack.Types.TypeInfo)
-                ('Angle.TNoFields))))
-{-# LINE 533 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.Signature where
-  type KeyType Glean.Schema.Hack.Types.Signature =
-       Glean.Schema.Hack.Types.Signature_key
-  getName _proxy = Glean.PredicateRef "hack.Signature" 6
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Hack.Types.signature_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.Signature x k
-  getFactKey = Glean.Schema.Hack.Types.signature_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 542 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.Signature where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 548 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.TraitDefinition_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.TraitDefinition_key x1 x2 x3 x4 x5 x6 x7
-       x8 x9 x10)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-         Glean.buildRtsValue b x5
-         Glean.buildRtsValue b x6
-         Glean.buildRtsValue b x7
-         Glean.buildRtsValue b x8
-         Glean.buildRtsValue b x9
-         Glean.buildRtsValue b x10
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.TraitDefinition_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.TraitDefinition_key" (Prelude.Just 0))
-{-# LINE 573 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.TraitDefinition_key =
-     'Angle.TField "declaration"
-       (Glean.KeyType Glean.Schema.Hack.Types.TraitDeclaration)
-       ('Angle.TField "members" ([Glean.Schema.Hack.Types.Declaration])
-          ('Angle.TField "implements_"
-             ([Glean.Schema.Hack.Types.InterfaceDeclaration])
-             ('Angle.TField "uses" ([Glean.Schema.Hack.Types.TraitDeclaration])
-                ('Angle.TField "attributes"
-                   ([Glean.Schema.Hack.Types.UserAttribute])
-                   ('Angle.TField "typeParams"
-                      ([Glean.Schema.Hack.Types.TypeParameter])
-                      ('Angle.TField "requireExtends"
-                         ([Glean.Schema.Hack.Types.ClassDeclaration])
-                         ('Angle.TField "requireImplements"
-                            ([Glean.Schema.Hack.Types.InterfaceDeclaration])
-                            ('Angle.TField "module_"
-                               (Prelude.Maybe Glean.Schema.Hack.Types.ModuleMembership)
-                               ('Angle.TField "requireClass"
-                                  (Prelude.Maybe [Glean.Schema.Hack.Types.ClassDeclaration])
-                                  ('Angle.TNoFields))))))))))
-{-# LINE 575 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.TraitDefinition
-         where
-  type KeyType Glean.Schema.Hack.Types.TraitDefinition =
-       Glean.Schema.Hack.Types.TraitDefinition_key
-  getName _proxy = Glean.PredicateRef "hack.TraitDefinition" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.traitDefinition_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.TraitDefinition x k
-  getFactKey = Glean.Schema.Hack.Types.traitDefinition_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 584 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.TraitDefinition where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 590 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.TargetUses_key where
-  buildRtsValue b (Glean.Schema.Hack.Types.TargetUses_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.TargetUses_key <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.TargetUses_key" (Prelude.Just 0))
-{-# LINE 601 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.TargetUses_key =
-     'Angle.TField "target" (Glean.Schema.Hack.Types.XRefTarget)
-       ('Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
-          ('Angle.TField "uses" ([Glean.Schema.Src.Types.RelByteSpan])
-             ('Angle.TNoFields)))
-{-# LINE 603 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.TargetUses where
-  type KeyType Glean.Schema.Hack.Types.TargetUses =
-       Glean.Schema.Hack.Types.TargetUses_key
-  getName _proxy = Glean.PredicateRef "hack.TargetUses" 6
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Hack.Types.targetUses_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.TargetUses x k
-  getFactKey = Glean.Schema.Hack.Types.targetUses_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 612 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.TargetUses where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 618 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.SearchClassByName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.SearchClassByName_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.SearchClassByName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.SearchClassByName_key" (Prelude.Just 0))
-{-# LINE 629 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.SearchClassByName_key =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "parent"
-          (Prelude.Maybe Glean.Schema.Hack.Types.NamespaceQName)
-          ('Angle.TField "decl" (Glean.Schema.Hack.Types.Declaration)
-             ('Angle.TNoFields)))
-{-# LINE 631 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.SearchClassByName
-         where
-  type KeyType Glean.Schema.Hack.Types.SearchClassByName =
-       Glean.Schema.Hack.Types.SearchClassByName_key
-  getName _proxy = Glean.PredicateRef "hack.SearchClassByName" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.searchClassByName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.SearchClassByName x k
-  getFactKey = Glean.Schema.Hack.Types.searchClassByName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 640 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.SearchClassByName where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 646 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.SearchInterfaceByLowerCaseName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.SearchInterfaceByLowerCaseName_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.SearchInterfaceByLowerCaseName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.SearchInterfaceByLowerCaseName_key"
-           (Prelude.Just 0))
-{-# LINE 655 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.Hack.Types.SearchInterfaceByLowerCaseName_key
-     =
-     'Angle.TField "name_lowercase" (Data.Text.Text)
-       ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields))
-{-# LINE 657 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Hack.Types.SearchInterfaceByLowerCaseName
-         where
-  type KeyType Glean.Schema.Hack.Types.SearchInterfaceByLowerCaseName
-       = Glean.Schema.Hack.Types.SearchInterfaceByLowerCaseName_key
-  getName _proxy
-    = Glean.PredicateRef "hack.SearchInterfaceByLowerCaseName" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.Hack.Types.searchInterfaceByLowerCaseName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.SearchInterfaceByLowerCaseName x k
-  getFactKey
-    = Glean.Schema.Hack.Types.searchInterfaceByLowerCaseName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 666 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.SearchInterfaceByLowerCaseName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 672 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.SearchFunctionByName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.SearchFunctionByName_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.SearchFunctionByName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.SearchFunctionByName_key" (Prelude.Just 0))
-{-# LINE 683 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.SearchFunctionByName_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "parent"
-          (Prelude.Maybe Glean.Schema.Hack.Types.NamespaceQName)
-          ('Angle.TField "decl" (Glean.Schema.Hack.Types.Declaration)
-             ('Angle.TNoFields)))
-{-# LINE 685 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Hack.Types.SearchFunctionByName
-         where
-  type KeyType Glean.Schema.Hack.Types.SearchFunctionByName =
-       Glean.Schema.Hack.Types.SearchFunctionByName_key
-  getName _proxy = Glean.PredicateRef "hack.SearchFunctionByName" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.searchFunctionByName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.SearchFunctionByName x k
-  getFactKey = Glean.Schema.Hack.Types.searchFunctionByName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 694 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.SearchFunctionByName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 700 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.ClassDefinition_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.ClassDefinition_key x1 x2 x3 x4 x5 x6 x7
-       x8 x9 x10)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-         Glean.buildRtsValue b x5
-         Glean.buildRtsValue b x6
-         Glean.buildRtsValue b x7
-         Glean.buildRtsValue b x8
-         Glean.buildRtsValue b x9
-         Glean.buildRtsValue b x10
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.ClassDefinition_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.ClassDefinition_key" (Prelude.Just 0))
-{-# LINE 725 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.ClassDefinition_key =
-     'Angle.TField "declaration"
-       (Glean.KeyType Glean.Schema.Hack.Types.ClassDeclaration)
-       ('Angle.TField "isAbstract" (Prelude.Bool)
-          ('Angle.TField "isFinal" (Prelude.Bool)
-             ('Angle.TField "members" ([Glean.Schema.Hack.Types.Declaration])
-                ('Angle.TField "extends_"
-                   (Prelude.Maybe Glean.Schema.Hack.Types.ClassDeclaration)
-                   ('Angle.TField "implements_"
-                      ([Glean.Schema.Hack.Types.InterfaceDeclaration])
-                      ('Angle.TField "uses" ([Glean.Schema.Hack.Types.TraitDeclaration])
-                         ('Angle.TField "attributes"
-                            ([Glean.Schema.Hack.Types.UserAttribute])
-                            ('Angle.TField "typeParams"
-                               ([Glean.Schema.Hack.Types.TypeParameter])
-                               ('Angle.TField "module_"
-                                  (Prelude.Maybe Glean.Schema.Hack.Types.ModuleMembership)
-                                  ('Angle.TNoFields))))))))))
-{-# LINE 727 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.ClassDefinition
-         where
-  type KeyType Glean.Schema.Hack.Types.ClassDefinition =
-       Glean.Schema.Hack.Types.ClassDefinition_key
-  getName _proxy = Glean.PredicateRef "hack.ClassDefinition" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.classDefinition_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.ClassDefinition x k
-  getFactKey = Glean.Schema.Hack.Types.classDefinition_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 736 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.ClassDefinition where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 742 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.NamespaceDeclaration_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.NamespaceDeclaration_key x1)
-    = do Glean.buildRtsValue b x1
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.NamespaceDeclaration_key <$>
-        Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.NamespaceDeclaration_key" (Prelude.Just 0))
-{-# LINE 749 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.NamespaceDeclaration_key
-     =
-     'Angle.TField "name"
-       (Glean.KeyType Glean.Schema.Hack.Types.NamespaceQName)
-       ('Angle.TNoFields)
-{-# LINE 751 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Hack.Types.NamespaceDeclaration
-         where
-  type KeyType Glean.Schema.Hack.Types.NamespaceDeclaration =
-       Glean.Schema.Hack.Types.NamespaceDeclaration_key
-  getName _proxy = Glean.PredicateRef "hack.NamespaceDeclaration" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.namespaceDeclaration_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.NamespaceDeclaration x k
-  getFactKey = Glean.Schema.Hack.Types.namespaceDeclaration_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 760 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.NamespaceDeclaration
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 766 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.Enumerator_key where
-  buildRtsValue b (Glean.Schema.Hack.Types.Enumerator_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.Enumerator_key <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.Enumerator_key" (Prelude.Just 0))
-{-# LINE 775 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.Enumerator_key =
-     'Angle.TField "name" (Glean.KeyType Glean.Schema.Hack.Types.Name)
-       ('Angle.TField "enumeration"
-          (Glean.KeyType Glean.Schema.Hack.Types.EnumDeclaration)
-          ('Angle.TNoFields))
-{-# LINE 777 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.Enumerator where
-  type KeyType Glean.Schema.Hack.Types.Enumerator =
-       Glean.Schema.Hack.Types.Enumerator_key
-  getName _proxy = Glean.PredicateRef "hack.Enumerator" 6
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Hack.Types.enumerator_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.Enumerator x k
-  getFactKey = Glean.Schema.Hack.Types.enumerator_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 786 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.Enumerator where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 792 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.SearchNamespaceByName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.SearchNamespaceByName_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.SearchNamespaceByName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.SearchNamespaceByName_key" (Prelude.Just 0))
-{-# LINE 803 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.Hack.Types.SearchNamespaceByName_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "parent"
-          (Prelude.Maybe Glean.Schema.Hack.Types.NamespaceQName)
-          ('Angle.TField "decl" (Glean.Schema.Hack.Types.Declaration)
-             ('Angle.TNoFields)))
-{-# LINE 805 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Hack.Types.SearchNamespaceByName
-         where
-  type KeyType Glean.Schema.Hack.Types.SearchNamespaceByName =
-       Glean.Schema.Hack.Types.SearchNamespaceByName_key
-  getName _proxy = Glean.PredicateRef "hack.SearchNamespaceByName" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.searchNamespaceByName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.SearchNamespaceByName x k
-  getFactKey = Glean.Schema.Hack.Types.searchNamespaceByName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 814 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.SearchNamespaceByName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 820 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.NameLowerCase_key where
-  buildRtsValue b (Glean.Schema.Hack.Types.NameLowerCase_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.NameLowerCase_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.NameLowerCase_key" (Prelude.Just 0))
-{-# LINE 829 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.NameLowerCase_key =
-     'Angle.TField "nameLowercase" (Data.Text.Text)
-       ('Angle.TField "name" (Glean.KeyType Glean.Schema.Hack.Types.Name)
-          ('Angle.TNoFields))
-{-# LINE 831 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.NameLowerCase
-         where
-  type KeyType Glean.Schema.Hack.Types.NameLowerCase =
-       Glean.Schema.Hack.Types.NameLowerCase_key
-  getName _proxy = Glean.PredicateRef "hack.NameLowerCase" 6
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Hack.Types.nameLowerCase_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.NameLowerCase x k
-  getFactKey = Glean.Schema.Hack.Types.nameLowerCase_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 840 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.NameLowerCase where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 846 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.StringLiteral
-         where
-  type KeyType Glean.Schema.Hack.Types.StringLiteral = Data.Text.Text
-  getName _proxy = Glean.PredicateRef "hack.StringLiteral" 6
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Hack.Types.stringLiteral_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.StringLiteral x k
-  getFactKey = Glean.Schema.Hack.Types.stringLiteral_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 854 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.StringLiteral where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 860 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.GlobalNamespaceAlias_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.GlobalNamespaceAlias_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.GlobalNamespaceAlias_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.GlobalNamespaceAlias_key" (Prelude.Just 0))
-{-# LINE 869 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.GlobalNamespaceAlias_key
-     =
-     'Angle.TField "from" (Glean.KeyType Glean.Schema.Hack.Types.Name)
-       ('Angle.TField "to"
-          (Glean.KeyType Glean.Schema.Hack.Types.NamespaceQName)
-          ('Angle.TNoFields))
-{-# LINE 871 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Hack.Types.GlobalNamespaceAlias
-         where
-  type KeyType Glean.Schema.Hack.Types.GlobalNamespaceAlias =
-       Glean.Schema.Hack.Types.GlobalNamespaceAlias_key
-  getName _proxy = Glean.PredicateRef "hack.GlobalNamespaceAlias" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.globalNamespaceAlias_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.GlobalNamespaceAlias x k
-  getFactKey = Glean.Schema.Hack.Types.globalNamespaceAlias_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 880 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.GlobalNamespaceAlias
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 886 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.SearchInterfaceByName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.SearchInterfaceByName_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.SearchInterfaceByName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.SearchInterfaceByName_key" (Prelude.Just 0))
-{-# LINE 897 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.Hack.Types.SearchInterfaceByName_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "parent"
-          (Prelude.Maybe Glean.Schema.Hack.Types.NamespaceQName)
-          ('Angle.TField "decl" (Glean.Schema.Hack.Types.Declaration)
-             ('Angle.TNoFields)))
-{-# LINE 899 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Hack.Types.SearchInterfaceByName
-         where
-  type KeyType Glean.Schema.Hack.Types.SearchInterfaceByName =
-       Glean.Schema.Hack.Types.SearchInterfaceByName_key
-  getName _proxy = Glean.PredicateRef "hack.SearchInterfaceByName" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.searchInterfaceByName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.SearchInterfaceByName x k
-  getFactKey = Glean.Schema.Hack.Types.searchInterfaceByName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 908 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.SearchInterfaceByName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 914 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.SearchClassByLowerCaseName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.SearchClassByLowerCaseName_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.SearchClassByLowerCaseName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.SearchClassByLowerCaseName_key"
-           (Prelude.Just 0))
-{-# LINE 923 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.Hack.Types.SearchClassByLowerCaseName_key
-     =
-     'Angle.TField "name_lowercase" (Data.Text.Text)
-       ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields))
-{-# LINE 925 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Hack.Types.SearchClassByLowerCaseName
-         where
-  type KeyType Glean.Schema.Hack.Types.SearchClassByLowerCaseName =
-       Glean.Schema.Hack.Types.SearchClassByLowerCaseName_key
-  getName _proxy
-    = Glean.PredicateRef "hack.SearchClassByLowerCaseName" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.searchClassByLowerCaseName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.SearchClassByLowerCaseName x k
-  getFactKey = Glean.Schema.Hack.Types.searchClassByLowerCaseName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 934 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.SearchClassByLowerCaseName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 940 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Hack.Types.ContainerDeclarationQName
-         where
-  type KeyType Glean.Schema.Hack.Types.ContainerDeclarationQName =
-       Glean.Schema.Hack.Types.ContainerDeclaration
-  type ValueType Glean.Schema.Hack.Types.ContainerDeclarationQName =
-       Glean.Schema.Hack.Types.ContainerDeclarationQName_value
-  getName _proxy
-    = Glean.PredicateRef "hack.ContainerDeclarationQName" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.containerDeclarationQName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k v
-    = Glean.Schema.Hack.Types.ContainerDeclarationQName x k v
-  getFactKey = Glean.Schema.Hack.Types.containerDeclarationQName_key
-  getFactValue
-    = Glean.Schema.Hack.Types.containerDeclarationQName_value
-{-# LINE 951 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.ContainerDeclarationQName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 957 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.UserAttribute_key where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.UserAttribute_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.UserAttribute_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.UserAttribute_key" (Prelude.Just 0))
-{-# LINE 968 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.UserAttribute_key =
-     'Angle.TField "name" (Glean.KeyType Glean.Schema.Hack.Types.Name)
-       ('Angle.TField "parameters" ([Data.Text.Text])
-          ('Angle.TField "qname"
-             (Prelude.Maybe Glean.Schema.Hack.Types.QName)
-             ('Angle.TNoFields)))
-{-# LINE 970 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.UserAttribute
-         where
-  type KeyType Glean.Schema.Hack.Types.UserAttribute =
-       Glean.Schema.Hack.Types.UserAttribute_key
-  getName _proxy = Glean.PredicateRef "hack.UserAttribute" 6
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Hack.Types.userAttribute_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.UserAttribute x k
-  getFactKey = Glean.Schema.Hack.Types.userAttribute_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 979 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.UserAttribute where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 985 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.SearchPropertyByName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.SearchPropertyByName_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.SearchPropertyByName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.SearchPropertyByName_key" (Prelude.Just 0))
-{-# LINE 996 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.SearchPropertyByName_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "parent"
-          (Glean.KeyType Glean.Schema.Hack.Types.QName)
-          ('Angle.TField "decl" (Glean.Schema.Hack.Types.Declaration)
-             ('Angle.TNoFields)))
-{-# LINE 998 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Hack.Types.SearchPropertyByName
-         where
-  type KeyType Glean.Schema.Hack.Types.SearchPropertyByName =
-       Glean.Schema.Hack.Types.SearchPropertyByName_key
-  getName _proxy = Glean.PredicateRef "hack.SearchPropertyByName" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.searchPropertyByName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.SearchPropertyByName x k
-  getFactKey = Glean.Schema.Hack.Types.searchPropertyByName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1007 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.SearchPropertyByName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1013 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.DeclarationNamespace_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.DeclarationNamespace_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.DeclarationNamespace_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.DeclarationNamespace_key" (Prelude.Just 0))
-{-# LINE 1022 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.DeclarationNamespace_key
-     =
-     'Angle.TField "decl" (Glean.Schema.Hack.Types.Declaration)
-       ('Angle.TField "namespace_"
-          (Glean.KeyType Glean.Schema.Hack.Types.NamespaceQName)
-          ('Angle.TNoFields))
-{-# LINE 1024 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Hack.Types.DeclarationNamespace
-         where
-  type KeyType Glean.Schema.Hack.Types.DeclarationNamespace =
-       Glean.Schema.Hack.Types.DeclarationNamespace_key
-  getName _proxy = Glean.PredicateRef "hack.DeclarationNamespace" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.declarationNamespace_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.DeclarationNamespace x k
-  getFactKey = Glean.Schema.Hack.Types.declarationNamespace_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1033 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.DeclarationNamespace
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1039 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.ModuleDeclaration_key
-         where
-  buildRtsValue b (Glean.Schema.Hack.Types.ModuleDeclaration_key x1)
-    = do Glean.buildRtsValue b x1
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.ModuleDeclaration_key <$>
-        Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.ModuleDeclaration_key" (Prelude.Just 0))
-{-# LINE 1046 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.ModuleDeclaration_key =
-     'Angle.TField "name" (Glean.KeyType Glean.Schema.Hack.Types.Name)
-       ('Angle.TNoFields)
-{-# LINE 1048 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.ModuleDeclaration
-         where
-  type KeyType Glean.Schema.Hack.Types.ModuleDeclaration =
-       Glean.Schema.Hack.Types.ModuleDeclaration_key
-  getName _proxy = Glean.PredicateRef "hack.ModuleDeclaration" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.moduleDeclaration_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.ModuleDeclaration x k
-  getFactKey = Glean.Schema.Hack.Types.moduleDeclaration_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1057 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.ModuleDeclaration where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1063 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.NamespaceMember_key
-         where
-  buildRtsValue b (Glean.Schema.Hack.Types.NamespaceMember_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.NamespaceMember_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.NamespaceMember_key" (Prelude.Just 0))
-{-# LINE 1072 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.NamespaceMember_key =
-     'Angle.TField "namespace_"
-       (Glean.KeyType Glean.Schema.Hack.Types.NamespaceQName)
-       ('Angle.TField "decl" (Glean.Schema.Hack.Types.Declaration)
-          ('Angle.TNoFields))
-{-# LINE 1074 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.NamespaceMember
-         where
-  type KeyType Glean.Schema.Hack.Types.NamespaceMember =
-       Glean.Schema.Hack.Types.NamespaceMember_key
-  getName _proxy = Glean.PredicateRef "hack.NamespaceMember" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.namespaceMember_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.NamespaceMember x k
-  getFactKey = Glean.Schema.Hack.Types.namespaceMember_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1083 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.NamespaceMember where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1089 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.PropertyDefinition_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.PropertyDefinition_key x1 x2 x3 x4 x5 x6
-       x7 x8)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-         Glean.buildRtsValue b x5
-         Glean.buildRtsValue b x6
-         Glean.buildRtsValue b x7
-         Glean.buildRtsValue b x8
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.PropertyDefinition_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.PropertyDefinition_key" (Prelude.Just 0))
-{-# LINE 1110 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.PropertyDefinition_key =
-     'Angle.TField "declaration"
-       (Glean.KeyType Glean.Schema.Hack.Types.PropertyDeclaration)
-       ('Angle.TField "type" (Prelude.Maybe Glean.Schema.Hack.Types.Type)
-          ('Angle.TField "visibility" (Glean.Schema.Hack.Types.Visibility)
-             ('Angle.TField "isFinal" (Prelude.Bool)
-                ('Angle.TField "isAbstract" (Prelude.Bool)
-                   ('Angle.TField "isStatic" (Prelude.Bool)
-                      ('Angle.TField "attributes"
-                         ([Glean.Schema.Hack.Types.UserAttribute])
-                         ('Angle.TField "typeInfo"
-                            (Prelude.Maybe Glean.Schema.Hack.Types.TypeInfo)
-                            ('Angle.TNoFields))))))))
-{-# LINE 1112 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.PropertyDefinition
-         where
-  type KeyType Glean.Schema.Hack.Types.PropertyDefinition =
-       Glean.Schema.Hack.Types.PropertyDefinition_key
-  getName _proxy = Glean.PredicateRef "hack.PropertyDefinition" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.propertyDefinition_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.PropertyDefinition x k
-  getFactKey = Glean.Schema.Hack.Types.propertyDefinition_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1121 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.PropertyDefinition
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1127 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.FunctionDefinition_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.FunctionDefinition_key x1 x2 x3 x4 x5 x6
-       x7)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-         Glean.buildRtsValue b x5
-         Glean.buildRtsValue b x6
-         Glean.buildRtsValue b x7
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.FunctionDefinition_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.FunctionDefinition_key" (Prelude.Just 0))
-{-# LINE 1146 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.FunctionDefinition_key =
-     'Angle.TField "declaration"
-       (Glean.KeyType Glean.Schema.Hack.Types.FunctionDeclaration)
-       ('Angle.TField "signature"
-          (Glean.KeyType Glean.Schema.Hack.Types.Signature)
-          ('Angle.TField "isAsync" (Prelude.Bool)
-             ('Angle.TField "attributes"
-                ([Glean.Schema.Hack.Types.UserAttribute])
-                ('Angle.TField "typeParams"
-                   ([Glean.Schema.Hack.Types.TypeParameter])
-                   ('Angle.TField "module_"
-                      (Prelude.Maybe Glean.Schema.Hack.Types.ModuleMembership)
-                      ('Angle.TField "readonlyRet"
-                         (Prelude.Maybe Glean.Schema.Hack.Types.ReadonlyKind)
-                         ('Angle.TNoFields)))))))
-{-# LINE 1148 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.FunctionDefinition
-         where
-  type KeyType Glean.Schema.Hack.Types.FunctionDefinition =
-       Glean.Schema.Hack.Types.FunctionDefinition_key
-  getName _proxy = Glean.PredicateRef "hack.FunctionDefinition" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.functionDefinition_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.FunctionDefinition x k
-  getFactKey = Glean.Schema.Hack.Types.functionDefinition_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1157 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.FunctionDefinition
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1163 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.SearchPropertyByLowerCaseName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.SearchPropertyByLowerCaseName_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.SearchPropertyByLowerCaseName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.SearchPropertyByLowerCaseName_key"
-           (Prelude.Just 0))
-{-# LINE 1172 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.Hack.Types.SearchPropertyByLowerCaseName_key
-     =
-     'Angle.TField "name_lowercase" (Data.Text.Text)
-       ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields))
-{-# LINE 1174 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Hack.Types.SearchPropertyByLowerCaseName
-         where
-  type KeyType Glean.Schema.Hack.Types.SearchPropertyByLowerCaseName
-       = Glean.Schema.Hack.Types.SearchPropertyByLowerCaseName_key
-  getName _proxy
-    = Glean.PredicateRef "hack.SearchPropertyByLowerCaseName" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.Hack.Types.searchPropertyByLowerCaseName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.SearchPropertyByLowerCaseName x k
-  getFactKey
-    = Glean.Schema.Hack.Types.searchPropertyByLowerCaseName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1183 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.SearchPropertyByLowerCaseName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1189 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.GlobalConstDeclaration_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.GlobalConstDeclaration_key x1)
-    = do Glean.buildRtsValue b x1
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.GlobalConstDeclaration_key <$>
-        Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.GlobalConstDeclaration_key"
-           (Prelude.Just 0))
-{-# LINE 1196 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.Hack.Types.GlobalConstDeclaration_key
-     =
-     'Angle.TField "name" (Glean.KeyType Glean.Schema.Hack.Types.QName)
-       ('Angle.TNoFields)
-{-# LINE 1198 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Hack.Types.GlobalConstDeclaration
-         where
-  type KeyType Glean.Schema.Hack.Types.GlobalConstDeclaration =
-       Glean.Schema.Hack.Types.GlobalConstDeclaration_key
-  getName _proxy = Glean.PredicateRef "hack.GlobalConstDeclaration" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.globalConstDeclaration_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.GlobalConstDeclaration x k
-  getFactKey = Glean.Schema.Hack.Types.globalConstDeclaration_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1207 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.GlobalConstDeclaration
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1213 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.SearchGlobalConstByName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.SearchGlobalConstByName_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.SearchGlobalConstByName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.SearchGlobalConstByName_key"
-           (Prelude.Just 0))
-{-# LINE 1224 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.Hack.Types.SearchGlobalConstByName_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "parent"
-          (Prelude.Maybe Glean.Schema.Hack.Types.NamespaceQName)
-          ('Angle.TField "decl" (Glean.Schema.Hack.Types.Declaration)
-             ('Angle.TNoFields)))
-{-# LINE 1226 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Hack.Types.SearchGlobalConstByName
-         where
-  type KeyType Glean.Schema.Hack.Types.SearchGlobalConstByName =
-       Glean.Schema.Hack.Types.SearchGlobalConstByName_key
-  getName _proxy
-    = Glean.PredicateRef "hack.SearchGlobalConstByName" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.searchGlobalConstByName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.SearchGlobalConstByName x k
-  getFactKey = Glean.Schema.Hack.Types.searchGlobalConstByName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1235 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.SearchGlobalConstByName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1241 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.DeclarationSpan_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.DeclarationSpan_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.DeclarationSpan_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.DeclarationSpan_key" (Prelude.Just 0))
-{-# LINE 1252 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.DeclarationSpan_key =
-     'Angle.TField "declaration" (Glean.Schema.Hack.Types.Declaration)
-       ('Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
-          ('Angle.TField "span" (Glean.Schema.Src.Types.ByteSpan)
-             ('Angle.TNoFields)))
-{-# LINE 1254 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.DeclarationSpan
-         where
-  type KeyType Glean.Schema.Hack.Types.DeclarationSpan =
-       Glean.Schema.Hack.Types.DeclarationSpan_key
-  getName _proxy = Glean.PredicateRef "hack.DeclarationSpan" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.declarationSpan_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.DeclarationSpan x k
-  getFactKey = Glean.Schema.Hack.Types.declarationSpan_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1263 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.DeclarationSpan where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1269 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.FileCall_key where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.FileCall_key x1 x2 x3 x4 x5 x6 x7)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-         Glean.buildRtsValue b x5
-         Glean.buildRtsValue b x6
-         Glean.buildRtsValue b x7
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.FileCall_key <$> Glean.decodeRtsValue <*>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.FileCall_key" (Prelude.Just 0))
-{-# LINE 1288 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.FileCall_key =
-     'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
-       ('Angle.TField "callee_span" (Glean.Schema.Src.Types.ByteSpan)
-          ('Angle.TField "call_args" ([Glean.Schema.Hack.Types.CallArgument])
-             ('Angle.TField "callee_xref"
-                (Prelude.Maybe Glean.Schema.Hack.Types.XRefTarget)
-                ('Angle.TField "dispatch_arg"
-                   (Prelude.Maybe Glean.Schema.Hack.Types.CallArgument)
-                   ('Angle.TField "receiver_type"
-                      (Prelude.Maybe Glean.Schema.Hack.Types.Declaration)
-                      ('Angle.TField "callee_xrefs"
-                         ([Glean.Schema.Hack.Types.XRefTarget])
-                         ('Angle.TNoFields)))))))
-{-# LINE 1290 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.FileCall where
-  type KeyType Glean.Schema.Hack.Types.FileCall =
-       Glean.Schema.Hack.Types.FileCall_key
-  getName _proxy = Glean.PredicateRef "hack.FileCall" 6
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Hack.Types.fileCall_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.FileCall x k
-  getFactKey = Glean.Schema.Hack.Types.fileCall_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1299 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.FileCall where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1305 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.QName_key where
-  buildRtsValue b (Glean.Schema.Hack.Types.QName_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.QName_key <$> Glean.decodeRtsValue <*>
-        Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.QName_key" (Prelude.Just 0))
-{-# LINE 1314 "glean/schema/thrift/hack_include.hs" #-}
-type instance Angle.RecordFields Glean.Schema.Hack.Types.QName_key
-     =
-     'Angle.TField "name" (Glean.KeyType Glean.Schema.Hack.Types.Name)
-       ('Angle.TField "namespace_"
-          (Prelude.Maybe Glean.Schema.Hack.Types.NamespaceQName)
-          ('Angle.TNoFields))
-{-# LINE 1316 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.QName where
-  type KeyType Glean.Schema.Hack.Types.QName =
-       Glean.Schema.Hack.Types.QName_key
-  getName _proxy = Glean.PredicateRef "hack.QName" 6
-  getId = Glean.IdOf . Glean.Fid . Glean.Schema.Hack.Types.qName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.QName x k
-  getFactKey = Glean.Schema.Hack.Types.qName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1325 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.QName where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1331 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.HackToThrift_key where
-  buildRtsValue b (Glean.Schema.Hack.Types.HackToThrift_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.HackToThrift_key <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.HackToThrift_key" (Prelude.Just 0))
-{-# LINE 1340 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.HackToThrift_key =
-     'Angle.TField "from" (Glean.Schema.Hack.Types.Declaration)
-       ('Angle.TField "to" (Glean.Schema.Fbthrift.Types.Declaration)
-          ('Angle.TNoFields))
-{-# LINE 1342 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.HackToThrift where
-  type KeyType Glean.Schema.Hack.Types.HackToThrift =
-       Glean.Schema.Hack.Types.HackToThrift_key
-  getName _proxy = Glean.PredicateRef "hack.HackToThrift" 6
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Hack.Types.hackToThrift_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.HackToThrift x k
-  getFactKey = Glean.Schema.Hack.Types.hackToThrift_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1351 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.HackToThrift where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1357 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.TypedefDeclaration_key
-         where
-  buildRtsValue b (Glean.Schema.Hack.Types.TypedefDeclaration_key x1)
-    = do Glean.buildRtsValue b x1
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.TypedefDeclaration_key <$>
-        Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.TypedefDeclaration_key" (Prelude.Just 0))
-{-# LINE 1364 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.TypedefDeclaration_key =
-     'Angle.TField "name" (Glean.KeyType Glean.Schema.Hack.Types.QName)
-       ('Angle.TNoFields)
-{-# LINE 1366 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.TypedefDeclaration
-         where
-  type KeyType Glean.Schema.Hack.Types.TypedefDeclaration =
-       Glean.Schema.Hack.Types.TypedefDeclaration_key
-  getName _proxy = Glean.PredicateRef "hack.TypedefDeclaration" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.typedefDeclaration_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.TypedefDeclaration x k
-  getFactKey = Glean.Schema.Hack.Types.typedefDeclaration_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1375 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.TypedefDeclaration
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1381 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.ModuleParent_key where
-  buildRtsValue b (Glean.Schema.Hack.Types.ModuleParent_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.ModuleParent_key <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.ModuleParent_key" (Prelude.Just 0))
-{-# LINE 1390 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.ModuleParent_key =
-     'Angle.TField "decl" (Glean.Schema.Hack.Types.Declaration)
-       ('Angle.TField "module"
-          (Glean.KeyType Glean.Schema.Hack.Types.ModuleDeclaration)
-          ('Angle.TNoFields))
-{-# LINE 1392 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.ModuleParent where
-  type KeyType Glean.Schema.Hack.Types.ModuleParent =
-       Glean.Schema.Hack.Types.ModuleParent_key
-  getName _proxy = Glean.PredicateRef "hack.ModuleParent" 6
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Hack.Types.moduleParent_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.ModuleParent x k
-  getFactKey = Glean.Schema.Hack.Types.moduleParent_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1401 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.ModuleParent where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1407 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.ModuleChild_key where
-  buildRtsValue b (Glean.Schema.Hack.Types.ModuleChild_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.ModuleChild_key <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.ModuleChild_key" (Prelude.Just 0))
-{-# LINE 1416 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.ModuleChild_key =
-     'Angle.TField "module"
-       (Glean.KeyType Glean.Schema.Hack.Types.ModuleDeclaration)
-       ('Angle.TField "decl" (Glean.Schema.Hack.Types.Declaration)
-          ('Angle.TNoFields))
-{-# LINE 1418 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.ModuleChild where
-  type KeyType Glean.Schema.Hack.Types.ModuleChild =
-       Glean.Schema.Hack.Types.ModuleChild_key
-  getName _proxy = Glean.PredicateRef "hack.ModuleChild" 6
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Hack.Types.moduleChild_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.ModuleChild x k
-  getFactKey = Glean.Schema.Hack.Types.moduleChild_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1427 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.ModuleChild where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1433 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.DeclarationLocation_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.DeclarationLocation_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.DeclarationLocation_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.DeclarationLocation_key" (Prelude.Just 0))
-{-# LINE 1444 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.DeclarationLocation_key
-     =
-     'Angle.TField "declaration" (Glean.Schema.Hack.Types.Declaration)
-       ('Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
-          ('Angle.TField "span" (Glean.Schema.Src.Types.ByteSpan)
-             ('Angle.TNoFields)))
-{-# LINE 1446 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Hack.Types.DeclarationLocation
-         where
-  type KeyType Glean.Schema.Hack.Types.DeclarationLocation =
-       Glean.Schema.Hack.Types.DeclarationLocation_key
-  getName _proxy = Glean.PredicateRef "hack.DeclarationLocation" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.declarationLocation_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.DeclarationLocation x k
-  getFactKey = Glean.Schema.Hack.Types.declarationLocation_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1455 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.DeclarationLocation
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1461 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.DeclarationSource_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.DeclarationSource_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.DeclarationSource_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.DeclarationSource_key" (Prelude.Just 0))
-{-# LINE 1470 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.DeclarationSource_key =
-     'Angle.TField "target" (Glean.Schema.Hack.Types.Declaration)
-       ('Angle.TField "source" (Glean.Schema.Hack.Types.Declaration)
-          ('Angle.TNoFields))
-{-# LINE 1472 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.DeclarationSource
-         where
-  type KeyType Glean.Schema.Hack.Types.DeclarationSource =
-       Glean.Schema.Hack.Types.DeclarationSource_key
-  getName _proxy = Glean.PredicateRef "hack.DeclarationSource" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.declarationSource_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.DeclarationSource x k
-  getFactKey = Glean.Schema.Hack.Types.declarationSource_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1481 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.DeclarationSource where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1487 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.MethodOccurrence_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.MethodOccurrence_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.MethodOccurrence_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.MethodOccurrence_key" (Prelude.Just 0))
-{-# LINE 1496 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.MethodOccurrence_key =
-     'Angle.TField "name" (Glean.KeyType Glean.Schema.Hack.Types.Name)
-       ('Angle.TField "className"
-          (Prelude.Maybe Glean.Schema.Hack.Types.Name)
-          ('Angle.TNoFields))
-{-# LINE 1498 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.MethodOccurrence
-         where
-  type KeyType Glean.Schema.Hack.Types.MethodOccurrence =
-       Glean.Schema.Hack.Types.MethodOccurrence_key
-  getName _proxy = Glean.PredicateRef "hack.MethodOccurrence" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.methodOccurrence_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.MethodOccurrence x k
-  getFactKey = Glean.Schema.Hack.Types.methodOccurrence_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1507 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.MethodOccurrence where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1513 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.MemberCluster_key where
-  buildRtsValue b (Glean.Schema.Hack.Types.MemberCluster_key x1)
-    = do Glean.buildRtsValue b x1
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.MemberCluster_key <$>
-        Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.MemberCluster_key" (Prelude.Just 0))
-{-# LINE 1520 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.MemberCluster_key =
-     'Angle.TField "members" ([Glean.Schema.Hack.Types.Declaration])
-       ('Angle.TNoFields)
-{-# LINE 1522 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.MemberCluster
-         where
-  type KeyType Glean.Schema.Hack.Types.MemberCluster =
-       Glean.Schema.Hack.Types.MemberCluster_key
-  getName _proxy = Glean.PredicateRef "hack.MemberCluster" 6
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Hack.Types.memberCluster_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.MemberCluster x k
-  getFactKey = Glean.Schema.Hack.Types.memberCluster_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1531 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.MemberCluster where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1537 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.SearchClassConstByLowerCaseName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.SearchClassConstByLowerCaseName_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.SearchClassConstByLowerCaseName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.SearchClassConstByLowerCaseName_key"
-           (Prelude.Just 0))
-{-# LINE 1546 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.Hack.Types.SearchClassConstByLowerCaseName_key
-     =
-     'Angle.TField "name_lowercase" (Data.Text.Text)
-       ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields))
-{-# LINE 1548 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Hack.Types.SearchClassConstByLowerCaseName
-         where
-  type KeyType
-         Glean.Schema.Hack.Types.SearchClassConstByLowerCaseName
-       = Glean.Schema.Hack.Types.SearchClassConstByLowerCaseName_key
-  getName _proxy
-    = Glean.PredicateRef "hack.SearchClassConstByLowerCaseName" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.Hack.Types.searchClassConstByLowerCaseName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.SearchClassConstByLowerCaseName x k
-  getFactKey
-    = Glean.Schema.Hack.Types.searchClassConstByLowerCaseName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1557 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.SearchClassConstByLowerCaseName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1563 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.FileXRefs_key where
-  buildRtsValue b (Glean.Schema.Hack.Types.FileXRefs_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.FileXRefs_key <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.FileXRefs_key" (Prelude.Just 0))
-{-# LINE 1572 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.FileXRefs_key =
-     'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
-       ('Angle.TField "xrefs" ([Glean.Schema.Hack.Types.XRef])
-          ('Angle.TNoFields))
-{-# LINE 1574 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.FileXRefs where
-  type KeyType Glean.Schema.Hack.Types.FileXRefs =
-       Glean.Schema.Hack.Types.FileXRefs_key
-  getName _proxy = Glean.PredicateRef "hack.FileXRefs" 6
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Hack.Types.fileXRefs_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.FileXRefs x k
-  getFactKey = Glean.Schema.Hack.Types.fileXRefs_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1583 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.FileXRefs where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1589 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.TypeConstDeclaration_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.TypeConstDeclaration_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.TypeConstDeclaration_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.TypeConstDeclaration_key" (Prelude.Just 0))
-{-# LINE 1598 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.TypeConstDeclaration_key
-     =
-     'Angle.TField "name" (Glean.KeyType Glean.Schema.Hack.Types.Name)
-       ('Angle.TField "container"
-          (Glean.Schema.Hack.Types.ContainerDeclaration)
-          ('Angle.TNoFields))
-{-# LINE 1600 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Hack.Types.TypeConstDeclaration
-         where
-  type KeyType Glean.Schema.Hack.Types.TypeConstDeclaration =
-       Glean.Schema.Hack.Types.TypeConstDeclaration_key
-  getName _proxy = Glean.PredicateRef "hack.TypeConstDeclaration" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.typeConstDeclaration_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.TypeConstDeclaration x k
-  getFactKey = Glean.Schema.Hack.Types.typeConstDeclaration_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1609 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.TypeConstDeclaration
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1615 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.DeclarationName
-         where
-  type KeyType Glean.Schema.Hack.Types.DeclarationName =
-       Glean.Schema.Hack.Types.Declaration
-  type ValueType Glean.Schema.Hack.Types.DeclarationName =
-       Glean.Schema.Hack.Types.DeclarationName_value
-  getName _proxy = Glean.PredicateRef "hack.DeclarationName" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.declarationName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k v
-    = Glean.Schema.Hack.Types.DeclarationName x k v
-  getFactKey = Glean.Schema.Hack.Types.declarationName_key
-  getFactValue = Glean.Schema.Hack.Types.declarationName_value
-{-# LINE 1626 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.DeclarationName where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1632 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.MethodOverridden_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.MethodOverridden_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.MethodOverridden_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.MethodOverridden_key" (Prelude.Just 0))
-{-# LINE 1643 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.MethodOverridden_key =
-     'Angle.TField "base"
-       (Glean.KeyType Glean.Schema.Hack.Types.MethodDeclaration)
-       ('Angle.TField "derived"
-          (Glean.KeyType Glean.Schema.Hack.Types.MethodDeclaration)
-          ('Angle.TField "annotation" (Prelude.Maybe Prelude.Bool)
-             ('Angle.TNoFields)))
-{-# LINE 1645 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.MethodOverridden
-         where
-  type KeyType Glean.Schema.Hack.Types.MethodOverridden =
-       Glean.Schema.Hack.Types.MethodOverridden_key
-  getName _proxy = Glean.PredicateRef "hack.MethodOverridden" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.methodOverridden_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.MethodOverridden x k
-  getFactKey = Glean.Schema.Hack.Types.methodOverridden_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1654 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.MethodOverridden where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1660 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.DeclarationTarget_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.DeclarationTarget_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.DeclarationTarget_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.DeclarationTarget_key" (Prelude.Just 0))
-{-# LINE 1669 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.DeclarationTarget_key =
-     'Angle.TField "source" (Glean.Schema.Hack.Types.Declaration)
-       ('Angle.TField "target" (Glean.Schema.Hack.Types.Declaration)
-          ('Angle.TNoFields))
-{-# LINE 1671 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.DeclarationTarget
-         where
-  type KeyType Glean.Schema.Hack.Types.DeclarationTarget =
-       Glean.Schema.Hack.Types.DeclarationTarget_key
-  getName _proxy = Glean.PredicateRef "hack.DeclarationTarget" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.declarationTarget_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.DeclarationTarget x k
-  getFactKey = Glean.Schema.Hack.Types.declarationTarget_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1680 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.DeclarationTarget where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1686 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.Name where
-  type KeyType Glean.Schema.Hack.Types.Name = Data.Text.Text
-  getName _proxy = Glean.PredicateRef "hack.Name" 6
-  getId = Glean.IdOf . Glean.Fid . Glean.Schema.Hack.Types.name_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.Name x k
-  getFactKey = Glean.Schema.Hack.Types.name_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1694 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.Name where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1700 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.MethodDeclaration_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.MethodDeclaration_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.MethodDeclaration_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.MethodDeclaration_key" (Prelude.Just 0))
-{-# LINE 1709 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.MethodDeclaration_key =
-     'Angle.TField "name" (Glean.KeyType Glean.Schema.Hack.Types.Name)
-       ('Angle.TField "container"
-          (Glean.Schema.Hack.Types.ContainerDeclaration)
-          ('Angle.TNoFields))
-{-# LINE 1711 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.MethodDeclaration
-         where
-  type KeyType Glean.Schema.Hack.Types.MethodDeclaration =
-       Glean.Schema.Hack.Types.MethodDeclaration_key
-  getName _proxy = Glean.PredicateRef "hack.MethodDeclaration" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.methodDeclaration_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.MethodDeclaration x k
-  getFactKey = Glean.Schema.Hack.Types.methodDeclaration_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1720 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.MethodDeclaration where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1726 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.TraitDeclaration_key
-         where
-  buildRtsValue b (Glean.Schema.Hack.Types.TraitDeclaration_key x1)
-    = do Glean.buildRtsValue b x1
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.TraitDeclaration_key <$>
-        Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.TraitDeclaration_key" (Prelude.Just 0))
-{-# LINE 1733 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.TraitDeclaration_key =
-     'Angle.TField "name" (Glean.KeyType Glean.Schema.Hack.Types.QName)
-       ('Angle.TNoFields)
-{-# LINE 1735 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.TraitDeclaration
-         where
-  type KeyType Glean.Schema.Hack.Types.TraitDeclaration =
-       Glean.Schema.Hack.Types.TraitDeclaration_key
-  getName _proxy = Glean.PredicateRef "hack.TraitDeclaration" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.traitDeclaration_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.TraitDeclaration x k
-  getFactKey = Glean.Schema.Hack.Types.traitDeclaration_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1744 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.TraitDeclaration where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1750 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.SearchTypeConstByName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.SearchTypeConstByName_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.SearchTypeConstByName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.SearchTypeConstByName_key" (Prelude.Just 0))
-{-# LINE 1761 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.Hack.Types.SearchTypeConstByName_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "parent"
-          (Glean.KeyType Glean.Schema.Hack.Types.QName)
-          ('Angle.TField "decl" (Glean.Schema.Hack.Types.Declaration)
-             ('Angle.TNoFields)))
-{-# LINE 1763 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Hack.Types.SearchTypeConstByName
-         where
-  type KeyType Glean.Schema.Hack.Types.SearchTypeConstByName =
-       Glean.Schema.Hack.Types.SearchTypeConstByName_key
-  getName _proxy = Glean.PredicateRef "hack.SearchTypeConstByName" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.searchTypeConstByName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.SearchTypeConstByName x k
-  getFactKey = Glean.Schema.Hack.Types.searchTypeConstByName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1772 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.SearchTypeConstByName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1778 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.ClassDeclaration_key
-         where
-  buildRtsValue b (Glean.Schema.Hack.Types.ClassDeclaration_key x1)
-    = do Glean.buildRtsValue b x1
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.ClassDeclaration_key <$>
-        Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.ClassDeclaration_key" (Prelude.Just 0))
-{-# LINE 1785 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.ClassDeclaration_key =
-     'Angle.TField "name" (Glean.KeyType Glean.Schema.Hack.Types.QName)
-       ('Angle.TNoFields)
-{-# LINE 1787 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.ClassDeclaration
-         where
-  type KeyType Glean.Schema.Hack.Types.ClassDeclaration =
-       Glean.Schema.Hack.Types.ClassDeclaration_key
-  getName _proxy = Glean.PredicateRef "hack.ClassDeclaration" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.classDeclaration_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.ClassDeclaration x k
-  getFactKey = Glean.Schema.Hack.Types.classDeclaration_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1796 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.ClassDeclaration where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1802 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.SearchTypedefByName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.SearchTypedefByName_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.SearchTypedefByName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.SearchTypedefByName_key" (Prelude.Just 0))
-{-# LINE 1813 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.SearchTypedefByName_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "parent"
-          (Prelude.Maybe Glean.Schema.Hack.Types.NamespaceQName)
-          ('Angle.TField "decl" (Glean.Schema.Hack.Types.Declaration)
-             ('Angle.TNoFields)))
-{-# LINE 1815 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Hack.Types.SearchTypedefByName
-         where
-  type KeyType Glean.Schema.Hack.Types.SearchTypedefByName =
-       Glean.Schema.Hack.Types.SearchTypedefByName_key
-  getName _proxy = Glean.PredicateRef "hack.SearchTypedefByName" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.searchTypedefByName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.SearchTypedefByName x k
-  getFactKey = Glean.Schema.Hack.Types.searchTypedefByName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1824 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.SearchTypedefByName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1830 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.IndexerInputsHash
-         where
-  type KeyType Glean.Schema.Hack.Types.IndexerInputsHash =
-       Data.Text.Text
-  type ValueType Glean.Schema.Hack.Types.IndexerInputsHash =
-       Glean.Schema.Hack.Types.IndexerInputsHash_value
-  getName _proxy = Glean.PredicateRef "hack.IndexerInputsHash" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.indexerInputsHash_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k v
-    = Glean.Schema.Hack.Types.IndexerInputsHash x k v
-  getFactKey = Glean.Schema.Hack.Types.indexerInputsHash_key
-  getFactValue = Glean.Schema.Hack.Types.indexerInputsHash_value
-{-# LINE 1840 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.IndexerInputsHash where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1846 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.SearchFunctionByLowerCaseName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.SearchFunctionByLowerCaseName_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.SearchFunctionByLowerCaseName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.SearchFunctionByLowerCaseName_key"
-           (Prelude.Just 0))
-{-# LINE 1855 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.Hack.Types.SearchFunctionByLowerCaseName_key
-     =
-     'Angle.TField "name_lowercase" (Data.Text.Text)
-       ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields))
-{-# LINE 1857 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Hack.Types.SearchFunctionByLowerCaseName
-         where
-  type KeyType Glean.Schema.Hack.Types.SearchFunctionByLowerCaseName
-       = Glean.Schema.Hack.Types.SearchFunctionByLowerCaseName_key
-  getName _proxy
-    = Glean.PredicateRef "hack.SearchFunctionByLowerCaseName" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.Hack.Types.searchFunctionByLowerCaseName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.SearchFunctionByLowerCaseName x k
-  getFactKey
-    = Glean.Schema.Hack.Types.searchFunctionByLowerCaseName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1866 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.SearchFunctionByLowerCaseName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1872 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.SearchModuleByLowerCaseName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.SearchModuleByLowerCaseName_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.SearchModuleByLowerCaseName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.SearchModuleByLowerCaseName_key"
-           (Prelude.Just 0))
-{-# LINE 1881 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.Hack.Types.SearchModuleByLowerCaseName_key
-     =
-     'Angle.TField "name_lowercase" (Data.Text.Text)
-       ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields))
-{-# LINE 1883 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Hack.Types.SearchModuleByLowerCaseName
-         where
-  type KeyType Glean.Schema.Hack.Types.SearchModuleByLowerCaseName =
-       Glean.Schema.Hack.Types.SearchModuleByLowerCaseName_key
-  getName _proxy
-    = Glean.PredicateRef "hack.SearchModuleByLowerCaseName" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.searchModuleByLowerCaseName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.SearchModuleByLowerCaseName x k
-  getFactKey
-    = Glean.Schema.Hack.Types.searchModuleByLowerCaseName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1892 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.SearchModuleByLowerCaseName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1898 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.SearchNamespaceByLowerCaseName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.SearchNamespaceByLowerCaseName_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.SearchNamespaceByLowerCaseName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.SearchNamespaceByLowerCaseName_key"
-           (Prelude.Just 0))
-{-# LINE 1907 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.Hack.Types.SearchNamespaceByLowerCaseName_key
-     =
-     'Angle.TField "name_lowercase" (Data.Text.Text)
-       ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields))
-{-# LINE 1909 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Hack.Types.SearchNamespaceByLowerCaseName
-         where
-  type KeyType Glean.Schema.Hack.Types.SearchNamespaceByLowerCaseName
-       = Glean.Schema.Hack.Types.SearchNamespaceByLowerCaseName_key
-  getName _proxy
-    = Glean.PredicateRef "hack.SearchNamespaceByLowerCaseName" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.Hack.Types.searchNamespaceByLowerCaseName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.SearchNamespaceByLowerCaseName x k
-  getFactKey
-    = Glean.Schema.Hack.Types.searchNamespaceByLowerCaseName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1918 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.SearchNamespaceByLowerCaseName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1924 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.SearchMethodByLowerCaseName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.SearchMethodByLowerCaseName_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.SearchMethodByLowerCaseName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.SearchMethodByLowerCaseName_key"
-           (Prelude.Just 0))
-{-# LINE 1933 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.Hack.Types.SearchMethodByLowerCaseName_key
-     =
-     'Angle.TField "name_lowercase" (Data.Text.Text)
-       ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields))
-{-# LINE 1935 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Hack.Types.SearchMethodByLowerCaseName
-         where
-  type KeyType Glean.Schema.Hack.Types.SearchMethodByLowerCaseName =
-       Glean.Schema.Hack.Types.SearchMethodByLowerCaseName_key
-  getName _proxy
-    = Glean.PredicateRef "hack.SearchMethodByLowerCaseName" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.searchMethodByLowerCaseName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.SearchMethodByLowerCaseName x k
-  getFactKey
-    = Glean.Schema.Hack.Types.searchMethodByLowerCaseName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1944 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.SearchMethodByLowerCaseName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1950 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.ModuleDefinition_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.ModuleDefinition_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.ModuleDefinition_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.ModuleDefinition_key" (Prelude.Just 0))
-{-# LINE 1959 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.ModuleDefinition_key =
-     'Angle.TField "declaration"
-       (Glean.KeyType Glean.Schema.Hack.Types.ModuleDeclaration)
-       ('Angle.TField "attributes"
-          ([Glean.Schema.Hack.Types.UserAttribute])
-          ('Angle.TNoFields))
-{-# LINE 1961 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.ModuleDefinition
-         where
-  type KeyType Glean.Schema.Hack.Types.ModuleDefinition =
-       Glean.Schema.Hack.Types.ModuleDefinition_key
-  getName _proxy = Glean.PredicateRef "hack.ModuleDefinition" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.moduleDefinition_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.ModuleDefinition x k
-  getFactKey = Glean.Schema.Hack.Types.moduleDefinition_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1970 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.ModuleDefinition where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1976 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.AttributeToDefinition_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.AttributeToDefinition_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.AttributeToDefinition_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.AttributeToDefinition_key" (Prelude.Just 0))
-{-# LINE 1985 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.Hack.Types.AttributeToDefinition_key
-     =
-     'Angle.TField "attribute"
-       (Glean.KeyType Glean.Schema.Hack.Types.UserAttribute)
-       ('Angle.TField "definition" (Glean.Schema.Hack.Types.Definition)
-          ('Angle.TNoFields))
-{-# LINE 1987 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Hack.Types.AttributeToDefinition
-         where
-  type KeyType Glean.Schema.Hack.Types.AttributeToDefinition =
-       Glean.Schema.Hack.Types.AttributeToDefinition_key
-  getName _proxy = Glean.PredicateRef "hack.AttributeToDefinition" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.attributeToDefinition_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.AttributeToDefinition x k
-  getFactKey = Glean.Schema.Hack.Types.attributeToDefinition_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1996 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.AttributeToDefinition
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 2002 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.Hint_key where
-  buildRtsValue b Glean.Schema.Hack.Types.Hint_key_EMPTY
-    = Glean.buildRtsSelector b 20
-  buildRtsValue b (Glean.Schema.Hack.Types.Hint_key_apply x)
-    = do Glean.buildRtsSelector b 0
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Hack.Types.Hint_key_option x)
-    = do Glean.buildRtsSelector b 1
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Hack.Types.Hint_key_like x)
-    = do Glean.buildRtsSelector b 2
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Hack.Types.Hint_key_tuple x)
-    = do Glean.buildRtsSelector b 3
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Hack.Types.Hint_key_class_args x)
-    = do Glean.buildRtsSelector b 4
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Hack.Types.Hint_key_shape x)
-    = do Glean.buildRtsSelector b 5
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Hack.Types.Hint_key_soft x)
-    = do Glean.buildRtsSelector b 6
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Hack.Types.Hint_key_intersection x)
-    = do Glean.buildRtsSelector b 7
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Hack.Types.Hint_key_union_ x)
-    = do Glean.buildRtsSelector b 8
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Hack.Types.Hint_key_vect_or_dict x)
-    = do Glean.buildRtsSelector b 9
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Hack.Types.Hint_key_prim x)
-    = do Glean.buildRtsSelector b 10
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Hack.Types.Hint_key_var_ x)
-    = do Glean.buildRtsSelector b 11
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Hack.Types.Hint_key_fun_context x)
-    = do Glean.buildRtsSelector b 12
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Hack.Types.Hint_key_mixed x)
-    = do Glean.buildRtsSelector b 13
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Hack.Types.Hint_key_wildcard x)
-    = do Glean.buildRtsSelector b 14
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Hack.Types.Hint_key_nonnull x)
-    = do Glean.buildRtsSelector b 15
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Hack.Types.Hint_key_this_ x)
-    = do Glean.buildRtsSelector b 16
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Hack.Types.Hint_key_dynamic x)
-    = do Glean.buildRtsSelector b 17
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Hack.Types.Hint_key_nothing x)
-    = do Glean.buildRtsSelector b 18
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Hack.Types.Hint_key_other x)
-    = do Glean.buildRtsSelector b 19
-         Glean.buildRtsValue b x
-  decodeRtsValue
-    = Glean.sumD (Prelude.pure Glean.Schema.Hack.Types.Hint_key_EMPTY)
-        [Glean.mapD Glean.Schema.Hack.Types.Hint_key_apply,
-         Glean.mapD Glean.Schema.Hack.Types.Hint_key_option,
-         Glean.mapD Glean.Schema.Hack.Types.Hint_key_like,
-         Glean.mapD Glean.Schema.Hack.Types.Hint_key_tuple,
-         Glean.mapD Glean.Schema.Hack.Types.Hint_key_class_args,
-         Glean.mapD Glean.Schema.Hack.Types.Hint_key_shape,
-         Glean.mapD Glean.Schema.Hack.Types.Hint_key_soft,
-         Glean.mapD Glean.Schema.Hack.Types.Hint_key_intersection,
-         Glean.mapD Glean.Schema.Hack.Types.Hint_key_union_,
-         Glean.mapD Glean.Schema.Hack.Types.Hint_key_vect_or_dict,
-         Glean.mapD Glean.Schema.Hack.Types.Hint_key_prim,
-         Glean.mapD Glean.Schema.Hack.Types.Hint_key_var_,
-         Glean.mapD Glean.Schema.Hack.Types.Hint_key_fun_context,
-         Glean.mapD Glean.Schema.Hack.Types.Hint_key_mixed,
-         Glean.mapD Glean.Schema.Hack.Types.Hint_key_wildcard,
-         Glean.mapD Glean.Schema.Hack.Types.Hint_key_nonnull,
-         Glean.mapD Glean.Schema.Hack.Types.Hint_key_this_,
-         Glean.mapD Glean.Schema.Hack.Types.Hint_key_dynamic,
-         Glean.mapD Glean.Schema.Hack.Types.Hint_key_nothing,
-         Glean.mapD Glean.Schema.Hack.Types.Hint_key_other]
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.Hint_key" (Prelude.Just 0))
-{-# LINE 2090 "glean/schema/thrift/hack_include.hs" #-}
-type instance Angle.SumFields Glean.Schema.Hack.Types.Hint_key =
-     'Angle.TField "apply" (Glean.Schema.Hack.Types.Hint_apply_)
-       ('Angle.TField "option"
-          (Glean.KeyType Glean.Schema.Hack.Types.Hint)
-          ('Angle.TField "like" (Glean.KeyType Glean.Schema.Hack.Types.Hint)
-             ('Angle.TField "tuple" (Glean.Schema.Hack.Types.Hint_tuple_)
-                ('Angle.TField "class_args"
-                   (Glean.KeyType Glean.Schema.Hack.Types.Hint)
-                   ('Angle.TField "shape" (Glean.Schema.Hack.Types.Hint_shape_)
-                      ('Angle.TField "soft" (Glean.KeyType Glean.Schema.Hack.Types.Hint)
-                         ('Angle.TField "intersection" ([Glean.Schema.Hack.Types.Hint])
-                            ('Angle.TField "union_" ([Glean.Schema.Hack.Types.Hint])
-                               ('Angle.TField "vect_or_dict"
-                                  (Glean.Schema.Hack.Types.Hint_vect_or_dict_)
-                                  ('Angle.TField "prim" (Glean.KeyType Glean.Schema.Hack.Types.Type)
-                                     ('Angle.TField "var_" (Data.Text.Text)
-                                        ('Angle.TField "fun_context" (Data.Text.Text)
-                                           ('Angle.TField "mixed" (Glean.Schema.Builtin.Types.Unit)
-                                              ('Angle.TField "wildcard"
-                                                 (Glean.Schema.Builtin.Types.Unit)
-                                                 ('Angle.TField "nonnull"
-                                                    (Glean.Schema.Builtin.Types.Unit)
-                                                    ('Angle.TField "this_"
-                                                       (Glean.Schema.Builtin.Types.Unit)
-                                                       ('Angle.TField "dynamic"
-                                                          (Glean.Schema.Builtin.Types.Unit)
-                                                          ('Angle.TField "nothing"
-                                                             (Glean.Schema.Builtin.Types.Unit)
-                                                             ('Angle.TField "other"
-                                                                (Glean.KeyType
-                                                                   Glean.Schema.Hack.Types.Type)
-                                                                ('Angle.TNoFields))))))))))))))))))))
-{-# LINE 2092 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.Hint where
-  type KeyType Glean.Schema.Hack.Types.Hint =
-       Glean.Schema.Hack.Types.Hint_key
-  getName _proxy = Glean.PredicateRef "hack.Hint" 6
-  getId = Glean.IdOf . Glean.Fid . Glean.Schema.Hack.Types.hint_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.Hint x k
-  getFactKey = Glean.Schema.Hack.Types.hint_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 2100 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.Hint where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 2106 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.EnumDeclaration_key
-         where
-  buildRtsValue b (Glean.Schema.Hack.Types.EnumDeclaration_key x1)
-    = do Glean.buildRtsValue b x1
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.EnumDeclaration_key <$>
-        Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.EnumDeclaration_key" (Prelude.Just 0))
-{-# LINE 2113 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.EnumDeclaration_key =
-     'Angle.TField "name" (Glean.KeyType Glean.Schema.Hack.Types.QName)
-       ('Angle.TNoFields)
-{-# LINE 2115 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.EnumDeclaration
-         where
-  type KeyType Glean.Schema.Hack.Types.EnumDeclaration =
-       Glean.Schema.Hack.Types.EnumDeclaration_key
-  getName _proxy = Glean.PredicateRef "hack.EnumDeclaration" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.enumDeclaration_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.EnumDeclaration x k
-  getFactKey = Glean.Schema.Hack.Types.enumDeclaration_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 2124 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.EnumDeclaration where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 2130 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.ThriftToHack_key where
-  buildRtsValue b (Glean.Schema.Hack.Types.ThriftToHack_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.ThriftToHack_key <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.ThriftToHack_key" (Prelude.Just 0))
-{-# LINE 2139 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.ThriftToHack_key =
-     'Angle.TField "to" (Glean.Schema.Fbthrift.Types.Declaration)
-       ('Angle.TField "from" (Glean.Schema.Hack.Types.Declaration)
-          ('Angle.TNoFields))
-{-# LINE 2141 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.ThriftToHack where
-  type KeyType Glean.Schema.Hack.Types.ThriftToHack =
-       Glean.Schema.Hack.Types.ThriftToHack_key
-  getName _proxy = Glean.PredicateRef "hack.ThriftToHack" 6
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Hack.Types.thriftToHack_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.ThriftToHack x k
-  getFactKey = Glean.Schema.Hack.Types.thriftToHack_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 2150 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.ThriftToHack where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 2156 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.TypeInfo_key where
-  buildRtsValue b (Glean.Schema.Hack.Types.TypeInfo_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.TypeInfo_key <$> Glean.decodeRtsValue <*>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.TypeInfo_key" (Prelude.Just 0))
-{-# LINE 2167 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.TypeInfo_key =
-     'Angle.TField "displayType"
-       (Glean.KeyType Glean.Schema.Hack.Types.Type)
-       ('Angle.TField "xrefs" ([Glean.Schema.Hack.Types.XRef])
-          ('Angle.TField "hint" (Prelude.Maybe Glean.Schema.Hack.Types.Hint)
-             ('Angle.TNoFields)))
-{-# LINE 2169 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.TypeInfo where
-  type KeyType Glean.Schema.Hack.Types.TypeInfo =
-       Glean.Schema.Hack.Types.TypeInfo_key
-  getName _proxy = Glean.PredicateRef "hack.TypeInfo" 6
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Hack.Types.typeInfo_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.TypeInfo x k
-  getFactKey = Glean.Schema.Hack.Types.typeInfo_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 2178 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.TypeInfo where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 2184 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.InheritedMembers_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.InheritedMembers_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.InheritedMembers_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.InheritedMembers_key" (Prelude.Just 0))
-{-# LINE 2193 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.InheritedMembers_key =
-     'Angle.TField "container"
-       (Glean.Schema.Hack.Types.ContainerDeclaration)
-       ('Angle.TField "inheritedMembers"
-          ([Glean.Schema.Hack.Types.MemberCluster])
-          ('Angle.TNoFields))
-{-# LINE 2195 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.InheritedMembers
-         where
-  type KeyType Glean.Schema.Hack.Types.InheritedMembers =
-       Glean.Schema.Hack.Types.InheritedMembers_key
-  getName _proxy = Glean.PredicateRef "hack.InheritedMembers" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.inheritedMembers_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.InheritedMembers x k
-  getFactKey = Glean.Schema.Hack.Types.inheritedMembers_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 2204 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.InheritedMembers where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 2210 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.ContainerChild_key
-         where
-  buildRtsValue b (Glean.Schema.Hack.Types.ContainerChild_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.ContainerChild_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.ContainerChild_key" (Prelude.Just 0))
-{-# LINE 2219 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.ContainerChild_key =
-     'Angle.TField "container"
-       (Glean.Schema.Hack.Types.ContainerDeclaration)
-       ('Angle.TField "child"
-          (Glean.Schema.Hack.Types.ContainerDeclaration)
-          ('Angle.TNoFields))
-{-# LINE 2221 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.ContainerChild
-         where
-  type KeyType Glean.Schema.Hack.Types.ContainerChild =
-       Glean.Schema.Hack.Types.ContainerChild_key
-  getName _proxy = Glean.PredicateRef "hack.ContainerChild" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.containerChild_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.ContainerChild x k
-  getFactKey = Glean.Schema.Hack.Types.containerChild_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 2230 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.ContainerChild where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 2236 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.TypeConstDefinition_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.TypeConstDefinition_key x1 x2 x3 x4 x5)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-         Glean.buildRtsValue b x5
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.TypeConstDefinition_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.TypeConstDefinition_key" (Prelude.Just 0))
-{-# LINE 2251 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.TypeConstDefinition_key
-     =
-     'Angle.TField "declaration"
-       (Glean.KeyType Glean.Schema.Hack.Types.TypeConstDeclaration)
-       ('Angle.TField "type" (Prelude.Maybe Glean.Schema.Hack.Types.Type)
-          ('Angle.TField "kind" (Glean.Schema.Hack.Types.TypeConstKind)
-             ('Angle.TField "attributes"
-                ([Glean.Schema.Hack.Types.UserAttribute])
-                ('Angle.TField "typeInfo"
-                   (Prelude.Maybe Glean.Schema.Hack.Types.TypeInfo)
-                   ('Angle.TNoFields)))))
-{-# LINE 2253 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Hack.Types.TypeConstDefinition
-         where
-  type KeyType Glean.Schema.Hack.Types.TypeConstDefinition =
-       Glean.Schema.Hack.Types.TypeConstDefinition_key
-  getName _proxy = Glean.PredicateRef "hack.TypeConstDefinition" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.typeConstDefinition_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.TypeConstDefinition x k
-  getFactKey = Glean.Schema.Hack.Types.typeConstDefinition_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 2262 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.TypeConstDefinition
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 2268 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.SearchEnumByLowerCaseName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.SearchEnumByLowerCaseName_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.SearchEnumByLowerCaseName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.SearchEnumByLowerCaseName_key"
-           (Prelude.Just 0))
-{-# LINE 2277 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.Hack.Types.SearchEnumByLowerCaseName_key
-     =
-     'Angle.TField "name_lowercase" (Data.Text.Text)
-       ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields))
-{-# LINE 2279 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Hack.Types.SearchEnumByLowerCaseName
-         where
-  type KeyType Glean.Schema.Hack.Types.SearchEnumByLowerCaseName =
-       Glean.Schema.Hack.Types.SearchEnumByLowerCaseName_key
-  getName _proxy
-    = Glean.PredicateRef "hack.SearchEnumByLowerCaseName" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.searchEnumByLowerCaseName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.SearchEnumByLowerCaseName x k
-  getFactKey = Glean.Schema.Hack.Types.searchEnumByLowerCaseName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 2288 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.SearchEnumByLowerCaseName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 2294 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.AttributeHasParameter_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.AttributeHasParameter_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.AttributeHasParameter_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.AttributeHasParameter_key" (Prelude.Just 0))
-{-# LINE 2305 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.Hack.Types.AttributeHasParameter_key
-     =
-     'Angle.TField "name" (Glean.KeyType Glean.Schema.Hack.Types.Name)
-       ('Angle.TField "parameter" (Data.Text.Text)
-          ('Angle.TField "attribute"
-             (Glean.KeyType Glean.Schema.Hack.Types.UserAttribute)
-             ('Angle.TNoFields)))
-{-# LINE 2307 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Hack.Types.AttributeHasParameter
-         where
-  type KeyType Glean.Schema.Hack.Types.AttributeHasParameter =
-       Glean.Schema.Hack.Types.AttributeHasParameter_key
-  getName _proxy = Glean.PredicateRef "hack.AttributeHasParameter" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.attributeHasParameter_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.AttributeHasParameter x k
-  getFactKey = Glean.Schema.Hack.Types.attributeHasParameter_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 2316 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.AttributeHasParameter
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 2322 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.ContainerParent_key
-         where
-  buildRtsValue b (Glean.Schema.Hack.Types.ContainerParent_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.ContainerParent_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.ContainerParent_key" (Prelude.Just 0))
-{-# LINE 2331 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.ContainerParent_key =
-     'Angle.TField "container"
-       (Glean.Schema.Hack.Types.ContainerDeclaration)
-       ('Angle.TField "parent"
-          (Glean.Schema.Hack.Types.ContainerDeclaration)
-          ('Angle.TNoFields))
-{-# LINE 2333 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.ContainerParent
-         where
-  type KeyType Glean.Schema.Hack.Types.ContainerParent =
-       Glean.Schema.Hack.Types.ContainerParent_key
-  getName _proxy = Glean.PredicateRef "hack.ContainerParent" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.containerParent_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.ContainerParent x k
-  getFactKey = Glean.Schema.Hack.Types.containerParent_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 2342 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.ContainerParent where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 2348 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.SearchTypeConstByLowerCaseName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.SearchTypeConstByLowerCaseName_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.SearchTypeConstByLowerCaseName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.SearchTypeConstByLowerCaseName_key"
-           (Prelude.Just 0))
-{-# LINE 2357 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.Hack.Types.SearchTypeConstByLowerCaseName_key
-     =
-     'Angle.TField "name_lowercase" (Data.Text.Text)
-       ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields))
-{-# LINE 2359 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Hack.Types.SearchTypeConstByLowerCaseName
-         where
-  type KeyType Glean.Schema.Hack.Types.SearchTypeConstByLowerCaseName
-       = Glean.Schema.Hack.Types.SearchTypeConstByLowerCaseName_key
-  getName _proxy
-    = Glean.PredicateRef "hack.SearchTypeConstByLowerCaseName" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.Hack.Types.searchTypeConstByLowerCaseName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.SearchTypeConstByLowerCaseName x k
-  getFactKey
-    = Glean.Schema.Hack.Types.searchTypeConstByLowerCaseName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 2368 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.SearchTypeConstByLowerCaseName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 2374 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.SearchTraitByName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.SearchTraitByName_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.SearchTraitByName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.SearchTraitByName_key" (Prelude.Just 0))
-{-# LINE 2385 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.SearchTraitByName_key =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "parent"
-          (Prelude.Maybe Glean.Schema.Hack.Types.NamespaceQName)
-          ('Angle.TField "decl" (Glean.Schema.Hack.Types.Declaration)
-             ('Angle.TNoFields)))
-{-# LINE 2387 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.SearchTraitByName
-         where
-  type KeyType Glean.Schema.Hack.Types.SearchTraitByName =
-       Glean.Schema.Hack.Types.SearchTraitByName_key
-  getName _proxy = Glean.PredicateRef "hack.SearchTraitByName" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.searchTraitByName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.SearchTraitByName x k
-  getFactKey = Glean.Schema.Hack.Types.searchTraitByName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 2396 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.SearchTraitByName where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 2402 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.DeclarationComment_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.DeclarationComment_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.DeclarationComment_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.DeclarationComment_key" (Prelude.Just 0))
-{-# LINE 2413 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.DeclarationComment_key =
-     'Angle.TField "declaration" (Glean.Schema.Hack.Types.Declaration)
-       ('Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
-          ('Angle.TField "span" (Glean.Schema.Src.Types.ByteSpan)
-             ('Angle.TNoFields)))
-{-# LINE 2415 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.DeclarationComment
-         where
-  type KeyType Glean.Schema.Hack.Types.DeclarationComment =
-       Glean.Schema.Hack.Types.DeclarationComment_key
-  getName _proxy = Glean.PredicateRef "hack.DeclarationComment" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.declarationComment_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.DeclarationComment x k
-  getFactKey = Glean.Schema.Hack.Types.declarationComment_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 2424 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.DeclarationComment
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 2430 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.AttributeToDeclaration_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.AttributeToDeclaration_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.AttributeToDeclaration_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.AttributeToDeclaration_key"
-           (Prelude.Just 0))
-{-# LINE 2441 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.Hack.Types.AttributeToDeclaration_key
-     =
-     'Angle.TField "attribute"
-       (Glean.KeyType Glean.Schema.Hack.Types.UserAttribute)
-       ('Angle.TField "declaration" (Glean.Schema.Hack.Types.Declaration)
-          ('Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
-             ('Angle.TNoFields)))
-{-# LINE 2443 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Hack.Types.AttributeToDeclaration
-         where
-  type KeyType Glean.Schema.Hack.Types.AttributeToDeclaration =
-       Glean.Schema.Hack.Types.AttributeToDeclaration_key
-  getName _proxy = Glean.PredicateRef "hack.AttributeToDeclaration" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.attributeToDeclaration_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.AttributeToDeclaration x k
-  getFactKey = Glean.Schema.Hack.Types.attributeToDeclaration_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 2452 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.AttributeToDeclaration
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 2458 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.SearchModuleByName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.SearchModuleByName_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.SearchModuleByName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.SearchModuleByName_key" (Prelude.Just 0))
-{-# LINE 2467 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.SearchModuleByName_key =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "decl" (Glean.Schema.Hack.Types.Declaration)
-          ('Angle.TNoFields))
-{-# LINE 2469 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.SearchModuleByName
-         where
-  type KeyType Glean.Schema.Hack.Types.SearchModuleByName =
-       Glean.Schema.Hack.Types.SearchModuleByName_key
-  getName _proxy = Glean.PredicateRef "hack.SearchModuleByName" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.searchModuleByName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.SearchModuleByName x k
-  getFactKey = Glean.Schema.Hack.Types.searchModuleByName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 2478 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.SearchModuleByName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 2484 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.Type where
-  type KeyType Glean.Schema.Hack.Types.Type = Data.Text.Text
-  getName _proxy = Glean.PredicateRef "hack.Type" 6
-  getId = Glean.IdOf . Glean.Fid . Glean.Schema.Hack.Types.type_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.Type x k
-  getFactKey = Glean.Schema.Hack.Types.type_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 2492 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.Type where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 2498 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.ClassConstDefinition_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.ClassConstDefinition_key x1 x2 x3 x4)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.ClassConstDefinition_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.ClassConstDefinition_key" (Prelude.Just 0))
-{-# LINE 2511 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.ClassConstDefinition_key
-     =
-     'Angle.TField "declaration"
-       (Glean.KeyType Glean.Schema.Hack.Types.ClassConstDeclaration)
-       ('Angle.TField "type" (Prelude.Maybe Glean.Schema.Hack.Types.Type)
-          ('Angle.TField "value" (Prelude.Maybe Data.Text.Text)
-             ('Angle.TField "typeInfo"
-                (Prelude.Maybe Glean.Schema.Hack.Types.TypeInfo)
-                ('Angle.TNoFields))))
-{-# LINE 2513 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Hack.Types.ClassConstDefinition
-         where
-  type KeyType Glean.Schema.Hack.Types.ClassConstDefinition =
-       Glean.Schema.Hack.Types.ClassConstDefinition_key
-  getName _proxy = Glean.PredicateRef "hack.ClassConstDefinition" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.classConstDefinition_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.ClassConstDefinition x k
-  getFactKey = Glean.Schema.Hack.Types.classConstDefinition_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 2522 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.ClassConstDefinition
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 2528 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.GlobalConstDefinition_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.GlobalConstDefinition_key x1 x2 x3 x4)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.GlobalConstDefinition_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.GlobalConstDefinition_key" (Prelude.Just 0))
-{-# LINE 2541 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.Hack.Types.GlobalConstDefinition_key
-     =
-     'Angle.TField "declaration"
-       (Glean.KeyType Glean.Schema.Hack.Types.GlobalConstDeclaration)
-       ('Angle.TField "type" (Prelude.Maybe Glean.Schema.Hack.Types.Type)
-          ('Angle.TField "value" (Data.Text.Text)
-             ('Angle.TField "typeInfo"
-                (Prelude.Maybe Glean.Schema.Hack.Types.TypeInfo)
-                ('Angle.TNoFields))))
-{-# LINE 2543 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Hack.Types.GlobalConstDefinition
-         where
-  type KeyType Glean.Schema.Hack.Types.GlobalConstDefinition =
-       Glean.Schema.Hack.Types.GlobalConstDefinition_key
-  getName _proxy = Glean.PredicateRef "hack.GlobalConstDefinition" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.globalConstDefinition_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.GlobalConstDefinition x k
-  getFactKey = Glean.Schema.Hack.Types.globalConstDefinition_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 2552 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.GlobalConstDefinition
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 2558 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.SearchEnumeratorByName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.SearchEnumeratorByName_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.SearchEnumeratorByName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.SearchEnumeratorByName_key"
-           (Prelude.Just 0))
-{-# LINE 2569 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.Hack.Types.SearchEnumeratorByName_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "parent"
-          (Glean.KeyType Glean.Schema.Hack.Types.QName)
-          ('Angle.TField "decl" (Glean.Schema.Hack.Types.Declaration)
-             ('Angle.TNoFields)))
-{-# LINE 2571 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Hack.Types.SearchEnumeratorByName
-         where
-  type KeyType Glean.Schema.Hack.Types.SearchEnumeratorByName =
-       Glean.Schema.Hack.Types.SearchEnumeratorByName_key
-  getName _proxy = Glean.PredicateRef "hack.SearchEnumeratorByName" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.searchEnumeratorByName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.SearchEnumeratorByName x k
-  getFactKey = Glean.Schema.Hack.Types.searchEnumeratorByName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 2580 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.SearchEnumeratorByName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 2586 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.PropertyDeclaration_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.PropertyDeclaration_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.PropertyDeclaration_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.PropertyDeclaration_key" (Prelude.Just 0))
-{-# LINE 2595 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.PropertyDeclaration_key
-     =
-     'Angle.TField "name" (Glean.KeyType Glean.Schema.Hack.Types.Name)
-       ('Angle.TField "container"
-          (Glean.Schema.Hack.Types.ContainerDeclaration)
-          ('Angle.TNoFields))
-{-# LINE 2597 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Hack.Types.PropertyDeclaration
-         where
-  type KeyType Glean.Schema.Hack.Types.PropertyDeclaration =
-       Glean.Schema.Hack.Types.PropertyDeclaration_key
-  getName _proxy = Glean.PredicateRef "hack.PropertyDeclaration" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.propertyDeclaration_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.PropertyDeclaration x k
-  getFactKey = Glean.Schema.Hack.Types.propertyDeclaration_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 2606 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.PropertyDeclaration
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 2612 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.SearchTypedefByLowerCaseName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.SearchTypedefByLowerCaseName_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.SearchTypedefByLowerCaseName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.SearchTypedefByLowerCaseName_key"
-           (Prelude.Just 0))
-{-# LINE 2621 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.Hack.Types.SearchTypedefByLowerCaseName_key
-     =
-     'Angle.TField "name_lowercase" (Data.Text.Text)
-       ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields))
-{-# LINE 2623 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Hack.Types.SearchTypedefByLowerCaseName
-         where
-  type KeyType Glean.Schema.Hack.Types.SearchTypedefByLowerCaseName =
-       Glean.Schema.Hack.Types.SearchTypedefByLowerCaseName_key
-  getName _proxy
-    = Glean.PredicateRef "hack.SearchTypedefByLowerCaseName" 6
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Hack.Types.searchTypedefByLowerCaseName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.SearchTypedefByLowerCaseName x k
-  getFactKey
-    = Glean.Schema.Hack.Types.searchTypedefByLowerCaseName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 2632 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Hack.Types.SearchTypedefByLowerCaseName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 2638 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Hack.Types.Context_ where
-  type KeyType Glean.Schema.Hack.Types.Context_ = Data.Text.Text
-  getName _proxy = Glean.PredicateRef "hack.Context_" 6
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Hack.Types.context__id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Hack.Types.Context_ x k
-  getFactKey = Glean.Schema.Hack.Types.context__key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 2646 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.Context_ where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 2652 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.ShapeKV where
-  buildRtsValue b (Glean.Schema.Hack.Types.ShapeKV x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.ShapeKV <$> Glean.decodeRtsValue <*>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.ShapeKV" (Prelude.Just 6))
-{-# LINE 2663 "glean/schema/thrift/hack_include.hs" #-}
-type instance Angle.RecordFields Glean.Schema.Hack.Types.ShapeKV =
-     'Angle.TField "key" (Glean.Schema.Hack.Types.ShapeKV_key)
-       ('Angle.TField "value" (Glean.KeyType Glean.Schema.Hack.Types.Hint)
-          ('Angle.TField "opt" (Prelude.Bool) ('Angle.TNoFields)))
-{-# LINE 2665 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.Occurrence where
-  buildRtsValue b Glean.Schema.Hack.Types.Occurrence_EMPTY
-    = Glean.buildRtsSelector b 1
-  buildRtsValue b (Glean.Schema.Hack.Types.Occurrence_method x)
-    = do Glean.buildRtsSelector b 0
-         Glean.buildRtsValue b x
-  decodeRtsValue
-    = Glean.sumD
-        (Prelude.pure Glean.Schema.Hack.Types.Occurrence_EMPTY)
-        [Glean.mapD Glean.Schema.Hack.Types.Occurrence_method]
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.Occurrence" (Prelude.Just 6))
-{-# LINE 2677 "glean/schema/thrift/hack_include.hs" #-}
-type instance Angle.SumFields Glean.Schema.Hack.Types.Occurrence =
-     'Angle.TField "method"
-       (Glean.KeyType Glean.Schema.Hack.Types.MethodOccurrence)
-       ('Angle.TNoFields)
-{-# LINE 2679 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.ConstraintKind where
-  buildRtsValue = Glean.thriftEnum_buildRtsValue
-  decodeRtsValue = Glean.thriftEnumD
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.ConstraintKind" (Prelude.Just 6))
-{-# LINE 2684 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.SumFields Glean.Schema.Hack.Types.ConstraintKind =
-     'Angle.TField "As" (Glean.Schema.Builtin.Types.Unit)
-       ('Angle.TField "Equal" (Glean.Schema.Builtin.Types.Unit)
-          ('Angle.TField "Super" (Glean.Schema.Builtin.Types.Unit)
-             ('Angle.TNoFields)))
-{-# LINE 2686 "glean/schema/thrift/hack_include.hs" #-}
-instance Angle.AngleEnum Glean.Schema.Hack.Types.ConstraintKind
-         where
-  type AngleEnumTy Glean.Schema.Hack.Types.ConstraintKind =
-       Glean.Schema.Hack.Types.ConstraintKind
-  enumName v = Text.pack (Prelude.drop 15 (Prelude.show v))
-{-# LINE 2690 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.TypeConstKind where
-  buildRtsValue = Glean.thriftEnum_buildRtsValue
-  decodeRtsValue = Glean.thriftEnumD
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.TypeConstKind" (Prelude.Just 6))
-{-# LINE 2695 "glean/schema/thrift/hack_include.hs" #-}
-type instance Angle.SumFields Glean.Schema.Hack.Types.TypeConstKind
-     =
-     'Angle.TField "Abstract" (Glean.Schema.Builtin.Types.Unit)
-       ('Angle.TField "Concrete" (Glean.Schema.Builtin.Types.Unit)
-          ('Angle.TField "PartiallyAbstract"
-             (Glean.Schema.Builtin.Types.Unit)
-             ('Angle.TNoFields)))
-{-# LINE 2697 "glean/schema/thrift/hack_include.hs" #-}
-instance Angle.AngleEnum Glean.Schema.Hack.Types.TypeConstKind
-         where
-  type AngleEnumTy Glean.Schema.Hack.Types.TypeConstKind =
-       Glean.Schema.Hack.Types.TypeConstKind
-  enumName v = Text.pack (Prelude.drop 14 (Prelude.show v))
-{-# LINE 2701 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.FieldClassConst where
-  buildRtsValue b (Glean.Schema.Hack.Types.FieldClassConst x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.FieldClassConst <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.FieldClassConst" (Prelude.Just 6))
-{-# LINE 2710 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.FieldClassConst =
-     'Angle.TField "container"
-       (Glean.KeyType Glean.Schema.Hack.Types.QName)
-       ('Angle.TField "name" (Glean.KeyType Glean.Schema.Hack.Types.Name)
-          ('Angle.TNoFields))
-{-# LINE 2712 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.CallArgument where
-  buildRtsValue b (Glean.Schema.Hack.Types.CallArgument x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.CallArgument <$> Glean.decodeRtsValue <*>
-        Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.CallArgument" (Prelude.Just 6))
-{-# LINE 2721 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.CallArgument =
-     'Angle.TField "span" (Glean.Schema.Src.Types.RelByteSpan)
-       ('Angle.TField "argument"
-          (Prelude.Maybe Glean.Schema.Hack.Types.Argument)
-          ('Angle.TNoFields))
-{-# LINE 2723 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.Constraint where
-  buildRtsValue b (Glean.Schema.Hack.Types.Constraint x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.Constraint <$> Glean.decodeRtsValue <*>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.Constraint" (Prelude.Just 6))
-{-# LINE 2734 "glean/schema/thrift/hack_include.hs" #-}
-type instance Angle.RecordFields Glean.Schema.Hack.Types.Constraint
-     =
-     'Angle.TField "constraintKind"
-       (Glean.Schema.Hack.Types.ConstraintKind)
-       ('Angle.TField "type" (Glean.KeyType Glean.Schema.Hack.Types.Type)
-          ('Angle.TField "typeInfo"
-             (Prelude.Maybe Glean.Schema.Hack.Types.TypeInfo)
-             ('Angle.TNoFields)))
-{-# LINE 2736 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.Definition where
-  buildRtsValue b Glean.Schema.Hack.Types.Definition_EMPTY
-    = Glean.buildRtsSelector b 12
-  buildRtsValue b (Glean.Schema.Hack.Types.Definition_class_ x)
-    = do Glean.buildRtsSelector b 0
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Hack.Types.Definition_classConst x)
-    = do Glean.buildRtsSelector b 1
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Hack.Types.Definition_enum_ x)
-    = do Glean.buildRtsSelector b 2
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Hack.Types.Definition_function_ x)
-    = do Glean.buildRtsSelector b 3
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Hack.Types.Definition_globalConst x)
-    = do Glean.buildRtsSelector b 4
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Hack.Types.Definition_interface_ x)
-    = do Glean.buildRtsSelector b 5
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Hack.Types.Definition_trait x)
-    = do Glean.buildRtsSelector b 6
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Hack.Types.Definition_method x)
-    = do Glean.buildRtsSelector b 7
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Hack.Types.Definition_property_ x)
-    = do Glean.buildRtsSelector b 8
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Hack.Types.Definition_typeConst x)
-    = do Glean.buildRtsSelector b 9
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Hack.Types.Definition_typedef_ x)
-    = do Glean.buildRtsSelector b 10
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Hack.Types.Definition_module x)
-    = do Glean.buildRtsSelector b 11
-         Glean.buildRtsValue b x
-  decodeRtsValue
-    = Glean.sumD
-        (Prelude.pure Glean.Schema.Hack.Types.Definition_EMPTY)
-        [Glean.mapD Glean.Schema.Hack.Types.Definition_class_,
-         Glean.mapD Glean.Schema.Hack.Types.Definition_classConst,
-         Glean.mapD Glean.Schema.Hack.Types.Definition_enum_,
-         Glean.mapD Glean.Schema.Hack.Types.Definition_function_,
-         Glean.mapD Glean.Schema.Hack.Types.Definition_globalConst,
-         Glean.mapD Glean.Schema.Hack.Types.Definition_interface_,
-         Glean.mapD Glean.Schema.Hack.Types.Definition_trait,
-         Glean.mapD Glean.Schema.Hack.Types.Definition_method,
-         Glean.mapD Glean.Schema.Hack.Types.Definition_property_,
-         Glean.mapD Glean.Schema.Hack.Types.Definition_typeConst,
-         Glean.mapD Glean.Schema.Hack.Types.Definition_typedef_,
-         Glean.mapD Glean.Schema.Hack.Types.Definition_module]
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.Definition" (Prelude.Just 6))
-{-# LINE 2792 "glean/schema/thrift/hack_include.hs" #-}
-type instance Angle.SumFields Glean.Schema.Hack.Types.Definition =
-     'Angle.TField "class_"
-       (Glean.KeyType Glean.Schema.Hack.Types.ClassDefinition)
-       ('Angle.TField "classConst"
-          (Glean.KeyType Glean.Schema.Hack.Types.ClassConstDefinition)
-          ('Angle.TField "enum_"
-             (Glean.KeyType Glean.Schema.Hack.Types.EnumDefinition)
-             ('Angle.TField "function_"
-                (Glean.KeyType Glean.Schema.Hack.Types.FunctionDefinition)
-                ('Angle.TField "globalConst"
-                   (Glean.KeyType Glean.Schema.Hack.Types.GlobalConstDefinition)
-                   ('Angle.TField "interface_"
-                      (Glean.KeyType Glean.Schema.Hack.Types.InterfaceDefinition)
-                      ('Angle.TField "trait"
-                         (Glean.KeyType Glean.Schema.Hack.Types.TraitDefinition)
-                         ('Angle.TField "method"
-                            (Glean.KeyType Glean.Schema.Hack.Types.MethodDefinition)
-                            ('Angle.TField "property_"
-                               (Glean.KeyType Glean.Schema.Hack.Types.PropertyDefinition)
-                               ('Angle.TField "typeConst"
-                                  (Glean.KeyType Glean.Schema.Hack.Types.TypeConstDefinition)
-                                  ('Angle.TField "typedef_"
-                                     (Glean.KeyType Glean.Schema.Hack.Types.TypedefDefinition)
-                                     ('Angle.TField "module"
-                                        (Glean.KeyType Glean.Schema.Hack.Types.ModuleDefinition)
-                                        ('Angle.TNoFields))))))))))))
-{-# LINE 2794 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.ReifyKind where
-  buildRtsValue = Glean.thriftEnum_buildRtsValue
-  decodeRtsValue = Glean.thriftEnumD
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.ReifyKind" (Prelude.Just 6))
-{-# LINE 2799 "glean/schema/thrift/hack_include.hs" #-}
-type instance Angle.SumFields Glean.Schema.Hack.Types.ReifyKind =
-     'Angle.TField "Erased" (Glean.Schema.Builtin.Types.Unit)
-       ('Angle.TField "Reified" (Glean.Schema.Builtin.Types.Unit)
-          ('Angle.TField "SoftReified" (Glean.Schema.Builtin.Types.Unit)
-             ('Angle.TNoFields)))
-{-# LINE 2801 "glean/schema/thrift/hack_include.hs" #-}
-instance Angle.AngleEnum Glean.Schema.Hack.Types.ReifyKind where
-  type AngleEnumTy Glean.Schema.Hack.Types.ReifyKind =
-       Glean.Schema.Hack.Types.ReifyKind
-  enumName v = Text.pack (Prelude.drop 10 (Prelude.show v))
-{-# LINE 2805 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.XRef where
-  buildRtsValue b (Glean.Schema.Hack.Types.XRef x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.XRef <$> Glean.decodeRtsValue <*>
-        Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy () (Angle.SourceRef "hack.XRef" (Prelude.Just 6))
-{-# LINE 2814 "glean/schema/thrift/hack_include.hs" #-}
-type instance Angle.RecordFields Glean.Schema.Hack.Types.XRef =
-     'Angle.TField "target" (Glean.Schema.Hack.Types.XRefTarget)
-       ('Angle.TField "ranges" ([Glean.Schema.Src.Types.RelByteSpan])
-          ('Angle.TNoFields))
-{-# LINE 2816 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.Parameter where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.Parameter x1 x2 x3 x4 x5 x6 x7 x8)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-         Glean.buildRtsValue b x5
-         Glean.buildRtsValue b x6
-         Glean.buildRtsValue b x7
-         Glean.buildRtsValue b x8
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.Parameter <$> Glean.decodeRtsValue <*>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.Parameter" (Prelude.Just 6))
-{-# LINE 2837 "glean/schema/thrift/hack_include.hs" #-}
-type instance Angle.RecordFields Glean.Schema.Hack.Types.Parameter
-     =
-     'Angle.TField "name" (Glean.KeyType Glean.Schema.Hack.Types.Name)
-       ('Angle.TField "type" (Prelude.Maybe Glean.Schema.Hack.Types.Type)
-          ('Angle.TField "isInout" (Prelude.Bool)
-             ('Angle.TField "isVariadic" (Prelude.Bool)
-                ('Angle.TField "defaultValue" (Prelude.Maybe Data.Text.Text)
-                   ('Angle.TField "attributes"
-                      ([Glean.Schema.Hack.Types.UserAttribute])
-                      ('Angle.TField "typeInfo"
-                         (Prelude.Maybe Glean.Schema.Hack.Types.TypeInfo)
-                         ('Angle.TField "readonly"
-                            (Prelude.Maybe Glean.Schema.Hack.Types.ReadonlyKind)
-                            ('Angle.TNoFields))))))))
-{-# LINE 2839 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.ModuleMembership where
-  buildRtsValue b (Glean.Schema.Hack.Types.ModuleMembership x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.ModuleMembership <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.ModuleMembership" (Prelude.Just 6))
-{-# LINE 2848 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.ModuleMembership =
-     'Angle.TField "declaration"
-       (Glean.KeyType Glean.Schema.Hack.Types.ModuleDeclaration)
-       ('Angle.TField "internal" (Prelude.Bool) ('Angle.TNoFields))
-{-# LINE 2850 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.ReadonlyKind where
-  buildRtsValue = Glean.thriftEnum_buildRtsValue
-  decodeRtsValue = Glean.thriftEnumD
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.ReadonlyKind" (Prelude.Just 6))
-{-# LINE 2855 "glean/schema/thrift/hack_include.hs" #-}
-type instance Angle.SumFields Glean.Schema.Hack.Types.ReadonlyKind
-     =
-     'Angle.TField "Readonly" (Glean.Schema.Builtin.Types.Unit)
-       ('Angle.TNoFields)
-{-# LINE 2857 "glean/schema/thrift/hack_include.hs" #-}
-instance Angle.AngleEnum Glean.Schema.Hack.Types.ReadonlyKind where
-  type AngleEnumTy Glean.Schema.Hack.Types.ReadonlyKind =
-       Glean.Schema.Hack.Types.ReadonlyKind
-  enumName v = Text.pack (Prelude.drop 13 (Prelude.show v))
-{-# LINE 2861 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.XRefTarget where
-  buildRtsValue b Glean.Schema.Hack.Types.XRefTarget_EMPTY
-    = Glean.buildRtsSelector b 2
-  buildRtsValue b (Glean.Schema.Hack.Types.XRefTarget_declaration x)
-    = do Glean.buildRtsSelector b 0
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Hack.Types.XRefTarget_occurrence x)
-    = do Glean.buildRtsSelector b 1
-         Glean.buildRtsValue b x
-  decodeRtsValue
-    = Glean.sumD
-        (Prelude.pure Glean.Schema.Hack.Types.XRefTarget_EMPTY)
-        [Glean.mapD Glean.Schema.Hack.Types.XRefTarget_declaration,
-         Glean.mapD Glean.Schema.Hack.Types.XRefTarget_occurrence]
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.XRefTarget" (Prelude.Just 6))
-{-# LINE 2877 "glean/schema/thrift/hack_include.hs" #-}
-type instance Angle.SumFields Glean.Schema.Hack.Types.XRefTarget =
-     'Angle.TField "declaration" (Glean.Schema.Hack.Types.Declaration)
-       ('Angle.TField "occurrence" (Glean.Schema.Hack.Types.Occurrence)
-          ('Angle.TNoFields))
-{-# LINE 2879 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.TypeParameter where
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.TypeParameter x1 x2 x3 x4 x5)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-         Glean.buildRtsValue b x5
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.TypeParameter <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.TypeParameter" (Prelude.Just 6))
-{-# LINE 2894 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.TypeParameter =
-     'Angle.TField "name" (Glean.KeyType Glean.Schema.Hack.Types.Name)
-       ('Angle.TField "variance" (Glean.Schema.Hack.Types.Variance)
-          ('Angle.TField "reifyKind" (Glean.Schema.Hack.Types.ReifyKind)
-             ('Angle.TField "constraints" ([Glean.Schema.Hack.Types.Constraint])
-                ('Angle.TField "attributes"
-                   ([Glean.Schema.Hack.Types.UserAttribute])
-                   ('Angle.TNoFields)))))
-{-# LINE 2896 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.ContainerDeclaration
-         where
-  buildRtsValue b Glean.Schema.Hack.Types.ContainerDeclaration_EMPTY
-    = Glean.buildRtsSelector b 4
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.ContainerDeclaration_class_ x)
-    = do Glean.buildRtsSelector b 0
-         Glean.buildRtsValue b x
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.ContainerDeclaration_enum_ x)
-    = do Glean.buildRtsSelector b 1
-         Glean.buildRtsValue b x
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.ContainerDeclaration_interface_ x)
-    = do Glean.buildRtsSelector b 2
-         Glean.buildRtsValue b x
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.ContainerDeclaration_trait x)
-    = do Glean.buildRtsSelector b 3
-         Glean.buildRtsValue b x
-  decodeRtsValue
-    = Glean.sumD
-        (Prelude.pure Glean.Schema.Hack.Types.ContainerDeclaration_EMPTY)
-        [Glean.mapD Glean.Schema.Hack.Types.ContainerDeclaration_class_,
-         Glean.mapD Glean.Schema.Hack.Types.ContainerDeclaration_enum_,
-         Glean.mapD Glean.Schema.Hack.Types.ContainerDeclaration_interface_,
-         Glean.mapD Glean.Schema.Hack.Types.ContainerDeclaration_trait]
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.ContainerDeclaration" (Prelude.Just 6))
-{-# LINE 2920 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.SumFields Glean.Schema.Hack.Types.ContainerDeclaration =
-     'Angle.TField "class_"
-       (Glean.KeyType Glean.Schema.Hack.Types.ClassDeclaration)
-       ('Angle.TField "enum_"
-          (Glean.KeyType Glean.Schema.Hack.Types.EnumDeclaration)
-          ('Angle.TField "interface_"
-             (Glean.KeyType Glean.Schema.Hack.Types.InterfaceDeclaration)
-             ('Angle.TField "trait"
-                (Glean.KeyType Glean.Schema.Hack.Types.TraitDeclaration)
-                ('Angle.TNoFields))))
-{-# LINE 2922 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.Argument where
-  buildRtsValue b Glean.Schema.Hack.Types.Argument_EMPTY
-    = Glean.buildRtsSelector b 2
-  buildRtsValue b (Glean.Schema.Hack.Types.Argument_lit x)
-    = do Glean.buildRtsSelector b 0
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Hack.Types.Argument_xref x)
-    = do Glean.buildRtsSelector b 1
-         Glean.buildRtsValue b x
-  decodeRtsValue
-    = Glean.sumD (Prelude.pure Glean.Schema.Hack.Types.Argument_EMPTY)
-        [Glean.mapD Glean.Schema.Hack.Types.Argument_lit,
-         Glean.mapD Glean.Schema.Hack.Types.Argument_xref]
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.Argument" (Prelude.Just 6))
-{-# LINE 2938 "glean/schema/thrift/hack_include.hs" #-}
-type instance Angle.SumFields Glean.Schema.Hack.Types.Argument =
-     'Angle.TField "lit"
-       (Glean.KeyType Glean.Schema.Hack.Types.StringLiteral)
-       ('Angle.TField "xref" (Glean.Schema.Hack.Types.XRefTarget)
-          ('Angle.TNoFields))
-{-# LINE 2940 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.Variance where
-  buildRtsValue = Glean.thriftEnum_buildRtsValue
-  decodeRtsValue = Glean.thriftEnumD
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.Variance" (Prelude.Just 6))
-{-# LINE 2945 "glean/schema/thrift/hack_include.hs" #-}
-type instance Angle.SumFields Glean.Schema.Hack.Types.Variance =
-     'Angle.TField "Contravariant" (Glean.Schema.Builtin.Types.Unit)
-       ('Angle.TField "Covariant" (Glean.Schema.Builtin.Types.Unit)
-          ('Angle.TField "Invariant" (Glean.Schema.Builtin.Types.Unit)
-             ('Angle.TNoFields)))
-{-# LINE 2947 "glean/schema/thrift/hack_include.hs" #-}
-instance Angle.AngleEnum Glean.Schema.Hack.Types.Variance where
-  type AngleEnumTy Glean.Schema.Hack.Types.Variance =
-       Glean.Schema.Hack.Types.Variance
-  enumName v = Text.pack (Prelude.drop 9 (Prelude.show v))
-{-# LINE 2951 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.Visibility where
-  buildRtsValue = Glean.thriftEnum_buildRtsValue
-  decodeRtsValue = Glean.thriftEnumD
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.Visibility" (Prelude.Just 6))
-{-# LINE 2956 "glean/schema/thrift/hack_include.hs" #-}
-type instance Angle.SumFields Glean.Schema.Hack.Types.Visibility =
-     'Angle.TField "Private" (Glean.Schema.Builtin.Types.Unit)
-       ('Angle.TField "Protected" (Glean.Schema.Builtin.Types.Unit)
-          ('Angle.TField "Public" (Glean.Schema.Builtin.Types.Unit)
-             ('Angle.TField "Internal" (Glean.Schema.Builtin.Types.Unit)
-                ('Angle.TNoFields))))
-{-# LINE 2958 "glean/schema/thrift/hack_include.hs" #-}
-instance Angle.AngleEnum Glean.Schema.Hack.Types.Visibility where
-  type AngleEnumTy Glean.Schema.Hack.Types.Visibility =
-       Glean.Schema.Hack.Types.Visibility
-  enumName v = Text.pack (Prelude.drop 11 (Prelude.show v))
-{-# LINE 2962 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.Declaration where
-  buildRtsValue b Glean.Schema.Hack.Types.Declaration_EMPTY
-    = Glean.buildRtsSelector b 11
-  buildRtsValue b (Glean.Schema.Hack.Types.Declaration_classConst x)
-    = do Glean.buildRtsSelector b 0
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Hack.Types.Declaration_container x)
-    = do Glean.buildRtsSelector b 1
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Hack.Types.Declaration_enumerator x)
-    = do Glean.buildRtsSelector b 2
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Hack.Types.Declaration_function_ x)
-    = do Glean.buildRtsSelector b 3
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Hack.Types.Declaration_globalConst x)
-    = do Glean.buildRtsSelector b 4
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Hack.Types.Declaration_namespace_ x)
-    = do Glean.buildRtsSelector b 5
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Hack.Types.Declaration_method x)
-    = do Glean.buildRtsSelector b 6
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Hack.Types.Declaration_property_ x)
-    = do Glean.buildRtsSelector b 7
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Hack.Types.Declaration_typeConst x)
-    = do Glean.buildRtsSelector b 8
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Hack.Types.Declaration_typedef_ x)
-    = do Glean.buildRtsSelector b 9
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Hack.Types.Declaration_module x)
-    = do Glean.buildRtsSelector b 10
-         Glean.buildRtsValue b x
-  decodeRtsValue
-    = Glean.sumD
-        (Prelude.pure Glean.Schema.Hack.Types.Declaration_EMPTY)
-        [Glean.mapD Glean.Schema.Hack.Types.Declaration_classConst,
-         Glean.mapD Glean.Schema.Hack.Types.Declaration_container,
-         Glean.mapD Glean.Schema.Hack.Types.Declaration_enumerator,
-         Glean.mapD Glean.Schema.Hack.Types.Declaration_function_,
-         Glean.mapD Glean.Schema.Hack.Types.Declaration_globalConst,
-         Glean.mapD Glean.Schema.Hack.Types.Declaration_namespace_,
-         Glean.mapD Glean.Schema.Hack.Types.Declaration_method,
-         Glean.mapD Glean.Schema.Hack.Types.Declaration_property_,
-         Glean.mapD Glean.Schema.Hack.Types.Declaration_typeConst,
-         Glean.mapD Glean.Schema.Hack.Types.Declaration_typedef_,
-         Glean.mapD Glean.Schema.Hack.Types.Declaration_module]
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.Declaration" (Prelude.Just 6))
-{-# LINE 3014 "glean/schema/thrift/hack_include.hs" #-}
-type instance Angle.SumFields Glean.Schema.Hack.Types.Declaration =
-     'Angle.TField "classConst"
-       (Glean.KeyType Glean.Schema.Hack.Types.ClassConstDeclaration)
-       ('Angle.TField "container"
-          (Glean.Schema.Hack.Types.ContainerDeclaration)
-          ('Angle.TField "enumerator"
-             (Glean.KeyType Glean.Schema.Hack.Types.Enumerator)
-             ('Angle.TField "function_"
-                (Glean.KeyType Glean.Schema.Hack.Types.FunctionDeclaration)
-                ('Angle.TField "globalConst"
-                   (Glean.KeyType Glean.Schema.Hack.Types.GlobalConstDeclaration)
-                   ('Angle.TField "namespace_"
-                      (Glean.KeyType Glean.Schema.Hack.Types.NamespaceDeclaration)
-                      ('Angle.TField "method"
-                         (Glean.KeyType Glean.Schema.Hack.Types.MethodDeclaration)
-                         ('Angle.TField "property_"
-                            (Glean.KeyType Glean.Schema.Hack.Types.PropertyDeclaration)
-                            ('Angle.TField "typeConst"
-                               (Glean.KeyType Glean.Schema.Hack.Types.TypeConstDeclaration)
-                               ('Angle.TField "typedef_"
-                                  (Glean.KeyType Glean.Schema.Hack.Types.TypedefDeclaration)
-                                  ('Angle.TField "module"
-                                     (Glean.KeyType Glean.Schema.Hack.Types.ModuleDeclaration)
-                                     ('Angle.TNoFields)))))))))))
-{-# LINE 3016 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.Hint_apply_ where
-  buildRtsValue b (Glean.Schema.Hack.Types.Hint_apply_ x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.Hint_apply_ <$> Glean.decodeRtsValue <*>
-        Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.Hint_apply_" (Prelude.Just 0))
-{-# LINE 3025 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.Hint_apply_ =
-     'Angle.TField "class_name"
-       (Glean.KeyType Glean.Schema.Hack.Types.QName)
-       ('Angle.TField "values" ([Glean.Schema.Hack.Types.Hint])
-          ('Angle.TNoFields))
-{-# LINE 3027 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.Hint_tuple_ where
-  buildRtsValue b (Glean.Schema.Hack.Types.Hint_tuple_ x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.Hint_tuple_ <$> Glean.decodeRtsValue <*>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.Hint_tuple_" (Prelude.Just 0))
-{-# LINE 3038 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.Hint_tuple_ =
-     'Angle.TField "req" ([Glean.Schema.Hack.Types.Hint])
-       ('Angle.TField "opt" ([Glean.Schema.Hack.Types.Hint])
-          ('Angle.TField "variadic"
-             (Prelude.Maybe Glean.Schema.Hack.Types.Hint)
-             ('Angle.TNoFields)))
-{-# LINE 3040 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.Hint_shape_ where
-  buildRtsValue b (Glean.Schema.Hack.Types.Hint_shape_ x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.Hint_shape_ <$> Glean.decodeRtsValue <*>
-        Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.Hint_shape_" (Prelude.Just 0))
-{-# LINE 3049 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.Hint_shape_ =
-     'Angle.TField "open_" (Prelude.Bool)
-       ('Angle.TField "map_" ([Glean.Schema.Hack.Types.ShapeKV])
-          ('Angle.TNoFields))
-{-# LINE 3051 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.Hint_vect_or_dict_
-         where
-  buildRtsValue b (Glean.Schema.Hack.Types.Hint_vect_or_dict_ x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Hack.Types.Hint_vect_or_dict_ <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.Hint_vect_or_dict_" (Prelude.Just 0))
-{-# LINE 3060 "glean/schema/thrift/hack_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Hack.Types.Hint_vect_or_dict_ =
-     'Angle.TField "maybe_key"
-       (Prelude.Maybe Glean.Schema.Hack.Types.Hint)
-       ('Angle.TField "value_"
-          (Glean.KeyType Glean.Schema.Hack.Types.Hint)
-          ('Angle.TNoFields))
-{-# LINE 3062 "glean/schema/thrift/hack_include.hs" #-}
-instance Glean.Type Glean.Schema.Hack.Types.ShapeKV_key where
-  buildRtsValue b Glean.Schema.Hack.Types.ShapeKV_key_EMPTY
-    = Glean.buildRtsSelector b 3
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.ShapeKV_key_sf_regex_group x)
-    = do Glean.buildRtsSelector b 0
-         Glean.buildRtsValue b x
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.ShapeKV_key_sf_lit_string x)
-    = do Glean.buildRtsSelector b 1
-         Glean.buildRtsValue b x
-  buildRtsValue b
-    (Glean.Schema.Hack.Types.ShapeKV_key_sf_class_const x)
-    = do Glean.buildRtsSelector b 2
-         Glean.buildRtsValue b x
-  decodeRtsValue
-    = Glean.sumD
-        (Prelude.pure Glean.Schema.Hack.Types.ShapeKV_key_EMPTY)
-        [Glean.mapD Glean.Schema.Hack.Types.ShapeKV_key_sf_regex_group,
-         Glean.mapD Glean.Schema.Hack.Types.ShapeKV_key_sf_lit_string,
-         Glean.mapD Glean.Schema.Hack.Types.ShapeKV_key_sf_class_const]
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "hack.ShapeKV_key" (Prelude.Just 0))
-{-# LINE 3082 "glean/schema/thrift/hack_include.hs" #-}
+        Package__id, Package_(Package_, package__id, package__key),
+        NamespaceQName_id,
+        NamespaceQName(NamespaceQName, namespaceQName_id,
+                       namespaceQName_key),
+        NamespaceDeclaration_id,
+        NamespaceDeclaration(NamespaceDeclaration, namespaceDeclaration_id,
+                             namespaceDeclaration_key),
+        NameLowerCase_id,
+        NameLowerCase(NameLowerCase, nameLowerCase_id, nameLowerCase_key),
+        Name_id, Name(Name, name_id, name_key), ModuleDefinition_id,
+        ModuleDefinition(ModuleDefinition, moduleDefinition_id,
+                         moduleDefinition_key),
+        ModuleDeclaration_id,
+        ModuleDeclaration(ModuleDeclaration, moduleDeclaration_id,
+                          moduleDeclaration_key),
+        MethodOverrides_id,
+        MethodOverrides(MethodOverrides, methodOverrides_id,
+                        methodOverrides_key),
+        MethodOverridden_id,
+        MethodOverridden(MethodOverridden, methodOverridden_id,
+                         methodOverridden_key),
+        MethodOccurrence_id,
+        MethodOccurrence(MethodOccurrence, methodOccurrence_id,
+                         methodOccurrence_key),
+        InterfaceDeclaration_id,
+        InterfaceDeclaration(InterfaceDeclaration, interfaceDeclaration_id,
+                             interfaceDeclaration_key),
+        IndexerInputsHash_id,
+        IndexerInputsHash(IndexerInputsHash, indexerInputsHash_id,
+                          indexerInputsHash_key, indexerInputsHash_value),
+        GlobalNamespaceAlias_id,
+        GlobalNamespaceAlias(GlobalNamespaceAlias, globalNamespaceAlias_id,
+                             globalNamespaceAlias_key),
+        GlobalConstDefinition_id,
+        GlobalConstDefinition(GlobalConstDefinition,
+                              globalConstDefinition_id, globalConstDefinition_key),
+        GlobalConstDeclaration_id,
+        GlobalConstDeclaration(GlobalConstDeclaration,
+                               globalConstDeclaration_id, globalConstDeclaration_key),
+        FunctionDeclaration_id,
+        FunctionDeclaration(FunctionDeclaration, functionDeclaration_id,
+                            functionDeclaration_key),
+        FilePackage_id,
+        FilePackage(FilePackage, filePackage_id, filePackage_key),
+        FileHasRedundantPackageOverride_id,
+        FileHasRedundantPackageOverride(FileHasRedundantPackageOverride,
+                                        fileHasRedundantPackageOverride_id,
+                                        fileHasRedundantPackageOverride_key),
+        FileHasPackageOverride_id,
+        FileHasPackageOverride(FileHasPackageOverride,
+                               fileHasPackageOverride_id, fileHasPackageOverride_key),
+        Hint_id, Hint(Hint, hint_id, hint_key), Enumerator_id,
+        Enumerator(Enumerator, enumerator_id, enumerator_key),
+        EnumDefinition_id,
+        EnumDefinition(EnumDefinition, enumDefinition_id,
+                       enumDefinition_key),
+        EnumDeclaration_id,
+        EnumDeclaration(EnumDeclaration, enumDeclaration_id,
+                        enumDeclaration_key),
+        Context__id, Context_(Context_, context__id, context__key),
+        ContainerDeclarationQName_id,
+        ContainerDeclarationQName(ContainerDeclarationQName,
+                                  containerDeclarationQName_id, containerDeclarationQName_key,
+                                  containerDeclarationQName_value),
+        ContainerParent_id,
+        ContainerParent(ContainerParent, containerParent_id,
+                        containerParent_key),
+        DeclarationComment_id,
+        DeclarationComment(DeclarationComment, declarationComment_id,
+                           declarationComment_key),
+        DeclarationLocation_id,
+        DeclarationLocation(DeclarationLocation, declarationLocation_id,
+                            declarationLocation_key),
+        DeclarationName_id,
+        DeclarationName(DeclarationName, declarationName_id,
+                        declarationName_key, declarationName_value),
+        DeclarationNamespace_id,
+        DeclarationNamespace(DeclarationNamespace, declarationNamespace_id,
+                             declarationNamespace_key),
+        DeclarationSource_id,
+        DeclarationSource(DeclarationSource, declarationSource_id,
+                          declarationSource_key),
+        DeclarationSpan_id,
+        DeclarationSpan(DeclarationSpan, declarationSpan_id,
+                        declarationSpan_key),
+        DeclarationTarget_id,
+        DeclarationTarget(DeclarationTarget, declarationTarget_id,
+                          declarationTarget_key),
+        DefinitionToDeclaration_id,
+        DefinitionToDeclaration(DefinitionToDeclaration,
+                                definitionToDeclaration_id, definitionToDeclaration_key),
+        FileDeclarations_id,
+        FileDeclarations(FileDeclarations, fileDeclarations_id,
+                         fileDeclarations_key),
+        HackToThrift_id,
+        HackToThrift(HackToThrift, hackToThrift_id, hackToThrift_key),
+        MemberCluster_id,
+        MemberCluster(MemberCluster, memberCluster_id, memberCluster_key),
+        ModuleChild_id,
+        ModuleChild(ModuleChild, moduleChild_id, moduleChild_key),
+        ModuleParent_id,
+        ModuleParent(ModuleParent, moduleParent_id, moduleParent_key),
+        NamespaceMember_id,
+        NamespaceMember(NamespaceMember, namespaceMember_id,
+                        namespaceMember_key),
+        SearchClassByName_id,
+        SearchClassByName(SearchClassByName, searchClassByName_id,
+                          searchClassByName_key),
+        SearchClassConstByName_id,
+        SearchClassConstByName(SearchClassConstByName,
+                               searchClassConstByName_id, searchClassConstByName_key),
+        SearchEnumByName_id,
+        SearchEnumByName(SearchEnumByName, searchEnumByName_id,
+                         searchEnumByName_key),
+        SearchEnumeratorByName_id,
+        SearchEnumeratorByName(SearchEnumeratorByName,
+                               searchEnumeratorByName_id, searchEnumeratorByName_key),
+        SearchFunctionByName_id,
+        SearchFunctionByName(SearchFunctionByName, searchFunctionByName_id,
+                             searchFunctionByName_key),
+        SearchGlobalConstByName_id,
+        SearchGlobalConstByName(SearchGlobalConstByName,
+                                searchGlobalConstByName_id, searchGlobalConstByName_key),
+        SearchInterfaceByName_id,
+        SearchInterfaceByName(SearchInterfaceByName,
+                              searchInterfaceByName_id, searchInterfaceByName_key),
+        SearchMethodByName_id,
+        SearchMethodByName(SearchMethodByName, searchMethodByName_id,
+                           searchMethodByName_key),
+        SearchModuleByName_id,
+        SearchModuleByName(SearchModuleByName, searchModuleByName_id,
+                           searchModuleByName_key),
+        SearchNamespaceByName_id,
+        SearchNamespaceByName(SearchNamespaceByName,
+                              searchNamespaceByName_id, searchNamespaceByName_key),
+        SearchPropertyByName_id,
+        SearchPropertyByName(SearchPropertyByName, searchPropertyByName_id,
+                             searchPropertyByName_key),
+        SearchTraitByName_id,
+        SearchTraitByName(SearchTraitByName, searchTraitByName_id,
+                          searchTraitByName_key),
+        SearchTypeConstByName_id,
+        SearchTypeConstByName(SearchTypeConstByName,
+                              searchTypeConstByName_id, searchTypeConstByName_key),
+        SearchTypedefByName_id,
+        SearchTypedefByName(SearchTypedefByName, searchTypedefByName_id,
+                            searchTypedefByName_key),
+        ThriftToHack_id,
+        ThriftToHack(ThriftToHack, thriftToHack_id, thriftToHack_key),
+        TargetUses_id,
+        TargetUses(TargetUses, targetUses_id, targetUses_key),
+        TargetUsesAbs_id,
+        TargetUsesAbs(TargetUsesAbs, targetUsesAbs_id, targetUsesAbs_key),
+        FileXRefs_id, FileXRefs(FileXRefs, fileXRefs_id, fileXRefs_key),
+        TypeInfo_id, TypeInfo(TypeInfo, typeInfo_id, typeInfo_key),
+        InheritedMembers_id,
+        InheritedMembers(InheritedMembers, inheritedMembers_id,
+                         inheritedMembers_key),
+        MethodDeclaration_id,
+        MethodDeclaration(MethodDeclaration, methodDeclaration_id,
+                          methodDeclaration_key),
+        PropertyDeclaration_id,
+        PropertyDeclaration(PropertyDeclaration, propertyDeclaration_id,
+                            propertyDeclaration_key),
+        TypeConstDeclaration_id,
+        TypeConstDeclaration(TypeConstDeclaration, typeConstDeclaration_id,
+                             typeConstDeclaration_key),
+        ContainerChild_id,
+        ContainerChild(ContainerChild, containerChild_id,
+                       containerChild_key),
+        FunctionDefinition_id,
+        FunctionDefinition(FunctionDefinition, functionDefinition_id,
+                           functionDefinition_key),
+        InterfaceDefinition_id,
+        InterfaceDefinition(InterfaceDefinition, interfaceDefinition_id,
+                            interfaceDefinition_key),
+        MethodDefinition_id,
+        MethodDefinition(MethodDefinition, methodDefinition_id,
+                         methodDefinition_key),
+        TraitDefinition_id,
+        TraitDefinition(TraitDefinition, traitDefinition_id,
+                        traitDefinition_key),
+        TypedefDefinition_id,
+        TypedefDefinition(TypedefDefinition, typedefDefinition_id,
+                          typedefDefinition_key),
+        ClassDefinition_id,
+        ClassDefinition(ClassDefinition, classDefinition_id,
+                        classDefinition_key),
+        ClassDeclaration_id,
+        ClassDeclaration(ClassDeclaration, classDeclaration_id,
+                         classDeclaration_key),
+        ClassConstDefinition_id,
+        ClassConstDefinition(ClassConstDefinition, classConstDefinition_id,
+                             classConstDefinition_key),
+        ClassConstDeclaration_id,
+        ClassConstDeclaration(ClassConstDeclaration,
+                              classConstDeclaration_id, classConstDeclaration_key),
+        AttributeToDefinition_id,
+        AttributeToDefinition(AttributeToDefinition,
+                              attributeToDefinition_id, attributeToDefinition_key),
+        AttributeToDeclaration_id,
+        AttributeToDeclaration(AttributeToDeclaration,
+                               attributeToDeclaration_id, attributeToDeclaration_key),
+        AttributeHasParameter_id,
+        AttributeHasParameter(AttributeHasParameter,
+                              attributeHasParameter_id, attributeHasParameter_key),
+        FileCall_id, FileCall(FileCall, fileCall_id, fileCall_key),
+        Visibility(Visibility_Private, Visibility_Protected,
+                   Visibility_Public, Visibility_Internal,
+                   Visibility_ProtectedInternal, Visibility__UNKNOWN),
+        Variance(Variance_Contravariant, Variance_Covariant,
+                 Variance_Invariant, Variance__UNKNOWN),
+        UserAttribute_key(UserAttribute_key, userAttribute_key_name,
+                          userAttribute_key_parameters, userAttribute_key_qname),
+        TypedefDeclaration_key(TypedefDeclaration_key,
+                               typedefDeclaration_key_name),
+        TypeConstKind(TypeConstKind_Abstract, TypeConstKind_Concrete,
+                      TypeConstKind_PartiallyAbstract, TypeConstKind__UNKNOWN),
+        TypeConstDefinition_key(TypeConstDefinition_key,
+                                typeConstDefinition_key_declaration, typeConstDefinition_key_type,
+                                typeConstDefinition_key_kind, typeConstDefinition_key_attributes,
+                                typeConstDefinition_key_typeInfo),
+        TraitDeclaration_key(TraitDeclaration_key,
+                             traitDeclaration_key_name),
+        SearchTypedefByLowerCaseName_key(SearchTypedefByLowerCaseName_key,
+                                         searchTypedefByLowerCaseName_key_name_lowercase,
+                                         searchTypedefByLowerCaseName_key_name),
+        SearchTypeConstByLowerCaseName_key(SearchTypeConstByLowerCaseName_key,
+                                           searchTypeConstByLowerCaseName_key_name_lowercase,
+                                           searchTypeConstByLowerCaseName_key_name),
+        SearchTraitByLowerCaseName_key(SearchTraitByLowerCaseName_key,
+                                       searchTraitByLowerCaseName_key_name_lowercase,
+                                       searchTraitByLowerCaseName_key_name),
+        SearchPropertyByLowerCaseName_key(SearchPropertyByLowerCaseName_key,
+                                          searchPropertyByLowerCaseName_key_name_lowercase,
+                                          searchPropertyByLowerCaseName_key_name),
+        SearchNamespaceByLowerCaseName_key(SearchNamespaceByLowerCaseName_key,
+                                           searchNamespaceByLowerCaseName_key_name_lowercase,
+                                           searchNamespaceByLowerCaseName_key_name),
+        SearchModuleByLowerCaseName_key(SearchModuleByLowerCaseName_key,
+                                        searchModuleByLowerCaseName_key_name_lowercase,
+                                        searchModuleByLowerCaseName_key_name),
+        SearchMethodByLowerCaseName_key(SearchMethodByLowerCaseName_key,
+                                        searchMethodByLowerCaseName_key_name_lowercase,
+                                        searchMethodByLowerCaseName_key_name),
+        SearchInterfaceByLowerCaseName_key(SearchInterfaceByLowerCaseName_key,
+                                           searchInterfaceByLowerCaseName_key_name_lowercase,
+                                           searchInterfaceByLowerCaseName_key_name),
+        SearchGlobalConstByLowerCaseName_key(SearchGlobalConstByLowerCaseName_key,
+                                             searchGlobalConstByLowerCaseName_key_name_lowercase,
+                                             searchGlobalConstByLowerCaseName_key_name),
+        SearchFunctionByLowerCaseName_key(SearchFunctionByLowerCaseName_key,
+                                          searchFunctionByLowerCaseName_key_name_lowercase,
+                                          searchFunctionByLowerCaseName_key_name),
+        SearchEnumeratorByLowerCaseName_key(SearchEnumeratorByLowerCaseName_key,
+                                            searchEnumeratorByLowerCaseName_key_name_lowercase,
+                                            searchEnumeratorByLowerCaseName_key_name),
+        SearchEnumByLowerCaseName_key(SearchEnumByLowerCaseName_key,
+                                      searchEnumByLowerCaseName_key_name_lowercase,
+                                      searchEnumByLowerCaseName_key_name),
+        SearchClassConstByLowerCaseName_key(SearchClassConstByLowerCaseName_key,
+                                            searchClassConstByLowerCaseName_key_name_lowercase,
+                                            searchClassConstByLowerCaseName_key_name),
+        SearchClassByLowerCaseName_key(SearchClassByLowerCaseName_key,
+                                       searchClassByLowerCaseName_key_name_lowercase,
+                                       searchClassByLowerCaseName_key_name),
+        ReifyKind(ReifyKind_Erased, ReifyKind_Reified,
+                  ReifyKind_SoftReified, ReifyKind__UNKNOWN),
+        ReadonlyKind(ReadonlyKind_Readonly, ReadonlyKind__UNKNOWN),
+        QName_key(QName_key, qName_key_name, qName_key_namespace_),
+        PropertyDefinition_key(PropertyDefinition_key,
+                               propertyDefinition_key_declaration, propertyDefinition_key_type,
+                               propertyDefinition_key_visibility, propertyDefinition_key_isFinal,
+                               propertyDefinition_key_isAbstract, propertyDefinition_key_isStatic,
+                               propertyDefinition_key_attributes,
+                               propertyDefinition_key_typeInfo),
+        Parameter(Parameter, parameter_name, parameter_type,
+                  parameter_isInout, parameter_isVariadic, parameter_defaultValue,
+                  parameter_attributes, parameter_typeInfo, parameter_readonly),
+        Signature_key(Signature_key, signature_key_returns,
+                      signature_key_parameters, signature_key_contexts,
+                      signature_key_returnsTypeInfo),
+        Occurrence(Occurrence_EMPTY, Occurrence_method),
+        NamespaceQName_key(NamespaceQName_key, namespaceQName_key_name,
+                           namespaceQName_key_parent),
+        NamespaceDeclaration_key(NamespaceDeclaration_key,
+                                 namespaceDeclaration_key_name),
+        NameLowerCase_key(NameLowerCase_key,
+                          nameLowerCase_key_nameLowercase, nameLowerCase_key_name),
+        ModuleMembership(ModuleMembership, moduleMembership_declaration,
+                         moduleMembership_internal),
+        ModuleDefinition_key(ModuleDefinition_key,
+                             moduleDefinition_key_declaration, moduleDefinition_key_attributes),
+        ModuleDeclaration_key(ModuleDeclaration_key,
+                              moduleDeclaration_key_name),
+        MethodOverrides_key(MethodOverrides_key,
+                            methodOverrides_key_derived, methodOverrides_key_base,
+                            methodOverrides_key_annotation),
+        MethodOverridden_key(MethodOverridden_key,
+                             methodOverridden_key_base, methodOverridden_key_derived,
+                             methodOverridden_key_annotation),
+        MethodOccurrence_key(MethodOccurrence_key,
+                             methodOccurrence_key_name, methodOccurrence_key_className),
+        InterfaceDeclaration_key(InterfaceDeclaration_key,
+                                 interfaceDeclaration_key_name),
+        IndexerInputsHash_value,
+        GlobalNamespaceAlias_key(GlobalNamespaceAlias_key,
+                                 globalNamespaceAlias_key_from, globalNamespaceAlias_key_to),
+        GlobalConstDefinition_key(GlobalConstDefinition_key,
+                                  globalConstDefinition_key_declaration,
+                                  globalConstDefinition_key_type, globalConstDefinition_key_value,
+                                  globalConstDefinition_key_typeInfo),
+        GlobalConstDeclaration_key(GlobalConstDeclaration_key,
+                                   globalConstDeclaration_key_name),
+        FunctionDeclaration_key(FunctionDeclaration_key,
+                                functionDeclaration_key_name),
+        FilePackage_key(FilePackage_key, filePackage_key_file,
+                        filePackage_key_package_, filePackage_key_hasPackageOverride),
+        FieldClassConst(FieldClassConst, fieldClassConst_container,
+                        fieldClassConst_name),
+        ShapeKV_key(ShapeKV_key_EMPTY, ShapeKV_key_sf_regex_group,
+                    ShapeKV_key_sf_lit_string, ShapeKV_key_sf_class_const),
+        ShapeKV(ShapeKV, shapeKV_key, shapeKV_value, shapeKV_opt),
+        Hint_apply_(Hint_apply_, hint_apply__class_name,
+                    hint_apply__values),
+        Hint_tuple_(Hint_tuple_, hint_tuple__req, hint_tuple__opt,
+                    hint_tuple__variadic),
+        Hint_shape_(Hint_shape_, hint_shape__open_, hint_shape__map_),
+        Hint_vect_or_dict_(Hint_vect_or_dict_,
+                           hint_vect_or_dict__maybe_key, hint_vect_or_dict__value_),
+        Hint_key(Hint_key_EMPTY, Hint_key_apply, Hint_key_option,
+                 Hint_key_like, Hint_key_tuple, Hint_key_class_args, Hint_key_shape,
+                 Hint_key_soft, Hint_key_intersection, Hint_key_union_,
+                 Hint_key_vect_or_dict, Hint_key_prim, Hint_key_var_,
+                 Hint_key_fun_context, Hint_key_mixed, Hint_key_wildcard,
+                 Hint_key_nonnull, Hint_key_this_, Hint_key_dynamic,
+                 Hint_key_nothing, Hint_key_other),
+        Enumerator_key(Enumerator_key, enumerator_key_name,
+                       enumerator_key_enumeration),
+        EnumDefinition_key(EnumDefinition_key,
+                           enumDefinition_key_declaration, enumDefinition_key_enumBase,
+                           enumDefinition_key_enumBaseTypeInfo,
+                           enumDefinition_key_enumConstraint,
+                           enumDefinition_key_enumConstraintTypeInfo,
+                           enumDefinition_key_enumerators, enumDefinition_key_attributes,
+                           enumDefinition_key_includes, enumDefinition_key_isEnumClass,
+                           enumDefinition_key_module_),
+        EnumDeclaration_key(EnumDeclaration_key, enumDeclaration_key_name),
+        Definition(Definition_EMPTY, Definition_class_,
+                   Definition_classConst, Definition_enum_, Definition_function_,
+                   Definition_globalConst, Definition_interface_, Definition_trait,
+                   Definition_method, Definition_property_, Definition_typeConst,
+                   Definition_typedef_, Definition_module),
+        ContainerDeclaration(ContainerDeclaration_EMPTY,
+                             ContainerDeclaration_class_, ContainerDeclaration_enum_,
+                             ContainerDeclaration_interface_, ContainerDeclaration_trait),
+        ContainerDeclarationQName_value,
+        ContainerParent_key(ContainerParent_key,
+                            containerParent_key_container, containerParent_key_parent),
+        Declaration(Declaration_EMPTY, Declaration_classConst,
+                    Declaration_container, Declaration_enumerator,
+                    Declaration_function_, Declaration_globalConst,
+                    Declaration_namespace_, Declaration_method, Declaration_property_,
+                    Declaration_typeConst, Declaration_typedef_, Declaration_module),
+        DeclarationComment_key(DeclarationComment_key,
+                               declarationComment_key_declaration, declarationComment_key_file,
+                               declarationComment_key_span),
+        DeclarationLocation_key(DeclarationLocation_key,
+                                declarationLocation_key_declaration, declarationLocation_key_file,
+                                declarationLocation_key_span),
+        DeclarationName_value,
+        DeclarationNamespace_key(DeclarationNamespace_key,
+                                 declarationNamespace_key_decl,
+                                 declarationNamespace_key_namespace_),
+        DeclarationSource_key(DeclarationSource_key,
+                              declarationSource_key_target, declarationSource_key_source),
+        DeclarationSpan_key(DeclarationSpan_key,
+                            declarationSpan_key_declaration, declarationSpan_key_file,
+                            declarationSpan_key_span),
+        DeclarationTarget_key(DeclarationTarget_key,
+                              declarationTarget_key_source, declarationTarget_key_target),
+        DefinitionToDeclaration_key(DefinitionToDeclaration_key,
+                                    definitionToDeclaration_key_definition,
+                                    definitionToDeclaration_key_declaration),
+        FileDeclarations_key(FileDeclarations_key,
+                             fileDeclarations_key_file, fileDeclarations_key_declarations),
+        HackToThrift_key(HackToThrift_key, hackToThrift_key_from,
+                         hackToThrift_key_to),
+        MemberCluster_key(MemberCluster_key, memberCluster_key_members),
+        ModuleChild_key(ModuleChild_key, moduleChild_key_module,
+                        moduleChild_key_decl),
+        ModuleParent_key(ModuleParent_key, moduleParent_key_decl,
+                         moduleParent_key_module),
+        NamespaceMember_key(NamespaceMember_key,
+                            namespaceMember_key_namespace_, namespaceMember_key_decl),
+        SearchClassByName_key(SearchClassByName_key,
+                              searchClassByName_key_name, searchClassByName_key_parent,
+                              searchClassByName_key_decl),
+        SearchClassConstByName_key(SearchClassConstByName_key,
+                                   searchClassConstByName_key_name,
+                                   searchClassConstByName_key_parent,
+                                   searchClassConstByName_key_decl),
+        SearchEnumByName_key(SearchEnumByName_key,
+                             searchEnumByName_key_name, searchEnumByName_key_parent,
+                             searchEnumByName_key_decl),
+        SearchEnumeratorByName_key(SearchEnumeratorByName_key,
+                                   searchEnumeratorByName_key_name,
+                                   searchEnumeratorByName_key_parent,
+                                   searchEnumeratorByName_key_decl),
+        SearchFunctionByName_key(SearchFunctionByName_key,
+                                 searchFunctionByName_key_name, searchFunctionByName_key_parent,
+                                 searchFunctionByName_key_decl),
+        SearchGlobalConstByName_key(SearchGlobalConstByName_key,
+                                    searchGlobalConstByName_key_name,
+                                    searchGlobalConstByName_key_parent,
+                                    searchGlobalConstByName_key_decl),
+        SearchInterfaceByName_key(SearchInterfaceByName_key,
+                                  searchInterfaceByName_key_name, searchInterfaceByName_key_parent,
+                                  searchInterfaceByName_key_decl),
+        SearchMethodByName_key(SearchMethodByName_key,
+                               searchMethodByName_key_name, searchMethodByName_key_parent,
+                               searchMethodByName_key_decl),
+        SearchModuleByName_key(SearchModuleByName_key,
+                               searchModuleByName_key_name, searchModuleByName_key_decl),
+        SearchNamespaceByName_key(SearchNamespaceByName_key,
+                                  searchNamespaceByName_key_name, searchNamespaceByName_key_parent,
+                                  searchNamespaceByName_key_decl),
+        SearchPropertyByName_key(SearchPropertyByName_key,
+                                 searchPropertyByName_key_name, searchPropertyByName_key_parent,
+                                 searchPropertyByName_key_decl),
+        SearchTraitByName_key(SearchTraitByName_key,
+                              searchTraitByName_key_name, searchTraitByName_key_parent,
+                              searchTraitByName_key_decl),
+        SearchTypeConstByName_key(SearchTypeConstByName_key,
+                                  searchTypeConstByName_key_name, searchTypeConstByName_key_parent,
+                                  searchTypeConstByName_key_decl),
+        SearchTypedefByName_key(SearchTypedefByName_key,
+                                searchTypedefByName_key_name, searchTypedefByName_key_parent,
+                                searchTypedefByName_key_decl),
+        ThriftToHack_key(ThriftToHack_key, thriftToHack_key_to,
+                         thriftToHack_key_from),
+        XRefTarget(XRefTarget_EMPTY, XRefTarget_declaration,
+                   XRefTarget_occurrence),
+        TargetUses_key(TargetUses_key, targetUses_key_target,
+                       targetUses_key_file, targetUses_key_uses),
+        TargetUsesAbs_key(TargetUsesAbs_key, targetUsesAbs_key_target,
+                          targetUsesAbs_key_file, targetUsesAbs_key_uses),
+        XRef(XRef, xRef_target, xRef_ranges),
+        FileXRefs_key(FileXRefs_key, fileXRefs_key_file,
+                      fileXRefs_key_xrefs),
+        TypeInfo_key(TypeInfo_key, typeInfo_key_displayType,
+                     typeInfo_key_xrefs, typeInfo_key_hint),
+        InheritedMembers_key(InheritedMembers_key,
+                             inheritedMembers_key_container,
+                             inheritedMembers_key_inheritedMembers),
+        MethodDeclaration_key(MethodDeclaration_key,
+                              methodDeclaration_key_name, methodDeclaration_key_container),
+        PropertyDeclaration_key(PropertyDeclaration_key,
+                                propertyDeclaration_key_name, propertyDeclaration_key_container),
+        TypeConstDeclaration_key(TypeConstDeclaration_key,
+                                 typeConstDeclaration_key_name, typeConstDeclaration_key_container),
+        ContainerChild_key(ContainerChild_key,
+                           containerChild_key_container, containerChild_key_child),
+        ConstraintKind(ConstraintKind_As, ConstraintKind_Equal,
+                       ConstraintKind_Super, ConstraintKind__UNKNOWN),
+        Constraint(Constraint, constraint_constraintKind, constraint_type,
+                   constraint_typeInfo),
+        TypeParameter(TypeParameter, typeParameter_name,
+                      typeParameter_variance, typeParameter_reifyKind,
+                      typeParameter_constraints, typeParameter_attributes),
+        FunctionDefinition_key(FunctionDefinition_key,
+                               functionDefinition_key_declaration,
+                               functionDefinition_key_signature, functionDefinition_key_isAsync,
+                               functionDefinition_key_attributes,
+                               functionDefinition_key_typeParams, functionDefinition_key_module_,
+                               functionDefinition_key_readonlyRet),
+        InterfaceDefinition_key(InterfaceDefinition_key,
+                                interfaceDefinition_key_declaration,
+                                interfaceDefinition_key_members, interfaceDefinition_key_extends_,
+                                interfaceDefinition_key_attributes,
+                                interfaceDefinition_key_typeParams,
+                                interfaceDefinition_key_requireExtends,
+                                interfaceDefinition_key_module_),
+        MethodDefinition_key(MethodDefinition_key,
+                             methodDefinition_key_declaration, methodDefinition_key_signature,
+                             methodDefinition_key_visibility, methodDefinition_key_isAbstract,
+                             methodDefinition_key_isAsync, methodDefinition_key_isFinal,
+                             methodDefinition_key_isStatic, methodDefinition_key_attributes,
+                             methodDefinition_key_typeParams,
+                             methodDefinition_key_isReadonlyThis,
+                             methodDefinition_key_readonlyRet),
+        TraitDefinition_key(TraitDefinition_key,
+                            traitDefinition_key_declaration, traitDefinition_key_members,
+                            traitDefinition_key_implements_, traitDefinition_key_uses,
+                            traitDefinition_key_attributes, traitDefinition_key_typeParams,
+                            traitDefinition_key_requireExtends,
+                            traitDefinition_key_requireImplements, traitDefinition_key_module_,
+                            traitDefinition_key_requireClass,
+                            traitDefinition_key_requireThisAs),
+        TypedefDefinition_key(TypedefDefinition_key,
+                              typedefDefinition_key_declaration,
+                              typedefDefinition_key_isTransparent,
+                              typedefDefinition_key_attributes, typedefDefinition_key_typeParams,
+                              typedefDefinition_key_module_),
+        ClassDefinition_key(ClassDefinition_key,
+                            classDefinition_key_declaration, classDefinition_key_isAbstract,
+                            classDefinition_key_isFinal, classDefinition_key_members,
+                            classDefinition_key_extends_, classDefinition_key_implements_,
+                            classDefinition_key_uses, classDefinition_key_attributes,
+                            classDefinition_key_typeParams, classDefinition_key_module_),
+        ClassDeclaration_key(ClassDeclaration_key,
+                             classDeclaration_key_name),
+        ClassConstDefinition_key(ClassConstDefinition_key,
+                                 classConstDefinition_key_declaration,
+                                 classConstDefinition_key_type, classConstDefinition_key_value,
+                                 classConstDefinition_key_typeInfo),
+        ClassConstDeclaration_key(ClassConstDeclaration_key,
+                                  classConstDeclaration_key_name,
+                                  classConstDeclaration_key_container),
+        AttributeToDefinition_key(AttributeToDefinition_key,
+                                  attributeToDefinition_key_attribute,
+                                  attributeToDefinition_key_definition),
+        AttributeToDeclaration_key(AttributeToDeclaration_key,
+                                   attributeToDeclaration_key_attribute,
+                                   attributeToDeclaration_key_declaration,
+                                   attributeToDeclaration_key_file),
+        AttributeHasParameter_key(AttributeHasParameter_key,
+                                  attributeHasParameter_key_name,
+                                  attributeHasParameter_key_parameter,
+                                  attributeHasParameter_key_attribute),
+        Argument(Argument_EMPTY, Argument_lit, Argument_xref),
+        CallArgument(CallArgument, callArgument_span,
+                     callArgument_argument),
+        FileCall_key(FileCall_key, fileCall_key_file,
+                     fileCall_key_callee_span, fileCall_key_call_args,
+                     fileCall_key_callee_xref, fileCall_key_dispatch_arg,
+                     fileCall_key_receiver_type, fileCall_key_callee_xrefs))
+       where
+import qualified Control.DeepSeq as DeepSeq
+import qualified Control.Exception as Exception
+import qualified Control.Monad as Monad
+import qualified Control.Monad.ST.Trans as ST
+import qualified Control.Monad.Trans.Class as Trans
+import qualified Data.Aeson as Aeson
+import qualified Data.Aeson.Types as Aeson
+import qualified Data.ByteString as ByteString
+import qualified Data.Default as Default
+import qualified Data.Function as Function
+import qualified Data.HashMap.Strict as HashMap
+import qualified Data.Hashable as Hashable
+import qualified Data.Int as Int
+import qualified Data.List as List
+import qualified Data.Map.Strict as Map
+import qualified Data.Ord as Ord
+import qualified Data.Text as Text
+import qualified Data.Text.Encoding as Text
+import qualified Facebook.Thrift.Annotation.Thrift.Thrift.Types
+       as Facebook.Thrift.Annotation.Thrift.Thrift
+import qualified GHC.Magic as GHC
+import qualified Glean.Schema.Builtin.Types as Glean.Schema.Builtin
+import qualified Glean.Schema.Fbthrift.Types
+       as Glean.Schema.Fbthrift
+import qualified Glean.Schema.Src.Types as Glean.Schema.Src
+import qualified Glean.Types as Glean
+import qualified Prelude as Prelude
+import qualified Rust.Types as Rust
+import qualified Thrift.Binary.Parser as Parser
+import qualified Thrift.CodegenTypesOnly as Thrift
+import Control.Applicative ((<|>), (*>), (<*))
+import Data.Aeson ((.:), (.:?), (.=), (.!=))
+import Data.Aeson ((.:), (.=))
+import Data.Monoid ((<>))
+import Prelude ((.), (++), (>), (==))
+import Prelude ((.), (<$>), (<*>), (>>=), (==), (++))
+import Prelude ((.), (<$>), (<*>), (>>=), (==), (/=), (<), (++))
+{-# LINE 5 "glean/schema/thrift/hack_include.hs" #-}
+import qualified Data.ByteString
+{-# LINE 6 "glean/schema/thrift/hack_include.hs" #-}
+import qualified Data.Default
+{-# LINE 7 "glean/schema/thrift/hack_include.hs" #-}
+import qualified Data.Text
+{-# LINE 9 "glean/schema/thrift/hack_include.hs" #-}
+import qualified Glean.Types as Glean
+{-# LINE 10 "glean/schema/thrift/hack_include.hs" #-}
+import qualified Glean.Typed as Glean
+{-# LINE 11 "glean/schema/thrift/hack_include.hs" #-}
+import qualified Glean.Query.Angle as Angle
+{-# LINE 12 "glean/schema/thrift/hack_include.hs" #-}
+import qualified Glean.Angle.Types as Angle
+{-# LINE 14 "glean/schema/thrift/hack_include.hs" #-}
+import qualified Glean.Schema.Builtin.Types
+{-# LINE 15 "glean/schema/thrift/hack_include.hs" #-}
+import qualified Glean.Schema.Fbthrift.Types
+{-# LINE 16 "glean/schema/thrift/hack_include.hs" #-}
+import qualified Glean.Schema.Src.Types
+{-# LINE 689 ".build/def/codegen/thrift-schema-hs/glean/schema/thrift/gen-hs2/Glean/Schema/Hack/Types.hs" #-}
+
+pREDICATE_VERSIONS :: Map.Map Text.Text Int.Int64
+pREDICATE_VERSIONS
+  = Map.fromList
+      [("TargetUsesAbs", 6), ("ClassConstDeclaration", 6),
+       ("FileHasRedundantPackageOverride", 6), ("NamespaceQName", 6),
+       ("FileHasPackageOverride", 6), ("TypedefDefinition", 6),
+       ("SearchClassConstByName", 6), ("InterfaceDefinition", 6),
+       ("Package_", 6), ("SearchGlobalConstByLowerCaseName", 6),
+       ("FunctionDeclaration", 6), ("SearchTraitByLowerCaseName", 6),
+       ("EnumDefinition", 6), ("SearchEnumeratorByLowerCaseName", 6),
+       ("SearchMethodByName", 6), ("FileDeclarations", 6),
+       ("MethodDefinition", 6), ("InterfaceDeclaration", 6),
+       ("SearchEnumByName", 6), ("MethodOverrides", 6), ("Signature", 6),
+       ("TraitDefinition", 6), ("TargetUses", 6),
+       ("SearchClassByName", 6), ("SearchInterfaceByLowerCaseName", 6),
+       ("SearchFunctionByName", 6), ("ClassDefinition", 6),
+       ("NamespaceDeclaration", 6), ("Enumerator", 6),
+       ("SearchNamespaceByName", 6), ("NameLowerCase", 6),
+       ("StringLiteral", 6), ("GlobalNamespaceAlias", 6),
+       ("SearchInterfaceByName", 6), ("FilePackage", 6),
+       ("SearchClassByLowerCaseName", 6),
+       ("ContainerDeclarationQName", 6), ("UserAttribute", 6),
+       ("SearchPropertyByName", 6), ("DeclarationNamespace", 6),
+       ("ModuleDeclaration", 6), ("NamespaceMember", 6),
+       ("PropertyDefinition", 6), ("FunctionDefinition", 6),
+       ("SearchPropertyByLowerCaseName", 6),
+       ("GlobalConstDeclaration", 6), ("SearchGlobalConstByName", 6),
+       ("DeclarationSpan", 6), ("FileCall", 6), ("QName", 6),
+       ("HackToThrift", 6), ("TypedefDeclaration", 6),
+       ("ModuleParent", 6), ("ModuleChild", 6),
+       ("DeclarationLocation", 6), ("DeclarationSource", 6),
+       ("MethodOccurrence", 6), ("MemberCluster", 6),
+       ("SearchClassConstByLowerCaseName", 6), ("FileXRefs", 6),
+       ("TypeConstDeclaration", 6), ("DeclarationName", 6),
+       ("MethodOverridden", 6), ("DeclarationTarget", 6), ("Name", 6),
+       ("MethodDeclaration", 6), ("TraitDeclaration", 6),
+       ("SearchTypeConstByName", 6), ("ClassDeclaration", 6),
+       ("SearchTypedefByName", 6), ("IndexerInputsHash", 6),
+       ("SearchFunctionByLowerCaseName", 6),
+       ("SearchModuleByLowerCaseName", 6),
+       ("SearchNamespaceByLowerCaseName", 6),
+       ("SearchMethodByLowerCaseName", 6), ("ModuleDefinition", 6),
+       ("AttributeToDefinition", 6), ("Hint", 6), ("EnumDeclaration", 6),
+       ("ThriftToHack", 6), ("TypeInfo", 6), ("InheritedMembers", 6),
+       ("ContainerChild", 6), ("TypeConstDefinition", 6),
+       ("SearchEnumByLowerCaseName", 6), ("AttributeHasParameter", 6),
+       ("ContainerParent", 6), ("DefinitionToDeclaration", 6),
+       ("SearchTypeConstByLowerCaseName", 6), ("SearchTraitByName", 6),
+       ("DeclarationComment", 6), ("AttributeToDeclaration", 6),
+       ("SearchModuleByName", 6), ("Type", 6),
+       ("ClassConstDefinition", 6), ("GlobalConstDefinition", 6),
+       ("SearchEnumeratorByName", 6), ("PropertyDeclaration", 6),
+       ("SearchTypedefByLowerCaseName", 6), ("Context_", 6)]
+
+type UserAttribute_id = Glean.Id
+
+data UserAttribute = UserAttribute{userAttribute_id ::
+                                   {-# UNPACK #-} !UserAttribute_id,
+                                   userAttribute_key :: Prelude.Maybe UserAttribute_key}
+                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON UserAttribute where
+  toJSON (UserAttribute __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct UserAttribute where
+  buildStruct _proxy (UserAttribute __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (UserAttribute __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData UserAttribute where
+  rnf (UserAttribute __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default UserAttribute where
+  def = UserAttribute Default.def Prelude.Nothing
+
+instance Hashable.Hashable UserAttribute where
+  hashWithSalt __salt (UserAttribute _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type TypedefDeclaration_id = Glean.Id
+
+data TypedefDeclaration = TypedefDeclaration{typedefDeclaration_id
+                                             :: {-# UNPACK #-} !TypedefDeclaration_id,
+                                             typedefDeclaration_key ::
+                                             Prelude.Maybe TypedefDeclaration_key}
+                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TypedefDeclaration where
+  toJSON (TypedefDeclaration __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct TypedefDeclaration where
+  buildStruct _proxy (TypedefDeclaration __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (TypedefDeclaration __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData TypedefDeclaration where
+  rnf (TypedefDeclaration __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default TypedefDeclaration where
+  def = TypedefDeclaration Default.def Prelude.Nothing
+
+instance Hashable.Hashable TypedefDeclaration where
+  hashWithSalt __salt (TypedefDeclaration _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type TypeConstDefinition_id = Glean.Id
+
+data TypeConstDefinition = TypeConstDefinition{typeConstDefinition_id
+                                               :: {-# UNPACK #-} !TypeConstDefinition_id,
+                                               typeConstDefinition_key ::
+                                               Prelude.Maybe TypeConstDefinition_key}
+                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TypeConstDefinition where
+  toJSON (TypeConstDefinition __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct TypeConstDefinition where
+  buildStruct _proxy (TypeConstDefinition __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (TypeConstDefinition __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData TypeConstDefinition where
+  rnf (TypeConstDefinition __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default TypeConstDefinition where
+  def = TypeConstDefinition Default.def Prelude.Nothing
+
+instance Hashable.Hashable TypeConstDefinition where
+  hashWithSalt __salt (TypeConstDefinition _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type Type_id = Glean.Id
+
+data Type = Type{type_id :: {-# UNPACK #-} !Type_id,
+                 type_key :: Prelude.Maybe Text.Text}
+            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Type where
+  toJSON (Type __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct Type where
+  buildStruct _proxy (Type __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStringType _proxy)
+                                    2
+                                    1
+                                    (Thrift.genText _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (Type __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData Type where
+  rnf (Type __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default Type where
+  def = Type Default.def Prelude.Nothing
+
+instance Hashable.Hashable Type where
+  hashWithSalt __salt (Type _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type TraitDeclaration_id = Glean.Id
+
+data TraitDeclaration = TraitDeclaration{traitDeclaration_id ::
+                                         {-# UNPACK #-} !TraitDeclaration_id,
+                                         traitDeclaration_key :: Prelude.Maybe TraitDeclaration_key}
+                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TraitDeclaration where
+  toJSON (TraitDeclaration __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct TraitDeclaration where
+  buildStruct _proxy (TraitDeclaration __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (TraitDeclaration __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData TraitDeclaration where
+  rnf (TraitDeclaration __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default TraitDeclaration where
+  def = TraitDeclaration Default.def Prelude.Nothing
+
+instance Hashable.Hashable TraitDeclaration where
+  hashWithSalt __salt (TraitDeclaration _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type StringLiteral_id = Glean.Id
+
+data StringLiteral = StringLiteral{stringLiteral_id ::
+                                   {-# UNPACK #-} !StringLiteral_id,
+                                   stringLiteral_key :: Prelude.Maybe Text.Text}
+                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON StringLiteral where
+  toJSON (StringLiteral __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct StringLiteral where
+  buildStruct _proxy (StringLiteral __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStringType _proxy)
+                                    2
+                                    1
+                                    (Thrift.genText _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (StringLiteral __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData StringLiteral where
+  rnf (StringLiteral __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default StringLiteral where
+  def = StringLiteral Default.def Prelude.Nothing
+
+instance Hashable.Hashable StringLiteral where
+  hashWithSalt __salt (StringLiteral _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SearchTypedefByLowerCaseName_id = Glean.Id
+
+data SearchTypedefByLowerCaseName = SearchTypedefByLowerCaseName{searchTypedefByLowerCaseName_id
+                                                                 ::
+                                                                 {-# UNPACK #-} !SearchTypedefByLowerCaseName_id,
+                                                                 searchTypedefByLowerCaseName_key ::
+                                                                 Prelude.Maybe
+                                                                   SearchTypedefByLowerCaseName_key}
+                                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchTypedefByLowerCaseName where
+  toJSON (SearchTypedefByLowerCaseName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchTypedefByLowerCaseName where
+  buildStruct _proxy
+    (SearchTypedefByLowerCaseName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (SearchTypedefByLowerCaseName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchTypedefByLowerCaseName where
+  rnf (SearchTypedefByLowerCaseName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SearchTypedefByLowerCaseName where
+  def = SearchTypedefByLowerCaseName Default.def Prelude.Nothing
+
+instance Hashable.Hashable SearchTypedefByLowerCaseName where
+  hashWithSalt __salt (SearchTypedefByLowerCaseName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SearchTypeConstByLowerCaseName_id = Glean.Id
+
+data SearchTypeConstByLowerCaseName = SearchTypeConstByLowerCaseName{searchTypeConstByLowerCaseName_id
+                                                                     ::
+                                                                     {-# UNPACK #-} !SearchTypeConstByLowerCaseName_id,
+                                                                     searchTypeConstByLowerCaseName_key
+                                                                     ::
+                                                                     Prelude.Maybe
+                                                                       SearchTypeConstByLowerCaseName_key}
+                                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchTypeConstByLowerCaseName where
+  toJSON (SearchTypeConstByLowerCaseName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchTypeConstByLowerCaseName where
+  buildStruct _proxy
+    (SearchTypeConstByLowerCaseName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (SearchTypeConstByLowerCaseName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchTypeConstByLowerCaseName where
+  rnf (SearchTypeConstByLowerCaseName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SearchTypeConstByLowerCaseName where
+  def = SearchTypeConstByLowerCaseName Default.def Prelude.Nothing
+
+instance Hashable.Hashable SearchTypeConstByLowerCaseName where
+  hashWithSalt __salt (SearchTypeConstByLowerCaseName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SearchTraitByLowerCaseName_id = Glean.Id
+
+data SearchTraitByLowerCaseName = SearchTraitByLowerCaseName{searchTraitByLowerCaseName_id
+                                                             ::
+                                                             {-# UNPACK #-} !SearchTraitByLowerCaseName_id,
+                                                             searchTraitByLowerCaseName_key ::
+                                                             Prelude.Maybe
+                                                               SearchTraitByLowerCaseName_key}
+                                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchTraitByLowerCaseName where
+  toJSON (SearchTraitByLowerCaseName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchTraitByLowerCaseName where
+  buildStruct _proxy
+    (SearchTraitByLowerCaseName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (SearchTraitByLowerCaseName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchTraitByLowerCaseName where
+  rnf (SearchTraitByLowerCaseName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SearchTraitByLowerCaseName where
+  def = SearchTraitByLowerCaseName Default.def Prelude.Nothing
+
+instance Hashable.Hashable SearchTraitByLowerCaseName where
+  hashWithSalt __salt (SearchTraitByLowerCaseName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SearchPropertyByLowerCaseName_id = Glean.Id
+
+data SearchPropertyByLowerCaseName = SearchPropertyByLowerCaseName{searchPropertyByLowerCaseName_id
+                                                                   ::
+                                                                   {-# UNPACK #-} !SearchPropertyByLowerCaseName_id,
+                                                                   searchPropertyByLowerCaseName_key
+                                                                   ::
+                                                                   Prelude.Maybe
+                                                                     SearchPropertyByLowerCaseName_key}
+                                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchPropertyByLowerCaseName where
+  toJSON (SearchPropertyByLowerCaseName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchPropertyByLowerCaseName where
+  buildStruct _proxy
+    (SearchPropertyByLowerCaseName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (SearchPropertyByLowerCaseName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchPropertyByLowerCaseName where
+  rnf (SearchPropertyByLowerCaseName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SearchPropertyByLowerCaseName where
+  def = SearchPropertyByLowerCaseName Default.def Prelude.Nothing
+
+instance Hashable.Hashable SearchPropertyByLowerCaseName where
+  hashWithSalt __salt (SearchPropertyByLowerCaseName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SearchNamespaceByLowerCaseName_id = Glean.Id
+
+data SearchNamespaceByLowerCaseName = SearchNamespaceByLowerCaseName{searchNamespaceByLowerCaseName_id
+                                                                     ::
+                                                                     {-# UNPACK #-} !SearchNamespaceByLowerCaseName_id,
+                                                                     searchNamespaceByLowerCaseName_key
+                                                                     ::
+                                                                     Prelude.Maybe
+                                                                       SearchNamespaceByLowerCaseName_key}
+                                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchNamespaceByLowerCaseName where
+  toJSON (SearchNamespaceByLowerCaseName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchNamespaceByLowerCaseName where
+  buildStruct _proxy
+    (SearchNamespaceByLowerCaseName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (SearchNamespaceByLowerCaseName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchNamespaceByLowerCaseName where
+  rnf (SearchNamespaceByLowerCaseName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SearchNamespaceByLowerCaseName where
+  def = SearchNamespaceByLowerCaseName Default.def Prelude.Nothing
+
+instance Hashable.Hashable SearchNamespaceByLowerCaseName where
+  hashWithSalt __salt (SearchNamespaceByLowerCaseName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SearchModuleByLowerCaseName_id = Glean.Id
+
+data SearchModuleByLowerCaseName = SearchModuleByLowerCaseName{searchModuleByLowerCaseName_id
+                                                               ::
+                                                               {-# UNPACK #-} !SearchModuleByLowerCaseName_id,
+                                                               searchModuleByLowerCaseName_key ::
+                                                               Prelude.Maybe
+                                                                 SearchModuleByLowerCaseName_key}
+                                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchModuleByLowerCaseName where
+  toJSON (SearchModuleByLowerCaseName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchModuleByLowerCaseName where
+  buildStruct _proxy
+    (SearchModuleByLowerCaseName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (SearchModuleByLowerCaseName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchModuleByLowerCaseName where
+  rnf (SearchModuleByLowerCaseName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SearchModuleByLowerCaseName where
+  def = SearchModuleByLowerCaseName Default.def Prelude.Nothing
+
+instance Hashable.Hashable SearchModuleByLowerCaseName where
+  hashWithSalt __salt (SearchModuleByLowerCaseName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SearchMethodByLowerCaseName_id = Glean.Id
+
+data SearchMethodByLowerCaseName = SearchMethodByLowerCaseName{searchMethodByLowerCaseName_id
+                                                               ::
+                                                               {-# UNPACK #-} !SearchMethodByLowerCaseName_id,
+                                                               searchMethodByLowerCaseName_key ::
+                                                               Prelude.Maybe
+                                                                 SearchMethodByLowerCaseName_key}
+                                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchMethodByLowerCaseName where
+  toJSON (SearchMethodByLowerCaseName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchMethodByLowerCaseName where
+  buildStruct _proxy
+    (SearchMethodByLowerCaseName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (SearchMethodByLowerCaseName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchMethodByLowerCaseName where
+  rnf (SearchMethodByLowerCaseName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SearchMethodByLowerCaseName where
+  def = SearchMethodByLowerCaseName Default.def Prelude.Nothing
+
+instance Hashable.Hashable SearchMethodByLowerCaseName where
+  hashWithSalt __salt (SearchMethodByLowerCaseName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SearchInterfaceByLowerCaseName_id = Glean.Id
+
+data SearchInterfaceByLowerCaseName = SearchInterfaceByLowerCaseName{searchInterfaceByLowerCaseName_id
+                                                                     ::
+                                                                     {-# UNPACK #-} !SearchInterfaceByLowerCaseName_id,
+                                                                     searchInterfaceByLowerCaseName_key
+                                                                     ::
+                                                                     Prelude.Maybe
+                                                                       SearchInterfaceByLowerCaseName_key}
+                                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchInterfaceByLowerCaseName where
+  toJSON (SearchInterfaceByLowerCaseName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchInterfaceByLowerCaseName where
+  buildStruct _proxy
+    (SearchInterfaceByLowerCaseName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (SearchInterfaceByLowerCaseName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchInterfaceByLowerCaseName where
+  rnf (SearchInterfaceByLowerCaseName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SearchInterfaceByLowerCaseName where
+  def = SearchInterfaceByLowerCaseName Default.def Prelude.Nothing
+
+instance Hashable.Hashable SearchInterfaceByLowerCaseName where
+  hashWithSalt __salt (SearchInterfaceByLowerCaseName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SearchGlobalConstByLowerCaseName_id = Glean.Id
+
+data SearchGlobalConstByLowerCaseName = SearchGlobalConstByLowerCaseName{searchGlobalConstByLowerCaseName_id
+                                                                         ::
+                                                                         {-# UNPACK #-} !SearchGlobalConstByLowerCaseName_id,
+                                                                         searchGlobalConstByLowerCaseName_key
+                                                                         ::
+                                                                         Prelude.Maybe
+                                                                           SearchGlobalConstByLowerCaseName_key}
+                                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchGlobalConstByLowerCaseName where
+  toJSON (SearchGlobalConstByLowerCaseName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchGlobalConstByLowerCaseName where
+  buildStruct _proxy
+    (SearchGlobalConstByLowerCaseName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (SearchGlobalConstByLowerCaseName __val__id
+                                                  __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchGlobalConstByLowerCaseName where
+  rnf (SearchGlobalConstByLowerCaseName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SearchGlobalConstByLowerCaseName where
+  def = SearchGlobalConstByLowerCaseName Default.def Prelude.Nothing
+
+instance Hashable.Hashable SearchGlobalConstByLowerCaseName where
+  hashWithSalt __salt (SearchGlobalConstByLowerCaseName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SearchFunctionByLowerCaseName_id = Glean.Id
+
+data SearchFunctionByLowerCaseName = SearchFunctionByLowerCaseName{searchFunctionByLowerCaseName_id
+                                                                   ::
+                                                                   {-# UNPACK #-} !SearchFunctionByLowerCaseName_id,
+                                                                   searchFunctionByLowerCaseName_key
+                                                                   ::
+                                                                   Prelude.Maybe
+                                                                     SearchFunctionByLowerCaseName_key}
+                                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchFunctionByLowerCaseName where
+  toJSON (SearchFunctionByLowerCaseName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchFunctionByLowerCaseName where
+  buildStruct _proxy
+    (SearchFunctionByLowerCaseName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (SearchFunctionByLowerCaseName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchFunctionByLowerCaseName where
+  rnf (SearchFunctionByLowerCaseName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SearchFunctionByLowerCaseName where
+  def = SearchFunctionByLowerCaseName Default.def Prelude.Nothing
+
+instance Hashable.Hashable SearchFunctionByLowerCaseName where
+  hashWithSalt __salt (SearchFunctionByLowerCaseName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SearchEnumeratorByLowerCaseName_id = Glean.Id
+
+data SearchEnumeratorByLowerCaseName = SearchEnumeratorByLowerCaseName{searchEnumeratorByLowerCaseName_id
+                                                                       ::
+                                                                       {-# UNPACK #-} !SearchEnumeratorByLowerCaseName_id,
+                                                                       searchEnumeratorByLowerCaseName_key
+                                                                       ::
+                                                                       Prelude.Maybe
+                                                                         SearchEnumeratorByLowerCaseName_key}
+                                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchEnumeratorByLowerCaseName where
+  toJSON (SearchEnumeratorByLowerCaseName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchEnumeratorByLowerCaseName where
+  buildStruct _proxy
+    (SearchEnumeratorByLowerCaseName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (SearchEnumeratorByLowerCaseName __val__id
+                                                  __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchEnumeratorByLowerCaseName where
+  rnf (SearchEnumeratorByLowerCaseName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SearchEnumeratorByLowerCaseName where
+  def = SearchEnumeratorByLowerCaseName Default.def Prelude.Nothing
+
+instance Hashable.Hashable SearchEnumeratorByLowerCaseName where
+  hashWithSalt __salt (SearchEnumeratorByLowerCaseName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SearchEnumByLowerCaseName_id = Glean.Id
+
+data SearchEnumByLowerCaseName = SearchEnumByLowerCaseName{searchEnumByLowerCaseName_id
+                                                           ::
+                                                           {-# UNPACK #-} !SearchEnumByLowerCaseName_id,
+                                                           searchEnumByLowerCaseName_key ::
+                                                           Prelude.Maybe
+                                                             SearchEnumByLowerCaseName_key}
+                                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchEnumByLowerCaseName where
+  toJSON (SearchEnumByLowerCaseName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchEnumByLowerCaseName where
+  buildStruct _proxy
+    (SearchEnumByLowerCaseName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (SearchEnumByLowerCaseName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchEnumByLowerCaseName where
+  rnf (SearchEnumByLowerCaseName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SearchEnumByLowerCaseName where
+  def = SearchEnumByLowerCaseName Default.def Prelude.Nothing
+
+instance Hashable.Hashable SearchEnumByLowerCaseName where
+  hashWithSalt __salt (SearchEnumByLowerCaseName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SearchClassConstByLowerCaseName_id = Glean.Id
+
+data SearchClassConstByLowerCaseName = SearchClassConstByLowerCaseName{searchClassConstByLowerCaseName_id
+                                                                       ::
+                                                                       {-# UNPACK #-} !SearchClassConstByLowerCaseName_id,
+                                                                       searchClassConstByLowerCaseName_key
+                                                                       ::
+                                                                       Prelude.Maybe
+                                                                         SearchClassConstByLowerCaseName_key}
+                                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchClassConstByLowerCaseName where
+  toJSON (SearchClassConstByLowerCaseName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchClassConstByLowerCaseName where
+  buildStruct _proxy
+    (SearchClassConstByLowerCaseName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (SearchClassConstByLowerCaseName __val__id
+                                                  __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchClassConstByLowerCaseName where
+  rnf (SearchClassConstByLowerCaseName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SearchClassConstByLowerCaseName where
+  def = SearchClassConstByLowerCaseName Default.def Prelude.Nothing
+
+instance Hashable.Hashable SearchClassConstByLowerCaseName where
+  hashWithSalt __salt (SearchClassConstByLowerCaseName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SearchClassByLowerCaseName_id = Glean.Id
+
+data SearchClassByLowerCaseName = SearchClassByLowerCaseName{searchClassByLowerCaseName_id
+                                                             ::
+                                                             {-# UNPACK #-} !SearchClassByLowerCaseName_id,
+                                                             searchClassByLowerCaseName_key ::
+                                                             Prelude.Maybe
+                                                               SearchClassByLowerCaseName_key}
+                                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchClassByLowerCaseName where
+  toJSON (SearchClassByLowerCaseName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchClassByLowerCaseName where
+  buildStruct _proxy
+    (SearchClassByLowerCaseName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (SearchClassByLowerCaseName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchClassByLowerCaseName where
+  rnf (SearchClassByLowerCaseName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SearchClassByLowerCaseName where
+  def = SearchClassByLowerCaseName Default.def Prelude.Nothing
+
+instance Hashable.Hashable SearchClassByLowerCaseName where
+  hashWithSalt __salt (SearchClassByLowerCaseName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type QName_id = Glean.Id
+
+data QName = QName{qName_id :: {-# UNPACK #-} !QName_id,
+                   qName_key :: Prelude.Maybe QName_key}
+             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON QName where
+  toJSON (QName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct QName where
+  buildStruct _proxy (QName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (QName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData QName where
+  rnf (QName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default QName where
+  def = QName Default.def Prelude.Nothing
+
+instance Hashable.Hashable QName where
+  hashWithSalt __salt (QName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type PropertyDefinition_id = Glean.Id
+
+data PropertyDefinition = PropertyDefinition{propertyDefinition_id
+                                             :: {-# UNPACK #-} !PropertyDefinition_id,
+                                             propertyDefinition_key ::
+                                             Prelude.Maybe PropertyDefinition_key}
+                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON PropertyDefinition where
+  toJSON (PropertyDefinition __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct PropertyDefinition where
+  buildStruct _proxy (PropertyDefinition __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (PropertyDefinition __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData PropertyDefinition where
+  rnf (PropertyDefinition __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default PropertyDefinition where
+  def = PropertyDefinition Default.def Prelude.Nothing
+
+instance Hashable.Hashable PropertyDefinition where
+  hashWithSalt __salt (PropertyDefinition _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type Signature_id = Glean.Id
+
+data Signature = Signature{signature_id ::
+                           {-# UNPACK #-} !Signature_id,
+                           signature_key :: Prelude.Maybe Signature_key}
+                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Signature where
+  toJSON (Signature __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct Signature where
+  buildStruct _proxy (Signature __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (Signature __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData Signature where
+  rnf (Signature __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default Signature where
+  def = Signature Default.def Prelude.Nothing
+
+instance Hashable.Hashable Signature where
+  hashWithSalt __salt (Signature _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type Package__id = Glean.Id
+
+data Package_ = Package_{package__id ::
+                         {-# UNPACK #-} !Package__id,
+                         package__key :: Prelude.Maybe Text.Text}
+                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Package_ where
+  toJSON (Package_ __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct Package_ where
+  buildStruct _proxy (Package_ __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStringType _proxy)
+                                    2
+                                    1
+                                    (Thrift.genText _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (Package_ __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData Package_ where
+  rnf (Package_ __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default Package_ where
+  def = Package_ Default.def Prelude.Nothing
+
+instance Hashable.Hashable Package_ where
+  hashWithSalt __salt (Package_ _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type NamespaceQName_id = Glean.Id
+
+data NamespaceQName = NamespaceQName{namespaceQName_id ::
+                                     {-# UNPACK #-} !NamespaceQName_id,
+                                     namespaceQName_key :: Prelude.Maybe NamespaceQName_key}
+                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON NamespaceQName where
+  toJSON (NamespaceQName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct NamespaceQName where
+  buildStruct _proxy (NamespaceQName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (NamespaceQName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData NamespaceQName where
+  rnf (NamespaceQName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default NamespaceQName where
+  def = NamespaceQName Default.def Prelude.Nothing
+
+instance Hashable.Hashable NamespaceQName where
+  hashWithSalt __salt (NamespaceQName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type NamespaceDeclaration_id = Glean.Id
+
+data NamespaceDeclaration = NamespaceDeclaration{namespaceDeclaration_id
+                                                 :: {-# UNPACK #-} !NamespaceDeclaration_id,
+                                                 namespaceDeclaration_key ::
+                                                 Prelude.Maybe NamespaceDeclaration_key}
+                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON NamespaceDeclaration where
+  toJSON (NamespaceDeclaration __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct NamespaceDeclaration where
+  buildStruct _proxy (NamespaceDeclaration __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (NamespaceDeclaration __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData NamespaceDeclaration where
+  rnf (NamespaceDeclaration __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default NamespaceDeclaration where
+  def = NamespaceDeclaration Default.def Prelude.Nothing
+
+instance Hashable.Hashable NamespaceDeclaration where
+  hashWithSalt __salt (NamespaceDeclaration _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type NameLowerCase_id = Glean.Id
+
+data NameLowerCase = NameLowerCase{nameLowerCase_id ::
+                                   {-# UNPACK #-} !NameLowerCase_id,
+                                   nameLowerCase_key :: Prelude.Maybe NameLowerCase_key}
+                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON NameLowerCase where
+  toJSON (NameLowerCase __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct NameLowerCase where
+  buildStruct _proxy (NameLowerCase __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (NameLowerCase __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData NameLowerCase where
+  rnf (NameLowerCase __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default NameLowerCase where
+  def = NameLowerCase Default.def Prelude.Nothing
+
+instance Hashable.Hashable NameLowerCase where
+  hashWithSalt __salt (NameLowerCase _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type Name_id = Glean.Id
+
+data Name = Name{name_id :: {-# UNPACK #-} !Name_id,
+                 name_key :: Prelude.Maybe Text.Text}
+            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Name where
+  toJSON (Name __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct Name where
+  buildStruct _proxy (Name __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStringType _proxy)
+                                    2
+                                    1
+                                    (Thrift.genText _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (Name __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData Name where
+  rnf (Name __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default Name where
+  def = Name Default.def Prelude.Nothing
+
+instance Hashable.Hashable Name where
+  hashWithSalt __salt (Name _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type ModuleDefinition_id = Glean.Id
+
+data ModuleDefinition = ModuleDefinition{moduleDefinition_id ::
+                                         {-# UNPACK #-} !ModuleDefinition_id,
+                                         moduleDefinition_key :: Prelude.Maybe ModuleDefinition_key}
+                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ModuleDefinition where
+  toJSON (ModuleDefinition __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct ModuleDefinition where
+  buildStruct _proxy (ModuleDefinition __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (ModuleDefinition __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ModuleDefinition where
+  rnf (ModuleDefinition __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default ModuleDefinition where
+  def = ModuleDefinition Default.def Prelude.Nothing
+
+instance Hashable.Hashable ModuleDefinition where
+  hashWithSalt __salt (ModuleDefinition _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type ModuleDeclaration_id = Glean.Id
+
+data ModuleDeclaration = ModuleDeclaration{moduleDeclaration_id ::
+                                           {-# UNPACK #-} !ModuleDeclaration_id,
+                                           moduleDeclaration_key ::
+                                           Prelude.Maybe ModuleDeclaration_key}
+                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ModuleDeclaration where
+  toJSON (ModuleDeclaration __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct ModuleDeclaration where
+  buildStruct _proxy (ModuleDeclaration __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (ModuleDeclaration __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ModuleDeclaration where
+  rnf (ModuleDeclaration __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default ModuleDeclaration where
+  def = ModuleDeclaration Default.def Prelude.Nothing
+
+instance Hashable.Hashable ModuleDeclaration where
+  hashWithSalt __salt (ModuleDeclaration _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type MethodOverrides_id = Glean.Id
+
+data MethodOverrides = MethodOverrides{methodOverrides_id ::
+                                       {-# UNPACK #-} !MethodOverrides_id,
+                                       methodOverrides_key :: Prelude.Maybe MethodOverrides_key}
+                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON MethodOverrides where
+  toJSON (MethodOverrides __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct MethodOverrides where
+  buildStruct _proxy (MethodOverrides __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (MethodOverrides __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData MethodOverrides where
+  rnf (MethodOverrides __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default MethodOverrides where
+  def = MethodOverrides Default.def Prelude.Nothing
+
+instance Hashable.Hashable MethodOverrides where
+  hashWithSalt __salt (MethodOverrides _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type MethodOverridden_id = Glean.Id
+
+data MethodOverridden = MethodOverridden{methodOverridden_id ::
+                                         {-# UNPACK #-} !MethodOverridden_id,
+                                         methodOverridden_key :: Prelude.Maybe MethodOverridden_key}
+                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON MethodOverridden where
+  toJSON (MethodOverridden __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct MethodOverridden where
+  buildStruct _proxy (MethodOverridden __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (MethodOverridden __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData MethodOverridden where
+  rnf (MethodOverridden __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default MethodOverridden where
+  def = MethodOverridden Default.def Prelude.Nothing
+
+instance Hashable.Hashable MethodOverridden where
+  hashWithSalt __salt (MethodOverridden _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type MethodOccurrence_id = Glean.Id
+
+data MethodOccurrence = MethodOccurrence{methodOccurrence_id ::
+                                         {-# UNPACK #-} !MethodOccurrence_id,
+                                         methodOccurrence_key :: Prelude.Maybe MethodOccurrence_key}
+                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON MethodOccurrence where
+  toJSON (MethodOccurrence __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct MethodOccurrence where
+  buildStruct _proxy (MethodOccurrence __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (MethodOccurrence __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData MethodOccurrence where
+  rnf (MethodOccurrence __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default MethodOccurrence where
+  def = MethodOccurrence Default.def Prelude.Nothing
+
+instance Hashable.Hashable MethodOccurrence where
+  hashWithSalt __salt (MethodOccurrence _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type InterfaceDeclaration_id = Glean.Id
+
+data InterfaceDeclaration = InterfaceDeclaration{interfaceDeclaration_id
+                                                 :: {-# UNPACK #-} !InterfaceDeclaration_id,
+                                                 interfaceDeclaration_key ::
+                                                 Prelude.Maybe InterfaceDeclaration_key}
+                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON InterfaceDeclaration where
+  toJSON (InterfaceDeclaration __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct InterfaceDeclaration where
+  buildStruct _proxy (InterfaceDeclaration __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (InterfaceDeclaration __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData InterfaceDeclaration where
+  rnf (InterfaceDeclaration __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default InterfaceDeclaration where
+  def = InterfaceDeclaration Default.def Prelude.Nothing
+
+instance Hashable.Hashable InterfaceDeclaration where
+  hashWithSalt __salt (InterfaceDeclaration _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type IndexerInputsHash_id = Glean.Id
+
+data IndexerInputsHash = IndexerInputsHash{indexerInputsHash_id ::
+                                           {-# UNPACK #-} !IndexerInputsHash_id,
+                                           indexerInputsHash_key :: Prelude.Maybe Text.Text,
+                                           indexerInputsHash_value ::
+                                           Prelude.Maybe IndexerInputsHash_value}
+                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON IndexerInputsHash where
+  toJSON (IndexerInputsHash __field__id __field__key __field__value)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             (Prelude.maybe Prelude.id ((:) . ("value" .=))
+                (Prelude.fmap Thrift.encodeBase64Text __field__value)
+                Prelude.mempty))
+
+instance Thrift.ThriftStruct IndexerInputsHash where
+  buildStruct _proxy
+    (IndexerInputsHash __field__id __field__key __field__value)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           let (__cereal__key, __id__key)
+                 = case __field__key of
+                     Prelude.Just _val -> ((:)
+                                             (Thrift.genField _proxy "key"
+                                                (Thrift.getStringType _proxy)
+                                                2
+                                                1
+                                                (Thrift.genText _proxy _val)),
+                                           2)
+                     Prelude.Nothing -> (Prelude.id, 1)
+             in
+             __cereal__key
+               (case __field__value of
+                  Prelude.Just _val -> Thrift.genField _proxy "value"
+                                         (Thrift.getStringType _proxy)
+                                         3
+                                         __id__key
+                                         (Thrift.genBytes _proxy _val)
+                                         : []
+                  Prelude.Nothing -> []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            __field__value <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 3 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseBytes
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__value
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             !__val__value <- ST.readSTRef __field__value
+                                             Prelude.pure
+                                               (IndexerInputsHash __val__id __val__key __val__value)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2), ("value", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData IndexerInputsHash where
+  rnf (IndexerInputsHash __field__id __field__key __field__value)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq`
+          DeepSeq.rnf __field__value `Prelude.seq` ()
+
+instance Default.Default IndexerInputsHash where
+  def = IndexerInputsHash Default.def Prelude.Nothing Prelude.Nothing
+
+instance Hashable.Hashable IndexerInputsHash where
+  hashWithSalt __salt (IndexerInputsHash _id _key _value)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key)
+        _value
+
+type GlobalNamespaceAlias_id = Glean.Id
+
+data GlobalNamespaceAlias = GlobalNamespaceAlias{globalNamespaceAlias_id
+                                                 :: {-# UNPACK #-} !GlobalNamespaceAlias_id,
+                                                 globalNamespaceAlias_key ::
+                                                 Prelude.Maybe GlobalNamespaceAlias_key}
+                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON GlobalNamespaceAlias where
+  toJSON (GlobalNamespaceAlias __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct GlobalNamespaceAlias where
+  buildStruct _proxy (GlobalNamespaceAlias __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (GlobalNamespaceAlias __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData GlobalNamespaceAlias where
+  rnf (GlobalNamespaceAlias __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default GlobalNamespaceAlias where
+  def = GlobalNamespaceAlias Default.def Prelude.Nothing
+
+instance Hashable.Hashable GlobalNamespaceAlias where
+  hashWithSalt __salt (GlobalNamespaceAlias _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type GlobalConstDefinition_id = Glean.Id
+
+data GlobalConstDefinition = GlobalConstDefinition{globalConstDefinition_id
+                                                   :: {-# UNPACK #-} !GlobalConstDefinition_id,
+                                                   globalConstDefinition_key ::
+                                                   Prelude.Maybe GlobalConstDefinition_key}
+                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON GlobalConstDefinition where
+  toJSON (GlobalConstDefinition __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct GlobalConstDefinition where
+  buildStruct _proxy (GlobalConstDefinition __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (GlobalConstDefinition __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData GlobalConstDefinition where
+  rnf (GlobalConstDefinition __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default GlobalConstDefinition where
+  def = GlobalConstDefinition Default.def Prelude.Nothing
+
+instance Hashable.Hashable GlobalConstDefinition where
+  hashWithSalt __salt (GlobalConstDefinition _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type GlobalConstDeclaration_id = Glean.Id
+
+data GlobalConstDeclaration = GlobalConstDeclaration{globalConstDeclaration_id
+                                                     :: {-# UNPACK #-} !GlobalConstDeclaration_id,
+                                                     globalConstDeclaration_key ::
+                                                     Prelude.Maybe GlobalConstDeclaration_key}
+                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON GlobalConstDeclaration where
+  toJSON (GlobalConstDeclaration __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct GlobalConstDeclaration where
+  buildStruct _proxy
+    (GlobalConstDeclaration __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (GlobalConstDeclaration __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData GlobalConstDeclaration where
+  rnf (GlobalConstDeclaration __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default GlobalConstDeclaration where
+  def = GlobalConstDeclaration Default.def Prelude.Nothing
+
+instance Hashable.Hashable GlobalConstDeclaration where
+  hashWithSalt __salt (GlobalConstDeclaration _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type FunctionDeclaration_id = Glean.Id
+
+data FunctionDeclaration = FunctionDeclaration{functionDeclaration_id
+                                               :: {-# UNPACK #-} !FunctionDeclaration_id,
+                                               functionDeclaration_key ::
+                                               Prelude.Maybe FunctionDeclaration_key}
+                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FunctionDeclaration where
+  toJSON (FunctionDeclaration __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct FunctionDeclaration where
+  buildStruct _proxy (FunctionDeclaration __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (FunctionDeclaration __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData FunctionDeclaration where
+  rnf (FunctionDeclaration __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default FunctionDeclaration where
+  def = FunctionDeclaration Default.def Prelude.Nothing
+
+instance Hashable.Hashable FunctionDeclaration where
+  hashWithSalt __salt (FunctionDeclaration _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type FilePackage_id = Glean.Id
+
+data FilePackage = FilePackage{filePackage_id ::
+                               {-# UNPACK #-} !FilePackage_id,
+                               filePackage_key :: Prelude.Maybe FilePackage_key}
+                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FilePackage where
+  toJSON (FilePackage __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct FilePackage where
+  buildStruct _proxy (FilePackage __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (FilePackage __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData FilePackage where
+  rnf (FilePackage __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default FilePackage where
+  def = FilePackage Default.def Prelude.Nothing
+
+instance Hashable.Hashable FilePackage where
+  hashWithSalt __salt (FilePackage _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type FileHasRedundantPackageOverride_id = Glean.Id
+
+data FileHasRedundantPackageOverride = FileHasRedundantPackageOverride{fileHasRedundantPackageOverride_id
+                                                                       ::
+                                                                       {-# UNPACK #-} !FileHasRedundantPackageOverride_id,
+                                                                       fileHasRedundantPackageOverride_key
+                                                                       ::
+                                                                       Prelude.Maybe
+                                                                         Glean.Schema.Src.File}
+                                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FileHasRedundantPackageOverride where
+  toJSON (FileHasRedundantPackageOverride __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct FileHasRedundantPackageOverride where
+  buildStruct _proxy
+    (FileHasRedundantPackageOverride __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (FileHasRedundantPackageOverride __val__id
+                                                  __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData FileHasRedundantPackageOverride where
+  rnf (FileHasRedundantPackageOverride __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default FileHasRedundantPackageOverride where
+  def = FileHasRedundantPackageOverride Default.def Prelude.Nothing
+
+instance Hashable.Hashable FileHasRedundantPackageOverride where
+  hashWithSalt __salt (FileHasRedundantPackageOverride _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type FileHasPackageOverride_id = Glean.Id
+
+data FileHasPackageOverride = FileHasPackageOverride{fileHasPackageOverride_id
+                                                     :: {-# UNPACK #-} !FileHasPackageOverride_id,
+                                                     fileHasPackageOverride_key ::
+                                                     Prelude.Maybe Glean.Schema.Src.File}
+                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FileHasPackageOverride where
+  toJSON (FileHasPackageOverride __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct FileHasPackageOverride where
+  buildStruct _proxy
+    (FileHasPackageOverride __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (FileHasPackageOverride __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData FileHasPackageOverride where
+  rnf (FileHasPackageOverride __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default FileHasPackageOverride where
+  def = FileHasPackageOverride Default.def Prelude.Nothing
+
+instance Hashable.Hashable FileHasPackageOverride where
+  hashWithSalt __salt (FileHasPackageOverride _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type Hint_id = Glean.Id
+
+data Hint = Hint{hint_id :: {-# UNPACK #-} !Hint_id,
+                 hint_key :: Prelude.Maybe Hint_key}
+            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Hint where
+  toJSON (Hint __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct Hint where
+  buildStruct _proxy (Hint __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (Hint __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData Hint where
+  rnf (Hint __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default Hint where
+  def = Hint Default.def Prelude.Nothing
+
+instance Hashable.Hashable Hint where
+  hashWithSalt __salt (Hint _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type Enumerator_id = Glean.Id
+
+data Enumerator = Enumerator{enumerator_id ::
+                             {-# UNPACK #-} !Enumerator_id,
+                             enumerator_key :: Prelude.Maybe Enumerator_key}
+                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Enumerator where
+  toJSON (Enumerator __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct Enumerator where
+  buildStruct _proxy (Enumerator __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (Enumerator __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData Enumerator where
+  rnf (Enumerator __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default Enumerator where
+  def = Enumerator Default.def Prelude.Nothing
+
+instance Hashable.Hashable Enumerator where
+  hashWithSalt __salt (Enumerator _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type EnumDefinition_id = Glean.Id
+
+data EnumDefinition = EnumDefinition{enumDefinition_id ::
+                                     {-# UNPACK #-} !EnumDefinition_id,
+                                     enumDefinition_key :: Prelude.Maybe EnumDefinition_key}
+                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON EnumDefinition where
+  toJSON (EnumDefinition __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct EnumDefinition where
+  buildStruct _proxy (EnumDefinition __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (EnumDefinition __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData EnumDefinition where
+  rnf (EnumDefinition __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default EnumDefinition where
+  def = EnumDefinition Default.def Prelude.Nothing
+
+instance Hashable.Hashable EnumDefinition where
+  hashWithSalt __salt (EnumDefinition _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type EnumDeclaration_id = Glean.Id
+
+data EnumDeclaration = EnumDeclaration{enumDeclaration_id ::
+                                       {-# UNPACK #-} !EnumDeclaration_id,
+                                       enumDeclaration_key :: Prelude.Maybe EnumDeclaration_key}
+                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON EnumDeclaration where
+  toJSON (EnumDeclaration __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct EnumDeclaration where
+  buildStruct _proxy (EnumDeclaration __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (EnumDeclaration __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData EnumDeclaration where
+  rnf (EnumDeclaration __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default EnumDeclaration where
+  def = EnumDeclaration Default.def Prelude.Nothing
+
+instance Hashable.Hashable EnumDeclaration where
+  hashWithSalt __salt (EnumDeclaration _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type Context__id = Glean.Id
+
+data Context_ = Context_{context__id ::
+                         {-# UNPACK #-} !Context__id,
+                         context__key :: Prelude.Maybe Text.Text}
+                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Context_ where
+  toJSON (Context_ __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct Context_ where
+  buildStruct _proxy (Context_ __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStringType _proxy)
+                                    2
+                                    1
+                                    (Thrift.genText _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (Context_ __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData Context_ where
+  rnf (Context_ __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default Context_ where
+  def = Context_ Default.def Prelude.Nothing
+
+instance Hashable.Hashable Context_ where
+  hashWithSalt __salt (Context_ _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type ContainerDeclarationQName_id = Glean.Id
+
+data ContainerDeclarationQName = ContainerDeclarationQName{containerDeclarationQName_id
+                                                           ::
+                                                           {-# UNPACK #-} !ContainerDeclarationQName_id,
+                                                           containerDeclarationQName_key ::
+                                                           Prelude.Maybe ContainerDeclaration,
+                                                           containerDeclarationQName_value ::
+                                                           Prelude.Maybe
+                                                             ContainerDeclarationQName_value}
+                                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ContainerDeclarationQName where
+  toJSON
+    (ContainerDeclarationQName __field__id __field__key __field__value)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             (Prelude.maybe Prelude.id ((:) . ("value" .=)) __field__value
+                Prelude.mempty))
+
+instance Thrift.ThriftStruct ContainerDeclarationQName where
+  buildStruct _proxy
+    (ContainerDeclarationQName __field__id __field__key __field__value)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           let (__cereal__key, __id__key)
+                 = case __field__key of
+                     Prelude.Just _val -> ((:)
+                                             (Thrift.genField _proxy "key"
+                                                (Thrift.getStructType _proxy)
+                                                2
+                                                1
+                                                (Thrift.buildStruct _proxy _val)),
+                                           2)
+                     Prelude.Nothing -> (Prelude.id, 1)
+             in
+             __cereal__key
+               (case __field__value of
+                  Prelude.Just _val -> Thrift.genField _proxy "value"
+                                         (Thrift.getStructType _proxy)
+                                         3
+                                         __id__key
+                                         (Thrift.buildStruct _proxy _val)
+                                         : []
+                  Prelude.Nothing -> []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            __field__value <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__value
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             !__val__value <- ST.readSTRef __field__value
+                                             Prelude.pure
+                                               (ContainerDeclarationQName __val__id __val__key
+                                                  __val__value)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2), ("value", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData ContainerDeclarationQName where
+  rnf
+    (ContainerDeclarationQName __field__id __field__key __field__value)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq`
+          DeepSeq.rnf __field__value `Prelude.seq` ()
+
+instance Default.Default ContainerDeclarationQName where
+  def
+    = ContainerDeclarationQName Default.def Prelude.Nothing
+        Prelude.Nothing
+
+instance Hashable.Hashable ContainerDeclarationQName where
+  hashWithSalt __salt (ContainerDeclarationQName _id _key _value)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key)
+        _value
+
+type ContainerParent_id = Glean.Id
+
+data ContainerParent = ContainerParent{containerParent_id ::
+                                       {-# UNPACK #-} !ContainerParent_id,
+                                       containerParent_key :: Prelude.Maybe ContainerParent_key}
+                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ContainerParent where
+  toJSON (ContainerParent __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct ContainerParent where
+  buildStruct _proxy (ContainerParent __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (ContainerParent __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ContainerParent where
+  rnf (ContainerParent __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default ContainerParent where
+  def = ContainerParent Default.def Prelude.Nothing
+
+instance Hashable.Hashable ContainerParent where
+  hashWithSalt __salt (ContainerParent _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type DeclarationComment_id = Glean.Id
+
+data DeclarationComment = DeclarationComment{declarationComment_id
+                                             :: {-# UNPACK #-} !DeclarationComment_id,
+                                             declarationComment_key ::
+                                             Prelude.Maybe DeclarationComment_key}
+                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON DeclarationComment where
+  toJSON (DeclarationComment __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct DeclarationComment where
+  buildStruct _proxy (DeclarationComment __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (DeclarationComment __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData DeclarationComment where
+  rnf (DeclarationComment __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default DeclarationComment where
+  def = DeclarationComment Default.def Prelude.Nothing
+
+instance Hashable.Hashable DeclarationComment where
+  hashWithSalt __salt (DeclarationComment _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type DeclarationLocation_id = Glean.Id
+
+data DeclarationLocation = DeclarationLocation{declarationLocation_id
+                                               :: {-# UNPACK #-} !DeclarationLocation_id,
+                                               declarationLocation_key ::
+                                               Prelude.Maybe DeclarationLocation_key}
+                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON DeclarationLocation where
+  toJSON (DeclarationLocation __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct DeclarationLocation where
+  buildStruct _proxy (DeclarationLocation __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (DeclarationLocation __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData DeclarationLocation where
+  rnf (DeclarationLocation __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default DeclarationLocation where
+  def = DeclarationLocation Default.def Prelude.Nothing
+
+instance Hashable.Hashable DeclarationLocation where
+  hashWithSalt __salt (DeclarationLocation _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type DeclarationName_id = Glean.Id
+
+data DeclarationName = DeclarationName{declarationName_id ::
+                                       {-# UNPACK #-} !DeclarationName_id,
+                                       declarationName_key :: Prelude.Maybe Declaration,
+                                       declarationName_value :: Prelude.Maybe DeclarationName_value}
+                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON DeclarationName where
+  toJSON (DeclarationName __field__id __field__key __field__value)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             (Prelude.maybe Prelude.id ((:) . ("value" .=)) __field__value
+                Prelude.mempty))
+
+instance Thrift.ThriftStruct DeclarationName where
+  buildStruct _proxy
+    (DeclarationName __field__id __field__key __field__value)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           let (__cereal__key, __id__key)
+                 = case __field__key of
+                     Prelude.Just _val -> ((:)
+                                             (Thrift.genField _proxy "key"
+                                                (Thrift.getStructType _proxy)
+                                                2
+                                                1
+                                                (Thrift.buildStruct _proxy _val)),
+                                           2)
+                     Prelude.Nothing -> (Prelude.id, 1)
+             in
+             __cereal__key
+               (case __field__value of
+                  Prelude.Just _val -> Thrift.genField _proxy "value"
+                                         (Thrift.getStructType _proxy)
+                                         3
+                                         __id__key
+                                         (Thrift.buildStruct _proxy _val)
+                                         : []
+                  Prelude.Nothing -> []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            __field__value <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__value
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             !__val__value <- ST.readSTRef __field__value
+                                             Prelude.pure
+                                               (DeclarationName __val__id __val__key __val__value)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2), ("value", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData DeclarationName where
+  rnf (DeclarationName __field__id __field__key __field__value)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq`
+          DeepSeq.rnf __field__value `Prelude.seq` ()
+
+instance Default.Default DeclarationName where
+  def = DeclarationName Default.def Prelude.Nothing Prelude.Nothing
+
+instance Hashable.Hashable DeclarationName where
+  hashWithSalt __salt (DeclarationName _id _key _value)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key)
+        _value
+
+type DeclarationNamespace_id = Glean.Id
+
+data DeclarationNamespace = DeclarationNamespace{declarationNamespace_id
+                                                 :: {-# UNPACK #-} !DeclarationNamespace_id,
+                                                 declarationNamespace_key ::
+                                                 Prelude.Maybe DeclarationNamespace_key}
+                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON DeclarationNamespace where
+  toJSON (DeclarationNamespace __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct DeclarationNamespace where
+  buildStruct _proxy (DeclarationNamespace __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (DeclarationNamespace __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData DeclarationNamespace where
+  rnf (DeclarationNamespace __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default DeclarationNamespace where
+  def = DeclarationNamespace Default.def Prelude.Nothing
+
+instance Hashable.Hashable DeclarationNamespace where
+  hashWithSalt __salt (DeclarationNamespace _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type DeclarationSource_id = Glean.Id
+
+data DeclarationSource = DeclarationSource{declarationSource_id ::
+                                           {-# UNPACK #-} !DeclarationSource_id,
+                                           declarationSource_key ::
+                                           Prelude.Maybe DeclarationSource_key}
+                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON DeclarationSource where
+  toJSON (DeclarationSource __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct DeclarationSource where
+  buildStruct _proxy (DeclarationSource __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (DeclarationSource __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData DeclarationSource where
+  rnf (DeclarationSource __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default DeclarationSource where
+  def = DeclarationSource Default.def Prelude.Nothing
+
+instance Hashable.Hashable DeclarationSource where
+  hashWithSalt __salt (DeclarationSource _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type DeclarationSpan_id = Glean.Id
+
+data DeclarationSpan = DeclarationSpan{declarationSpan_id ::
+                                       {-# UNPACK #-} !DeclarationSpan_id,
+                                       declarationSpan_key :: Prelude.Maybe DeclarationSpan_key}
+                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON DeclarationSpan where
+  toJSON (DeclarationSpan __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct DeclarationSpan where
+  buildStruct _proxy (DeclarationSpan __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (DeclarationSpan __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData DeclarationSpan where
+  rnf (DeclarationSpan __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default DeclarationSpan where
+  def = DeclarationSpan Default.def Prelude.Nothing
+
+instance Hashable.Hashable DeclarationSpan where
+  hashWithSalt __salt (DeclarationSpan _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type DeclarationTarget_id = Glean.Id
+
+data DeclarationTarget = DeclarationTarget{declarationTarget_id ::
+                                           {-# UNPACK #-} !DeclarationTarget_id,
+                                           declarationTarget_key ::
+                                           Prelude.Maybe DeclarationTarget_key}
+                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON DeclarationTarget where
+  toJSON (DeclarationTarget __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct DeclarationTarget where
+  buildStruct _proxy (DeclarationTarget __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (DeclarationTarget __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData DeclarationTarget where
+  rnf (DeclarationTarget __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default DeclarationTarget where
+  def = DeclarationTarget Default.def Prelude.Nothing
+
+instance Hashable.Hashable DeclarationTarget where
+  hashWithSalt __salt (DeclarationTarget _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type DefinitionToDeclaration_id = Glean.Id
+
+data DefinitionToDeclaration = DefinitionToDeclaration{definitionToDeclaration_id
+                                                       ::
+                                                       {-# UNPACK #-} !DefinitionToDeclaration_id,
+                                                       definitionToDeclaration_key ::
+                                                       Prelude.Maybe DefinitionToDeclaration_key}
+                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON DefinitionToDeclaration where
+  toJSON (DefinitionToDeclaration __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct DefinitionToDeclaration where
+  buildStruct _proxy
+    (DefinitionToDeclaration __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (DefinitionToDeclaration __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData DefinitionToDeclaration where
+  rnf (DefinitionToDeclaration __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default DefinitionToDeclaration where
+  def = DefinitionToDeclaration Default.def Prelude.Nothing
+
+instance Hashable.Hashable DefinitionToDeclaration where
+  hashWithSalt __salt (DefinitionToDeclaration _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type FileDeclarations_id = Glean.Id
+
+data FileDeclarations = FileDeclarations{fileDeclarations_id ::
+                                         {-# UNPACK #-} !FileDeclarations_id,
+                                         fileDeclarations_key :: Prelude.Maybe FileDeclarations_key}
+                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FileDeclarations where
+  toJSON (FileDeclarations __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct FileDeclarations where
+  buildStruct _proxy (FileDeclarations __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (FileDeclarations __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData FileDeclarations where
+  rnf (FileDeclarations __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default FileDeclarations where
+  def = FileDeclarations Default.def Prelude.Nothing
+
+instance Hashable.Hashable FileDeclarations where
+  hashWithSalt __salt (FileDeclarations _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type HackToThrift_id = Glean.Id
+
+data HackToThrift = HackToThrift{hackToThrift_id ::
+                                 {-# UNPACK #-} !HackToThrift_id,
+                                 hackToThrift_key :: Prelude.Maybe HackToThrift_key}
+                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON HackToThrift where
+  toJSON (HackToThrift __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct HackToThrift where
+  buildStruct _proxy (HackToThrift __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (HackToThrift __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData HackToThrift where
+  rnf (HackToThrift __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default HackToThrift where
+  def = HackToThrift Default.def Prelude.Nothing
+
+instance Hashable.Hashable HackToThrift where
+  hashWithSalt __salt (HackToThrift _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type MemberCluster_id = Glean.Id
+
+data MemberCluster = MemberCluster{memberCluster_id ::
+                                   {-# UNPACK #-} !MemberCluster_id,
+                                   memberCluster_key :: Prelude.Maybe MemberCluster_key}
+                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON MemberCluster where
+  toJSON (MemberCluster __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct MemberCluster where
+  buildStruct _proxy (MemberCluster __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (MemberCluster __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData MemberCluster where
+  rnf (MemberCluster __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default MemberCluster where
+  def = MemberCluster Default.def Prelude.Nothing
+
+instance Hashable.Hashable MemberCluster where
+  hashWithSalt __salt (MemberCluster _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type ModuleChild_id = Glean.Id
+
+data ModuleChild = ModuleChild{moduleChild_id ::
+                               {-# UNPACK #-} !ModuleChild_id,
+                               moduleChild_key :: Prelude.Maybe ModuleChild_key}
+                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ModuleChild where
+  toJSON (ModuleChild __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct ModuleChild where
+  buildStruct _proxy (ModuleChild __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (ModuleChild __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ModuleChild where
+  rnf (ModuleChild __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default ModuleChild where
+  def = ModuleChild Default.def Prelude.Nothing
+
+instance Hashable.Hashable ModuleChild where
+  hashWithSalt __salt (ModuleChild _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type ModuleParent_id = Glean.Id
+
+data ModuleParent = ModuleParent{moduleParent_id ::
+                                 {-# UNPACK #-} !ModuleParent_id,
+                                 moduleParent_key :: Prelude.Maybe ModuleParent_key}
+                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ModuleParent where
+  toJSON (ModuleParent __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct ModuleParent where
+  buildStruct _proxy (ModuleParent __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (ModuleParent __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ModuleParent where
+  rnf (ModuleParent __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default ModuleParent where
+  def = ModuleParent Default.def Prelude.Nothing
+
+instance Hashable.Hashable ModuleParent where
+  hashWithSalt __salt (ModuleParent _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type NamespaceMember_id = Glean.Id
+
+data NamespaceMember = NamespaceMember{namespaceMember_id ::
+                                       {-# UNPACK #-} !NamespaceMember_id,
+                                       namespaceMember_key :: Prelude.Maybe NamespaceMember_key}
+                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON NamespaceMember where
+  toJSON (NamespaceMember __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct NamespaceMember where
+  buildStruct _proxy (NamespaceMember __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (NamespaceMember __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData NamespaceMember where
+  rnf (NamespaceMember __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default NamespaceMember where
+  def = NamespaceMember Default.def Prelude.Nothing
+
+instance Hashable.Hashable NamespaceMember where
+  hashWithSalt __salt (NamespaceMember _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SearchClassByName_id = Glean.Id
+
+data SearchClassByName = SearchClassByName{searchClassByName_id ::
+                                           {-# UNPACK #-} !SearchClassByName_id,
+                                           searchClassByName_key ::
+                                           Prelude.Maybe SearchClassByName_key}
+                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchClassByName where
+  toJSON (SearchClassByName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchClassByName where
+  buildStruct _proxy (SearchClassByName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (SearchClassByName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchClassByName where
+  rnf (SearchClassByName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SearchClassByName where
+  def = SearchClassByName Default.def Prelude.Nothing
+
+instance Hashable.Hashable SearchClassByName where
+  hashWithSalt __salt (SearchClassByName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SearchClassConstByName_id = Glean.Id
+
+data SearchClassConstByName = SearchClassConstByName{searchClassConstByName_id
+                                                     :: {-# UNPACK #-} !SearchClassConstByName_id,
+                                                     searchClassConstByName_key ::
+                                                     Prelude.Maybe SearchClassConstByName_key}
+                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchClassConstByName where
+  toJSON (SearchClassConstByName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchClassConstByName where
+  buildStruct _proxy
+    (SearchClassConstByName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (SearchClassConstByName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchClassConstByName where
+  rnf (SearchClassConstByName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SearchClassConstByName where
+  def = SearchClassConstByName Default.def Prelude.Nothing
+
+instance Hashable.Hashable SearchClassConstByName where
+  hashWithSalt __salt (SearchClassConstByName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SearchEnumByName_id = Glean.Id
+
+data SearchEnumByName = SearchEnumByName{searchEnumByName_id ::
+                                         {-# UNPACK #-} !SearchEnumByName_id,
+                                         searchEnumByName_key :: Prelude.Maybe SearchEnumByName_key}
+                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchEnumByName where
+  toJSON (SearchEnumByName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchEnumByName where
+  buildStruct _proxy (SearchEnumByName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (SearchEnumByName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchEnumByName where
+  rnf (SearchEnumByName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SearchEnumByName where
+  def = SearchEnumByName Default.def Prelude.Nothing
+
+instance Hashable.Hashable SearchEnumByName where
+  hashWithSalt __salt (SearchEnumByName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SearchEnumeratorByName_id = Glean.Id
+
+data SearchEnumeratorByName = SearchEnumeratorByName{searchEnumeratorByName_id
+                                                     :: {-# UNPACK #-} !SearchEnumeratorByName_id,
+                                                     searchEnumeratorByName_key ::
+                                                     Prelude.Maybe SearchEnumeratorByName_key}
+                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchEnumeratorByName where
+  toJSON (SearchEnumeratorByName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchEnumeratorByName where
+  buildStruct _proxy
+    (SearchEnumeratorByName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (SearchEnumeratorByName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchEnumeratorByName where
+  rnf (SearchEnumeratorByName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SearchEnumeratorByName where
+  def = SearchEnumeratorByName Default.def Prelude.Nothing
+
+instance Hashable.Hashable SearchEnumeratorByName where
+  hashWithSalt __salt (SearchEnumeratorByName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SearchFunctionByName_id = Glean.Id
+
+data SearchFunctionByName = SearchFunctionByName{searchFunctionByName_id
+                                                 :: {-# UNPACK #-} !SearchFunctionByName_id,
+                                                 searchFunctionByName_key ::
+                                                 Prelude.Maybe SearchFunctionByName_key}
+                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchFunctionByName where
+  toJSON (SearchFunctionByName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchFunctionByName where
+  buildStruct _proxy (SearchFunctionByName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (SearchFunctionByName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchFunctionByName where
+  rnf (SearchFunctionByName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SearchFunctionByName where
+  def = SearchFunctionByName Default.def Prelude.Nothing
+
+instance Hashable.Hashable SearchFunctionByName where
+  hashWithSalt __salt (SearchFunctionByName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SearchGlobalConstByName_id = Glean.Id
+
+data SearchGlobalConstByName = SearchGlobalConstByName{searchGlobalConstByName_id
+                                                       ::
+                                                       {-# UNPACK #-} !SearchGlobalConstByName_id,
+                                                       searchGlobalConstByName_key ::
+                                                       Prelude.Maybe SearchGlobalConstByName_key}
+                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchGlobalConstByName where
+  toJSON (SearchGlobalConstByName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchGlobalConstByName where
+  buildStruct _proxy
+    (SearchGlobalConstByName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (SearchGlobalConstByName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchGlobalConstByName where
+  rnf (SearchGlobalConstByName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SearchGlobalConstByName where
+  def = SearchGlobalConstByName Default.def Prelude.Nothing
+
+instance Hashable.Hashable SearchGlobalConstByName where
+  hashWithSalt __salt (SearchGlobalConstByName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SearchInterfaceByName_id = Glean.Id
+
+data SearchInterfaceByName = SearchInterfaceByName{searchInterfaceByName_id
+                                                   :: {-# UNPACK #-} !SearchInterfaceByName_id,
+                                                   searchInterfaceByName_key ::
+                                                   Prelude.Maybe SearchInterfaceByName_key}
+                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchInterfaceByName where
+  toJSON (SearchInterfaceByName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchInterfaceByName where
+  buildStruct _proxy (SearchInterfaceByName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (SearchInterfaceByName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchInterfaceByName where
+  rnf (SearchInterfaceByName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SearchInterfaceByName where
+  def = SearchInterfaceByName Default.def Prelude.Nothing
+
+instance Hashable.Hashable SearchInterfaceByName where
+  hashWithSalt __salt (SearchInterfaceByName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SearchMethodByName_id = Glean.Id
+
+data SearchMethodByName = SearchMethodByName{searchMethodByName_id
+                                             :: {-# UNPACK #-} !SearchMethodByName_id,
+                                             searchMethodByName_key ::
+                                             Prelude.Maybe SearchMethodByName_key}
+                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchMethodByName where
+  toJSON (SearchMethodByName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchMethodByName where
+  buildStruct _proxy (SearchMethodByName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (SearchMethodByName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchMethodByName where
+  rnf (SearchMethodByName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SearchMethodByName where
+  def = SearchMethodByName Default.def Prelude.Nothing
+
+instance Hashable.Hashable SearchMethodByName where
+  hashWithSalt __salt (SearchMethodByName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SearchModuleByName_id = Glean.Id
+
+data SearchModuleByName = SearchModuleByName{searchModuleByName_id
+                                             :: {-# UNPACK #-} !SearchModuleByName_id,
+                                             searchModuleByName_key ::
+                                             Prelude.Maybe SearchModuleByName_key}
+                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchModuleByName where
+  toJSON (SearchModuleByName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchModuleByName where
+  buildStruct _proxy (SearchModuleByName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (SearchModuleByName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchModuleByName where
+  rnf (SearchModuleByName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SearchModuleByName where
+  def = SearchModuleByName Default.def Prelude.Nothing
+
+instance Hashable.Hashable SearchModuleByName where
+  hashWithSalt __salt (SearchModuleByName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SearchNamespaceByName_id = Glean.Id
+
+data SearchNamespaceByName = SearchNamespaceByName{searchNamespaceByName_id
+                                                   :: {-# UNPACK #-} !SearchNamespaceByName_id,
+                                                   searchNamespaceByName_key ::
+                                                   Prelude.Maybe SearchNamespaceByName_key}
+                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchNamespaceByName where
+  toJSON (SearchNamespaceByName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchNamespaceByName where
+  buildStruct _proxy (SearchNamespaceByName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (SearchNamespaceByName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchNamespaceByName where
+  rnf (SearchNamespaceByName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SearchNamespaceByName where
+  def = SearchNamespaceByName Default.def Prelude.Nothing
+
+instance Hashable.Hashable SearchNamespaceByName where
+  hashWithSalt __salt (SearchNamespaceByName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SearchPropertyByName_id = Glean.Id
+
+data SearchPropertyByName = SearchPropertyByName{searchPropertyByName_id
+                                                 :: {-# UNPACK #-} !SearchPropertyByName_id,
+                                                 searchPropertyByName_key ::
+                                                 Prelude.Maybe SearchPropertyByName_key}
+                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchPropertyByName where
+  toJSON (SearchPropertyByName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchPropertyByName where
+  buildStruct _proxy (SearchPropertyByName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (SearchPropertyByName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchPropertyByName where
+  rnf (SearchPropertyByName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SearchPropertyByName where
+  def = SearchPropertyByName Default.def Prelude.Nothing
+
+instance Hashable.Hashable SearchPropertyByName where
+  hashWithSalt __salt (SearchPropertyByName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SearchTraitByName_id = Glean.Id
+
+data SearchTraitByName = SearchTraitByName{searchTraitByName_id ::
+                                           {-# UNPACK #-} !SearchTraitByName_id,
+                                           searchTraitByName_key ::
+                                           Prelude.Maybe SearchTraitByName_key}
+                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchTraitByName where
+  toJSON (SearchTraitByName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchTraitByName where
+  buildStruct _proxy (SearchTraitByName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (SearchTraitByName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchTraitByName where
+  rnf (SearchTraitByName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SearchTraitByName where
+  def = SearchTraitByName Default.def Prelude.Nothing
+
+instance Hashable.Hashable SearchTraitByName where
+  hashWithSalt __salt (SearchTraitByName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SearchTypeConstByName_id = Glean.Id
+
+data SearchTypeConstByName = SearchTypeConstByName{searchTypeConstByName_id
+                                                   :: {-# UNPACK #-} !SearchTypeConstByName_id,
+                                                   searchTypeConstByName_key ::
+                                                   Prelude.Maybe SearchTypeConstByName_key}
+                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchTypeConstByName where
+  toJSON (SearchTypeConstByName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchTypeConstByName where
+  buildStruct _proxy (SearchTypeConstByName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (SearchTypeConstByName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchTypeConstByName where
+  rnf (SearchTypeConstByName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SearchTypeConstByName where
+  def = SearchTypeConstByName Default.def Prelude.Nothing
+
+instance Hashable.Hashable SearchTypeConstByName where
+  hashWithSalt __salt (SearchTypeConstByName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SearchTypedefByName_id = Glean.Id
+
+data SearchTypedefByName = SearchTypedefByName{searchTypedefByName_id
+                                               :: {-# UNPACK #-} !SearchTypedefByName_id,
+                                               searchTypedefByName_key ::
+                                               Prelude.Maybe SearchTypedefByName_key}
+                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchTypedefByName where
+  toJSON (SearchTypedefByName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchTypedefByName where
+  buildStruct _proxy (SearchTypedefByName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (SearchTypedefByName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchTypedefByName where
+  rnf (SearchTypedefByName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SearchTypedefByName where
+  def = SearchTypedefByName Default.def Prelude.Nothing
+
+instance Hashable.Hashable SearchTypedefByName where
+  hashWithSalt __salt (SearchTypedefByName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type ThriftToHack_id = Glean.Id
+
+data ThriftToHack = ThriftToHack{thriftToHack_id ::
+                                 {-# UNPACK #-} !ThriftToHack_id,
+                                 thriftToHack_key :: Prelude.Maybe ThriftToHack_key}
+                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ThriftToHack where
+  toJSON (ThriftToHack __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct ThriftToHack where
+  buildStruct _proxy (ThriftToHack __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (ThriftToHack __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ThriftToHack where
+  rnf (ThriftToHack __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default ThriftToHack where
+  def = ThriftToHack Default.def Prelude.Nothing
+
+instance Hashable.Hashable ThriftToHack where
+  hashWithSalt __salt (ThriftToHack _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type TargetUses_id = Glean.Id
+
+data TargetUses = TargetUses{targetUses_id ::
+                             {-# UNPACK #-} !TargetUses_id,
+                             targetUses_key :: Prelude.Maybe TargetUses_key}
+                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TargetUses where
+  toJSON (TargetUses __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct TargetUses where
+  buildStruct _proxy (TargetUses __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (TargetUses __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData TargetUses where
+  rnf (TargetUses __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default TargetUses where
+  def = TargetUses Default.def Prelude.Nothing
+
+instance Hashable.Hashable TargetUses where
+  hashWithSalt __salt (TargetUses _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type TargetUsesAbs_id = Glean.Id
+
+data TargetUsesAbs = TargetUsesAbs{targetUsesAbs_id ::
+                                   {-# UNPACK #-} !TargetUsesAbs_id,
+                                   targetUsesAbs_key :: Prelude.Maybe TargetUsesAbs_key}
+                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TargetUsesAbs where
+  toJSON (TargetUsesAbs __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct TargetUsesAbs where
+  buildStruct _proxy (TargetUsesAbs __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (TargetUsesAbs __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData TargetUsesAbs where
+  rnf (TargetUsesAbs __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default TargetUsesAbs where
+  def = TargetUsesAbs Default.def Prelude.Nothing
+
+instance Hashable.Hashable TargetUsesAbs where
+  hashWithSalt __salt (TargetUsesAbs _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type FileXRefs_id = Glean.Id
+
+data FileXRefs = FileXRefs{fileXRefs_id ::
+                           {-# UNPACK #-} !FileXRefs_id,
+                           fileXRefs_key :: Prelude.Maybe FileXRefs_key}
+                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FileXRefs where
+  toJSON (FileXRefs __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct FileXRefs where
+  buildStruct _proxy (FileXRefs __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (FileXRefs __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData FileXRefs where
+  rnf (FileXRefs __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default FileXRefs where
+  def = FileXRefs Default.def Prelude.Nothing
+
+instance Hashable.Hashable FileXRefs where
+  hashWithSalt __salt (FileXRefs _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type TypeInfo_id = Glean.Id
+
+data TypeInfo = TypeInfo{typeInfo_id ::
+                         {-# UNPACK #-} !TypeInfo_id,
+                         typeInfo_key :: Prelude.Maybe TypeInfo_key}
+                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TypeInfo where
+  toJSON (TypeInfo __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct TypeInfo where
+  buildStruct _proxy (TypeInfo __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (TypeInfo __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData TypeInfo where
+  rnf (TypeInfo __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default TypeInfo where
+  def = TypeInfo Default.def Prelude.Nothing
+
+instance Hashable.Hashable TypeInfo where
+  hashWithSalt __salt (TypeInfo _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type InheritedMembers_id = Glean.Id
+
+data InheritedMembers = InheritedMembers{inheritedMembers_id ::
+                                         {-# UNPACK #-} !InheritedMembers_id,
+                                         inheritedMembers_key :: Prelude.Maybe InheritedMembers_key}
+                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON InheritedMembers where
+  toJSON (InheritedMembers __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct InheritedMembers where
+  buildStruct _proxy (InheritedMembers __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (InheritedMembers __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData InheritedMembers where
+  rnf (InheritedMembers __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default InheritedMembers where
+  def = InheritedMembers Default.def Prelude.Nothing
+
+instance Hashable.Hashable InheritedMembers where
+  hashWithSalt __salt (InheritedMembers _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type MethodDeclaration_id = Glean.Id
+
+data MethodDeclaration = MethodDeclaration{methodDeclaration_id ::
+                                           {-# UNPACK #-} !MethodDeclaration_id,
+                                           methodDeclaration_key ::
+                                           Prelude.Maybe MethodDeclaration_key}
+                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON MethodDeclaration where
+  toJSON (MethodDeclaration __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct MethodDeclaration where
+  buildStruct _proxy (MethodDeclaration __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (MethodDeclaration __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData MethodDeclaration where
+  rnf (MethodDeclaration __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default MethodDeclaration where
+  def = MethodDeclaration Default.def Prelude.Nothing
+
+instance Hashable.Hashable MethodDeclaration where
+  hashWithSalt __salt (MethodDeclaration _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type PropertyDeclaration_id = Glean.Id
+
+data PropertyDeclaration = PropertyDeclaration{propertyDeclaration_id
+                                               :: {-# UNPACK #-} !PropertyDeclaration_id,
+                                               propertyDeclaration_key ::
+                                               Prelude.Maybe PropertyDeclaration_key}
+                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON PropertyDeclaration where
+  toJSON (PropertyDeclaration __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct PropertyDeclaration where
+  buildStruct _proxy (PropertyDeclaration __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (PropertyDeclaration __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData PropertyDeclaration where
+  rnf (PropertyDeclaration __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default PropertyDeclaration where
+  def = PropertyDeclaration Default.def Prelude.Nothing
+
+instance Hashable.Hashable PropertyDeclaration where
+  hashWithSalt __salt (PropertyDeclaration _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type TypeConstDeclaration_id = Glean.Id
+
+data TypeConstDeclaration = TypeConstDeclaration{typeConstDeclaration_id
+                                                 :: {-# UNPACK #-} !TypeConstDeclaration_id,
+                                                 typeConstDeclaration_key ::
+                                                 Prelude.Maybe TypeConstDeclaration_key}
+                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TypeConstDeclaration where
+  toJSON (TypeConstDeclaration __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct TypeConstDeclaration where
+  buildStruct _proxy (TypeConstDeclaration __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (TypeConstDeclaration __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData TypeConstDeclaration where
+  rnf (TypeConstDeclaration __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default TypeConstDeclaration where
+  def = TypeConstDeclaration Default.def Prelude.Nothing
+
+instance Hashable.Hashable TypeConstDeclaration where
+  hashWithSalt __salt (TypeConstDeclaration _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type ContainerChild_id = Glean.Id
+
+data ContainerChild = ContainerChild{containerChild_id ::
+                                     {-# UNPACK #-} !ContainerChild_id,
+                                     containerChild_key :: Prelude.Maybe ContainerChild_key}
+                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ContainerChild where
+  toJSON (ContainerChild __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct ContainerChild where
+  buildStruct _proxy (ContainerChild __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (ContainerChild __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ContainerChild where
+  rnf (ContainerChild __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default ContainerChild where
+  def = ContainerChild Default.def Prelude.Nothing
+
+instance Hashable.Hashable ContainerChild where
+  hashWithSalt __salt (ContainerChild _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type FunctionDefinition_id = Glean.Id
+
+data FunctionDefinition = FunctionDefinition{functionDefinition_id
+                                             :: {-# UNPACK #-} !FunctionDefinition_id,
+                                             functionDefinition_key ::
+                                             Prelude.Maybe FunctionDefinition_key}
+                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FunctionDefinition where
+  toJSON (FunctionDefinition __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct FunctionDefinition where
+  buildStruct _proxy (FunctionDefinition __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (FunctionDefinition __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData FunctionDefinition where
+  rnf (FunctionDefinition __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default FunctionDefinition where
+  def = FunctionDefinition Default.def Prelude.Nothing
+
+instance Hashable.Hashable FunctionDefinition where
+  hashWithSalt __salt (FunctionDefinition _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type InterfaceDefinition_id = Glean.Id
+
+data InterfaceDefinition = InterfaceDefinition{interfaceDefinition_id
+                                               :: {-# UNPACK #-} !InterfaceDefinition_id,
+                                               interfaceDefinition_key ::
+                                               Prelude.Maybe InterfaceDefinition_key}
+                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON InterfaceDefinition where
+  toJSON (InterfaceDefinition __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct InterfaceDefinition where
+  buildStruct _proxy (InterfaceDefinition __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (InterfaceDefinition __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData InterfaceDefinition where
+  rnf (InterfaceDefinition __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default InterfaceDefinition where
+  def = InterfaceDefinition Default.def Prelude.Nothing
+
+instance Hashable.Hashable InterfaceDefinition where
+  hashWithSalt __salt (InterfaceDefinition _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type MethodDefinition_id = Glean.Id
+
+data MethodDefinition = MethodDefinition{methodDefinition_id ::
+                                         {-# UNPACK #-} !MethodDefinition_id,
+                                         methodDefinition_key :: Prelude.Maybe MethodDefinition_key}
+                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON MethodDefinition where
+  toJSON (MethodDefinition __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct MethodDefinition where
+  buildStruct _proxy (MethodDefinition __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (MethodDefinition __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData MethodDefinition where
+  rnf (MethodDefinition __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default MethodDefinition where
+  def = MethodDefinition Default.def Prelude.Nothing
+
+instance Hashable.Hashable MethodDefinition where
+  hashWithSalt __salt (MethodDefinition _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type TraitDefinition_id = Glean.Id
+
+data TraitDefinition = TraitDefinition{traitDefinition_id ::
+                                       {-# UNPACK #-} !TraitDefinition_id,
+                                       traitDefinition_key :: Prelude.Maybe TraitDefinition_key}
+                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TraitDefinition where
+  toJSON (TraitDefinition __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct TraitDefinition where
+  buildStruct _proxy (TraitDefinition __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (TraitDefinition __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData TraitDefinition where
+  rnf (TraitDefinition __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default TraitDefinition where
+  def = TraitDefinition Default.def Prelude.Nothing
+
+instance Hashable.Hashable TraitDefinition where
+  hashWithSalt __salt (TraitDefinition _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type TypedefDefinition_id = Glean.Id
+
+data TypedefDefinition = TypedefDefinition{typedefDefinition_id ::
+                                           {-# UNPACK #-} !TypedefDefinition_id,
+                                           typedefDefinition_key ::
+                                           Prelude.Maybe TypedefDefinition_key}
+                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TypedefDefinition where
+  toJSON (TypedefDefinition __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct TypedefDefinition where
+  buildStruct _proxy (TypedefDefinition __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (TypedefDefinition __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData TypedefDefinition where
+  rnf (TypedefDefinition __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default TypedefDefinition where
+  def = TypedefDefinition Default.def Prelude.Nothing
+
+instance Hashable.Hashable TypedefDefinition where
+  hashWithSalt __salt (TypedefDefinition _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type ClassDefinition_id = Glean.Id
+
+data ClassDefinition = ClassDefinition{classDefinition_id ::
+                                       {-# UNPACK #-} !ClassDefinition_id,
+                                       classDefinition_key :: Prelude.Maybe ClassDefinition_key}
+                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ClassDefinition where
+  toJSON (ClassDefinition __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct ClassDefinition where
+  buildStruct _proxy (ClassDefinition __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (ClassDefinition __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ClassDefinition where
+  rnf (ClassDefinition __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default ClassDefinition where
+  def = ClassDefinition Default.def Prelude.Nothing
+
+instance Hashable.Hashable ClassDefinition where
+  hashWithSalt __salt (ClassDefinition _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type ClassDeclaration_id = Glean.Id
+
+data ClassDeclaration = ClassDeclaration{classDeclaration_id ::
+                                         {-# UNPACK #-} !ClassDeclaration_id,
+                                         classDeclaration_key :: Prelude.Maybe ClassDeclaration_key}
+                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ClassDeclaration where
+  toJSON (ClassDeclaration __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct ClassDeclaration where
+  buildStruct _proxy (ClassDeclaration __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (ClassDeclaration __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ClassDeclaration where
+  rnf (ClassDeclaration __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default ClassDeclaration where
+  def = ClassDeclaration Default.def Prelude.Nothing
+
+instance Hashable.Hashable ClassDeclaration where
+  hashWithSalt __salt (ClassDeclaration _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type ClassConstDefinition_id = Glean.Id
+
+data ClassConstDefinition = ClassConstDefinition{classConstDefinition_id
+                                                 :: {-# UNPACK #-} !ClassConstDefinition_id,
+                                                 classConstDefinition_key ::
+                                                 Prelude.Maybe ClassConstDefinition_key}
+                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ClassConstDefinition where
+  toJSON (ClassConstDefinition __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct ClassConstDefinition where
+  buildStruct _proxy (ClassConstDefinition __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (ClassConstDefinition __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ClassConstDefinition where
+  rnf (ClassConstDefinition __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default ClassConstDefinition where
+  def = ClassConstDefinition Default.def Prelude.Nothing
+
+instance Hashable.Hashable ClassConstDefinition where
+  hashWithSalt __salt (ClassConstDefinition _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type ClassConstDeclaration_id = Glean.Id
+
+data ClassConstDeclaration = ClassConstDeclaration{classConstDeclaration_id
+                                                   :: {-# UNPACK #-} !ClassConstDeclaration_id,
+                                                   classConstDeclaration_key ::
+                                                   Prelude.Maybe ClassConstDeclaration_key}
+                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ClassConstDeclaration where
+  toJSON (ClassConstDeclaration __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct ClassConstDeclaration where
+  buildStruct _proxy (ClassConstDeclaration __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (ClassConstDeclaration __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ClassConstDeclaration where
+  rnf (ClassConstDeclaration __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default ClassConstDeclaration where
+  def = ClassConstDeclaration Default.def Prelude.Nothing
+
+instance Hashable.Hashable ClassConstDeclaration where
+  hashWithSalt __salt (ClassConstDeclaration _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type AttributeToDefinition_id = Glean.Id
+
+data AttributeToDefinition = AttributeToDefinition{attributeToDefinition_id
+                                                   :: {-# UNPACK #-} !AttributeToDefinition_id,
+                                                   attributeToDefinition_key ::
+                                                   Prelude.Maybe AttributeToDefinition_key}
+                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON AttributeToDefinition where
+  toJSON (AttributeToDefinition __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct AttributeToDefinition where
+  buildStruct _proxy (AttributeToDefinition __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (AttributeToDefinition __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData AttributeToDefinition where
+  rnf (AttributeToDefinition __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default AttributeToDefinition where
+  def = AttributeToDefinition Default.def Prelude.Nothing
+
+instance Hashable.Hashable AttributeToDefinition where
+  hashWithSalt __salt (AttributeToDefinition _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type AttributeToDeclaration_id = Glean.Id
+
+data AttributeToDeclaration = AttributeToDeclaration{attributeToDeclaration_id
+                                                     :: {-# UNPACK #-} !AttributeToDeclaration_id,
+                                                     attributeToDeclaration_key ::
+                                                     Prelude.Maybe AttributeToDeclaration_key}
+                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON AttributeToDeclaration where
+  toJSON (AttributeToDeclaration __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct AttributeToDeclaration where
+  buildStruct _proxy
+    (AttributeToDeclaration __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (AttributeToDeclaration __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData AttributeToDeclaration where
+  rnf (AttributeToDeclaration __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default AttributeToDeclaration where
+  def = AttributeToDeclaration Default.def Prelude.Nothing
+
+instance Hashable.Hashable AttributeToDeclaration where
+  hashWithSalt __salt (AttributeToDeclaration _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type AttributeHasParameter_id = Glean.Id
+
+data AttributeHasParameter = AttributeHasParameter{attributeHasParameter_id
+                                                   :: {-# UNPACK #-} !AttributeHasParameter_id,
+                                                   attributeHasParameter_key ::
+                                                   Prelude.Maybe AttributeHasParameter_key}
+                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON AttributeHasParameter where
+  toJSON (AttributeHasParameter __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct AttributeHasParameter where
+  buildStruct _proxy (AttributeHasParameter __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (AttributeHasParameter __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData AttributeHasParameter where
+  rnf (AttributeHasParameter __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default AttributeHasParameter where
+  def = AttributeHasParameter Default.def Prelude.Nothing
+
+instance Hashable.Hashable AttributeHasParameter where
+  hashWithSalt __salt (AttributeHasParameter _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type FileCall_id = Glean.Id
+
+data FileCall = FileCall{fileCall_id ::
+                         {-# UNPACK #-} !FileCall_id,
+                         fileCall_key :: Prelude.Maybe FileCall_key}
+                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FileCall where
+  toJSON (FileCall __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct FileCall where
+  buildStruct _proxy (FileCall __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (FileCall __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData FileCall where
+  rnf (FileCall __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default FileCall where
+  def = FileCall Default.def Prelude.Nothing
+
+instance Hashable.Hashable FileCall where
+  hashWithSalt __salt (FileCall _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+data Visibility = Visibility_Private
+                | Visibility_Protected
+                | Visibility_Public
+                | Visibility_Internal
+                | Visibility_ProtectedInternal
+                | Visibility__UNKNOWN Prelude.Int
+                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Visibility where
+  toJSON = Aeson.toJSON . Thrift.fromThriftEnum
+
+instance DeepSeq.NFData Visibility where
+  rnf __Visibility = Prelude.seq __Visibility ()
+
+instance Default.Default Visibility where
+  def = Visibility_Private
+
+instance Hashable.Hashable Visibility where
+  hashWithSalt _salt _val
+    = Hashable.hashWithSalt _salt (Thrift.fromThriftEnum _val)
+
+instance Thrift.ThriftEnum Visibility where
+  toThriftEnum 0 = Visibility_Private
+  toThriftEnum 1 = Visibility_Protected
+  toThriftEnum 2 = Visibility_Public
+  toThriftEnum 3 = Visibility_Internal
+  toThriftEnum 4 = Visibility_ProtectedInternal
+  toThriftEnum val = Visibility__UNKNOWN val
+  fromThriftEnum Visibility_Private = 0
+  fromThriftEnum Visibility_Protected = 1
+  fromThriftEnum Visibility_Public = 2
+  fromThriftEnum Visibility_Internal = 3
+  fromThriftEnum Visibility_ProtectedInternal = 4
+  fromThriftEnum (Visibility__UNKNOWN val) = val
+  allThriftEnumValues
+    = [Visibility_Private, Visibility_Protected, Visibility_Public,
+       Visibility_Internal, Visibility_ProtectedInternal]
+  toThriftEnumEither 0 = Prelude.Right Visibility_Private
+  toThriftEnumEither 1 = Prelude.Right Visibility_Protected
+  toThriftEnumEither 2 = Prelude.Right Visibility_Public
+  toThriftEnumEither 3 = Prelude.Right Visibility_Internal
+  toThriftEnumEither 4 = Prelude.Right Visibility_ProtectedInternal
+  toThriftEnumEither val
+    = Prelude.Left
+        ("toThriftEnumEither: not a valid identifier for enum Visibility: "
+           ++ Prelude.show val)
+
+data Variance = Variance_Contravariant
+              | Variance_Covariant
+              | Variance_Invariant
+              | Variance__UNKNOWN Prelude.Int
+                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Variance where
+  toJSON = Aeson.toJSON . Thrift.fromThriftEnum
+
+instance DeepSeq.NFData Variance where
+  rnf __Variance = Prelude.seq __Variance ()
+
+instance Default.Default Variance where
+  def = Variance_Contravariant
+
+instance Hashable.Hashable Variance where
+  hashWithSalt _salt _val
+    = Hashable.hashWithSalt _salt (Thrift.fromThriftEnum _val)
+
+instance Thrift.ThriftEnum Variance where
+  toThriftEnum 0 = Variance_Contravariant
+  toThriftEnum 1 = Variance_Covariant
+  toThriftEnum 2 = Variance_Invariant
+  toThriftEnum val = Variance__UNKNOWN val
+  fromThriftEnum Variance_Contravariant = 0
+  fromThriftEnum Variance_Covariant = 1
+  fromThriftEnum Variance_Invariant = 2
+  fromThriftEnum (Variance__UNKNOWN val) = val
+  allThriftEnumValues
+    = [Variance_Contravariant, Variance_Covariant, Variance_Invariant]
+  toThriftEnumEither 0 = Prelude.Right Variance_Contravariant
+  toThriftEnumEither 1 = Prelude.Right Variance_Covariant
+  toThriftEnumEither 2 = Prelude.Right Variance_Invariant
+  toThriftEnumEither val
+    = Prelude.Left
+        ("toThriftEnumEither: not a valid identifier for enum Variance: "
+           ++ Prelude.show val)
+
+data UserAttribute_key = UserAttribute_key{userAttribute_key_name
+                                           :: Name,
+                                           userAttribute_key_parameters :: [Text.Text],
+                                           userAttribute_key_qname :: Prelude.Maybe QName}
+                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON UserAttribute_key where
+  toJSON
+    (UserAttribute_key __field__name __field__parameters
+       __field__qname)
+    = Aeson.object
+        ("name" .= __field__name :
+           "parameters" .= __field__parameters :
+             Prelude.maybe Prelude.id ((:) . ("qname" .=)) __field__qname
+               Prelude.mempty)
+
+instance Thrift.ThriftStruct UserAttribute_key where
+  buildStruct _proxy
+    (UserAttribute_key __field__name __field__parameters
+       __field__qname)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__name)
+           :
+           Thrift.genField _proxy "parameters" (Thrift.getListType _proxy) 2 1
+             (Thrift.genList _proxy (Thrift.getStringType _proxy)
+                (Thrift.genText _proxy)
+                __field__parameters)
+             :
+             case __field__qname of
+               Prelude.Just _val -> Thrift.genField _proxy "qname"
+                                      (Thrift.getStructType _proxy)
+                                      3
+                                      2
+                                      (Thrift.buildStruct _proxy _val)
+                                      : []
+               Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef Default.def
+            __field__parameters <- ST.newSTRef Default.def
+            __field__qname <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseText
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__parameters
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__qname
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__parameters <- ST.readSTRef __field__parameters
+                                             !__val__qname <- ST.readSTRef __field__qname
+                                             Prelude.pure
+                                               (UserAttribute_key __val__name __val__parameters
+                                                  __val__qname)
+              _idMap
+                = HashMap.fromList [("name", 1), ("parameters", 2), ("qname", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData UserAttribute_key where
+  rnf
+    (UserAttribute_key __field__name __field__parameters
+       __field__qname)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__parameters `Prelude.seq`
+          DeepSeq.rnf __field__qname `Prelude.seq` ()
+
+instance Default.Default UserAttribute_key where
+  def = UserAttribute_key Default.def Default.def Prelude.Nothing
+
+instance Hashable.Hashable UserAttribute_key where
+  hashWithSalt __salt (UserAttribute_key _name _parameters _qname)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+           _parameters)
+        _qname
+
+newtype TypedefDeclaration_key = TypedefDeclaration_key{typedefDeclaration_key_name
+                                                        :: QName}
+                                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TypedefDeclaration_key where
+  toJSON (TypedefDeclaration_key __field__name)
+    = Aeson.object ("name" .= __field__name : Prelude.mempty)
+
+instance Thrift.ThriftStruct TypedefDeclaration_key where
+  buildStruct _proxy (TypedefDeclaration_key __field__name)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__name)
+           : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             Prelude.pure (TypedefDeclaration_key __val__name)
+              _idMap = HashMap.fromList [("name", 1)]
+            _parse 0)
+
+instance DeepSeq.NFData TypedefDeclaration_key where
+  rnf (TypedefDeclaration_key __field__name)
+    = DeepSeq.rnf __field__name `Prelude.seq` ()
+
+instance Default.Default TypedefDeclaration_key where
+  def = TypedefDeclaration_key Default.def
+
+instance Hashable.Hashable TypedefDeclaration_key where
+  hashWithSalt __salt (TypedefDeclaration_key _name)
+    = Hashable.hashWithSalt __salt _name
+
+data TypeConstKind = TypeConstKind_Abstract
+                   | TypeConstKind_Concrete
+                   | TypeConstKind_PartiallyAbstract
+                   | TypeConstKind__UNKNOWN Prelude.Int
+                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TypeConstKind where
+  toJSON = Aeson.toJSON . Thrift.fromThriftEnum
+
+instance DeepSeq.NFData TypeConstKind where
+  rnf __TypeConstKind = Prelude.seq __TypeConstKind ()
+
+instance Default.Default TypeConstKind where
+  def = TypeConstKind_Abstract
+
+instance Hashable.Hashable TypeConstKind where
+  hashWithSalt _salt _val
+    = Hashable.hashWithSalt _salt (Thrift.fromThriftEnum _val)
+
+instance Thrift.ThriftEnum TypeConstKind where
+  toThriftEnum 0 = TypeConstKind_Abstract
+  toThriftEnum 1 = TypeConstKind_Concrete
+  toThriftEnum 2 = TypeConstKind_PartiallyAbstract
+  toThriftEnum val = TypeConstKind__UNKNOWN val
+  fromThriftEnum TypeConstKind_Abstract = 0
+  fromThriftEnum TypeConstKind_Concrete = 1
+  fromThriftEnum TypeConstKind_PartiallyAbstract = 2
+  fromThriftEnum (TypeConstKind__UNKNOWN val) = val
+  allThriftEnumValues
+    = [TypeConstKind_Abstract, TypeConstKind_Concrete,
+       TypeConstKind_PartiallyAbstract]
+  toThriftEnumEither 0 = Prelude.Right TypeConstKind_Abstract
+  toThriftEnumEither 1 = Prelude.Right TypeConstKind_Concrete
+  toThriftEnumEither 2
+    = Prelude.Right TypeConstKind_PartiallyAbstract
+  toThriftEnumEither val
+    = Prelude.Left
+        ("toThriftEnumEither: not a valid identifier for enum TypeConstKind: "
+           ++ Prelude.show val)
+
+data TypeConstDefinition_key = TypeConstDefinition_key{typeConstDefinition_key_declaration
+                                                       :: TypeConstDeclaration,
+                                                       typeConstDefinition_key_type ::
+                                                       Prelude.Maybe Type,
+                                                       typeConstDefinition_key_kind ::
+                                                       TypeConstKind,
+                                                       typeConstDefinition_key_attributes ::
+                                                       [UserAttribute],
+                                                       typeConstDefinition_key_typeInfo ::
+                                                       Prelude.Maybe TypeInfo}
+                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TypeConstDefinition_key where
+  toJSON
+    (TypeConstDefinition_key __field__declaration __field__type
+       __field__kind __field__attributes __field__typeInfo)
+    = Aeson.object
+        ("declaration" .= __field__declaration :
+           Prelude.maybe Prelude.id ((:) . ("type" .=)) __field__type
+             ("kind" .= __field__kind :
+                "attributes" .= __field__attributes :
+                  Prelude.maybe Prelude.id ((:) . ("typeInfo" .=)) __field__typeInfo
+                    Prelude.mempty))
+
+instance Thrift.ThriftStruct TypeConstDefinition_key where
+  buildStruct _proxy
+    (TypeConstDefinition_key __field__declaration __field__type
+       __field__kind __field__attributes __field__typeInfo)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "declaration" (Thrift.getStructType _proxy)
+           1
+           0
+           (Thrift.buildStruct _proxy __field__declaration)
+           :
+           let (__cereal__type, __id__type)
+                 = case __field__type of
+                     Prelude.Just _val -> ((:)
+                                             (Thrift.genField _proxy "type"
+                                                (Thrift.getStructType _proxy)
+                                                2
+                                                1
+                                                (Thrift.buildStruct _proxy _val)),
+                                           2)
+                     Prelude.Nothing -> (Prelude.id, 1)
+             in
+             __cereal__type
+               (Thrift.genField _proxy "kind" (Thrift.getI32Type _proxy) 3
+                  __id__type
+                  ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                      Thrift.fromThriftEnum)
+                     __field__kind)
+                  :
+                  Thrift.genField _proxy "attributes" (Thrift.getListType _proxy) 4 3
+                    (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                       (Thrift.buildStruct _proxy)
+                       __field__attributes)
+                    :
+                    case __field__typeInfo of
+                      Prelude.Just _val -> Thrift.genField _proxy "typeInfo"
+                                             (Thrift.getStructType _proxy)
+                                             5
+                                             4
+                                             (Thrift.buildStruct _proxy _val)
+                                             : []
+                      Prelude.Nothing -> []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__declaration <- ST.newSTRef Default.def
+            __field__type <- ST.newSTRef Prelude.Nothing
+            __field__kind <- ST.newSTRef Default.def
+            __field__attributes <- ST.newSTRef Default.def
+            __field__typeInfo <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__declaration
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__type
+                                                                          (Prelude.Just _val)
+                                                                 3 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "TypeConstKind")
+                                                                        ST.writeSTRef __field__kind
+                                                                          _val
+                                                                 4 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__attributes
+                                                                          _val
+                                                                 5 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__typeInfo
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__declaration <- ST.readSTRef
+                                                                      __field__declaration
+                                             !__val__type <- ST.readSTRef __field__type
+                                             !__val__kind <- ST.readSTRef __field__kind
+                                             !__val__attributes <- ST.readSTRef __field__attributes
+                                             !__val__typeInfo <- ST.readSTRef __field__typeInfo
+                                             Prelude.pure
+                                               (TypeConstDefinition_key __val__declaration
+                                                  __val__type
+                                                  __val__kind
+                                                  __val__attributes
+                                                  __val__typeInfo)
+              _idMap
+                = HashMap.fromList
+                    [("declaration", 1), ("type", 2), ("kind", 3), ("attributes", 4),
+                     ("typeInfo", 5)]
+            _parse 0)
+
+instance DeepSeq.NFData TypeConstDefinition_key where
+  rnf
+    (TypeConstDefinition_key __field__declaration __field__type
+       __field__kind __field__attributes __field__typeInfo)
+    = DeepSeq.rnf __field__declaration `Prelude.seq`
+        DeepSeq.rnf __field__type `Prelude.seq`
+          DeepSeq.rnf __field__kind `Prelude.seq`
+            DeepSeq.rnf __field__attributes `Prelude.seq`
+              DeepSeq.rnf __field__typeInfo `Prelude.seq` ()
+
+instance Default.Default TypeConstDefinition_key where
+  def
+    = TypeConstDefinition_key Default.def Prelude.Nothing Default.def
+        Default.def
+        Prelude.Nothing
+
+instance Hashable.Hashable TypeConstDefinition_key where
+  hashWithSalt __salt
+    (TypeConstDefinition_key _declaration _type _kind _attributes
+       _typeInfo)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt
+              (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _declaration)
+                 _type)
+              _kind)
+           _attributes)
+        _typeInfo
+
+newtype TraitDeclaration_key = TraitDeclaration_key{traitDeclaration_key_name
+                                                    :: QName}
+                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TraitDeclaration_key where
+  toJSON (TraitDeclaration_key __field__name)
+    = Aeson.object ("name" .= __field__name : Prelude.mempty)
+
+instance Thrift.ThriftStruct TraitDeclaration_key where
+  buildStruct _proxy (TraitDeclaration_key __field__name)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__name)
+           : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             Prelude.pure (TraitDeclaration_key __val__name)
+              _idMap = HashMap.fromList [("name", 1)]
+            _parse 0)
+
+instance DeepSeq.NFData TraitDeclaration_key where
+  rnf (TraitDeclaration_key __field__name)
+    = DeepSeq.rnf __field__name `Prelude.seq` ()
+
+instance Default.Default TraitDeclaration_key where
+  def = TraitDeclaration_key Default.def
+
+instance Hashable.Hashable TraitDeclaration_key where
+  hashWithSalt __salt (TraitDeclaration_key _name)
+    = Hashable.hashWithSalt __salt _name
+
+data SearchTypedefByLowerCaseName_key = SearchTypedefByLowerCaseName_key{searchTypedefByLowerCaseName_key_name_lowercase
+                                                                         :: Text.Text,
+                                                                         searchTypedefByLowerCaseName_key_name
+                                                                         :: Text.Text}
+                                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchTypedefByLowerCaseName_key where
+  toJSON
+    (SearchTypedefByLowerCaseName_key __field__name_lowercase
+       __field__name)
+    = Aeson.object
+        ("name_lowercase" .= __field__name_lowercase :
+           "name" .= __field__name : Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchTypedefByLowerCaseName_key where
+  buildStruct _proxy
+    (SearchTypedefByLowerCaseName_key __field__name_lowercase
+       __field__name)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name_lowercase"
+           (Thrift.getStringType _proxy)
+           1
+           0
+           (Thrift.genText _proxy __field__name_lowercase)
+           :
+           Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 2 1
+             (Thrift.genText _proxy __field__name)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name_lowercase <- ST.newSTRef ""
+            __field__name <- ST.newSTRef ""
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__name_lowercase
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name_lowercase <- ST.readSTRef
+                                                                         __field__name_lowercase
+                                             !__val__name <- ST.readSTRef __field__name
+                                             Prelude.pure
+                                               (SearchTypedefByLowerCaseName_key
+                                                  __val__name_lowercase
+                                                  __val__name)
+              _idMap = HashMap.fromList [("name_lowercase", 1), ("name", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchTypedefByLowerCaseName_key where
+  rnf
+    (SearchTypedefByLowerCaseName_key __field__name_lowercase
+       __field__name)
+    = DeepSeq.rnf __field__name_lowercase `Prelude.seq`
+        DeepSeq.rnf __field__name `Prelude.seq` ()
+
+instance Default.Default SearchTypedefByLowerCaseName_key where
+  def = SearchTypedefByLowerCaseName_key "" ""
+
+instance Hashable.Hashable SearchTypedefByLowerCaseName_key where
+  hashWithSalt __salt
+    (SearchTypedefByLowerCaseName_key _name_lowercase _name)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt __salt _name_lowercase)
+        _name
+
+data SearchTypeConstByLowerCaseName_key = SearchTypeConstByLowerCaseName_key{searchTypeConstByLowerCaseName_key_name_lowercase
+                                                                             :: Text.Text,
+                                                                             searchTypeConstByLowerCaseName_key_name
+                                                                             :: Text.Text}
+                                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchTypeConstByLowerCaseName_key where
+  toJSON
+    (SearchTypeConstByLowerCaseName_key __field__name_lowercase
+       __field__name)
+    = Aeson.object
+        ("name_lowercase" .= __field__name_lowercase :
+           "name" .= __field__name : Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchTypeConstByLowerCaseName_key
+         where
+  buildStruct _proxy
+    (SearchTypeConstByLowerCaseName_key __field__name_lowercase
+       __field__name)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name_lowercase"
+           (Thrift.getStringType _proxy)
+           1
+           0
+           (Thrift.genText _proxy __field__name_lowercase)
+           :
+           Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 2 1
+             (Thrift.genText _proxy __field__name)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name_lowercase <- ST.newSTRef ""
+            __field__name <- ST.newSTRef ""
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__name_lowercase
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name_lowercase <- ST.readSTRef
+                                                                         __field__name_lowercase
+                                             !__val__name <- ST.readSTRef __field__name
+                                             Prelude.pure
+                                               (SearchTypeConstByLowerCaseName_key
+                                                  __val__name_lowercase
+                                                  __val__name)
+              _idMap = HashMap.fromList [("name_lowercase", 1), ("name", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchTypeConstByLowerCaseName_key where
+  rnf
+    (SearchTypeConstByLowerCaseName_key __field__name_lowercase
+       __field__name)
+    = DeepSeq.rnf __field__name_lowercase `Prelude.seq`
+        DeepSeq.rnf __field__name `Prelude.seq` ()
+
+instance Default.Default SearchTypeConstByLowerCaseName_key where
+  def = SearchTypeConstByLowerCaseName_key "" ""
+
+instance Hashable.Hashable SearchTypeConstByLowerCaseName_key where
+  hashWithSalt __salt
+    (SearchTypeConstByLowerCaseName_key _name_lowercase _name)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt __salt _name_lowercase)
+        _name
+
+data SearchTraitByLowerCaseName_key = SearchTraitByLowerCaseName_key{searchTraitByLowerCaseName_key_name_lowercase
+                                                                     :: Text.Text,
+                                                                     searchTraitByLowerCaseName_key_name
+                                                                     :: Text.Text}
+                                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchTraitByLowerCaseName_key where
+  toJSON
+    (SearchTraitByLowerCaseName_key __field__name_lowercase
+       __field__name)
+    = Aeson.object
+        ("name_lowercase" .= __field__name_lowercase :
+           "name" .= __field__name : Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchTraitByLowerCaseName_key where
+  buildStruct _proxy
+    (SearchTraitByLowerCaseName_key __field__name_lowercase
+       __field__name)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name_lowercase"
+           (Thrift.getStringType _proxy)
+           1
+           0
+           (Thrift.genText _proxy __field__name_lowercase)
+           :
+           Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 2 1
+             (Thrift.genText _proxy __field__name)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name_lowercase <- ST.newSTRef ""
+            __field__name <- ST.newSTRef ""
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__name_lowercase
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name_lowercase <- ST.readSTRef
+                                                                         __field__name_lowercase
+                                             !__val__name <- ST.readSTRef __field__name
+                                             Prelude.pure
+                                               (SearchTraitByLowerCaseName_key __val__name_lowercase
+                                                  __val__name)
+              _idMap = HashMap.fromList [("name_lowercase", 1), ("name", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchTraitByLowerCaseName_key where
+  rnf
+    (SearchTraitByLowerCaseName_key __field__name_lowercase
+       __field__name)
+    = DeepSeq.rnf __field__name_lowercase `Prelude.seq`
+        DeepSeq.rnf __field__name `Prelude.seq` ()
+
+instance Default.Default SearchTraitByLowerCaseName_key where
+  def = SearchTraitByLowerCaseName_key "" ""
+
+instance Hashable.Hashable SearchTraitByLowerCaseName_key where
+  hashWithSalt __salt
+    (SearchTraitByLowerCaseName_key _name_lowercase _name)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt __salt _name_lowercase)
+        _name
+
+data SearchPropertyByLowerCaseName_key = SearchPropertyByLowerCaseName_key{searchPropertyByLowerCaseName_key_name_lowercase
+                                                                           :: Text.Text,
+                                                                           searchPropertyByLowerCaseName_key_name
+                                                                           :: Text.Text}
+                                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchPropertyByLowerCaseName_key where
+  toJSON
+    (SearchPropertyByLowerCaseName_key __field__name_lowercase
+       __field__name)
+    = Aeson.object
+        ("name_lowercase" .= __field__name_lowercase :
+           "name" .= __field__name : Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchPropertyByLowerCaseName_key
+         where
+  buildStruct _proxy
+    (SearchPropertyByLowerCaseName_key __field__name_lowercase
+       __field__name)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name_lowercase"
+           (Thrift.getStringType _proxy)
+           1
+           0
+           (Thrift.genText _proxy __field__name_lowercase)
+           :
+           Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 2 1
+             (Thrift.genText _proxy __field__name)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name_lowercase <- ST.newSTRef ""
+            __field__name <- ST.newSTRef ""
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__name_lowercase
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name_lowercase <- ST.readSTRef
+                                                                         __field__name_lowercase
+                                             !__val__name <- ST.readSTRef __field__name
+                                             Prelude.pure
+                                               (SearchPropertyByLowerCaseName_key
+                                                  __val__name_lowercase
+                                                  __val__name)
+              _idMap = HashMap.fromList [("name_lowercase", 1), ("name", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchPropertyByLowerCaseName_key where
+  rnf
+    (SearchPropertyByLowerCaseName_key __field__name_lowercase
+       __field__name)
+    = DeepSeq.rnf __field__name_lowercase `Prelude.seq`
+        DeepSeq.rnf __field__name `Prelude.seq` ()
+
+instance Default.Default SearchPropertyByLowerCaseName_key where
+  def = SearchPropertyByLowerCaseName_key "" ""
+
+instance Hashable.Hashable SearchPropertyByLowerCaseName_key where
+  hashWithSalt __salt
+    (SearchPropertyByLowerCaseName_key _name_lowercase _name)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt __salt _name_lowercase)
+        _name
+
+data SearchNamespaceByLowerCaseName_key = SearchNamespaceByLowerCaseName_key{searchNamespaceByLowerCaseName_key_name_lowercase
+                                                                             :: Text.Text,
+                                                                             searchNamespaceByLowerCaseName_key_name
+                                                                             :: Text.Text}
+                                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchNamespaceByLowerCaseName_key where
+  toJSON
+    (SearchNamespaceByLowerCaseName_key __field__name_lowercase
+       __field__name)
+    = Aeson.object
+        ("name_lowercase" .= __field__name_lowercase :
+           "name" .= __field__name : Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchNamespaceByLowerCaseName_key
+         where
+  buildStruct _proxy
+    (SearchNamespaceByLowerCaseName_key __field__name_lowercase
+       __field__name)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name_lowercase"
+           (Thrift.getStringType _proxy)
+           1
+           0
+           (Thrift.genText _proxy __field__name_lowercase)
+           :
+           Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 2 1
+             (Thrift.genText _proxy __field__name)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name_lowercase <- ST.newSTRef ""
+            __field__name <- ST.newSTRef ""
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__name_lowercase
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name_lowercase <- ST.readSTRef
+                                                                         __field__name_lowercase
+                                             !__val__name <- ST.readSTRef __field__name
+                                             Prelude.pure
+                                               (SearchNamespaceByLowerCaseName_key
+                                                  __val__name_lowercase
+                                                  __val__name)
+              _idMap = HashMap.fromList [("name_lowercase", 1), ("name", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchNamespaceByLowerCaseName_key where
+  rnf
+    (SearchNamespaceByLowerCaseName_key __field__name_lowercase
+       __field__name)
+    = DeepSeq.rnf __field__name_lowercase `Prelude.seq`
+        DeepSeq.rnf __field__name `Prelude.seq` ()
+
+instance Default.Default SearchNamespaceByLowerCaseName_key where
+  def = SearchNamespaceByLowerCaseName_key "" ""
+
+instance Hashable.Hashable SearchNamespaceByLowerCaseName_key where
+  hashWithSalt __salt
+    (SearchNamespaceByLowerCaseName_key _name_lowercase _name)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt __salt _name_lowercase)
+        _name
+
+data SearchModuleByLowerCaseName_key = SearchModuleByLowerCaseName_key{searchModuleByLowerCaseName_key_name_lowercase
+                                                                       :: Text.Text,
+                                                                       searchModuleByLowerCaseName_key_name
+                                                                       :: Text.Text}
+                                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchModuleByLowerCaseName_key where
+  toJSON
+    (SearchModuleByLowerCaseName_key __field__name_lowercase
+       __field__name)
+    = Aeson.object
+        ("name_lowercase" .= __field__name_lowercase :
+           "name" .= __field__name : Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchModuleByLowerCaseName_key where
+  buildStruct _proxy
+    (SearchModuleByLowerCaseName_key __field__name_lowercase
+       __field__name)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name_lowercase"
+           (Thrift.getStringType _proxy)
+           1
+           0
+           (Thrift.genText _proxy __field__name_lowercase)
+           :
+           Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 2 1
+             (Thrift.genText _proxy __field__name)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name_lowercase <- ST.newSTRef ""
+            __field__name <- ST.newSTRef ""
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__name_lowercase
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name_lowercase <- ST.readSTRef
+                                                                         __field__name_lowercase
+                                             !__val__name <- ST.readSTRef __field__name
+                                             Prelude.pure
+                                               (SearchModuleByLowerCaseName_key
+                                                  __val__name_lowercase
+                                                  __val__name)
+              _idMap = HashMap.fromList [("name_lowercase", 1), ("name", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchModuleByLowerCaseName_key where
+  rnf
+    (SearchModuleByLowerCaseName_key __field__name_lowercase
+       __field__name)
+    = DeepSeq.rnf __field__name_lowercase `Prelude.seq`
+        DeepSeq.rnf __field__name `Prelude.seq` ()
+
+instance Default.Default SearchModuleByLowerCaseName_key where
+  def = SearchModuleByLowerCaseName_key "" ""
+
+instance Hashable.Hashable SearchModuleByLowerCaseName_key where
+  hashWithSalt __salt
+    (SearchModuleByLowerCaseName_key _name_lowercase _name)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt __salt _name_lowercase)
+        _name
+
+data SearchMethodByLowerCaseName_key = SearchMethodByLowerCaseName_key{searchMethodByLowerCaseName_key_name_lowercase
+                                                                       :: Text.Text,
+                                                                       searchMethodByLowerCaseName_key_name
+                                                                       :: Text.Text}
+                                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchMethodByLowerCaseName_key where
+  toJSON
+    (SearchMethodByLowerCaseName_key __field__name_lowercase
+       __field__name)
+    = Aeson.object
+        ("name_lowercase" .= __field__name_lowercase :
+           "name" .= __field__name : Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchMethodByLowerCaseName_key where
+  buildStruct _proxy
+    (SearchMethodByLowerCaseName_key __field__name_lowercase
+       __field__name)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name_lowercase"
+           (Thrift.getStringType _proxy)
+           1
+           0
+           (Thrift.genText _proxy __field__name_lowercase)
+           :
+           Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 2 1
+             (Thrift.genText _proxy __field__name)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name_lowercase <- ST.newSTRef ""
+            __field__name <- ST.newSTRef ""
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__name_lowercase
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name_lowercase <- ST.readSTRef
+                                                                         __field__name_lowercase
+                                             !__val__name <- ST.readSTRef __field__name
+                                             Prelude.pure
+                                               (SearchMethodByLowerCaseName_key
+                                                  __val__name_lowercase
+                                                  __val__name)
+              _idMap = HashMap.fromList [("name_lowercase", 1), ("name", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchMethodByLowerCaseName_key where
+  rnf
+    (SearchMethodByLowerCaseName_key __field__name_lowercase
+       __field__name)
+    = DeepSeq.rnf __field__name_lowercase `Prelude.seq`
+        DeepSeq.rnf __field__name `Prelude.seq` ()
+
+instance Default.Default SearchMethodByLowerCaseName_key where
+  def = SearchMethodByLowerCaseName_key "" ""
+
+instance Hashable.Hashable SearchMethodByLowerCaseName_key where
+  hashWithSalt __salt
+    (SearchMethodByLowerCaseName_key _name_lowercase _name)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt __salt _name_lowercase)
+        _name
+
+data SearchInterfaceByLowerCaseName_key = SearchInterfaceByLowerCaseName_key{searchInterfaceByLowerCaseName_key_name_lowercase
+                                                                             :: Text.Text,
+                                                                             searchInterfaceByLowerCaseName_key_name
+                                                                             :: Text.Text}
+                                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchInterfaceByLowerCaseName_key where
+  toJSON
+    (SearchInterfaceByLowerCaseName_key __field__name_lowercase
+       __field__name)
+    = Aeson.object
+        ("name_lowercase" .= __field__name_lowercase :
+           "name" .= __field__name : Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchInterfaceByLowerCaseName_key
+         where
+  buildStruct _proxy
+    (SearchInterfaceByLowerCaseName_key __field__name_lowercase
+       __field__name)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name_lowercase"
+           (Thrift.getStringType _proxy)
+           1
+           0
+           (Thrift.genText _proxy __field__name_lowercase)
+           :
+           Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 2 1
+             (Thrift.genText _proxy __field__name)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name_lowercase <- ST.newSTRef ""
+            __field__name <- ST.newSTRef ""
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__name_lowercase
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name_lowercase <- ST.readSTRef
+                                                                         __field__name_lowercase
+                                             !__val__name <- ST.readSTRef __field__name
+                                             Prelude.pure
+                                               (SearchInterfaceByLowerCaseName_key
+                                                  __val__name_lowercase
+                                                  __val__name)
+              _idMap = HashMap.fromList [("name_lowercase", 1), ("name", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchInterfaceByLowerCaseName_key where
+  rnf
+    (SearchInterfaceByLowerCaseName_key __field__name_lowercase
+       __field__name)
+    = DeepSeq.rnf __field__name_lowercase `Prelude.seq`
+        DeepSeq.rnf __field__name `Prelude.seq` ()
+
+instance Default.Default SearchInterfaceByLowerCaseName_key where
+  def = SearchInterfaceByLowerCaseName_key "" ""
+
+instance Hashable.Hashable SearchInterfaceByLowerCaseName_key where
+  hashWithSalt __salt
+    (SearchInterfaceByLowerCaseName_key _name_lowercase _name)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt __salt _name_lowercase)
+        _name
+
+data SearchGlobalConstByLowerCaseName_key = SearchGlobalConstByLowerCaseName_key{searchGlobalConstByLowerCaseName_key_name_lowercase
+                                                                                 :: Text.Text,
+                                                                                 searchGlobalConstByLowerCaseName_key_name
+                                                                                 :: Text.Text}
+                                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchGlobalConstByLowerCaseName_key where
+  toJSON
+    (SearchGlobalConstByLowerCaseName_key __field__name_lowercase
+       __field__name)
+    = Aeson.object
+        ("name_lowercase" .= __field__name_lowercase :
+           "name" .= __field__name : Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchGlobalConstByLowerCaseName_key
+         where
+  buildStruct _proxy
+    (SearchGlobalConstByLowerCaseName_key __field__name_lowercase
+       __field__name)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name_lowercase"
+           (Thrift.getStringType _proxy)
+           1
+           0
+           (Thrift.genText _proxy __field__name_lowercase)
+           :
+           Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 2 1
+             (Thrift.genText _proxy __field__name)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name_lowercase <- ST.newSTRef ""
+            __field__name <- ST.newSTRef ""
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__name_lowercase
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name_lowercase <- ST.readSTRef
+                                                                         __field__name_lowercase
+                                             !__val__name <- ST.readSTRef __field__name
+                                             Prelude.pure
+                                               (SearchGlobalConstByLowerCaseName_key
+                                                  __val__name_lowercase
+                                                  __val__name)
+              _idMap = HashMap.fromList [("name_lowercase", 1), ("name", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchGlobalConstByLowerCaseName_key where
+  rnf
+    (SearchGlobalConstByLowerCaseName_key __field__name_lowercase
+       __field__name)
+    = DeepSeq.rnf __field__name_lowercase `Prelude.seq`
+        DeepSeq.rnf __field__name `Prelude.seq` ()
+
+instance Default.Default SearchGlobalConstByLowerCaseName_key where
+  def = SearchGlobalConstByLowerCaseName_key "" ""
+
+instance Hashable.Hashable SearchGlobalConstByLowerCaseName_key
+         where
+  hashWithSalt __salt
+    (SearchGlobalConstByLowerCaseName_key _name_lowercase _name)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt __salt _name_lowercase)
+        _name
+
+data SearchFunctionByLowerCaseName_key = SearchFunctionByLowerCaseName_key{searchFunctionByLowerCaseName_key_name_lowercase
+                                                                           :: Text.Text,
+                                                                           searchFunctionByLowerCaseName_key_name
+                                                                           :: Text.Text}
+                                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchFunctionByLowerCaseName_key where
+  toJSON
+    (SearchFunctionByLowerCaseName_key __field__name_lowercase
+       __field__name)
+    = Aeson.object
+        ("name_lowercase" .= __field__name_lowercase :
+           "name" .= __field__name : Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchFunctionByLowerCaseName_key
+         where
+  buildStruct _proxy
+    (SearchFunctionByLowerCaseName_key __field__name_lowercase
+       __field__name)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name_lowercase"
+           (Thrift.getStringType _proxy)
+           1
+           0
+           (Thrift.genText _proxy __field__name_lowercase)
+           :
+           Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 2 1
+             (Thrift.genText _proxy __field__name)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name_lowercase <- ST.newSTRef ""
+            __field__name <- ST.newSTRef ""
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__name_lowercase
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name_lowercase <- ST.readSTRef
+                                                                         __field__name_lowercase
+                                             !__val__name <- ST.readSTRef __field__name
+                                             Prelude.pure
+                                               (SearchFunctionByLowerCaseName_key
+                                                  __val__name_lowercase
+                                                  __val__name)
+              _idMap = HashMap.fromList [("name_lowercase", 1), ("name", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchFunctionByLowerCaseName_key where
+  rnf
+    (SearchFunctionByLowerCaseName_key __field__name_lowercase
+       __field__name)
+    = DeepSeq.rnf __field__name_lowercase `Prelude.seq`
+        DeepSeq.rnf __field__name `Prelude.seq` ()
+
+instance Default.Default SearchFunctionByLowerCaseName_key where
+  def = SearchFunctionByLowerCaseName_key "" ""
+
+instance Hashable.Hashable SearchFunctionByLowerCaseName_key where
+  hashWithSalt __salt
+    (SearchFunctionByLowerCaseName_key _name_lowercase _name)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt __salt _name_lowercase)
+        _name
+
+data SearchEnumeratorByLowerCaseName_key = SearchEnumeratorByLowerCaseName_key{searchEnumeratorByLowerCaseName_key_name_lowercase
+                                                                               :: Text.Text,
+                                                                               searchEnumeratorByLowerCaseName_key_name
+                                                                               :: Text.Text}
+                                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchEnumeratorByLowerCaseName_key where
+  toJSON
+    (SearchEnumeratorByLowerCaseName_key __field__name_lowercase
+       __field__name)
+    = Aeson.object
+        ("name_lowercase" .= __field__name_lowercase :
+           "name" .= __field__name : Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchEnumeratorByLowerCaseName_key
+         where
+  buildStruct _proxy
+    (SearchEnumeratorByLowerCaseName_key __field__name_lowercase
+       __field__name)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name_lowercase"
+           (Thrift.getStringType _proxy)
+           1
+           0
+           (Thrift.genText _proxy __field__name_lowercase)
+           :
+           Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 2 1
+             (Thrift.genText _proxy __field__name)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name_lowercase <- ST.newSTRef ""
+            __field__name <- ST.newSTRef ""
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__name_lowercase
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name_lowercase <- ST.readSTRef
+                                                                         __field__name_lowercase
+                                             !__val__name <- ST.readSTRef __field__name
+                                             Prelude.pure
+                                               (SearchEnumeratorByLowerCaseName_key
+                                                  __val__name_lowercase
+                                                  __val__name)
+              _idMap = HashMap.fromList [("name_lowercase", 1), ("name", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchEnumeratorByLowerCaseName_key where
+  rnf
+    (SearchEnumeratorByLowerCaseName_key __field__name_lowercase
+       __field__name)
+    = DeepSeq.rnf __field__name_lowercase `Prelude.seq`
+        DeepSeq.rnf __field__name `Prelude.seq` ()
+
+instance Default.Default SearchEnumeratorByLowerCaseName_key where
+  def = SearchEnumeratorByLowerCaseName_key "" ""
+
+instance Hashable.Hashable SearchEnumeratorByLowerCaseName_key
+         where
+  hashWithSalt __salt
+    (SearchEnumeratorByLowerCaseName_key _name_lowercase _name)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt __salt _name_lowercase)
+        _name
+
+data SearchEnumByLowerCaseName_key = SearchEnumByLowerCaseName_key{searchEnumByLowerCaseName_key_name_lowercase
+                                                                   :: Text.Text,
+                                                                   searchEnumByLowerCaseName_key_name
+                                                                   :: Text.Text}
+                                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchEnumByLowerCaseName_key where
+  toJSON
+    (SearchEnumByLowerCaseName_key __field__name_lowercase
+       __field__name)
+    = Aeson.object
+        ("name_lowercase" .= __field__name_lowercase :
+           "name" .= __field__name : Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchEnumByLowerCaseName_key where
+  buildStruct _proxy
+    (SearchEnumByLowerCaseName_key __field__name_lowercase
+       __field__name)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name_lowercase"
+           (Thrift.getStringType _proxy)
+           1
+           0
+           (Thrift.genText _proxy __field__name_lowercase)
+           :
+           Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 2 1
+             (Thrift.genText _proxy __field__name)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name_lowercase <- ST.newSTRef ""
+            __field__name <- ST.newSTRef ""
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__name_lowercase
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name_lowercase <- ST.readSTRef
+                                                                         __field__name_lowercase
+                                             !__val__name <- ST.readSTRef __field__name
+                                             Prelude.pure
+                                               (SearchEnumByLowerCaseName_key __val__name_lowercase
+                                                  __val__name)
+              _idMap = HashMap.fromList [("name_lowercase", 1), ("name", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchEnumByLowerCaseName_key where
+  rnf
+    (SearchEnumByLowerCaseName_key __field__name_lowercase
+       __field__name)
+    = DeepSeq.rnf __field__name_lowercase `Prelude.seq`
+        DeepSeq.rnf __field__name `Prelude.seq` ()
+
+instance Default.Default SearchEnumByLowerCaseName_key where
+  def = SearchEnumByLowerCaseName_key "" ""
+
+instance Hashable.Hashable SearchEnumByLowerCaseName_key where
+  hashWithSalt __salt
+    (SearchEnumByLowerCaseName_key _name_lowercase _name)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt __salt _name_lowercase)
+        _name
+
+data SearchClassConstByLowerCaseName_key = SearchClassConstByLowerCaseName_key{searchClassConstByLowerCaseName_key_name_lowercase
+                                                                               :: Text.Text,
+                                                                               searchClassConstByLowerCaseName_key_name
+                                                                               :: Text.Text}
+                                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchClassConstByLowerCaseName_key where
+  toJSON
+    (SearchClassConstByLowerCaseName_key __field__name_lowercase
+       __field__name)
+    = Aeson.object
+        ("name_lowercase" .= __field__name_lowercase :
+           "name" .= __field__name : Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchClassConstByLowerCaseName_key
+         where
+  buildStruct _proxy
+    (SearchClassConstByLowerCaseName_key __field__name_lowercase
+       __field__name)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name_lowercase"
+           (Thrift.getStringType _proxy)
+           1
+           0
+           (Thrift.genText _proxy __field__name_lowercase)
+           :
+           Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 2 1
+             (Thrift.genText _proxy __field__name)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name_lowercase <- ST.newSTRef ""
+            __field__name <- ST.newSTRef ""
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__name_lowercase
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name_lowercase <- ST.readSTRef
+                                                                         __field__name_lowercase
+                                             !__val__name <- ST.readSTRef __field__name
+                                             Prelude.pure
+                                               (SearchClassConstByLowerCaseName_key
+                                                  __val__name_lowercase
+                                                  __val__name)
+              _idMap = HashMap.fromList [("name_lowercase", 1), ("name", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchClassConstByLowerCaseName_key where
+  rnf
+    (SearchClassConstByLowerCaseName_key __field__name_lowercase
+       __field__name)
+    = DeepSeq.rnf __field__name_lowercase `Prelude.seq`
+        DeepSeq.rnf __field__name `Prelude.seq` ()
+
+instance Default.Default SearchClassConstByLowerCaseName_key where
+  def = SearchClassConstByLowerCaseName_key "" ""
+
+instance Hashable.Hashable SearchClassConstByLowerCaseName_key
+         where
+  hashWithSalt __salt
+    (SearchClassConstByLowerCaseName_key _name_lowercase _name)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt __salt _name_lowercase)
+        _name
+
+data SearchClassByLowerCaseName_key = SearchClassByLowerCaseName_key{searchClassByLowerCaseName_key_name_lowercase
+                                                                     :: Text.Text,
+                                                                     searchClassByLowerCaseName_key_name
+                                                                     :: Text.Text}
+                                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchClassByLowerCaseName_key where
+  toJSON
+    (SearchClassByLowerCaseName_key __field__name_lowercase
+       __field__name)
+    = Aeson.object
+        ("name_lowercase" .= __field__name_lowercase :
+           "name" .= __field__name : Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchClassByLowerCaseName_key where
+  buildStruct _proxy
+    (SearchClassByLowerCaseName_key __field__name_lowercase
+       __field__name)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name_lowercase"
+           (Thrift.getStringType _proxy)
+           1
+           0
+           (Thrift.genText _proxy __field__name_lowercase)
+           :
+           Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 2 1
+             (Thrift.genText _proxy __field__name)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name_lowercase <- ST.newSTRef ""
+            __field__name <- ST.newSTRef ""
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__name_lowercase
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name_lowercase <- ST.readSTRef
+                                                                         __field__name_lowercase
+                                             !__val__name <- ST.readSTRef __field__name
+                                             Prelude.pure
+                                               (SearchClassByLowerCaseName_key __val__name_lowercase
+                                                  __val__name)
+              _idMap = HashMap.fromList [("name_lowercase", 1), ("name", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchClassByLowerCaseName_key where
+  rnf
+    (SearchClassByLowerCaseName_key __field__name_lowercase
+       __field__name)
+    = DeepSeq.rnf __field__name_lowercase `Prelude.seq`
+        DeepSeq.rnf __field__name `Prelude.seq` ()
+
+instance Default.Default SearchClassByLowerCaseName_key where
+  def = SearchClassByLowerCaseName_key "" ""
+
+instance Hashable.Hashable SearchClassByLowerCaseName_key where
+  hashWithSalt __salt
+    (SearchClassByLowerCaseName_key _name_lowercase _name)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt __salt _name_lowercase)
+        _name
+
+data ReifyKind = ReifyKind_Erased
+               | ReifyKind_Reified
+               | ReifyKind_SoftReified
+               | ReifyKind__UNKNOWN Prelude.Int
+                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ReifyKind where
+  toJSON = Aeson.toJSON . Thrift.fromThriftEnum
+
+instance DeepSeq.NFData ReifyKind where
+  rnf __ReifyKind = Prelude.seq __ReifyKind ()
+
+instance Default.Default ReifyKind where
+  def = ReifyKind_Erased
+
+instance Hashable.Hashable ReifyKind where
+  hashWithSalt _salt _val
+    = Hashable.hashWithSalt _salt (Thrift.fromThriftEnum _val)
+
+instance Thrift.ThriftEnum ReifyKind where
+  toThriftEnum 0 = ReifyKind_Erased
+  toThriftEnum 1 = ReifyKind_Reified
+  toThriftEnum 2 = ReifyKind_SoftReified
+  toThriftEnum val = ReifyKind__UNKNOWN val
+  fromThriftEnum ReifyKind_Erased = 0
+  fromThriftEnum ReifyKind_Reified = 1
+  fromThriftEnum ReifyKind_SoftReified = 2
+  fromThriftEnum (ReifyKind__UNKNOWN val) = val
+  allThriftEnumValues
+    = [ReifyKind_Erased, ReifyKind_Reified, ReifyKind_SoftReified]
+  toThriftEnumEither 0 = Prelude.Right ReifyKind_Erased
+  toThriftEnumEither 1 = Prelude.Right ReifyKind_Reified
+  toThriftEnumEither 2 = Prelude.Right ReifyKind_SoftReified
+  toThriftEnumEither val
+    = Prelude.Left
+        ("toThriftEnumEither: not a valid identifier for enum ReifyKind: "
+           ++ Prelude.show val)
+
+data ReadonlyKind = ReadonlyKind_Readonly
+                  | ReadonlyKind__UNKNOWN Prelude.Int
+                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ReadonlyKind where
+  toJSON = Aeson.toJSON . Thrift.fromThriftEnum
+
+instance DeepSeq.NFData ReadonlyKind where
+  rnf __ReadonlyKind = Prelude.seq __ReadonlyKind ()
+
+instance Default.Default ReadonlyKind where
+  def = ReadonlyKind_Readonly
+
+instance Hashable.Hashable ReadonlyKind where
+  hashWithSalt _salt _val
+    = Hashable.hashWithSalt _salt (Thrift.fromThriftEnum _val)
+
+instance Thrift.ThriftEnum ReadonlyKind where
+  toThriftEnum 0 = ReadonlyKind_Readonly
+  toThriftEnum val = ReadonlyKind__UNKNOWN val
+  fromThriftEnum ReadonlyKind_Readonly = 0
+  fromThriftEnum (ReadonlyKind__UNKNOWN val) = val
+  allThriftEnumValues = [ReadonlyKind_Readonly]
+  toThriftEnumEither 0 = Prelude.Right ReadonlyKind_Readonly
+  toThriftEnumEither val
+    = Prelude.Left
+        ("toThriftEnumEither: not a valid identifier for enum ReadonlyKind: "
+           ++ Prelude.show val)
+
+data QName_key = QName_key{qName_key_name :: Name,
+                           qName_key_namespace_ :: Prelude.Maybe NamespaceQName}
+                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON QName_key where
+  toJSON (QName_key __field__name __field__namespace_)
+    = Aeson.object
+        ("name" .= __field__name :
+           Prelude.maybe Prelude.id ((:) . ("namespace_" .=))
+             __field__namespace_
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct QName_key where
+  buildStruct _proxy (QName_key __field__name __field__namespace_)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__name)
+           :
+           case __field__namespace_ of
+             Prelude.Just _val -> Thrift.genField _proxy "namespace_"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef Default.def
+            __field__namespace_ <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__namespace_
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__namespace_ <- ST.readSTRef __field__namespace_
+                                             Prelude.pure (QName_key __val__name __val__namespace_)
+              _idMap = HashMap.fromList [("name", 1), ("namespace_", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData QName_key where
+  rnf (QName_key __field__name __field__namespace_)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__namespace_ `Prelude.seq` ()
+
+instance Default.Default QName_key where
+  def = QName_key Default.def Prelude.Nothing
+
+instance Hashable.Hashable QName_key where
+  hashWithSalt __salt (QName_key _name _namespace_)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+        _namespace_
+
+data PropertyDefinition_key = PropertyDefinition_key{propertyDefinition_key_declaration
+                                                     :: PropertyDeclaration,
+                                                     propertyDefinition_key_type ::
+                                                     Prelude.Maybe Type,
+                                                     propertyDefinition_key_visibility ::
+                                                     Visibility,
+                                                     propertyDefinition_key_isFinal :: Prelude.Bool,
+                                                     propertyDefinition_key_isAbstract ::
+                                                     Prelude.Bool,
+                                                     propertyDefinition_key_isStatic ::
+                                                     Prelude.Bool,
+                                                     propertyDefinition_key_attributes ::
+                                                     [UserAttribute],
+                                                     propertyDefinition_key_typeInfo ::
+                                                     Prelude.Maybe TypeInfo}
+                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON PropertyDefinition_key where
+  toJSON
+    (PropertyDefinition_key __field__declaration __field__type
+       __field__visibility __field__isFinal __field__isAbstract
+       __field__isStatic __field__attributes __field__typeInfo)
+    = Aeson.object
+        ("declaration" .= __field__declaration :
+           Prelude.maybe Prelude.id ((:) . ("type" .=)) __field__type
+             ("visibility" .= __field__visibility :
+                "isFinal" .= __field__isFinal :
+                  "isAbstract" .= __field__isAbstract :
+                    "isStatic" .= __field__isStatic :
+                      "attributes" .= __field__attributes :
+                        Prelude.maybe Prelude.id ((:) . ("typeInfo" .=)) __field__typeInfo
+                          Prelude.mempty))
+
+instance Thrift.ThriftStruct PropertyDefinition_key where
+  buildStruct _proxy
+    (PropertyDefinition_key __field__declaration __field__type
+       __field__visibility __field__isFinal __field__isAbstract
+       __field__isStatic __field__attributes __field__typeInfo)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "declaration" (Thrift.getStructType _proxy)
+           1
+           0
+           (Thrift.buildStruct _proxy __field__declaration)
+           :
+           let (__cereal__type, __id__type)
+                 = case __field__type of
+                     Prelude.Just _val -> ((:)
+                                             (Thrift.genField _proxy "type"
+                                                (Thrift.getStructType _proxy)
+                                                2
+                                                1
+                                                (Thrift.buildStruct _proxy _val)),
+                                           2)
+                     Prelude.Nothing -> (Prelude.id, 1)
+             in
+             __cereal__type
+               (Thrift.genField _proxy "visibility" (Thrift.getI32Type _proxy) 3
+                  __id__type
+                  ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                      Thrift.fromThriftEnum)
+                     __field__visibility)
+                  :
+                  Thrift.genFieldBool _proxy "isFinal" 4 3 __field__isFinal :
+                    Thrift.genFieldBool _proxy "isAbstract" 5 4 __field__isAbstract :
+                      Thrift.genFieldBool _proxy "isStatic" 6 5 __field__isStatic :
+                        Thrift.genField _proxy "attributes" (Thrift.getListType _proxy) 7 6
+                          (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                             (Thrift.buildStruct _proxy)
+                             __field__attributes)
+                          :
+                          case __field__typeInfo of
+                            Prelude.Just _val -> Thrift.genField _proxy "typeInfo"
+                                                   (Thrift.getStructType _proxy)
+                                                   8
+                                                   7
+                                                   (Thrift.buildStruct _proxy _val)
+                                                   : []
+                            Prelude.Nothing -> []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__declaration <- ST.newSTRef Default.def
+            __field__type <- ST.newSTRef Prelude.Nothing
+            __field__visibility <- ST.newSTRef Default.def
+            __field__isFinal <- ST.newSTRef Prelude.False
+            __field__isAbstract <- ST.newSTRef Prelude.False
+            __field__isStatic <- ST.newSTRef Prelude.False
+            __field__attributes <- ST.newSTRef Default.def
+            __field__typeInfo <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__declaration
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__type
+                                                                          (Prelude.Just _val)
+                                                                 3 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "Visibility")
+                                                                        ST.writeSTRef
+                                                                          __field__visibility
+                                                                          _val
+                                                                 4 | _type ==
+                                                                       Thrift.getBoolType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseBoolF
+                                                                                      _proxy
+                                                                                      _bool)
+                                                                        ST.writeSTRef
+                                                                          __field__isFinal
+                                                                          _val
+                                                                 5 | _type ==
+                                                                       Thrift.getBoolType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseBoolF
+                                                                                      _proxy
+                                                                                      _bool)
+                                                                        ST.writeSTRef
+                                                                          __field__isAbstract
+                                                                          _val
+                                                                 6 | _type ==
+                                                                       Thrift.getBoolType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseBoolF
+                                                                                      _proxy
+                                                                                      _bool)
+                                                                        ST.writeSTRef
+                                                                          __field__isStatic
+                                                                          _val
+                                                                 7 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__attributes
+                                                                          _val
+                                                                 8 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__typeInfo
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__declaration <- ST.readSTRef
+                                                                      __field__declaration
+                                             !__val__type <- ST.readSTRef __field__type
+                                             !__val__visibility <- ST.readSTRef __field__visibility
+                                             !__val__isFinal <- ST.readSTRef __field__isFinal
+                                             !__val__isAbstract <- ST.readSTRef __field__isAbstract
+                                             !__val__isStatic <- ST.readSTRef __field__isStatic
+                                             !__val__attributes <- ST.readSTRef __field__attributes
+                                             !__val__typeInfo <- ST.readSTRef __field__typeInfo
+                                             Prelude.pure
+                                               (PropertyDefinition_key __val__declaration
+                                                  __val__type
+                                                  __val__visibility
+                                                  __val__isFinal
+                                                  __val__isAbstract
+                                                  __val__isStatic
+                                                  __val__attributes
+                                                  __val__typeInfo)
+              _idMap
+                = HashMap.fromList
+                    [("declaration", 1), ("type", 2), ("visibility", 3),
+                     ("isFinal", 4), ("isAbstract", 5), ("isStatic", 6),
+                     ("attributes", 7), ("typeInfo", 8)]
+            _parse 0)
+
+instance DeepSeq.NFData PropertyDefinition_key where
+  rnf
+    (PropertyDefinition_key __field__declaration __field__type
+       __field__visibility __field__isFinal __field__isAbstract
+       __field__isStatic __field__attributes __field__typeInfo)
+    = DeepSeq.rnf __field__declaration `Prelude.seq`
+        DeepSeq.rnf __field__type `Prelude.seq`
+          DeepSeq.rnf __field__visibility `Prelude.seq`
+            DeepSeq.rnf __field__isFinal `Prelude.seq`
+              DeepSeq.rnf __field__isAbstract `Prelude.seq`
+                DeepSeq.rnf __field__isStatic `Prelude.seq`
+                  DeepSeq.rnf __field__attributes `Prelude.seq`
+                    DeepSeq.rnf __field__typeInfo `Prelude.seq` ()
+
+instance Default.Default PropertyDefinition_key where
+  def
+    = PropertyDefinition_key Default.def Prelude.Nothing Default.def
+        Prelude.False
+        Prelude.False
+        Prelude.False
+        Default.def
+        Prelude.Nothing
+
+instance Hashable.Hashable PropertyDefinition_key where
+  hashWithSalt __salt
+    (PropertyDefinition_key _declaration _type _visibility _isFinal
+       _isAbstract _isStatic _attributes _typeInfo)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt
+              (Hashable.hashWithSalt
+                 (Hashable.hashWithSalt
+                    (Hashable.hashWithSalt
+                       (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _declaration)
+                          _type)
+                       _visibility)
+                    _isFinal)
+                 _isAbstract)
+              _isStatic)
+           _attributes)
+        _typeInfo
+
+data Parameter = Parameter{parameter_name :: Name,
+                           parameter_type :: Prelude.Maybe Type,
+                           parameter_isInout :: Prelude.Bool,
+                           parameter_isVariadic :: Prelude.Bool,
+                           parameter_defaultValue :: Prelude.Maybe Text.Text,
+                           parameter_attributes :: [UserAttribute],
+                           parameter_typeInfo :: Prelude.Maybe TypeInfo,
+                           parameter_readonly :: Prelude.Maybe ReadonlyKind}
+                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Parameter where
+  toJSON
+    (Parameter __field__name __field__type __field__isInout
+       __field__isVariadic __field__defaultValue __field__attributes
+       __field__typeInfo __field__readonly)
+    = Aeson.object
+        ("name" .= __field__name :
+           Prelude.maybe Prelude.id ((:) . ("type" .=)) __field__type
+             ("isInout" .= __field__isInout :
+                "isVariadic" .= __field__isVariadic :
+                  Prelude.maybe Prelude.id ((:) . ("defaultValue" .=))
+                    __field__defaultValue
+                    ("attributes" .= __field__attributes :
+                       Prelude.maybe Prelude.id ((:) . ("typeInfo" .=)) __field__typeInfo
+                         (Prelude.maybe Prelude.id ((:) . ("readonly" .=)) __field__readonly
+                            Prelude.mempty))))
+
+instance Thrift.ThriftStruct Parameter where
+  buildStruct _proxy
+    (Parameter __field__name __field__type __field__isInout
+       __field__isVariadic __field__defaultValue __field__attributes
+       __field__typeInfo __field__readonly)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__name)
+           :
+           let (__cereal__type, __id__type)
+                 = case __field__type of
+                     Prelude.Just _val -> ((:)
+                                             (Thrift.genField _proxy "type"
+                                                (Thrift.getStructType _proxy)
+                                                2
+                                                1
+                                                (Thrift.buildStruct _proxy _val)),
+                                           2)
+                     Prelude.Nothing -> (Prelude.id, 1)
+             in
+             __cereal__type
+               (Thrift.genFieldBool _proxy "isInout" 3 __id__type __field__isInout
+                  :
+                  Thrift.genFieldBool _proxy "isVariadic" 4 3 __field__isVariadic :
+                    let (__cereal__defaultValue, __id__defaultValue)
+                          = case __field__defaultValue of
+                              Prelude.Just _val -> ((:)
+                                                      (Thrift.genField _proxy "defaultValue"
+                                                         (Thrift.getStringType _proxy)
+                                                         5
+                                                         4
+                                                         (Thrift.genText _proxy _val)),
+                                                    5)
+                              Prelude.Nothing -> (Prelude.id, 4)
+                      in
+                      __cereal__defaultValue
+                        (Thrift.genField _proxy "attributes" (Thrift.getListType _proxy) 6
+                           __id__defaultValue
+                           (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                              (Thrift.buildStruct _proxy)
+                              __field__attributes)
+                           :
+                           let (__cereal__typeInfo, __id__typeInfo)
+                                 = case __field__typeInfo of
+                                     Prelude.Just _val -> ((:)
+                                                             (Thrift.genField _proxy "typeInfo"
+                                                                (Thrift.getStructType _proxy)
+                                                                7
+                                                                6
+                                                                (Thrift.buildStruct _proxy _val)),
+                                                           7)
+                                     Prelude.Nothing -> (Prelude.id, 6)
+                             in
+                             __cereal__typeInfo
+                               (case __field__readonly of
+                                  Prelude.Just _val -> Thrift.genField _proxy "readonly"
+                                                         (Thrift.getI32Type _proxy)
+                                                         8
+                                                         __id__typeInfo
+                                                         ((Thrift.genI32 _proxy .
+                                                             Prelude.fromIntegral
+                                                             . Thrift.fromThriftEnum)
+                                                            _val)
+                                                         : []
+                                  Prelude.Nothing -> []))))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef Default.def
+            __field__type <- ST.newSTRef Prelude.Nothing
+            __field__isInout <- ST.newSTRef Prelude.False
+            __field__isVariadic <- ST.newSTRef Prelude.False
+            __field__defaultValue <- ST.newSTRef Prelude.Nothing
+            __field__attributes <- ST.newSTRef Default.def
+            __field__typeInfo <- ST.newSTRef Prelude.Nothing
+            __field__readonly <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__type
+                                                                          (Prelude.Just _val)
+                                                                 3 | _type ==
+                                                                       Thrift.getBoolType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseBoolF
+                                                                                      _proxy
+                                                                                      _bool)
+                                                                        ST.writeSTRef
+                                                                          __field__isInout
+                                                                          _val
+                                                                 4 | _type ==
+                                                                       Thrift.getBoolType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseBoolF
+                                                                                      _proxy
+                                                                                      _bool)
+                                                                        ST.writeSTRef
+                                                                          __field__isVariadic
+                                                                          _val
+                                                                 5 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__defaultValue
+                                                                          (Prelude.Just _val)
+                                                                 6 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__attributes
+                                                                          _val
+                                                                 7 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__typeInfo
+                                                                          (Prelude.Just _val)
+                                                                 8 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "ReadonlyKind")
+                                                                        ST.writeSTRef
+                                                                          __field__readonly
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__type <- ST.readSTRef __field__type
+                                             !__val__isInout <- ST.readSTRef __field__isInout
+                                             !__val__isVariadic <- ST.readSTRef __field__isVariadic
+                                             !__val__defaultValue <- ST.readSTRef
+                                                                       __field__defaultValue
+                                             !__val__attributes <- ST.readSTRef __field__attributes
+                                             !__val__typeInfo <- ST.readSTRef __field__typeInfo
+                                             !__val__readonly <- ST.readSTRef __field__readonly
+                                             Prelude.pure
+                                               (Parameter __val__name __val__type __val__isInout
+                                                  __val__isVariadic
+                                                  __val__defaultValue
+                                                  __val__attributes
+                                                  __val__typeInfo
+                                                  __val__readonly)
+              _idMap
+                = HashMap.fromList
+                    [("name", 1), ("type", 2), ("isInout", 3), ("isVariadic", 4),
+                     ("defaultValue", 5), ("attributes", 6), ("typeInfo", 7),
+                     ("readonly", 8)]
+            _parse 0)
+
+instance DeepSeq.NFData Parameter where
+  rnf
+    (Parameter __field__name __field__type __field__isInout
+       __field__isVariadic __field__defaultValue __field__attributes
+       __field__typeInfo __field__readonly)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__type `Prelude.seq`
+          DeepSeq.rnf __field__isInout `Prelude.seq`
+            DeepSeq.rnf __field__isVariadic `Prelude.seq`
+              DeepSeq.rnf __field__defaultValue `Prelude.seq`
+                DeepSeq.rnf __field__attributes `Prelude.seq`
+                  DeepSeq.rnf __field__typeInfo `Prelude.seq`
+                    DeepSeq.rnf __field__readonly `Prelude.seq` ()
+
+instance Default.Default Parameter where
+  def
+    = Parameter Default.def Prelude.Nothing Prelude.False Prelude.False
+        Prelude.Nothing
+        Default.def
+        Prelude.Nothing
+        Prelude.Nothing
+
+instance Hashable.Hashable Parameter where
+  hashWithSalt __salt
+    (Parameter _name _type _isInout _isVariadic _defaultValue
+       _attributes _typeInfo _readonly)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt
+              (Hashable.hashWithSalt
+                 (Hashable.hashWithSalt
+                    (Hashable.hashWithSalt
+                       (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _type)
+                       _isInout)
+                    _isVariadic)
+                 _defaultValue)
+              _attributes)
+           _typeInfo)
+        _readonly
+
+data Signature_key = Signature_key{signature_key_returns ::
+                                   Prelude.Maybe Type,
+                                   signature_key_parameters :: [Parameter],
+                                   signature_key_contexts :: Prelude.Maybe [Context_],
+                                   signature_key_returnsTypeInfo :: Prelude.Maybe TypeInfo}
+                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Signature_key where
+  toJSON
+    (Signature_key __field__returns __field__parameters
+       __field__contexts __field__returnsTypeInfo)
+    = Aeson.object
+        (Prelude.maybe Prelude.id ((:) . ("returns" .=)) __field__returns
+           ("parameters" .= __field__parameters :
+              Prelude.maybe Prelude.id ((:) . ("contexts" .=)) __field__contexts
+                (Prelude.maybe Prelude.id ((:) . ("returnsTypeInfo" .=))
+                   __field__returnsTypeInfo
+                   Prelude.mempty)))
+
+instance Thrift.ThriftStruct Signature_key where
+  buildStruct _proxy
+    (Signature_key __field__returns __field__parameters
+       __field__contexts __field__returnsTypeInfo)
+    = Thrift.genStruct _proxy
+        (let (__cereal__returns, __id__returns)
+               = case __field__returns of
+                   Prelude.Just _val -> ((:)
+                                           (Thrift.genField _proxy "returns"
+                                              (Thrift.getStructType _proxy)
+                                              1
+                                              0
+                                              (Thrift.buildStruct _proxy _val)),
+                                         1)
+                   Prelude.Nothing -> (Prelude.id, 0)
+           in
+           __cereal__returns
+             (Thrift.genField _proxy "parameters" (Thrift.getListType _proxy) 2
+                __id__returns
+                (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                   (Thrift.buildStruct _proxy)
+                   __field__parameters)
+                :
+                let (__cereal__contexts, __id__contexts)
+                      = case __field__contexts of
+                          Prelude.Just _val -> ((:)
+                                                  (Thrift.genField _proxy "contexts"
+                                                     (Thrift.getListType _proxy)
+                                                     3
+                                                     2
+                                                     (Thrift.genList _proxy
+                                                        (Thrift.getStructType _proxy)
+                                                        (Thrift.buildStruct _proxy)
+                                                        _val)),
+                                                3)
+                          Prelude.Nothing -> (Prelude.id, 2)
+                  in
+                  __cereal__contexts
+                    (case __field__returnsTypeInfo of
+                       Prelude.Just _val -> Thrift.genField _proxy "returnsTypeInfo"
+                                              (Thrift.getStructType _proxy)
+                                              4
+                                              __id__contexts
+                                              (Thrift.buildStruct _proxy _val)
+                                              : []
+                       Prelude.Nothing -> [])))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__returns <- ST.newSTRef Prelude.Nothing
+            __field__parameters <- ST.newSTRef Default.def
+            __field__contexts <- ST.newSTRef Prelude.Nothing
+            __field__returnsTypeInfo <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__returns
+                                                                          (Prelude.Just _val)
+                                                                 2 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__parameters
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__contexts
+                                                                          (Prelude.Just _val)
+                                                                 4 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__returnsTypeInfo
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__returns <- ST.readSTRef
+                                                                  __field__returns
+                                             !__val__parameters <- ST.readSTRef __field__parameters
+                                             !__val__contexts <- ST.readSTRef __field__contexts
+                                             !__val__returnsTypeInfo <- ST.readSTRef
+                                                                          __field__returnsTypeInfo
+                                             Prelude.pure
+                                               (Signature_key __val__returns __val__parameters
+                                                  __val__contexts
+                                                  __val__returnsTypeInfo)
+              _idMap
+                = HashMap.fromList
+                    [("returns", 1), ("parameters", 2), ("contexts", 3),
+                     ("returnsTypeInfo", 4)]
+            _parse 0)
+
+instance DeepSeq.NFData Signature_key where
+  rnf
+    (Signature_key __field__returns __field__parameters
+       __field__contexts __field__returnsTypeInfo)
+    = DeepSeq.rnf __field__returns `Prelude.seq`
+        DeepSeq.rnf __field__parameters `Prelude.seq`
+          DeepSeq.rnf __field__contexts `Prelude.seq`
+            DeepSeq.rnf __field__returnsTypeInfo `Prelude.seq` ()
+
+instance Default.Default Signature_key where
+  def
+    = Signature_key Prelude.Nothing Default.def Prelude.Nothing
+        Prelude.Nothing
+
+instance Hashable.Hashable Signature_key where
+  hashWithSalt __salt
+    (Signature_key _returns _parameters _contexts _returnsTypeInfo)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _returns)
+              _parameters)
+           _contexts)
+        _returnsTypeInfo
+
+data Occurrence = Occurrence_method MethodOccurrence
+                | Occurrence_EMPTY
+                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Occurrence where
+  toJSON (Occurrence_method __method)
+    = Aeson.object ["method" .= __method]
+  toJSON Occurrence_EMPTY = Aeson.object []
+
+instance Thrift.ThriftStruct Occurrence where
+  buildStruct _proxy (Occurrence_method __method)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "method" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __method)]
+  buildStruct _proxy Occurrence_EMPTY = Thrift.genStruct _proxy []
+  parseStruct _proxy
+    = do _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap
+         case _fieldBegin of
+           Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                     1 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return (Occurrence_method _val)
+                                                     _ -> do Thrift.parseSkip _proxy _type
+                                                               Prelude.Nothing
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return Occurrence_EMPTY
+           Thrift.FieldEnd -> Prelude.return Occurrence_EMPTY
+    where
+      _idMap = HashMap.fromList [("method", 1)]
+
+instance DeepSeq.NFData Occurrence where
+  rnf (Occurrence_method __method) = DeepSeq.rnf __method
+  rnf Occurrence_EMPTY = ()
+
+instance Default.Default Occurrence where
+  def = Occurrence_EMPTY
+
+instance Hashable.Hashable Occurrence where
+  hashWithSalt __salt (Occurrence_method _method)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 1 _method)
+  hashWithSalt __salt Occurrence_EMPTY
+    = Hashable.hashWithSalt __salt (0 :: Prelude.Int)
+
+data NamespaceQName_key = NamespaceQName_key{namespaceQName_key_name
+                                             :: Name,
+                                             namespaceQName_key_parent ::
+                                             Prelude.Maybe NamespaceQName}
+                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON NamespaceQName_key where
+  toJSON (NamespaceQName_key __field__name __field__parent)
+    = Aeson.object
+        ("name" .= __field__name :
+           Prelude.maybe Prelude.id ((:) . ("parent" .=)) __field__parent
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct NamespaceQName_key where
+  buildStruct _proxy
+    (NamespaceQName_key __field__name __field__parent)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__name)
+           :
+           case __field__parent of
+             Prelude.Just _val -> Thrift.genField _proxy "parent"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef Default.def
+            __field__parent <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__parent
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__parent <- ST.readSTRef __field__parent
+                                             Prelude.pure
+                                               (NamespaceQName_key __val__name __val__parent)
+              _idMap = HashMap.fromList [("name", 1), ("parent", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData NamespaceQName_key where
+  rnf (NamespaceQName_key __field__name __field__parent)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__parent `Prelude.seq` ()
+
+instance Default.Default NamespaceQName_key where
+  def = NamespaceQName_key Default.def Prelude.Nothing
+
+instance Hashable.Hashable NamespaceQName_key where
+  hashWithSalt __salt (NamespaceQName_key _name _parent)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+        _parent
+
+newtype NamespaceDeclaration_key = NamespaceDeclaration_key{namespaceDeclaration_key_name
+                                                            :: NamespaceQName}
+                                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON NamespaceDeclaration_key where
+  toJSON (NamespaceDeclaration_key __field__name)
+    = Aeson.object ("name" .= __field__name : Prelude.mempty)
+
+instance Thrift.ThriftStruct NamespaceDeclaration_key where
+  buildStruct _proxy (NamespaceDeclaration_key __field__name)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__name)
+           : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             Prelude.pure (NamespaceDeclaration_key __val__name)
+              _idMap = HashMap.fromList [("name", 1)]
+            _parse 0)
+
+instance DeepSeq.NFData NamespaceDeclaration_key where
+  rnf (NamespaceDeclaration_key __field__name)
+    = DeepSeq.rnf __field__name `Prelude.seq` ()
+
+instance Default.Default NamespaceDeclaration_key where
+  def = NamespaceDeclaration_key Default.def
+
+instance Hashable.Hashable NamespaceDeclaration_key where
+  hashWithSalt __salt (NamespaceDeclaration_key _name)
+    = Hashable.hashWithSalt __salt _name
+
+data NameLowerCase_key = NameLowerCase_key{nameLowerCase_key_nameLowercase
+                                           :: Text.Text,
+                                           nameLowerCase_key_name :: Name}
+                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON NameLowerCase_key where
+  toJSON (NameLowerCase_key __field__nameLowercase __field__name)
+    = Aeson.object
+        ("nameLowercase" .= __field__nameLowercase :
+           "name" .= __field__name : Prelude.mempty)
+
+instance Thrift.ThriftStruct NameLowerCase_key where
+  buildStruct _proxy
+    (NameLowerCase_key __field__nameLowercase __field__name)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "nameLowercase"
+           (Thrift.getStringType _proxy)
+           1
+           0
+           (Thrift.genText _proxy __field__nameLowercase)
+           :
+           Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__name)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__nameLowercase <- ST.newSTRef ""
+            __field__name <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__nameLowercase
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__nameLowercase <- ST.readSTRef
+                                                                        __field__nameLowercase
+                                             !__val__name <- ST.readSTRef __field__name
+                                             Prelude.pure
+                                               (NameLowerCase_key __val__nameLowercase __val__name)
+              _idMap = HashMap.fromList [("nameLowercase", 1), ("name", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData NameLowerCase_key where
+  rnf (NameLowerCase_key __field__nameLowercase __field__name)
+    = DeepSeq.rnf __field__nameLowercase `Prelude.seq`
+        DeepSeq.rnf __field__name `Prelude.seq` ()
+
+instance Default.Default NameLowerCase_key where
+  def = NameLowerCase_key "" Default.def
+
+instance Hashable.Hashable NameLowerCase_key where
+  hashWithSalt __salt (NameLowerCase_key _nameLowercase _name)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt __salt _nameLowercase)
+        _name
+
+data ModuleMembership = ModuleMembership{moduleMembership_declaration
+                                         :: ModuleDeclaration,
+                                         moduleMembership_internal :: Prelude.Bool}
+                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ModuleMembership where
+  toJSON (ModuleMembership __field__declaration __field__internal)
+    = Aeson.object
+        ("declaration" .= __field__declaration :
+           "internal" .= __field__internal : Prelude.mempty)
+
+instance Thrift.ThriftStruct ModuleMembership where
+  buildStruct _proxy
+    (ModuleMembership __field__declaration __field__internal)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "declaration" (Thrift.getStructType _proxy)
+           1
+           0
+           (Thrift.buildStruct _proxy __field__declaration)
+           : Thrift.genFieldBool _proxy "internal" 2 1 __field__internal : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__declaration <- ST.newSTRef Default.def
+            __field__internal <- ST.newSTRef Prelude.False
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__declaration
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getBoolType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseBoolF
+                                                                                      _proxy
+                                                                                      _bool)
+                                                                        ST.writeSTRef
+                                                                          __field__internal
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__declaration <- ST.readSTRef
+                                                                      __field__declaration
+                                             !__val__internal <- ST.readSTRef __field__internal
+                                             Prelude.pure
+                                               (ModuleMembership __val__declaration __val__internal)
+              _idMap = HashMap.fromList [("declaration", 1), ("internal", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ModuleMembership where
+  rnf (ModuleMembership __field__declaration __field__internal)
+    = DeepSeq.rnf __field__declaration `Prelude.seq`
+        DeepSeq.rnf __field__internal `Prelude.seq` ()
+
+instance Default.Default ModuleMembership where
+  def = ModuleMembership Default.def Prelude.False
+
+instance Hashable.Hashable ModuleMembership where
+  hashWithSalt __salt (ModuleMembership _declaration _internal)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _declaration)
+        _internal
+
+data ModuleDefinition_key = ModuleDefinition_key{moduleDefinition_key_declaration
+                                                 :: ModuleDeclaration,
+                                                 moduleDefinition_key_attributes :: [UserAttribute]}
+                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ModuleDefinition_key where
+  toJSON
+    (ModuleDefinition_key __field__declaration __field__attributes)
+    = Aeson.object
+        ("declaration" .= __field__declaration :
+           "attributes" .= __field__attributes : Prelude.mempty)
+
+instance Thrift.ThriftStruct ModuleDefinition_key where
+  buildStruct _proxy
+    (ModuleDefinition_key __field__declaration __field__attributes)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "declaration" (Thrift.getStructType _proxy)
+           1
+           0
+           (Thrift.buildStruct _proxy __field__declaration)
+           :
+           Thrift.genField _proxy "attributes" (Thrift.getListType _proxy) 2 1
+             (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                (Thrift.buildStruct _proxy)
+                __field__attributes)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__declaration <- ST.newSTRef Default.def
+            __field__attributes <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__declaration
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__attributes
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__declaration <- ST.readSTRef
+                                                                      __field__declaration
+                                             !__val__attributes <- ST.readSTRef __field__attributes
+                                             Prelude.pure
+                                               (ModuleDefinition_key __val__declaration
+                                                  __val__attributes)
+              _idMap = HashMap.fromList [("declaration", 1), ("attributes", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ModuleDefinition_key where
+  rnf (ModuleDefinition_key __field__declaration __field__attributes)
+    = DeepSeq.rnf __field__declaration `Prelude.seq`
+        DeepSeq.rnf __field__attributes `Prelude.seq` ()
+
+instance Default.Default ModuleDefinition_key where
+  def = ModuleDefinition_key Default.def Default.def
+
+instance Hashable.Hashable ModuleDefinition_key where
+  hashWithSalt __salt (ModuleDefinition_key _declaration _attributes)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _declaration)
+        _attributes
+
+newtype ModuleDeclaration_key = ModuleDeclaration_key{moduleDeclaration_key_name
+                                                      :: Name}
+                                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ModuleDeclaration_key where
+  toJSON (ModuleDeclaration_key __field__name)
+    = Aeson.object ("name" .= __field__name : Prelude.mempty)
+
+instance Thrift.ThriftStruct ModuleDeclaration_key where
+  buildStruct _proxy (ModuleDeclaration_key __field__name)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__name)
+           : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             Prelude.pure (ModuleDeclaration_key __val__name)
+              _idMap = HashMap.fromList [("name", 1)]
+            _parse 0)
+
+instance DeepSeq.NFData ModuleDeclaration_key where
+  rnf (ModuleDeclaration_key __field__name)
+    = DeepSeq.rnf __field__name `Prelude.seq` ()
+
+instance Default.Default ModuleDeclaration_key where
+  def = ModuleDeclaration_key Default.def
+
+instance Hashable.Hashable ModuleDeclaration_key where
+  hashWithSalt __salt (ModuleDeclaration_key _name)
+    = Hashable.hashWithSalt __salt _name
+
+data MethodOverrides_key = MethodOverrides_key{methodOverrides_key_derived
+                                               :: MethodDeclaration,
+                                               methodOverrides_key_base :: MethodDeclaration,
+                                               methodOverrides_key_annotation ::
+                                               Prelude.Maybe Prelude.Bool}
+                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON MethodOverrides_key where
+  toJSON
+    (MethodOverrides_key __field__derived __field__base
+       __field__annotation)
+    = Aeson.object
+        ("derived" .= __field__derived :
+           "base" .= __field__base :
+             Prelude.maybe Prelude.id ((:) . ("annotation" .=))
+               __field__annotation
+               Prelude.mempty)
+
+instance Thrift.ThriftStruct MethodOverrides_key where
+  buildStruct _proxy
+    (MethodOverrides_key __field__derived __field__base
+       __field__annotation)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "derived" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__derived)
+           :
+           Thrift.genField _proxy "base" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__base)
+             :
+             case __field__annotation of
+               Prelude.Just _val -> Thrift.genFieldBool _proxy "annotation" 3 2
+                                      _val
+                                      : []
+               Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__derived <- ST.newSTRef Default.def
+            __field__base <- ST.newSTRef Default.def
+            __field__annotation <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__derived
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__base
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getBoolType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseBoolF
+                                                                                      _proxy
+                                                                                      _bool)
+                                                                        ST.writeSTRef
+                                                                          __field__annotation
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__derived <- ST.readSTRef
+                                                                  __field__derived
+                                             !__val__base <- ST.readSTRef __field__base
+                                             !__val__annotation <- ST.readSTRef __field__annotation
+                                             Prelude.pure
+                                               (MethodOverrides_key __val__derived __val__base
+                                                  __val__annotation)
+              _idMap
+                = HashMap.fromList [("derived", 1), ("base", 2), ("annotation", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData MethodOverrides_key where
+  rnf
+    (MethodOverrides_key __field__derived __field__base
+       __field__annotation)
+    = DeepSeq.rnf __field__derived `Prelude.seq`
+        DeepSeq.rnf __field__base `Prelude.seq`
+          DeepSeq.rnf __field__annotation `Prelude.seq` ()
+
+instance Default.Default MethodOverrides_key where
+  def = MethodOverrides_key Default.def Default.def Prelude.Nothing
+
+instance Hashable.Hashable MethodOverrides_key where
+  hashWithSalt __salt
+    (MethodOverrides_key _derived _base _annotation)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _derived)
+           _base)
+        _annotation
+
+data MethodOverridden_key = MethodOverridden_key{methodOverridden_key_base
+                                                 :: MethodDeclaration,
+                                                 methodOverridden_key_derived :: MethodDeclaration,
+                                                 methodOverridden_key_annotation ::
+                                                 Prelude.Maybe Prelude.Bool}
+                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON MethodOverridden_key where
+  toJSON
+    (MethodOverridden_key __field__base __field__derived
+       __field__annotation)
+    = Aeson.object
+        ("base" .= __field__base :
+           "derived" .= __field__derived :
+             Prelude.maybe Prelude.id ((:) . ("annotation" .=))
+               __field__annotation
+               Prelude.mempty)
+
+instance Thrift.ThriftStruct MethodOverridden_key where
+  buildStruct _proxy
+    (MethodOverridden_key __field__base __field__derived
+       __field__annotation)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "base" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__base)
+           :
+           Thrift.genField _proxy "derived" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__derived)
+             :
+             case __field__annotation of
+               Prelude.Just _val -> Thrift.genFieldBool _proxy "annotation" 3 2
+                                      _val
+                                      : []
+               Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__base <- ST.newSTRef Default.def
+            __field__derived <- ST.newSTRef Default.def
+            __field__annotation <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__base
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__derived
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getBoolType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseBoolF
+                                                                                      _proxy
+                                                                                      _bool)
+                                                                        ST.writeSTRef
+                                                                          __field__annotation
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__base <- ST.readSTRef __field__base
+                                             !__val__derived <- ST.readSTRef __field__derived
+                                             !__val__annotation <- ST.readSTRef __field__annotation
+                                             Prelude.pure
+                                               (MethodOverridden_key __val__base __val__derived
+                                                  __val__annotation)
+              _idMap
+                = HashMap.fromList [("base", 1), ("derived", 2), ("annotation", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData MethodOverridden_key where
+  rnf
+    (MethodOverridden_key __field__base __field__derived
+       __field__annotation)
+    = DeepSeq.rnf __field__base `Prelude.seq`
+        DeepSeq.rnf __field__derived `Prelude.seq`
+          DeepSeq.rnf __field__annotation `Prelude.seq` ()
+
+instance Default.Default MethodOverridden_key where
+  def = MethodOverridden_key Default.def Default.def Prelude.Nothing
+
+instance Hashable.Hashable MethodOverridden_key where
+  hashWithSalt __salt
+    (MethodOverridden_key _base _derived _annotation)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _base)
+           _derived)
+        _annotation
+
+data MethodOccurrence_key = MethodOccurrence_key{methodOccurrence_key_name
+                                                 :: Name,
+                                                 methodOccurrence_key_className ::
+                                                 Prelude.Maybe Name}
+                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON MethodOccurrence_key where
+  toJSON (MethodOccurrence_key __field__name __field__className)
+    = Aeson.object
+        ("name" .= __field__name :
+           Prelude.maybe Prelude.id ((:) . ("className" .=))
+             __field__className
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct MethodOccurrence_key where
+  buildStruct _proxy
+    (MethodOccurrence_key __field__name __field__className)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__name)
+           :
+           case __field__className of
+             Prelude.Just _val -> Thrift.genField _proxy "className"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef Default.def
+            __field__className <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__className
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__className <- ST.readSTRef __field__className
+                                             Prelude.pure
+                                               (MethodOccurrence_key __val__name __val__className)
+              _idMap = HashMap.fromList [("name", 1), ("className", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData MethodOccurrence_key where
+  rnf (MethodOccurrence_key __field__name __field__className)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__className `Prelude.seq` ()
+
+instance Default.Default MethodOccurrence_key where
+  def = MethodOccurrence_key Default.def Prelude.Nothing
+
+instance Hashable.Hashable MethodOccurrence_key where
+  hashWithSalt __salt (MethodOccurrence_key _name _className)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+        _className
+
+newtype InterfaceDeclaration_key = InterfaceDeclaration_key{interfaceDeclaration_key_name
+                                                            :: QName}
+                                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON InterfaceDeclaration_key where
+  toJSON (InterfaceDeclaration_key __field__name)
+    = Aeson.object ("name" .= __field__name : Prelude.mempty)
+
+instance Thrift.ThriftStruct InterfaceDeclaration_key where
+  buildStruct _proxy (InterfaceDeclaration_key __field__name)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__name)
+           : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             Prelude.pure (InterfaceDeclaration_key __val__name)
+              _idMap = HashMap.fromList [("name", 1)]
+            _parse 0)
+
+instance DeepSeq.NFData InterfaceDeclaration_key where
+  rnf (InterfaceDeclaration_key __field__name)
+    = DeepSeq.rnf __field__name `Prelude.seq` ()
+
+instance Default.Default InterfaceDeclaration_key where
+  def = InterfaceDeclaration_key Default.def
+
+instance Hashable.Hashable InterfaceDeclaration_key where
+  hashWithSalt __salt (InterfaceDeclaration_key _name)
+    = Hashable.hashWithSalt __salt _name
+
+type IndexerInputsHash_value = ByteString.ByteString
+
+data GlobalNamespaceAlias_key = GlobalNamespaceAlias_key{globalNamespaceAlias_key_from
+                                                         :: Name,
+                                                         globalNamespaceAlias_key_to ::
+                                                         NamespaceQName}
+                                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON GlobalNamespaceAlias_key where
+  toJSON (GlobalNamespaceAlias_key __field__from __field__to)
+    = Aeson.object
+        ("from" .= __field__from : "to" .= __field__to : Prelude.mempty)
+
+instance Thrift.ThriftStruct GlobalNamespaceAlias_key where
+  buildStruct _proxy
+    (GlobalNamespaceAlias_key __field__from __field__to)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "from" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__from)
+           :
+           Thrift.genField _proxy "to" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__to)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__from <- ST.newSTRef Default.def
+            __field__to <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__from
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__to
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__from <- ST.readSTRef __field__from
+                                             !__val__to <- ST.readSTRef __field__to
+                                             Prelude.pure
+                                               (GlobalNamespaceAlias_key __val__from __val__to)
+              _idMap = HashMap.fromList [("from", 1), ("to", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData GlobalNamespaceAlias_key where
+  rnf (GlobalNamespaceAlias_key __field__from __field__to)
+    = DeepSeq.rnf __field__from `Prelude.seq`
+        DeepSeq.rnf __field__to `Prelude.seq` ()
+
+instance Default.Default GlobalNamespaceAlias_key where
+  def = GlobalNamespaceAlias_key Default.def Default.def
+
+instance Hashable.Hashable GlobalNamespaceAlias_key where
+  hashWithSalt __salt (GlobalNamespaceAlias_key _from _to)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _from) _to
+
+data GlobalConstDefinition_key = GlobalConstDefinition_key{globalConstDefinition_key_declaration
+                                                           :: GlobalConstDeclaration,
+                                                           globalConstDefinition_key_type ::
+                                                           Prelude.Maybe Type,
+                                                           globalConstDefinition_key_value ::
+                                                           Text.Text,
+                                                           globalConstDefinition_key_typeInfo ::
+                                                           Prelude.Maybe TypeInfo}
+                                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON GlobalConstDefinition_key where
+  toJSON
+    (GlobalConstDefinition_key __field__declaration __field__type
+       __field__value __field__typeInfo)
+    = Aeson.object
+        ("declaration" .= __field__declaration :
+           Prelude.maybe Prelude.id ((:) . ("type" .=)) __field__type
+             ("value" .= __field__value :
+                Prelude.maybe Prelude.id ((:) . ("typeInfo" .=)) __field__typeInfo
+                  Prelude.mempty))
+
+instance Thrift.ThriftStruct GlobalConstDefinition_key where
+  buildStruct _proxy
+    (GlobalConstDefinition_key __field__declaration __field__type
+       __field__value __field__typeInfo)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "declaration" (Thrift.getStructType _proxy)
+           1
+           0
+           (Thrift.buildStruct _proxy __field__declaration)
+           :
+           let (__cereal__type, __id__type)
+                 = case __field__type of
+                     Prelude.Just _val -> ((:)
+                                             (Thrift.genField _proxy "type"
+                                                (Thrift.getStructType _proxy)
+                                                2
+                                                1
+                                                (Thrift.buildStruct _proxy _val)),
+                                           2)
+                     Prelude.Nothing -> (Prelude.id, 1)
+             in
+             __cereal__type
+               (Thrift.genField _proxy "value" (Thrift.getStringType _proxy) 3
+                  __id__type
+                  (Thrift.genText _proxy __field__value)
+                  :
+                  case __field__typeInfo of
+                    Prelude.Just _val -> Thrift.genField _proxy "typeInfo"
+                                           (Thrift.getStructType _proxy)
+                                           4
+                                           3
+                                           (Thrift.buildStruct _proxy _val)
+                                           : []
+                    Prelude.Nothing -> []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__declaration <- ST.newSTRef Default.def
+            __field__type <- ST.newSTRef Prelude.Nothing
+            __field__value <- ST.newSTRef ""
+            __field__typeInfo <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__declaration
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__type
+                                                                          (Prelude.Just _val)
+                                                                 3 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__value
+                                                                          _val
+                                                                 4 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__typeInfo
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__declaration <- ST.readSTRef
+                                                                      __field__declaration
+                                             !__val__type <- ST.readSTRef __field__type
+                                             !__val__value <- ST.readSTRef __field__value
+                                             !__val__typeInfo <- ST.readSTRef __field__typeInfo
+                                             Prelude.pure
+                                               (GlobalConstDefinition_key __val__declaration
+                                                  __val__type
+                                                  __val__value
+                                                  __val__typeInfo)
+              _idMap
+                = HashMap.fromList
+                    [("declaration", 1), ("type", 2), ("value", 3), ("typeInfo", 4)]
+            _parse 0)
+
+instance DeepSeq.NFData GlobalConstDefinition_key where
+  rnf
+    (GlobalConstDefinition_key __field__declaration __field__type
+       __field__value __field__typeInfo)
+    = DeepSeq.rnf __field__declaration `Prelude.seq`
+        DeepSeq.rnf __field__type `Prelude.seq`
+          DeepSeq.rnf __field__value `Prelude.seq`
+            DeepSeq.rnf __field__typeInfo `Prelude.seq` ()
+
+instance Default.Default GlobalConstDefinition_key where
+  def
+    = GlobalConstDefinition_key Default.def Prelude.Nothing ""
+        Prelude.Nothing
+
+instance Hashable.Hashable GlobalConstDefinition_key where
+  hashWithSalt __salt
+    (GlobalConstDefinition_key _declaration _type _value _typeInfo)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _declaration)
+              _type)
+           _value)
+        _typeInfo
+
+newtype GlobalConstDeclaration_key = GlobalConstDeclaration_key{globalConstDeclaration_key_name
+                                                                :: QName}
+                                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON GlobalConstDeclaration_key where
+  toJSON (GlobalConstDeclaration_key __field__name)
+    = Aeson.object ("name" .= __field__name : Prelude.mempty)
+
+instance Thrift.ThriftStruct GlobalConstDeclaration_key where
+  buildStruct _proxy (GlobalConstDeclaration_key __field__name)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__name)
+           : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             Prelude.pure (GlobalConstDeclaration_key __val__name)
+              _idMap = HashMap.fromList [("name", 1)]
+            _parse 0)
+
+instance DeepSeq.NFData GlobalConstDeclaration_key where
+  rnf (GlobalConstDeclaration_key __field__name)
+    = DeepSeq.rnf __field__name `Prelude.seq` ()
+
+instance Default.Default GlobalConstDeclaration_key where
+  def = GlobalConstDeclaration_key Default.def
+
+instance Hashable.Hashable GlobalConstDeclaration_key where
+  hashWithSalt __salt (GlobalConstDeclaration_key _name)
+    = Hashable.hashWithSalt __salt _name
+
+newtype FunctionDeclaration_key = FunctionDeclaration_key{functionDeclaration_key_name
+                                                          :: QName}
+                                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FunctionDeclaration_key where
+  toJSON (FunctionDeclaration_key __field__name)
+    = Aeson.object ("name" .= __field__name : Prelude.mempty)
+
+instance Thrift.ThriftStruct FunctionDeclaration_key where
+  buildStruct _proxy (FunctionDeclaration_key __field__name)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__name)
+           : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             Prelude.pure (FunctionDeclaration_key __val__name)
+              _idMap = HashMap.fromList [("name", 1)]
+            _parse 0)
+
+instance DeepSeq.NFData FunctionDeclaration_key where
+  rnf (FunctionDeclaration_key __field__name)
+    = DeepSeq.rnf __field__name `Prelude.seq` ()
+
+instance Default.Default FunctionDeclaration_key where
+  def = FunctionDeclaration_key Default.def
+
+instance Hashable.Hashable FunctionDeclaration_key where
+  hashWithSalt __salt (FunctionDeclaration_key _name)
+    = Hashable.hashWithSalt __salt _name
+
+data FilePackage_key = FilePackage_key{filePackage_key_file ::
+                                       Glean.Schema.Src.File,
+                                       filePackage_key_package_ :: Package_,
+                                       filePackage_key_hasPackageOverride :: Prelude.Bool}
+                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FilePackage_key where
+  toJSON
+    (FilePackage_key __field__file __field__package_
+       __field__hasPackageOverride)
+    = Aeson.object
+        ("file" .= __field__file :
+           "package_" .= __field__package_ :
+             "hasPackageOverride" .= __field__hasPackageOverride :
+               Prelude.mempty)
+
+instance Thrift.ThriftStruct FilePackage_key where
+  buildStruct _proxy
+    (FilePackage_key __field__file __field__package_
+       __field__hasPackageOverride)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__file)
+           :
+           Thrift.genField _proxy "package_" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__package_)
+             :
+             Thrift.genFieldBool _proxy "hasPackageOverride" 3 2
+               __field__hasPackageOverride
+               : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__file <- ST.newSTRef Default.def
+            __field__package_ <- ST.newSTRef Default.def
+            __field__hasPackageOverride <- ST.newSTRef Prelude.False
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__file
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__package_
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getBoolType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseBoolF
+                                                                                      _proxy
+                                                                                      _bool)
+                                                                        ST.writeSTRef
+                                                                          __field__hasPackageOverride
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__file <- ST.readSTRef __field__file
+                                             !__val__package_ <- ST.readSTRef __field__package_
+                                             !__val__hasPackageOverride <- ST.readSTRef
+                                                                             __field__hasPackageOverride
+                                             Prelude.pure
+                                               (FilePackage_key __val__file __val__package_
+                                                  __val__hasPackageOverride)
+              _idMap
+                = HashMap.fromList
+                    [("file", 1), ("package_", 2), ("hasPackageOverride", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData FilePackage_key where
+  rnf
+    (FilePackage_key __field__file __field__package_
+       __field__hasPackageOverride)
+    = DeepSeq.rnf __field__file `Prelude.seq`
+        DeepSeq.rnf __field__package_ `Prelude.seq`
+          DeepSeq.rnf __field__hasPackageOverride `Prelude.seq` ()
+
+instance Default.Default FilePackage_key where
+  def = FilePackage_key Default.def Default.def Prelude.False
+
+instance Hashable.Hashable FilePackage_key where
+  hashWithSalt __salt
+    (FilePackage_key _file _package_ _hasPackageOverride)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _file)
+           _package_)
+        _hasPackageOverride
+
+data FieldClassConst = FieldClassConst{fieldClassConst_container ::
+                                       QName,
+                                       fieldClassConst_name :: Name}
+                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FieldClassConst where
+  toJSON (FieldClassConst __field__container __field__name)
+    = Aeson.object
+        ("container" .= __field__container :
+           "name" .= __field__name : Prelude.mempty)
+
+instance Thrift.ThriftStruct FieldClassConst where
+  buildStruct _proxy
+    (FieldClassConst __field__container __field__name)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "container" (Thrift.getStructType _proxy) 1
+           0
+           (Thrift.buildStruct _proxy __field__container)
+           :
+           Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__name)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__container <- ST.newSTRef Default.def
+            __field__name <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__container
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__container <- ST.readSTRef
+                                                                    __field__container
+                                             !__val__name <- ST.readSTRef __field__name
+                                             Prelude.pure
+                                               (FieldClassConst __val__container __val__name)
+              _idMap = HashMap.fromList [("container", 1), ("name", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData FieldClassConst where
+  rnf (FieldClassConst __field__container __field__name)
+    = DeepSeq.rnf __field__container `Prelude.seq`
+        DeepSeq.rnf __field__name `Prelude.seq` ()
+
+instance Default.Default FieldClassConst where
+  def = FieldClassConst Default.def Default.def
+
+instance Hashable.Hashable FieldClassConst where
+  hashWithSalt __salt (FieldClassConst _container _name)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _container)
+        _name
+
+data ShapeKV_key = ShapeKV_key_sf_regex_group Text.Text
+                 | ShapeKV_key_sf_lit_string Text.Text
+                 | ShapeKV_key_sf_class_const FieldClassConst
+                 | ShapeKV_key_EMPTY
+                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ShapeKV_key where
+  toJSON (ShapeKV_key_sf_regex_group __sf_regex_group)
+    = Aeson.object ["sf_regex_group" .= __sf_regex_group]
+  toJSON (ShapeKV_key_sf_lit_string __sf_lit_string)
+    = Aeson.object ["sf_lit_string" .= __sf_lit_string]
+  toJSON (ShapeKV_key_sf_class_const __sf_class_const)
+    = Aeson.object ["sf_class_const" .= __sf_class_const]
+  toJSON ShapeKV_key_EMPTY = Aeson.object []
+
+instance Thrift.ThriftStruct ShapeKV_key where
+  buildStruct _proxy (ShapeKV_key_sf_regex_group __sf_regex_group)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "sf_regex_group"
+           (Thrift.getStringType _proxy)
+           1
+           0
+           (Thrift.genText _proxy __sf_regex_group)]
+  buildStruct _proxy (ShapeKV_key_sf_lit_string __sf_lit_string)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "sf_lit_string"
+           (Thrift.getStringType _proxy)
+           2
+           0
+           (Thrift.genText _proxy __sf_lit_string)]
+  buildStruct _proxy (ShapeKV_key_sf_class_const __sf_class_const)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "sf_class_const"
+           (Thrift.getStructType _proxy)
+           3
+           0
+           (Thrift.buildStruct _proxy __sf_class_const)]
+  buildStruct _proxy ShapeKV_key_EMPTY = Thrift.genStruct _proxy []
+  parseStruct _proxy
+    = do _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap
+         case _fieldBegin of
+           Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                     1 | _type == Thrift.getStringType _proxy ->
+                                                         do _val <- Thrift.parseText _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (ShapeKV_key_sf_regex_group _val)
+                                                     2 | _type == Thrift.getStringType _proxy ->
+                                                         do _val <- Thrift.parseText _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (ShapeKV_key_sf_lit_string _val)
+                                                     3 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (ShapeKV_key_sf_class_const _val)
+                                                     _ -> do Thrift.parseSkip _proxy _type
+                                                               Prelude.Nothing
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return ShapeKV_key_EMPTY
+           Thrift.FieldEnd -> Prelude.return ShapeKV_key_EMPTY
+    where
+      _idMap
+        = HashMap.fromList
+            [("sf_regex_group", 1), ("sf_lit_string", 2),
+             ("sf_class_const", 3)]
+
+instance DeepSeq.NFData ShapeKV_key where
+  rnf (ShapeKV_key_sf_regex_group __sf_regex_group)
+    = DeepSeq.rnf __sf_regex_group
+  rnf (ShapeKV_key_sf_lit_string __sf_lit_string)
+    = DeepSeq.rnf __sf_lit_string
+  rnf (ShapeKV_key_sf_class_const __sf_class_const)
+    = DeepSeq.rnf __sf_class_const
+  rnf ShapeKV_key_EMPTY = ()
+
+instance Default.Default ShapeKV_key where
+  def = ShapeKV_key_EMPTY
+
+instance Hashable.Hashable ShapeKV_key where
+  hashWithSalt __salt (ShapeKV_key_sf_regex_group _sf_regex_group)
+    = Hashable.hashWithSalt __salt
+        (Hashable.hashWithSalt 1 _sf_regex_group)
+  hashWithSalt __salt (ShapeKV_key_sf_lit_string _sf_lit_string)
+    = Hashable.hashWithSalt __salt
+        (Hashable.hashWithSalt 2 _sf_lit_string)
+  hashWithSalt __salt (ShapeKV_key_sf_class_const _sf_class_const)
+    = Hashable.hashWithSalt __salt
+        (Hashable.hashWithSalt 3 _sf_class_const)
+  hashWithSalt __salt ShapeKV_key_EMPTY
+    = Hashable.hashWithSalt __salt (0 :: Prelude.Int)
+
+data ShapeKV = ShapeKV{shapeKV_key :: ShapeKV_key,
+                       shapeKV_value :: Hint, shapeKV_opt :: Prelude.Bool}
+               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ShapeKV where
+  toJSON (ShapeKV __field__key __field__value __field__opt)
+    = Aeson.object
+        ("key" .= __field__key :
+           "value" .= __field__value : "opt" .= __field__opt : Prelude.mempty)
+
+instance Thrift.ThriftStruct ShapeKV where
+  buildStruct _proxy
+    (ShapeKV __field__key __field__value __field__opt)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "key" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__key)
+           :
+           Thrift.genField _proxy "value" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__value)
+             : Thrift.genFieldBool _proxy "opt" 3 2 __field__opt : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__key <- ST.newSTRef Default.def
+            __field__value <- ST.newSTRef Default.def
+            __field__opt <- ST.newSTRef Prelude.False
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__value
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getBoolType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseBoolF
+                                                                                      _proxy
+                                                                                      _bool)
+                                                                        ST.writeSTRef __field__opt
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__key <- ST.readSTRef __field__key
+                                             !__val__value <- ST.readSTRef __field__value
+                                             !__val__opt <- ST.readSTRef __field__opt
+                                             Prelude.pure
+                                               (ShapeKV __val__key __val__value __val__opt)
+              _idMap = HashMap.fromList [("key", 1), ("value", 2), ("opt", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData ShapeKV where
+  rnf (ShapeKV __field__key __field__value __field__opt)
+    = DeepSeq.rnf __field__key `Prelude.seq`
+        DeepSeq.rnf __field__value `Prelude.seq`
+          DeepSeq.rnf __field__opt `Prelude.seq` ()
+
+instance Default.Default ShapeKV where
+  def = ShapeKV Default.def Default.def Prelude.False
+
+instance Hashable.Hashable ShapeKV where
+  hashWithSalt __salt (ShapeKV _key _value _opt)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _key) _value)
+        _opt
+
+data Hint_apply_ = Hint_apply_{hint_apply__class_name :: QName,
+                               hint_apply__values :: [Hint]}
+                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Hint_apply_ where
+  toJSON (Hint_apply_ __field__class_name __field__values)
+    = Aeson.object
+        ("class_name" .= __field__class_name :
+           "values" .= __field__values : Prelude.mempty)
+
+instance Thrift.ThriftStruct Hint_apply_ where
+  buildStruct _proxy
+    (Hint_apply_ __field__class_name __field__values)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "class_name" (Thrift.getStructType _proxy)
+           1
+           0
+           (Thrift.buildStruct _proxy __field__class_name)
+           :
+           Thrift.genField _proxy "values" (Thrift.getListType _proxy) 2 1
+             (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                (Thrift.buildStruct _proxy)
+                __field__values)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__class_name <- ST.newSTRef Default.def
+            __field__values <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__class_name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__values
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__class_name <- ST.readSTRef
+                                                                     __field__class_name
+                                             !__val__values <- ST.readSTRef __field__values
+                                             Prelude.pure
+                                               (Hint_apply_ __val__class_name __val__values)
+              _idMap = HashMap.fromList [("class_name", 1), ("values", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData Hint_apply_ where
+  rnf (Hint_apply_ __field__class_name __field__values)
+    = DeepSeq.rnf __field__class_name `Prelude.seq`
+        DeepSeq.rnf __field__values `Prelude.seq` ()
+
+instance Default.Default Hint_apply_ where
+  def = Hint_apply_ Default.def Default.def
+
+instance Hashable.Hashable Hint_apply_ where
+  hashWithSalt __salt (Hint_apply_ _class_name _values)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _class_name)
+        _values
+
+data Hint_tuple_ = Hint_tuple_{hint_tuple__req :: [Hint],
+                               hint_tuple__opt :: [Hint],
+                               hint_tuple__variadic :: Prelude.Maybe Hint}
+                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Hint_tuple_ where
+  toJSON (Hint_tuple_ __field__req __field__opt __field__variadic)
+    = Aeson.object
+        ("req" .= __field__req :
+           "opt" .= __field__opt :
+             Prelude.maybe Prelude.id ((:) . ("variadic" .=)) __field__variadic
+               Prelude.mempty)
+
+instance Thrift.ThriftStruct Hint_tuple_ where
+  buildStruct _proxy
+    (Hint_tuple_ __field__req __field__opt __field__variadic)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "req" (Thrift.getListType _proxy) 1 0
+           (Thrift.genList _proxy (Thrift.getStructType _proxy)
+              (Thrift.buildStruct _proxy)
+              __field__req)
+           :
+           Thrift.genField _proxy "opt" (Thrift.getListType _proxy) 2 1
+             (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                (Thrift.buildStruct _proxy)
+                __field__opt)
+             :
+             case __field__variadic of
+               Prelude.Just _val -> Thrift.genField _proxy "variadic"
+                                      (Thrift.getStructType _proxy)
+                                      3
+                                      2
+                                      (Thrift.buildStruct _proxy _val)
+                                      : []
+               Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__req <- ST.newSTRef Default.def
+            __field__opt <- ST.newSTRef Default.def
+            __field__variadic <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef __field__req
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef __field__opt
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__variadic
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__req <- ST.readSTRef __field__req
+                                             !__val__opt <- ST.readSTRef __field__opt
+                                             !__val__variadic <- ST.readSTRef __field__variadic
+                                             Prelude.pure
+                                               (Hint_tuple_ __val__req __val__opt __val__variadic)
+              _idMap = HashMap.fromList [("req", 1), ("opt", 2), ("variadic", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData Hint_tuple_ where
+  rnf (Hint_tuple_ __field__req __field__opt __field__variadic)
+    = DeepSeq.rnf __field__req `Prelude.seq`
+        DeepSeq.rnf __field__opt `Prelude.seq`
+          DeepSeq.rnf __field__variadic `Prelude.seq` ()
+
+instance Default.Default Hint_tuple_ where
+  def = Hint_tuple_ Default.def Default.def Prelude.Nothing
+
+instance Hashable.Hashable Hint_tuple_ where
+  hashWithSalt __salt (Hint_tuple_ _req _opt _variadic)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _req) _opt)
+        _variadic
+
+data Hint_shape_ = Hint_shape_{hint_shape__open_ :: Prelude.Bool,
+                               hint_shape__map_ :: [ShapeKV]}
+                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Hint_shape_ where
+  toJSON (Hint_shape_ __field__open_ __field__map_)
+    = Aeson.object
+        ("open_" .= __field__open_ :
+           "map_" .= __field__map_ : Prelude.mempty)
+
+instance Thrift.ThriftStruct Hint_shape_ where
+  buildStruct _proxy (Hint_shape_ __field__open_ __field__map_)
+    = Thrift.genStruct _proxy
+        (Thrift.genFieldBool _proxy "open_" 1 0 __field__open_ :
+           Thrift.genField _proxy "map_" (Thrift.getListType _proxy) 2 1
+             (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                (Thrift.buildStruct _proxy)
+                __field__map_)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__open_ <- ST.newSTRef Prelude.False
+            __field__map_ <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getBoolType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseBoolF
+                                                                                      _proxy
+                                                                                      _bool)
+                                                                        ST.writeSTRef __field__open_
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef __field__map_
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__open_ <- ST.readSTRef __field__open_
+                                             !__val__map_ <- ST.readSTRef __field__map_
+                                             Prelude.pure (Hint_shape_ __val__open_ __val__map_)
+              _idMap = HashMap.fromList [("open_", 1), ("map_", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData Hint_shape_ where
+  rnf (Hint_shape_ __field__open_ __field__map_)
+    = DeepSeq.rnf __field__open_ `Prelude.seq`
+        DeepSeq.rnf __field__map_ `Prelude.seq` ()
+
+instance Default.Default Hint_shape_ where
+  def = Hint_shape_ Prelude.False Default.def
+
+instance Hashable.Hashable Hint_shape_ where
+  hashWithSalt __salt (Hint_shape_ _open_ _map_)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _open_) _map_
+
+data Hint_vect_or_dict_ = Hint_vect_or_dict_{hint_vect_or_dict__maybe_key
+                                             :: Prelude.Maybe Hint,
+                                             hint_vect_or_dict__value_ :: Hint}
+                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Hint_vect_or_dict_ where
+  toJSON (Hint_vect_or_dict_ __field__maybe_key __field__value_)
+    = Aeson.object
+        (Prelude.maybe Prelude.id ((:) . ("maybe_key" .=))
+           __field__maybe_key
+           ("value_" .= __field__value_ : Prelude.mempty))
+
+instance Thrift.ThriftStruct Hint_vect_or_dict_ where
+  buildStruct _proxy
+    (Hint_vect_or_dict_ __field__maybe_key __field__value_)
+    = Thrift.genStruct _proxy
+        (let (__cereal__maybe_key, __id__maybe_key)
+               = case __field__maybe_key of
+                   Prelude.Just _val -> ((:)
+                                           (Thrift.genField _proxy "maybe_key"
+                                              (Thrift.getStructType _proxy)
+                                              1
+                                              0
+                                              (Thrift.buildStruct _proxy _val)),
+                                         1)
+                   Prelude.Nothing -> (Prelude.id, 0)
+           in
+           __cereal__maybe_key
+             (Thrift.genField _proxy "value_" (Thrift.getStructType _proxy) 2
+                __id__maybe_key
+                (Thrift.buildStruct _proxy __field__value_)
+                : []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__maybe_key <- ST.newSTRef Prelude.Nothing
+            __field__value_ <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__maybe_key
+                                                                          (Prelude.Just _val)
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__value_
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__maybe_key <- ST.readSTRef
+                                                                    __field__maybe_key
+                                             !__val__value_ <- ST.readSTRef __field__value_
+                                             Prelude.pure
+                                               (Hint_vect_or_dict_ __val__maybe_key __val__value_)
+              _idMap = HashMap.fromList [("maybe_key", 1), ("value_", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData Hint_vect_or_dict_ where
+  rnf (Hint_vect_or_dict_ __field__maybe_key __field__value_)
+    = DeepSeq.rnf __field__maybe_key `Prelude.seq`
+        DeepSeq.rnf __field__value_ `Prelude.seq` ()
+
+instance Default.Default Hint_vect_or_dict_ where
+  def = Hint_vect_or_dict_ Prelude.Nothing Default.def
+
+instance Hashable.Hashable Hint_vect_or_dict_ where
+  hashWithSalt __salt (Hint_vect_or_dict_ _maybe_key _value_)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _maybe_key)
+        _value_
+
+data Hint_key = Hint_key_apply Hint_apply_
+              | Hint_key_option Hint
+              | Hint_key_like Hint
+              | Hint_key_tuple Hint_tuple_
+              | Hint_key_class_args Hint
+              | Hint_key_shape Hint_shape_
+              | Hint_key_soft Hint
+              | Hint_key_intersection [Hint]
+              | Hint_key_union_ [Hint]
+              | Hint_key_vect_or_dict Hint_vect_or_dict_
+              | Hint_key_prim Type
+              | Hint_key_var_ Text.Text
+              | Hint_key_fun_context Text.Text
+              | Hint_key_mixed Glean.Schema.Builtin.Unit
+              | Hint_key_wildcard Glean.Schema.Builtin.Unit
+              | Hint_key_nonnull Glean.Schema.Builtin.Unit
+              | Hint_key_this_ Glean.Schema.Builtin.Unit
+              | Hint_key_dynamic Glean.Schema.Builtin.Unit
+              | Hint_key_nothing Glean.Schema.Builtin.Unit
+              | Hint_key_other Type
+              | Hint_key_EMPTY
+                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Hint_key where
+  toJSON (Hint_key_apply __apply) = Aeson.object ["apply" .= __apply]
+  toJSON (Hint_key_option __option)
+    = Aeson.object ["option" .= __option]
+  toJSON (Hint_key_like __like) = Aeson.object ["like" .= __like]
+  toJSON (Hint_key_tuple __tuple) = Aeson.object ["tuple" .= __tuple]
+  toJSON (Hint_key_class_args __class_args)
+    = Aeson.object ["class_args" .= __class_args]
+  toJSON (Hint_key_shape __shape) = Aeson.object ["shape" .= __shape]
+  toJSON (Hint_key_soft __soft) = Aeson.object ["soft" .= __soft]
+  toJSON (Hint_key_intersection __intersection)
+    = Aeson.object ["intersection" .= __intersection]
+  toJSON (Hint_key_union_ __union_)
+    = Aeson.object ["union_" .= __union_]
+  toJSON (Hint_key_vect_or_dict __vect_or_dict)
+    = Aeson.object ["vect_or_dict" .= __vect_or_dict]
+  toJSON (Hint_key_prim __prim) = Aeson.object ["prim" .= __prim]
+  toJSON (Hint_key_var_ __var_) = Aeson.object ["var_" .= __var_]
+  toJSON (Hint_key_fun_context __fun_context)
+    = Aeson.object ["fun_context" .= __fun_context]
+  toJSON (Hint_key_mixed __mixed) = Aeson.object ["mixed" .= __mixed]
+  toJSON (Hint_key_wildcard __wildcard)
+    = Aeson.object ["wildcard" .= __wildcard]
+  toJSON (Hint_key_nonnull __nonnull)
+    = Aeson.object ["nonnull" .= __nonnull]
+  toJSON (Hint_key_this_ __this_) = Aeson.object ["this_" .= __this_]
+  toJSON (Hint_key_dynamic __dynamic)
+    = Aeson.object ["dynamic" .= __dynamic]
+  toJSON (Hint_key_nothing __nothing)
+    = Aeson.object ["nothing" .= __nothing]
+  toJSON (Hint_key_other __other) = Aeson.object ["other" .= __other]
+  toJSON Hint_key_EMPTY = Aeson.object []
+
+instance Thrift.ThriftStruct Hint_key where
+  buildStruct _proxy (Hint_key_apply __apply)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "apply" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __apply)]
+  buildStruct _proxy (Hint_key_option __option)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "option" (Thrift.getStructType _proxy) 2 0
+           (Thrift.buildStruct _proxy __option)]
+  buildStruct _proxy (Hint_key_like __like)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "like" (Thrift.getStructType _proxy) 3 0
+           (Thrift.buildStruct _proxy __like)]
+  buildStruct _proxy (Hint_key_tuple __tuple)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "tuple" (Thrift.getStructType _proxy) 4 0
+           (Thrift.buildStruct _proxy __tuple)]
+  buildStruct _proxy (Hint_key_class_args __class_args)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "class_args" (Thrift.getStructType _proxy)
+           5
+           0
+           (Thrift.buildStruct _proxy __class_args)]
+  buildStruct _proxy (Hint_key_shape __shape)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "shape" (Thrift.getStructType _proxy) 6 0
+           (Thrift.buildStruct _proxy __shape)]
+  buildStruct _proxy (Hint_key_soft __soft)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "soft" (Thrift.getStructType _proxy) 7 0
+           (Thrift.buildStruct _proxy __soft)]
+  buildStruct _proxy (Hint_key_intersection __intersection)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "intersection" (Thrift.getListType _proxy)
+           8
+           0
+           (Thrift.genList _proxy (Thrift.getStructType _proxy)
+              (Thrift.buildStruct _proxy)
+              __intersection)]
+  buildStruct _proxy (Hint_key_union_ __union_)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "union_" (Thrift.getListType _proxy) 9 0
+           (Thrift.genList _proxy (Thrift.getStructType _proxy)
+              (Thrift.buildStruct _proxy)
+              __union_)]
+  buildStruct _proxy (Hint_key_vect_or_dict __vect_or_dict)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "vect_or_dict"
+           (Thrift.getStructType _proxy)
+           10
+           0
+           (Thrift.buildStruct _proxy __vect_or_dict)]
+  buildStruct _proxy (Hint_key_prim __prim)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "prim" (Thrift.getStructType _proxy) 11 0
+           (Thrift.buildStruct _proxy __prim)]
+  buildStruct _proxy (Hint_key_var_ __var_)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "var_" (Thrift.getStringType _proxy) 12 0
+           (Thrift.genText _proxy __var_)]
+  buildStruct _proxy (Hint_key_fun_context __fun_context)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "fun_context" (Thrift.getStringType _proxy)
+           13
+           0
+           (Thrift.genText _proxy __fun_context)]
+  buildStruct _proxy (Hint_key_mixed __mixed)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "mixed" (Thrift.getStructType _proxy) 14 0
+           (Thrift.buildStruct _proxy __mixed)]
+  buildStruct _proxy (Hint_key_wildcard __wildcard)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "wildcard" (Thrift.getStructType _proxy) 15
+           0
+           (Thrift.buildStruct _proxy __wildcard)]
+  buildStruct _proxy (Hint_key_nonnull __nonnull)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "nonnull" (Thrift.getStructType _proxy) 16
+           0
+           (Thrift.buildStruct _proxy __nonnull)]
+  buildStruct _proxy (Hint_key_this_ __this_)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "this_" (Thrift.getStructType _proxy) 17 0
+           (Thrift.buildStruct _proxy __this_)]
+  buildStruct _proxy (Hint_key_dynamic __dynamic)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "dynamic" (Thrift.getStructType _proxy) 18
+           0
+           (Thrift.buildStruct _proxy __dynamic)]
+  buildStruct _proxy (Hint_key_nothing __nothing)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "nothing" (Thrift.getStructType _proxy) 19
+           0
+           (Thrift.buildStruct _proxy __nothing)]
+  buildStruct _proxy (Hint_key_other __other)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "other" (Thrift.getStructType _proxy) 20 0
+           (Thrift.buildStruct _proxy __other)]
+  buildStruct _proxy Hint_key_EMPTY = Thrift.genStruct _proxy []
+  parseStruct _proxy
+    = do _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap
+         case _fieldBegin of
+           Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                     1 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return (Hint_key_apply _val)
+                                                     2 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return (Hint_key_option _val)
+                                                     3 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return (Hint_key_like _val)
+                                                     4 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return (Hint_key_tuple _val)
+                                                     5 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (Hint_key_class_args _val)
+                                                     6 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return (Hint_key_shape _val)
+                                                     7 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return (Hint_key_soft _val)
+                                                     8 | _type == Thrift.getListType _proxy ->
+                                                         do _val <- Prelude.snd <$>
+                                                                      Thrift.parseList _proxy
+                                                                        (Thrift.parseStruct _proxy)
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (Hint_key_intersection _val)
+                                                     9 | _type == Thrift.getListType _proxy ->
+                                                         do _val <- Prelude.snd <$>
+                                                                      Thrift.parseList _proxy
+                                                                        (Thrift.parseStruct _proxy)
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return (Hint_key_union_ _val)
+                                                     10 | _type == Thrift.getStructType _proxy ->
+                                                          do _val <- Thrift.parseStruct _proxy
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return
+                                                               (Hint_key_vect_or_dict _val)
+                                                     11 | _type == Thrift.getStructType _proxy ->
+                                                          do _val <- Thrift.parseStruct _proxy
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return (Hint_key_prim _val)
+                                                     12 | _type == Thrift.getStringType _proxy ->
+                                                          do _val <- Thrift.parseText _proxy
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return (Hint_key_var_ _val)
+                                                     13 | _type == Thrift.getStringType _proxy ->
+                                                          do _val <- Thrift.parseText _proxy
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return
+                                                               (Hint_key_fun_context _val)
+                                                     14 | _type == Thrift.getStructType _proxy ->
+                                                          do _val <- Thrift.parseStruct _proxy
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return (Hint_key_mixed _val)
+                                                     15 | _type == Thrift.getStructType _proxy ->
+                                                          do _val <- Thrift.parseStruct _proxy
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return (Hint_key_wildcard _val)
+                                                     16 | _type == Thrift.getStructType _proxy ->
+                                                          do _val <- Thrift.parseStruct _proxy
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return (Hint_key_nonnull _val)
+                                                     17 | _type == Thrift.getStructType _proxy ->
+                                                          do _val <- Thrift.parseStruct _proxy
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return (Hint_key_this_ _val)
+                                                     18 | _type == Thrift.getStructType _proxy ->
+                                                          do _val <- Thrift.parseStruct _proxy
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return (Hint_key_dynamic _val)
+                                                     19 | _type == Thrift.getStructType _proxy ->
+                                                          do _val <- Thrift.parseStruct _proxy
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return (Hint_key_nothing _val)
+                                                     20 | _type == Thrift.getStructType _proxy ->
+                                                          do _val <- Thrift.parseStruct _proxy
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return (Hint_key_other _val)
+                                                     _ -> do Thrift.parseSkip _proxy _type
+                                                               Prelude.Nothing
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return Hint_key_EMPTY
+           Thrift.FieldEnd -> Prelude.return Hint_key_EMPTY
+    where
+      _idMap
+        = HashMap.fromList
+            [("apply", 1), ("option", 2), ("like", 3), ("tuple", 4),
+             ("class_args", 5), ("shape", 6), ("soft", 7), ("intersection", 8),
+             ("union_", 9), ("vect_or_dict", 10), ("prim", 11), ("var_", 12),
+             ("fun_context", 13), ("mixed", 14), ("wildcard", 15),
+             ("nonnull", 16), ("this_", 17), ("dynamic", 18), ("nothing", 19),
+             ("other", 20)]
+
+instance DeepSeq.NFData Hint_key where
+  rnf (Hint_key_apply __apply) = DeepSeq.rnf __apply
+  rnf (Hint_key_option __option) = DeepSeq.rnf __option
+  rnf (Hint_key_like __like) = DeepSeq.rnf __like
+  rnf (Hint_key_tuple __tuple) = DeepSeq.rnf __tuple
+  rnf (Hint_key_class_args __class_args) = DeepSeq.rnf __class_args
+  rnf (Hint_key_shape __shape) = DeepSeq.rnf __shape
+  rnf (Hint_key_soft __soft) = DeepSeq.rnf __soft
+  rnf (Hint_key_intersection __intersection)
+    = DeepSeq.rnf __intersection
+  rnf (Hint_key_union_ __union_) = DeepSeq.rnf __union_
+  rnf (Hint_key_vect_or_dict __vect_or_dict)
+    = DeepSeq.rnf __vect_or_dict
+  rnf (Hint_key_prim __prim) = DeepSeq.rnf __prim
+  rnf (Hint_key_var_ __var_) = DeepSeq.rnf __var_
+  rnf (Hint_key_fun_context __fun_context)
+    = DeepSeq.rnf __fun_context
+  rnf (Hint_key_mixed __mixed) = DeepSeq.rnf __mixed
+  rnf (Hint_key_wildcard __wildcard) = DeepSeq.rnf __wildcard
+  rnf (Hint_key_nonnull __nonnull) = DeepSeq.rnf __nonnull
+  rnf (Hint_key_this_ __this_) = DeepSeq.rnf __this_
+  rnf (Hint_key_dynamic __dynamic) = DeepSeq.rnf __dynamic
+  rnf (Hint_key_nothing __nothing) = DeepSeq.rnf __nothing
+  rnf (Hint_key_other __other) = DeepSeq.rnf __other
+  rnf Hint_key_EMPTY = ()
+
+instance Default.Default Hint_key where
+  def = Hint_key_EMPTY
+
+instance Hashable.Hashable Hint_key where
+  hashWithSalt __salt (Hint_key_apply _apply)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 1 _apply)
+  hashWithSalt __salt (Hint_key_option _option)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 2 _option)
+  hashWithSalt __salt (Hint_key_like _like)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 3 _like)
+  hashWithSalt __salt (Hint_key_tuple _tuple)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 4 _tuple)
+  hashWithSalt __salt (Hint_key_class_args _class_args)
+    = Hashable.hashWithSalt __salt
+        (Hashable.hashWithSalt 5 _class_args)
+  hashWithSalt __salt (Hint_key_shape _shape)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 6 _shape)
+  hashWithSalt __salt (Hint_key_soft _soft)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 7 _soft)
+  hashWithSalt __salt (Hint_key_intersection _intersection)
+    = Hashable.hashWithSalt __salt
+        (Hashable.hashWithSalt 8 _intersection)
+  hashWithSalt __salt (Hint_key_union_ _union_)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 9 _union_)
+  hashWithSalt __salt (Hint_key_vect_or_dict _vect_or_dict)
+    = Hashable.hashWithSalt __salt
+        (Hashable.hashWithSalt 10 _vect_or_dict)
+  hashWithSalt __salt (Hint_key_prim _prim)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 11 _prim)
+  hashWithSalt __salt (Hint_key_var_ _var_)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 12 _var_)
+  hashWithSalt __salt (Hint_key_fun_context _fun_context)
+    = Hashable.hashWithSalt __salt
+        (Hashable.hashWithSalt 13 _fun_context)
+  hashWithSalt __salt (Hint_key_mixed _mixed)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 14 _mixed)
+  hashWithSalt __salt (Hint_key_wildcard _wildcard)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 15 _wildcard)
+  hashWithSalt __salt (Hint_key_nonnull _nonnull)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 16 _nonnull)
+  hashWithSalt __salt (Hint_key_this_ _this_)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 17 _this_)
+  hashWithSalt __salt (Hint_key_dynamic _dynamic)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 18 _dynamic)
+  hashWithSalt __salt (Hint_key_nothing _nothing)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 19 _nothing)
+  hashWithSalt __salt (Hint_key_other _other)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 20 _other)
+  hashWithSalt __salt Hint_key_EMPTY
+    = Hashable.hashWithSalt __salt (0 :: Prelude.Int)
+
+data Enumerator_key = Enumerator_key{enumerator_key_name :: Name,
+                                     enumerator_key_enumeration :: EnumDeclaration}
+                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Enumerator_key where
+  toJSON (Enumerator_key __field__name __field__enumeration)
+    = Aeson.object
+        ("name" .= __field__name :
+           "enumeration" .= __field__enumeration : Prelude.mempty)
+
+instance Thrift.ThriftStruct Enumerator_key where
+  buildStruct _proxy
+    (Enumerator_key __field__name __field__enumeration)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__name)
+           :
+           Thrift.genField _proxy "enumeration" (Thrift.getStructType _proxy)
+             2
+             1
+             (Thrift.buildStruct _proxy __field__enumeration)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef Default.def
+            __field__enumeration <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__enumeration
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__enumeration <- ST.readSTRef
+                                                                      __field__enumeration
+                                             Prelude.pure
+                                               (Enumerator_key __val__name __val__enumeration)
+              _idMap = HashMap.fromList [("name", 1), ("enumeration", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData Enumerator_key where
+  rnf (Enumerator_key __field__name __field__enumeration)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__enumeration `Prelude.seq` ()
+
+instance Default.Default Enumerator_key where
+  def = Enumerator_key Default.def Default.def
+
+instance Hashable.Hashable Enumerator_key where
+  hashWithSalt __salt (Enumerator_key _name _enumeration)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+        _enumeration
+
+data EnumDefinition_key = EnumDefinition_key{enumDefinition_key_declaration
+                                             :: EnumDeclaration,
+                                             enumDefinition_key_enumBase :: Type,
+                                             enumDefinition_key_enumBaseTypeInfo ::
+                                             Prelude.Maybe TypeInfo,
+                                             enumDefinition_key_enumConstraint ::
+                                             Prelude.Maybe Type,
+                                             enumDefinition_key_enumConstraintTypeInfo ::
+                                             Prelude.Maybe TypeInfo,
+                                             enumDefinition_key_enumerators :: [Enumerator],
+                                             enumDefinition_key_attributes :: [UserAttribute],
+                                             enumDefinition_key_includes :: [EnumDeclaration],
+                                             enumDefinition_key_isEnumClass :: Prelude.Bool,
+                                             enumDefinition_key_module_ ::
+                                             Prelude.Maybe ModuleMembership}
+                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON EnumDefinition_key where
+  toJSON
+    (EnumDefinition_key __field__declaration __field__enumBase
+       __field__enumBaseTypeInfo __field__enumConstraint
+       __field__enumConstraintTypeInfo __field__enumerators
+       __field__attributes __field__includes __field__isEnumClass
+       __field__module_)
+    = Aeson.object
+        ("declaration" .= __field__declaration :
+           "enumBase" .= __field__enumBase :
+             Prelude.maybe Prelude.id ((:) . ("enumBaseTypeInfo" .=))
+               __field__enumBaseTypeInfo
+               (Prelude.maybe Prelude.id ((:) . ("enumConstraint" .=))
+                  __field__enumConstraint
+                  (Prelude.maybe Prelude.id ((:) . ("enumConstraintTypeInfo" .=))
+                     __field__enumConstraintTypeInfo
+                     ("enumerators" .= __field__enumerators :
+                        "attributes" .= __field__attributes :
+                          "includes" .= __field__includes :
+                            "isEnumClass" .= __field__isEnumClass :
+                              Prelude.maybe Prelude.id ((:) . ("module_" .=)) __field__module_
+                                Prelude.mempty))))
+
+instance Thrift.ThriftStruct EnumDefinition_key where
+  buildStruct _proxy
+    (EnumDefinition_key __field__declaration __field__enumBase
+       __field__enumBaseTypeInfo __field__enumConstraint
+       __field__enumConstraintTypeInfo __field__enumerators
+       __field__attributes __field__includes __field__isEnumClass
+       __field__module_)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "declaration" (Thrift.getStructType _proxy)
+           1
+           0
+           (Thrift.buildStruct _proxy __field__declaration)
+           :
+           Thrift.genField _proxy "enumBase" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__enumBase)
+             :
+             let (__cereal__enumBaseTypeInfo, __id__enumBaseTypeInfo)
+                   = case __field__enumBaseTypeInfo of
+                       Prelude.Just _val -> ((:)
+                                               (Thrift.genField _proxy "enumBaseTypeInfo"
+                                                  (Thrift.getStructType _proxy)
+                                                  3
+                                                  2
+                                                  (Thrift.buildStruct _proxy _val)),
+                                             3)
+                       Prelude.Nothing -> (Prelude.id, 2)
+               in
+               __cereal__enumBaseTypeInfo
+                 (let (__cereal__enumConstraint, __id__enumConstraint)
+                        = case __field__enumConstraint of
+                            Prelude.Just _val -> ((:)
+                                                    (Thrift.genField _proxy "enumConstraint"
+                                                       (Thrift.getStructType _proxy)
+                                                       4
+                                                       __id__enumBaseTypeInfo
+                                                       (Thrift.buildStruct _proxy _val)),
+                                                  4)
+                            Prelude.Nothing -> (Prelude.id, __id__enumBaseTypeInfo)
+                    in
+                    __cereal__enumConstraint
+                      (let (__cereal__enumConstraintTypeInfo,
+                            __id__enumConstraintTypeInfo)
+                             = case __field__enumConstraintTypeInfo of
+                                 Prelude.Just _val -> ((:)
+                                                         (Thrift.genField _proxy
+                                                            "enumConstraintTypeInfo"
+                                                            (Thrift.getStructType _proxy)
+                                                            5
+                                                            __id__enumConstraint
+                                                            (Thrift.buildStruct _proxy _val)),
+                                                       5)
+                                 Prelude.Nothing -> (Prelude.id, __id__enumConstraint)
+                         in
+                         __cereal__enumConstraintTypeInfo
+                           (Thrift.genField _proxy "enumerators" (Thrift.getListType _proxy) 6
+                              __id__enumConstraintTypeInfo
+                              (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                                 (Thrift.buildStruct _proxy)
+                                 __field__enumerators)
+                              :
+                              Thrift.genField _proxy "attributes" (Thrift.getListType _proxy) 7 6
+                                (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                                   (Thrift.buildStruct _proxy)
+                                   __field__attributes)
+                                :
+                                Thrift.genField _proxy "includes" (Thrift.getListType _proxy) 8 7
+                                  (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                                     (Thrift.buildStruct _proxy)
+                                     __field__includes)
+                                  :
+                                  Thrift.genFieldBool _proxy "isEnumClass" 9 8 __field__isEnumClass
+                                    :
+                                    case __field__module_ of
+                                      Prelude.Just _val -> Thrift.genField _proxy "module_"
+                                                             (Thrift.getStructType _proxy)
+                                                             10
+                                                             9
+                                                             (Thrift.buildStruct _proxy _val)
+                                                             : []
+                                      Prelude.Nothing -> []))))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__declaration <- ST.newSTRef Default.def
+            __field__enumBase <- ST.newSTRef Default.def
+            __field__enumBaseTypeInfo <- ST.newSTRef Prelude.Nothing
+            __field__enumConstraint <- ST.newSTRef Prelude.Nothing
+            __field__enumConstraintTypeInfo <- ST.newSTRef Prelude.Nothing
+            __field__enumerators <- ST.newSTRef Default.def
+            __field__attributes <- ST.newSTRef Default.def
+            __field__includes <- ST.newSTRef Default.def
+            __field__isEnumClass <- ST.newSTRef Prelude.False
+            __field__module_ <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__declaration
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__enumBase
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__enumBaseTypeInfo
+                                                                          (Prelude.Just _val)
+                                                                 4 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__enumConstraint
+                                                                          (Prelude.Just _val)
+                                                                 5 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__enumConstraintTypeInfo
+                                                                          (Prelude.Just _val)
+                                                                 6 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__enumerators
+                                                                          _val
+                                                                 7 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__attributes
+                                                                          _val
+                                                                 8 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__includes
+                                                                          _val
+                                                                 9 | _type ==
+                                                                       Thrift.getBoolType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseBoolF
+                                                                                      _proxy
+                                                                                      _bool)
+                                                                        ST.writeSTRef
+                                                                          __field__isEnumClass
+                                                                          _val
+                                                                 10 | _type ==
+                                                                        Thrift.getStructType _proxy
+                                                                      ->
+                                                                      do !_val <- Trans.lift
+                                                                                    (Thrift.parseStruct
+                                                                                       _proxy)
+                                                                         ST.writeSTRef
+                                                                           __field__module_
+                                                                           (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__declaration <- ST.readSTRef
+                                                                      __field__declaration
+                                             !__val__enumBase <- ST.readSTRef __field__enumBase
+                                             !__val__enumBaseTypeInfo <- ST.readSTRef
+                                                                           __field__enumBaseTypeInfo
+                                             !__val__enumConstraint <- ST.readSTRef
+                                                                         __field__enumConstraint
+                                             !__val__enumConstraintTypeInfo <- ST.readSTRef
+                                                                                 __field__enumConstraintTypeInfo
+                                             !__val__enumerators <- ST.readSTRef
+                                                                      __field__enumerators
+                                             !__val__attributes <- ST.readSTRef __field__attributes
+                                             !__val__includes <- ST.readSTRef __field__includes
+                                             !__val__isEnumClass <- ST.readSTRef
+                                                                      __field__isEnumClass
+                                             !__val__module_ <- ST.readSTRef __field__module_
+                                             Prelude.pure
+                                               (EnumDefinition_key __val__declaration
+                                                  __val__enumBase
+                                                  __val__enumBaseTypeInfo
+                                                  __val__enumConstraint
+                                                  __val__enumConstraintTypeInfo
+                                                  __val__enumerators
+                                                  __val__attributes
+                                                  __val__includes
+                                                  __val__isEnumClass
+                                                  __val__module_)
+              _idMap
+                = HashMap.fromList
+                    [("declaration", 1), ("enumBase", 2), ("enumBaseTypeInfo", 3),
+                     ("enumConstraint", 4), ("enumConstraintTypeInfo", 5),
+                     ("enumerators", 6), ("attributes", 7), ("includes", 8),
+                     ("isEnumClass", 9), ("module_", 10)]
+            _parse 0)
+
+instance DeepSeq.NFData EnumDefinition_key where
+  rnf
+    (EnumDefinition_key __field__declaration __field__enumBase
+       __field__enumBaseTypeInfo __field__enumConstraint
+       __field__enumConstraintTypeInfo __field__enumerators
+       __field__attributes __field__includes __field__isEnumClass
+       __field__module_)
+    = DeepSeq.rnf __field__declaration `Prelude.seq`
+        DeepSeq.rnf __field__enumBase `Prelude.seq`
+          DeepSeq.rnf __field__enumBaseTypeInfo `Prelude.seq`
+            DeepSeq.rnf __field__enumConstraint `Prelude.seq`
+              DeepSeq.rnf __field__enumConstraintTypeInfo `Prelude.seq`
+                DeepSeq.rnf __field__enumerators `Prelude.seq`
+                  DeepSeq.rnf __field__attributes `Prelude.seq`
+                    DeepSeq.rnf __field__includes `Prelude.seq`
+                      DeepSeq.rnf __field__isEnumClass `Prelude.seq`
+                        DeepSeq.rnf __field__module_ `Prelude.seq` ()
+
+instance Default.Default EnumDefinition_key where
+  def
+    = EnumDefinition_key Default.def Default.def Prelude.Nothing
+        Prelude.Nothing
+        Prelude.Nothing
+        Default.def
+        Default.def
+        Default.def
+        Prelude.False
+        Prelude.Nothing
+
+instance Hashable.Hashable EnumDefinition_key where
+  hashWithSalt __salt
+    (EnumDefinition_key _declaration _enumBase _enumBaseTypeInfo
+       _enumConstraint _enumConstraintTypeInfo _enumerators _attributes
+       _includes _isEnumClass _module_)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt
+              (Hashable.hashWithSalt
+                 (Hashable.hashWithSalt
+                    (Hashable.hashWithSalt
+                       (Hashable.hashWithSalt
+                          (Hashable.hashWithSalt
+                             (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _declaration)
+                                _enumBase)
+                             _enumBaseTypeInfo)
+                          _enumConstraint)
+                       _enumConstraintTypeInfo)
+                    _enumerators)
+                 _attributes)
+              _includes)
+           _isEnumClass)
+        _module_
+
+newtype EnumDeclaration_key = EnumDeclaration_key{enumDeclaration_key_name
+                                                  :: QName}
+                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON EnumDeclaration_key where
+  toJSON (EnumDeclaration_key __field__name)
+    = Aeson.object ("name" .= __field__name : Prelude.mempty)
+
+instance Thrift.ThriftStruct EnumDeclaration_key where
+  buildStruct _proxy (EnumDeclaration_key __field__name)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__name)
+           : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             Prelude.pure (EnumDeclaration_key __val__name)
+              _idMap = HashMap.fromList [("name", 1)]
+            _parse 0)
+
+instance DeepSeq.NFData EnumDeclaration_key where
+  rnf (EnumDeclaration_key __field__name)
+    = DeepSeq.rnf __field__name `Prelude.seq` ()
+
+instance Default.Default EnumDeclaration_key where
+  def = EnumDeclaration_key Default.def
+
+instance Hashable.Hashable EnumDeclaration_key where
+  hashWithSalt __salt (EnumDeclaration_key _name)
+    = Hashable.hashWithSalt __salt _name
+
+data Definition = Definition_class_ ClassDefinition
+                | Definition_classConst ClassConstDefinition
+                | Definition_enum_ EnumDefinition
+                | Definition_function_ FunctionDefinition
+                | Definition_globalConst GlobalConstDefinition
+                | Definition_interface_ InterfaceDefinition
+                | Definition_trait TraitDefinition
+                | Definition_method MethodDefinition
+                | Definition_property_ PropertyDefinition
+                | Definition_typeConst TypeConstDefinition
+                | Definition_typedef_ TypedefDefinition
+                | Definition_module ModuleDefinition
+                | Definition_EMPTY
+                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Definition where
+  toJSON (Definition_class_ __class_)
+    = Aeson.object ["class_" .= __class_]
+  toJSON (Definition_classConst __classConst)
+    = Aeson.object ["classConst" .= __classConst]
+  toJSON (Definition_enum_ __enum_)
+    = Aeson.object ["enum_" .= __enum_]
+  toJSON (Definition_function_ __function_)
+    = Aeson.object ["function_" .= __function_]
+  toJSON (Definition_globalConst __globalConst)
+    = Aeson.object ["globalConst" .= __globalConst]
+  toJSON (Definition_interface_ __interface_)
+    = Aeson.object ["interface_" .= __interface_]
+  toJSON (Definition_trait __trait)
+    = Aeson.object ["trait" .= __trait]
+  toJSON (Definition_method __method)
+    = Aeson.object ["method" .= __method]
+  toJSON (Definition_property_ __property_)
+    = Aeson.object ["property_" .= __property_]
+  toJSON (Definition_typeConst __typeConst)
+    = Aeson.object ["typeConst" .= __typeConst]
+  toJSON (Definition_typedef_ __typedef_)
+    = Aeson.object ["typedef_" .= __typedef_]
+  toJSON (Definition_module __module)
+    = Aeson.object ["module" .= __module]
+  toJSON Definition_EMPTY = Aeson.object []
+
+instance Thrift.ThriftStruct Definition where
+  buildStruct _proxy (Definition_class_ __class_)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "class_" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __class_)]
+  buildStruct _proxy (Definition_classConst __classConst)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "classConst" (Thrift.getStructType _proxy)
+           2
+           0
+           (Thrift.buildStruct _proxy __classConst)]
+  buildStruct _proxy (Definition_enum_ __enum_)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "enum_" (Thrift.getStructType _proxy) 3 0
+           (Thrift.buildStruct _proxy __enum_)]
+  buildStruct _proxy (Definition_function_ __function_)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "function_" (Thrift.getStructType _proxy) 4
+           0
+           (Thrift.buildStruct _proxy __function_)]
+  buildStruct _proxy (Definition_globalConst __globalConst)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "globalConst" (Thrift.getStructType _proxy)
+           5
+           0
+           (Thrift.buildStruct _proxy __globalConst)]
+  buildStruct _proxy (Definition_interface_ __interface_)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "interface_" (Thrift.getStructType _proxy)
+           6
+           0
+           (Thrift.buildStruct _proxy __interface_)]
+  buildStruct _proxy (Definition_trait __trait)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "trait" (Thrift.getStructType _proxy) 7 0
+           (Thrift.buildStruct _proxy __trait)]
+  buildStruct _proxy (Definition_method __method)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "method" (Thrift.getStructType _proxy) 8 0
+           (Thrift.buildStruct _proxy __method)]
+  buildStruct _proxy (Definition_property_ __property_)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "property_" (Thrift.getStructType _proxy) 9
+           0
+           (Thrift.buildStruct _proxy __property_)]
+  buildStruct _proxy (Definition_typeConst __typeConst)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "typeConst" (Thrift.getStructType _proxy)
+           10
+           0
+           (Thrift.buildStruct _proxy __typeConst)]
+  buildStruct _proxy (Definition_typedef_ __typedef_)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "typedef_" (Thrift.getStructType _proxy) 11
+           0
+           (Thrift.buildStruct _proxy __typedef_)]
+  buildStruct _proxy (Definition_module __module)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "module" (Thrift.getStructType _proxy) 12 0
+           (Thrift.buildStruct _proxy __module)]
+  buildStruct _proxy Definition_EMPTY = Thrift.genStruct _proxy []
+  parseStruct _proxy
+    = do _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap
+         case _fieldBegin of
+           Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                     1 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return (Definition_class_ _val)
+                                                     2 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (Definition_classConst _val)
+                                                     3 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return (Definition_enum_ _val)
+                                                     4 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (Definition_function_ _val)
+                                                     5 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (Definition_globalConst _val)
+                                                     6 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (Definition_interface_ _val)
+                                                     7 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return (Definition_trait _val)
+                                                     8 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return (Definition_method _val)
+                                                     9 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (Definition_property_ _val)
+                                                     10 | _type == Thrift.getStructType _proxy ->
+                                                          do _val <- Thrift.parseStruct _proxy
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return
+                                                               (Definition_typeConst _val)
+                                                     11 | _type == Thrift.getStructType _proxy ->
+                                                          do _val <- Thrift.parseStruct _proxy
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return
+                                                               (Definition_typedef_ _val)
+                                                     12 | _type == Thrift.getStructType _proxy ->
+                                                          do _val <- Thrift.parseStruct _proxy
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return (Definition_module _val)
+                                                     _ -> do Thrift.parseSkip _proxy _type
+                                                               Prelude.Nothing
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return Definition_EMPTY
+           Thrift.FieldEnd -> Prelude.return Definition_EMPTY
+    where
+      _idMap
+        = HashMap.fromList
+            [("class_", 1), ("classConst", 2), ("enum_", 3), ("function_", 4),
+             ("globalConst", 5), ("interface_", 6), ("trait", 7), ("method", 8),
+             ("property_", 9), ("typeConst", 10), ("typedef_", 11),
+             ("module", 12)]
+
+instance DeepSeq.NFData Definition where
+  rnf (Definition_class_ __class_) = DeepSeq.rnf __class_
+  rnf (Definition_classConst __classConst) = DeepSeq.rnf __classConst
+  rnf (Definition_enum_ __enum_) = DeepSeq.rnf __enum_
+  rnf (Definition_function_ __function_) = DeepSeq.rnf __function_
+  rnf (Definition_globalConst __globalConst)
+    = DeepSeq.rnf __globalConst
+  rnf (Definition_interface_ __interface_) = DeepSeq.rnf __interface_
+  rnf (Definition_trait __trait) = DeepSeq.rnf __trait
+  rnf (Definition_method __method) = DeepSeq.rnf __method
+  rnf (Definition_property_ __property_) = DeepSeq.rnf __property_
+  rnf (Definition_typeConst __typeConst) = DeepSeq.rnf __typeConst
+  rnf (Definition_typedef_ __typedef_) = DeepSeq.rnf __typedef_
+  rnf (Definition_module __module) = DeepSeq.rnf __module
+  rnf Definition_EMPTY = ()
+
+instance Default.Default Definition where
+  def = Definition_EMPTY
+
+instance Hashable.Hashable Definition where
+  hashWithSalt __salt (Definition_class_ _class_)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 1 _class_)
+  hashWithSalt __salt (Definition_classConst _classConst)
+    = Hashable.hashWithSalt __salt
+        (Hashable.hashWithSalt 2 _classConst)
+  hashWithSalt __salt (Definition_enum_ _enum_)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 3 _enum_)
+  hashWithSalt __salt (Definition_function_ _function_)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 4 _function_)
+  hashWithSalt __salt (Definition_globalConst _globalConst)
+    = Hashable.hashWithSalt __salt
+        (Hashable.hashWithSalt 5 _globalConst)
+  hashWithSalt __salt (Definition_interface_ _interface_)
+    = Hashable.hashWithSalt __salt
+        (Hashable.hashWithSalt 6 _interface_)
+  hashWithSalt __salt (Definition_trait _trait)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 7 _trait)
+  hashWithSalt __salt (Definition_method _method)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 8 _method)
+  hashWithSalt __salt (Definition_property_ _property_)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 9 _property_)
+  hashWithSalt __salt (Definition_typeConst _typeConst)
+    = Hashable.hashWithSalt __salt
+        (Hashable.hashWithSalt 10 _typeConst)
+  hashWithSalt __salt (Definition_typedef_ _typedef_)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 11 _typedef_)
+  hashWithSalt __salt (Definition_module _module)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 12 _module)
+  hashWithSalt __salt Definition_EMPTY
+    = Hashable.hashWithSalt __salt (0 :: Prelude.Int)
+
+data ContainerDeclaration = ContainerDeclaration_class_ ClassDeclaration
+                          | ContainerDeclaration_enum_ EnumDeclaration
+                          | ContainerDeclaration_interface_ InterfaceDeclaration
+                          | ContainerDeclaration_trait TraitDeclaration
+                          | ContainerDeclaration_EMPTY
+                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ContainerDeclaration where
+  toJSON (ContainerDeclaration_class_ __class_)
+    = Aeson.object ["class_" .= __class_]
+  toJSON (ContainerDeclaration_enum_ __enum_)
+    = Aeson.object ["enum_" .= __enum_]
+  toJSON (ContainerDeclaration_interface_ __interface_)
+    = Aeson.object ["interface_" .= __interface_]
+  toJSON (ContainerDeclaration_trait __trait)
+    = Aeson.object ["trait" .= __trait]
+  toJSON ContainerDeclaration_EMPTY = Aeson.object []
+
+instance Thrift.ThriftStruct ContainerDeclaration where
+  buildStruct _proxy (ContainerDeclaration_class_ __class_)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "class_" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __class_)]
+  buildStruct _proxy (ContainerDeclaration_enum_ __enum_)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "enum_" (Thrift.getStructType _proxy) 2 0
+           (Thrift.buildStruct _proxy __enum_)]
+  buildStruct _proxy (ContainerDeclaration_interface_ __interface_)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "interface_" (Thrift.getStructType _proxy)
+           3
+           0
+           (Thrift.buildStruct _proxy __interface_)]
+  buildStruct _proxy (ContainerDeclaration_trait __trait)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "trait" (Thrift.getStructType _proxy) 4 0
+           (Thrift.buildStruct _proxy __trait)]
+  buildStruct _proxy ContainerDeclaration_EMPTY
+    = Thrift.genStruct _proxy []
+  parseStruct _proxy
+    = do _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap
+         case _fieldBegin of
+           Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                     1 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (ContainerDeclaration_class_ _val)
+                                                     2 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (ContainerDeclaration_enum_ _val)
+                                                     3 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (ContainerDeclaration_interface_ _val)
+                                                     4 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (ContainerDeclaration_trait _val)
+                                                     _ -> do Thrift.parseSkip _proxy _type
+                                                               Prelude.Nothing
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return
+                                                               ContainerDeclaration_EMPTY
+           Thrift.FieldEnd -> Prelude.return ContainerDeclaration_EMPTY
+    where
+      _idMap
+        = HashMap.fromList
+            [("class_", 1), ("enum_", 2), ("interface_", 3), ("trait", 4)]
+
+instance DeepSeq.NFData ContainerDeclaration where
+  rnf (ContainerDeclaration_class_ __class_) = DeepSeq.rnf __class_
+  rnf (ContainerDeclaration_enum_ __enum_) = DeepSeq.rnf __enum_
+  rnf (ContainerDeclaration_interface_ __interface_)
+    = DeepSeq.rnf __interface_
+  rnf (ContainerDeclaration_trait __trait) = DeepSeq.rnf __trait
+  rnf ContainerDeclaration_EMPTY = ()
+
+instance Default.Default ContainerDeclaration where
+  def = ContainerDeclaration_EMPTY
+
+instance Hashable.Hashable ContainerDeclaration where
+  hashWithSalt __salt (ContainerDeclaration_class_ _class_)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 1 _class_)
+  hashWithSalt __salt (ContainerDeclaration_enum_ _enum_)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 2 _enum_)
+  hashWithSalt __salt (ContainerDeclaration_interface_ _interface_)
+    = Hashable.hashWithSalt __salt
+        (Hashable.hashWithSalt 3 _interface_)
+  hashWithSalt __salt (ContainerDeclaration_trait _trait)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 4 _trait)
+  hashWithSalt __salt ContainerDeclaration_EMPTY
+    = Hashable.hashWithSalt __salt (0 :: Prelude.Int)
+
+type ContainerDeclarationQName_value = QName
+
+data ContainerParent_key = ContainerParent_key{containerParent_key_container
+                                               :: ContainerDeclaration,
+                                               containerParent_key_parent :: ContainerDeclaration}
+                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ContainerParent_key where
+  toJSON (ContainerParent_key __field__container __field__parent)
+    = Aeson.object
+        ("container" .= __field__container :
+           "parent" .= __field__parent : Prelude.mempty)
+
+instance Thrift.ThriftStruct ContainerParent_key where
+  buildStruct _proxy
+    (ContainerParent_key __field__container __field__parent)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "container" (Thrift.getStructType _proxy) 1
+           0
+           (Thrift.buildStruct _proxy __field__container)
+           :
+           Thrift.genField _proxy "parent" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__parent)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__container <- ST.newSTRef Default.def
+            __field__parent <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__container
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__parent
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__container <- ST.readSTRef
+                                                                    __field__container
+                                             !__val__parent <- ST.readSTRef __field__parent
+                                             Prelude.pure
+                                               (ContainerParent_key __val__container __val__parent)
+              _idMap = HashMap.fromList [("container", 1), ("parent", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ContainerParent_key where
+  rnf (ContainerParent_key __field__container __field__parent)
+    = DeepSeq.rnf __field__container `Prelude.seq`
+        DeepSeq.rnf __field__parent `Prelude.seq` ()
+
+instance Default.Default ContainerParent_key where
+  def = ContainerParent_key Default.def Default.def
+
+instance Hashable.Hashable ContainerParent_key where
+  hashWithSalt __salt (ContainerParent_key _container _parent)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _container)
+        _parent
+
+data Declaration = Declaration_classConst ClassConstDeclaration
+                 | Declaration_container ContainerDeclaration
+                 | Declaration_enumerator Enumerator
+                 | Declaration_function_ FunctionDeclaration
+                 | Declaration_globalConst GlobalConstDeclaration
+                 | Declaration_namespace_ NamespaceDeclaration
+                 | Declaration_method MethodDeclaration
+                 | Declaration_property_ PropertyDeclaration
+                 | Declaration_typeConst TypeConstDeclaration
+                 | Declaration_typedef_ TypedefDeclaration
+                 | Declaration_module ModuleDeclaration
+                 | Declaration_EMPTY
+                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Declaration where
+  toJSON (Declaration_classConst __classConst)
+    = Aeson.object ["classConst" .= __classConst]
+  toJSON (Declaration_container __container)
+    = Aeson.object ["container" .= __container]
+  toJSON (Declaration_enumerator __enumerator)
+    = Aeson.object ["enumerator" .= __enumerator]
+  toJSON (Declaration_function_ __function_)
+    = Aeson.object ["function_" .= __function_]
+  toJSON (Declaration_globalConst __globalConst)
+    = Aeson.object ["globalConst" .= __globalConst]
+  toJSON (Declaration_namespace_ __namespace_)
+    = Aeson.object ["namespace_" .= __namespace_]
+  toJSON (Declaration_method __method)
+    = Aeson.object ["method" .= __method]
+  toJSON (Declaration_property_ __property_)
+    = Aeson.object ["property_" .= __property_]
+  toJSON (Declaration_typeConst __typeConst)
+    = Aeson.object ["typeConst" .= __typeConst]
+  toJSON (Declaration_typedef_ __typedef_)
+    = Aeson.object ["typedef_" .= __typedef_]
+  toJSON (Declaration_module __module)
+    = Aeson.object ["module" .= __module]
+  toJSON Declaration_EMPTY = Aeson.object []
+
+instance Thrift.ThriftStruct Declaration where
+  buildStruct _proxy (Declaration_classConst __classConst)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "classConst" (Thrift.getStructType _proxy)
+           1
+           0
+           (Thrift.buildStruct _proxy __classConst)]
+  buildStruct _proxy (Declaration_container __container)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "container" (Thrift.getStructType _proxy) 2
+           0
+           (Thrift.buildStruct _proxy __container)]
+  buildStruct _proxy (Declaration_enumerator __enumerator)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "enumerator" (Thrift.getStructType _proxy)
+           3
+           0
+           (Thrift.buildStruct _proxy __enumerator)]
+  buildStruct _proxy (Declaration_function_ __function_)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "function_" (Thrift.getStructType _proxy) 4
+           0
+           (Thrift.buildStruct _proxy __function_)]
+  buildStruct _proxy (Declaration_globalConst __globalConst)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "globalConst" (Thrift.getStructType _proxy)
+           5
+           0
+           (Thrift.buildStruct _proxy __globalConst)]
+  buildStruct _proxy (Declaration_namespace_ __namespace_)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "namespace_" (Thrift.getStructType _proxy)
+           6
+           0
+           (Thrift.buildStruct _proxy __namespace_)]
+  buildStruct _proxy (Declaration_method __method)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "method" (Thrift.getStructType _proxy) 7 0
+           (Thrift.buildStruct _proxy __method)]
+  buildStruct _proxy (Declaration_property_ __property_)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "property_" (Thrift.getStructType _proxy) 8
+           0
+           (Thrift.buildStruct _proxy __property_)]
+  buildStruct _proxy (Declaration_typeConst __typeConst)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "typeConst" (Thrift.getStructType _proxy) 9
+           0
+           (Thrift.buildStruct _proxy __typeConst)]
+  buildStruct _proxy (Declaration_typedef_ __typedef_)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "typedef_" (Thrift.getStructType _proxy) 10
+           0
+           (Thrift.buildStruct _proxy __typedef_)]
+  buildStruct _proxy (Declaration_module __module)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "module" (Thrift.getStructType _proxy) 11 0
+           (Thrift.buildStruct _proxy __module)]
+  buildStruct _proxy Declaration_EMPTY = Thrift.genStruct _proxy []
+  parseStruct _proxy
+    = do _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap
+         case _fieldBegin of
+           Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                     1 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (Declaration_classConst _val)
+                                                     2 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (Declaration_container _val)
+                                                     3 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (Declaration_enumerator _val)
+                                                     4 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (Declaration_function_ _val)
+                                                     5 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (Declaration_globalConst _val)
+                                                     6 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (Declaration_namespace_ _val)
+                                                     7 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return (Declaration_method _val)
+                                                     8 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (Declaration_property_ _val)
+                                                     9 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (Declaration_typeConst _val)
+                                                     10 | _type == Thrift.getStructType _proxy ->
+                                                          do _val <- Thrift.parseStruct _proxy
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return
+                                                               (Declaration_typedef_ _val)
+                                                     11 | _type == Thrift.getStructType _proxy ->
+                                                          do _val <- Thrift.parseStruct _proxy
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return
+                                                               (Declaration_module _val)
+                                                     _ -> do Thrift.parseSkip _proxy _type
+                                                               Prelude.Nothing
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return Declaration_EMPTY
+           Thrift.FieldEnd -> Prelude.return Declaration_EMPTY
+    where
+      _idMap
+        = HashMap.fromList
+            [("classConst", 1), ("container", 2), ("enumerator", 3),
+             ("function_", 4), ("globalConst", 5), ("namespace_", 6),
+             ("method", 7), ("property_", 8), ("typeConst", 9),
+             ("typedef_", 10), ("module", 11)]
+
+instance DeepSeq.NFData Declaration where
+  rnf (Declaration_classConst __classConst)
+    = DeepSeq.rnf __classConst
+  rnf (Declaration_container __container) = DeepSeq.rnf __container
+  rnf (Declaration_enumerator __enumerator)
+    = DeepSeq.rnf __enumerator
+  rnf (Declaration_function_ __function_) = DeepSeq.rnf __function_
+  rnf (Declaration_globalConst __globalConst)
+    = DeepSeq.rnf __globalConst
+  rnf (Declaration_namespace_ __namespace_)
+    = DeepSeq.rnf __namespace_
+  rnf (Declaration_method __method) = DeepSeq.rnf __method
+  rnf (Declaration_property_ __property_) = DeepSeq.rnf __property_
+  rnf (Declaration_typeConst __typeConst) = DeepSeq.rnf __typeConst
+  rnf (Declaration_typedef_ __typedef_) = DeepSeq.rnf __typedef_
+  rnf (Declaration_module __module) = DeepSeq.rnf __module
+  rnf Declaration_EMPTY = ()
+
+instance Default.Default Declaration where
+  def = Declaration_EMPTY
+
+instance Hashable.Hashable Declaration where
+  hashWithSalt __salt (Declaration_classConst _classConst)
+    = Hashable.hashWithSalt __salt
+        (Hashable.hashWithSalt 1 _classConst)
+  hashWithSalt __salt (Declaration_container _container)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 2 _container)
+  hashWithSalt __salt (Declaration_enumerator _enumerator)
+    = Hashable.hashWithSalt __salt
+        (Hashable.hashWithSalt 3 _enumerator)
+  hashWithSalt __salt (Declaration_function_ _function_)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 4 _function_)
+  hashWithSalt __salt (Declaration_globalConst _globalConst)
+    = Hashable.hashWithSalt __salt
+        (Hashable.hashWithSalt 5 _globalConst)
+  hashWithSalt __salt (Declaration_namespace_ _namespace_)
+    = Hashable.hashWithSalt __salt
+        (Hashable.hashWithSalt 6 _namespace_)
+  hashWithSalt __salt (Declaration_method _method)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 7 _method)
+  hashWithSalt __salt (Declaration_property_ _property_)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 8 _property_)
+  hashWithSalt __salt (Declaration_typeConst _typeConst)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 9 _typeConst)
+  hashWithSalt __salt (Declaration_typedef_ _typedef_)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 10 _typedef_)
+  hashWithSalt __salt (Declaration_module _module)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 11 _module)
+  hashWithSalt __salt Declaration_EMPTY
+    = Hashable.hashWithSalt __salt (0 :: Prelude.Int)
+
+data DeclarationComment_key = DeclarationComment_key{declarationComment_key_declaration
+                                                     :: Declaration,
+                                                     declarationComment_key_file ::
+                                                     Glean.Schema.Src.File,
+                                                     declarationComment_key_span ::
+                                                     Glean.Schema.Src.ByteSpan}
+                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON DeclarationComment_key where
+  toJSON
+    (DeclarationComment_key __field__declaration __field__file
+       __field__span)
+    = Aeson.object
+        ("declaration" .= __field__declaration :
+           "file" .= __field__file : "span" .= __field__span : Prelude.mempty)
+
+instance Thrift.ThriftStruct DeclarationComment_key where
+  buildStruct _proxy
+    (DeclarationComment_key __field__declaration __field__file
+       __field__span)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "declaration" (Thrift.getStructType _proxy)
+           1
+           0
+           (Thrift.buildStruct _proxy __field__declaration)
+           :
+           Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__file)
+             :
+             Thrift.genField _proxy "span" (Thrift.getStructType _proxy) 3 2
+               (Thrift.buildStruct _proxy __field__span)
+               : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__declaration <- ST.newSTRef Default.def
+            __field__file <- ST.newSTRef Default.def
+            __field__span <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__declaration
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__file
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__span
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__declaration <- ST.readSTRef
+                                                                      __field__declaration
+                                             !__val__file <- ST.readSTRef __field__file
+                                             !__val__span <- ST.readSTRef __field__span
+                                             Prelude.pure
+                                               (DeclarationComment_key __val__declaration
+                                                  __val__file
+                                                  __val__span)
+              _idMap
+                = HashMap.fromList [("declaration", 1), ("file", 2), ("span", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData DeclarationComment_key where
+  rnf
+    (DeclarationComment_key __field__declaration __field__file
+       __field__span)
+    = DeepSeq.rnf __field__declaration `Prelude.seq`
+        DeepSeq.rnf __field__file `Prelude.seq`
+          DeepSeq.rnf __field__span `Prelude.seq` ()
+
+instance Default.Default DeclarationComment_key where
+  def = DeclarationComment_key Default.def Default.def Default.def
+
+instance Hashable.Hashable DeclarationComment_key where
+  hashWithSalt __salt
+    (DeclarationComment_key _declaration _file _span)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _declaration)
+           _file)
+        _span
+
+data DeclarationLocation_key = DeclarationLocation_key{declarationLocation_key_declaration
+                                                       :: Declaration,
+                                                       declarationLocation_key_file ::
+                                                       Glean.Schema.Src.File,
+                                                       declarationLocation_key_span ::
+                                                       Glean.Schema.Src.ByteSpan}
+                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON DeclarationLocation_key where
+  toJSON
+    (DeclarationLocation_key __field__declaration __field__file
+       __field__span)
+    = Aeson.object
+        ("declaration" .= __field__declaration :
+           "file" .= __field__file : "span" .= __field__span : Prelude.mempty)
+
+instance Thrift.ThriftStruct DeclarationLocation_key where
+  buildStruct _proxy
+    (DeclarationLocation_key __field__declaration __field__file
+       __field__span)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "declaration" (Thrift.getStructType _proxy)
+           1
+           0
+           (Thrift.buildStruct _proxy __field__declaration)
+           :
+           Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__file)
+             :
+             Thrift.genField _proxy "span" (Thrift.getStructType _proxy) 3 2
+               (Thrift.buildStruct _proxy __field__span)
+               : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__declaration <- ST.newSTRef Default.def
+            __field__file <- ST.newSTRef Default.def
+            __field__span <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__declaration
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__file
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__span
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__declaration <- ST.readSTRef
+                                                                      __field__declaration
+                                             !__val__file <- ST.readSTRef __field__file
+                                             !__val__span <- ST.readSTRef __field__span
+                                             Prelude.pure
+                                               (DeclarationLocation_key __val__declaration
+                                                  __val__file
+                                                  __val__span)
+              _idMap
+                = HashMap.fromList [("declaration", 1), ("file", 2), ("span", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData DeclarationLocation_key where
+  rnf
+    (DeclarationLocation_key __field__declaration __field__file
+       __field__span)
+    = DeepSeq.rnf __field__declaration `Prelude.seq`
+        DeepSeq.rnf __field__file `Prelude.seq`
+          DeepSeq.rnf __field__span `Prelude.seq` ()
+
+instance Default.Default DeclarationLocation_key where
+  def = DeclarationLocation_key Default.def Default.def Default.def
+
+instance Hashable.Hashable DeclarationLocation_key where
+  hashWithSalt __salt
+    (DeclarationLocation_key _declaration _file _span)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _declaration)
+           _file)
+        _span
+
+type DeclarationName_value = Name
+
+data DeclarationNamespace_key = DeclarationNamespace_key{declarationNamespace_key_decl
+                                                         :: Declaration,
+                                                         declarationNamespace_key_namespace_ ::
+                                                         NamespaceQName}
+                                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON DeclarationNamespace_key where
+  toJSON (DeclarationNamespace_key __field__decl __field__namespace_)
+    = Aeson.object
+        ("decl" .= __field__decl :
+           "namespace_" .= __field__namespace_ : Prelude.mempty)
+
+instance Thrift.ThriftStruct DeclarationNamespace_key where
+  buildStruct _proxy
+    (DeclarationNamespace_key __field__decl __field__namespace_)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "decl" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__decl)
+           :
+           Thrift.genField _proxy "namespace_" (Thrift.getStructType _proxy) 2
+             1
+             (Thrift.buildStruct _proxy __field__namespace_)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__decl <- ST.newSTRef Default.def
+            __field__namespace_ <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__decl
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__namespace_
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__decl <- ST.readSTRef __field__decl
+                                             !__val__namespace_ <- ST.readSTRef __field__namespace_
+                                             Prelude.pure
+                                               (DeclarationNamespace_key __val__decl
+                                                  __val__namespace_)
+              _idMap = HashMap.fromList [("decl", 1), ("namespace_", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData DeclarationNamespace_key where
+  rnf (DeclarationNamespace_key __field__decl __field__namespace_)
+    = DeepSeq.rnf __field__decl `Prelude.seq`
+        DeepSeq.rnf __field__namespace_ `Prelude.seq` ()
+
+instance Default.Default DeclarationNamespace_key where
+  def = DeclarationNamespace_key Default.def Default.def
+
+instance Hashable.Hashable DeclarationNamespace_key where
+  hashWithSalt __salt (DeclarationNamespace_key _decl _namespace_)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _decl)
+        _namespace_
+
+data DeclarationSource_key = DeclarationSource_key{declarationSource_key_target
+                                                   :: Declaration,
+                                                   declarationSource_key_source :: Declaration}
+                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON DeclarationSource_key where
+  toJSON (DeclarationSource_key __field__target __field__source)
+    = Aeson.object
+        ("target" .= __field__target :
+           "source" .= __field__source : Prelude.mempty)
+
+instance Thrift.ThriftStruct DeclarationSource_key where
+  buildStruct _proxy
+    (DeclarationSource_key __field__target __field__source)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__target)
+           :
+           Thrift.genField _proxy "source" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__source)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__target <- ST.newSTRef Default.def
+            __field__source <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__target
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__source
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__target <- ST.readSTRef
+                                                                 __field__target
+                                             !__val__source <- ST.readSTRef __field__source
+                                             Prelude.pure
+                                               (DeclarationSource_key __val__target __val__source)
+              _idMap = HashMap.fromList [("target", 1), ("source", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData DeclarationSource_key where
+  rnf (DeclarationSource_key __field__target __field__source)
+    = DeepSeq.rnf __field__target `Prelude.seq`
+        DeepSeq.rnf __field__source `Prelude.seq` ()
+
+instance Default.Default DeclarationSource_key where
+  def = DeclarationSource_key Default.def Default.def
+
+instance Hashable.Hashable DeclarationSource_key where
+  hashWithSalt __salt (DeclarationSource_key _target _source)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _target)
+        _source
+
+data DeclarationSpan_key = DeclarationSpan_key{declarationSpan_key_declaration
+                                               :: Declaration,
+                                               declarationSpan_key_file :: Glean.Schema.Src.File,
+                                               declarationSpan_key_span ::
+                                               Glean.Schema.Src.ByteSpan}
+                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON DeclarationSpan_key where
+  toJSON
+    (DeclarationSpan_key __field__declaration __field__file
+       __field__span)
+    = Aeson.object
+        ("declaration" .= __field__declaration :
+           "file" .= __field__file : "span" .= __field__span : Prelude.mempty)
+
+instance Thrift.ThriftStruct DeclarationSpan_key where
+  buildStruct _proxy
+    (DeclarationSpan_key __field__declaration __field__file
+       __field__span)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "declaration" (Thrift.getStructType _proxy)
+           1
+           0
+           (Thrift.buildStruct _proxy __field__declaration)
+           :
+           Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__file)
+             :
+             Thrift.genField _proxy "span" (Thrift.getStructType _proxy) 3 2
+               (Thrift.buildStruct _proxy __field__span)
+               : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__declaration <- ST.newSTRef Default.def
+            __field__file <- ST.newSTRef Default.def
+            __field__span <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__declaration
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__file
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__span
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__declaration <- ST.readSTRef
+                                                                      __field__declaration
+                                             !__val__file <- ST.readSTRef __field__file
+                                             !__val__span <- ST.readSTRef __field__span
+                                             Prelude.pure
+                                               (DeclarationSpan_key __val__declaration __val__file
+                                                  __val__span)
+              _idMap
+                = HashMap.fromList [("declaration", 1), ("file", 2), ("span", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData DeclarationSpan_key where
+  rnf
+    (DeclarationSpan_key __field__declaration __field__file
+       __field__span)
+    = DeepSeq.rnf __field__declaration `Prelude.seq`
+        DeepSeq.rnf __field__file `Prelude.seq`
+          DeepSeq.rnf __field__span `Prelude.seq` ()
+
+instance Default.Default DeclarationSpan_key where
+  def = DeclarationSpan_key Default.def Default.def Default.def
+
+instance Hashable.Hashable DeclarationSpan_key where
+  hashWithSalt __salt (DeclarationSpan_key _declaration _file _span)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _declaration)
+           _file)
+        _span
+
+data DeclarationTarget_key = DeclarationTarget_key{declarationTarget_key_source
+                                                   :: Declaration,
+                                                   declarationTarget_key_target :: Declaration}
+                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON DeclarationTarget_key where
+  toJSON (DeclarationTarget_key __field__source __field__target)
+    = Aeson.object
+        ("source" .= __field__source :
+           "target" .= __field__target : Prelude.mempty)
+
+instance Thrift.ThriftStruct DeclarationTarget_key where
+  buildStruct _proxy
+    (DeclarationTarget_key __field__source __field__target)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "source" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__source)
+           :
+           Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__target)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__source <- ST.newSTRef Default.def
+            __field__target <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__source
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__target
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__source <- ST.readSTRef
+                                                                 __field__source
+                                             !__val__target <- ST.readSTRef __field__target
+                                             Prelude.pure
+                                               (DeclarationTarget_key __val__source __val__target)
+              _idMap = HashMap.fromList [("source", 1), ("target", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData DeclarationTarget_key where
+  rnf (DeclarationTarget_key __field__source __field__target)
+    = DeepSeq.rnf __field__source `Prelude.seq`
+        DeepSeq.rnf __field__target `Prelude.seq` ()
+
+instance Default.Default DeclarationTarget_key where
+  def = DeclarationTarget_key Default.def Default.def
+
+instance Hashable.Hashable DeclarationTarget_key where
+  hashWithSalt __salt (DeclarationTarget_key _source _target)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _source)
+        _target
+
+data DefinitionToDeclaration_key = DefinitionToDeclaration_key{definitionToDeclaration_key_definition
+                                                               :: Definition,
+                                                               definitionToDeclaration_key_declaration
+                                                               :: Declaration}
+                                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON DefinitionToDeclaration_key where
+  toJSON
+    (DefinitionToDeclaration_key __field__definition
+       __field__declaration)
+    = Aeson.object
+        ("definition" .= __field__definition :
+           "declaration" .= __field__declaration : Prelude.mempty)
+
+instance Thrift.ThriftStruct DefinitionToDeclaration_key where
+  buildStruct _proxy
+    (DefinitionToDeclaration_key __field__definition
+       __field__declaration)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "definition" (Thrift.getStructType _proxy)
+           1
+           0
+           (Thrift.buildStruct _proxy __field__definition)
+           :
+           Thrift.genField _proxy "declaration" (Thrift.getStructType _proxy)
+             2
+             1
+             (Thrift.buildStruct _proxy __field__declaration)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__definition <- ST.newSTRef Default.def
+            __field__declaration <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__definition
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__declaration
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__definition <- ST.readSTRef
+                                                                     __field__definition
+                                             !__val__declaration <- ST.readSTRef
+                                                                      __field__declaration
+                                             Prelude.pure
+                                               (DefinitionToDeclaration_key __val__definition
+                                                  __val__declaration)
+              _idMap = HashMap.fromList [("definition", 1), ("declaration", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData DefinitionToDeclaration_key where
+  rnf
+    (DefinitionToDeclaration_key __field__definition
+       __field__declaration)
+    = DeepSeq.rnf __field__definition `Prelude.seq`
+        DeepSeq.rnf __field__declaration `Prelude.seq` ()
+
+instance Default.Default DefinitionToDeclaration_key where
+  def = DefinitionToDeclaration_key Default.def Default.def
+
+instance Hashable.Hashable DefinitionToDeclaration_key where
+  hashWithSalt __salt
+    (DefinitionToDeclaration_key _definition _declaration)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _definition)
+        _declaration
+
+data FileDeclarations_key = FileDeclarations_key{fileDeclarations_key_file
+                                                 :: Glean.Schema.Src.File,
+                                                 fileDeclarations_key_declarations :: [Declaration]}
+                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FileDeclarations_key where
+  toJSON (FileDeclarations_key __field__file __field__declarations)
+    = Aeson.object
+        ("file" .= __field__file :
+           "declarations" .= __field__declarations : Prelude.mempty)
+
+instance Thrift.ThriftStruct FileDeclarations_key where
+  buildStruct _proxy
+    (FileDeclarations_key __field__file __field__declarations)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__file)
+           :
+           Thrift.genField _proxy "declarations" (Thrift.getListType _proxy) 2
+             1
+             (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                (Thrift.buildStruct _proxy)
+                __field__declarations)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__file <- ST.newSTRef Default.def
+            __field__declarations <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__file
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__declarations
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__file <- ST.readSTRef __field__file
+                                             !__val__declarations <- ST.readSTRef
+                                                                       __field__declarations
+                                             Prelude.pure
+                                               (FileDeclarations_key __val__file
+                                                  __val__declarations)
+              _idMap = HashMap.fromList [("file", 1), ("declarations", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData FileDeclarations_key where
+  rnf (FileDeclarations_key __field__file __field__declarations)
+    = DeepSeq.rnf __field__file `Prelude.seq`
+        DeepSeq.rnf __field__declarations `Prelude.seq` ()
+
+instance Default.Default FileDeclarations_key where
+  def = FileDeclarations_key Default.def Default.def
+
+instance Hashable.Hashable FileDeclarations_key where
+  hashWithSalt __salt (FileDeclarations_key _file _declarations)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _file)
+        _declarations
+
+data HackToThrift_key = HackToThrift_key{hackToThrift_key_from ::
+                                         Declaration,
+                                         hackToThrift_key_to :: Glean.Schema.Fbthrift.Declaration}
+                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON HackToThrift_key where
+  toJSON (HackToThrift_key __field__from __field__to)
+    = Aeson.object
+        ("from" .= __field__from : "to" .= __field__to : Prelude.mempty)
+
+instance Thrift.ThriftStruct HackToThrift_key where
+  buildStruct _proxy (HackToThrift_key __field__from __field__to)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "from" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__from)
+           :
+           Thrift.genField _proxy "to" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__to)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__from <- ST.newSTRef Default.def
+            __field__to <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__from
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__to
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__from <- ST.readSTRef __field__from
+                                             !__val__to <- ST.readSTRef __field__to
+                                             Prelude.pure (HackToThrift_key __val__from __val__to)
+              _idMap = HashMap.fromList [("from", 1), ("to", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData HackToThrift_key where
+  rnf (HackToThrift_key __field__from __field__to)
+    = DeepSeq.rnf __field__from `Prelude.seq`
+        DeepSeq.rnf __field__to `Prelude.seq` ()
+
+instance Default.Default HackToThrift_key where
+  def = HackToThrift_key Default.def Default.def
+
+instance Hashable.Hashable HackToThrift_key where
+  hashWithSalt __salt (HackToThrift_key _from _to)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _from) _to
+
+newtype MemberCluster_key = MemberCluster_key{memberCluster_key_members
+                                              :: [Declaration]}
+                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON MemberCluster_key where
+  toJSON (MemberCluster_key __field__members)
+    = Aeson.object ("members" .= __field__members : Prelude.mempty)
+
+instance Thrift.ThriftStruct MemberCluster_key where
+  buildStruct _proxy (MemberCluster_key __field__members)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "members" (Thrift.getListType _proxy) 1 0
+           (Thrift.genList _proxy (Thrift.getStructType _proxy)
+              (Thrift.buildStruct _proxy)
+              __field__members)
+           : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__members <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__members
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__members <- ST.readSTRef
+                                                                  __field__members
+                                             Prelude.pure (MemberCluster_key __val__members)
+              _idMap = HashMap.fromList [("members", 1)]
+            _parse 0)
+
+instance DeepSeq.NFData MemberCluster_key where
+  rnf (MemberCluster_key __field__members)
+    = DeepSeq.rnf __field__members `Prelude.seq` ()
+
+instance Default.Default MemberCluster_key where
+  def = MemberCluster_key Default.def
+
+instance Hashable.Hashable MemberCluster_key where
+  hashWithSalt __salt (MemberCluster_key _members)
+    = Hashable.hashWithSalt __salt _members
+
+data ModuleChild_key = ModuleChild_key{moduleChild_key_module ::
+                                       ModuleDeclaration,
+                                       moduleChild_key_decl :: Declaration}
+                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ModuleChild_key where
+  toJSON (ModuleChild_key __field__module __field__decl)
+    = Aeson.object
+        ("module" .= __field__module :
+           "decl" .= __field__decl : Prelude.mempty)
+
+instance Thrift.ThriftStruct ModuleChild_key where
+  buildStruct _proxy (ModuleChild_key __field__module __field__decl)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "module" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__module)
+           :
+           Thrift.genField _proxy "decl" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__decl)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__module <- ST.newSTRef Default.def
+            __field__decl <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__module
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__decl
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__module <- ST.readSTRef
+                                                                 __field__module
+                                             !__val__decl <- ST.readSTRef __field__decl
+                                             Prelude.pure
+                                               (ModuleChild_key __val__module __val__decl)
+              _idMap = HashMap.fromList [("module", 1), ("decl", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ModuleChild_key where
+  rnf (ModuleChild_key __field__module __field__decl)
+    = DeepSeq.rnf __field__module `Prelude.seq`
+        DeepSeq.rnf __field__decl `Prelude.seq` ()
+
+instance Default.Default ModuleChild_key where
+  def = ModuleChild_key Default.def Default.def
+
+instance Hashable.Hashable ModuleChild_key where
+  hashWithSalt __salt (ModuleChild_key _module _decl)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _module)
+        _decl
+
+data ModuleParent_key = ModuleParent_key{moduleParent_key_decl ::
+                                         Declaration,
+                                         moduleParent_key_module :: ModuleDeclaration}
+                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ModuleParent_key where
+  toJSON (ModuleParent_key __field__decl __field__module)
+    = Aeson.object
+        ("decl" .= __field__decl :
+           "module" .= __field__module : Prelude.mempty)
+
+instance Thrift.ThriftStruct ModuleParent_key where
+  buildStruct _proxy (ModuleParent_key __field__decl __field__module)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "decl" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__decl)
+           :
+           Thrift.genField _proxy "module" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__module)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__decl <- ST.newSTRef Default.def
+            __field__module <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__decl
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__module
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__decl <- ST.readSTRef __field__decl
+                                             !__val__module <- ST.readSTRef __field__module
+                                             Prelude.pure
+                                               (ModuleParent_key __val__decl __val__module)
+              _idMap = HashMap.fromList [("decl", 1), ("module", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ModuleParent_key where
+  rnf (ModuleParent_key __field__decl __field__module)
+    = DeepSeq.rnf __field__decl `Prelude.seq`
+        DeepSeq.rnf __field__module `Prelude.seq` ()
+
+instance Default.Default ModuleParent_key where
+  def = ModuleParent_key Default.def Default.def
+
+instance Hashable.Hashable ModuleParent_key where
+  hashWithSalt __salt (ModuleParent_key _decl _module)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _decl)
+        _module
+
+data NamespaceMember_key = NamespaceMember_key{namespaceMember_key_namespace_
+                                               :: NamespaceQName,
+                                               namespaceMember_key_decl :: Declaration}
+                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON NamespaceMember_key where
+  toJSON (NamespaceMember_key __field__namespace_ __field__decl)
+    = Aeson.object
+        ("namespace_" .= __field__namespace_ :
+           "decl" .= __field__decl : Prelude.mempty)
+
+instance Thrift.ThriftStruct NamespaceMember_key where
+  buildStruct _proxy
+    (NamespaceMember_key __field__namespace_ __field__decl)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "namespace_" (Thrift.getStructType _proxy)
+           1
+           0
+           (Thrift.buildStruct _proxy __field__namespace_)
+           :
+           Thrift.genField _proxy "decl" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__decl)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__namespace_ <- ST.newSTRef Default.def
+            __field__decl <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__namespace_
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__decl
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__namespace_ <- ST.readSTRef
+                                                                     __field__namespace_
+                                             !__val__decl <- ST.readSTRef __field__decl
+                                             Prelude.pure
+                                               (NamespaceMember_key __val__namespace_ __val__decl)
+              _idMap = HashMap.fromList [("namespace_", 1), ("decl", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData NamespaceMember_key where
+  rnf (NamespaceMember_key __field__namespace_ __field__decl)
+    = DeepSeq.rnf __field__namespace_ `Prelude.seq`
+        DeepSeq.rnf __field__decl `Prelude.seq` ()
+
+instance Default.Default NamespaceMember_key where
+  def = NamespaceMember_key Default.def Default.def
+
+instance Hashable.Hashable NamespaceMember_key where
+  hashWithSalt __salt (NamespaceMember_key _namespace_ _decl)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _namespace_)
+        _decl
+
+data SearchClassByName_key = SearchClassByName_key{searchClassByName_key_name
+                                                   :: Text.Text,
+                                                   searchClassByName_key_parent ::
+                                                   Prelude.Maybe NamespaceQName,
+                                                   searchClassByName_key_decl :: Declaration}
+                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchClassByName_key where
+  toJSON
+    (SearchClassByName_key __field__name __field__parent __field__decl)
+    = Aeson.object
+        ("name" .= __field__name :
+           Prelude.maybe Prelude.id ((:) . ("parent" .=)) __field__parent
+             ("decl" .= __field__decl : Prelude.mempty))
+
+instance Thrift.ThriftStruct SearchClassByName_key where
+  buildStruct _proxy
+    (SearchClassByName_key __field__name __field__parent __field__decl)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           let (__cereal__parent, __id__parent)
+                 = case __field__parent of
+                     Prelude.Just _val -> ((:)
+                                             (Thrift.genField _proxy "parent"
+                                                (Thrift.getStructType _proxy)
+                                                2
+                                                1
+                                                (Thrift.buildStruct _proxy _val)),
+                                           2)
+                     Prelude.Nothing -> (Prelude.id, 1)
+             in
+             __cereal__parent
+               (Thrift.genField _proxy "decl" (Thrift.getStructType _proxy) 3
+                  __id__parent
+                  (Thrift.buildStruct _proxy __field__decl)
+                  : []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__parent <- ST.newSTRef Prelude.Nothing
+            __field__decl <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__parent
+                                                                          (Prelude.Just _val)
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__decl
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__parent <- ST.readSTRef __field__parent
+                                             !__val__decl <- ST.readSTRef __field__decl
+                                             Prelude.pure
+                                               (SearchClassByName_key __val__name __val__parent
+                                                  __val__decl)
+              _idMap = HashMap.fromList [("name", 1), ("parent", 2), ("decl", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchClassByName_key where
+  rnf
+    (SearchClassByName_key __field__name __field__parent __field__decl)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__parent `Prelude.seq`
+          DeepSeq.rnf __field__decl `Prelude.seq` ()
+
+instance Default.Default SearchClassByName_key where
+  def = SearchClassByName_key "" Prelude.Nothing Default.def
+
+instance Hashable.Hashable SearchClassByName_key where
+  hashWithSalt __salt (SearchClassByName_key _name _parent _decl)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+           _parent)
+        _decl
+
+data SearchClassConstByName_key = SearchClassConstByName_key{searchClassConstByName_key_name
+                                                             :: Text.Text,
+                                                             searchClassConstByName_key_parent ::
+                                                             QName,
+                                                             searchClassConstByName_key_decl ::
+                                                             Declaration}
+                                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchClassConstByName_key where
+  toJSON
+    (SearchClassConstByName_key __field__name __field__parent
+       __field__decl)
+    = Aeson.object
+        ("name" .= __field__name :
+           "parent" .= __field__parent :
+             "decl" .= __field__decl : Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchClassConstByName_key where
+  buildStruct _proxy
+    (SearchClassConstByName_key __field__name __field__parent
+       __field__decl)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "parent" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__parent)
+             :
+             Thrift.genField _proxy "decl" (Thrift.getStructType _proxy) 3 2
+               (Thrift.buildStruct _proxy __field__decl)
+               : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__parent <- ST.newSTRef Default.def
+            __field__decl <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__parent
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__decl
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__parent <- ST.readSTRef __field__parent
+                                             !__val__decl <- ST.readSTRef __field__decl
+                                             Prelude.pure
+                                               (SearchClassConstByName_key __val__name __val__parent
+                                                  __val__decl)
+              _idMap = HashMap.fromList [("name", 1), ("parent", 2), ("decl", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchClassConstByName_key where
+  rnf
+    (SearchClassConstByName_key __field__name __field__parent
+       __field__decl)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__parent `Prelude.seq`
+          DeepSeq.rnf __field__decl `Prelude.seq` ()
+
+instance Default.Default SearchClassConstByName_key where
+  def = SearchClassConstByName_key "" Default.def Default.def
+
+instance Hashable.Hashable SearchClassConstByName_key where
+  hashWithSalt __salt
+    (SearchClassConstByName_key _name _parent _decl)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+           _parent)
+        _decl
+
+data SearchEnumByName_key = SearchEnumByName_key{searchEnumByName_key_name
+                                                 :: Text.Text,
+                                                 searchEnumByName_key_parent ::
+                                                 Prelude.Maybe NamespaceQName,
+                                                 searchEnumByName_key_decl :: Declaration}
+                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchEnumByName_key where
+  toJSON
+    (SearchEnumByName_key __field__name __field__parent __field__decl)
+    = Aeson.object
+        ("name" .= __field__name :
+           Prelude.maybe Prelude.id ((:) . ("parent" .=)) __field__parent
+             ("decl" .= __field__decl : Prelude.mempty))
+
+instance Thrift.ThriftStruct SearchEnumByName_key where
+  buildStruct _proxy
+    (SearchEnumByName_key __field__name __field__parent __field__decl)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           let (__cereal__parent, __id__parent)
+                 = case __field__parent of
+                     Prelude.Just _val -> ((:)
+                                             (Thrift.genField _proxy "parent"
+                                                (Thrift.getStructType _proxy)
+                                                2
+                                                1
+                                                (Thrift.buildStruct _proxy _val)),
+                                           2)
+                     Prelude.Nothing -> (Prelude.id, 1)
+             in
+             __cereal__parent
+               (Thrift.genField _proxy "decl" (Thrift.getStructType _proxy) 3
+                  __id__parent
+                  (Thrift.buildStruct _proxy __field__decl)
+                  : []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__parent <- ST.newSTRef Prelude.Nothing
+            __field__decl <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__parent
+                                                                          (Prelude.Just _val)
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__decl
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__parent <- ST.readSTRef __field__parent
+                                             !__val__decl <- ST.readSTRef __field__decl
+                                             Prelude.pure
+                                               (SearchEnumByName_key __val__name __val__parent
+                                                  __val__decl)
+              _idMap = HashMap.fromList [("name", 1), ("parent", 2), ("decl", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchEnumByName_key where
+  rnf
+    (SearchEnumByName_key __field__name __field__parent __field__decl)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__parent `Prelude.seq`
+          DeepSeq.rnf __field__decl `Prelude.seq` ()
+
+instance Default.Default SearchEnumByName_key where
+  def = SearchEnumByName_key "" Prelude.Nothing Default.def
+
+instance Hashable.Hashable SearchEnumByName_key where
+  hashWithSalt __salt (SearchEnumByName_key _name _parent _decl)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+           _parent)
+        _decl
+
+data SearchEnumeratorByName_key = SearchEnumeratorByName_key{searchEnumeratorByName_key_name
+                                                             :: Text.Text,
+                                                             searchEnumeratorByName_key_parent ::
+                                                             QName,
+                                                             searchEnumeratorByName_key_decl ::
+                                                             Declaration}
+                                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchEnumeratorByName_key where
+  toJSON
+    (SearchEnumeratorByName_key __field__name __field__parent
+       __field__decl)
+    = Aeson.object
+        ("name" .= __field__name :
+           "parent" .= __field__parent :
+             "decl" .= __field__decl : Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchEnumeratorByName_key where
+  buildStruct _proxy
+    (SearchEnumeratorByName_key __field__name __field__parent
+       __field__decl)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "parent" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__parent)
+             :
+             Thrift.genField _proxy "decl" (Thrift.getStructType _proxy) 3 2
+               (Thrift.buildStruct _proxy __field__decl)
+               : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__parent <- ST.newSTRef Default.def
+            __field__decl <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__parent
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__decl
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__parent <- ST.readSTRef __field__parent
+                                             !__val__decl <- ST.readSTRef __field__decl
+                                             Prelude.pure
+                                               (SearchEnumeratorByName_key __val__name __val__parent
+                                                  __val__decl)
+              _idMap = HashMap.fromList [("name", 1), ("parent", 2), ("decl", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchEnumeratorByName_key where
+  rnf
+    (SearchEnumeratorByName_key __field__name __field__parent
+       __field__decl)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__parent `Prelude.seq`
+          DeepSeq.rnf __field__decl `Prelude.seq` ()
+
+instance Default.Default SearchEnumeratorByName_key where
+  def = SearchEnumeratorByName_key "" Default.def Default.def
+
+instance Hashable.Hashable SearchEnumeratorByName_key where
+  hashWithSalt __salt
+    (SearchEnumeratorByName_key _name _parent _decl)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+           _parent)
+        _decl
+
+data SearchFunctionByName_key = SearchFunctionByName_key{searchFunctionByName_key_name
+                                                         :: Text.Text,
+                                                         searchFunctionByName_key_parent ::
+                                                         Prelude.Maybe NamespaceQName,
+                                                         searchFunctionByName_key_decl ::
+                                                         Declaration}
+                                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchFunctionByName_key where
+  toJSON
+    (SearchFunctionByName_key __field__name __field__parent
+       __field__decl)
+    = Aeson.object
+        ("name" .= __field__name :
+           Prelude.maybe Prelude.id ((:) . ("parent" .=)) __field__parent
+             ("decl" .= __field__decl : Prelude.mempty))
+
+instance Thrift.ThriftStruct SearchFunctionByName_key where
+  buildStruct _proxy
+    (SearchFunctionByName_key __field__name __field__parent
+       __field__decl)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           let (__cereal__parent, __id__parent)
+                 = case __field__parent of
+                     Prelude.Just _val -> ((:)
+                                             (Thrift.genField _proxy "parent"
+                                                (Thrift.getStructType _proxy)
+                                                2
+                                                1
+                                                (Thrift.buildStruct _proxy _val)),
+                                           2)
+                     Prelude.Nothing -> (Prelude.id, 1)
+             in
+             __cereal__parent
+               (Thrift.genField _proxy "decl" (Thrift.getStructType _proxy) 3
+                  __id__parent
+                  (Thrift.buildStruct _proxy __field__decl)
+                  : []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__parent <- ST.newSTRef Prelude.Nothing
+            __field__decl <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__parent
+                                                                          (Prelude.Just _val)
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__decl
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__parent <- ST.readSTRef __field__parent
+                                             !__val__decl <- ST.readSTRef __field__decl
+                                             Prelude.pure
+                                               (SearchFunctionByName_key __val__name __val__parent
+                                                  __val__decl)
+              _idMap = HashMap.fromList [("name", 1), ("parent", 2), ("decl", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchFunctionByName_key where
+  rnf
+    (SearchFunctionByName_key __field__name __field__parent
+       __field__decl)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__parent `Prelude.seq`
+          DeepSeq.rnf __field__decl `Prelude.seq` ()
+
+instance Default.Default SearchFunctionByName_key where
+  def = SearchFunctionByName_key "" Prelude.Nothing Default.def
+
+instance Hashable.Hashable SearchFunctionByName_key where
+  hashWithSalt __salt (SearchFunctionByName_key _name _parent _decl)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+           _parent)
+        _decl
+
+data SearchGlobalConstByName_key = SearchGlobalConstByName_key{searchGlobalConstByName_key_name
+                                                               :: Text.Text,
+                                                               searchGlobalConstByName_key_parent ::
+                                                               Prelude.Maybe NamespaceQName,
+                                                               searchGlobalConstByName_key_decl ::
+                                                               Declaration}
+                                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchGlobalConstByName_key where
+  toJSON
+    (SearchGlobalConstByName_key __field__name __field__parent
+       __field__decl)
+    = Aeson.object
+        ("name" .= __field__name :
+           Prelude.maybe Prelude.id ((:) . ("parent" .=)) __field__parent
+             ("decl" .= __field__decl : Prelude.mempty))
+
+instance Thrift.ThriftStruct SearchGlobalConstByName_key where
+  buildStruct _proxy
+    (SearchGlobalConstByName_key __field__name __field__parent
+       __field__decl)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           let (__cereal__parent, __id__parent)
+                 = case __field__parent of
+                     Prelude.Just _val -> ((:)
+                                             (Thrift.genField _proxy "parent"
+                                                (Thrift.getStructType _proxy)
+                                                2
+                                                1
+                                                (Thrift.buildStruct _proxy _val)),
+                                           2)
+                     Prelude.Nothing -> (Prelude.id, 1)
+             in
+             __cereal__parent
+               (Thrift.genField _proxy "decl" (Thrift.getStructType _proxy) 3
+                  __id__parent
+                  (Thrift.buildStruct _proxy __field__decl)
+                  : []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__parent <- ST.newSTRef Prelude.Nothing
+            __field__decl <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__parent
+                                                                          (Prelude.Just _val)
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__decl
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__parent <- ST.readSTRef __field__parent
+                                             !__val__decl <- ST.readSTRef __field__decl
+                                             Prelude.pure
+                                               (SearchGlobalConstByName_key __val__name
+                                                  __val__parent
+                                                  __val__decl)
+              _idMap = HashMap.fromList [("name", 1), ("parent", 2), ("decl", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchGlobalConstByName_key where
+  rnf
+    (SearchGlobalConstByName_key __field__name __field__parent
+       __field__decl)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__parent `Prelude.seq`
+          DeepSeq.rnf __field__decl `Prelude.seq` ()
+
+instance Default.Default SearchGlobalConstByName_key where
+  def = SearchGlobalConstByName_key "" Prelude.Nothing Default.def
+
+instance Hashable.Hashable SearchGlobalConstByName_key where
+  hashWithSalt __salt
+    (SearchGlobalConstByName_key _name _parent _decl)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+           _parent)
+        _decl
+
+data SearchInterfaceByName_key = SearchInterfaceByName_key{searchInterfaceByName_key_name
+                                                           :: Text.Text,
+                                                           searchInterfaceByName_key_parent ::
+                                                           Prelude.Maybe NamespaceQName,
+                                                           searchInterfaceByName_key_decl ::
+                                                           Declaration}
+                                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchInterfaceByName_key where
+  toJSON
+    (SearchInterfaceByName_key __field__name __field__parent
+       __field__decl)
+    = Aeson.object
+        ("name" .= __field__name :
+           Prelude.maybe Prelude.id ((:) . ("parent" .=)) __field__parent
+             ("decl" .= __field__decl : Prelude.mempty))
+
+instance Thrift.ThriftStruct SearchInterfaceByName_key where
+  buildStruct _proxy
+    (SearchInterfaceByName_key __field__name __field__parent
+       __field__decl)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           let (__cereal__parent, __id__parent)
+                 = case __field__parent of
+                     Prelude.Just _val -> ((:)
+                                             (Thrift.genField _proxy "parent"
+                                                (Thrift.getStructType _proxy)
+                                                2
+                                                1
+                                                (Thrift.buildStruct _proxy _val)),
+                                           2)
+                     Prelude.Nothing -> (Prelude.id, 1)
+             in
+             __cereal__parent
+               (Thrift.genField _proxy "decl" (Thrift.getStructType _proxy) 3
+                  __id__parent
+                  (Thrift.buildStruct _proxy __field__decl)
+                  : []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__parent <- ST.newSTRef Prelude.Nothing
+            __field__decl <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__parent
+                                                                          (Prelude.Just _val)
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__decl
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__parent <- ST.readSTRef __field__parent
+                                             !__val__decl <- ST.readSTRef __field__decl
+                                             Prelude.pure
+                                               (SearchInterfaceByName_key __val__name __val__parent
+                                                  __val__decl)
+              _idMap = HashMap.fromList [("name", 1), ("parent", 2), ("decl", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchInterfaceByName_key where
+  rnf
+    (SearchInterfaceByName_key __field__name __field__parent
+       __field__decl)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__parent `Prelude.seq`
+          DeepSeq.rnf __field__decl `Prelude.seq` ()
+
+instance Default.Default SearchInterfaceByName_key where
+  def = SearchInterfaceByName_key "" Prelude.Nothing Default.def
+
+instance Hashable.Hashable SearchInterfaceByName_key where
+  hashWithSalt __salt (SearchInterfaceByName_key _name _parent _decl)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+           _parent)
+        _decl
+
+data SearchMethodByName_key = SearchMethodByName_key{searchMethodByName_key_name
+                                                     :: Text.Text,
+                                                     searchMethodByName_key_parent :: QName,
+                                                     searchMethodByName_key_decl :: Declaration}
+                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchMethodByName_key where
+  toJSON
+    (SearchMethodByName_key __field__name __field__parent
+       __field__decl)
+    = Aeson.object
+        ("name" .= __field__name :
+           "parent" .= __field__parent :
+             "decl" .= __field__decl : Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchMethodByName_key where
+  buildStruct _proxy
+    (SearchMethodByName_key __field__name __field__parent
+       __field__decl)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "parent" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__parent)
+             :
+             Thrift.genField _proxy "decl" (Thrift.getStructType _proxy) 3 2
+               (Thrift.buildStruct _proxy __field__decl)
+               : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__parent <- ST.newSTRef Default.def
+            __field__decl <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__parent
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__decl
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__parent <- ST.readSTRef __field__parent
+                                             !__val__decl <- ST.readSTRef __field__decl
+                                             Prelude.pure
+                                               (SearchMethodByName_key __val__name __val__parent
+                                                  __val__decl)
+              _idMap = HashMap.fromList [("name", 1), ("parent", 2), ("decl", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchMethodByName_key where
+  rnf
+    (SearchMethodByName_key __field__name __field__parent
+       __field__decl)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__parent `Prelude.seq`
+          DeepSeq.rnf __field__decl `Prelude.seq` ()
+
+instance Default.Default SearchMethodByName_key where
+  def = SearchMethodByName_key "" Default.def Default.def
+
+instance Hashable.Hashable SearchMethodByName_key where
+  hashWithSalt __salt (SearchMethodByName_key _name _parent _decl)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+           _parent)
+        _decl
+
+data SearchModuleByName_key = SearchModuleByName_key{searchModuleByName_key_name
+                                                     :: Text.Text,
+                                                     searchModuleByName_key_decl :: Declaration}
+                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchModuleByName_key where
+  toJSON (SearchModuleByName_key __field__name __field__decl)
+    = Aeson.object
+        ("name" .= __field__name :
+           "decl" .= __field__decl : Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchModuleByName_key where
+  buildStruct _proxy
+    (SearchModuleByName_key __field__name __field__decl)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "decl" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__decl)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__decl <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__decl
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__decl <- ST.readSTRef __field__decl
+                                             Prelude.pure
+                                               (SearchModuleByName_key __val__name __val__decl)
+              _idMap = HashMap.fromList [("name", 1), ("decl", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchModuleByName_key where
+  rnf (SearchModuleByName_key __field__name __field__decl)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__decl `Prelude.seq` ()
+
+instance Default.Default SearchModuleByName_key where
+  def = SearchModuleByName_key "" Default.def
+
+instance Hashable.Hashable SearchModuleByName_key where
+  hashWithSalt __salt (SearchModuleByName_key _name _decl)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _decl
+
+data SearchNamespaceByName_key = SearchNamespaceByName_key{searchNamespaceByName_key_name
+                                                           :: Text.Text,
+                                                           searchNamespaceByName_key_parent ::
+                                                           Prelude.Maybe NamespaceQName,
+                                                           searchNamespaceByName_key_decl ::
+                                                           Declaration}
+                                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchNamespaceByName_key where
+  toJSON
+    (SearchNamespaceByName_key __field__name __field__parent
+       __field__decl)
+    = Aeson.object
+        ("name" .= __field__name :
+           Prelude.maybe Prelude.id ((:) . ("parent" .=)) __field__parent
+             ("decl" .= __field__decl : Prelude.mempty))
+
+instance Thrift.ThriftStruct SearchNamespaceByName_key where
+  buildStruct _proxy
+    (SearchNamespaceByName_key __field__name __field__parent
+       __field__decl)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           let (__cereal__parent, __id__parent)
+                 = case __field__parent of
+                     Prelude.Just _val -> ((:)
+                                             (Thrift.genField _proxy "parent"
+                                                (Thrift.getStructType _proxy)
+                                                2
+                                                1
+                                                (Thrift.buildStruct _proxy _val)),
+                                           2)
+                     Prelude.Nothing -> (Prelude.id, 1)
+             in
+             __cereal__parent
+               (Thrift.genField _proxy "decl" (Thrift.getStructType _proxy) 3
+                  __id__parent
+                  (Thrift.buildStruct _proxy __field__decl)
+                  : []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__parent <- ST.newSTRef Prelude.Nothing
+            __field__decl <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__parent
+                                                                          (Prelude.Just _val)
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__decl
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__parent <- ST.readSTRef __field__parent
+                                             !__val__decl <- ST.readSTRef __field__decl
+                                             Prelude.pure
+                                               (SearchNamespaceByName_key __val__name __val__parent
+                                                  __val__decl)
+              _idMap = HashMap.fromList [("name", 1), ("parent", 2), ("decl", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchNamespaceByName_key where
+  rnf
+    (SearchNamespaceByName_key __field__name __field__parent
+       __field__decl)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__parent `Prelude.seq`
+          DeepSeq.rnf __field__decl `Prelude.seq` ()
+
+instance Default.Default SearchNamespaceByName_key where
+  def = SearchNamespaceByName_key "" Prelude.Nothing Default.def
+
+instance Hashable.Hashable SearchNamespaceByName_key where
+  hashWithSalt __salt (SearchNamespaceByName_key _name _parent _decl)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+           _parent)
+        _decl
+
+data SearchPropertyByName_key = SearchPropertyByName_key{searchPropertyByName_key_name
+                                                         :: Text.Text,
+                                                         searchPropertyByName_key_parent :: QName,
+                                                         searchPropertyByName_key_decl ::
+                                                         Declaration}
+                                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchPropertyByName_key where
+  toJSON
+    (SearchPropertyByName_key __field__name __field__parent
+       __field__decl)
+    = Aeson.object
+        ("name" .= __field__name :
+           "parent" .= __field__parent :
+             "decl" .= __field__decl : Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchPropertyByName_key where
+  buildStruct _proxy
+    (SearchPropertyByName_key __field__name __field__parent
+       __field__decl)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "parent" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__parent)
+             :
+             Thrift.genField _proxy "decl" (Thrift.getStructType _proxy) 3 2
+               (Thrift.buildStruct _proxy __field__decl)
+               : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__parent <- ST.newSTRef Default.def
+            __field__decl <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__parent
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__decl
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__parent <- ST.readSTRef __field__parent
+                                             !__val__decl <- ST.readSTRef __field__decl
+                                             Prelude.pure
+                                               (SearchPropertyByName_key __val__name __val__parent
+                                                  __val__decl)
+              _idMap = HashMap.fromList [("name", 1), ("parent", 2), ("decl", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchPropertyByName_key where
+  rnf
+    (SearchPropertyByName_key __field__name __field__parent
+       __field__decl)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__parent `Prelude.seq`
+          DeepSeq.rnf __field__decl `Prelude.seq` ()
+
+instance Default.Default SearchPropertyByName_key where
+  def = SearchPropertyByName_key "" Default.def Default.def
+
+instance Hashable.Hashable SearchPropertyByName_key where
+  hashWithSalt __salt (SearchPropertyByName_key _name _parent _decl)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+           _parent)
+        _decl
+
+data SearchTraitByName_key = SearchTraitByName_key{searchTraitByName_key_name
+                                                   :: Text.Text,
+                                                   searchTraitByName_key_parent ::
+                                                   Prelude.Maybe NamespaceQName,
+                                                   searchTraitByName_key_decl :: Declaration}
+                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchTraitByName_key where
+  toJSON
+    (SearchTraitByName_key __field__name __field__parent __field__decl)
+    = Aeson.object
+        ("name" .= __field__name :
+           Prelude.maybe Prelude.id ((:) . ("parent" .=)) __field__parent
+             ("decl" .= __field__decl : Prelude.mempty))
+
+instance Thrift.ThriftStruct SearchTraitByName_key where
+  buildStruct _proxy
+    (SearchTraitByName_key __field__name __field__parent __field__decl)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           let (__cereal__parent, __id__parent)
+                 = case __field__parent of
+                     Prelude.Just _val -> ((:)
+                                             (Thrift.genField _proxy "parent"
+                                                (Thrift.getStructType _proxy)
+                                                2
+                                                1
+                                                (Thrift.buildStruct _proxy _val)),
+                                           2)
+                     Prelude.Nothing -> (Prelude.id, 1)
+             in
+             __cereal__parent
+               (Thrift.genField _proxy "decl" (Thrift.getStructType _proxy) 3
+                  __id__parent
+                  (Thrift.buildStruct _proxy __field__decl)
+                  : []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__parent <- ST.newSTRef Prelude.Nothing
+            __field__decl <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__parent
+                                                                          (Prelude.Just _val)
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__decl
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__parent <- ST.readSTRef __field__parent
+                                             !__val__decl <- ST.readSTRef __field__decl
+                                             Prelude.pure
+                                               (SearchTraitByName_key __val__name __val__parent
+                                                  __val__decl)
+              _idMap = HashMap.fromList [("name", 1), ("parent", 2), ("decl", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchTraitByName_key where
+  rnf
+    (SearchTraitByName_key __field__name __field__parent __field__decl)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__parent `Prelude.seq`
+          DeepSeq.rnf __field__decl `Prelude.seq` ()
+
+instance Default.Default SearchTraitByName_key where
+  def = SearchTraitByName_key "" Prelude.Nothing Default.def
+
+instance Hashable.Hashable SearchTraitByName_key where
+  hashWithSalt __salt (SearchTraitByName_key _name _parent _decl)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+           _parent)
+        _decl
+
+data SearchTypeConstByName_key = SearchTypeConstByName_key{searchTypeConstByName_key_name
+                                                           :: Text.Text,
+                                                           searchTypeConstByName_key_parent ::
+                                                           QName,
+                                                           searchTypeConstByName_key_decl ::
+                                                           Declaration}
+                                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchTypeConstByName_key where
+  toJSON
+    (SearchTypeConstByName_key __field__name __field__parent
+       __field__decl)
+    = Aeson.object
+        ("name" .= __field__name :
+           "parent" .= __field__parent :
+             "decl" .= __field__decl : Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchTypeConstByName_key where
+  buildStruct _proxy
+    (SearchTypeConstByName_key __field__name __field__parent
+       __field__decl)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "parent" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__parent)
+             :
+             Thrift.genField _proxy "decl" (Thrift.getStructType _proxy) 3 2
+               (Thrift.buildStruct _proxy __field__decl)
+               : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__parent <- ST.newSTRef Default.def
+            __field__decl <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__parent
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__decl
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__parent <- ST.readSTRef __field__parent
+                                             !__val__decl <- ST.readSTRef __field__decl
+                                             Prelude.pure
+                                               (SearchTypeConstByName_key __val__name __val__parent
+                                                  __val__decl)
+              _idMap = HashMap.fromList [("name", 1), ("parent", 2), ("decl", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchTypeConstByName_key where
+  rnf
+    (SearchTypeConstByName_key __field__name __field__parent
+       __field__decl)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__parent `Prelude.seq`
+          DeepSeq.rnf __field__decl `Prelude.seq` ()
+
+instance Default.Default SearchTypeConstByName_key where
+  def = SearchTypeConstByName_key "" Default.def Default.def
+
+instance Hashable.Hashable SearchTypeConstByName_key where
+  hashWithSalt __salt (SearchTypeConstByName_key _name _parent _decl)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+           _parent)
+        _decl
+
+data SearchTypedefByName_key = SearchTypedefByName_key{searchTypedefByName_key_name
+                                                       :: Text.Text,
+                                                       searchTypedefByName_key_parent ::
+                                                       Prelude.Maybe NamespaceQName,
+                                                       searchTypedefByName_key_decl :: Declaration}
+                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchTypedefByName_key where
+  toJSON
+    (SearchTypedefByName_key __field__name __field__parent
+       __field__decl)
+    = Aeson.object
+        ("name" .= __field__name :
+           Prelude.maybe Prelude.id ((:) . ("parent" .=)) __field__parent
+             ("decl" .= __field__decl : Prelude.mempty))
+
+instance Thrift.ThriftStruct SearchTypedefByName_key where
+  buildStruct _proxy
+    (SearchTypedefByName_key __field__name __field__parent
+       __field__decl)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           let (__cereal__parent, __id__parent)
+                 = case __field__parent of
+                     Prelude.Just _val -> ((:)
+                                             (Thrift.genField _proxy "parent"
+                                                (Thrift.getStructType _proxy)
+                                                2
+                                                1
+                                                (Thrift.buildStruct _proxy _val)),
+                                           2)
+                     Prelude.Nothing -> (Prelude.id, 1)
+             in
+             __cereal__parent
+               (Thrift.genField _proxy "decl" (Thrift.getStructType _proxy) 3
+                  __id__parent
+                  (Thrift.buildStruct _proxy __field__decl)
+                  : []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__parent <- ST.newSTRef Prelude.Nothing
+            __field__decl <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__parent
+                                                                          (Prelude.Just _val)
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__decl
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__parent <- ST.readSTRef __field__parent
+                                             !__val__decl <- ST.readSTRef __field__decl
+                                             Prelude.pure
+                                               (SearchTypedefByName_key __val__name __val__parent
+                                                  __val__decl)
+              _idMap = HashMap.fromList [("name", 1), ("parent", 2), ("decl", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchTypedefByName_key where
+  rnf
+    (SearchTypedefByName_key __field__name __field__parent
+       __field__decl)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__parent `Prelude.seq`
+          DeepSeq.rnf __field__decl `Prelude.seq` ()
+
+instance Default.Default SearchTypedefByName_key where
+  def = SearchTypedefByName_key "" Prelude.Nothing Default.def
+
+instance Hashable.Hashable SearchTypedefByName_key where
+  hashWithSalt __salt (SearchTypedefByName_key _name _parent _decl)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+           _parent)
+        _decl
+
+data ThriftToHack_key = ThriftToHack_key{thriftToHack_key_to ::
+                                         Glean.Schema.Fbthrift.Declaration,
+                                         thriftToHack_key_from :: Declaration}
+                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ThriftToHack_key where
+  toJSON (ThriftToHack_key __field__to __field__from)
+    = Aeson.object
+        ("to" .= __field__to : "from" .= __field__from : Prelude.mempty)
+
+instance Thrift.ThriftStruct ThriftToHack_key where
+  buildStruct _proxy (ThriftToHack_key __field__to __field__from)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "to" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__to)
+           :
+           Thrift.genField _proxy "from" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__from)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__to <- ST.newSTRef Default.def
+            __field__from <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__to
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__from
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__to <- ST.readSTRef __field__to
+                                             !__val__from <- ST.readSTRef __field__from
+                                             Prelude.pure (ThriftToHack_key __val__to __val__from)
+              _idMap = HashMap.fromList [("to", 1), ("from", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ThriftToHack_key where
+  rnf (ThriftToHack_key __field__to __field__from)
+    = DeepSeq.rnf __field__to `Prelude.seq`
+        DeepSeq.rnf __field__from `Prelude.seq` ()
+
+instance Default.Default ThriftToHack_key where
+  def = ThriftToHack_key Default.def Default.def
+
+instance Hashable.Hashable ThriftToHack_key where
+  hashWithSalt __salt (ThriftToHack_key _to _from)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _to) _from
+
+data XRefTarget = XRefTarget_declaration Declaration
+                | XRefTarget_occurrence Occurrence
+                | XRefTarget_EMPTY
+                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON XRefTarget where
+  toJSON (XRefTarget_declaration __declaration)
+    = Aeson.object ["declaration" .= __declaration]
+  toJSON (XRefTarget_occurrence __occurrence)
+    = Aeson.object ["occurrence" .= __occurrence]
+  toJSON XRefTarget_EMPTY = Aeson.object []
+
+instance Thrift.ThriftStruct XRefTarget where
+  buildStruct _proxy (XRefTarget_declaration __declaration)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "declaration" (Thrift.getStructType _proxy)
+           1
+           0
+           (Thrift.buildStruct _proxy __declaration)]
+  buildStruct _proxy (XRefTarget_occurrence __occurrence)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "occurrence" (Thrift.getStructType _proxy)
+           2
+           0
+           (Thrift.buildStruct _proxy __occurrence)]
+  buildStruct _proxy XRefTarget_EMPTY = Thrift.genStruct _proxy []
+  parseStruct _proxy
+    = do _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap
+         case _fieldBegin of
+           Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                     1 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (XRefTarget_declaration _val)
+                                                     2 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (XRefTarget_occurrence _val)
+                                                     _ -> do Thrift.parseSkip _proxy _type
+                                                               Prelude.Nothing
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return XRefTarget_EMPTY
+           Thrift.FieldEnd -> Prelude.return XRefTarget_EMPTY
+    where
+      _idMap = HashMap.fromList [("declaration", 1), ("occurrence", 2)]
+
+instance DeepSeq.NFData XRefTarget where
+  rnf (XRefTarget_declaration __declaration)
+    = DeepSeq.rnf __declaration
+  rnf (XRefTarget_occurrence __occurrence) = DeepSeq.rnf __occurrence
+  rnf XRefTarget_EMPTY = ()
+
+instance Default.Default XRefTarget where
+  def = XRefTarget_EMPTY
+
+instance Hashable.Hashable XRefTarget where
+  hashWithSalt __salt (XRefTarget_declaration _declaration)
+    = Hashable.hashWithSalt __salt
+        (Hashable.hashWithSalt 1 _declaration)
+  hashWithSalt __salt (XRefTarget_occurrence _occurrence)
+    = Hashable.hashWithSalt __salt
+        (Hashable.hashWithSalt 2 _occurrence)
+  hashWithSalt __salt XRefTarget_EMPTY
+    = Hashable.hashWithSalt __salt (0 :: Prelude.Int)
+
+data TargetUses_key = TargetUses_key{targetUses_key_target ::
+                                     XRefTarget,
+                                     targetUses_key_file :: Glean.Schema.Src.File,
+                                     targetUses_key_uses :: [Glean.Schema.Src.RelByteSpan]}
+                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TargetUses_key where
+  toJSON (TargetUses_key __field__target __field__file __field__uses)
+    = Aeson.object
+        ("target" .= __field__target :
+           "file" .= __field__file : "uses" .= __field__uses : Prelude.mempty)
+
+instance Thrift.ThriftStruct TargetUses_key where
+  buildStruct _proxy
+    (TargetUses_key __field__target __field__file __field__uses)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__target)
+           :
+           Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__file)
+             :
+             Thrift.genField _proxy "uses" (Thrift.getListType _proxy) 3 2
+               (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                  (Thrift.buildStruct _proxy)
+                  __field__uses)
+               : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__target <- ST.newSTRef Default.def
+            __field__file <- ST.newSTRef Default.def
+            __field__uses <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__target
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__file
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef __field__uses
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__target <- ST.readSTRef
+                                                                 __field__target
+                                             !__val__file <- ST.readSTRef __field__file
+                                             !__val__uses <- ST.readSTRef __field__uses
+                                             Prelude.pure
+                                               (TargetUses_key __val__target __val__file
+                                                  __val__uses)
+              _idMap = HashMap.fromList [("target", 1), ("file", 2), ("uses", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData TargetUses_key where
+  rnf (TargetUses_key __field__target __field__file __field__uses)
+    = DeepSeq.rnf __field__target `Prelude.seq`
+        DeepSeq.rnf __field__file `Prelude.seq`
+          DeepSeq.rnf __field__uses `Prelude.seq` ()
+
+instance Default.Default TargetUses_key where
+  def = TargetUses_key Default.def Default.def Default.def
+
+instance Hashable.Hashable TargetUses_key where
+  hashWithSalt __salt (TargetUses_key _target _file _uses)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _target)
+           _file)
+        _uses
+
+data TargetUsesAbs_key = TargetUsesAbs_key{targetUsesAbs_key_target
+                                           :: XRefTarget,
+                                           targetUsesAbs_key_file :: Glean.Schema.Src.File,
+                                           targetUsesAbs_key_uses :: [Glean.Schema.Src.ByteSpan]}
+                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TargetUsesAbs_key where
+  toJSON
+    (TargetUsesAbs_key __field__target __field__file __field__uses)
+    = Aeson.object
+        ("target" .= __field__target :
+           "file" .= __field__file : "uses" .= __field__uses : Prelude.mempty)
+
+instance Thrift.ThriftStruct TargetUsesAbs_key where
+  buildStruct _proxy
+    (TargetUsesAbs_key __field__target __field__file __field__uses)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__target)
+           :
+           Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__file)
+             :
+             Thrift.genField _proxy "uses" (Thrift.getListType _proxy) 3 2
+               (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                  (Thrift.buildStruct _proxy)
+                  __field__uses)
+               : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__target <- ST.newSTRef Default.def
+            __field__file <- ST.newSTRef Default.def
+            __field__uses <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__target
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__file
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef __field__uses
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__target <- ST.readSTRef
+                                                                 __field__target
+                                             !__val__file <- ST.readSTRef __field__file
+                                             !__val__uses <- ST.readSTRef __field__uses
+                                             Prelude.pure
+                                               (TargetUsesAbs_key __val__target __val__file
+                                                  __val__uses)
+              _idMap = HashMap.fromList [("target", 1), ("file", 2), ("uses", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData TargetUsesAbs_key where
+  rnf (TargetUsesAbs_key __field__target __field__file __field__uses)
+    = DeepSeq.rnf __field__target `Prelude.seq`
+        DeepSeq.rnf __field__file `Prelude.seq`
+          DeepSeq.rnf __field__uses `Prelude.seq` ()
+
+instance Default.Default TargetUsesAbs_key where
+  def = TargetUsesAbs_key Default.def Default.def Default.def
+
+instance Hashable.Hashable TargetUsesAbs_key where
+  hashWithSalt __salt (TargetUsesAbs_key _target _file _uses)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _target)
+           _file)
+        _uses
+
+data XRef = XRef{xRef_target :: XRefTarget,
+                 xRef_ranges :: [Glean.Schema.Src.RelByteSpan]}
+            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON XRef where
+  toJSON (XRef __field__target __field__ranges)
+    = Aeson.object
+        ("target" .= __field__target :
+           "ranges" .= __field__ranges : Prelude.mempty)
+
+instance Thrift.ThriftStruct XRef where
+  buildStruct _proxy (XRef __field__target __field__ranges)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__target)
+           :
+           Thrift.genField _proxy "ranges" (Thrift.getListType _proxy) 2 1
+             (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                (Thrift.buildStruct _proxy)
+                __field__ranges)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__target <- ST.newSTRef Default.def
+            __field__ranges <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__target
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__ranges
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__target <- ST.readSTRef
+                                                                 __field__target
+                                             !__val__ranges <- ST.readSTRef __field__ranges
+                                             Prelude.pure (XRef __val__target __val__ranges)
+              _idMap = HashMap.fromList [("target", 1), ("ranges", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData XRef where
+  rnf (XRef __field__target __field__ranges)
+    = DeepSeq.rnf __field__target `Prelude.seq`
+        DeepSeq.rnf __field__ranges `Prelude.seq` ()
+
+instance Default.Default XRef where
+  def = XRef Default.def Default.def
+
+instance Hashable.Hashable XRef where
+  hashWithSalt __salt (XRef _target _ranges)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _target)
+        _ranges
+
+data FileXRefs_key = FileXRefs_key{fileXRefs_key_file ::
+                                   Glean.Schema.Src.File,
+                                   fileXRefs_key_xrefs :: [XRef]}
+                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FileXRefs_key where
+  toJSON (FileXRefs_key __field__file __field__xrefs)
+    = Aeson.object
+        ("file" .= __field__file :
+           "xrefs" .= __field__xrefs : Prelude.mempty)
+
+instance Thrift.ThriftStruct FileXRefs_key where
+  buildStruct _proxy (FileXRefs_key __field__file __field__xrefs)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__file)
+           :
+           Thrift.genField _proxy "xrefs" (Thrift.getListType _proxy) 2 1
+             (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                (Thrift.buildStruct _proxy)
+                __field__xrefs)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__file <- ST.newSTRef Default.def
+            __field__xrefs <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__file
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef __field__xrefs
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__file <- ST.readSTRef __field__file
+                                             !__val__xrefs <- ST.readSTRef __field__xrefs
+                                             Prelude.pure (FileXRefs_key __val__file __val__xrefs)
+              _idMap = HashMap.fromList [("file", 1), ("xrefs", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData FileXRefs_key where
+  rnf (FileXRefs_key __field__file __field__xrefs)
+    = DeepSeq.rnf __field__file `Prelude.seq`
+        DeepSeq.rnf __field__xrefs `Prelude.seq` ()
+
+instance Default.Default FileXRefs_key where
+  def = FileXRefs_key Default.def Default.def
+
+instance Hashable.Hashable FileXRefs_key where
+  hashWithSalt __salt (FileXRefs_key _file _xrefs)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _file) _xrefs
+
+data TypeInfo_key = TypeInfo_key{typeInfo_key_displayType :: Type,
+                                 typeInfo_key_xrefs :: [XRef],
+                                 typeInfo_key_hint :: Prelude.Maybe Hint}
+                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TypeInfo_key where
+  toJSON
+    (TypeInfo_key __field__displayType __field__xrefs __field__hint)
+    = Aeson.object
+        ("displayType" .= __field__displayType :
+           "xrefs" .= __field__xrefs :
+             Prelude.maybe Prelude.id ((:) . ("hint" .=)) __field__hint
+               Prelude.mempty)
+
+instance Thrift.ThriftStruct TypeInfo_key where
+  buildStruct _proxy
+    (TypeInfo_key __field__displayType __field__xrefs __field__hint)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "displayType" (Thrift.getStructType _proxy)
+           1
+           0
+           (Thrift.buildStruct _proxy __field__displayType)
+           :
+           Thrift.genField _proxy "xrefs" (Thrift.getListType _proxy) 2 1
+             (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                (Thrift.buildStruct _proxy)
+                __field__xrefs)
+             :
+             case __field__hint of
+               Prelude.Just _val -> Thrift.genField _proxy "hint"
+                                      (Thrift.getStructType _proxy)
+                                      3
+                                      2
+                                      (Thrift.buildStruct _proxy _val)
+                                      : []
+               Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__displayType <- ST.newSTRef Default.def
+            __field__xrefs <- ST.newSTRef Default.def
+            __field__hint <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__displayType
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef __field__xrefs
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__hint
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__displayType <- ST.readSTRef
+                                                                      __field__displayType
+                                             !__val__xrefs <- ST.readSTRef __field__xrefs
+                                             !__val__hint <- ST.readSTRef __field__hint
+                                             Prelude.pure
+                                               (TypeInfo_key __val__displayType __val__xrefs
+                                                  __val__hint)
+              _idMap
+                = HashMap.fromList [("displayType", 1), ("xrefs", 2), ("hint", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData TypeInfo_key where
+  rnf
+    (TypeInfo_key __field__displayType __field__xrefs __field__hint)
+    = DeepSeq.rnf __field__displayType `Prelude.seq`
+        DeepSeq.rnf __field__xrefs `Prelude.seq`
+          DeepSeq.rnf __field__hint `Prelude.seq` ()
+
+instance Default.Default TypeInfo_key where
+  def = TypeInfo_key Default.def Default.def Prelude.Nothing
+
+instance Hashable.Hashable TypeInfo_key where
+  hashWithSalt __salt (TypeInfo_key _displayType _xrefs _hint)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _displayType)
+           _xrefs)
+        _hint
+
+data InheritedMembers_key = InheritedMembers_key{inheritedMembers_key_container
+                                                 :: ContainerDeclaration,
+                                                 inheritedMembers_key_inheritedMembers ::
+                                                 [MemberCluster]}
+                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON InheritedMembers_key where
+  toJSON
+    (InheritedMembers_key __field__container __field__inheritedMembers)
+    = Aeson.object
+        ("container" .= __field__container :
+           "inheritedMembers" .= __field__inheritedMembers : Prelude.mempty)
+
+instance Thrift.ThriftStruct InheritedMembers_key where
+  buildStruct _proxy
+    (InheritedMembers_key __field__container __field__inheritedMembers)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "container" (Thrift.getStructType _proxy) 1
+           0
+           (Thrift.buildStruct _proxy __field__container)
+           :
+           Thrift.genField _proxy "inheritedMembers"
+             (Thrift.getListType _proxy)
+             2
+             1
+             (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                (Thrift.buildStruct _proxy)
+                __field__inheritedMembers)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__container <- ST.newSTRef Default.def
+            __field__inheritedMembers <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__container
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__inheritedMembers
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__container <- ST.readSTRef
+                                                                    __field__container
+                                             !__val__inheritedMembers <- ST.readSTRef
+                                                                           __field__inheritedMembers
+                                             Prelude.pure
+                                               (InheritedMembers_key __val__container
+                                                  __val__inheritedMembers)
+              _idMap
+                = HashMap.fromList [("container", 1), ("inheritedMembers", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData InheritedMembers_key where
+  rnf
+    (InheritedMembers_key __field__container __field__inheritedMembers)
+    = DeepSeq.rnf __field__container `Prelude.seq`
+        DeepSeq.rnf __field__inheritedMembers `Prelude.seq` ()
+
+instance Default.Default InheritedMembers_key where
+  def = InheritedMembers_key Default.def Default.def
+
+instance Hashable.Hashable InheritedMembers_key where
+  hashWithSalt __salt
+    (InheritedMembers_key _container _inheritedMembers)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _container)
+        _inheritedMembers
+
+data MethodDeclaration_key = MethodDeclaration_key{methodDeclaration_key_name
+                                                   :: Name,
+                                                   methodDeclaration_key_container ::
+                                                   ContainerDeclaration}
+                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON MethodDeclaration_key where
+  toJSON (MethodDeclaration_key __field__name __field__container)
+    = Aeson.object
+        ("name" .= __field__name :
+           "container" .= __field__container : Prelude.mempty)
+
+instance Thrift.ThriftStruct MethodDeclaration_key where
+  buildStruct _proxy
+    (MethodDeclaration_key __field__name __field__container)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__name)
+           :
+           Thrift.genField _proxy "container" (Thrift.getStructType _proxy) 2
+             1
+             (Thrift.buildStruct _proxy __field__container)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef Default.def
+            __field__container <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__container
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__container <- ST.readSTRef __field__container
+                                             Prelude.pure
+                                               (MethodDeclaration_key __val__name __val__container)
+              _idMap = HashMap.fromList [("name", 1), ("container", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData MethodDeclaration_key where
+  rnf (MethodDeclaration_key __field__name __field__container)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__container `Prelude.seq` ()
+
+instance Default.Default MethodDeclaration_key where
+  def = MethodDeclaration_key Default.def Default.def
+
+instance Hashable.Hashable MethodDeclaration_key where
+  hashWithSalt __salt (MethodDeclaration_key _name _container)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+        _container
+
+data PropertyDeclaration_key = PropertyDeclaration_key{propertyDeclaration_key_name
+                                                       :: Name,
+                                                       propertyDeclaration_key_container ::
+                                                       ContainerDeclaration}
+                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON PropertyDeclaration_key where
+  toJSON (PropertyDeclaration_key __field__name __field__container)
+    = Aeson.object
+        ("name" .= __field__name :
+           "container" .= __field__container : Prelude.mempty)
+
+instance Thrift.ThriftStruct PropertyDeclaration_key where
+  buildStruct _proxy
+    (PropertyDeclaration_key __field__name __field__container)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__name)
+           :
+           Thrift.genField _proxy "container" (Thrift.getStructType _proxy) 2
+             1
+             (Thrift.buildStruct _proxy __field__container)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef Default.def
+            __field__container <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__container
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__container <- ST.readSTRef __field__container
+                                             Prelude.pure
+                                               (PropertyDeclaration_key __val__name
+                                                  __val__container)
+              _idMap = HashMap.fromList [("name", 1), ("container", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData PropertyDeclaration_key where
+  rnf (PropertyDeclaration_key __field__name __field__container)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__container `Prelude.seq` ()
+
+instance Default.Default PropertyDeclaration_key where
+  def = PropertyDeclaration_key Default.def Default.def
+
+instance Hashable.Hashable PropertyDeclaration_key where
+  hashWithSalt __salt (PropertyDeclaration_key _name _container)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+        _container
+
+data TypeConstDeclaration_key = TypeConstDeclaration_key{typeConstDeclaration_key_name
+                                                         :: Name,
+                                                         typeConstDeclaration_key_container ::
+                                                         ContainerDeclaration}
+                                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TypeConstDeclaration_key where
+  toJSON (TypeConstDeclaration_key __field__name __field__container)
+    = Aeson.object
+        ("name" .= __field__name :
+           "container" .= __field__container : Prelude.mempty)
+
+instance Thrift.ThriftStruct TypeConstDeclaration_key where
+  buildStruct _proxy
+    (TypeConstDeclaration_key __field__name __field__container)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__name)
+           :
+           Thrift.genField _proxy "container" (Thrift.getStructType _proxy) 2
+             1
+             (Thrift.buildStruct _proxy __field__container)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef Default.def
+            __field__container <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__container
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__container <- ST.readSTRef __field__container
+                                             Prelude.pure
+                                               (TypeConstDeclaration_key __val__name
+                                                  __val__container)
+              _idMap = HashMap.fromList [("name", 1), ("container", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData TypeConstDeclaration_key where
+  rnf (TypeConstDeclaration_key __field__name __field__container)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__container `Prelude.seq` ()
+
+instance Default.Default TypeConstDeclaration_key where
+  def = TypeConstDeclaration_key Default.def Default.def
+
+instance Hashable.Hashable TypeConstDeclaration_key where
+  hashWithSalt __salt (TypeConstDeclaration_key _name _container)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+        _container
+
+data ContainerChild_key = ContainerChild_key{containerChild_key_container
+                                             :: ContainerDeclaration,
+                                             containerChild_key_child :: ContainerDeclaration}
+                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ContainerChild_key where
+  toJSON (ContainerChild_key __field__container __field__child)
+    = Aeson.object
+        ("container" .= __field__container :
+           "child" .= __field__child : Prelude.mempty)
+
+instance Thrift.ThriftStruct ContainerChild_key where
+  buildStruct _proxy
+    (ContainerChild_key __field__container __field__child)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "container" (Thrift.getStructType _proxy) 1
+           0
+           (Thrift.buildStruct _proxy __field__container)
+           :
+           Thrift.genField _proxy "child" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__child)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__container <- ST.newSTRef Default.def
+            __field__child <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__container
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__child
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__container <- ST.readSTRef
+                                                                    __field__container
+                                             !__val__child <- ST.readSTRef __field__child
+                                             Prelude.pure
+                                               (ContainerChild_key __val__container __val__child)
+              _idMap = HashMap.fromList [("container", 1), ("child", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ContainerChild_key where
+  rnf (ContainerChild_key __field__container __field__child)
+    = DeepSeq.rnf __field__container `Prelude.seq`
+        DeepSeq.rnf __field__child `Prelude.seq` ()
+
+instance Default.Default ContainerChild_key where
+  def = ContainerChild_key Default.def Default.def
+
+instance Hashable.Hashable ContainerChild_key where
+  hashWithSalt __salt (ContainerChild_key _container _child)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _container)
+        _child
+
+data ConstraintKind = ConstraintKind_As
+                    | ConstraintKind_Equal
+                    | ConstraintKind_Super
+                    | ConstraintKind__UNKNOWN Prelude.Int
+                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ConstraintKind where
+  toJSON = Aeson.toJSON . Thrift.fromThriftEnum
+
+instance DeepSeq.NFData ConstraintKind where
+  rnf __ConstraintKind = Prelude.seq __ConstraintKind ()
+
+instance Default.Default ConstraintKind where
+  def = ConstraintKind_As
+
+instance Hashable.Hashable ConstraintKind where
+  hashWithSalt _salt _val
+    = Hashable.hashWithSalt _salt (Thrift.fromThriftEnum _val)
+
+instance Thrift.ThriftEnum ConstraintKind where
+  toThriftEnum 0 = ConstraintKind_As
+  toThriftEnum 1 = ConstraintKind_Equal
+  toThriftEnum 2 = ConstraintKind_Super
+  toThriftEnum val = ConstraintKind__UNKNOWN val
+  fromThriftEnum ConstraintKind_As = 0
+  fromThriftEnum ConstraintKind_Equal = 1
+  fromThriftEnum ConstraintKind_Super = 2
+  fromThriftEnum (ConstraintKind__UNKNOWN val) = val
+  allThriftEnumValues
+    = [ConstraintKind_As, ConstraintKind_Equal, ConstraintKind_Super]
+  toThriftEnumEither 0 = Prelude.Right ConstraintKind_As
+  toThriftEnumEither 1 = Prelude.Right ConstraintKind_Equal
+  toThriftEnumEither 2 = Prelude.Right ConstraintKind_Super
+  toThriftEnumEither val
+    = Prelude.Left
+        ("toThriftEnumEither: not a valid identifier for enum ConstraintKind: "
+           ++ Prelude.show val)
+
+data Constraint = Constraint{constraint_constraintKind ::
+                             ConstraintKind,
+                             constraint_type :: Type,
+                             constraint_typeInfo :: Prelude.Maybe TypeInfo}
+                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Constraint where
+  toJSON
+    (Constraint __field__constraintKind __field__type
+       __field__typeInfo)
+    = Aeson.object
+        ("constraintKind" .= __field__constraintKind :
+           "type" .= __field__type :
+             Prelude.maybe Prelude.id ((:) . ("typeInfo" .=)) __field__typeInfo
+               Prelude.mempty)
+
+instance Thrift.ThriftStruct Constraint where
+  buildStruct _proxy
+    (Constraint __field__constraintKind __field__type
+       __field__typeInfo)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "constraintKind" (Thrift.getI32Type _proxy)
+           1
+           0
+           ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+               Thrift.fromThriftEnum)
+              __field__constraintKind)
+           :
+           Thrift.genField _proxy "type" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__type)
+             :
+             case __field__typeInfo of
+               Prelude.Just _val -> Thrift.genField _proxy "typeInfo"
+                                      (Thrift.getStructType _proxy)
+                                      3
+                                      2
+                                      (Thrift.buildStruct _proxy _val)
+                                      : []
+               Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__constraintKind <- ST.newSTRef Default.def
+            __field__type <- ST.newSTRef Default.def
+            __field__typeInfo <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "ConstraintKind")
+                                                                        ST.writeSTRef
+                                                                          __field__constraintKind
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__type
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__typeInfo
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__constraintKind <- ST.readSTRef
+                                                                         __field__constraintKind
+                                             !__val__type <- ST.readSTRef __field__type
+                                             !__val__typeInfo <- ST.readSTRef __field__typeInfo
+                                             Prelude.pure
+                                               (Constraint __val__constraintKind __val__type
+                                                  __val__typeInfo)
+              _idMap
+                = HashMap.fromList
+                    [("constraintKind", 1), ("type", 2), ("typeInfo", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData Constraint where
+  rnf
+    (Constraint __field__constraintKind __field__type
+       __field__typeInfo)
+    = DeepSeq.rnf __field__constraintKind `Prelude.seq`
+        DeepSeq.rnf __field__type `Prelude.seq`
+          DeepSeq.rnf __field__typeInfo `Prelude.seq` ()
+
+instance Default.Default Constraint where
+  def = Constraint Default.def Default.def Prelude.Nothing
+
+instance Hashable.Hashable Constraint where
+  hashWithSalt __salt (Constraint _constraintKind _type _typeInfo)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt __salt _constraintKind)
+           _type)
+        _typeInfo
+
+data TypeParameter = TypeParameter{typeParameter_name :: Name,
+                                   typeParameter_variance :: Variance,
+                                   typeParameter_reifyKind :: ReifyKind,
+                                   typeParameter_constraints :: [Constraint],
+                                   typeParameter_attributes :: [UserAttribute]}
+                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TypeParameter where
+  toJSON
+    (TypeParameter __field__name __field__variance __field__reifyKind
+       __field__constraints __field__attributes)
+    = Aeson.object
+        ("name" .= __field__name :
+           "variance" .= __field__variance :
+             "reifyKind" .= __field__reifyKind :
+               "constraints" .= __field__constraints :
+                 "attributes" .= __field__attributes : Prelude.mempty)
+
+instance Thrift.ThriftStruct TypeParameter where
+  buildStruct _proxy
+    (TypeParameter __field__name __field__variance __field__reifyKind
+       __field__constraints __field__attributes)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__name)
+           :
+           Thrift.genField _proxy "variance" (Thrift.getI32Type _proxy) 2 1
+             ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                 Thrift.fromThriftEnum)
+                __field__variance)
+             :
+             Thrift.genField _proxy "reifyKind" (Thrift.getI32Type _proxy) 3 2
+               ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                   Thrift.fromThriftEnum)
+                  __field__reifyKind)
+               :
+               Thrift.genField _proxy "constraints" (Thrift.getListType _proxy) 4
+                 3
+                 (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                    (Thrift.buildStruct _proxy)
+                    __field__constraints)
+                 :
+                 Thrift.genField _proxy "attributes" (Thrift.getListType _proxy) 5 4
+                   (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                      (Thrift.buildStruct _proxy)
+                      __field__attributes)
+                   : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef Default.def
+            __field__variance <- ST.newSTRef Default.def
+            __field__reifyKind <- ST.newSTRef Default.def
+            __field__constraints <- ST.newSTRef Default.def
+            __field__attributes <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "Variance")
+                                                                        ST.writeSTRef
+                                                                          __field__variance
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "ReifyKind")
+                                                                        ST.writeSTRef
+                                                                          __field__reifyKind
+                                                                          _val
+                                                                 4 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__constraints
+                                                                          _val
+                                                                 5 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__attributes
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__variance <- ST.readSTRef __field__variance
+                                             !__val__reifyKind <- ST.readSTRef __field__reifyKind
+                                             !__val__constraints <- ST.readSTRef
+                                                                      __field__constraints
+                                             !__val__attributes <- ST.readSTRef __field__attributes
+                                             Prelude.pure
+                                               (TypeParameter __val__name __val__variance
+                                                  __val__reifyKind
+                                                  __val__constraints
+                                                  __val__attributes)
+              _idMap
+                = HashMap.fromList
+                    [("name", 1), ("variance", 2), ("reifyKind", 3),
+                     ("constraints", 4), ("attributes", 5)]
+            _parse 0)
+
+instance DeepSeq.NFData TypeParameter where
+  rnf
+    (TypeParameter __field__name __field__variance __field__reifyKind
+       __field__constraints __field__attributes)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__variance `Prelude.seq`
+          DeepSeq.rnf __field__reifyKind `Prelude.seq`
+            DeepSeq.rnf __field__constraints `Prelude.seq`
+              DeepSeq.rnf __field__attributes `Prelude.seq` ()
+
+instance Default.Default TypeParameter where
+  def
+    = TypeParameter Default.def Default.def Default.def Default.def
+        Default.def
+
+instance Hashable.Hashable TypeParameter where
+  hashWithSalt __salt
+    (TypeParameter _name _variance _reifyKind _constraints _attributes)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt
+              (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+                 _variance)
+              _reifyKind)
+           _constraints)
+        _attributes
+
+data FunctionDefinition_key = FunctionDefinition_key{functionDefinition_key_declaration
+                                                     :: FunctionDeclaration,
+                                                     functionDefinition_key_signature :: Signature,
+                                                     functionDefinition_key_isAsync :: Prelude.Bool,
+                                                     functionDefinition_key_attributes ::
+                                                     [UserAttribute],
+                                                     functionDefinition_key_typeParams ::
+                                                     [TypeParameter],
+                                                     functionDefinition_key_module_ ::
+                                                     Prelude.Maybe ModuleMembership,
+                                                     functionDefinition_key_readonlyRet ::
+                                                     Prelude.Maybe ReadonlyKind}
+                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FunctionDefinition_key where
+  toJSON
+    (FunctionDefinition_key __field__declaration __field__signature
+       __field__isAsync __field__attributes __field__typeParams
+       __field__module_ __field__readonlyRet)
+    = Aeson.object
+        ("declaration" .= __field__declaration :
+           "signature" .= __field__signature :
+             "isAsync" .= __field__isAsync :
+               "attributes" .= __field__attributes :
+                 "typeParams" .= __field__typeParams :
+                   Prelude.maybe Prelude.id ((:) . ("module_" .=)) __field__module_
+                     (Prelude.maybe Prelude.id ((:) . ("readonlyRet" .=))
+                        __field__readonlyRet
+                        Prelude.mempty))
+
+instance Thrift.ThriftStruct FunctionDefinition_key where
+  buildStruct _proxy
+    (FunctionDefinition_key __field__declaration __field__signature
+       __field__isAsync __field__attributes __field__typeParams
+       __field__module_ __field__readonlyRet)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "declaration" (Thrift.getStructType _proxy)
+           1
+           0
+           (Thrift.buildStruct _proxy __field__declaration)
+           :
+           Thrift.genField _proxy "signature" (Thrift.getStructType _proxy) 2
+             1
+             (Thrift.buildStruct _proxy __field__signature)
+             :
+             Thrift.genFieldBool _proxy "isAsync" 3 2 __field__isAsync :
+               Thrift.genField _proxy "attributes" (Thrift.getListType _proxy) 4 3
+                 (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                    (Thrift.buildStruct _proxy)
+                    __field__attributes)
+                 :
+                 Thrift.genField _proxy "typeParams" (Thrift.getListType _proxy) 5 4
+                   (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                      (Thrift.buildStruct _proxy)
+                      __field__typeParams)
+                   :
+                   let (__cereal__module_, __id__module_)
+                         = case __field__module_ of
+                             Prelude.Just _val -> ((:)
+                                                     (Thrift.genField _proxy "module_"
+                                                        (Thrift.getStructType _proxy)
+                                                        6
+                                                        5
+                                                        (Thrift.buildStruct _proxy _val)),
+                                                   6)
+                             Prelude.Nothing -> (Prelude.id, 5)
+                     in
+                     __cereal__module_
+                       (case __field__readonlyRet of
+                          Prelude.Just _val -> Thrift.genField _proxy "readonlyRet"
+                                                 (Thrift.getI32Type _proxy)
+                                                 7
+                                                 __id__module_
+                                                 ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                                                     Thrift.fromThriftEnum)
+                                                    _val)
+                                                 : []
+                          Prelude.Nothing -> []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__declaration <- ST.newSTRef Default.def
+            __field__signature <- ST.newSTRef Default.def
+            __field__isAsync <- ST.newSTRef Prelude.False
+            __field__attributes <- ST.newSTRef Default.def
+            __field__typeParams <- ST.newSTRef Default.def
+            __field__module_ <- ST.newSTRef Prelude.Nothing
+            __field__readonlyRet <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__declaration
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__signature
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getBoolType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseBoolF
+                                                                                      _proxy
+                                                                                      _bool)
+                                                                        ST.writeSTRef
+                                                                          __field__isAsync
+                                                                          _val
+                                                                 4 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__attributes
+                                                                          _val
+                                                                 5 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__typeParams
+                                                                          _val
+                                                                 6 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__module_
+                                                                          (Prelude.Just _val)
+                                                                 7 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "ReadonlyKind")
+                                                                        ST.writeSTRef
+                                                                          __field__readonlyRet
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__declaration <- ST.readSTRef
+                                                                      __field__declaration
+                                             !__val__signature <- ST.readSTRef __field__signature
+                                             !__val__isAsync <- ST.readSTRef __field__isAsync
+                                             !__val__attributes <- ST.readSTRef __field__attributes
+                                             !__val__typeParams <- ST.readSTRef __field__typeParams
+                                             !__val__module_ <- ST.readSTRef __field__module_
+                                             !__val__readonlyRet <- ST.readSTRef
+                                                                      __field__readonlyRet
+                                             Prelude.pure
+                                               (FunctionDefinition_key __val__declaration
+                                                  __val__signature
+                                                  __val__isAsync
+                                                  __val__attributes
+                                                  __val__typeParams
+                                                  __val__module_
+                                                  __val__readonlyRet)
+              _idMap
+                = HashMap.fromList
+                    [("declaration", 1), ("signature", 2), ("isAsync", 3),
+                     ("attributes", 4), ("typeParams", 5), ("module_", 6),
+                     ("readonlyRet", 7)]
+            _parse 0)
+
+instance DeepSeq.NFData FunctionDefinition_key where
+  rnf
+    (FunctionDefinition_key __field__declaration __field__signature
+       __field__isAsync __field__attributes __field__typeParams
+       __field__module_ __field__readonlyRet)
+    = DeepSeq.rnf __field__declaration `Prelude.seq`
+        DeepSeq.rnf __field__signature `Prelude.seq`
+          DeepSeq.rnf __field__isAsync `Prelude.seq`
+            DeepSeq.rnf __field__attributes `Prelude.seq`
+              DeepSeq.rnf __field__typeParams `Prelude.seq`
+                DeepSeq.rnf __field__module_ `Prelude.seq`
+                  DeepSeq.rnf __field__readonlyRet `Prelude.seq` ()
+
+instance Default.Default FunctionDefinition_key where
+  def
+    = FunctionDefinition_key Default.def Default.def Prelude.False
+        Default.def
+        Default.def
+        Prelude.Nothing
+        Prelude.Nothing
+
+instance Hashable.Hashable FunctionDefinition_key where
+  hashWithSalt __salt
+    (FunctionDefinition_key _declaration _signature _isAsync
+       _attributes _typeParams _module_ _readonlyRet)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt
+              (Hashable.hashWithSalt
+                 (Hashable.hashWithSalt
+                    (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _declaration)
+                       _signature)
+                    _isAsync)
+                 _attributes)
+              _typeParams)
+           _module_)
+        _readonlyRet
+
+data InterfaceDefinition_key = InterfaceDefinition_key{interfaceDefinition_key_declaration
+                                                       :: InterfaceDeclaration,
+                                                       interfaceDefinition_key_members ::
+                                                       [Declaration],
+                                                       interfaceDefinition_key_extends_ ::
+                                                       [InterfaceDeclaration],
+                                                       interfaceDefinition_key_attributes ::
+                                                       [UserAttribute],
+                                                       interfaceDefinition_key_typeParams ::
+                                                       [TypeParameter],
+                                                       interfaceDefinition_key_requireExtends ::
+                                                       [ClassDeclaration],
+                                                       interfaceDefinition_key_module_ ::
+                                                       Prelude.Maybe ModuleMembership}
+                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON InterfaceDefinition_key where
+  toJSON
+    (InterfaceDefinition_key __field__declaration __field__members
+       __field__extends_ __field__attributes __field__typeParams
+       __field__requireExtends __field__module_)
+    = Aeson.object
+        ("declaration" .= __field__declaration :
+           "members" .= __field__members :
+             "extends_" .= __field__extends_ :
+               "attributes" .= __field__attributes :
+                 "typeParams" .= __field__typeParams :
+                   "requireExtends" .= __field__requireExtends :
+                     Prelude.maybe Prelude.id ((:) . ("module_" .=)) __field__module_
+                       Prelude.mempty)
+
+instance Thrift.ThriftStruct InterfaceDefinition_key where
+  buildStruct _proxy
+    (InterfaceDefinition_key __field__declaration __field__members
+       __field__extends_ __field__attributes __field__typeParams
+       __field__requireExtends __field__module_)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "declaration" (Thrift.getStructType _proxy)
+           1
+           0
+           (Thrift.buildStruct _proxy __field__declaration)
+           :
+           Thrift.genField _proxy "members" (Thrift.getListType _proxy) 2 1
+             (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                (Thrift.buildStruct _proxy)
+                __field__members)
+             :
+             Thrift.genField _proxy "extends_" (Thrift.getListType _proxy) 3 2
+               (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                  (Thrift.buildStruct _proxy)
+                  __field__extends_)
+               :
+               Thrift.genField _proxy "attributes" (Thrift.getListType _proxy) 4 3
+                 (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                    (Thrift.buildStruct _proxy)
+                    __field__attributes)
+                 :
+                 Thrift.genField _proxy "typeParams" (Thrift.getListType _proxy) 5 4
+                   (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                      (Thrift.buildStruct _proxy)
+                      __field__typeParams)
+                   :
+                   Thrift.genField _proxy "requireExtends" (Thrift.getListType _proxy)
+                     6
+                     5
+                     (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                        (Thrift.buildStruct _proxy)
+                        __field__requireExtends)
+                     :
+                     case __field__module_ of
+                       Prelude.Just _val -> Thrift.genField _proxy "module_"
+                                              (Thrift.getStructType _proxy)
+                                              7
+                                              6
+                                              (Thrift.buildStruct _proxy _val)
+                                              : []
+                       Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__declaration <- ST.newSTRef Default.def
+            __field__members <- ST.newSTRef Default.def
+            __field__extends_ <- ST.newSTRef Default.def
+            __field__attributes <- ST.newSTRef Default.def
+            __field__typeParams <- ST.newSTRef Default.def
+            __field__requireExtends <- ST.newSTRef Default.def
+            __field__module_ <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__declaration
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__members
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__extends_
+                                                                          _val
+                                                                 4 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__attributes
+                                                                          _val
+                                                                 5 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__typeParams
+                                                                          _val
+                                                                 6 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__requireExtends
+                                                                          _val
+                                                                 7 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__module_
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__declaration <- ST.readSTRef
+                                                                      __field__declaration
+                                             !__val__members <- ST.readSTRef __field__members
+                                             !__val__extends_ <- ST.readSTRef __field__extends_
+                                             !__val__attributes <- ST.readSTRef __field__attributes
+                                             !__val__typeParams <- ST.readSTRef __field__typeParams
+                                             !__val__requireExtends <- ST.readSTRef
+                                                                         __field__requireExtends
+                                             !__val__module_ <- ST.readSTRef __field__module_
+                                             Prelude.pure
+                                               (InterfaceDefinition_key __val__declaration
+                                                  __val__members
+                                                  __val__extends_
+                                                  __val__attributes
+                                                  __val__typeParams
+                                                  __val__requireExtends
+                                                  __val__module_)
+              _idMap
+                = HashMap.fromList
+                    [("declaration", 1), ("members", 2), ("extends_", 3),
+                     ("attributes", 4), ("typeParams", 5), ("requireExtends", 6),
+                     ("module_", 7)]
+            _parse 0)
+
+instance DeepSeq.NFData InterfaceDefinition_key where
+  rnf
+    (InterfaceDefinition_key __field__declaration __field__members
+       __field__extends_ __field__attributes __field__typeParams
+       __field__requireExtends __field__module_)
+    = DeepSeq.rnf __field__declaration `Prelude.seq`
+        DeepSeq.rnf __field__members `Prelude.seq`
+          DeepSeq.rnf __field__extends_ `Prelude.seq`
+            DeepSeq.rnf __field__attributes `Prelude.seq`
+              DeepSeq.rnf __field__typeParams `Prelude.seq`
+                DeepSeq.rnf __field__requireExtends `Prelude.seq`
+                  DeepSeq.rnf __field__module_ `Prelude.seq` ()
+
+instance Default.Default InterfaceDefinition_key where
+  def
+    = InterfaceDefinition_key Default.def Default.def Default.def
+        Default.def
+        Default.def
+        Default.def
+        Prelude.Nothing
+
+instance Hashable.Hashable InterfaceDefinition_key where
+  hashWithSalt __salt
+    (InterfaceDefinition_key _declaration _members _extends_
+       _attributes _typeParams _requireExtends _module_)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt
+              (Hashable.hashWithSalt
+                 (Hashable.hashWithSalt
+                    (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _declaration)
+                       _members)
+                    _extends_)
+                 _attributes)
+              _typeParams)
+           _requireExtends)
+        _module_
+
+data MethodDefinition_key = MethodDefinition_key{methodDefinition_key_declaration
+                                                 :: MethodDeclaration,
+                                                 methodDefinition_key_signature :: Signature,
+                                                 methodDefinition_key_visibility :: Visibility,
+                                                 methodDefinition_key_isAbstract :: Prelude.Bool,
+                                                 methodDefinition_key_isAsync :: Prelude.Bool,
+                                                 methodDefinition_key_isFinal :: Prelude.Bool,
+                                                 methodDefinition_key_isStatic :: Prelude.Bool,
+                                                 methodDefinition_key_attributes :: [UserAttribute],
+                                                 methodDefinition_key_typeParams :: [TypeParameter],
+                                                 methodDefinition_key_isReadonlyThis ::
+                                                 Prelude.Maybe Prelude.Bool,
+                                                 methodDefinition_key_readonlyRet ::
+                                                 Prelude.Maybe ReadonlyKind}
+                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON MethodDefinition_key where
+  toJSON
+    (MethodDefinition_key __field__declaration __field__signature
+       __field__visibility __field__isAbstract __field__isAsync
+       __field__isFinal __field__isStatic __field__attributes
+       __field__typeParams __field__isReadonlyThis __field__readonlyRet)
+    = Aeson.object
+        ("declaration" .= __field__declaration :
+           "signature" .= __field__signature :
+             "visibility" .= __field__visibility :
+               "isAbstract" .= __field__isAbstract :
+                 "isAsync" .= __field__isAsync :
+                   "isFinal" .= __field__isFinal :
+                     "isStatic" .= __field__isStatic :
+                       "attributes" .= __field__attributes :
+                         "typeParams" .= __field__typeParams :
+                           Prelude.maybe Prelude.id ((:) . ("isReadonlyThis" .=))
+                             __field__isReadonlyThis
+                             (Prelude.maybe Prelude.id ((:) . ("readonlyRet" .=))
+                                __field__readonlyRet
+                                Prelude.mempty))
+
+instance Thrift.ThriftStruct MethodDefinition_key where
+  buildStruct _proxy
+    (MethodDefinition_key __field__declaration __field__signature
+       __field__visibility __field__isAbstract __field__isAsync
+       __field__isFinal __field__isStatic __field__attributes
+       __field__typeParams __field__isReadonlyThis __field__readonlyRet)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "declaration" (Thrift.getStructType _proxy)
+           1
+           0
+           (Thrift.buildStruct _proxy __field__declaration)
+           :
+           Thrift.genField _proxy "signature" (Thrift.getStructType _proxy) 2
+             1
+             (Thrift.buildStruct _proxy __field__signature)
+             :
+             Thrift.genField _proxy "visibility" (Thrift.getI32Type _proxy) 3 2
+               ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                   Thrift.fromThriftEnum)
+                  __field__visibility)
+               :
+               Thrift.genFieldBool _proxy "isAbstract" 4 3 __field__isAbstract :
+                 Thrift.genFieldBool _proxy "isAsync" 5 4 __field__isAsync :
+                   Thrift.genFieldBool _proxy "isFinal" 6 5 __field__isFinal :
+                     Thrift.genFieldBool _proxy "isStatic" 7 6 __field__isStatic :
+                       Thrift.genField _proxy "attributes" (Thrift.getListType _proxy) 8 7
+                         (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                            (Thrift.buildStruct _proxy)
+                            __field__attributes)
+                         :
+                         Thrift.genField _proxy "typeParams" (Thrift.getListType _proxy) 9 8
+                           (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                              (Thrift.buildStruct _proxy)
+                              __field__typeParams)
+                           :
+                           let (__cereal__isReadonlyThis, __id__isReadonlyThis)
+                                 = case __field__isReadonlyThis of
+                                     Prelude.Just _val -> ((:)
+                                                             (Thrift.genFieldBool _proxy
+                                                                "isReadonlyThis"
+                                                                10
+                                                                9
+                                                                _val),
+                                                           10)
+                                     Prelude.Nothing -> (Prelude.id, 9)
+                             in
+                             __cereal__isReadonlyThis
+                               (case __field__readonlyRet of
+                                  Prelude.Just _val -> Thrift.genField _proxy "readonlyRet"
+                                                         (Thrift.getI32Type _proxy)
+                                                         11
+                                                         __id__isReadonlyThis
+                                                         ((Thrift.genI32 _proxy .
+                                                             Prelude.fromIntegral
+                                                             . Thrift.fromThriftEnum)
+                                                            _val)
+                                                         : []
+                                  Prelude.Nothing -> []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__declaration <- ST.newSTRef Default.def
+            __field__signature <- ST.newSTRef Default.def
+            __field__visibility <- ST.newSTRef Default.def
+            __field__isAbstract <- ST.newSTRef Prelude.False
+            __field__isAsync <- ST.newSTRef Prelude.False
+            __field__isFinal <- ST.newSTRef Prelude.False
+            __field__isStatic <- ST.newSTRef Prelude.False
+            __field__attributes <- ST.newSTRef Default.def
+            __field__typeParams <- ST.newSTRef Default.def
+            __field__isReadonlyThis <- ST.newSTRef Prelude.Nothing
+            __field__readonlyRet <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__declaration
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__signature
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "Visibility")
+                                                                        ST.writeSTRef
+                                                                          __field__visibility
+                                                                          _val
+                                                                 4 | _type ==
+                                                                       Thrift.getBoolType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseBoolF
+                                                                                      _proxy
+                                                                                      _bool)
+                                                                        ST.writeSTRef
+                                                                          __field__isAbstract
+                                                                          _val
+                                                                 5 | _type ==
+                                                                       Thrift.getBoolType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseBoolF
+                                                                                      _proxy
+                                                                                      _bool)
+                                                                        ST.writeSTRef
+                                                                          __field__isAsync
+                                                                          _val
+                                                                 6 | _type ==
+                                                                       Thrift.getBoolType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseBoolF
+                                                                                      _proxy
+                                                                                      _bool)
+                                                                        ST.writeSTRef
+                                                                          __field__isFinal
+                                                                          _val
+                                                                 7 | _type ==
+                                                                       Thrift.getBoolType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseBoolF
+                                                                                      _proxy
+                                                                                      _bool)
+                                                                        ST.writeSTRef
+                                                                          __field__isStatic
+                                                                          _val
+                                                                 8 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__attributes
+                                                                          _val
+                                                                 9 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__typeParams
+                                                                          _val
+                                                                 10 | _type ==
+                                                                        Thrift.getBoolType _proxy
+                                                                      ->
+                                                                      do !_val <- Trans.lift
+                                                                                    (Thrift.parseBoolF
+                                                                                       _proxy
+                                                                                       _bool)
+                                                                         ST.writeSTRef
+                                                                           __field__isReadonlyThis
+                                                                           (Prelude.Just _val)
+                                                                 11 | _type ==
+                                                                        Thrift.getI32Type _proxy
+                                                                      ->
+                                                                      do !_val <- Trans.lift
+                                                                                    (Thrift.parseEnum
+                                                                                       _proxy
+                                                                                       "ReadonlyKind")
+                                                                         ST.writeSTRef
+                                                                           __field__readonlyRet
+                                                                           (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__declaration <- ST.readSTRef
+                                                                      __field__declaration
+                                             !__val__signature <- ST.readSTRef __field__signature
+                                             !__val__visibility <- ST.readSTRef __field__visibility
+                                             !__val__isAbstract <- ST.readSTRef __field__isAbstract
+                                             !__val__isAsync <- ST.readSTRef __field__isAsync
+                                             !__val__isFinal <- ST.readSTRef __field__isFinal
+                                             !__val__isStatic <- ST.readSTRef __field__isStatic
+                                             !__val__attributes <- ST.readSTRef __field__attributes
+                                             !__val__typeParams <- ST.readSTRef __field__typeParams
+                                             !__val__isReadonlyThis <- ST.readSTRef
+                                                                         __field__isReadonlyThis
+                                             !__val__readonlyRet <- ST.readSTRef
+                                                                      __field__readonlyRet
+                                             Prelude.pure
+                                               (MethodDefinition_key __val__declaration
+                                                  __val__signature
+                                                  __val__visibility
+                                                  __val__isAbstract
+                                                  __val__isAsync
+                                                  __val__isFinal
+                                                  __val__isStatic
+                                                  __val__attributes
+                                                  __val__typeParams
+                                                  __val__isReadonlyThis
+                                                  __val__readonlyRet)
+              _idMap
+                = HashMap.fromList
+                    [("declaration", 1), ("signature", 2), ("visibility", 3),
+                     ("isAbstract", 4), ("isAsync", 5), ("isFinal", 6), ("isStatic", 7),
+                     ("attributes", 8), ("typeParams", 9), ("isReadonlyThis", 10),
+                     ("readonlyRet", 11)]
+            _parse 0)
+
+instance DeepSeq.NFData MethodDefinition_key where
+  rnf
+    (MethodDefinition_key __field__declaration __field__signature
+       __field__visibility __field__isAbstract __field__isAsync
+       __field__isFinal __field__isStatic __field__attributes
+       __field__typeParams __field__isReadonlyThis __field__readonlyRet)
+    = DeepSeq.rnf __field__declaration `Prelude.seq`
+        DeepSeq.rnf __field__signature `Prelude.seq`
+          DeepSeq.rnf __field__visibility `Prelude.seq`
+            DeepSeq.rnf __field__isAbstract `Prelude.seq`
+              DeepSeq.rnf __field__isAsync `Prelude.seq`
+                DeepSeq.rnf __field__isFinal `Prelude.seq`
+                  DeepSeq.rnf __field__isStatic `Prelude.seq`
+                    DeepSeq.rnf __field__attributes `Prelude.seq`
+                      DeepSeq.rnf __field__typeParams `Prelude.seq`
+                        DeepSeq.rnf __field__isReadonlyThis `Prelude.seq`
+                          DeepSeq.rnf __field__readonlyRet `Prelude.seq` ()
+
+instance Default.Default MethodDefinition_key where
+  def
+    = MethodDefinition_key Default.def Default.def Default.def
+        Prelude.False
+        Prelude.False
+        Prelude.False
+        Prelude.False
+        Default.def
+        Default.def
+        Prelude.Nothing
+        Prelude.Nothing
+
+instance Hashable.Hashable MethodDefinition_key where
+  hashWithSalt __salt
+    (MethodDefinition_key _declaration _signature _visibility
+       _isAbstract _isAsync _isFinal _isStatic _attributes _typeParams
+       _isReadonlyThis _readonlyRet)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt
+              (Hashable.hashWithSalt
+                 (Hashable.hashWithSalt
+                    (Hashable.hashWithSalt
+                       (Hashable.hashWithSalt
+                          (Hashable.hashWithSalt
+                             (Hashable.hashWithSalt
+                                (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _declaration)
+                                   _signature)
+                                _visibility)
+                             _isAbstract)
+                          _isAsync)
+                       _isFinal)
+                    _isStatic)
+                 _attributes)
+              _typeParams)
+           _isReadonlyThis)
+        _readonlyRet
+
+data TraitDefinition_key = TraitDefinition_key{traitDefinition_key_declaration
+                                               :: TraitDeclaration,
+                                               traitDefinition_key_members :: [Declaration],
+                                               traitDefinition_key_implements_ ::
+                                               [InterfaceDeclaration],
+                                               traitDefinition_key_uses :: [TraitDeclaration],
+                                               traitDefinition_key_attributes :: [UserAttribute],
+                                               traitDefinition_key_typeParams :: [TypeParameter],
+                                               traitDefinition_key_requireExtends ::
+                                               [ClassDeclaration],
+                                               traitDefinition_key_requireImplements ::
+                                               [InterfaceDeclaration],
+                                               traitDefinition_key_module_ ::
+                                               Prelude.Maybe ModuleMembership,
+                                               traitDefinition_key_requireClass ::
+                                               Prelude.Maybe [ClassDeclaration],
+                                               traitDefinition_key_requireThisAs ::
+                                               [ClassDeclaration]}
+                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TraitDefinition_key where
+  toJSON
+    (TraitDefinition_key __field__declaration __field__members
+       __field__implements_ __field__uses __field__attributes
+       __field__typeParams __field__requireExtends
+       __field__requireImplements __field__module_ __field__requireClass
+       __field__requireThisAs)
+    = Aeson.object
+        ("declaration" .= __field__declaration :
+           "members" .= __field__members :
+             "implements_" .= __field__implements_ :
+               "uses" .= __field__uses :
+                 "attributes" .= __field__attributes :
+                   "typeParams" .= __field__typeParams :
+                     "requireExtends" .= __field__requireExtends :
+                       "requireImplements" .= __field__requireImplements :
+                         Prelude.maybe Prelude.id ((:) . ("module_" .=)) __field__module_
+                           (Prelude.maybe Prelude.id ((:) . ("requireClass" .=))
+                              __field__requireClass
+                              ("requireThisAs" .= __field__requireThisAs : Prelude.mempty)))
+
+instance Thrift.ThriftStruct TraitDefinition_key where
+  buildStruct _proxy
+    (TraitDefinition_key __field__declaration __field__members
+       __field__implements_ __field__uses __field__attributes
+       __field__typeParams __field__requireExtends
+       __field__requireImplements __field__module_ __field__requireClass
+       __field__requireThisAs)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "declaration" (Thrift.getStructType _proxy)
+           1
+           0
+           (Thrift.buildStruct _proxy __field__declaration)
+           :
+           Thrift.genField _proxy "members" (Thrift.getListType _proxy) 2 1
+             (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                (Thrift.buildStruct _proxy)
+                __field__members)
+             :
+             Thrift.genField _proxy "implements_" (Thrift.getListType _proxy) 3
+               2
+               (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                  (Thrift.buildStruct _proxy)
+                  __field__implements_)
+               :
+               Thrift.genField _proxy "uses" (Thrift.getListType _proxy) 4 3
+                 (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                    (Thrift.buildStruct _proxy)
+                    __field__uses)
+                 :
+                 Thrift.genField _proxy "attributes" (Thrift.getListType _proxy) 5 4
+                   (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                      (Thrift.buildStruct _proxy)
+                      __field__attributes)
+                   :
+                   Thrift.genField _proxy "typeParams" (Thrift.getListType _proxy) 6 5
+                     (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                        (Thrift.buildStruct _proxy)
+                        __field__typeParams)
+                     :
+                     Thrift.genField _proxy "requireExtends" (Thrift.getListType _proxy)
+                       7
+                       6
+                       (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                          (Thrift.buildStruct _proxy)
+                          __field__requireExtends)
+                       :
+                       Thrift.genField _proxy "requireImplements"
+                         (Thrift.getListType _proxy)
+                         8
+                         7
+                         (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                            (Thrift.buildStruct _proxy)
+                            __field__requireImplements)
+                         :
+                         let (__cereal__module_, __id__module_)
+                               = case __field__module_ of
+                                   Prelude.Just _val -> ((:)
+                                                           (Thrift.genField _proxy "module_"
+                                                              (Thrift.getStructType _proxy)
+                                                              9
+                                                              8
+                                                              (Thrift.buildStruct _proxy _val)),
+                                                         9)
+                                   Prelude.Nothing -> (Prelude.id, 8)
+                           in
+                           __cereal__module_
+                             (let (__cereal__requireClass, __id__requireClass)
+                                    = case __field__requireClass of
+                                        Prelude.Just _val -> ((:)
+                                                                (Thrift.genField _proxy
+                                                                   "requireClass"
+                                                                   (Thrift.getListType _proxy)
+                                                                   10
+                                                                   __id__module_
+                                                                   (Thrift.genList _proxy
+                                                                      (Thrift.getStructType _proxy)
+                                                                      (Thrift.buildStruct _proxy)
+                                                                      _val)),
+                                                              10)
+                                        Prelude.Nothing -> (Prelude.id, __id__module_)
+                                in
+                                __cereal__requireClass
+                                  (Thrift.genField _proxy "requireThisAs"
+                                     (Thrift.getListType _proxy)
+                                     11
+                                     __id__requireClass
+                                     (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                                        (Thrift.buildStruct _proxy)
+                                        __field__requireThisAs)
+                                     : [])))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__declaration <- ST.newSTRef Default.def
+            __field__members <- ST.newSTRef Default.def
+            __field__implements_ <- ST.newSTRef Default.def
+            __field__uses <- ST.newSTRef Default.def
+            __field__attributes <- ST.newSTRef Default.def
+            __field__typeParams <- ST.newSTRef Default.def
+            __field__requireExtends <- ST.newSTRef Default.def
+            __field__requireImplements <- ST.newSTRef Default.def
+            __field__module_ <- ST.newSTRef Prelude.Nothing
+            __field__requireClass <- ST.newSTRef Prelude.Nothing
+            __field__requireThisAs <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__declaration
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__members
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__implements_
+                                                                          _val
+                                                                 4 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef __field__uses
+                                                                          _val
+                                                                 5 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__attributes
+                                                                          _val
+                                                                 6 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__typeParams
+                                                                          _val
+                                                                 7 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__requireExtends
+                                                                          _val
+                                                                 8 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__requireImplements
+                                                                          _val
+                                                                 9 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__module_
+                                                                          (Prelude.Just _val)
+                                                                 10 | _type ==
+                                                                        Thrift.getListType _proxy
+                                                                      ->
+                                                                      do !_val <- Trans.lift
+                                                                                    (Prelude.snd <$>
+                                                                                       Thrift.parseList
+                                                                                         _proxy
+                                                                                         (Thrift.parseStruct
+                                                                                            _proxy))
+                                                                         ST.writeSTRef
+                                                                           __field__requireClass
+                                                                           (Prelude.Just _val)
+                                                                 11 | _type ==
+                                                                        Thrift.getListType _proxy
+                                                                      ->
+                                                                      do !_val <- Trans.lift
+                                                                                    (Prelude.snd <$>
+                                                                                       Thrift.parseList
+                                                                                         _proxy
+                                                                                         (Thrift.parseStruct
+                                                                                            _proxy))
+                                                                         ST.writeSTRef
+                                                                           __field__requireThisAs
+                                                                           _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__declaration <- ST.readSTRef
+                                                                      __field__declaration
+                                             !__val__members <- ST.readSTRef __field__members
+                                             !__val__implements_ <- ST.readSTRef
+                                                                      __field__implements_
+                                             !__val__uses <- ST.readSTRef __field__uses
+                                             !__val__attributes <- ST.readSTRef __field__attributes
+                                             !__val__typeParams <- ST.readSTRef __field__typeParams
+                                             !__val__requireExtends <- ST.readSTRef
+                                                                         __field__requireExtends
+                                             !__val__requireImplements <- ST.readSTRef
+                                                                            __field__requireImplements
+                                             !__val__module_ <- ST.readSTRef __field__module_
+                                             !__val__requireClass <- ST.readSTRef
+                                                                       __field__requireClass
+                                             !__val__requireThisAs <- ST.readSTRef
+                                                                        __field__requireThisAs
+                                             Prelude.pure
+                                               (TraitDefinition_key __val__declaration
+                                                  __val__members
+                                                  __val__implements_
+                                                  __val__uses
+                                                  __val__attributes
+                                                  __val__typeParams
+                                                  __val__requireExtends
+                                                  __val__requireImplements
+                                                  __val__module_
+                                                  __val__requireClass
+                                                  __val__requireThisAs)
+              _idMap
+                = HashMap.fromList
+                    [("declaration", 1), ("members", 2), ("implements_", 3),
+                     ("uses", 4), ("attributes", 5), ("typeParams", 6),
+                     ("requireExtends", 7), ("requireImplements", 8), ("module_", 9),
+                     ("requireClass", 10), ("requireThisAs", 11)]
+            _parse 0)
+
+instance DeepSeq.NFData TraitDefinition_key where
+  rnf
+    (TraitDefinition_key __field__declaration __field__members
+       __field__implements_ __field__uses __field__attributes
+       __field__typeParams __field__requireExtends
+       __field__requireImplements __field__module_ __field__requireClass
+       __field__requireThisAs)
+    = DeepSeq.rnf __field__declaration `Prelude.seq`
+        DeepSeq.rnf __field__members `Prelude.seq`
+          DeepSeq.rnf __field__implements_ `Prelude.seq`
+            DeepSeq.rnf __field__uses `Prelude.seq`
+              DeepSeq.rnf __field__attributes `Prelude.seq`
+                DeepSeq.rnf __field__typeParams `Prelude.seq`
+                  DeepSeq.rnf __field__requireExtends `Prelude.seq`
+                    DeepSeq.rnf __field__requireImplements `Prelude.seq`
+                      DeepSeq.rnf __field__module_ `Prelude.seq`
+                        DeepSeq.rnf __field__requireClass `Prelude.seq`
+                          DeepSeq.rnf __field__requireThisAs `Prelude.seq` ()
+
+instance Default.Default TraitDefinition_key where
+  def
+    = TraitDefinition_key Default.def Default.def Default.def
+        Default.def
+        Default.def
+        Default.def
+        Default.def
+        Default.def
+        Prelude.Nothing
+        Prelude.Nothing
+        Default.def
+
+instance Hashable.Hashable TraitDefinition_key where
+  hashWithSalt __salt
+    (TraitDefinition_key _declaration _members _implements_ _uses
+       _attributes _typeParams _requireExtends _requireImplements _module_
+       _requireClass _requireThisAs)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt
+              (Hashable.hashWithSalt
+                 (Hashable.hashWithSalt
+                    (Hashable.hashWithSalt
+                       (Hashable.hashWithSalt
+                          (Hashable.hashWithSalt
+                             (Hashable.hashWithSalt
+                                (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _declaration)
+                                   _members)
+                                _implements_)
+                             _uses)
+                          _attributes)
+                       _typeParams)
+                    _requireExtends)
+                 _requireImplements)
+              _module_)
+           _requireClass)
+        _requireThisAs
+
+data TypedefDefinition_key = TypedefDefinition_key{typedefDefinition_key_declaration
+                                                   :: TypedefDeclaration,
+                                                   typedefDefinition_key_isTransparent ::
+                                                   Prelude.Bool,
+                                                   typedefDefinition_key_attributes ::
+                                                   [UserAttribute],
+                                                   typedefDefinition_key_typeParams ::
+                                                   [TypeParameter],
+                                                   typedefDefinition_key_module_ ::
+                                                   Prelude.Maybe ModuleMembership}
+                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TypedefDefinition_key where
+  toJSON
+    (TypedefDefinition_key __field__declaration __field__isTransparent
+       __field__attributes __field__typeParams __field__module_)
+    = Aeson.object
+        ("declaration" .= __field__declaration :
+           "isTransparent" .= __field__isTransparent :
+             "attributes" .= __field__attributes :
+               "typeParams" .= __field__typeParams :
+                 Prelude.maybe Prelude.id ((:) . ("module_" .=)) __field__module_
+                   Prelude.mempty)
+
+instance Thrift.ThriftStruct TypedefDefinition_key where
+  buildStruct _proxy
+    (TypedefDefinition_key __field__declaration __field__isTransparent
+       __field__attributes __field__typeParams __field__module_)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "declaration" (Thrift.getStructType _proxy)
+           1
+           0
+           (Thrift.buildStruct _proxy __field__declaration)
+           :
+           Thrift.genFieldBool _proxy "isTransparent" 2 1
+             __field__isTransparent
+             :
+             Thrift.genField _proxy "attributes" (Thrift.getListType _proxy) 3 2
+               (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                  (Thrift.buildStruct _proxy)
+                  __field__attributes)
+               :
+               Thrift.genField _proxy "typeParams" (Thrift.getListType _proxy) 4 3
+                 (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                    (Thrift.buildStruct _proxy)
+                    __field__typeParams)
+                 :
+                 case __field__module_ of
+                   Prelude.Just _val -> Thrift.genField _proxy "module_"
+                                          (Thrift.getStructType _proxy)
+                                          5
+                                          4
+                                          (Thrift.buildStruct _proxy _val)
+                                          : []
+                   Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__declaration <- ST.newSTRef Default.def
+            __field__isTransparent <- ST.newSTRef Prelude.False
+            __field__attributes <- ST.newSTRef Default.def
+            __field__typeParams <- ST.newSTRef Default.def
+            __field__module_ <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__declaration
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getBoolType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseBoolF
+                                                                                      _proxy
+                                                                                      _bool)
+                                                                        ST.writeSTRef
+                                                                          __field__isTransparent
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__attributes
+                                                                          _val
+                                                                 4 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__typeParams
+                                                                          _val
+                                                                 5 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__module_
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__declaration <- ST.readSTRef
+                                                                      __field__declaration
+                                             !__val__isTransparent <- ST.readSTRef
+                                                                        __field__isTransparent
+                                             !__val__attributes <- ST.readSTRef __field__attributes
+                                             !__val__typeParams <- ST.readSTRef __field__typeParams
+                                             !__val__module_ <- ST.readSTRef __field__module_
+                                             Prelude.pure
+                                               (TypedefDefinition_key __val__declaration
+                                                  __val__isTransparent
+                                                  __val__attributes
+                                                  __val__typeParams
+                                                  __val__module_)
+              _idMap
+                = HashMap.fromList
+                    [("declaration", 1), ("isTransparent", 2), ("attributes", 3),
+                     ("typeParams", 4), ("module_", 5)]
+            _parse 0)
+
+instance DeepSeq.NFData TypedefDefinition_key where
+  rnf
+    (TypedefDefinition_key __field__declaration __field__isTransparent
+       __field__attributes __field__typeParams __field__module_)
+    = DeepSeq.rnf __field__declaration `Prelude.seq`
+        DeepSeq.rnf __field__isTransparent `Prelude.seq`
+          DeepSeq.rnf __field__attributes `Prelude.seq`
+            DeepSeq.rnf __field__typeParams `Prelude.seq`
+              DeepSeq.rnf __field__module_ `Prelude.seq` ()
+
+instance Default.Default TypedefDefinition_key where
+  def
+    = TypedefDefinition_key Default.def Prelude.False Default.def
+        Default.def
+        Prelude.Nothing
+
+instance Hashable.Hashable TypedefDefinition_key where
+  hashWithSalt __salt
+    (TypedefDefinition_key _declaration _isTransparent _attributes
+       _typeParams _module_)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt
+              (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _declaration)
+                 _isTransparent)
+              _attributes)
+           _typeParams)
+        _module_
+
+data ClassDefinition_key = ClassDefinition_key{classDefinition_key_declaration
+                                               :: ClassDeclaration,
+                                               classDefinition_key_isAbstract :: Prelude.Bool,
+                                               classDefinition_key_isFinal :: Prelude.Bool,
+                                               classDefinition_key_members :: [Declaration],
+                                               classDefinition_key_extends_ ::
+                                               Prelude.Maybe ClassDeclaration,
+                                               classDefinition_key_implements_ ::
+                                               [InterfaceDeclaration],
+                                               classDefinition_key_uses :: [TraitDeclaration],
+                                               classDefinition_key_attributes :: [UserAttribute],
+                                               classDefinition_key_typeParams :: [TypeParameter],
+                                               classDefinition_key_module_ ::
+                                               Prelude.Maybe ModuleMembership}
+                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ClassDefinition_key where
+  toJSON
+    (ClassDefinition_key __field__declaration __field__isAbstract
+       __field__isFinal __field__members __field__extends_
+       __field__implements_ __field__uses __field__attributes
+       __field__typeParams __field__module_)
+    = Aeson.object
+        ("declaration" .= __field__declaration :
+           "isAbstract" .= __field__isAbstract :
+             "isFinal" .= __field__isFinal :
+               "members" .= __field__members :
+                 Prelude.maybe Prelude.id ((:) . ("extends_" .=)) __field__extends_
+                   ("implements_" .= __field__implements_ :
+                      "uses" .= __field__uses :
+                        "attributes" .= __field__attributes :
+                          "typeParams" .= __field__typeParams :
+                            Prelude.maybe Prelude.id ((:) . ("module_" .=)) __field__module_
+                              Prelude.mempty))
+
+instance Thrift.ThriftStruct ClassDefinition_key where
+  buildStruct _proxy
+    (ClassDefinition_key __field__declaration __field__isAbstract
+       __field__isFinal __field__members __field__extends_
+       __field__implements_ __field__uses __field__attributes
+       __field__typeParams __field__module_)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "declaration" (Thrift.getStructType _proxy)
+           1
+           0
+           (Thrift.buildStruct _proxy __field__declaration)
+           :
+           Thrift.genFieldBool _proxy "isAbstract" 2 1 __field__isAbstract :
+             Thrift.genFieldBool _proxy "isFinal" 3 2 __field__isFinal :
+               Thrift.genField _proxy "members" (Thrift.getListType _proxy) 4 3
+                 (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                    (Thrift.buildStruct _proxy)
+                    __field__members)
+                 :
+                 let (__cereal__extends_, __id__extends_)
+                       = case __field__extends_ of
+                           Prelude.Just _val -> ((:)
+                                                   (Thrift.genField _proxy "extends_"
+                                                      (Thrift.getStructType _proxy)
+                                                      5
+                                                      4
+                                                      (Thrift.buildStruct _proxy _val)),
+                                                 5)
+                           Prelude.Nothing -> (Prelude.id, 4)
+                   in
+                   __cereal__extends_
+                     (Thrift.genField _proxy "implements_" (Thrift.getListType _proxy) 6
+                        __id__extends_
+                        (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                           (Thrift.buildStruct _proxy)
+                           __field__implements_)
+                        :
+                        Thrift.genField _proxy "uses" (Thrift.getListType _proxy) 7 6
+                          (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                             (Thrift.buildStruct _proxy)
+                             __field__uses)
+                          :
+                          Thrift.genField _proxy "attributes" (Thrift.getListType _proxy) 8 7
+                            (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                               (Thrift.buildStruct _proxy)
+                               __field__attributes)
+                            :
+                            Thrift.genField _proxy "typeParams" (Thrift.getListType _proxy) 9 8
+                              (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                                 (Thrift.buildStruct _proxy)
+                                 __field__typeParams)
+                              :
+                              case __field__module_ of
+                                Prelude.Just _val -> Thrift.genField _proxy "module_"
+                                                       (Thrift.getStructType _proxy)
+                                                       10
+                                                       9
+                                                       (Thrift.buildStruct _proxy _val)
+                                                       : []
+                                Prelude.Nothing -> []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__declaration <- ST.newSTRef Default.def
+            __field__isAbstract <- ST.newSTRef Prelude.False
+            __field__isFinal <- ST.newSTRef Prelude.False
+            __field__members <- ST.newSTRef Default.def
+            __field__extends_ <- ST.newSTRef Prelude.Nothing
+            __field__implements_ <- ST.newSTRef Default.def
+            __field__uses <- ST.newSTRef Default.def
+            __field__attributes <- ST.newSTRef Default.def
+            __field__typeParams <- ST.newSTRef Default.def
+            __field__module_ <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__declaration
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getBoolType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseBoolF
+                                                                                      _proxy
+                                                                                      _bool)
+                                                                        ST.writeSTRef
+                                                                          __field__isAbstract
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getBoolType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseBoolF
+                                                                                      _proxy
+                                                                                      _bool)
+                                                                        ST.writeSTRef
+                                                                          __field__isFinal
+                                                                          _val
+                                                                 4 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__members
+                                                                          _val
+                                                                 5 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__extends_
+                                                                          (Prelude.Just _val)
+                                                                 6 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__implements_
+                                                                          _val
+                                                                 7 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef __field__uses
+                                                                          _val
+                                                                 8 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__attributes
+                                                                          _val
+                                                                 9 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__typeParams
+                                                                          _val
+                                                                 10 | _type ==
+                                                                        Thrift.getStructType _proxy
+                                                                      ->
+                                                                      do !_val <- Trans.lift
+                                                                                    (Thrift.parseStruct
+                                                                                       _proxy)
+                                                                         ST.writeSTRef
+                                                                           __field__module_
+                                                                           (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__declaration <- ST.readSTRef
+                                                                      __field__declaration
+                                             !__val__isAbstract <- ST.readSTRef __field__isAbstract
+                                             !__val__isFinal <- ST.readSTRef __field__isFinal
+                                             !__val__members <- ST.readSTRef __field__members
+                                             !__val__extends_ <- ST.readSTRef __field__extends_
+                                             !__val__implements_ <- ST.readSTRef
+                                                                      __field__implements_
+                                             !__val__uses <- ST.readSTRef __field__uses
+                                             !__val__attributes <- ST.readSTRef __field__attributes
+                                             !__val__typeParams <- ST.readSTRef __field__typeParams
+                                             !__val__module_ <- ST.readSTRef __field__module_
+                                             Prelude.pure
+                                               (ClassDefinition_key __val__declaration
+                                                  __val__isAbstract
+                                                  __val__isFinal
+                                                  __val__members
+                                                  __val__extends_
+                                                  __val__implements_
+                                                  __val__uses
+                                                  __val__attributes
+                                                  __val__typeParams
+                                                  __val__module_)
+              _idMap
+                = HashMap.fromList
+                    [("declaration", 1), ("isAbstract", 2), ("isFinal", 3),
+                     ("members", 4), ("extends_", 5), ("implements_", 6), ("uses", 7),
+                     ("attributes", 8), ("typeParams", 9), ("module_", 10)]
+            _parse 0)
+
+instance DeepSeq.NFData ClassDefinition_key where
+  rnf
+    (ClassDefinition_key __field__declaration __field__isAbstract
+       __field__isFinal __field__members __field__extends_
+       __field__implements_ __field__uses __field__attributes
+       __field__typeParams __field__module_)
+    = DeepSeq.rnf __field__declaration `Prelude.seq`
+        DeepSeq.rnf __field__isAbstract `Prelude.seq`
+          DeepSeq.rnf __field__isFinal `Prelude.seq`
+            DeepSeq.rnf __field__members `Prelude.seq`
+              DeepSeq.rnf __field__extends_ `Prelude.seq`
+                DeepSeq.rnf __field__implements_ `Prelude.seq`
+                  DeepSeq.rnf __field__uses `Prelude.seq`
+                    DeepSeq.rnf __field__attributes `Prelude.seq`
+                      DeepSeq.rnf __field__typeParams `Prelude.seq`
+                        DeepSeq.rnf __field__module_ `Prelude.seq` ()
+
+instance Default.Default ClassDefinition_key where
+  def
+    = ClassDefinition_key Default.def Prelude.False Prelude.False
+        Default.def
+        Prelude.Nothing
+        Default.def
+        Default.def
+        Default.def
+        Default.def
+        Prelude.Nothing
+
+instance Hashable.Hashable ClassDefinition_key where
+  hashWithSalt __salt
+    (ClassDefinition_key _declaration _isAbstract _isFinal _members
+       _extends_ _implements_ _uses _attributes _typeParams _module_)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt
+              (Hashable.hashWithSalt
+                 (Hashable.hashWithSalt
+                    (Hashable.hashWithSalt
+                       (Hashable.hashWithSalt
+                          (Hashable.hashWithSalt
+                             (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _declaration)
+                                _isAbstract)
+                             _isFinal)
+                          _members)
+                       _extends_)
+                    _implements_)
+                 _uses)
+              _attributes)
+           _typeParams)
+        _module_
+
+newtype ClassDeclaration_key = ClassDeclaration_key{classDeclaration_key_name
+                                                    :: QName}
+                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ClassDeclaration_key where
+  toJSON (ClassDeclaration_key __field__name)
+    = Aeson.object ("name" .= __field__name : Prelude.mempty)
+
+instance Thrift.ThriftStruct ClassDeclaration_key where
+  buildStruct _proxy (ClassDeclaration_key __field__name)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__name)
+           : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             Prelude.pure (ClassDeclaration_key __val__name)
+              _idMap = HashMap.fromList [("name", 1)]
+            _parse 0)
+
+instance DeepSeq.NFData ClassDeclaration_key where
+  rnf (ClassDeclaration_key __field__name)
+    = DeepSeq.rnf __field__name `Prelude.seq` ()
+
+instance Default.Default ClassDeclaration_key where
+  def = ClassDeclaration_key Default.def
+
+instance Hashable.Hashable ClassDeclaration_key where
+  hashWithSalt __salt (ClassDeclaration_key _name)
+    = Hashable.hashWithSalt __salt _name
+
+data ClassConstDefinition_key = ClassConstDefinition_key{classConstDefinition_key_declaration
+                                                         :: ClassConstDeclaration,
+                                                         classConstDefinition_key_type ::
+                                                         Prelude.Maybe Type,
+                                                         classConstDefinition_key_value ::
+                                                         Prelude.Maybe Text.Text,
+                                                         classConstDefinition_key_typeInfo ::
+                                                         Prelude.Maybe TypeInfo}
+                                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ClassConstDefinition_key where
+  toJSON
+    (ClassConstDefinition_key __field__declaration __field__type
+       __field__value __field__typeInfo)
+    = Aeson.object
+        ("declaration" .= __field__declaration :
+           Prelude.maybe Prelude.id ((:) . ("type" .=)) __field__type
+             (Prelude.maybe Prelude.id ((:) . ("value" .=)) __field__value
+                (Prelude.maybe Prelude.id ((:) . ("typeInfo" .=)) __field__typeInfo
+                   Prelude.mempty)))
+
+instance Thrift.ThriftStruct ClassConstDefinition_key where
+  buildStruct _proxy
+    (ClassConstDefinition_key __field__declaration __field__type
+       __field__value __field__typeInfo)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "declaration" (Thrift.getStructType _proxy)
+           1
+           0
+           (Thrift.buildStruct _proxy __field__declaration)
+           :
+           let (__cereal__type, __id__type)
+                 = case __field__type of
+                     Prelude.Just _val -> ((:)
+                                             (Thrift.genField _proxy "type"
+                                                (Thrift.getStructType _proxy)
+                                                2
+                                                1
+                                                (Thrift.buildStruct _proxy _val)),
+                                           2)
+                     Prelude.Nothing -> (Prelude.id, 1)
+             in
+             __cereal__type
+               (let (__cereal__value, __id__value)
+                      = case __field__value of
+                          Prelude.Just _val -> ((:)
+                                                  (Thrift.genField _proxy "value"
+                                                     (Thrift.getStringType _proxy)
+                                                     3
+                                                     __id__type
+                                                     (Thrift.genText _proxy _val)),
+                                                3)
+                          Prelude.Nothing -> (Prelude.id, __id__type)
+                  in
+                  __cereal__value
+                    (case __field__typeInfo of
+                       Prelude.Just _val -> Thrift.genField _proxy "typeInfo"
+                                              (Thrift.getStructType _proxy)
+                                              4
+                                              __id__value
+                                              (Thrift.buildStruct _proxy _val)
+                                              : []
+                       Prelude.Nothing -> [])))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__declaration <- ST.newSTRef Default.def
+            __field__type <- ST.newSTRef Prelude.Nothing
+            __field__value <- ST.newSTRef Prelude.Nothing
+            __field__typeInfo <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__declaration
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__type
+                                                                          (Prelude.Just _val)
+                                                                 3 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__value
+                                                                          (Prelude.Just _val)
+                                                                 4 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__typeInfo
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__declaration <- ST.readSTRef
+                                                                      __field__declaration
+                                             !__val__type <- ST.readSTRef __field__type
+                                             !__val__value <- ST.readSTRef __field__value
+                                             !__val__typeInfo <- ST.readSTRef __field__typeInfo
+                                             Prelude.pure
+                                               (ClassConstDefinition_key __val__declaration
+                                                  __val__type
+                                                  __val__value
+                                                  __val__typeInfo)
+              _idMap
+                = HashMap.fromList
+                    [("declaration", 1), ("type", 2), ("value", 3), ("typeInfo", 4)]
+            _parse 0)
+
+instance DeepSeq.NFData ClassConstDefinition_key where
+  rnf
+    (ClassConstDefinition_key __field__declaration __field__type
+       __field__value __field__typeInfo)
+    = DeepSeq.rnf __field__declaration `Prelude.seq`
+        DeepSeq.rnf __field__type `Prelude.seq`
+          DeepSeq.rnf __field__value `Prelude.seq`
+            DeepSeq.rnf __field__typeInfo `Prelude.seq` ()
+
+instance Default.Default ClassConstDefinition_key where
+  def
+    = ClassConstDefinition_key Default.def Prelude.Nothing
+        Prelude.Nothing
+        Prelude.Nothing
+
+instance Hashable.Hashable ClassConstDefinition_key where
+  hashWithSalt __salt
+    (ClassConstDefinition_key _declaration _type _value _typeInfo)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _declaration)
+              _type)
+           _value)
+        _typeInfo
+
+data ClassConstDeclaration_key = ClassConstDeclaration_key{classConstDeclaration_key_name
+                                                           :: Name,
+                                                           classConstDeclaration_key_container ::
+                                                           ContainerDeclaration}
+                                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ClassConstDeclaration_key where
+  toJSON (ClassConstDeclaration_key __field__name __field__container)
+    = Aeson.object
+        ("name" .= __field__name :
+           "container" .= __field__container : Prelude.mempty)
+
+instance Thrift.ThriftStruct ClassConstDeclaration_key where
+  buildStruct _proxy
+    (ClassConstDeclaration_key __field__name __field__container)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__name)
+           :
+           Thrift.genField _proxy "container" (Thrift.getStructType _proxy) 2
+             1
+             (Thrift.buildStruct _proxy __field__container)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef Default.def
+            __field__container <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__container
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__container <- ST.readSTRef __field__container
+                                             Prelude.pure
+                                               (ClassConstDeclaration_key __val__name
+                                                  __val__container)
+              _idMap = HashMap.fromList [("name", 1), ("container", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ClassConstDeclaration_key where
+  rnf (ClassConstDeclaration_key __field__name __field__container)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__container `Prelude.seq` ()
+
+instance Default.Default ClassConstDeclaration_key where
+  def = ClassConstDeclaration_key Default.def Default.def
+
+instance Hashable.Hashable ClassConstDeclaration_key where
+  hashWithSalt __salt (ClassConstDeclaration_key _name _container)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+        _container
+
+data AttributeToDefinition_key = AttributeToDefinition_key{attributeToDefinition_key_attribute
+                                                           :: UserAttribute,
+                                                           attributeToDefinition_key_definition ::
+                                                           Definition}
+                                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON AttributeToDefinition_key where
+  toJSON
+    (AttributeToDefinition_key __field__attribute __field__definition)
+    = Aeson.object
+        ("attribute" .= __field__attribute :
+           "definition" .= __field__definition : Prelude.mempty)
+
+instance Thrift.ThriftStruct AttributeToDefinition_key where
+  buildStruct _proxy
+    (AttributeToDefinition_key __field__attribute __field__definition)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "attribute" (Thrift.getStructType _proxy) 1
+           0
+           (Thrift.buildStruct _proxy __field__attribute)
+           :
+           Thrift.genField _proxy "definition" (Thrift.getStructType _proxy) 2
+             1
+             (Thrift.buildStruct _proxy __field__definition)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__attribute <- ST.newSTRef Default.def
+            __field__definition <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__attribute
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__definition
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__attribute <- ST.readSTRef
+                                                                    __field__attribute
+                                             !__val__definition <- ST.readSTRef __field__definition
+                                             Prelude.pure
+                                               (AttributeToDefinition_key __val__attribute
+                                                  __val__definition)
+              _idMap = HashMap.fromList [("attribute", 1), ("definition", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData AttributeToDefinition_key where
+  rnf
+    (AttributeToDefinition_key __field__attribute __field__definition)
+    = DeepSeq.rnf __field__attribute `Prelude.seq`
+        DeepSeq.rnf __field__definition `Prelude.seq` ()
+
+instance Default.Default AttributeToDefinition_key where
+  def = AttributeToDefinition_key Default.def Default.def
+
+instance Hashable.Hashable AttributeToDefinition_key where
+  hashWithSalt __salt
+    (AttributeToDefinition_key _attribute _definition)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _attribute)
+        _definition
+
+data AttributeToDeclaration_key = AttributeToDeclaration_key{attributeToDeclaration_key_attribute
+                                                             :: UserAttribute,
+                                                             attributeToDeclaration_key_declaration
+                                                             :: Declaration,
+                                                             attributeToDeclaration_key_file ::
+                                                             Glean.Schema.Src.File}
+                                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON AttributeToDeclaration_key where
+  toJSON
+    (AttributeToDeclaration_key __field__attribute __field__declaration
+       __field__file)
+    = Aeson.object
+        ("attribute" .= __field__attribute :
+           "declaration" .= __field__declaration :
+             "file" .= __field__file : Prelude.mempty)
+
+instance Thrift.ThriftStruct AttributeToDeclaration_key where
+  buildStruct _proxy
+    (AttributeToDeclaration_key __field__attribute __field__declaration
+       __field__file)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "attribute" (Thrift.getStructType _proxy) 1
+           0
+           (Thrift.buildStruct _proxy __field__attribute)
+           :
+           Thrift.genField _proxy "declaration" (Thrift.getStructType _proxy)
+             2
+             1
+             (Thrift.buildStruct _proxy __field__declaration)
+             :
+             Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 3 2
+               (Thrift.buildStruct _proxy __field__file)
+               : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__attribute <- ST.newSTRef Default.def
+            __field__declaration <- ST.newSTRef Default.def
+            __field__file <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__attribute
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__declaration
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__file
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__attribute <- ST.readSTRef
+                                                                    __field__attribute
+                                             !__val__declaration <- ST.readSTRef
+                                                                      __field__declaration
+                                             !__val__file <- ST.readSTRef __field__file
+                                             Prelude.pure
+                                               (AttributeToDeclaration_key __val__attribute
+                                                  __val__declaration
+                                                  __val__file)
+              _idMap
+                = HashMap.fromList
+                    [("attribute", 1), ("declaration", 2), ("file", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData AttributeToDeclaration_key where
+  rnf
+    (AttributeToDeclaration_key __field__attribute __field__declaration
+       __field__file)
+    = DeepSeq.rnf __field__attribute `Prelude.seq`
+        DeepSeq.rnf __field__declaration `Prelude.seq`
+          DeepSeq.rnf __field__file `Prelude.seq` ()
+
+instance Default.Default AttributeToDeclaration_key where
+  def
+    = AttributeToDeclaration_key Default.def Default.def Default.def
+
+instance Hashable.Hashable AttributeToDeclaration_key where
+  hashWithSalt __salt
+    (AttributeToDeclaration_key _attribute _declaration _file)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _attribute)
+           _declaration)
+        _file
+
+data AttributeHasParameter_key = AttributeHasParameter_key{attributeHasParameter_key_name
+                                                           :: Name,
+                                                           attributeHasParameter_key_parameter ::
+                                                           Text.Text,
+                                                           attributeHasParameter_key_attribute ::
+                                                           UserAttribute}
+                                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON AttributeHasParameter_key where
+  toJSON
+    (AttributeHasParameter_key __field__name __field__parameter
+       __field__attribute)
+    = Aeson.object
+        ("name" .= __field__name :
+           "parameter" .= __field__parameter :
+             "attribute" .= __field__attribute : Prelude.mempty)
+
+instance Thrift.ThriftStruct AttributeHasParameter_key where
+  buildStruct _proxy
+    (AttributeHasParameter_key __field__name __field__parameter
+       __field__attribute)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__name)
+           :
+           Thrift.genField _proxy "parameter" (Thrift.getStringType _proxy) 2
+             1
+             (Thrift.genText _proxy __field__parameter)
+             :
+             Thrift.genField _proxy "attribute" (Thrift.getStructType _proxy) 3
+               2
+               (Thrift.buildStruct _proxy __field__attribute)
+               : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef Default.def
+            __field__parameter <- ST.newSTRef ""
+            __field__attribute <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__parameter
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__attribute
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__parameter <- ST.readSTRef __field__parameter
+                                             !__val__attribute <- ST.readSTRef __field__attribute
+                                             Prelude.pure
+                                               (AttributeHasParameter_key __val__name
+                                                  __val__parameter
+                                                  __val__attribute)
+              _idMap
+                = HashMap.fromList
+                    [("name", 1), ("parameter", 2), ("attribute", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData AttributeHasParameter_key where
+  rnf
+    (AttributeHasParameter_key __field__name __field__parameter
+       __field__attribute)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__parameter `Prelude.seq`
+          DeepSeq.rnf __field__attribute `Prelude.seq` ()
+
+instance Default.Default AttributeHasParameter_key where
+  def = AttributeHasParameter_key Default.def "" Default.def
+
+instance Hashable.Hashable AttributeHasParameter_key where
+  hashWithSalt __salt
+    (AttributeHasParameter_key _name _parameter _attribute)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+           _parameter)
+        _attribute
+
+data Argument = Argument_lit StringLiteral
+              | Argument_xref XRefTarget
+              | Argument_EMPTY
+                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Argument where
+  toJSON (Argument_lit __lit) = Aeson.object ["lit" .= __lit]
+  toJSON (Argument_xref __xref) = Aeson.object ["xref" .= __xref]
+  toJSON Argument_EMPTY = Aeson.object []
+
+instance Thrift.ThriftStruct Argument where
+  buildStruct _proxy (Argument_lit __lit)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "lit" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __lit)]
+  buildStruct _proxy (Argument_xref __xref)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "xref" (Thrift.getStructType _proxy) 2 0
+           (Thrift.buildStruct _proxy __xref)]
+  buildStruct _proxy Argument_EMPTY = Thrift.genStruct _proxy []
+  parseStruct _proxy
+    = do _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap
+         case _fieldBegin of
+           Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                     1 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return (Argument_lit _val)
+                                                     2 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return (Argument_xref _val)
+                                                     _ -> do Thrift.parseSkip _proxy _type
+                                                               Prelude.Nothing
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return Argument_EMPTY
+           Thrift.FieldEnd -> Prelude.return Argument_EMPTY
+    where
+      _idMap = HashMap.fromList [("lit", 1), ("xref", 2)]
+
+instance DeepSeq.NFData Argument where
+  rnf (Argument_lit __lit) = DeepSeq.rnf __lit
+  rnf (Argument_xref __xref) = DeepSeq.rnf __xref
+  rnf Argument_EMPTY = ()
+
+instance Default.Default Argument where
+  def = Argument_EMPTY
+
+instance Hashable.Hashable Argument where
+  hashWithSalt __salt (Argument_lit _lit)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 1 _lit)
+  hashWithSalt __salt (Argument_xref _xref)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 2 _xref)
+  hashWithSalt __salt Argument_EMPTY
+    = Hashable.hashWithSalt __salt (0 :: Prelude.Int)
+
+data CallArgument = CallArgument{callArgument_span ::
+                                 Glean.Schema.Src.RelByteSpan,
+                                 callArgument_argument :: Prelude.Maybe Argument}
+                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON CallArgument where
+  toJSON (CallArgument __field__span __field__argument)
+    = Aeson.object
+        ("span" .= __field__span :
+           Prelude.maybe Prelude.id ((:) . ("argument" .=)) __field__argument
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct CallArgument where
+  buildStruct _proxy (CallArgument __field__span __field__argument)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "span" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__span)
+           :
+           case __field__argument of
+             Prelude.Just _val -> Thrift.genField _proxy "argument"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__span <- ST.newSTRef Default.def
+            __field__argument <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__span
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__argument
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__span <- ST.readSTRef __field__span
+                                             !__val__argument <- ST.readSTRef __field__argument
+                                             Prelude.pure (CallArgument __val__span __val__argument)
+              _idMap = HashMap.fromList [("span", 1), ("argument", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData CallArgument where
+  rnf (CallArgument __field__span __field__argument)
+    = DeepSeq.rnf __field__span `Prelude.seq`
+        DeepSeq.rnf __field__argument `Prelude.seq` ()
+
+instance Default.Default CallArgument where
+  def = CallArgument Default.def Prelude.Nothing
+
+instance Hashable.Hashable CallArgument where
+  hashWithSalt __salt (CallArgument _span _argument)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _span)
+        _argument
+
+data FileCall_key = FileCall_key{fileCall_key_file ::
+                                 Glean.Schema.Src.File,
+                                 fileCall_key_callee_span :: Glean.Schema.Src.ByteSpan,
+                                 fileCall_key_call_args :: [CallArgument],
+                                 fileCall_key_callee_xref :: Prelude.Maybe XRefTarget,
+                                 fileCall_key_dispatch_arg :: Prelude.Maybe CallArgument,
+                                 fileCall_key_receiver_type :: Prelude.Maybe Declaration,
+                                 fileCall_key_callee_xrefs :: [XRefTarget]}
+                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FileCall_key where
+  toJSON
+    (FileCall_key __field__file __field__callee_span __field__call_args
+       __field__callee_xref __field__dispatch_arg __field__receiver_type
+       __field__callee_xrefs)
+    = Aeson.object
+        ("file" .= __field__file :
+           "callee_span" .= __field__callee_span :
+             "call_args" .= __field__call_args :
+               Prelude.maybe Prelude.id ((:) . ("callee_xref" .=))
+                 __field__callee_xref
+                 (Prelude.maybe Prelude.id ((:) . ("dispatch_arg" .=))
+                    __field__dispatch_arg
+                    (Prelude.maybe Prelude.id ((:) . ("receiver_type" .=))
+                       __field__receiver_type
+                       ("callee_xrefs" .= __field__callee_xrefs : Prelude.mempty))))
+
+instance Thrift.ThriftStruct FileCall_key where
+  buildStruct _proxy
+    (FileCall_key __field__file __field__callee_span __field__call_args
+       __field__callee_xref __field__dispatch_arg __field__receiver_type
+       __field__callee_xrefs)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__file)
+           :
+           Thrift.genField _proxy "callee_span" (Thrift.getStructType _proxy)
+             2
+             1
+             (Thrift.buildStruct _proxy __field__callee_span)
+             :
+             Thrift.genField _proxy "call_args" (Thrift.getListType _proxy) 3 2
+               (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                  (Thrift.buildStruct _proxy)
+                  __field__call_args)
+               :
+               let (__cereal__callee_xref, __id__callee_xref)
+                     = case __field__callee_xref of
+                         Prelude.Just _val -> ((:)
+                                                 (Thrift.genField _proxy "callee_xref"
+                                                    (Thrift.getStructType _proxy)
+                                                    4
+                                                    3
+                                                    (Thrift.buildStruct _proxy _val)),
+                                               4)
+                         Prelude.Nothing -> (Prelude.id, 3)
+                 in
+                 __cereal__callee_xref
+                   (let (__cereal__dispatch_arg, __id__dispatch_arg)
+                          = case __field__dispatch_arg of
+                              Prelude.Just _val -> ((:)
+                                                      (Thrift.genField _proxy "dispatch_arg"
+                                                         (Thrift.getStructType _proxy)
+                                                         5
+                                                         __id__callee_xref
+                                                         (Thrift.buildStruct _proxy _val)),
+                                                    5)
+                              Prelude.Nothing -> (Prelude.id, __id__callee_xref)
+                      in
+                      __cereal__dispatch_arg
+                        (let (__cereal__receiver_type, __id__receiver_type)
+                               = case __field__receiver_type of
+                                   Prelude.Just _val -> ((:)
+                                                           (Thrift.genField _proxy "receiver_type"
+                                                              (Thrift.getStructType _proxy)
+                                                              6
+                                                              __id__dispatch_arg
+                                                              (Thrift.buildStruct _proxy _val)),
+                                                         6)
+                                   Prelude.Nothing -> (Prelude.id, __id__dispatch_arg)
+                           in
+                           __cereal__receiver_type
+                             (Thrift.genField _proxy "callee_xrefs" (Thrift.getListType _proxy)
+                                7
+                                __id__receiver_type
+                                (Thrift.genList _proxy (Thrift.getStructType _proxy)
+                                   (Thrift.buildStruct _proxy)
+                                   __field__callee_xrefs)
+                                : []))))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__file <- ST.newSTRef Default.def
+            __field__callee_span <- ST.newSTRef Default.def
+            __field__call_args <- ST.newSTRef Default.def
+            __field__callee_xref <- ST.newSTRef Prelude.Nothing
+            __field__dispatch_arg <- ST.newSTRef Prelude.Nothing
+            __field__receiver_type <- ST.newSTRef Prelude.Nothing
+            __field__callee_xrefs <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__file
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__callee_span
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__call_args
+                                                                          _val
+                                                                 4 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__callee_xref
+                                                                          (Prelude.Just _val)
+                                                                 5 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__dispatch_arg
+                                                                          (Prelude.Just _val)
+                                                                 6 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__receiver_type
+                                                                          (Prelude.Just _val)
+                                                                 7 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseStruct
+                                                                                           _proxy))
+                                                                        ST.writeSTRef
+                                                                          __field__callee_xrefs
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__file <- ST.readSTRef __field__file
+                                             !__val__callee_span <- ST.readSTRef
+                                                                      __field__callee_span
+                                             !__val__call_args <- ST.readSTRef __field__call_args
+                                             !__val__callee_xref <- ST.readSTRef
+                                                                      __field__callee_xref
+                                             !__val__dispatch_arg <- ST.readSTRef
+                                                                       __field__dispatch_arg
+                                             !__val__receiver_type <- ST.readSTRef
+                                                                        __field__receiver_type
+                                             !__val__callee_xrefs <- ST.readSTRef
+                                                                       __field__callee_xrefs
+                                             Prelude.pure
+                                               (FileCall_key __val__file __val__callee_span
+                                                  __val__call_args
+                                                  __val__callee_xref
+                                                  __val__dispatch_arg
+                                                  __val__receiver_type
+                                                  __val__callee_xrefs)
+              _idMap
+                = HashMap.fromList
+                    [("file", 1), ("callee_span", 2), ("call_args", 3),
+                     ("callee_xref", 4), ("dispatch_arg", 5), ("receiver_type", 6),
+                     ("callee_xrefs", 7)]
+            _parse 0)
+
+instance DeepSeq.NFData FileCall_key where
+  rnf
+    (FileCall_key __field__file __field__callee_span __field__call_args
+       __field__callee_xref __field__dispatch_arg __field__receiver_type
+       __field__callee_xrefs)
+    = DeepSeq.rnf __field__file `Prelude.seq`
+        DeepSeq.rnf __field__callee_span `Prelude.seq`
+          DeepSeq.rnf __field__call_args `Prelude.seq`
+            DeepSeq.rnf __field__callee_xref `Prelude.seq`
+              DeepSeq.rnf __field__dispatch_arg `Prelude.seq`
+                DeepSeq.rnf __field__receiver_type `Prelude.seq`
+                  DeepSeq.rnf __field__callee_xrefs `Prelude.seq` ()
+
+instance Default.Default FileCall_key where
+  def
+    = FileCall_key Default.def Default.def Default.def Prelude.Nothing
+        Prelude.Nothing
+        Prelude.Nothing
+        Default.def
+
+instance Hashable.Hashable FileCall_key where
+  hashWithSalt __salt
+    (FileCall_key _file _callee_span _call_args _callee_xref
+       _dispatch_arg _receiver_type _callee_xrefs)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt
+              (Hashable.hashWithSalt
+                 (Hashable.hashWithSalt
+                    (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _file)
+                       _callee_span)
+                    _call_args)
+                 _callee_xref)
+              _dispatch_arg)
+           _receiver_type)
+        _callee_xrefs
+{-# LINE 19 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.TargetUsesAbs_key where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.TargetUsesAbs_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.TargetUsesAbs_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.TargetUsesAbs_key" (Prelude.Just 0))
+{-# LINE 30 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.TargetUsesAbs_key =
+     'Angle.TField "target" (Glean.Schema.Hack.Types.XRefTarget)
+       ('Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
+          ('Angle.TField "uses" ([Glean.Schema.Src.Types.ByteSpan])
+             ('Angle.TNoFields)))
+{-# LINE 32 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.TargetUsesAbs
+         where
+  type KeyType Glean.Schema.Hack.Types.TargetUsesAbs =
+       Glean.Schema.Hack.Types.TargetUsesAbs_key
+  getName _proxy = Glean.PredicateRef "hack.TargetUsesAbs" 6
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Hack.Types.targetUsesAbs_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.TargetUsesAbs x k
+  getFactKey = Glean.Schema.Hack.Types.targetUsesAbs_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 41 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.TargetUsesAbs where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 47 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.ClassConstDeclaration_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.ClassConstDeclaration_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.ClassConstDeclaration_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.ClassConstDeclaration_key" (Prelude.Just 0))
+{-# LINE 56 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.Hack.Types.ClassConstDeclaration_key
+     =
+     'Angle.TField "name" (Glean.KeyType Glean.Schema.Hack.Types.Name)
+       ('Angle.TField "container"
+          (Glean.Schema.Hack.Types.ContainerDeclaration)
+          ('Angle.TNoFields))
+{-# LINE 58 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Hack.Types.ClassConstDeclaration
+         where
+  type KeyType Glean.Schema.Hack.Types.ClassConstDeclaration =
+       Glean.Schema.Hack.Types.ClassConstDeclaration_key
+  getName _proxy = Glean.PredicateRef "hack.ClassConstDeclaration" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.classConstDeclaration_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.ClassConstDeclaration x k
+  getFactKey = Glean.Schema.Hack.Types.classConstDeclaration_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 67 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.ClassConstDeclaration
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 73 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Hack.Types.FileHasRedundantPackageOverride
+         where
+  type KeyType
+         Glean.Schema.Hack.Types.FileHasRedundantPackageOverride
+       = Glean.Schema.Src.Types.File
+  getName _proxy
+    = Glean.PredicateRef "hack.FileHasRedundantPackageOverride" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.Hack.Types.fileHasRedundantPackageOverride_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.FileHasRedundantPackageOverride x k
+  getFactKey
+    = Glean.Schema.Hack.Types.fileHasRedundantPackageOverride_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 82 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.FileHasRedundantPackageOverride
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 88 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.NamespaceQName_key
+         where
+  buildRtsValue b (Glean.Schema.Hack.Types.NamespaceQName_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.NamespaceQName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.NamespaceQName_key" (Prelude.Just 0))
+{-# LINE 97 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.NamespaceQName_key =
+     'Angle.TField "name" (Glean.KeyType Glean.Schema.Hack.Types.Name)
+       ('Angle.TField "parent"
+          (Prelude.Maybe Glean.Schema.Hack.Types.NamespaceQName)
+          ('Angle.TNoFields))
+{-# LINE 99 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.NamespaceQName
+         where
+  type KeyType Glean.Schema.Hack.Types.NamespaceQName =
+       Glean.Schema.Hack.Types.NamespaceQName_key
+  getName _proxy = Glean.PredicateRef "hack.NamespaceQName" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.namespaceQName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.NamespaceQName x k
+  getFactKey = Glean.Schema.Hack.Types.namespaceQName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 108 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.NamespaceQName where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 114 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Hack.Types.FileHasPackageOverride
+         where
+  type KeyType Glean.Schema.Hack.Types.FileHasPackageOverride =
+       Glean.Schema.Src.Types.File
+  getName _proxy = Glean.PredicateRef "hack.FileHasPackageOverride" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.fileHasPackageOverride_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.FileHasPackageOverride x k
+  getFactKey = Glean.Schema.Hack.Types.fileHasPackageOverride_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 123 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.FileHasPackageOverride
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 129 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.TypedefDefinition_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.TypedefDefinition_key x1 x2 x3 x4 x5)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+         Glean.buildRtsValue b x5
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.TypedefDefinition_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.TypedefDefinition_key" (Prelude.Just 0))
+{-# LINE 144 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.TypedefDefinition_key =
+     'Angle.TField "declaration"
+       (Glean.KeyType Glean.Schema.Hack.Types.TypedefDeclaration)
+       ('Angle.TField "isTransparent" (Prelude.Bool)
+          ('Angle.TField "attributes"
+             ([Glean.Schema.Hack.Types.UserAttribute])
+             ('Angle.TField "typeParams"
+                ([Glean.Schema.Hack.Types.TypeParameter])
+                ('Angle.TField "module_"
+                   (Prelude.Maybe Glean.Schema.Hack.Types.ModuleMembership)
+                   ('Angle.TNoFields)))))
+{-# LINE 146 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.TypedefDefinition
+         where
+  type KeyType Glean.Schema.Hack.Types.TypedefDefinition =
+       Glean.Schema.Hack.Types.TypedefDefinition_key
+  getName _proxy = Glean.PredicateRef "hack.TypedefDefinition" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.typedefDefinition_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.TypedefDefinition x k
+  getFactKey = Glean.Schema.Hack.Types.typedefDefinition_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 155 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.TypedefDefinition where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 161 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.SearchClassConstByName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.SearchClassConstByName_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.SearchClassConstByName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.SearchClassConstByName_key"
+           (Prelude.Just 0))
+{-# LINE 172 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.Hack.Types.SearchClassConstByName_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "parent"
+          (Glean.KeyType Glean.Schema.Hack.Types.QName)
+          ('Angle.TField "decl" (Glean.Schema.Hack.Types.Declaration)
+             ('Angle.TNoFields)))
+{-# LINE 174 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Hack.Types.SearchClassConstByName
+         where
+  type KeyType Glean.Schema.Hack.Types.SearchClassConstByName =
+       Glean.Schema.Hack.Types.SearchClassConstByName_key
+  getName _proxy = Glean.PredicateRef "hack.SearchClassConstByName" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.searchClassConstByName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.SearchClassConstByName x k
+  getFactKey = Glean.Schema.Hack.Types.searchClassConstByName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 183 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.SearchClassConstByName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 189 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.InterfaceDefinition_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.InterfaceDefinition_key x1 x2 x3 x4 x5 x6
+       x7)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+         Glean.buildRtsValue b x5
+         Glean.buildRtsValue b x6
+         Glean.buildRtsValue b x7
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.InterfaceDefinition_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.InterfaceDefinition_key" (Prelude.Just 0))
+{-# LINE 208 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.InterfaceDefinition_key
+     =
+     'Angle.TField "declaration"
+       (Glean.KeyType Glean.Schema.Hack.Types.InterfaceDeclaration)
+       ('Angle.TField "members" ([Glean.Schema.Hack.Types.Declaration])
+          ('Angle.TField "extends_"
+             ([Glean.Schema.Hack.Types.InterfaceDeclaration])
+             ('Angle.TField "attributes"
+                ([Glean.Schema.Hack.Types.UserAttribute])
+                ('Angle.TField "typeParams"
+                   ([Glean.Schema.Hack.Types.TypeParameter])
+                   ('Angle.TField "requireExtends"
+                      ([Glean.Schema.Hack.Types.ClassDeclaration])
+                      ('Angle.TField "module_"
+                         (Prelude.Maybe Glean.Schema.Hack.Types.ModuleMembership)
+                         ('Angle.TNoFields)))))))
+{-# LINE 210 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Hack.Types.InterfaceDefinition
+         where
+  type KeyType Glean.Schema.Hack.Types.InterfaceDefinition =
+       Glean.Schema.Hack.Types.InterfaceDefinition_key
+  getName _proxy = Glean.PredicateRef "hack.InterfaceDefinition" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.interfaceDefinition_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.InterfaceDefinition x k
+  getFactKey = Glean.Schema.Hack.Types.interfaceDefinition_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 219 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.InterfaceDefinition
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 225 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.Package_ where
+  type KeyType Glean.Schema.Hack.Types.Package_ = Data.Text.Text
+  getName _proxy = Glean.PredicateRef "hack.Package_" 6
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Hack.Types.package__id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.Package_ x k
+  getFactKey = Glean.Schema.Hack.Types.package__key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 233 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.Package_ where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 239 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.SearchGlobalConstByLowerCaseName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.SearchGlobalConstByLowerCaseName_key x1
+       x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.SearchGlobalConstByLowerCaseName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.SearchGlobalConstByLowerCaseName_key"
+           (Prelude.Just 0))
+{-# LINE 248 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.Hack.Types.SearchGlobalConstByLowerCaseName_key
+     =
+     'Angle.TField "name_lowercase" (Data.Text.Text)
+       ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields))
+{-# LINE 250 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Hack.Types.SearchGlobalConstByLowerCaseName
+         where
+  type KeyType
+         Glean.Schema.Hack.Types.SearchGlobalConstByLowerCaseName
+       = Glean.Schema.Hack.Types.SearchGlobalConstByLowerCaseName_key
+  getName _proxy
+    = Glean.PredicateRef "hack.SearchGlobalConstByLowerCaseName" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.Hack.Types.searchGlobalConstByLowerCaseName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.SearchGlobalConstByLowerCaseName x k
+  getFactKey
+    = Glean.Schema.Hack.Types.searchGlobalConstByLowerCaseName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 260 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.SearchGlobalConstByLowerCaseName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 266 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.FunctionDeclaration_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.FunctionDeclaration_key x1)
+    = do Glean.buildRtsValue b x1
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.FunctionDeclaration_key <$>
+        Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.FunctionDeclaration_key" (Prelude.Just 0))
+{-# LINE 273 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.FunctionDeclaration_key
+     =
+     'Angle.TField "name" (Glean.KeyType Glean.Schema.Hack.Types.QName)
+       ('Angle.TNoFields)
+{-# LINE 275 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Hack.Types.FunctionDeclaration
+         where
+  type KeyType Glean.Schema.Hack.Types.FunctionDeclaration =
+       Glean.Schema.Hack.Types.FunctionDeclaration_key
+  getName _proxy = Glean.PredicateRef "hack.FunctionDeclaration" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.functionDeclaration_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.FunctionDeclaration x k
+  getFactKey = Glean.Schema.Hack.Types.functionDeclaration_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 284 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.FunctionDeclaration
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 290 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.SearchTraitByLowerCaseName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.SearchTraitByLowerCaseName_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.SearchTraitByLowerCaseName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.SearchTraitByLowerCaseName_key"
+           (Prelude.Just 0))
+{-# LINE 299 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.Hack.Types.SearchTraitByLowerCaseName_key
+     =
+     'Angle.TField "name_lowercase" (Data.Text.Text)
+       ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields))
+{-# LINE 301 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Hack.Types.SearchTraitByLowerCaseName
+         where
+  type KeyType Glean.Schema.Hack.Types.SearchTraitByLowerCaseName =
+       Glean.Schema.Hack.Types.SearchTraitByLowerCaseName_key
+  getName _proxy
+    = Glean.PredicateRef "hack.SearchTraitByLowerCaseName" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.searchTraitByLowerCaseName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.SearchTraitByLowerCaseName x k
+  getFactKey = Glean.Schema.Hack.Types.searchTraitByLowerCaseName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 310 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.SearchTraitByLowerCaseName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 316 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.EnumDefinition_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.EnumDefinition_key x1 x2 x3 x4 x5 x6 x7 x8
+       x9 x10)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+         Glean.buildRtsValue b x5
+         Glean.buildRtsValue b x6
+         Glean.buildRtsValue b x7
+         Glean.buildRtsValue b x8
+         Glean.buildRtsValue b x9
+         Glean.buildRtsValue b x10
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.EnumDefinition_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.EnumDefinition_key" (Prelude.Just 0))
+{-# LINE 341 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.EnumDefinition_key =
+     'Angle.TField "declaration"
+       (Glean.KeyType Glean.Schema.Hack.Types.EnumDeclaration)
+       ('Angle.TField "enumBase"
+          (Glean.KeyType Glean.Schema.Hack.Types.Type)
+          ('Angle.TField "enumBaseTypeInfo"
+             (Prelude.Maybe Glean.Schema.Hack.Types.TypeInfo)
+             ('Angle.TField "enumConstraint"
+                (Prelude.Maybe Glean.Schema.Hack.Types.Type)
+                ('Angle.TField "enumConstraintTypeInfo"
+                   (Prelude.Maybe Glean.Schema.Hack.Types.TypeInfo)
+                   ('Angle.TField "enumerators" ([Glean.Schema.Hack.Types.Enumerator])
+                      ('Angle.TField "attributes"
+                         ([Glean.Schema.Hack.Types.UserAttribute])
+                         ('Angle.TField "includes"
+                            ([Glean.Schema.Hack.Types.EnumDeclaration])
+                            ('Angle.TField "isEnumClass" (Prelude.Bool)
+                               ('Angle.TField "module_"
+                                  (Prelude.Maybe Glean.Schema.Hack.Types.ModuleMembership)
+                                  ('Angle.TNoFields))))))))))
+{-# LINE 343 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.EnumDefinition
+         where
+  type KeyType Glean.Schema.Hack.Types.EnumDefinition =
+       Glean.Schema.Hack.Types.EnumDefinition_key
+  getName _proxy = Glean.PredicateRef "hack.EnumDefinition" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.enumDefinition_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.EnumDefinition x k
+  getFactKey = Glean.Schema.Hack.Types.enumDefinition_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 352 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.EnumDefinition where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 358 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.SearchEnumeratorByLowerCaseName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.SearchEnumeratorByLowerCaseName_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.SearchEnumeratorByLowerCaseName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.SearchEnumeratorByLowerCaseName_key"
+           (Prelude.Just 0))
+{-# LINE 367 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.Hack.Types.SearchEnumeratorByLowerCaseName_key
+     =
+     'Angle.TField "name_lowercase" (Data.Text.Text)
+       ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields))
+{-# LINE 369 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Hack.Types.SearchEnumeratorByLowerCaseName
+         where
+  type KeyType
+         Glean.Schema.Hack.Types.SearchEnumeratorByLowerCaseName
+       = Glean.Schema.Hack.Types.SearchEnumeratorByLowerCaseName_key
+  getName _proxy
+    = Glean.PredicateRef "hack.SearchEnumeratorByLowerCaseName" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.Hack.Types.searchEnumeratorByLowerCaseName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.SearchEnumeratorByLowerCaseName x k
+  getFactKey
+    = Glean.Schema.Hack.Types.searchEnumeratorByLowerCaseName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 378 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.SearchEnumeratorByLowerCaseName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 384 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.SearchMethodByName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.SearchMethodByName_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.SearchMethodByName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.SearchMethodByName_key" (Prelude.Just 0))
+{-# LINE 395 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.SearchMethodByName_key =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "parent"
+          (Glean.KeyType Glean.Schema.Hack.Types.QName)
+          ('Angle.TField "decl" (Glean.Schema.Hack.Types.Declaration)
+             ('Angle.TNoFields)))
+{-# LINE 397 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.SearchMethodByName
+         where
+  type KeyType Glean.Schema.Hack.Types.SearchMethodByName =
+       Glean.Schema.Hack.Types.SearchMethodByName_key
+  getName _proxy = Glean.PredicateRef "hack.SearchMethodByName" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.searchMethodByName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.SearchMethodByName x k
+  getFactKey = Glean.Schema.Hack.Types.searchMethodByName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 406 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.SearchMethodByName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 412 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.FileDeclarations_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.FileDeclarations_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.FileDeclarations_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.FileDeclarations_key" (Prelude.Just 0))
+{-# LINE 421 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.FileDeclarations_key =
+     'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
+       ('Angle.TField "declarations"
+          ([Glean.Schema.Hack.Types.Declaration])
+          ('Angle.TNoFields))
+{-# LINE 423 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.FileDeclarations
+         where
+  type KeyType Glean.Schema.Hack.Types.FileDeclarations =
+       Glean.Schema.Hack.Types.FileDeclarations_key
+  getName _proxy = Glean.PredicateRef "hack.FileDeclarations" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.fileDeclarations_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.FileDeclarations x k
+  getFactKey = Glean.Schema.Hack.Types.fileDeclarations_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 432 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.FileDeclarations where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 438 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.MethodDefinition_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.MethodDefinition_key x1 x2 x3 x4 x5 x6 x7
+       x8 x9 x10 x11)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+         Glean.buildRtsValue b x5
+         Glean.buildRtsValue b x6
+         Glean.buildRtsValue b x7
+         Glean.buildRtsValue b x8
+         Glean.buildRtsValue b x9
+         Glean.buildRtsValue b x10
+         Glean.buildRtsValue b x11
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.MethodDefinition_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.MethodDefinition_key" (Prelude.Just 0))
+{-# LINE 465 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.MethodDefinition_key =
+     'Angle.TField "declaration"
+       (Glean.KeyType Glean.Schema.Hack.Types.MethodDeclaration)
+       ('Angle.TField "signature"
+          (Glean.KeyType Glean.Schema.Hack.Types.Signature)
+          ('Angle.TField "visibility" (Glean.Schema.Hack.Types.Visibility)
+             ('Angle.TField "isAbstract" (Prelude.Bool)
+                ('Angle.TField "isAsync" (Prelude.Bool)
+                   ('Angle.TField "isFinal" (Prelude.Bool)
+                      ('Angle.TField "isStatic" (Prelude.Bool)
+                         ('Angle.TField "attributes"
+                            ([Glean.Schema.Hack.Types.UserAttribute])
+                            ('Angle.TField "typeParams"
+                               ([Glean.Schema.Hack.Types.TypeParameter])
+                               ('Angle.TField "isReadonlyThis" (Prelude.Maybe Prelude.Bool)
+                                  ('Angle.TField "readonlyRet"
+                                     (Prelude.Maybe Glean.Schema.Hack.Types.ReadonlyKind)
+                                     ('Angle.TNoFields)))))))))))
+{-# LINE 467 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.MethodDefinition
+         where
+  type KeyType Glean.Schema.Hack.Types.MethodDefinition =
+       Glean.Schema.Hack.Types.MethodDefinition_key
+  getName _proxy = Glean.PredicateRef "hack.MethodDefinition" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.methodDefinition_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.MethodDefinition x k
+  getFactKey = Glean.Schema.Hack.Types.methodDefinition_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 476 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.MethodDefinition where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 482 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.InterfaceDeclaration_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.InterfaceDeclaration_key x1)
+    = do Glean.buildRtsValue b x1
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.InterfaceDeclaration_key <$>
+        Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.InterfaceDeclaration_key" (Prelude.Just 0))
+{-# LINE 489 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.InterfaceDeclaration_key
+     =
+     'Angle.TField "name" (Glean.KeyType Glean.Schema.Hack.Types.QName)
+       ('Angle.TNoFields)
+{-# LINE 491 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Hack.Types.InterfaceDeclaration
+         where
+  type KeyType Glean.Schema.Hack.Types.InterfaceDeclaration =
+       Glean.Schema.Hack.Types.InterfaceDeclaration_key
+  getName _proxy = Glean.PredicateRef "hack.InterfaceDeclaration" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.interfaceDeclaration_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.InterfaceDeclaration x k
+  getFactKey = Glean.Schema.Hack.Types.interfaceDeclaration_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 500 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.InterfaceDeclaration
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 506 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.SearchEnumByName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.SearchEnumByName_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.SearchEnumByName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.SearchEnumByName_key" (Prelude.Just 0))
+{-# LINE 517 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.SearchEnumByName_key =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "parent"
+          (Prelude.Maybe Glean.Schema.Hack.Types.NamespaceQName)
+          ('Angle.TField "decl" (Glean.Schema.Hack.Types.Declaration)
+             ('Angle.TNoFields)))
+{-# LINE 519 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.SearchEnumByName
+         where
+  type KeyType Glean.Schema.Hack.Types.SearchEnumByName =
+       Glean.Schema.Hack.Types.SearchEnumByName_key
+  getName _proxy = Glean.PredicateRef "hack.SearchEnumByName" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.searchEnumByName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.SearchEnumByName x k
+  getFactKey = Glean.Schema.Hack.Types.searchEnumByName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 528 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.SearchEnumByName where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 534 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.MethodOverrides_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.MethodOverrides_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.MethodOverrides_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.MethodOverrides_key" (Prelude.Just 0))
+{-# LINE 545 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.MethodOverrides_key =
+     'Angle.TField "derived"
+       (Glean.KeyType Glean.Schema.Hack.Types.MethodDeclaration)
+       ('Angle.TField "base"
+          (Glean.KeyType Glean.Schema.Hack.Types.MethodDeclaration)
+          ('Angle.TField "annotation" (Prelude.Maybe Prelude.Bool)
+             ('Angle.TNoFields)))
+{-# LINE 547 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.MethodOverrides
+         where
+  type KeyType Glean.Schema.Hack.Types.MethodOverrides =
+       Glean.Schema.Hack.Types.MethodOverrides_key
+  getName _proxy = Glean.PredicateRef "hack.MethodOverrides" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.methodOverrides_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.MethodOverrides x k
+  getFactKey = Glean.Schema.Hack.Types.methodOverrides_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 556 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.MethodOverrides where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 562 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.Signature_key where
+  buildRtsValue b (Glean.Schema.Hack.Types.Signature_key x1 x2 x3 x4)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.Signature_key <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.Signature_key" (Prelude.Just 0))
+{-# LINE 575 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.Signature_key =
+     'Angle.TField "returns"
+       (Prelude.Maybe Glean.Schema.Hack.Types.Type)
+       ('Angle.TField "parameters" ([Glean.Schema.Hack.Types.Parameter])
+          ('Angle.TField "contexts"
+             (Prelude.Maybe [Glean.Schema.Hack.Types.Context_])
+             ('Angle.TField "returnsTypeInfo"
+                (Prelude.Maybe Glean.Schema.Hack.Types.TypeInfo)
+                ('Angle.TNoFields))))
+{-# LINE 577 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.Signature where
+  type KeyType Glean.Schema.Hack.Types.Signature =
+       Glean.Schema.Hack.Types.Signature_key
+  getName _proxy = Glean.PredicateRef "hack.Signature" 6
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Hack.Types.signature_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.Signature x k
+  getFactKey = Glean.Schema.Hack.Types.signature_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 586 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.Signature where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 592 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.TraitDefinition_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.TraitDefinition_key x1 x2 x3 x4 x5 x6 x7
+       x8 x9 x10 x11)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+         Glean.buildRtsValue b x5
+         Glean.buildRtsValue b x6
+         Glean.buildRtsValue b x7
+         Glean.buildRtsValue b x8
+         Glean.buildRtsValue b x9
+         Glean.buildRtsValue b x10
+         Glean.buildRtsValue b x11
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.TraitDefinition_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.TraitDefinition_key" (Prelude.Just 0))
+{-# LINE 619 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.TraitDefinition_key =
+     'Angle.TField "declaration"
+       (Glean.KeyType Glean.Schema.Hack.Types.TraitDeclaration)
+       ('Angle.TField "members" ([Glean.Schema.Hack.Types.Declaration])
+          ('Angle.TField "implements_"
+             ([Glean.Schema.Hack.Types.InterfaceDeclaration])
+             ('Angle.TField "uses" ([Glean.Schema.Hack.Types.TraitDeclaration])
+                ('Angle.TField "attributes"
+                   ([Glean.Schema.Hack.Types.UserAttribute])
+                   ('Angle.TField "typeParams"
+                      ([Glean.Schema.Hack.Types.TypeParameter])
+                      ('Angle.TField "requireExtends"
+                         ([Glean.Schema.Hack.Types.ClassDeclaration])
+                         ('Angle.TField "requireImplements"
+                            ([Glean.Schema.Hack.Types.InterfaceDeclaration])
+                            ('Angle.TField "module_"
+                               (Prelude.Maybe Glean.Schema.Hack.Types.ModuleMembership)
+                               ('Angle.TField "requireClass"
+                                  (Prelude.Maybe [Glean.Schema.Hack.Types.ClassDeclaration])
+                                  ('Angle.TField "requireThisAs"
+                                     ([Glean.Schema.Hack.Types.ClassDeclaration])
+                                     ('Angle.TNoFields)))))))))))
+{-# LINE 621 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.TraitDefinition
+         where
+  type KeyType Glean.Schema.Hack.Types.TraitDefinition =
+       Glean.Schema.Hack.Types.TraitDefinition_key
+  getName _proxy = Glean.PredicateRef "hack.TraitDefinition" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.traitDefinition_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.TraitDefinition x k
+  getFactKey = Glean.Schema.Hack.Types.traitDefinition_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 630 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.TraitDefinition where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 636 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.TargetUses_key where
+  buildRtsValue b (Glean.Schema.Hack.Types.TargetUses_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.TargetUses_key <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.TargetUses_key" (Prelude.Just 0))
+{-# LINE 647 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.TargetUses_key =
+     'Angle.TField "target" (Glean.Schema.Hack.Types.XRefTarget)
+       ('Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
+          ('Angle.TField "uses" ([Glean.Schema.Src.Types.RelByteSpan])
+             ('Angle.TNoFields)))
+{-# LINE 649 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.TargetUses where
+  type KeyType Glean.Schema.Hack.Types.TargetUses =
+       Glean.Schema.Hack.Types.TargetUses_key
+  getName _proxy = Glean.PredicateRef "hack.TargetUses" 6
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Hack.Types.targetUses_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.TargetUses x k
+  getFactKey = Glean.Schema.Hack.Types.targetUses_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 658 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.TargetUses where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 664 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.SearchClassByName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.SearchClassByName_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.SearchClassByName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.SearchClassByName_key" (Prelude.Just 0))
+{-# LINE 675 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.SearchClassByName_key =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "parent"
+          (Prelude.Maybe Glean.Schema.Hack.Types.NamespaceQName)
+          ('Angle.TField "decl" (Glean.Schema.Hack.Types.Declaration)
+             ('Angle.TNoFields)))
+{-# LINE 677 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.SearchClassByName
+         where
+  type KeyType Glean.Schema.Hack.Types.SearchClassByName =
+       Glean.Schema.Hack.Types.SearchClassByName_key
+  getName _proxy = Glean.PredicateRef "hack.SearchClassByName" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.searchClassByName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.SearchClassByName x k
+  getFactKey = Glean.Schema.Hack.Types.searchClassByName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 686 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.SearchClassByName where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 692 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.SearchInterfaceByLowerCaseName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.SearchInterfaceByLowerCaseName_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.SearchInterfaceByLowerCaseName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.SearchInterfaceByLowerCaseName_key"
+           (Prelude.Just 0))
+{-# LINE 701 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.Hack.Types.SearchInterfaceByLowerCaseName_key
+     =
+     'Angle.TField "name_lowercase" (Data.Text.Text)
+       ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields))
+{-# LINE 703 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Hack.Types.SearchInterfaceByLowerCaseName
+         where
+  type KeyType Glean.Schema.Hack.Types.SearchInterfaceByLowerCaseName
+       = Glean.Schema.Hack.Types.SearchInterfaceByLowerCaseName_key
+  getName _proxy
+    = Glean.PredicateRef "hack.SearchInterfaceByLowerCaseName" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.Hack.Types.searchInterfaceByLowerCaseName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.SearchInterfaceByLowerCaseName x k
+  getFactKey
+    = Glean.Schema.Hack.Types.searchInterfaceByLowerCaseName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 712 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.SearchInterfaceByLowerCaseName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 718 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.SearchFunctionByName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.SearchFunctionByName_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.SearchFunctionByName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.SearchFunctionByName_key" (Prelude.Just 0))
+{-# LINE 729 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.SearchFunctionByName_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "parent"
+          (Prelude.Maybe Glean.Schema.Hack.Types.NamespaceQName)
+          ('Angle.TField "decl" (Glean.Schema.Hack.Types.Declaration)
+             ('Angle.TNoFields)))
+{-# LINE 731 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Hack.Types.SearchFunctionByName
+         where
+  type KeyType Glean.Schema.Hack.Types.SearchFunctionByName =
+       Glean.Schema.Hack.Types.SearchFunctionByName_key
+  getName _proxy = Glean.PredicateRef "hack.SearchFunctionByName" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.searchFunctionByName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.SearchFunctionByName x k
+  getFactKey = Glean.Schema.Hack.Types.searchFunctionByName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 740 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.SearchFunctionByName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 746 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.ClassDefinition_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.ClassDefinition_key x1 x2 x3 x4 x5 x6 x7
+       x8 x9 x10)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+         Glean.buildRtsValue b x5
+         Glean.buildRtsValue b x6
+         Glean.buildRtsValue b x7
+         Glean.buildRtsValue b x8
+         Glean.buildRtsValue b x9
+         Glean.buildRtsValue b x10
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.ClassDefinition_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.ClassDefinition_key" (Prelude.Just 0))
+{-# LINE 771 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.ClassDefinition_key =
+     'Angle.TField "declaration"
+       (Glean.KeyType Glean.Schema.Hack.Types.ClassDeclaration)
+       ('Angle.TField "isAbstract" (Prelude.Bool)
+          ('Angle.TField "isFinal" (Prelude.Bool)
+             ('Angle.TField "members" ([Glean.Schema.Hack.Types.Declaration])
+                ('Angle.TField "extends_"
+                   (Prelude.Maybe Glean.Schema.Hack.Types.ClassDeclaration)
+                   ('Angle.TField "implements_"
+                      ([Glean.Schema.Hack.Types.InterfaceDeclaration])
+                      ('Angle.TField "uses" ([Glean.Schema.Hack.Types.TraitDeclaration])
+                         ('Angle.TField "attributes"
+                            ([Glean.Schema.Hack.Types.UserAttribute])
+                            ('Angle.TField "typeParams"
+                               ([Glean.Schema.Hack.Types.TypeParameter])
+                               ('Angle.TField "module_"
+                                  (Prelude.Maybe Glean.Schema.Hack.Types.ModuleMembership)
+                                  ('Angle.TNoFields))))))))))
+{-# LINE 773 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.ClassDefinition
+         where
+  type KeyType Glean.Schema.Hack.Types.ClassDefinition =
+       Glean.Schema.Hack.Types.ClassDefinition_key
+  getName _proxy = Glean.PredicateRef "hack.ClassDefinition" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.classDefinition_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.ClassDefinition x k
+  getFactKey = Glean.Schema.Hack.Types.classDefinition_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 782 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.ClassDefinition where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 788 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.NamespaceDeclaration_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.NamespaceDeclaration_key x1)
+    = do Glean.buildRtsValue b x1
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.NamespaceDeclaration_key <$>
+        Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.NamespaceDeclaration_key" (Prelude.Just 0))
+{-# LINE 795 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.NamespaceDeclaration_key
+     =
+     'Angle.TField "name"
+       (Glean.KeyType Glean.Schema.Hack.Types.NamespaceQName)
+       ('Angle.TNoFields)
+{-# LINE 797 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Hack.Types.NamespaceDeclaration
+         where
+  type KeyType Glean.Schema.Hack.Types.NamespaceDeclaration =
+       Glean.Schema.Hack.Types.NamespaceDeclaration_key
+  getName _proxy = Glean.PredicateRef "hack.NamespaceDeclaration" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.namespaceDeclaration_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.NamespaceDeclaration x k
+  getFactKey = Glean.Schema.Hack.Types.namespaceDeclaration_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 806 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.NamespaceDeclaration
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 812 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.Enumerator_key where
+  buildRtsValue b (Glean.Schema.Hack.Types.Enumerator_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.Enumerator_key <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.Enumerator_key" (Prelude.Just 0))
+{-# LINE 821 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.Enumerator_key =
+     'Angle.TField "name" (Glean.KeyType Glean.Schema.Hack.Types.Name)
+       ('Angle.TField "enumeration"
+          (Glean.KeyType Glean.Schema.Hack.Types.EnumDeclaration)
+          ('Angle.TNoFields))
+{-# LINE 823 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.Enumerator where
+  type KeyType Glean.Schema.Hack.Types.Enumerator =
+       Glean.Schema.Hack.Types.Enumerator_key
+  getName _proxy = Glean.PredicateRef "hack.Enumerator" 6
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Hack.Types.enumerator_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.Enumerator x k
+  getFactKey = Glean.Schema.Hack.Types.enumerator_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 832 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.Enumerator where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 838 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.SearchNamespaceByName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.SearchNamespaceByName_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.SearchNamespaceByName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.SearchNamespaceByName_key" (Prelude.Just 0))
+{-# LINE 849 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.Hack.Types.SearchNamespaceByName_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "parent"
+          (Prelude.Maybe Glean.Schema.Hack.Types.NamespaceQName)
+          ('Angle.TField "decl" (Glean.Schema.Hack.Types.Declaration)
+             ('Angle.TNoFields)))
+{-# LINE 851 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Hack.Types.SearchNamespaceByName
+         where
+  type KeyType Glean.Schema.Hack.Types.SearchNamespaceByName =
+       Glean.Schema.Hack.Types.SearchNamespaceByName_key
+  getName _proxy = Glean.PredicateRef "hack.SearchNamespaceByName" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.searchNamespaceByName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.SearchNamespaceByName x k
+  getFactKey = Glean.Schema.Hack.Types.searchNamespaceByName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 860 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.SearchNamespaceByName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 866 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.NameLowerCase_key where
+  buildRtsValue b (Glean.Schema.Hack.Types.NameLowerCase_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.NameLowerCase_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.NameLowerCase_key" (Prelude.Just 0))
+{-# LINE 875 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.NameLowerCase_key =
+     'Angle.TField "nameLowercase" (Data.Text.Text)
+       ('Angle.TField "name" (Glean.KeyType Glean.Schema.Hack.Types.Name)
+          ('Angle.TNoFields))
+{-# LINE 877 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.NameLowerCase
+         where
+  type KeyType Glean.Schema.Hack.Types.NameLowerCase =
+       Glean.Schema.Hack.Types.NameLowerCase_key
+  getName _proxy = Glean.PredicateRef "hack.NameLowerCase" 6
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Hack.Types.nameLowerCase_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.NameLowerCase x k
+  getFactKey = Glean.Schema.Hack.Types.nameLowerCase_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 886 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.NameLowerCase where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 892 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.StringLiteral
+         where
+  type KeyType Glean.Schema.Hack.Types.StringLiteral = Data.Text.Text
+  getName _proxy = Glean.PredicateRef "hack.StringLiteral" 6
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Hack.Types.stringLiteral_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.StringLiteral x k
+  getFactKey = Glean.Schema.Hack.Types.stringLiteral_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 900 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.StringLiteral where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 906 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.GlobalNamespaceAlias_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.GlobalNamespaceAlias_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.GlobalNamespaceAlias_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.GlobalNamespaceAlias_key" (Prelude.Just 0))
+{-# LINE 915 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.GlobalNamespaceAlias_key
+     =
+     'Angle.TField "from" (Glean.KeyType Glean.Schema.Hack.Types.Name)
+       ('Angle.TField "to"
+          (Glean.KeyType Glean.Schema.Hack.Types.NamespaceQName)
+          ('Angle.TNoFields))
+{-# LINE 917 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Hack.Types.GlobalNamespaceAlias
+         where
+  type KeyType Glean.Schema.Hack.Types.GlobalNamespaceAlias =
+       Glean.Schema.Hack.Types.GlobalNamespaceAlias_key
+  getName _proxy = Glean.PredicateRef "hack.GlobalNamespaceAlias" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.globalNamespaceAlias_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.GlobalNamespaceAlias x k
+  getFactKey = Glean.Schema.Hack.Types.globalNamespaceAlias_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 926 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.GlobalNamespaceAlias
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 932 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.SearchInterfaceByName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.SearchInterfaceByName_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.SearchInterfaceByName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.SearchInterfaceByName_key" (Prelude.Just 0))
+{-# LINE 943 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.Hack.Types.SearchInterfaceByName_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "parent"
+          (Prelude.Maybe Glean.Schema.Hack.Types.NamespaceQName)
+          ('Angle.TField "decl" (Glean.Schema.Hack.Types.Declaration)
+             ('Angle.TNoFields)))
+{-# LINE 945 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Hack.Types.SearchInterfaceByName
+         where
+  type KeyType Glean.Schema.Hack.Types.SearchInterfaceByName =
+       Glean.Schema.Hack.Types.SearchInterfaceByName_key
+  getName _proxy = Glean.PredicateRef "hack.SearchInterfaceByName" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.searchInterfaceByName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.SearchInterfaceByName x k
+  getFactKey = Glean.Schema.Hack.Types.searchInterfaceByName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 954 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.SearchInterfaceByName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 960 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.FilePackage_key where
+  buildRtsValue b (Glean.Schema.Hack.Types.FilePackage_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.FilePackage_key <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.FilePackage_key" (Prelude.Just 0))
+{-# LINE 971 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.FilePackage_key =
+     'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
+       ('Angle.TField "package_"
+          (Glean.KeyType Glean.Schema.Hack.Types.Package_)
+          ('Angle.TField "hasPackageOverride" (Prelude.Bool)
+             ('Angle.TNoFields)))
+{-# LINE 973 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.FilePackage where
+  type KeyType Glean.Schema.Hack.Types.FilePackage =
+       Glean.Schema.Hack.Types.FilePackage_key
+  getName _proxy = Glean.PredicateRef "hack.FilePackage" 6
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Hack.Types.filePackage_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.FilePackage x k
+  getFactKey = Glean.Schema.Hack.Types.filePackage_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 982 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.FilePackage where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 988 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.SearchClassByLowerCaseName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.SearchClassByLowerCaseName_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.SearchClassByLowerCaseName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.SearchClassByLowerCaseName_key"
+           (Prelude.Just 0))
+{-# LINE 997 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.Hack.Types.SearchClassByLowerCaseName_key
+     =
+     'Angle.TField "name_lowercase" (Data.Text.Text)
+       ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields))
+{-# LINE 999 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Hack.Types.SearchClassByLowerCaseName
+         where
+  type KeyType Glean.Schema.Hack.Types.SearchClassByLowerCaseName =
+       Glean.Schema.Hack.Types.SearchClassByLowerCaseName_key
+  getName _proxy
+    = Glean.PredicateRef "hack.SearchClassByLowerCaseName" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.searchClassByLowerCaseName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.SearchClassByLowerCaseName x k
+  getFactKey = Glean.Schema.Hack.Types.searchClassByLowerCaseName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1008 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.SearchClassByLowerCaseName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1014 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Hack.Types.ContainerDeclarationQName
+         where
+  type KeyType Glean.Schema.Hack.Types.ContainerDeclarationQName =
+       Glean.Schema.Hack.Types.ContainerDeclaration
+  type ValueType Glean.Schema.Hack.Types.ContainerDeclarationQName =
+       Glean.Schema.Hack.Types.ContainerDeclarationQName_value
+  getName _proxy
+    = Glean.PredicateRef "hack.ContainerDeclarationQName" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.containerDeclarationQName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k v
+    = Glean.Schema.Hack.Types.ContainerDeclarationQName x k v
+  getFactKey = Glean.Schema.Hack.Types.containerDeclarationQName_key
+  getFactValue
+    = Glean.Schema.Hack.Types.containerDeclarationQName_value
+{-# LINE 1025 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.ContainerDeclarationQName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1031 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.UserAttribute_key where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.UserAttribute_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.UserAttribute_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.UserAttribute_key" (Prelude.Just 0))
+{-# LINE 1042 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.UserAttribute_key =
+     'Angle.TField "name" (Glean.KeyType Glean.Schema.Hack.Types.Name)
+       ('Angle.TField "parameters" ([Data.Text.Text])
+          ('Angle.TField "qname"
+             (Prelude.Maybe Glean.Schema.Hack.Types.QName)
+             ('Angle.TNoFields)))
+{-# LINE 1044 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.UserAttribute
+         where
+  type KeyType Glean.Schema.Hack.Types.UserAttribute =
+       Glean.Schema.Hack.Types.UserAttribute_key
+  getName _proxy = Glean.PredicateRef "hack.UserAttribute" 6
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Hack.Types.userAttribute_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.UserAttribute x k
+  getFactKey = Glean.Schema.Hack.Types.userAttribute_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1053 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.UserAttribute where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1059 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.SearchPropertyByName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.SearchPropertyByName_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.SearchPropertyByName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.SearchPropertyByName_key" (Prelude.Just 0))
+{-# LINE 1070 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.SearchPropertyByName_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "parent"
+          (Glean.KeyType Glean.Schema.Hack.Types.QName)
+          ('Angle.TField "decl" (Glean.Schema.Hack.Types.Declaration)
+             ('Angle.TNoFields)))
+{-# LINE 1072 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Hack.Types.SearchPropertyByName
+         where
+  type KeyType Glean.Schema.Hack.Types.SearchPropertyByName =
+       Glean.Schema.Hack.Types.SearchPropertyByName_key
+  getName _proxy = Glean.PredicateRef "hack.SearchPropertyByName" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.searchPropertyByName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.SearchPropertyByName x k
+  getFactKey = Glean.Schema.Hack.Types.searchPropertyByName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1081 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.SearchPropertyByName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1087 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.DeclarationNamespace_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.DeclarationNamespace_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.DeclarationNamespace_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.DeclarationNamespace_key" (Prelude.Just 0))
+{-# LINE 1096 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.DeclarationNamespace_key
+     =
+     'Angle.TField "decl" (Glean.Schema.Hack.Types.Declaration)
+       ('Angle.TField "namespace_"
+          (Glean.KeyType Glean.Schema.Hack.Types.NamespaceQName)
+          ('Angle.TNoFields))
+{-# LINE 1098 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Hack.Types.DeclarationNamespace
+         where
+  type KeyType Glean.Schema.Hack.Types.DeclarationNamespace =
+       Glean.Schema.Hack.Types.DeclarationNamespace_key
+  getName _proxy = Glean.PredicateRef "hack.DeclarationNamespace" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.declarationNamespace_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.DeclarationNamespace x k
+  getFactKey = Glean.Schema.Hack.Types.declarationNamespace_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1107 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.DeclarationNamespace
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1113 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.ModuleDeclaration_key
+         where
+  buildRtsValue b (Glean.Schema.Hack.Types.ModuleDeclaration_key x1)
+    = do Glean.buildRtsValue b x1
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.ModuleDeclaration_key <$>
+        Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.ModuleDeclaration_key" (Prelude.Just 0))
+{-# LINE 1120 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.ModuleDeclaration_key =
+     'Angle.TField "name" (Glean.KeyType Glean.Schema.Hack.Types.Name)
+       ('Angle.TNoFields)
+{-# LINE 1122 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.ModuleDeclaration
+         where
+  type KeyType Glean.Schema.Hack.Types.ModuleDeclaration =
+       Glean.Schema.Hack.Types.ModuleDeclaration_key
+  getName _proxy = Glean.PredicateRef "hack.ModuleDeclaration" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.moduleDeclaration_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.ModuleDeclaration x k
+  getFactKey = Glean.Schema.Hack.Types.moduleDeclaration_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1131 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.ModuleDeclaration where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1137 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.NamespaceMember_key
+         where
+  buildRtsValue b (Glean.Schema.Hack.Types.NamespaceMember_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.NamespaceMember_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.NamespaceMember_key" (Prelude.Just 0))
+{-# LINE 1146 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.NamespaceMember_key =
+     'Angle.TField "namespace_"
+       (Glean.KeyType Glean.Schema.Hack.Types.NamespaceQName)
+       ('Angle.TField "decl" (Glean.Schema.Hack.Types.Declaration)
+          ('Angle.TNoFields))
+{-# LINE 1148 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.NamespaceMember
+         where
+  type KeyType Glean.Schema.Hack.Types.NamespaceMember =
+       Glean.Schema.Hack.Types.NamespaceMember_key
+  getName _proxy = Glean.PredicateRef "hack.NamespaceMember" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.namespaceMember_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.NamespaceMember x k
+  getFactKey = Glean.Schema.Hack.Types.namespaceMember_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1157 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.NamespaceMember where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1163 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.PropertyDefinition_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.PropertyDefinition_key x1 x2 x3 x4 x5 x6
+       x7 x8)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+         Glean.buildRtsValue b x5
+         Glean.buildRtsValue b x6
+         Glean.buildRtsValue b x7
+         Glean.buildRtsValue b x8
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.PropertyDefinition_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.PropertyDefinition_key" (Prelude.Just 0))
+{-# LINE 1184 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.PropertyDefinition_key =
+     'Angle.TField "declaration"
+       (Glean.KeyType Glean.Schema.Hack.Types.PropertyDeclaration)
+       ('Angle.TField "type" (Prelude.Maybe Glean.Schema.Hack.Types.Type)
+          ('Angle.TField "visibility" (Glean.Schema.Hack.Types.Visibility)
+             ('Angle.TField "isFinal" (Prelude.Bool)
+                ('Angle.TField "isAbstract" (Prelude.Bool)
+                   ('Angle.TField "isStatic" (Prelude.Bool)
+                      ('Angle.TField "attributes"
+                         ([Glean.Schema.Hack.Types.UserAttribute])
+                         ('Angle.TField "typeInfo"
+                            (Prelude.Maybe Glean.Schema.Hack.Types.TypeInfo)
+                            ('Angle.TNoFields))))))))
+{-# LINE 1186 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.PropertyDefinition
+         where
+  type KeyType Glean.Schema.Hack.Types.PropertyDefinition =
+       Glean.Schema.Hack.Types.PropertyDefinition_key
+  getName _proxy = Glean.PredicateRef "hack.PropertyDefinition" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.propertyDefinition_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.PropertyDefinition x k
+  getFactKey = Glean.Schema.Hack.Types.propertyDefinition_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1195 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.PropertyDefinition
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1201 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.FunctionDefinition_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.FunctionDefinition_key x1 x2 x3 x4 x5 x6
+       x7)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+         Glean.buildRtsValue b x5
+         Glean.buildRtsValue b x6
+         Glean.buildRtsValue b x7
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.FunctionDefinition_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.FunctionDefinition_key" (Prelude.Just 0))
+{-# LINE 1220 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.FunctionDefinition_key =
+     'Angle.TField "declaration"
+       (Glean.KeyType Glean.Schema.Hack.Types.FunctionDeclaration)
+       ('Angle.TField "signature"
+          (Glean.KeyType Glean.Schema.Hack.Types.Signature)
+          ('Angle.TField "isAsync" (Prelude.Bool)
+             ('Angle.TField "attributes"
+                ([Glean.Schema.Hack.Types.UserAttribute])
+                ('Angle.TField "typeParams"
+                   ([Glean.Schema.Hack.Types.TypeParameter])
+                   ('Angle.TField "module_"
+                      (Prelude.Maybe Glean.Schema.Hack.Types.ModuleMembership)
+                      ('Angle.TField "readonlyRet"
+                         (Prelude.Maybe Glean.Schema.Hack.Types.ReadonlyKind)
+                         ('Angle.TNoFields)))))))
+{-# LINE 1222 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.FunctionDefinition
+         where
+  type KeyType Glean.Schema.Hack.Types.FunctionDefinition =
+       Glean.Schema.Hack.Types.FunctionDefinition_key
+  getName _proxy = Glean.PredicateRef "hack.FunctionDefinition" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.functionDefinition_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.FunctionDefinition x k
+  getFactKey = Glean.Schema.Hack.Types.functionDefinition_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1231 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.FunctionDefinition
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1237 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.SearchPropertyByLowerCaseName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.SearchPropertyByLowerCaseName_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.SearchPropertyByLowerCaseName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.SearchPropertyByLowerCaseName_key"
+           (Prelude.Just 0))
+{-# LINE 1246 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.Hack.Types.SearchPropertyByLowerCaseName_key
+     =
+     'Angle.TField "name_lowercase" (Data.Text.Text)
+       ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields))
+{-# LINE 1248 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Hack.Types.SearchPropertyByLowerCaseName
+         where
+  type KeyType Glean.Schema.Hack.Types.SearchPropertyByLowerCaseName
+       = Glean.Schema.Hack.Types.SearchPropertyByLowerCaseName_key
+  getName _proxy
+    = Glean.PredicateRef "hack.SearchPropertyByLowerCaseName" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.Hack.Types.searchPropertyByLowerCaseName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.SearchPropertyByLowerCaseName x k
+  getFactKey
+    = Glean.Schema.Hack.Types.searchPropertyByLowerCaseName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1257 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.SearchPropertyByLowerCaseName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1263 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.GlobalConstDeclaration_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.GlobalConstDeclaration_key x1)
+    = do Glean.buildRtsValue b x1
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.GlobalConstDeclaration_key <$>
+        Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.GlobalConstDeclaration_key"
+           (Prelude.Just 0))
+{-# LINE 1270 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.Hack.Types.GlobalConstDeclaration_key
+     =
+     'Angle.TField "name" (Glean.KeyType Glean.Schema.Hack.Types.QName)
+       ('Angle.TNoFields)
+{-# LINE 1272 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Hack.Types.GlobalConstDeclaration
+         where
+  type KeyType Glean.Schema.Hack.Types.GlobalConstDeclaration =
+       Glean.Schema.Hack.Types.GlobalConstDeclaration_key
+  getName _proxy = Glean.PredicateRef "hack.GlobalConstDeclaration" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.globalConstDeclaration_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.GlobalConstDeclaration x k
+  getFactKey = Glean.Schema.Hack.Types.globalConstDeclaration_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1281 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.GlobalConstDeclaration
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1287 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.SearchGlobalConstByName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.SearchGlobalConstByName_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.SearchGlobalConstByName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.SearchGlobalConstByName_key"
+           (Prelude.Just 0))
+{-# LINE 1298 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.Hack.Types.SearchGlobalConstByName_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "parent"
+          (Prelude.Maybe Glean.Schema.Hack.Types.NamespaceQName)
+          ('Angle.TField "decl" (Glean.Schema.Hack.Types.Declaration)
+             ('Angle.TNoFields)))
+{-# LINE 1300 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Hack.Types.SearchGlobalConstByName
+         where
+  type KeyType Glean.Schema.Hack.Types.SearchGlobalConstByName =
+       Glean.Schema.Hack.Types.SearchGlobalConstByName_key
+  getName _proxy
+    = Glean.PredicateRef "hack.SearchGlobalConstByName" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.searchGlobalConstByName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.SearchGlobalConstByName x k
+  getFactKey = Glean.Schema.Hack.Types.searchGlobalConstByName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1309 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.SearchGlobalConstByName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1315 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.DeclarationSpan_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.DeclarationSpan_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.DeclarationSpan_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.DeclarationSpan_key" (Prelude.Just 0))
+{-# LINE 1326 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.DeclarationSpan_key =
+     'Angle.TField "declaration" (Glean.Schema.Hack.Types.Declaration)
+       ('Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
+          ('Angle.TField "span" (Glean.Schema.Src.Types.ByteSpan)
+             ('Angle.TNoFields)))
+{-# LINE 1328 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.DeclarationSpan
+         where
+  type KeyType Glean.Schema.Hack.Types.DeclarationSpan =
+       Glean.Schema.Hack.Types.DeclarationSpan_key
+  getName _proxy = Glean.PredicateRef "hack.DeclarationSpan" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.declarationSpan_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.DeclarationSpan x k
+  getFactKey = Glean.Schema.Hack.Types.declarationSpan_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1337 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.DeclarationSpan where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1343 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.FileCall_key where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.FileCall_key x1 x2 x3 x4 x5 x6 x7)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+         Glean.buildRtsValue b x5
+         Glean.buildRtsValue b x6
+         Glean.buildRtsValue b x7
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.FileCall_key <$> Glean.decodeRtsValue <*>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.FileCall_key" (Prelude.Just 0))
+{-# LINE 1362 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.FileCall_key =
+     'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
+       ('Angle.TField "callee_span" (Glean.Schema.Src.Types.ByteSpan)
+          ('Angle.TField "call_args" ([Glean.Schema.Hack.Types.CallArgument])
+             ('Angle.TField "callee_xref"
+                (Prelude.Maybe Glean.Schema.Hack.Types.XRefTarget)
+                ('Angle.TField "dispatch_arg"
+                   (Prelude.Maybe Glean.Schema.Hack.Types.CallArgument)
+                   ('Angle.TField "receiver_type"
+                      (Prelude.Maybe Glean.Schema.Hack.Types.Declaration)
+                      ('Angle.TField "callee_xrefs"
+                         ([Glean.Schema.Hack.Types.XRefTarget])
+                         ('Angle.TNoFields)))))))
+{-# LINE 1364 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.FileCall where
+  type KeyType Glean.Schema.Hack.Types.FileCall =
+       Glean.Schema.Hack.Types.FileCall_key
+  getName _proxy = Glean.PredicateRef "hack.FileCall" 6
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Hack.Types.fileCall_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.FileCall x k
+  getFactKey = Glean.Schema.Hack.Types.fileCall_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1373 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.FileCall where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1379 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.QName_key where
+  buildRtsValue b (Glean.Schema.Hack.Types.QName_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.QName_key <$> Glean.decodeRtsValue <*>
+        Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.QName_key" (Prelude.Just 0))
+{-# LINE 1388 "glean/schema/thrift/hack_include.hs" #-}
+type instance Angle.RecordFields Glean.Schema.Hack.Types.QName_key
+     =
+     'Angle.TField "name" (Glean.KeyType Glean.Schema.Hack.Types.Name)
+       ('Angle.TField "namespace_"
+          (Prelude.Maybe Glean.Schema.Hack.Types.NamespaceQName)
+          ('Angle.TNoFields))
+{-# LINE 1390 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.QName where
+  type KeyType Glean.Schema.Hack.Types.QName =
+       Glean.Schema.Hack.Types.QName_key
+  getName _proxy = Glean.PredicateRef "hack.QName" 6
+  getId = Glean.IdOf . Glean.Fid . Glean.Schema.Hack.Types.qName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.QName x k
+  getFactKey = Glean.Schema.Hack.Types.qName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1399 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.QName where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1405 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.HackToThrift_key where
+  buildRtsValue b (Glean.Schema.Hack.Types.HackToThrift_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.HackToThrift_key <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.HackToThrift_key" (Prelude.Just 0))
+{-# LINE 1414 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.HackToThrift_key =
+     'Angle.TField "from" (Glean.Schema.Hack.Types.Declaration)
+       ('Angle.TField "to" (Glean.Schema.Fbthrift.Types.Declaration)
+          ('Angle.TNoFields))
+{-# LINE 1416 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.HackToThrift where
+  type KeyType Glean.Schema.Hack.Types.HackToThrift =
+       Glean.Schema.Hack.Types.HackToThrift_key
+  getName _proxy = Glean.PredicateRef "hack.HackToThrift" 6
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Hack.Types.hackToThrift_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.HackToThrift x k
+  getFactKey = Glean.Schema.Hack.Types.hackToThrift_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1425 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.HackToThrift where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1431 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.TypedefDeclaration_key
+         where
+  buildRtsValue b (Glean.Schema.Hack.Types.TypedefDeclaration_key x1)
+    = do Glean.buildRtsValue b x1
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.TypedefDeclaration_key <$>
+        Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.TypedefDeclaration_key" (Prelude.Just 0))
+{-# LINE 1438 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.TypedefDeclaration_key =
+     'Angle.TField "name" (Glean.KeyType Glean.Schema.Hack.Types.QName)
+       ('Angle.TNoFields)
+{-# LINE 1440 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.TypedefDeclaration
+         where
+  type KeyType Glean.Schema.Hack.Types.TypedefDeclaration =
+       Glean.Schema.Hack.Types.TypedefDeclaration_key
+  getName _proxy = Glean.PredicateRef "hack.TypedefDeclaration" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.typedefDeclaration_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.TypedefDeclaration x k
+  getFactKey = Glean.Schema.Hack.Types.typedefDeclaration_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1449 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.TypedefDeclaration
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1455 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.ModuleParent_key where
+  buildRtsValue b (Glean.Schema.Hack.Types.ModuleParent_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.ModuleParent_key <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.ModuleParent_key" (Prelude.Just 0))
+{-# LINE 1464 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.ModuleParent_key =
+     'Angle.TField "decl" (Glean.Schema.Hack.Types.Declaration)
+       ('Angle.TField "module"
+          (Glean.KeyType Glean.Schema.Hack.Types.ModuleDeclaration)
+          ('Angle.TNoFields))
+{-# LINE 1466 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.ModuleParent where
+  type KeyType Glean.Schema.Hack.Types.ModuleParent =
+       Glean.Schema.Hack.Types.ModuleParent_key
+  getName _proxy = Glean.PredicateRef "hack.ModuleParent" 6
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Hack.Types.moduleParent_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.ModuleParent x k
+  getFactKey = Glean.Schema.Hack.Types.moduleParent_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1475 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.ModuleParent where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1481 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.ModuleChild_key where
+  buildRtsValue b (Glean.Schema.Hack.Types.ModuleChild_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.ModuleChild_key <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.ModuleChild_key" (Prelude.Just 0))
+{-# LINE 1490 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.ModuleChild_key =
+     'Angle.TField "module"
+       (Glean.KeyType Glean.Schema.Hack.Types.ModuleDeclaration)
+       ('Angle.TField "decl" (Glean.Schema.Hack.Types.Declaration)
+          ('Angle.TNoFields))
+{-# LINE 1492 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.ModuleChild where
+  type KeyType Glean.Schema.Hack.Types.ModuleChild =
+       Glean.Schema.Hack.Types.ModuleChild_key
+  getName _proxy = Glean.PredicateRef "hack.ModuleChild" 6
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Hack.Types.moduleChild_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.ModuleChild x k
+  getFactKey = Glean.Schema.Hack.Types.moduleChild_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1501 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.ModuleChild where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1507 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.DeclarationLocation_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.DeclarationLocation_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.DeclarationLocation_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.DeclarationLocation_key" (Prelude.Just 0))
+{-# LINE 1518 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.DeclarationLocation_key
+     =
+     'Angle.TField "declaration" (Glean.Schema.Hack.Types.Declaration)
+       ('Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
+          ('Angle.TField "span" (Glean.Schema.Src.Types.ByteSpan)
+             ('Angle.TNoFields)))
+{-# LINE 1520 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Hack.Types.DeclarationLocation
+         where
+  type KeyType Glean.Schema.Hack.Types.DeclarationLocation =
+       Glean.Schema.Hack.Types.DeclarationLocation_key
+  getName _proxy = Glean.PredicateRef "hack.DeclarationLocation" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.declarationLocation_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.DeclarationLocation x k
+  getFactKey = Glean.Schema.Hack.Types.declarationLocation_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1529 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.DeclarationLocation
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1535 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.DeclarationSource_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.DeclarationSource_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.DeclarationSource_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.DeclarationSource_key" (Prelude.Just 0))
+{-# LINE 1544 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.DeclarationSource_key =
+     'Angle.TField "target" (Glean.Schema.Hack.Types.Declaration)
+       ('Angle.TField "source" (Glean.Schema.Hack.Types.Declaration)
+          ('Angle.TNoFields))
+{-# LINE 1546 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.DeclarationSource
+         where
+  type KeyType Glean.Schema.Hack.Types.DeclarationSource =
+       Glean.Schema.Hack.Types.DeclarationSource_key
+  getName _proxy = Glean.PredicateRef "hack.DeclarationSource" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.declarationSource_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.DeclarationSource x k
+  getFactKey = Glean.Schema.Hack.Types.declarationSource_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1555 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.DeclarationSource where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1561 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.MethodOccurrence_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.MethodOccurrence_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.MethodOccurrence_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.MethodOccurrence_key" (Prelude.Just 0))
+{-# LINE 1570 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.MethodOccurrence_key =
+     'Angle.TField "name" (Glean.KeyType Glean.Schema.Hack.Types.Name)
+       ('Angle.TField "className"
+          (Prelude.Maybe Glean.Schema.Hack.Types.Name)
+          ('Angle.TNoFields))
+{-# LINE 1572 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.MethodOccurrence
+         where
+  type KeyType Glean.Schema.Hack.Types.MethodOccurrence =
+       Glean.Schema.Hack.Types.MethodOccurrence_key
+  getName _proxy = Glean.PredicateRef "hack.MethodOccurrence" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.methodOccurrence_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.MethodOccurrence x k
+  getFactKey = Glean.Schema.Hack.Types.methodOccurrence_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1581 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.MethodOccurrence where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1587 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.MemberCluster_key where
+  buildRtsValue b (Glean.Schema.Hack.Types.MemberCluster_key x1)
+    = do Glean.buildRtsValue b x1
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.MemberCluster_key <$>
+        Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.MemberCluster_key" (Prelude.Just 0))
+{-# LINE 1594 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.MemberCluster_key =
+     'Angle.TField "members" ([Glean.Schema.Hack.Types.Declaration])
+       ('Angle.TNoFields)
+{-# LINE 1596 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.MemberCluster
+         where
+  type KeyType Glean.Schema.Hack.Types.MemberCluster =
+       Glean.Schema.Hack.Types.MemberCluster_key
+  getName _proxy = Glean.PredicateRef "hack.MemberCluster" 6
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Hack.Types.memberCluster_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.MemberCluster x k
+  getFactKey = Glean.Schema.Hack.Types.memberCluster_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1605 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.MemberCluster where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1611 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.SearchClassConstByLowerCaseName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.SearchClassConstByLowerCaseName_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.SearchClassConstByLowerCaseName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.SearchClassConstByLowerCaseName_key"
+           (Prelude.Just 0))
+{-# LINE 1620 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.Hack.Types.SearchClassConstByLowerCaseName_key
+     =
+     'Angle.TField "name_lowercase" (Data.Text.Text)
+       ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields))
+{-# LINE 1622 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Hack.Types.SearchClassConstByLowerCaseName
+         where
+  type KeyType
+         Glean.Schema.Hack.Types.SearchClassConstByLowerCaseName
+       = Glean.Schema.Hack.Types.SearchClassConstByLowerCaseName_key
+  getName _proxy
+    = Glean.PredicateRef "hack.SearchClassConstByLowerCaseName" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.Hack.Types.searchClassConstByLowerCaseName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.SearchClassConstByLowerCaseName x k
+  getFactKey
+    = Glean.Schema.Hack.Types.searchClassConstByLowerCaseName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1631 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.SearchClassConstByLowerCaseName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1637 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.FileXRefs_key where
+  buildRtsValue b (Glean.Schema.Hack.Types.FileXRefs_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.FileXRefs_key <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.FileXRefs_key" (Prelude.Just 0))
+{-# LINE 1646 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.FileXRefs_key =
+     'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
+       ('Angle.TField "xrefs" ([Glean.Schema.Hack.Types.XRef])
+          ('Angle.TNoFields))
+{-# LINE 1648 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.FileXRefs where
+  type KeyType Glean.Schema.Hack.Types.FileXRefs =
+       Glean.Schema.Hack.Types.FileXRefs_key
+  getName _proxy = Glean.PredicateRef "hack.FileXRefs" 6
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Hack.Types.fileXRefs_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.FileXRefs x k
+  getFactKey = Glean.Schema.Hack.Types.fileXRefs_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1657 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.FileXRefs where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1663 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.TypeConstDeclaration_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.TypeConstDeclaration_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.TypeConstDeclaration_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.TypeConstDeclaration_key" (Prelude.Just 0))
+{-# LINE 1672 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.TypeConstDeclaration_key
+     =
+     'Angle.TField "name" (Glean.KeyType Glean.Schema.Hack.Types.Name)
+       ('Angle.TField "container"
+          (Glean.Schema.Hack.Types.ContainerDeclaration)
+          ('Angle.TNoFields))
+{-# LINE 1674 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Hack.Types.TypeConstDeclaration
+         where
+  type KeyType Glean.Schema.Hack.Types.TypeConstDeclaration =
+       Glean.Schema.Hack.Types.TypeConstDeclaration_key
+  getName _proxy = Glean.PredicateRef "hack.TypeConstDeclaration" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.typeConstDeclaration_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.TypeConstDeclaration x k
+  getFactKey = Glean.Schema.Hack.Types.typeConstDeclaration_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1683 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.TypeConstDeclaration
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1689 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.DeclarationName
+         where
+  type KeyType Glean.Schema.Hack.Types.DeclarationName =
+       Glean.Schema.Hack.Types.Declaration
+  type ValueType Glean.Schema.Hack.Types.DeclarationName =
+       Glean.Schema.Hack.Types.DeclarationName_value
+  getName _proxy = Glean.PredicateRef "hack.DeclarationName" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.declarationName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k v
+    = Glean.Schema.Hack.Types.DeclarationName x k v
+  getFactKey = Glean.Schema.Hack.Types.declarationName_key
+  getFactValue = Glean.Schema.Hack.Types.declarationName_value
+{-# LINE 1700 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.DeclarationName where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1706 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.MethodOverridden_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.MethodOverridden_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.MethodOverridden_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.MethodOverridden_key" (Prelude.Just 0))
+{-# LINE 1717 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.MethodOverridden_key =
+     'Angle.TField "base"
+       (Glean.KeyType Glean.Schema.Hack.Types.MethodDeclaration)
+       ('Angle.TField "derived"
+          (Glean.KeyType Glean.Schema.Hack.Types.MethodDeclaration)
+          ('Angle.TField "annotation" (Prelude.Maybe Prelude.Bool)
+             ('Angle.TNoFields)))
+{-# LINE 1719 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.MethodOverridden
+         where
+  type KeyType Glean.Schema.Hack.Types.MethodOverridden =
+       Glean.Schema.Hack.Types.MethodOverridden_key
+  getName _proxy = Glean.PredicateRef "hack.MethodOverridden" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.methodOverridden_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.MethodOverridden x k
+  getFactKey = Glean.Schema.Hack.Types.methodOverridden_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1728 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.MethodOverridden where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1734 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.DeclarationTarget_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.DeclarationTarget_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.DeclarationTarget_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.DeclarationTarget_key" (Prelude.Just 0))
+{-# LINE 1743 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.DeclarationTarget_key =
+     'Angle.TField "source" (Glean.Schema.Hack.Types.Declaration)
+       ('Angle.TField "target" (Glean.Schema.Hack.Types.Declaration)
+          ('Angle.TNoFields))
+{-# LINE 1745 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.DeclarationTarget
+         where
+  type KeyType Glean.Schema.Hack.Types.DeclarationTarget =
+       Glean.Schema.Hack.Types.DeclarationTarget_key
+  getName _proxy = Glean.PredicateRef "hack.DeclarationTarget" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.declarationTarget_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.DeclarationTarget x k
+  getFactKey = Glean.Schema.Hack.Types.declarationTarget_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1754 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.DeclarationTarget where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1760 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.Name where
+  type KeyType Glean.Schema.Hack.Types.Name = Data.Text.Text
+  getName _proxy = Glean.PredicateRef "hack.Name" 6
+  getId = Glean.IdOf . Glean.Fid . Glean.Schema.Hack.Types.name_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.Name x k
+  getFactKey = Glean.Schema.Hack.Types.name_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1768 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.Name where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1774 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.MethodDeclaration_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.MethodDeclaration_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.MethodDeclaration_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.MethodDeclaration_key" (Prelude.Just 0))
+{-# LINE 1783 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.MethodDeclaration_key =
+     'Angle.TField "name" (Glean.KeyType Glean.Schema.Hack.Types.Name)
+       ('Angle.TField "container"
+          (Glean.Schema.Hack.Types.ContainerDeclaration)
+          ('Angle.TNoFields))
+{-# LINE 1785 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.MethodDeclaration
+         where
+  type KeyType Glean.Schema.Hack.Types.MethodDeclaration =
+       Glean.Schema.Hack.Types.MethodDeclaration_key
+  getName _proxy = Glean.PredicateRef "hack.MethodDeclaration" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.methodDeclaration_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.MethodDeclaration x k
+  getFactKey = Glean.Schema.Hack.Types.methodDeclaration_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1794 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.MethodDeclaration where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1800 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.TraitDeclaration_key
+         where
+  buildRtsValue b (Glean.Schema.Hack.Types.TraitDeclaration_key x1)
+    = do Glean.buildRtsValue b x1
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.TraitDeclaration_key <$>
+        Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.TraitDeclaration_key" (Prelude.Just 0))
+{-# LINE 1807 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.TraitDeclaration_key =
+     'Angle.TField "name" (Glean.KeyType Glean.Schema.Hack.Types.QName)
+       ('Angle.TNoFields)
+{-# LINE 1809 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.TraitDeclaration
+         where
+  type KeyType Glean.Schema.Hack.Types.TraitDeclaration =
+       Glean.Schema.Hack.Types.TraitDeclaration_key
+  getName _proxy = Glean.PredicateRef "hack.TraitDeclaration" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.traitDeclaration_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.TraitDeclaration x k
+  getFactKey = Glean.Schema.Hack.Types.traitDeclaration_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1818 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.TraitDeclaration where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1824 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.SearchTypeConstByName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.SearchTypeConstByName_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.SearchTypeConstByName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.SearchTypeConstByName_key" (Prelude.Just 0))
+{-# LINE 1835 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.Hack.Types.SearchTypeConstByName_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "parent"
+          (Glean.KeyType Glean.Schema.Hack.Types.QName)
+          ('Angle.TField "decl" (Glean.Schema.Hack.Types.Declaration)
+             ('Angle.TNoFields)))
+{-# LINE 1837 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Hack.Types.SearchTypeConstByName
+         where
+  type KeyType Glean.Schema.Hack.Types.SearchTypeConstByName =
+       Glean.Schema.Hack.Types.SearchTypeConstByName_key
+  getName _proxy = Glean.PredicateRef "hack.SearchTypeConstByName" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.searchTypeConstByName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.SearchTypeConstByName x k
+  getFactKey = Glean.Schema.Hack.Types.searchTypeConstByName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1846 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.SearchTypeConstByName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1852 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.ClassDeclaration_key
+         where
+  buildRtsValue b (Glean.Schema.Hack.Types.ClassDeclaration_key x1)
+    = do Glean.buildRtsValue b x1
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.ClassDeclaration_key <$>
+        Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.ClassDeclaration_key" (Prelude.Just 0))
+{-# LINE 1859 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.ClassDeclaration_key =
+     'Angle.TField "name" (Glean.KeyType Glean.Schema.Hack.Types.QName)
+       ('Angle.TNoFields)
+{-# LINE 1861 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.ClassDeclaration
+         where
+  type KeyType Glean.Schema.Hack.Types.ClassDeclaration =
+       Glean.Schema.Hack.Types.ClassDeclaration_key
+  getName _proxy = Glean.PredicateRef "hack.ClassDeclaration" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.classDeclaration_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.ClassDeclaration x k
+  getFactKey = Glean.Schema.Hack.Types.classDeclaration_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1870 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.ClassDeclaration where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1876 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.SearchTypedefByName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.SearchTypedefByName_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.SearchTypedefByName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.SearchTypedefByName_key" (Prelude.Just 0))
+{-# LINE 1887 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.SearchTypedefByName_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "parent"
+          (Prelude.Maybe Glean.Schema.Hack.Types.NamespaceQName)
+          ('Angle.TField "decl" (Glean.Schema.Hack.Types.Declaration)
+             ('Angle.TNoFields)))
+{-# LINE 1889 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Hack.Types.SearchTypedefByName
+         where
+  type KeyType Glean.Schema.Hack.Types.SearchTypedefByName =
+       Glean.Schema.Hack.Types.SearchTypedefByName_key
+  getName _proxy = Glean.PredicateRef "hack.SearchTypedefByName" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.searchTypedefByName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.SearchTypedefByName x k
+  getFactKey = Glean.Schema.Hack.Types.searchTypedefByName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1898 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.SearchTypedefByName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1904 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.IndexerInputsHash
+         where
+  type KeyType Glean.Schema.Hack.Types.IndexerInputsHash =
+       Data.Text.Text
+  type ValueType Glean.Schema.Hack.Types.IndexerInputsHash =
+       Glean.Schema.Hack.Types.IndexerInputsHash_value
+  getName _proxy = Glean.PredicateRef "hack.IndexerInputsHash" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.indexerInputsHash_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k v
+    = Glean.Schema.Hack.Types.IndexerInputsHash x k v
+  getFactKey = Glean.Schema.Hack.Types.indexerInputsHash_key
+  getFactValue = Glean.Schema.Hack.Types.indexerInputsHash_value
+{-# LINE 1914 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.IndexerInputsHash where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1920 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.SearchFunctionByLowerCaseName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.SearchFunctionByLowerCaseName_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.SearchFunctionByLowerCaseName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.SearchFunctionByLowerCaseName_key"
+           (Prelude.Just 0))
+{-# LINE 1929 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.Hack.Types.SearchFunctionByLowerCaseName_key
+     =
+     'Angle.TField "name_lowercase" (Data.Text.Text)
+       ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields))
+{-# LINE 1931 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Hack.Types.SearchFunctionByLowerCaseName
+         where
+  type KeyType Glean.Schema.Hack.Types.SearchFunctionByLowerCaseName
+       = Glean.Schema.Hack.Types.SearchFunctionByLowerCaseName_key
+  getName _proxy
+    = Glean.PredicateRef "hack.SearchFunctionByLowerCaseName" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.Hack.Types.searchFunctionByLowerCaseName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.SearchFunctionByLowerCaseName x k
+  getFactKey
+    = Glean.Schema.Hack.Types.searchFunctionByLowerCaseName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1940 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.SearchFunctionByLowerCaseName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1946 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.SearchModuleByLowerCaseName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.SearchModuleByLowerCaseName_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.SearchModuleByLowerCaseName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.SearchModuleByLowerCaseName_key"
+           (Prelude.Just 0))
+{-# LINE 1955 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.Hack.Types.SearchModuleByLowerCaseName_key
+     =
+     'Angle.TField "name_lowercase" (Data.Text.Text)
+       ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields))
+{-# LINE 1957 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Hack.Types.SearchModuleByLowerCaseName
+         where
+  type KeyType Glean.Schema.Hack.Types.SearchModuleByLowerCaseName =
+       Glean.Schema.Hack.Types.SearchModuleByLowerCaseName_key
+  getName _proxy
+    = Glean.PredicateRef "hack.SearchModuleByLowerCaseName" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.searchModuleByLowerCaseName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.SearchModuleByLowerCaseName x k
+  getFactKey
+    = Glean.Schema.Hack.Types.searchModuleByLowerCaseName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1966 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.SearchModuleByLowerCaseName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1972 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.SearchNamespaceByLowerCaseName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.SearchNamespaceByLowerCaseName_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.SearchNamespaceByLowerCaseName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.SearchNamespaceByLowerCaseName_key"
+           (Prelude.Just 0))
+{-# LINE 1981 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.Hack.Types.SearchNamespaceByLowerCaseName_key
+     =
+     'Angle.TField "name_lowercase" (Data.Text.Text)
+       ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields))
+{-# LINE 1983 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Hack.Types.SearchNamespaceByLowerCaseName
+         where
+  type KeyType Glean.Schema.Hack.Types.SearchNamespaceByLowerCaseName
+       = Glean.Schema.Hack.Types.SearchNamespaceByLowerCaseName_key
+  getName _proxy
+    = Glean.PredicateRef "hack.SearchNamespaceByLowerCaseName" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.Hack.Types.searchNamespaceByLowerCaseName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.SearchNamespaceByLowerCaseName x k
+  getFactKey
+    = Glean.Schema.Hack.Types.searchNamespaceByLowerCaseName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1992 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.SearchNamespaceByLowerCaseName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1998 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.SearchMethodByLowerCaseName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.SearchMethodByLowerCaseName_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.SearchMethodByLowerCaseName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.SearchMethodByLowerCaseName_key"
+           (Prelude.Just 0))
+{-# LINE 2007 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.Hack.Types.SearchMethodByLowerCaseName_key
+     =
+     'Angle.TField "name_lowercase" (Data.Text.Text)
+       ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields))
+{-# LINE 2009 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Hack.Types.SearchMethodByLowerCaseName
+         where
+  type KeyType Glean.Schema.Hack.Types.SearchMethodByLowerCaseName =
+       Glean.Schema.Hack.Types.SearchMethodByLowerCaseName_key
+  getName _proxy
+    = Glean.PredicateRef "hack.SearchMethodByLowerCaseName" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.searchMethodByLowerCaseName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.SearchMethodByLowerCaseName x k
+  getFactKey
+    = Glean.Schema.Hack.Types.searchMethodByLowerCaseName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 2018 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.SearchMethodByLowerCaseName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 2024 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.ModuleDefinition_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.ModuleDefinition_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.ModuleDefinition_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.ModuleDefinition_key" (Prelude.Just 0))
+{-# LINE 2033 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.ModuleDefinition_key =
+     'Angle.TField "declaration"
+       (Glean.KeyType Glean.Schema.Hack.Types.ModuleDeclaration)
+       ('Angle.TField "attributes"
+          ([Glean.Schema.Hack.Types.UserAttribute])
+          ('Angle.TNoFields))
+{-# LINE 2035 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.ModuleDefinition
+         where
+  type KeyType Glean.Schema.Hack.Types.ModuleDefinition =
+       Glean.Schema.Hack.Types.ModuleDefinition_key
+  getName _proxy = Glean.PredicateRef "hack.ModuleDefinition" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.moduleDefinition_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.ModuleDefinition x k
+  getFactKey = Glean.Schema.Hack.Types.moduleDefinition_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 2044 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.ModuleDefinition where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 2050 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.AttributeToDefinition_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.AttributeToDefinition_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.AttributeToDefinition_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.AttributeToDefinition_key" (Prelude.Just 0))
+{-# LINE 2059 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.Hack.Types.AttributeToDefinition_key
+     =
+     'Angle.TField "attribute"
+       (Glean.KeyType Glean.Schema.Hack.Types.UserAttribute)
+       ('Angle.TField "definition" (Glean.Schema.Hack.Types.Definition)
+          ('Angle.TNoFields))
+{-# LINE 2061 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Hack.Types.AttributeToDefinition
+         where
+  type KeyType Glean.Schema.Hack.Types.AttributeToDefinition =
+       Glean.Schema.Hack.Types.AttributeToDefinition_key
+  getName _proxy = Glean.PredicateRef "hack.AttributeToDefinition" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.attributeToDefinition_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.AttributeToDefinition x k
+  getFactKey = Glean.Schema.Hack.Types.attributeToDefinition_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 2070 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.AttributeToDefinition
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 2076 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.Hint_key where
+  buildRtsValue b Glean.Schema.Hack.Types.Hint_key_EMPTY
+    = Glean.buildRtsSelector b 20
+  buildRtsValue b (Glean.Schema.Hack.Types.Hint_key_apply x)
+    = do Glean.buildRtsSelector b 0
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Hack.Types.Hint_key_option x)
+    = do Glean.buildRtsSelector b 1
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Hack.Types.Hint_key_like x)
+    = do Glean.buildRtsSelector b 2
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Hack.Types.Hint_key_tuple x)
+    = do Glean.buildRtsSelector b 3
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Hack.Types.Hint_key_class_args x)
+    = do Glean.buildRtsSelector b 4
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Hack.Types.Hint_key_shape x)
+    = do Glean.buildRtsSelector b 5
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Hack.Types.Hint_key_soft x)
+    = do Glean.buildRtsSelector b 6
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Hack.Types.Hint_key_intersection x)
+    = do Glean.buildRtsSelector b 7
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Hack.Types.Hint_key_union_ x)
+    = do Glean.buildRtsSelector b 8
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Hack.Types.Hint_key_vect_or_dict x)
+    = do Glean.buildRtsSelector b 9
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Hack.Types.Hint_key_prim x)
+    = do Glean.buildRtsSelector b 10
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Hack.Types.Hint_key_var_ x)
+    = do Glean.buildRtsSelector b 11
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Hack.Types.Hint_key_fun_context x)
+    = do Glean.buildRtsSelector b 12
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Hack.Types.Hint_key_mixed x)
+    = do Glean.buildRtsSelector b 13
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Hack.Types.Hint_key_wildcard x)
+    = do Glean.buildRtsSelector b 14
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Hack.Types.Hint_key_nonnull x)
+    = do Glean.buildRtsSelector b 15
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Hack.Types.Hint_key_this_ x)
+    = do Glean.buildRtsSelector b 16
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Hack.Types.Hint_key_dynamic x)
+    = do Glean.buildRtsSelector b 17
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Hack.Types.Hint_key_nothing x)
+    = do Glean.buildRtsSelector b 18
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Hack.Types.Hint_key_other x)
+    = do Glean.buildRtsSelector b 19
+         Glean.buildRtsValue b x
+  decodeRtsValue
+    = Glean.sumD (Prelude.pure Glean.Schema.Hack.Types.Hint_key_EMPTY)
+        [Glean.mapD Glean.Schema.Hack.Types.Hint_key_apply,
+         Glean.mapD Glean.Schema.Hack.Types.Hint_key_option,
+         Glean.mapD Glean.Schema.Hack.Types.Hint_key_like,
+         Glean.mapD Glean.Schema.Hack.Types.Hint_key_tuple,
+         Glean.mapD Glean.Schema.Hack.Types.Hint_key_class_args,
+         Glean.mapD Glean.Schema.Hack.Types.Hint_key_shape,
+         Glean.mapD Glean.Schema.Hack.Types.Hint_key_soft,
+         Glean.mapD Glean.Schema.Hack.Types.Hint_key_intersection,
+         Glean.mapD Glean.Schema.Hack.Types.Hint_key_union_,
+         Glean.mapD Glean.Schema.Hack.Types.Hint_key_vect_or_dict,
+         Glean.mapD Glean.Schema.Hack.Types.Hint_key_prim,
+         Glean.mapD Glean.Schema.Hack.Types.Hint_key_var_,
+         Glean.mapD Glean.Schema.Hack.Types.Hint_key_fun_context,
+         Glean.mapD Glean.Schema.Hack.Types.Hint_key_mixed,
+         Glean.mapD Glean.Schema.Hack.Types.Hint_key_wildcard,
+         Glean.mapD Glean.Schema.Hack.Types.Hint_key_nonnull,
+         Glean.mapD Glean.Schema.Hack.Types.Hint_key_this_,
+         Glean.mapD Glean.Schema.Hack.Types.Hint_key_dynamic,
+         Glean.mapD Glean.Schema.Hack.Types.Hint_key_nothing,
+         Glean.mapD Glean.Schema.Hack.Types.Hint_key_other]
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.Hint_key" (Prelude.Just 0))
+{-# LINE 2164 "glean/schema/thrift/hack_include.hs" #-}
+type instance Angle.SumFields Glean.Schema.Hack.Types.Hint_key =
+     'Angle.TField "apply" (Glean.Schema.Hack.Types.Hint_apply_)
+       ('Angle.TField "option"
+          (Glean.KeyType Glean.Schema.Hack.Types.Hint)
+          ('Angle.TField "like" (Glean.KeyType Glean.Schema.Hack.Types.Hint)
+             ('Angle.TField "tuple" (Glean.Schema.Hack.Types.Hint_tuple_)
+                ('Angle.TField "class_args"
+                   (Glean.KeyType Glean.Schema.Hack.Types.Hint)
+                   ('Angle.TField "shape" (Glean.Schema.Hack.Types.Hint_shape_)
+                      ('Angle.TField "soft" (Glean.KeyType Glean.Schema.Hack.Types.Hint)
+                         ('Angle.TField "intersection" ([Glean.Schema.Hack.Types.Hint])
+                            ('Angle.TField "union_" ([Glean.Schema.Hack.Types.Hint])
+                               ('Angle.TField "vect_or_dict"
+                                  (Glean.Schema.Hack.Types.Hint_vect_or_dict_)
+                                  ('Angle.TField "prim" (Glean.KeyType Glean.Schema.Hack.Types.Type)
+                                     ('Angle.TField "var_" (Data.Text.Text)
+                                        ('Angle.TField "fun_context" (Data.Text.Text)
+                                           ('Angle.TField "mixed" (Glean.Schema.Builtin.Types.Unit)
+                                              ('Angle.TField "wildcard"
+                                                 (Glean.Schema.Builtin.Types.Unit)
+                                                 ('Angle.TField "nonnull"
+                                                    (Glean.Schema.Builtin.Types.Unit)
+                                                    ('Angle.TField "this_"
+                                                       (Glean.Schema.Builtin.Types.Unit)
+                                                       ('Angle.TField "dynamic"
+                                                          (Glean.Schema.Builtin.Types.Unit)
+                                                          ('Angle.TField "nothing"
+                                                             (Glean.Schema.Builtin.Types.Unit)
+                                                             ('Angle.TField "other"
+                                                                (Glean.KeyType
+                                                                   Glean.Schema.Hack.Types.Type)
+                                                                ('Angle.TNoFields))))))))))))))))))))
+{-# LINE 2166 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.Hint where
+  type KeyType Glean.Schema.Hack.Types.Hint =
+       Glean.Schema.Hack.Types.Hint_key
+  getName _proxy = Glean.PredicateRef "hack.Hint" 6
+  getId = Glean.IdOf . Glean.Fid . Glean.Schema.Hack.Types.hint_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.Hint x k
+  getFactKey = Glean.Schema.Hack.Types.hint_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 2174 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.Hint where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 2180 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.EnumDeclaration_key
+         where
+  buildRtsValue b (Glean.Schema.Hack.Types.EnumDeclaration_key x1)
+    = do Glean.buildRtsValue b x1
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.EnumDeclaration_key <$>
+        Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.EnumDeclaration_key" (Prelude.Just 0))
+{-# LINE 2187 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.EnumDeclaration_key =
+     'Angle.TField "name" (Glean.KeyType Glean.Schema.Hack.Types.QName)
+       ('Angle.TNoFields)
+{-# LINE 2189 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.EnumDeclaration
+         where
+  type KeyType Glean.Schema.Hack.Types.EnumDeclaration =
+       Glean.Schema.Hack.Types.EnumDeclaration_key
+  getName _proxy = Glean.PredicateRef "hack.EnumDeclaration" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.enumDeclaration_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.EnumDeclaration x k
+  getFactKey = Glean.Schema.Hack.Types.enumDeclaration_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 2198 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.EnumDeclaration where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 2204 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.ThriftToHack_key where
+  buildRtsValue b (Glean.Schema.Hack.Types.ThriftToHack_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.ThriftToHack_key <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.ThriftToHack_key" (Prelude.Just 0))
+{-# LINE 2213 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.ThriftToHack_key =
+     'Angle.TField "to" (Glean.Schema.Fbthrift.Types.Declaration)
+       ('Angle.TField "from" (Glean.Schema.Hack.Types.Declaration)
+          ('Angle.TNoFields))
+{-# LINE 2215 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.ThriftToHack where
+  type KeyType Glean.Schema.Hack.Types.ThriftToHack =
+       Glean.Schema.Hack.Types.ThriftToHack_key
+  getName _proxy = Glean.PredicateRef "hack.ThriftToHack" 6
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Hack.Types.thriftToHack_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.ThriftToHack x k
+  getFactKey = Glean.Schema.Hack.Types.thriftToHack_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 2224 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.ThriftToHack where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 2230 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.TypeInfo_key where
+  buildRtsValue b (Glean.Schema.Hack.Types.TypeInfo_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.TypeInfo_key <$> Glean.decodeRtsValue <*>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.TypeInfo_key" (Prelude.Just 0))
+{-# LINE 2241 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.TypeInfo_key =
+     'Angle.TField "displayType"
+       (Glean.KeyType Glean.Schema.Hack.Types.Type)
+       ('Angle.TField "xrefs" ([Glean.Schema.Hack.Types.XRef])
+          ('Angle.TField "hint" (Prelude.Maybe Glean.Schema.Hack.Types.Hint)
+             ('Angle.TNoFields)))
+{-# LINE 2243 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.TypeInfo where
+  type KeyType Glean.Schema.Hack.Types.TypeInfo =
+       Glean.Schema.Hack.Types.TypeInfo_key
+  getName _proxy = Glean.PredicateRef "hack.TypeInfo" 6
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Hack.Types.typeInfo_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.TypeInfo x k
+  getFactKey = Glean.Schema.Hack.Types.typeInfo_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 2252 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.TypeInfo where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 2258 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.InheritedMembers_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.InheritedMembers_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.InheritedMembers_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.InheritedMembers_key" (Prelude.Just 0))
+{-# LINE 2267 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.InheritedMembers_key =
+     'Angle.TField "container"
+       (Glean.Schema.Hack.Types.ContainerDeclaration)
+       ('Angle.TField "inheritedMembers"
+          ([Glean.Schema.Hack.Types.MemberCluster])
+          ('Angle.TNoFields))
+{-# LINE 2269 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.InheritedMembers
+         where
+  type KeyType Glean.Schema.Hack.Types.InheritedMembers =
+       Glean.Schema.Hack.Types.InheritedMembers_key
+  getName _proxy = Glean.PredicateRef "hack.InheritedMembers" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.inheritedMembers_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.InheritedMembers x k
+  getFactKey = Glean.Schema.Hack.Types.inheritedMembers_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 2278 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.InheritedMembers where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 2284 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.ContainerChild_key
+         where
+  buildRtsValue b (Glean.Schema.Hack.Types.ContainerChild_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.ContainerChild_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.ContainerChild_key" (Prelude.Just 0))
+{-# LINE 2293 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.ContainerChild_key =
+     'Angle.TField "container"
+       (Glean.Schema.Hack.Types.ContainerDeclaration)
+       ('Angle.TField "child"
+          (Glean.Schema.Hack.Types.ContainerDeclaration)
+          ('Angle.TNoFields))
+{-# LINE 2295 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.ContainerChild
+         where
+  type KeyType Glean.Schema.Hack.Types.ContainerChild =
+       Glean.Schema.Hack.Types.ContainerChild_key
+  getName _proxy = Glean.PredicateRef "hack.ContainerChild" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.containerChild_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.ContainerChild x k
+  getFactKey = Glean.Schema.Hack.Types.containerChild_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 2304 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.ContainerChild where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 2310 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.TypeConstDefinition_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.TypeConstDefinition_key x1 x2 x3 x4 x5)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+         Glean.buildRtsValue b x5
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.TypeConstDefinition_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.TypeConstDefinition_key" (Prelude.Just 0))
+{-# LINE 2325 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.TypeConstDefinition_key
+     =
+     'Angle.TField "declaration"
+       (Glean.KeyType Glean.Schema.Hack.Types.TypeConstDeclaration)
+       ('Angle.TField "type" (Prelude.Maybe Glean.Schema.Hack.Types.Type)
+          ('Angle.TField "kind" (Glean.Schema.Hack.Types.TypeConstKind)
+             ('Angle.TField "attributes"
+                ([Glean.Schema.Hack.Types.UserAttribute])
+                ('Angle.TField "typeInfo"
+                   (Prelude.Maybe Glean.Schema.Hack.Types.TypeInfo)
+                   ('Angle.TNoFields)))))
+{-# LINE 2327 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Hack.Types.TypeConstDefinition
+         where
+  type KeyType Glean.Schema.Hack.Types.TypeConstDefinition =
+       Glean.Schema.Hack.Types.TypeConstDefinition_key
+  getName _proxy = Glean.PredicateRef "hack.TypeConstDefinition" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.typeConstDefinition_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.TypeConstDefinition x k
+  getFactKey = Glean.Schema.Hack.Types.typeConstDefinition_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 2336 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.TypeConstDefinition
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 2342 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.SearchEnumByLowerCaseName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.SearchEnumByLowerCaseName_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.SearchEnumByLowerCaseName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.SearchEnumByLowerCaseName_key"
+           (Prelude.Just 0))
+{-# LINE 2351 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.Hack.Types.SearchEnumByLowerCaseName_key
+     =
+     'Angle.TField "name_lowercase" (Data.Text.Text)
+       ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields))
+{-# LINE 2353 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Hack.Types.SearchEnumByLowerCaseName
+         where
+  type KeyType Glean.Schema.Hack.Types.SearchEnumByLowerCaseName =
+       Glean.Schema.Hack.Types.SearchEnumByLowerCaseName_key
+  getName _proxy
+    = Glean.PredicateRef "hack.SearchEnumByLowerCaseName" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.searchEnumByLowerCaseName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.SearchEnumByLowerCaseName x k
+  getFactKey = Glean.Schema.Hack.Types.searchEnumByLowerCaseName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 2362 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.SearchEnumByLowerCaseName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 2368 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.AttributeHasParameter_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.AttributeHasParameter_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.AttributeHasParameter_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.AttributeHasParameter_key" (Prelude.Just 0))
+{-# LINE 2379 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.Hack.Types.AttributeHasParameter_key
+     =
+     'Angle.TField "name" (Glean.KeyType Glean.Schema.Hack.Types.Name)
+       ('Angle.TField "parameter" (Data.Text.Text)
+          ('Angle.TField "attribute"
+             (Glean.KeyType Glean.Schema.Hack.Types.UserAttribute)
+             ('Angle.TNoFields)))
+{-# LINE 2381 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Hack.Types.AttributeHasParameter
+         where
+  type KeyType Glean.Schema.Hack.Types.AttributeHasParameter =
+       Glean.Schema.Hack.Types.AttributeHasParameter_key
+  getName _proxy = Glean.PredicateRef "hack.AttributeHasParameter" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.attributeHasParameter_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.AttributeHasParameter x k
+  getFactKey = Glean.Schema.Hack.Types.attributeHasParameter_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 2390 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.AttributeHasParameter
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 2396 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.ContainerParent_key
+         where
+  buildRtsValue b (Glean.Schema.Hack.Types.ContainerParent_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.ContainerParent_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.ContainerParent_key" (Prelude.Just 0))
+{-# LINE 2405 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.ContainerParent_key =
+     'Angle.TField "container"
+       (Glean.Schema.Hack.Types.ContainerDeclaration)
+       ('Angle.TField "parent"
+          (Glean.Schema.Hack.Types.ContainerDeclaration)
+          ('Angle.TNoFields))
+{-# LINE 2407 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.ContainerParent
+         where
+  type KeyType Glean.Schema.Hack.Types.ContainerParent =
+       Glean.Schema.Hack.Types.ContainerParent_key
+  getName _proxy = Glean.PredicateRef "hack.ContainerParent" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.containerParent_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.ContainerParent x k
+  getFactKey = Glean.Schema.Hack.Types.containerParent_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 2416 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.ContainerParent where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 2422 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.DefinitionToDeclaration_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.DefinitionToDeclaration_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.DefinitionToDeclaration_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.DefinitionToDeclaration_key"
+           (Prelude.Just 0))
+{-# LINE 2431 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.Hack.Types.DefinitionToDeclaration_key
+     =
+     'Angle.TField "definition" (Glean.Schema.Hack.Types.Definition)
+       ('Angle.TField "declaration" (Glean.Schema.Hack.Types.Declaration)
+          ('Angle.TNoFields))
+{-# LINE 2433 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Hack.Types.DefinitionToDeclaration
+         where
+  type KeyType Glean.Schema.Hack.Types.DefinitionToDeclaration =
+       Glean.Schema.Hack.Types.DefinitionToDeclaration_key
+  getName _proxy
+    = Glean.PredicateRef "hack.DefinitionToDeclaration" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.definitionToDeclaration_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.DefinitionToDeclaration x k
+  getFactKey = Glean.Schema.Hack.Types.definitionToDeclaration_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 2442 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.DefinitionToDeclaration
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 2448 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.SearchTypeConstByLowerCaseName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.SearchTypeConstByLowerCaseName_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.SearchTypeConstByLowerCaseName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.SearchTypeConstByLowerCaseName_key"
+           (Prelude.Just 0))
+{-# LINE 2457 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.Hack.Types.SearchTypeConstByLowerCaseName_key
+     =
+     'Angle.TField "name_lowercase" (Data.Text.Text)
+       ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields))
+{-# LINE 2459 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Hack.Types.SearchTypeConstByLowerCaseName
+         where
+  type KeyType Glean.Schema.Hack.Types.SearchTypeConstByLowerCaseName
+       = Glean.Schema.Hack.Types.SearchTypeConstByLowerCaseName_key
+  getName _proxy
+    = Glean.PredicateRef "hack.SearchTypeConstByLowerCaseName" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.Hack.Types.searchTypeConstByLowerCaseName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.SearchTypeConstByLowerCaseName x k
+  getFactKey
+    = Glean.Schema.Hack.Types.searchTypeConstByLowerCaseName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 2468 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.SearchTypeConstByLowerCaseName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 2474 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.SearchTraitByName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.SearchTraitByName_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.SearchTraitByName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.SearchTraitByName_key" (Prelude.Just 0))
+{-# LINE 2485 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.SearchTraitByName_key =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "parent"
+          (Prelude.Maybe Glean.Schema.Hack.Types.NamespaceQName)
+          ('Angle.TField "decl" (Glean.Schema.Hack.Types.Declaration)
+             ('Angle.TNoFields)))
+{-# LINE 2487 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.SearchTraitByName
+         where
+  type KeyType Glean.Schema.Hack.Types.SearchTraitByName =
+       Glean.Schema.Hack.Types.SearchTraitByName_key
+  getName _proxy = Glean.PredicateRef "hack.SearchTraitByName" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.searchTraitByName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.SearchTraitByName x k
+  getFactKey = Glean.Schema.Hack.Types.searchTraitByName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 2496 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.SearchTraitByName where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 2502 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.DeclarationComment_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.DeclarationComment_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.DeclarationComment_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.DeclarationComment_key" (Prelude.Just 0))
+{-# LINE 2513 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.DeclarationComment_key =
+     'Angle.TField "declaration" (Glean.Schema.Hack.Types.Declaration)
+       ('Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
+          ('Angle.TField "span" (Glean.Schema.Src.Types.ByteSpan)
+             ('Angle.TNoFields)))
+{-# LINE 2515 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.DeclarationComment
+         where
+  type KeyType Glean.Schema.Hack.Types.DeclarationComment =
+       Glean.Schema.Hack.Types.DeclarationComment_key
+  getName _proxy = Glean.PredicateRef "hack.DeclarationComment" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.declarationComment_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.DeclarationComment x k
+  getFactKey = Glean.Schema.Hack.Types.declarationComment_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 2524 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.DeclarationComment
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 2530 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.AttributeToDeclaration_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.AttributeToDeclaration_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.AttributeToDeclaration_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.AttributeToDeclaration_key"
+           (Prelude.Just 0))
+{-# LINE 2541 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.Hack.Types.AttributeToDeclaration_key
+     =
+     'Angle.TField "attribute"
+       (Glean.KeyType Glean.Schema.Hack.Types.UserAttribute)
+       ('Angle.TField "declaration" (Glean.Schema.Hack.Types.Declaration)
+          ('Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
+             ('Angle.TNoFields)))
+{-# LINE 2543 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Hack.Types.AttributeToDeclaration
+         where
+  type KeyType Glean.Schema.Hack.Types.AttributeToDeclaration =
+       Glean.Schema.Hack.Types.AttributeToDeclaration_key
+  getName _proxy = Glean.PredicateRef "hack.AttributeToDeclaration" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.attributeToDeclaration_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.AttributeToDeclaration x k
+  getFactKey = Glean.Schema.Hack.Types.attributeToDeclaration_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 2552 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.AttributeToDeclaration
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 2558 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.SearchModuleByName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.SearchModuleByName_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.SearchModuleByName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.SearchModuleByName_key" (Prelude.Just 0))
+{-# LINE 2567 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.SearchModuleByName_key =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "decl" (Glean.Schema.Hack.Types.Declaration)
+          ('Angle.TNoFields))
+{-# LINE 2569 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.SearchModuleByName
+         where
+  type KeyType Glean.Schema.Hack.Types.SearchModuleByName =
+       Glean.Schema.Hack.Types.SearchModuleByName_key
+  getName _proxy = Glean.PredicateRef "hack.SearchModuleByName" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.searchModuleByName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.SearchModuleByName x k
+  getFactKey = Glean.Schema.Hack.Types.searchModuleByName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 2578 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.SearchModuleByName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 2584 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.Type where
+  type KeyType Glean.Schema.Hack.Types.Type = Data.Text.Text
+  getName _proxy = Glean.PredicateRef "hack.Type" 6
+  getId = Glean.IdOf . Glean.Fid . Glean.Schema.Hack.Types.type_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.Type x k
+  getFactKey = Glean.Schema.Hack.Types.type_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 2592 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.Type where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 2598 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.ClassConstDefinition_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.ClassConstDefinition_key x1 x2 x3 x4)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.ClassConstDefinition_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.ClassConstDefinition_key" (Prelude.Just 0))
+{-# LINE 2611 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.ClassConstDefinition_key
+     =
+     'Angle.TField "declaration"
+       (Glean.KeyType Glean.Schema.Hack.Types.ClassConstDeclaration)
+       ('Angle.TField "type" (Prelude.Maybe Glean.Schema.Hack.Types.Type)
+          ('Angle.TField "value" (Prelude.Maybe Data.Text.Text)
+             ('Angle.TField "typeInfo"
+                (Prelude.Maybe Glean.Schema.Hack.Types.TypeInfo)
+                ('Angle.TNoFields))))
+{-# LINE 2613 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Hack.Types.ClassConstDefinition
+         where
+  type KeyType Glean.Schema.Hack.Types.ClassConstDefinition =
+       Glean.Schema.Hack.Types.ClassConstDefinition_key
+  getName _proxy = Glean.PredicateRef "hack.ClassConstDefinition" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.classConstDefinition_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.ClassConstDefinition x k
+  getFactKey = Glean.Schema.Hack.Types.classConstDefinition_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 2622 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.ClassConstDefinition
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 2628 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.GlobalConstDefinition_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.GlobalConstDefinition_key x1 x2 x3 x4)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.GlobalConstDefinition_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.GlobalConstDefinition_key" (Prelude.Just 0))
+{-# LINE 2641 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.Hack.Types.GlobalConstDefinition_key
+     =
+     'Angle.TField "declaration"
+       (Glean.KeyType Glean.Schema.Hack.Types.GlobalConstDeclaration)
+       ('Angle.TField "type" (Prelude.Maybe Glean.Schema.Hack.Types.Type)
+          ('Angle.TField "value" (Data.Text.Text)
+             ('Angle.TField "typeInfo"
+                (Prelude.Maybe Glean.Schema.Hack.Types.TypeInfo)
+                ('Angle.TNoFields))))
+{-# LINE 2643 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Hack.Types.GlobalConstDefinition
+         where
+  type KeyType Glean.Schema.Hack.Types.GlobalConstDefinition =
+       Glean.Schema.Hack.Types.GlobalConstDefinition_key
+  getName _proxy = Glean.PredicateRef "hack.GlobalConstDefinition" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.globalConstDefinition_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.GlobalConstDefinition x k
+  getFactKey = Glean.Schema.Hack.Types.globalConstDefinition_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 2652 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.GlobalConstDefinition
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 2658 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.SearchEnumeratorByName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.SearchEnumeratorByName_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.SearchEnumeratorByName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.SearchEnumeratorByName_key"
+           (Prelude.Just 0))
+{-# LINE 2669 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.Hack.Types.SearchEnumeratorByName_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "parent"
+          (Glean.KeyType Glean.Schema.Hack.Types.QName)
+          ('Angle.TField "decl" (Glean.Schema.Hack.Types.Declaration)
+             ('Angle.TNoFields)))
+{-# LINE 2671 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Hack.Types.SearchEnumeratorByName
+         where
+  type KeyType Glean.Schema.Hack.Types.SearchEnumeratorByName =
+       Glean.Schema.Hack.Types.SearchEnumeratorByName_key
+  getName _proxy = Glean.PredicateRef "hack.SearchEnumeratorByName" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.searchEnumeratorByName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.SearchEnumeratorByName x k
+  getFactKey = Glean.Schema.Hack.Types.searchEnumeratorByName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 2680 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.SearchEnumeratorByName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 2686 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.PropertyDeclaration_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.PropertyDeclaration_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.PropertyDeclaration_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.PropertyDeclaration_key" (Prelude.Just 0))
+{-# LINE 2695 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.PropertyDeclaration_key
+     =
+     'Angle.TField "name" (Glean.KeyType Glean.Schema.Hack.Types.Name)
+       ('Angle.TField "container"
+          (Glean.Schema.Hack.Types.ContainerDeclaration)
+          ('Angle.TNoFields))
+{-# LINE 2697 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Hack.Types.PropertyDeclaration
+         where
+  type KeyType Glean.Schema.Hack.Types.PropertyDeclaration =
+       Glean.Schema.Hack.Types.PropertyDeclaration_key
+  getName _proxy = Glean.PredicateRef "hack.PropertyDeclaration" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.propertyDeclaration_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.PropertyDeclaration x k
+  getFactKey = Glean.Schema.Hack.Types.propertyDeclaration_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 2706 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.PropertyDeclaration
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 2712 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.SearchTypedefByLowerCaseName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.SearchTypedefByLowerCaseName_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.SearchTypedefByLowerCaseName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.SearchTypedefByLowerCaseName_key"
+           (Prelude.Just 0))
+{-# LINE 2721 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.Hack.Types.SearchTypedefByLowerCaseName_key
+     =
+     'Angle.TField "name_lowercase" (Data.Text.Text)
+       ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields))
+{-# LINE 2723 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Hack.Types.SearchTypedefByLowerCaseName
+         where
+  type KeyType Glean.Schema.Hack.Types.SearchTypedefByLowerCaseName =
+       Glean.Schema.Hack.Types.SearchTypedefByLowerCaseName_key
+  getName _proxy
+    = Glean.PredicateRef "hack.SearchTypedefByLowerCaseName" 6
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Hack.Types.searchTypedefByLowerCaseName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.SearchTypedefByLowerCaseName x k
+  getFactKey
+    = Glean.Schema.Hack.Types.searchTypedefByLowerCaseName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 2732 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Hack.Types.SearchTypedefByLowerCaseName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 2738 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Hack.Types.Context_ where
+  type KeyType Glean.Schema.Hack.Types.Context_ = Data.Text.Text
+  getName _proxy = Glean.PredicateRef "hack.Context_" 6
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Hack.Types.context__id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Hack.Types.Context_ x k
+  getFactKey = Glean.Schema.Hack.Types.context__key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 2746 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.Context_ where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 2752 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.ShapeKV where
+  buildRtsValue b (Glean.Schema.Hack.Types.ShapeKV x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.ShapeKV <$> Glean.decodeRtsValue <*>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.ShapeKV" (Prelude.Just 6))
+{-# LINE 2763 "glean/schema/thrift/hack_include.hs" #-}
+type instance Angle.RecordFields Glean.Schema.Hack.Types.ShapeKV =
+     'Angle.TField "key" (Glean.Schema.Hack.Types.ShapeKV_key)
+       ('Angle.TField "value" (Glean.KeyType Glean.Schema.Hack.Types.Hint)
+          ('Angle.TField "opt" (Prelude.Bool) ('Angle.TNoFields)))
+{-# LINE 2765 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.Occurrence where
+  buildRtsValue b Glean.Schema.Hack.Types.Occurrence_EMPTY
+    = Glean.buildRtsSelector b 1
+  buildRtsValue b (Glean.Schema.Hack.Types.Occurrence_method x)
+    = do Glean.buildRtsSelector b 0
+         Glean.buildRtsValue b x
+  decodeRtsValue
+    = Glean.sumD
+        (Prelude.pure Glean.Schema.Hack.Types.Occurrence_EMPTY)
+        [Glean.mapD Glean.Schema.Hack.Types.Occurrence_method]
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.Occurrence" (Prelude.Just 6))
+{-# LINE 2777 "glean/schema/thrift/hack_include.hs" #-}
+type instance Angle.SumFields Glean.Schema.Hack.Types.Occurrence =
+     'Angle.TField "method"
+       (Glean.KeyType Glean.Schema.Hack.Types.MethodOccurrence)
+       ('Angle.TNoFields)
+{-# LINE 2779 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.ConstraintKind where
+  buildRtsValue = Glean.thriftEnum_buildRtsValue
+  decodeRtsValue = Glean.thriftEnumD
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.ConstraintKind" (Prelude.Just 6))
+{-# LINE 2784 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.SumFields Glean.Schema.Hack.Types.ConstraintKind =
+     'Angle.TField "As" (Glean.Schema.Builtin.Types.Unit)
+       ('Angle.TField "Equal" (Glean.Schema.Builtin.Types.Unit)
+          ('Angle.TField "Super" (Glean.Schema.Builtin.Types.Unit)
+             ('Angle.TNoFields)))
+{-# LINE 2786 "glean/schema/thrift/hack_include.hs" #-}
+instance Angle.AngleEnum Glean.Schema.Hack.Types.ConstraintKind
+         where
+  type AngleEnumTy Glean.Schema.Hack.Types.ConstraintKind =
+       Glean.Schema.Hack.Types.ConstraintKind
+  enumName v = Text.pack (Prelude.drop 15 (Prelude.show v))
+{-# LINE 2790 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.TypeConstKind where
+  buildRtsValue = Glean.thriftEnum_buildRtsValue
+  decodeRtsValue = Glean.thriftEnumD
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.TypeConstKind" (Prelude.Just 6))
+{-# LINE 2795 "glean/schema/thrift/hack_include.hs" #-}
+type instance Angle.SumFields Glean.Schema.Hack.Types.TypeConstKind
+     =
+     'Angle.TField "Abstract" (Glean.Schema.Builtin.Types.Unit)
+       ('Angle.TField "Concrete" (Glean.Schema.Builtin.Types.Unit)
+          ('Angle.TField "PartiallyAbstract"
+             (Glean.Schema.Builtin.Types.Unit)
+             ('Angle.TNoFields)))
+{-# LINE 2797 "glean/schema/thrift/hack_include.hs" #-}
+instance Angle.AngleEnum Glean.Schema.Hack.Types.TypeConstKind
+         where
+  type AngleEnumTy Glean.Schema.Hack.Types.TypeConstKind =
+       Glean.Schema.Hack.Types.TypeConstKind
+  enumName v = Text.pack (Prelude.drop 14 (Prelude.show v))
+{-# LINE 2801 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.FieldClassConst where
+  buildRtsValue b (Glean.Schema.Hack.Types.FieldClassConst x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.FieldClassConst <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.FieldClassConst" (Prelude.Just 6))
+{-# LINE 2810 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.FieldClassConst =
+     'Angle.TField "container"
+       (Glean.KeyType Glean.Schema.Hack.Types.QName)
+       ('Angle.TField "name" (Glean.KeyType Glean.Schema.Hack.Types.Name)
+          ('Angle.TNoFields))
+{-# LINE 2812 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.CallArgument where
+  buildRtsValue b (Glean.Schema.Hack.Types.CallArgument x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.CallArgument <$> Glean.decodeRtsValue <*>
+        Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.CallArgument" (Prelude.Just 6))
+{-# LINE 2821 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.CallArgument =
+     'Angle.TField "span" (Glean.Schema.Src.Types.RelByteSpan)
+       ('Angle.TField "argument"
+          (Prelude.Maybe Glean.Schema.Hack.Types.Argument)
+          ('Angle.TNoFields))
+{-# LINE 2823 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.Constraint where
+  buildRtsValue b (Glean.Schema.Hack.Types.Constraint x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.Constraint <$> Glean.decodeRtsValue <*>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.Constraint" (Prelude.Just 6))
+{-# LINE 2834 "glean/schema/thrift/hack_include.hs" #-}
+type instance Angle.RecordFields Glean.Schema.Hack.Types.Constraint
+     =
+     'Angle.TField "constraintKind"
+       (Glean.Schema.Hack.Types.ConstraintKind)
+       ('Angle.TField "type" (Glean.KeyType Glean.Schema.Hack.Types.Type)
+          ('Angle.TField "typeInfo"
+             (Prelude.Maybe Glean.Schema.Hack.Types.TypeInfo)
+             ('Angle.TNoFields)))
+{-# LINE 2836 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.Definition where
+  buildRtsValue b Glean.Schema.Hack.Types.Definition_EMPTY
+    = Glean.buildRtsSelector b 12
+  buildRtsValue b (Glean.Schema.Hack.Types.Definition_class_ x)
+    = do Glean.buildRtsSelector b 0
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Hack.Types.Definition_classConst x)
+    = do Glean.buildRtsSelector b 1
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Hack.Types.Definition_enum_ x)
+    = do Glean.buildRtsSelector b 2
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Hack.Types.Definition_function_ x)
+    = do Glean.buildRtsSelector b 3
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Hack.Types.Definition_globalConst x)
+    = do Glean.buildRtsSelector b 4
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Hack.Types.Definition_interface_ x)
+    = do Glean.buildRtsSelector b 5
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Hack.Types.Definition_trait x)
+    = do Glean.buildRtsSelector b 6
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Hack.Types.Definition_method x)
+    = do Glean.buildRtsSelector b 7
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Hack.Types.Definition_property_ x)
+    = do Glean.buildRtsSelector b 8
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Hack.Types.Definition_typeConst x)
+    = do Glean.buildRtsSelector b 9
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Hack.Types.Definition_typedef_ x)
+    = do Glean.buildRtsSelector b 10
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Hack.Types.Definition_module x)
+    = do Glean.buildRtsSelector b 11
+         Glean.buildRtsValue b x
+  decodeRtsValue
+    = Glean.sumD
+        (Prelude.pure Glean.Schema.Hack.Types.Definition_EMPTY)
+        [Glean.mapD Glean.Schema.Hack.Types.Definition_class_,
+         Glean.mapD Glean.Schema.Hack.Types.Definition_classConst,
+         Glean.mapD Glean.Schema.Hack.Types.Definition_enum_,
+         Glean.mapD Glean.Schema.Hack.Types.Definition_function_,
+         Glean.mapD Glean.Schema.Hack.Types.Definition_globalConst,
+         Glean.mapD Glean.Schema.Hack.Types.Definition_interface_,
+         Glean.mapD Glean.Schema.Hack.Types.Definition_trait,
+         Glean.mapD Glean.Schema.Hack.Types.Definition_method,
+         Glean.mapD Glean.Schema.Hack.Types.Definition_property_,
+         Glean.mapD Glean.Schema.Hack.Types.Definition_typeConst,
+         Glean.mapD Glean.Schema.Hack.Types.Definition_typedef_,
+         Glean.mapD Glean.Schema.Hack.Types.Definition_module]
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.Definition" (Prelude.Just 6))
+{-# LINE 2892 "glean/schema/thrift/hack_include.hs" #-}
+type instance Angle.SumFields Glean.Schema.Hack.Types.Definition =
+     'Angle.TField "class_"
+       (Glean.KeyType Glean.Schema.Hack.Types.ClassDefinition)
+       ('Angle.TField "classConst"
+          (Glean.KeyType Glean.Schema.Hack.Types.ClassConstDefinition)
+          ('Angle.TField "enum_"
+             (Glean.KeyType Glean.Schema.Hack.Types.EnumDefinition)
+             ('Angle.TField "function_"
+                (Glean.KeyType Glean.Schema.Hack.Types.FunctionDefinition)
+                ('Angle.TField "globalConst"
+                   (Glean.KeyType Glean.Schema.Hack.Types.GlobalConstDefinition)
+                   ('Angle.TField "interface_"
+                      (Glean.KeyType Glean.Schema.Hack.Types.InterfaceDefinition)
+                      ('Angle.TField "trait"
+                         (Glean.KeyType Glean.Schema.Hack.Types.TraitDefinition)
+                         ('Angle.TField "method"
+                            (Glean.KeyType Glean.Schema.Hack.Types.MethodDefinition)
+                            ('Angle.TField "property_"
+                               (Glean.KeyType Glean.Schema.Hack.Types.PropertyDefinition)
+                               ('Angle.TField "typeConst"
+                                  (Glean.KeyType Glean.Schema.Hack.Types.TypeConstDefinition)
+                                  ('Angle.TField "typedef_"
+                                     (Glean.KeyType Glean.Schema.Hack.Types.TypedefDefinition)
+                                     ('Angle.TField "module"
+                                        (Glean.KeyType Glean.Schema.Hack.Types.ModuleDefinition)
+                                        ('Angle.TNoFields))))))))))))
+{-# LINE 2894 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.ReifyKind where
+  buildRtsValue = Glean.thriftEnum_buildRtsValue
+  decodeRtsValue = Glean.thriftEnumD
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.ReifyKind" (Prelude.Just 6))
+{-# LINE 2899 "glean/schema/thrift/hack_include.hs" #-}
+type instance Angle.SumFields Glean.Schema.Hack.Types.ReifyKind =
+     'Angle.TField "Erased" (Glean.Schema.Builtin.Types.Unit)
+       ('Angle.TField "Reified" (Glean.Schema.Builtin.Types.Unit)
+          ('Angle.TField "SoftReified" (Glean.Schema.Builtin.Types.Unit)
+             ('Angle.TNoFields)))
+{-# LINE 2901 "glean/schema/thrift/hack_include.hs" #-}
+instance Angle.AngleEnum Glean.Schema.Hack.Types.ReifyKind where
+  type AngleEnumTy Glean.Schema.Hack.Types.ReifyKind =
+       Glean.Schema.Hack.Types.ReifyKind
+  enumName v = Text.pack (Prelude.drop 10 (Prelude.show v))
+{-# LINE 2905 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.XRef where
+  buildRtsValue b (Glean.Schema.Hack.Types.XRef x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.XRef <$> Glean.decodeRtsValue <*>
+        Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy () (Angle.SourceRef "hack.XRef" (Prelude.Just 6))
+{-# LINE 2914 "glean/schema/thrift/hack_include.hs" #-}
+type instance Angle.RecordFields Glean.Schema.Hack.Types.XRef =
+     'Angle.TField "target" (Glean.Schema.Hack.Types.XRefTarget)
+       ('Angle.TField "ranges" ([Glean.Schema.Src.Types.RelByteSpan])
+          ('Angle.TNoFields))
+{-# LINE 2916 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.Parameter where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.Parameter x1 x2 x3 x4 x5 x6 x7 x8)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+         Glean.buildRtsValue b x5
+         Glean.buildRtsValue b x6
+         Glean.buildRtsValue b x7
+         Glean.buildRtsValue b x8
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.Parameter <$> Glean.decodeRtsValue <*>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.Parameter" (Prelude.Just 6))
+{-# LINE 2937 "glean/schema/thrift/hack_include.hs" #-}
+type instance Angle.RecordFields Glean.Schema.Hack.Types.Parameter
+     =
+     'Angle.TField "name" (Glean.KeyType Glean.Schema.Hack.Types.Name)
+       ('Angle.TField "type" (Prelude.Maybe Glean.Schema.Hack.Types.Type)
+          ('Angle.TField "isInout" (Prelude.Bool)
+             ('Angle.TField "isVariadic" (Prelude.Bool)
+                ('Angle.TField "defaultValue" (Prelude.Maybe Data.Text.Text)
+                   ('Angle.TField "attributes"
+                      ([Glean.Schema.Hack.Types.UserAttribute])
+                      ('Angle.TField "typeInfo"
+                         (Prelude.Maybe Glean.Schema.Hack.Types.TypeInfo)
+                         ('Angle.TField "readonly"
+                            (Prelude.Maybe Glean.Schema.Hack.Types.ReadonlyKind)
+                            ('Angle.TNoFields))))))))
+{-# LINE 2939 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.ModuleMembership where
+  buildRtsValue b (Glean.Schema.Hack.Types.ModuleMembership x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.ModuleMembership <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.ModuleMembership" (Prelude.Just 6))
+{-# LINE 2948 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.ModuleMembership =
+     'Angle.TField "declaration"
+       (Glean.KeyType Glean.Schema.Hack.Types.ModuleDeclaration)
+       ('Angle.TField "internal" (Prelude.Bool) ('Angle.TNoFields))
+{-# LINE 2950 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.ReadonlyKind where
+  buildRtsValue = Glean.thriftEnum_buildRtsValue
+  decodeRtsValue = Glean.thriftEnumD
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.ReadonlyKind" (Prelude.Just 6))
+{-# LINE 2955 "glean/schema/thrift/hack_include.hs" #-}
+type instance Angle.SumFields Glean.Schema.Hack.Types.ReadonlyKind
+     =
+     'Angle.TField "Readonly" (Glean.Schema.Builtin.Types.Unit)
+       ('Angle.TNoFields)
+{-# LINE 2957 "glean/schema/thrift/hack_include.hs" #-}
+instance Angle.AngleEnum Glean.Schema.Hack.Types.ReadonlyKind where
+  type AngleEnumTy Glean.Schema.Hack.Types.ReadonlyKind =
+       Glean.Schema.Hack.Types.ReadonlyKind
+  enumName v = Text.pack (Prelude.drop 13 (Prelude.show v))
+{-# LINE 2961 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.XRefTarget where
+  buildRtsValue b Glean.Schema.Hack.Types.XRefTarget_EMPTY
+    = Glean.buildRtsSelector b 2
+  buildRtsValue b (Glean.Schema.Hack.Types.XRefTarget_declaration x)
+    = do Glean.buildRtsSelector b 0
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Hack.Types.XRefTarget_occurrence x)
+    = do Glean.buildRtsSelector b 1
+         Glean.buildRtsValue b x
+  decodeRtsValue
+    = Glean.sumD
+        (Prelude.pure Glean.Schema.Hack.Types.XRefTarget_EMPTY)
+        [Glean.mapD Glean.Schema.Hack.Types.XRefTarget_declaration,
+         Glean.mapD Glean.Schema.Hack.Types.XRefTarget_occurrence]
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.XRefTarget" (Prelude.Just 6))
+{-# LINE 2977 "glean/schema/thrift/hack_include.hs" #-}
+type instance Angle.SumFields Glean.Schema.Hack.Types.XRefTarget =
+     'Angle.TField "declaration" (Glean.Schema.Hack.Types.Declaration)
+       ('Angle.TField "occurrence" (Glean.Schema.Hack.Types.Occurrence)
+          ('Angle.TNoFields))
+{-# LINE 2979 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.TypeParameter where
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.TypeParameter x1 x2 x3 x4 x5)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+         Glean.buildRtsValue b x5
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.TypeParameter <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.TypeParameter" (Prelude.Just 6))
+{-# LINE 2994 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.TypeParameter =
+     'Angle.TField "name" (Glean.KeyType Glean.Schema.Hack.Types.Name)
+       ('Angle.TField "variance" (Glean.Schema.Hack.Types.Variance)
+          ('Angle.TField "reifyKind" (Glean.Schema.Hack.Types.ReifyKind)
+             ('Angle.TField "constraints" ([Glean.Schema.Hack.Types.Constraint])
+                ('Angle.TField "attributes"
+                   ([Glean.Schema.Hack.Types.UserAttribute])
+                   ('Angle.TNoFields)))))
+{-# LINE 2996 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.ContainerDeclaration
+         where
+  buildRtsValue b Glean.Schema.Hack.Types.ContainerDeclaration_EMPTY
+    = Glean.buildRtsSelector b 4
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.ContainerDeclaration_class_ x)
+    = do Glean.buildRtsSelector b 0
+         Glean.buildRtsValue b x
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.ContainerDeclaration_enum_ x)
+    = do Glean.buildRtsSelector b 1
+         Glean.buildRtsValue b x
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.ContainerDeclaration_interface_ x)
+    = do Glean.buildRtsSelector b 2
+         Glean.buildRtsValue b x
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.ContainerDeclaration_trait x)
+    = do Glean.buildRtsSelector b 3
+         Glean.buildRtsValue b x
+  decodeRtsValue
+    = Glean.sumD
+        (Prelude.pure Glean.Schema.Hack.Types.ContainerDeclaration_EMPTY)
+        [Glean.mapD Glean.Schema.Hack.Types.ContainerDeclaration_class_,
+         Glean.mapD Glean.Schema.Hack.Types.ContainerDeclaration_enum_,
+         Glean.mapD Glean.Schema.Hack.Types.ContainerDeclaration_interface_,
+         Glean.mapD Glean.Schema.Hack.Types.ContainerDeclaration_trait]
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.ContainerDeclaration" (Prelude.Just 6))
+{-# LINE 3020 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.SumFields Glean.Schema.Hack.Types.ContainerDeclaration =
+     'Angle.TField "class_"
+       (Glean.KeyType Glean.Schema.Hack.Types.ClassDeclaration)
+       ('Angle.TField "enum_"
+          (Glean.KeyType Glean.Schema.Hack.Types.EnumDeclaration)
+          ('Angle.TField "interface_"
+             (Glean.KeyType Glean.Schema.Hack.Types.InterfaceDeclaration)
+             ('Angle.TField "trait"
+                (Glean.KeyType Glean.Schema.Hack.Types.TraitDeclaration)
+                ('Angle.TNoFields))))
+{-# LINE 3022 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.Argument where
+  buildRtsValue b Glean.Schema.Hack.Types.Argument_EMPTY
+    = Glean.buildRtsSelector b 2
+  buildRtsValue b (Glean.Schema.Hack.Types.Argument_lit x)
+    = do Glean.buildRtsSelector b 0
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Hack.Types.Argument_xref x)
+    = do Glean.buildRtsSelector b 1
+         Glean.buildRtsValue b x
+  decodeRtsValue
+    = Glean.sumD (Prelude.pure Glean.Schema.Hack.Types.Argument_EMPTY)
+        [Glean.mapD Glean.Schema.Hack.Types.Argument_lit,
+         Glean.mapD Glean.Schema.Hack.Types.Argument_xref]
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.Argument" (Prelude.Just 6))
+{-# LINE 3038 "glean/schema/thrift/hack_include.hs" #-}
+type instance Angle.SumFields Glean.Schema.Hack.Types.Argument =
+     'Angle.TField "lit"
+       (Glean.KeyType Glean.Schema.Hack.Types.StringLiteral)
+       ('Angle.TField "xref" (Glean.Schema.Hack.Types.XRefTarget)
+          ('Angle.TNoFields))
+{-# LINE 3040 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.Variance where
+  buildRtsValue = Glean.thriftEnum_buildRtsValue
+  decodeRtsValue = Glean.thriftEnumD
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.Variance" (Prelude.Just 6))
+{-# LINE 3045 "glean/schema/thrift/hack_include.hs" #-}
+type instance Angle.SumFields Glean.Schema.Hack.Types.Variance =
+     'Angle.TField "Contravariant" (Glean.Schema.Builtin.Types.Unit)
+       ('Angle.TField "Covariant" (Glean.Schema.Builtin.Types.Unit)
+          ('Angle.TField "Invariant" (Glean.Schema.Builtin.Types.Unit)
+             ('Angle.TNoFields)))
+{-# LINE 3047 "glean/schema/thrift/hack_include.hs" #-}
+instance Angle.AngleEnum Glean.Schema.Hack.Types.Variance where
+  type AngleEnumTy Glean.Schema.Hack.Types.Variance =
+       Glean.Schema.Hack.Types.Variance
+  enumName v = Text.pack (Prelude.drop 9 (Prelude.show v))
+{-# LINE 3051 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.Visibility where
+  buildRtsValue = Glean.thriftEnum_buildRtsValue
+  decodeRtsValue = Glean.thriftEnumD
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.Visibility" (Prelude.Just 6))
+{-# LINE 3056 "glean/schema/thrift/hack_include.hs" #-}
+type instance Angle.SumFields Glean.Schema.Hack.Types.Visibility =
+     'Angle.TField "Private" (Glean.Schema.Builtin.Types.Unit)
+       ('Angle.TField "Protected" (Glean.Schema.Builtin.Types.Unit)
+          ('Angle.TField "Public" (Glean.Schema.Builtin.Types.Unit)
+             ('Angle.TField "Internal" (Glean.Schema.Builtin.Types.Unit)
+                ('Angle.TField "ProtectedInternal"
+                   (Glean.Schema.Builtin.Types.Unit)
+                   ('Angle.TNoFields)))))
+{-# LINE 3058 "glean/schema/thrift/hack_include.hs" #-}
+instance Angle.AngleEnum Glean.Schema.Hack.Types.Visibility where
+  type AngleEnumTy Glean.Schema.Hack.Types.Visibility =
+       Glean.Schema.Hack.Types.Visibility
+  enumName v = Text.pack (Prelude.drop 11 (Prelude.show v))
+{-# LINE 3062 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.Declaration where
+  buildRtsValue b Glean.Schema.Hack.Types.Declaration_EMPTY
+    = Glean.buildRtsSelector b 11
+  buildRtsValue b (Glean.Schema.Hack.Types.Declaration_classConst x)
+    = do Glean.buildRtsSelector b 0
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Hack.Types.Declaration_container x)
+    = do Glean.buildRtsSelector b 1
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Hack.Types.Declaration_enumerator x)
+    = do Glean.buildRtsSelector b 2
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Hack.Types.Declaration_function_ x)
+    = do Glean.buildRtsSelector b 3
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Hack.Types.Declaration_globalConst x)
+    = do Glean.buildRtsSelector b 4
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Hack.Types.Declaration_namespace_ x)
+    = do Glean.buildRtsSelector b 5
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Hack.Types.Declaration_method x)
+    = do Glean.buildRtsSelector b 6
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Hack.Types.Declaration_property_ x)
+    = do Glean.buildRtsSelector b 7
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Hack.Types.Declaration_typeConst x)
+    = do Glean.buildRtsSelector b 8
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Hack.Types.Declaration_typedef_ x)
+    = do Glean.buildRtsSelector b 9
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Hack.Types.Declaration_module x)
+    = do Glean.buildRtsSelector b 10
+         Glean.buildRtsValue b x
+  decodeRtsValue
+    = Glean.sumD
+        (Prelude.pure Glean.Schema.Hack.Types.Declaration_EMPTY)
+        [Glean.mapD Glean.Schema.Hack.Types.Declaration_classConst,
+         Glean.mapD Glean.Schema.Hack.Types.Declaration_container,
+         Glean.mapD Glean.Schema.Hack.Types.Declaration_enumerator,
+         Glean.mapD Glean.Schema.Hack.Types.Declaration_function_,
+         Glean.mapD Glean.Schema.Hack.Types.Declaration_globalConst,
+         Glean.mapD Glean.Schema.Hack.Types.Declaration_namespace_,
+         Glean.mapD Glean.Schema.Hack.Types.Declaration_method,
+         Glean.mapD Glean.Schema.Hack.Types.Declaration_property_,
+         Glean.mapD Glean.Schema.Hack.Types.Declaration_typeConst,
+         Glean.mapD Glean.Schema.Hack.Types.Declaration_typedef_,
+         Glean.mapD Glean.Schema.Hack.Types.Declaration_module]
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.Declaration" (Prelude.Just 6))
+{-# LINE 3114 "glean/schema/thrift/hack_include.hs" #-}
+type instance Angle.SumFields Glean.Schema.Hack.Types.Declaration =
+     'Angle.TField "classConst"
+       (Glean.KeyType Glean.Schema.Hack.Types.ClassConstDeclaration)
+       ('Angle.TField "container"
+          (Glean.Schema.Hack.Types.ContainerDeclaration)
+          ('Angle.TField "enumerator"
+             (Glean.KeyType Glean.Schema.Hack.Types.Enumerator)
+             ('Angle.TField "function_"
+                (Glean.KeyType Glean.Schema.Hack.Types.FunctionDeclaration)
+                ('Angle.TField "globalConst"
+                   (Glean.KeyType Glean.Schema.Hack.Types.GlobalConstDeclaration)
+                   ('Angle.TField "namespace_"
+                      (Glean.KeyType Glean.Schema.Hack.Types.NamespaceDeclaration)
+                      ('Angle.TField "method"
+                         (Glean.KeyType Glean.Schema.Hack.Types.MethodDeclaration)
+                         ('Angle.TField "property_"
+                            (Glean.KeyType Glean.Schema.Hack.Types.PropertyDeclaration)
+                            ('Angle.TField "typeConst"
+                               (Glean.KeyType Glean.Schema.Hack.Types.TypeConstDeclaration)
+                               ('Angle.TField "typedef_"
+                                  (Glean.KeyType Glean.Schema.Hack.Types.TypedefDeclaration)
+                                  ('Angle.TField "module"
+                                     (Glean.KeyType Glean.Schema.Hack.Types.ModuleDeclaration)
+                                     ('Angle.TNoFields)))))))))))
+{-# LINE 3116 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.Hint_apply_ where
+  buildRtsValue b (Glean.Schema.Hack.Types.Hint_apply_ x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.Hint_apply_ <$> Glean.decodeRtsValue <*>
+        Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.Hint_apply_" (Prelude.Just 0))
+{-# LINE 3125 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.Hint_apply_ =
+     'Angle.TField "class_name"
+       (Glean.KeyType Glean.Schema.Hack.Types.QName)
+       ('Angle.TField "values" ([Glean.Schema.Hack.Types.Hint])
+          ('Angle.TNoFields))
+{-# LINE 3127 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.Hint_tuple_ where
+  buildRtsValue b (Glean.Schema.Hack.Types.Hint_tuple_ x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.Hint_tuple_ <$> Glean.decodeRtsValue <*>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.Hint_tuple_" (Prelude.Just 0))
+{-# LINE 3138 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.Hint_tuple_ =
+     'Angle.TField "req" ([Glean.Schema.Hack.Types.Hint])
+       ('Angle.TField "opt" ([Glean.Schema.Hack.Types.Hint])
+          ('Angle.TField "variadic"
+             (Prelude.Maybe Glean.Schema.Hack.Types.Hint)
+             ('Angle.TNoFields)))
+{-# LINE 3140 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.Hint_shape_ where
+  buildRtsValue b (Glean.Schema.Hack.Types.Hint_shape_ x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.Hint_shape_ <$> Glean.decodeRtsValue <*>
+        Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.Hint_shape_" (Prelude.Just 0))
+{-# LINE 3149 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.Hint_shape_ =
+     'Angle.TField "open_" (Prelude.Bool)
+       ('Angle.TField "map_" ([Glean.Schema.Hack.Types.ShapeKV])
+          ('Angle.TNoFields))
+{-# LINE 3151 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.Hint_vect_or_dict_
+         where
+  buildRtsValue b (Glean.Schema.Hack.Types.Hint_vect_or_dict_ x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Hack.Types.Hint_vect_or_dict_ <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.Hint_vect_or_dict_" (Prelude.Just 0))
+{-# LINE 3160 "glean/schema/thrift/hack_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Hack.Types.Hint_vect_or_dict_ =
+     'Angle.TField "maybe_key"
+       (Prelude.Maybe Glean.Schema.Hack.Types.Hint)
+       ('Angle.TField "value_"
+          (Glean.KeyType Glean.Schema.Hack.Types.Hint)
+          ('Angle.TNoFields))
+{-# LINE 3162 "glean/schema/thrift/hack_include.hs" #-}
+instance Glean.Type Glean.Schema.Hack.Types.ShapeKV_key where
+  buildRtsValue b Glean.Schema.Hack.Types.ShapeKV_key_EMPTY
+    = Glean.buildRtsSelector b 3
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.ShapeKV_key_sf_regex_group x)
+    = do Glean.buildRtsSelector b 0
+         Glean.buildRtsValue b x
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.ShapeKV_key_sf_lit_string x)
+    = do Glean.buildRtsSelector b 1
+         Glean.buildRtsValue b x
+  buildRtsValue b
+    (Glean.Schema.Hack.Types.ShapeKV_key_sf_class_const x)
+    = do Glean.buildRtsSelector b 2
+         Glean.buildRtsValue b x
+  decodeRtsValue
+    = Glean.sumD
+        (Prelude.pure Glean.Schema.Hack.Types.ShapeKV_key_EMPTY)
+        [Glean.mapD Glean.Schema.Hack.Types.ShapeKV_key_sf_regex_group,
+         Glean.mapD Glean.Schema.Hack.Types.ShapeKV_key_sf_lit_string,
+         Glean.mapD Glean.Schema.Hack.Types.ShapeKV_key_sf_class_const]
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "hack.ShapeKV_key" (Prelude.Just 0))
+{-# LINE 3182 "glean/schema/thrift/hack_include.hs" #-}
 type instance Angle.SumFields Glean.Schema.Hack.Types.ShapeKV_key =
      'Angle.TField "sf_regex_group" (Data.Text.Text)
        ('Angle.TField "sf_lit_string" (Data.Text.Text)
diff --git a/glean/schema/thrift/gen-hs2/Glean/Schema/LsifTypes/Types.hs b/glean/schema/thrift/gen-hs2/Glean/Schema/LsifTypes/Types.hs
--- a/glean/schema/thrift/gen-hs2/Glean/Schema/LsifTypes/Types.hs
+++ b/glean/schema/thrift/gen-hs2/Glean/Schema/LsifTypes/Types.hs
@@ -20,7 +20,10 @@
 {-# OPTIONS_GHC -fno-warn-incomplete-record-updates#-}
 {-# LANGUAGE GeneralizedNewtypeDeriving #-}
 module Glean.Schema.LsifTypes.Types
-       (pREDICATE_VERSIONS, ToSrcRange_id,
+       (pREDICATE_VERSIONS, RangeSpanContains_id,
+        RangeSpanContains(RangeSpanContains, rangeSpanContains_id,
+                          rangeSpanContains_key),
+        ToSrcRange_id,
         ToSrcRange(ToSrcRange, toSrcRange_id, toSrcRange_key),
         FromSrcRange_id,
         FromSrcRange(FromSrcRange, fromSrcRange_id, fromSrcRange_key),
@@ -38,6 +41,8 @@
                    SymbolKind_Unknown, SymbolKind__UNKNOWN),
         RangeSpan(RangeSpan, rangeSpan_lineBegin, rangeSpan_columnBegin,
                   rangeSpan_lineEnd, rangeSpan_columnEnd),
+        RangeSpanContains_key(RangeSpanContains_key,
+                              rangeSpanContains_key_inner, rangeSpanContains_key_outer),
         ToSrcRange_key(ToSrcRange_key, toSrcRange_key_file,
                        toSrcRange_key_lsif, toSrcRange_key_range),
         LanguageId(LanguageId_ABAP, LanguageId_WindowsBat,
@@ -114,12 +119,92 @@
 import qualified Glean.Schema.Builtin.Types
 {-# LINE 15 "glean/schema/thrift/lsif_types_include.hs" #-}
 import qualified Glean.Schema.Src.Types
-{-# LINE 118 ".build/def/codegen/thrift-schema-hs/glean/schema/thrift/gen-hs2/Glean/Schema/LsifTypes/Types.hs" #-}
+{-# LINE 123 ".build/def/codegen/thrift-schema-hs/glean/schema/thrift/gen-hs2/Glean/Schema/LsifTypes/Types.hs" #-}
 
 pREDICATE_VERSIONS :: Map.Map Text.Text Int.Int64
 pREDICATE_VERSIONS
-  = Map.fromList [("ToSrcRange", 1), ("FromSrcRange", 1)]
+  = Map.fromList
+      [("ToSrcRange", 1), ("RangeSpanContains", 1), ("FromSrcRange", 1)]
 
+type RangeSpanContains_id = Glean.Id
+
+data RangeSpanContains = RangeSpanContains{rangeSpanContains_id ::
+                                           {-# UNPACK #-} !RangeSpanContains_id,
+                                           rangeSpanContains_key ::
+                                           Prelude.Maybe RangeSpanContains_key}
+                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON RangeSpanContains where
+  toJSON (RangeSpanContains __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct RangeSpanContains where
+  buildStruct _proxy (RangeSpanContains __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (RangeSpanContains __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData RangeSpanContains where
+  rnf (RangeSpanContains __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default RangeSpanContains where
+  def = RangeSpanContains Default.def Prelude.Nothing
+
+instance Hashable.Hashable RangeSpanContains where
+  hashWithSalt __salt (RangeSpanContains _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
 type ToSrcRange_id = Glean.Id
 
 data ToSrcRange = ToSrcRange{toSrcRange_id ::
@@ -663,6 +748,79 @@
            _lineEnd)
         _columnEnd
 
+data RangeSpanContains_key = RangeSpanContains_key{rangeSpanContains_key_inner
+                                                   :: RangeSpan,
+                                                   rangeSpanContains_key_outer :: RangeSpan}
+                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON RangeSpanContains_key where
+  toJSON (RangeSpanContains_key __field__inner __field__outer)
+    = Aeson.object
+        ("inner" .= __field__inner :
+           "outer" .= __field__outer : Prelude.mempty)
+
+instance Thrift.ThriftStruct RangeSpanContains_key where
+  buildStruct _proxy
+    (RangeSpanContains_key __field__inner __field__outer)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "inner" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__inner)
+           :
+           Thrift.genField _proxy "outer" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__outer)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__inner <- ST.newSTRef Default.def
+            __field__outer <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__inner
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__outer
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__inner <- ST.readSTRef __field__inner
+                                             !__val__outer <- ST.readSTRef __field__outer
+                                             Prelude.pure
+                                               (RangeSpanContains_key __val__inner __val__outer)
+              _idMap = HashMap.fromList [("inner", 1), ("outer", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData RangeSpanContains_key where
+  rnf (RangeSpanContains_key __field__inner __field__outer)
+    = DeepSeq.rnf __field__inner `Prelude.seq`
+        DeepSeq.rnf __field__outer `Prelude.seq` ()
+
+instance Default.Default RangeSpanContains_key where
+  def = RangeSpanContains_key Default.def Default.def
+
+instance Hashable.Hashable RangeSpanContains_key where
+  hashWithSalt __salt (RangeSpanContains_key _inner _outer)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _inner)
+        _outer
+
 data ToSrcRange_key = ToSrcRange_key{toSrcRange_key_file ::
                                      Glean.Schema.Src.File,
                                      toSrcRange_key_lsif :: RangeSpan,
@@ -1166,6 +1324,52 @@
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
 {-# LINE 46 "glean/schema/thrift/lsif_types_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.LsifTypes.Types.RangeSpanContains_key
+         where
+  buildRtsValue b
+    (Glean.Schema.LsifTypes.Types.RangeSpanContains_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.LsifTypes.Types.RangeSpanContains_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "lsif.types.RangeSpanContains_key"
+           (Prelude.Just 0))
+{-# LINE 55 "glean/schema/thrift/lsif_types_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.LsifTypes.Types.RangeSpanContains_key
+     =
+     'Angle.TField "inner" (Glean.Schema.LsifTypes.Types.RangeSpan)
+       ('Angle.TField "outer" (Glean.Schema.LsifTypes.Types.RangeSpan)
+          ('Angle.TNoFields))
+{-# LINE 57 "glean/schema/thrift/lsif_types_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.LsifTypes.Types.RangeSpanContains
+         where
+  type KeyType Glean.Schema.LsifTypes.Types.RangeSpanContains =
+       Glean.Schema.LsifTypes.Types.RangeSpanContains_key
+  getName _proxy
+    = Glean.PredicateRef "lsif.types.RangeSpanContains" 1
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.LsifTypes.Types.rangeSpanContains_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.LsifTypes.Types.RangeSpanContains x k
+  getFactKey = Glean.Schema.LsifTypes.Types.rangeSpanContains_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 66 "glean/schema/thrift/lsif_types_include.hs" #-}
+instance Glean.Type Glean.Schema.LsifTypes.Types.RangeSpanContains
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 72 "glean/schema/thrift/lsif_types_include.hs" #-}
 instance Glean.Type Glean.Schema.LsifTypes.Types.FromSrcRange_key
          where
   buildRtsValue b
@@ -1181,14 +1385,14 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "lsif.types.FromSrcRange_key" (Prelude.Just 0))
-{-# LINE 57 "glean/schema/thrift/lsif_types_include.hs" #-}
+{-# LINE 83 "glean/schema/thrift/lsif_types_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.LsifTypes.Types.FromSrcRange_key =
      'Angle.TField "range" (Glean.Schema.Src.Types.Range)
        ('Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
           ('Angle.TField "lsif" (Glean.Schema.LsifTypes.Types.RangeSpan)
              ('Angle.TNoFields)))
-{-# LINE 59 "glean/schema/thrift/lsif_types_include.hs" #-}
+{-# LINE 85 "glean/schema/thrift/lsif_types_include.hs" #-}
 instance Glean.Predicate Glean.Schema.LsifTypes.Types.FromSrcRange
          where
   type KeyType Glean.Schema.LsifTypes.Types.FromSrcRange =
@@ -1201,13 +1405,13 @@
     = Glean.Schema.LsifTypes.Types.FromSrcRange x k
   getFactKey = Glean.Schema.LsifTypes.Types.fromSrcRange_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 68 "glean/schema/thrift/lsif_types_include.hs" #-}
+{-# LINE 94 "glean/schema/thrift/lsif_types_include.hs" #-}
 instance Glean.Type Glean.Schema.LsifTypes.Types.FromSrcRange where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 74 "glean/schema/thrift/lsif_types_include.hs" #-}
+{-# LINE 100 "glean/schema/thrift/lsif_types_include.hs" #-}
 instance Glean.Type Glean.Schema.LsifTypes.Types.RangeSpan where
   buildRtsValue b
     (Glean.Schema.LsifTypes.Types.RangeSpan x1 x2 x3 x4)
@@ -1223,14 +1427,14 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "lsif.types.RangeSpan" (Prelude.Just 1))
-{-# LINE 87 "glean/schema/thrift/lsif_types_include.hs" #-}
+{-# LINE 113 "glean/schema/thrift/lsif_types_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.LsifTypes.Types.RangeSpan =
      'Angle.TField "lineBegin" (Glean.Nat)
        ('Angle.TField "columnBegin" (Glean.Nat)
           ('Angle.TField "lineEnd" (Glean.Nat)
              ('Angle.TField "columnEnd" (Glean.Nat) ('Angle.TNoFields))))
-{-# LINE 89 "glean/schema/thrift/lsif_types_include.hs" #-}
+{-# LINE 115 "glean/schema/thrift/lsif_types_include.hs" #-}
 instance Glean.Type Glean.Schema.LsifTypes.Types.ToolInfo where
   buildRtsValue b (Glean.Schema.LsifTypes.Types.ToolInfo x1 x2 x3)
     = do Glean.buildRtsValue b x1
@@ -1243,21 +1447,21 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "lsif.types.ToolInfo" (Prelude.Just 1))
-{-# LINE 100 "glean/schema/thrift/lsif_types_include.hs" #-}
+{-# LINE 126 "glean/schema/thrift/lsif_types_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.LsifTypes.Types.ToolInfo =
      'Angle.TField "toolName" (Data.Text.Text)
        ('Angle.TField "toolArgs" ([Data.Text.Text])
           ('Angle.TField "version" (Prelude.Maybe Data.Text.Text)
              ('Angle.TNoFields)))
-{-# LINE 102 "glean/schema/thrift/lsif_types_include.hs" #-}
+{-# LINE 128 "glean/schema/thrift/lsif_types_include.hs" #-}
 instance Glean.Type Glean.Schema.LsifTypes.Types.SymbolKind where
   buildRtsValue = Glean.thriftEnum_buildRtsValue
   decodeRtsValue = Glean.thriftEnumD
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "lsif.types.SymbolKind" (Prelude.Just 1))
-{-# LINE 107 "glean/schema/thrift/lsif_types_include.hs" #-}
+{-# LINE 133 "glean/schema/thrift/lsif_types_include.hs" #-}
 type instance
      Angle.SumFields Glean.Schema.LsifTypes.Types.SymbolKind =
      'Angle.TField "File" (Glean.Schema.Builtin.Types.Unit)
@@ -1305,20 +1509,20 @@
                                                                                      "Unknown"
                                                                                      (Glean.Schema.Builtin.Types.Unit)
                                                                                      ('Angle.TNoFields)))))))))))))))))))))))))))
-{-# LINE 109 "glean/schema/thrift/lsif_types_include.hs" #-}
+{-# LINE 135 "glean/schema/thrift/lsif_types_include.hs" #-}
 instance Angle.AngleEnum Glean.Schema.LsifTypes.Types.SymbolKind
          where
   type AngleEnumTy Glean.Schema.LsifTypes.Types.SymbolKind =
        Glean.Schema.LsifTypes.Types.SymbolKind
   enumName v = Text.pack (Prelude.drop 11 (Prelude.show v))
-{-# LINE 113 "glean/schema/thrift/lsif_types_include.hs" #-}
+{-# LINE 139 "glean/schema/thrift/lsif_types_include.hs" #-}
 instance Glean.Type Glean.Schema.LsifTypes.Types.LanguageId where
   buildRtsValue = Glean.thriftEnum_buildRtsValue
   decodeRtsValue = Glean.thriftEnumD
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "lsif.types.LanguageId" (Prelude.Just 1))
-{-# LINE 118 "glean/schema/thrift/lsif_types_include.hs" #-}
+{-# LINE 144 "glean/schema/thrift/lsif_types_include.hs" #-}
 type instance
      Angle.SumFields Glean.Schema.LsifTypes.Types.LanguageId =
      'Angle.TField "ABAP" (Glean.Schema.Builtin.Types.Unit)
@@ -1460,7 +1664,7 @@
                                                                                                                                                                                      "OCaml"
                                                                                                                                                                                      (Glean.Schema.Builtin.Types.Unit)
                                                                                                                                                                                      ('Angle.TNoFields)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
-{-# LINE 120 "glean/schema/thrift/lsif_types_include.hs" #-}
+{-# LINE 146 "glean/schema/thrift/lsif_types_include.hs" #-}
 instance Angle.AngleEnum Glean.Schema.LsifTypes.Types.LanguageId
          where
   type AngleEnumTy Glean.Schema.LsifTypes.Types.LanguageId =
diff --git a/glean/schema/thrift/gen-hs2/Glean/Schema/Scip/Types.hs b/glean/schema/thrift/gen-hs2/Glean/Schema/Scip/Types.hs
--- a/glean/schema/thrift/gen-hs2/Glean/Schema/Scip/Types.hs
+++ b/glean/schema/thrift/gen-hs2/Glean/Schema/Scip/Types.hs
@@ -39,6722 +39,7945 @@
                           referenceLocation_key),
         Reference_id, Reference(Reference, reference_id, reference_key),
         Metadata_id, Metadata(Metadata, metadata_id, metadata_key),
-        LocalName_id, LocalName(LocalName, localName_id, localName_key),
-        IsImplemented_id,
-        IsImplemented(IsImplemented, isImplemented_id, isImplemented_key),
-        IsImplementation_id,
-        IsImplementation(IsImplementation, isImplementation_id,
-                         isImplementation_key),
-        FileXLangSymbolRef_id,
-        FileXLangSymbolRef(FileXLangSymbolRef, fileXLangSymbolRef_id,
-                           fileXLangSymbolRef_key),
-        FileRange_id, FileRange(FileRange, fileRange_id, fileRange_key),
-        FileLanguage_id,
-        FileLanguage(FileLanguage, fileLanguage_id, fileLanguage_key),
-        EntityDefinition_id,
-        EntityDefinition(EntityDefinition, entityDefinition_id,
-                         entityDefinition_key),
-        EntityKind_id,
-        EntityKind(EntityKind, entityKind_id, entityKind_key),
-        EntityLocation_id,
-        EntityLocation(EntityLocation, entityLocation_id,
-                       entityLocation_key),
-        EntityUses_id,
-        EntityUses(EntityUses, entityUses_id, entityUses_key),
-        FileEntityXRefLocation_id,
-        FileEntityXRefLocation(FileEntityXRefLocation,
-                               fileEntityXRefLocation_id, fileEntityXRefLocation_key),
-        ResolveLocation_id,
-        ResolveLocation(ResolveLocation, resolveLocation_id,
-                        resolveLocation_key),
-        SearchByNameKind_id,
-        SearchByNameKind(SearchByNameKind, searchByNameKind_id,
-                         searchByNameKind_key),
-        SearchBySymbol_id,
-        SearchBySymbol(SearchBySymbol, searchBySymbol_id,
-                       searchBySymbol_key),
-        TagDefinition_id,
-        TagDefinition(TagDefinition, tagDefinition_id, tagDefinition_key),
-        Documentation_id,
-        Documentation(Documentation, documentation_id, documentation_key),
-        DisplayNameSymbol_id,
-        DisplayNameSymbol(DisplayNameSymbol, displayNameSymbol_id,
-                          displayNameSymbol_key),
-        DisplayName_id,
-        DisplayName(DisplayName, displayName_id, displayName_key),
-        DefinitionUses_id,
-        DefinitionUses(DefinitionUses, definitionUses_id,
-                       definitionUses_key),
-        DefinitionName_id,
-        DefinitionName(DefinitionName, definitionName_id,
-                       definitionName_key),
-        DefinitionLocation_id,
-        DefinitionLocation(DefinitionLocation, definitionLocation_id,
-                           definitionLocation_key),
-        DefinitionDocumentation_id,
-        DefinitionDocumentation(DefinitionDocumentation,
-                                definitionDocumentation_id, definitionDocumentation_key),
-        Definition_id,
-        Definition(Definition, definition_id, definition_key),
-        TextEncoding(TextEncoding_UnspecifiedTextEncoding,
-                     TextEncoding_UTF8, TextEncoding_UTF16, TextEncoding__UNKNOWN),
-        SymbolName_key(SymbolName_key, symbolName_key_symbol,
-                       symbolName_key_name),
-        SymbolKind_key(SymbolKind_key, symbolKind_key_symbol,
-                       symbolKind_key_kind),
-        SymbolDocumentation_key(SymbolDocumentation_key,
-                                symbolDocumentation_key_symbol, symbolDocumentation_key_docs),
-        SymbolDisplayName_key(SymbolDisplayName_key,
-                              symbolDisplayName_key_symbol, symbolDisplayName_key_displayName),
-        SomeEntity(SomeEntity, someEntity_defn),
-        ReferenceTarget_key(ReferenceTarget_key, referenceTarget_key_xref,
-                            referenceTarget_key_target),
-        ReferenceLocation_key(ReferenceLocation_key,
-                              referenceLocation_key_file, referenceLocation_key_range,
-                              referenceLocation_key_xref),
-        Reference_key(Reference_key, reference_key_symbol,
-                      reference_key_location),
-        ProtocolVersion(ProtocolVersion_UnspecifiedProtocolVersion,
-                        ProtocolVersion__UNKNOWN),
-        Metadata_key(Metadata_key, metadata_key_version,
-                     metadata_key_toolInfo, metadata_key_projectRoot,
-                     metadata_key_textEncoding),
-        Location(Location, location_file, location_location,
-                 location_name),
-        IsImplemented_key(IsImplemented_key, isImplemented_key_implemented,
-                          isImplemented_key_symbol),
-        IsImplementation_key(IsImplementation_key,
-                             isImplementation_key_symbol, isImplementation_key_implemented),
-        FileXLangSymbolRef_key(FileXLangSymbolRef_key,
-                               fileXLangSymbolRef_key_file, fileXLangSymbolRef_key_range,
-                               fileXLangSymbolRef_key_target),
-        FileRange_key(FileRange_key, fileRange_key_file,
-                      fileRange_key_range),
-        FileLanguage_key(FileLanguage_key, fileLanguage_key_file,
-                         fileLanguage_key_language),
-        Entity(Entity_EMPTY, Entity_rust, Entity_go, Entity_typescript,
-               Entity_java, Entity_kotlin, Entity_swift),
-        EntityDefinition_key(EntityDefinition_key,
-                             entityDefinition_key_entity, entityDefinition_key_defn),
-        EntityKind_key(EntityKind_key, entityKind_key_entity,
-                       entityKind_key_kind),
-        EntityLocation_key(EntityLocation_key, entityLocation_key_entity,
-                           entityLocation_key_location),
-        EntityUses_key(EntityUses_key, entityUses_key_target,
-                       entityUses_key_file, entityUses_key_range),
-        FileEntityXRefLocation_key(FileEntityXRefLocation_key,
-                                   fileEntityXRefLocation_key_file,
-                                   fileEntityXRefLocation_key_source,
-                                   fileEntityXRefLocation_key_target,
-                                   fileEntityXRefLocation_key_entity),
-        ResolveLocation_key(ResolveLocation_key,
-                            resolveLocation_key_location, resolveLocation_key_entity),
-        SearchByNameKind_key(SearchByNameKind_key,
-                             searchByNameKind_key_name, searchByNameKind_key_kind,
-                             searchByNameKind_key_entity),
-        SearchBySymbol_key(SearchBySymbol_key, searchBySymbol_key_symbol,
-                           searchBySymbol_key_entity),
-        TagDefinition_key(TagDefinition_key, tagDefinition_key_language,
-                          tagDefinition_key_defn, tagDefinition_key_entity),
-        DisplayNameSymbol_key(DisplayNameSymbol_key,
-                              displayNameSymbol_key_displayName, displayNameSymbol_key_symbol),
-        DefinitionUses_key(DefinitionUses_key, definitionUses_key_target,
-                           definitionUses_key_xref),
-        DefinitionName_key(DefinitionName_key, definitionName_key_defn,
-                           definitionName_key_docs),
-        DefinitionLocation_key(DefinitionLocation_key,
-                               definitionLocation_key_file, definitionLocation_key_range,
-                               definitionLocation_key_defn),
-        DefinitionDocumentation_key(DefinitionDocumentation_key,
-                                    definitionDocumentation_key_defn,
-                                    definitionDocumentation_key_docs),
-        Definition_key(Definition_key, definition_key_symbol,
-                       definition_key_location))
-       where
-import qualified Control.DeepSeq as DeepSeq
-import qualified Control.Exception as Exception
-import qualified Control.Monad as Monad
-import qualified Control.Monad.ST.Trans as ST
-import qualified Control.Monad.Trans.Class as Trans
-import qualified Data.Aeson as Aeson
-import qualified Data.Aeson.Types as Aeson
-import qualified Data.Default as Default
-import qualified Data.Function as Function
-import qualified Data.HashMap.Strict as HashMap
-import qualified Data.Hashable as Hashable
-import qualified Data.Int as Int
-import qualified Data.List as List
-import qualified Data.Map.Strict as Map
-import qualified Data.Ord as Ord
-import qualified Data.Text as Text
-import qualified Data.Text.Encoding as Text
-import qualified Facebook.Thrift.Annotation.Thrift.Thrift.Types
-       as Facebook.Thrift.Annotation.Thrift.Thrift
-import qualified GHC.Magic as GHC
-import qualified Glean.Schema.Builtin.Types as Glean.Schema.Builtin
-import qualified Glean.Schema.LsifTypes.Types
-       as Glean.Schema.LsifTypes
-import qualified Glean.Schema.Src.Types as Glean.Schema.Src
-import qualified Glean.Types as Glean
-import qualified Prelude as Prelude
-import qualified Rust.Types as Rust
-import qualified Thrift.Binary.Parser as Parser
-import qualified Thrift.CodegenTypesOnly as Thrift
-import Control.Applicative ((<|>), (*>), (<*))
-import Data.Aeson ((.:), (.:?), (.=), (.!=))
-import Data.Aeson ((.:), (.=))
-import Data.Monoid ((<>))
-import Prelude ((.), (++), (>), (==))
-import Prelude ((.), (<$>), (<*>), (>>=), (==), (++))
-import Prelude ((.), (<$>), (<*>), (>>=), (==), (/=), (<), (++))
-{-# LINE 5 "glean/schema/thrift/scip_include.hs" #-}
-import qualified Data.ByteString
-{-# LINE 6 "glean/schema/thrift/scip_include.hs" #-}
-import qualified Data.Default
-{-# LINE 7 "glean/schema/thrift/scip_include.hs" #-}
-import qualified Data.Text
-{-# LINE 9 "glean/schema/thrift/scip_include.hs" #-}
-import qualified Glean.Types as Glean
-{-# LINE 10 "glean/schema/thrift/scip_include.hs" #-}
-import qualified Glean.Typed as Glean
-{-# LINE 11 "glean/schema/thrift/scip_include.hs" #-}
-import qualified Glean.Query.Angle as Angle
-{-# LINE 12 "glean/schema/thrift/scip_include.hs" #-}
-import qualified Glean.Angle.Types as Angle
-{-# LINE 14 "glean/schema/thrift/scip_include.hs" #-}
-import qualified Glean.Schema.Builtin.Types
-{-# LINE 15 "glean/schema/thrift/scip_include.hs" #-}
-import qualified Glean.Schema.LsifTypes.Types
-{-# LINE 16 "glean/schema/thrift/scip_include.hs" #-}
-import qualified Glean.Schema.Src.Types
-{-# LINE 231 ".build/def/codegen/thrift-schema-hs/glean/schema/thrift/gen-hs2/Glean/Schema/Scip/Types.hs" #-}
-
-pREDICATE_VERSIONS :: Map.Map Text.Text Int.Int64
-pREDICATE_VERSIONS
-  = Map.fromList
-      [("EntityLocation", 1), ("ReferenceTarget", 1),
-       ("FileEntityXRefLocation", 1), ("IsImplementation", 1),
-       ("SymbolName", 1), ("DefinitionName", 1), ("SearchByNameKind", 1),
-       ("FileRange", 1), ("SymbolKind", 1), ("ResolveLocation", 1),
-       ("EntityUses", 1), ("DefinitionLocation", 1),
-       ("SearchBySymbol", 1), ("FileXLangSymbolRef", 1),
-       ("ReferenceLocation", 1), ("SymbolDocumentation", 1),
-       ("LocalName", 1), ("Reference", 1), ("DisplayName", 1),
-       ("Metadata", 1), ("Definition", 1), ("IsImplemented", 1),
-       ("DisplayNameSymbol", 1), ("FileLanguage", 1),
-       ("Documentation", 1), ("Symbol", 1),
-       ("DefinitionDocumentation", 1), ("SymbolDisplayName", 1),
-       ("TagDefinition", 1), ("EntityDefinition", 1),
-       ("DefinitionUses", 1), ("EntityKind", 1)]
-
-type SymbolName_id = Glean.Id
-
-data SymbolName = SymbolName{symbolName_id ::
-                             {-# UNPACK #-} !SymbolName_id,
-                             symbolName_key :: Prelude.Maybe SymbolName_key}
-                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SymbolName where
-  toJSON (SymbolName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct SymbolName where
-  buildStruct _proxy (SymbolName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (SymbolName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SymbolName where
-  rnf (SymbolName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default SymbolName where
-  def = SymbolName Default.def Prelude.Nothing
-
-instance Hashable.Hashable SymbolName where
-  hashWithSalt __salt (SymbolName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type SymbolKind_id = Glean.Id
-
-data SymbolKind = SymbolKind{symbolKind_id ::
-                             {-# UNPACK #-} !SymbolKind_id,
-                             symbolKind_key :: Prelude.Maybe SymbolKind_key}
-                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SymbolKind where
-  toJSON (SymbolKind __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct SymbolKind where
-  buildStruct _proxy (SymbolKind __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (SymbolKind __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SymbolKind where
-  rnf (SymbolKind __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default SymbolKind where
-  def = SymbolKind Default.def Prelude.Nothing
-
-instance Hashable.Hashable SymbolKind where
-  hashWithSalt __salt (SymbolKind _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type SymbolDocumentation_id = Glean.Id
-
-data SymbolDocumentation = SymbolDocumentation{symbolDocumentation_id
-                                               :: {-# UNPACK #-} !SymbolDocumentation_id,
-                                               symbolDocumentation_key ::
-                                               Prelude.Maybe SymbolDocumentation_key}
-                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SymbolDocumentation where
-  toJSON (SymbolDocumentation __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct SymbolDocumentation where
-  buildStruct _proxy (SymbolDocumentation __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (SymbolDocumentation __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SymbolDocumentation where
-  rnf (SymbolDocumentation __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default SymbolDocumentation where
-  def = SymbolDocumentation Default.def Prelude.Nothing
-
-instance Hashable.Hashable SymbolDocumentation where
-  hashWithSalt __salt (SymbolDocumentation _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type SymbolDisplayName_id = Glean.Id
-
-data SymbolDisplayName = SymbolDisplayName{symbolDisplayName_id ::
-                                           {-# UNPACK #-} !SymbolDisplayName_id,
-                                           symbolDisplayName_key ::
-                                           Prelude.Maybe SymbolDisplayName_key}
-                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SymbolDisplayName where
-  toJSON (SymbolDisplayName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct SymbolDisplayName where
-  buildStruct _proxy (SymbolDisplayName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (SymbolDisplayName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SymbolDisplayName where
-  rnf (SymbolDisplayName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default SymbolDisplayName where
-  def = SymbolDisplayName Default.def Prelude.Nothing
-
-instance Hashable.Hashable SymbolDisplayName where
-  hashWithSalt __salt (SymbolDisplayName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type Symbol_id = Glean.Id
-
-data Symbol = Symbol{symbol_id :: {-# UNPACK #-} !Symbol_id,
-                     symbol_key :: Prelude.Maybe Text.Text}
-              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Symbol where
-  toJSON (Symbol __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct Symbol where
-  buildStruct _proxy (Symbol __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStringType _proxy)
-                                    2
-                                    1
-                                    (Thrift.genText _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (Symbol __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData Symbol where
-  rnf (Symbol __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default Symbol where
-  def = Symbol Default.def Prelude.Nothing
-
-instance Hashable.Hashable Symbol where
-  hashWithSalt __salt (Symbol _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type ReferenceTarget_id = Glean.Id
-
-data ReferenceTarget = ReferenceTarget{referenceTarget_id ::
-                                       {-# UNPACK #-} !ReferenceTarget_id,
-                                       referenceTarget_key :: Prelude.Maybe ReferenceTarget_key}
-                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ReferenceTarget where
-  toJSON (ReferenceTarget __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct ReferenceTarget where
-  buildStruct _proxy (ReferenceTarget __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (ReferenceTarget __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData ReferenceTarget where
-  rnf (ReferenceTarget __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default ReferenceTarget where
-  def = ReferenceTarget Default.def Prelude.Nothing
-
-instance Hashable.Hashable ReferenceTarget where
-  hashWithSalt __salt (ReferenceTarget _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type ReferenceLocation_id = Glean.Id
-
-data ReferenceLocation = ReferenceLocation{referenceLocation_id ::
-                                           {-# UNPACK #-} !ReferenceLocation_id,
-                                           referenceLocation_key ::
-                                           Prelude.Maybe ReferenceLocation_key}
-                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ReferenceLocation where
-  toJSON (ReferenceLocation __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct ReferenceLocation where
-  buildStruct _proxy (ReferenceLocation __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (ReferenceLocation __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData ReferenceLocation where
-  rnf (ReferenceLocation __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default ReferenceLocation where
-  def = ReferenceLocation Default.def Prelude.Nothing
-
-instance Hashable.Hashable ReferenceLocation where
-  hashWithSalt __salt (ReferenceLocation _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type Reference_id = Glean.Id
-
-data Reference = Reference{reference_id ::
-                           {-# UNPACK #-} !Reference_id,
-                           reference_key :: Prelude.Maybe Reference_key}
-                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Reference where
-  toJSON (Reference __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct Reference where
-  buildStruct _proxy (Reference __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (Reference __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData Reference where
-  rnf (Reference __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default Reference where
-  def = Reference Default.def Prelude.Nothing
-
-instance Hashable.Hashable Reference where
-  hashWithSalt __salt (Reference _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type Metadata_id = Glean.Id
-
-data Metadata = Metadata{metadata_id ::
-                         {-# UNPACK #-} !Metadata_id,
-                         metadata_key :: Prelude.Maybe Metadata_key}
-                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Metadata where
-  toJSON (Metadata __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct Metadata where
-  buildStruct _proxy (Metadata __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (Metadata __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData Metadata where
-  rnf (Metadata __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default Metadata where
-  def = Metadata Default.def Prelude.Nothing
-
-instance Hashable.Hashable Metadata where
-  hashWithSalt __salt (Metadata _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type LocalName_id = Glean.Id
-
-data LocalName = LocalName{localName_id ::
-                           {-# UNPACK #-} !LocalName_id,
-                           localName_key :: Prelude.Maybe Text.Text}
-                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON LocalName where
-  toJSON (LocalName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct LocalName where
-  buildStruct _proxy (LocalName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStringType _proxy)
-                                    2
-                                    1
-                                    (Thrift.genText _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (LocalName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData LocalName where
-  rnf (LocalName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default LocalName where
-  def = LocalName Default.def Prelude.Nothing
-
-instance Hashable.Hashable LocalName where
-  hashWithSalt __salt (LocalName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type IsImplemented_id = Glean.Id
-
-data IsImplemented = IsImplemented{isImplemented_id ::
-                                   {-# UNPACK #-} !IsImplemented_id,
-                                   isImplemented_key :: Prelude.Maybe IsImplemented_key}
-                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON IsImplemented where
-  toJSON (IsImplemented __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct IsImplemented where
-  buildStruct _proxy (IsImplemented __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (IsImplemented __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData IsImplemented where
-  rnf (IsImplemented __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default IsImplemented where
-  def = IsImplemented Default.def Prelude.Nothing
-
-instance Hashable.Hashable IsImplemented where
-  hashWithSalt __salt (IsImplemented _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type IsImplementation_id = Glean.Id
-
-data IsImplementation = IsImplementation{isImplementation_id ::
-                                         {-# UNPACK #-} !IsImplementation_id,
-                                         isImplementation_key :: Prelude.Maybe IsImplementation_key}
-                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON IsImplementation where
-  toJSON (IsImplementation __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct IsImplementation where
-  buildStruct _proxy (IsImplementation __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (IsImplementation __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData IsImplementation where
-  rnf (IsImplementation __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default IsImplementation where
-  def = IsImplementation Default.def Prelude.Nothing
-
-instance Hashable.Hashable IsImplementation where
-  hashWithSalt __salt (IsImplementation _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type FileXLangSymbolRef_id = Glean.Id
-
-data FileXLangSymbolRef = FileXLangSymbolRef{fileXLangSymbolRef_id
-                                             :: {-# UNPACK #-} !FileXLangSymbolRef_id,
-                                             fileXLangSymbolRef_key ::
-                                             Prelude.Maybe FileXLangSymbolRef_key}
-                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON FileXLangSymbolRef where
-  toJSON (FileXLangSymbolRef __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct FileXLangSymbolRef where
-  buildStruct _proxy (FileXLangSymbolRef __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (FileXLangSymbolRef __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData FileXLangSymbolRef where
-  rnf (FileXLangSymbolRef __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default FileXLangSymbolRef where
-  def = FileXLangSymbolRef Default.def Prelude.Nothing
-
-instance Hashable.Hashable FileXLangSymbolRef where
-  hashWithSalt __salt (FileXLangSymbolRef _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type FileRange_id = Glean.Id
-
-data FileRange = FileRange{fileRange_id ::
-                           {-# UNPACK #-} !FileRange_id,
-                           fileRange_key :: Prelude.Maybe FileRange_key}
-                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON FileRange where
-  toJSON (FileRange __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct FileRange where
-  buildStruct _proxy (FileRange __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (FileRange __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData FileRange where
-  rnf (FileRange __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default FileRange where
-  def = FileRange Default.def Prelude.Nothing
-
-instance Hashable.Hashable FileRange where
-  hashWithSalt __salt (FileRange _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type FileLanguage_id = Glean.Id
-
-data FileLanguage = FileLanguage{fileLanguage_id ::
-                                 {-# UNPACK #-} !FileLanguage_id,
-                                 fileLanguage_key :: Prelude.Maybe FileLanguage_key}
-                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON FileLanguage where
-  toJSON (FileLanguage __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct FileLanguage where
-  buildStruct _proxy (FileLanguage __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (FileLanguage __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData FileLanguage where
-  rnf (FileLanguage __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default FileLanguage where
-  def = FileLanguage Default.def Prelude.Nothing
-
-instance Hashable.Hashable FileLanguage where
-  hashWithSalt __salt (FileLanguage _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type EntityDefinition_id = Glean.Id
-
-data EntityDefinition = EntityDefinition{entityDefinition_id ::
-                                         {-# UNPACK #-} !EntityDefinition_id,
-                                         entityDefinition_key :: Prelude.Maybe EntityDefinition_key}
-                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON EntityDefinition where
-  toJSON (EntityDefinition __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct EntityDefinition where
-  buildStruct _proxy (EntityDefinition __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (EntityDefinition __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData EntityDefinition where
-  rnf (EntityDefinition __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default EntityDefinition where
-  def = EntityDefinition Default.def Prelude.Nothing
-
-instance Hashable.Hashable EntityDefinition where
-  hashWithSalt __salt (EntityDefinition _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type EntityKind_id = Glean.Id
-
-data EntityKind = EntityKind{entityKind_id ::
-                             {-# UNPACK #-} !EntityKind_id,
-                             entityKind_key :: Prelude.Maybe EntityKind_key}
-                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON EntityKind where
-  toJSON (EntityKind __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct EntityKind where
-  buildStruct _proxy (EntityKind __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (EntityKind __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData EntityKind where
-  rnf (EntityKind __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default EntityKind where
-  def = EntityKind Default.def Prelude.Nothing
-
-instance Hashable.Hashable EntityKind where
-  hashWithSalt __salt (EntityKind _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type EntityLocation_id = Glean.Id
-
-data EntityLocation = EntityLocation{entityLocation_id ::
-                                     {-# UNPACK #-} !EntityLocation_id,
-                                     entityLocation_key :: Prelude.Maybe EntityLocation_key}
-                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON EntityLocation where
-  toJSON (EntityLocation __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct EntityLocation where
-  buildStruct _proxy (EntityLocation __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (EntityLocation __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData EntityLocation where
-  rnf (EntityLocation __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default EntityLocation where
-  def = EntityLocation Default.def Prelude.Nothing
-
-instance Hashable.Hashable EntityLocation where
-  hashWithSalt __salt (EntityLocation _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type EntityUses_id = Glean.Id
-
-data EntityUses = EntityUses{entityUses_id ::
-                             {-# UNPACK #-} !EntityUses_id,
-                             entityUses_key :: Prelude.Maybe EntityUses_key}
-                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON EntityUses where
-  toJSON (EntityUses __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct EntityUses where
-  buildStruct _proxy (EntityUses __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (EntityUses __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData EntityUses where
-  rnf (EntityUses __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default EntityUses where
-  def = EntityUses Default.def Prelude.Nothing
-
-instance Hashable.Hashable EntityUses where
-  hashWithSalt __salt (EntityUses _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type FileEntityXRefLocation_id = Glean.Id
-
-data FileEntityXRefLocation = FileEntityXRefLocation{fileEntityXRefLocation_id
-                                                     :: {-# UNPACK #-} !FileEntityXRefLocation_id,
-                                                     fileEntityXRefLocation_key ::
-                                                     Prelude.Maybe FileEntityXRefLocation_key}
-                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON FileEntityXRefLocation where
-  toJSON (FileEntityXRefLocation __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct FileEntityXRefLocation where
-  buildStruct _proxy
-    (FileEntityXRefLocation __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (FileEntityXRefLocation __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData FileEntityXRefLocation where
-  rnf (FileEntityXRefLocation __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default FileEntityXRefLocation where
-  def = FileEntityXRefLocation Default.def Prelude.Nothing
-
-instance Hashable.Hashable FileEntityXRefLocation where
-  hashWithSalt __salt (FileEntityXRefLocation _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type ResolveLocation_id = Glean.Id
-
-data ResolveLocation = ResolveLocation{resolveLocation_id ::
-                                       {-# UNPACK #-} !ResolveLocation_id,
-                                       resolveLocation_key :: Prelude.Maybe ResolveLocation_key}
-                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ResolveLocation where
-  toJSON (ResolveLocation __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct ResolveLocation where
-  buildStruct _proxy (ResolveLocation __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (ResolveLocation __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData ResolveLocation where
-  rnf (ResolveLocation __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default ResolveLocation where
-  def = ResolveLocation Default.def Prelude.Nothing
-
-instance Hashable.Hashable ResolveLocation where
-  hashWithSalt __salt (ResolveLocation _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type SearchByNameKind_id = Glean.Id
-
-data SearchByNameKind = SearchByNameKind{searchByNameKind_id ::
-                                         {-# UNPACK #-} !SearchByNameKind_id,
-                                         searchByNameKind_key :: Prelude.Maybe SearchByNameKind_key}
-                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchByNameKind where
-  toJSON (SearchByNameKind __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchByNameKind where
-  buildStruct _proxy (SearchByNameKind __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (SearchByNameKind __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchByNameKind where
-  rnf (SearchByNameKind __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default SearchByNameKind where
-  def = SearchByNameKind Default.def Prelude.Nothing
-
-instance Hashable.Hashable SearchByNameKind where
-  hashWithSalt __salt (SearchByNameKind _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type SearchBySymbol_id = Glean.Id
-
-data SearchBySymbol = SearchBySymbol{searchBySymbol_id ::
-                                     {-# UNPACK #-} !SearchBySymbol_id,
-                                     searchBySymbol_key :: Prelude.Maybe SearchBySymbol_key}
-                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchBySymbol where
-  toJSON (SearchBySymbol __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchBySymbol where
-  buildStruct _proxy (SearchBySymbol __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (SearchBySymbol __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchBySymbol where
-  rnf (SearchBySymbol __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default SearchBySymbol where
-  def = SearchBySymbol Default.def Prelude.Nothing
-
-instance Hashable.Hashable SearchBySymbol where
-  hashWithSalt __salt (SearchBySymbol _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type TagDefinition_id = Glean.Id
-
-data TagDefinition = TagDefinition{tagDefinition_id ::
-                                   {-# UNPACK #-} !TagDefinition_id,
-                                   tagDefinition_key :: Prelude.Maybe TagDefinition_key}
-                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TagDefinition where
-  toJSON (TagDefinition __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct TagDefinition where
-  buildStruct _proxy (TagDefinition __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (TagDefinition __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData TagDefinition where
-  rnf (TagDefinition __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default TagDefinition where
-  def = TagDefinition Default.def Prelude.Nothing
-
-instance Hashable.Hashable TagDefinition where
-  hashWithSalt __salt (TagDefinition _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type Documentation_id = Glean.Id
-
-data Documentation = Documentation{documentation_id ::
-                                   {-# UNPACK #-} !Documentation_id,
-                                   documentation_key :: Prelude.Maybe Text.Text}
-                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Documentation where
-  toJSON (Documentation __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct Documentation where
-  buildStruct _proxy (Documentation __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStringType _proxy)
-                                    2
-                                    1
-                                    (Thrift.genText _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (Documentation __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData Documentation where
-  rnf (Documentation __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default Documentation where
-  def = Documentation Default.def Prelude.Nothing
-
-instance Hashable.Hashable Documentation where
-  hashWithSalt __salt (Documentation _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type DisplayNameSymbol_id = Glean.Id
-
-data DisplayNameSymbol = DisplayNameSymbol{displayNameSymbol_id ::
-                                           {-# UNPACK #-} !DisplayNameSymbol_id,
-                                           displayNameSymbol_key ::
-                                           Prelude.Maybe DisplayNameSymbol_key}
-                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON DisplayNameSymbol where
-  toJSON (DisplayNameSymbol __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct DisplayNameSymbol where
-  buildStruct _proxy (DisplayNameSymbol __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (DisplayNameSymbol __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData DisplayNameSymbol where
-  rnf (DisplayNameSymbol __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default DisplayNameSymbol where
-  def = DisplayNameSymbol Default.def Prelude.Nothing
-
-instance Hashable.Hashable DisplayNameSymbol where
-  hashWithSalt __salt (DisplayNameSymbol _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type DisplayName_id = Glean.Id
-
-data DisplayName = DisplayName{displayName_id ::
-                               {-# UNPACK #-} !DisplayName_id,
-                               displayName_key :: Prelude.Maybe Text.Text}
-                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON DisplayName where
-  toJSON (DisplayName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct DisplayName where
-  buildStruct _proxy (DisplayName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStringType _proxy)
-                                    2
-                                    1
-                                    (Thrift.genText _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (DisplayName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData DisplayName where
-  rnf (DisplayName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default DisplayName where
-  def = DisplayName Default.def Prelude.Nothing
-
-instance Hashable.Hashable DisplayName where
-  hashWithSalt __salt (DisplayName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type DefinitionUses_id = Glean.Id
-
-data DefinitionUses = DefinitionUses{definitionUses_id ::
-                                     {-# UNPACK #-} !DefinitionUses_id,
-                                     definitionUses_key :: Prelude.Maybe DefinitionUses_key}
-                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON DefinitionUses where
-  toJSON (DefinitionUses __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct DefinitionUses where
-  buildStruct _proxy (DefinitionUses __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (DefinitionUses __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData DefinitionUses where
-  rnf (DefinitionUses __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default DefinitionUses where
-  def = DefinitionUses Default.def Prelude.Nothing
-
-instance Hashable.Hashable DefinitionUses where
-  hashWithSalt __salt (DefinitionUses _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type DefinitionName_id = Glean.Id
-
-data DefinitionName = DefinitionName{definitionName_id ::
-                                     {-# UNPACK #-} !DefinitionName_id,
-                                     definitionName_key :: Prelude.Maybe DefinitionName_key}
-                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON DefinitionName where
-  toJSON (DefinitionName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct DefinitionName where
-  buildStruct _proxy (DefinitionName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (DefinitionName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData DefinitionName where
-  rnf (DefinitionName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default DefinitionName where
-  def = DefinitionName Default.def Prelude.Nothing
-
-instance Hashable.Hashable DefinitionName where
-  hashWithSalt __salt (DefinitionName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type DefinitionLocation_id = Glean.Id
-
-data DefinitionLocation = DefinitionLocation{definitionLocation_id
-                                             :: {-# UNPACK #-} !DefinitionLocation_id,
-                                             definitionLocation_key ::
-                                             Prelude.Maybe DefinitionLocation_key}
-                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON DefinitionLocation where
-  toJSON (DefinitionLocation __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct DefinitionLocation where
-  buildStruct _proxy (DefinitionLocation __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (DefinitionLocation __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData DefinitionLocation where
-  rnf (DefinitionLocation __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default DefinitionLocation where
-  def = DefinitionLocation Default.def Prelude.Nothing
-
-instance Hashable.Hashable DefinitionLocation where
-  hashWithSalt __salt (DefinitionLocation _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type DefinitionDocumentation_id = Glean.Id
-
-data DefinitionDocumentation = DefinitionDocumentation{definitionDocumentation_id
-                                                       ::
-                                                       {-# UNPACK #-} !DefinitionDocumentation_id,
-                                                       definitionDocumentation_key ::
-                                                       Prelude.Maybe DefinitionDocumentation_key}
-                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON DefinitionDocumentation where
-  toJSON (DefinitionDocumentation __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct DefinitionDocumentation where
-  buildStruct _proxy
-    (DefinitionDocumentation __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (DefinitionDocumentation __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData DefinitionDocumentation where
-  rnf (DefinitionDocumentation __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default DefinitionDocumentation where
-  def = DefinitionDocumentation Default.def Prelude.Nothing
-
-instance Hashable.Hashable DefinitionDocumentation where
-  hashWithSalt __salt (DefinitionDocumentation _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type Definition_id = Glean.Id
-
-data Definition = Definition{definition_id ::
-                             {-# UNPACK #-} !Definition_id,
-                             definition_key :: Prelude.Maybe Definition_key}
-                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Definition where
-  toJSON (Definition __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct Definition where
-  buildStruct _proxy (Definition __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (Definition __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData Definition where
-  rnf (Definition __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default Definition where
-  def = Definition Default.def Prelude.Nothing
-
-instance Hashable.Hashable Definition where
-  hashWithSalt __salt (Definition _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-data TextEncoding = TextEncoding_UnspecifiedTextEncoding
-                  | TextEncoding_UTF8
-                  | TextEncoding_UTF16
-                  | TextEncoding__UNKNOWN Prelude.Int
-                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TextEncoding where
-  toJSON = Aeson.toJSON . Thrift.fromThriftEnum
-
-instance DeepSeq.NFData TextEncoding where
-  rnf __TextEncoding = Prelude.seq __TextEncoding ()
-
-instance Default.Default TextEncoding where
-  def = TextEncoding_UnspecifiedTextEncoding
-
-instance Hashable.Hashable TextEncoding where
-  hashWithSalt _salt _val
-    = Hashable.hashWithSalt _salt (Thrift.fromThriftEnum _val)
-
-instance Thrift.ThriftEnum TextEncoding where
-  toThriftEnum 0 = TextEncoding_UnspecifiedTextEncoding
-  toThriftEnum 1 = TextEncoding_UTF8
-  toThriftEnum 2 = TextEncoding_UTF16
-  toThriftEnum val = TextEncoding__UNKNOWN val
-  fromThriftEnum TextEncoding_UnspecifiedTextEncoding = 0
-  fromThriftEnum TextEncoding_UTF8 = 1
-  fromThriftEnum TextEncoding_UTF16 = 2
-  fromThriftEnum (TextEncoding__UNKNOWN val) = val
-  allThriftEnumValues
-    = [TextEncoding_UnspecifiedTextEncoding, TextEncoding_UTF8,
-       TextEncoding_UTF16]
-  toThriftEnumEither 0
-    = Prelude.Right TextEncoding_UnspecifiedTextEncoding
-  toThriftEnumEither 1 = Prelude.Right TextEncoding_UTF8
-  toThriftEnumEither 2 = Prelude.Right TextEncoding_UTF16
-  toThriftEnumEither val
-    = Prelude.Left
-        ("toThriftEnumEither: not a valid identifier for enum TextEncoding: "
-           ++ Prelude.show val)
-
-data SymbolName_key = SymbolName_key{symbolName_key_symbol ::
-                                     Symbol,
-                                     symbolName_key_name :: LocalName}
-                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SymbolName_key where
-  toJSON (SymbolName_key __field__symbol __field__name)
-    = Aeson.object
-        ("symbol" .= __field__symbol :
-           "name" .= __field__name : Prelude.mempty)
-
-instance Thrift.ThriftStruct SymbolName_key where
-  buildStruct _proxy (SymbolName_key __field__symbol __field__name)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "symbol" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__symbol)
-           :
-           Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__name)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__symbol <- ST.newSTRef Default.def
-            __field__name <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__symbol
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__symbol <- ST.readSTRef
-                                                                 __field__symbol
-                                             !__val__name <- ST.readSTRef __field__name
-                                             Prelude.pure (SymbolName_key __val__symbol __val__name)
-              _idMap = HashMap.fromList [("symbol", 1), ("name", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SymbolName_key where
-  rnf (SymbolName_key __field__symbol __field__name)
-    = DeepSeq.rnf __field__symbol `Prelude.seq`
-        DeepSeq.rnf __field__name `Prelude.seq` ()
-
-instance Default.Default SymbolName_key where
-  def = SymbolName_key Default.def Default.def
-
-instance Hashable.Hashable SymbolName_key where
-  hashWithSalt __salt (SymbolName_key _symbol _name)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _symbol)
-        _name
-
-data SymbolKind_key = SymbolKind_key{symbolKind_key_symbol ::
-                                     Symbol,
-                                     symbolKind_key_kind :: Glean.Schema.LsifTypes.SymbolKind}
-                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SymbolKind_key where
-  toJSON (SymbolKind_key __field__symbol __field__kind)
-    = Aeson.object
-        ("symbol" .= __field__symbol :
-           "kind" .= __field__kind : Prelude.mempty)
-
-instance Thrift.ThriftStruct SymbolKind_key where
-  buildStruct _proxy (SymbolKind_key __field__symbol __field__kind)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "symbol" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__symbol)
-           :
-           Thrift.genField _proxy "kind" (Thrift.getI32Type _proxy) 2 1
-             ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                 Thrift.fromThriftEnum)
-                __field__kind)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__symbol <- ST.newSTRef Default.def
-            __field__kind <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__symbol
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "SymbolKind")
-                                                                        ST.writeSTRef __field__kind
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__symbol <- ST.readSTRef
-                                                                 __field__symbol
-                                             !__val__kind <- ST.readSTRef __field__kind
-                                             Prelude.pure (SymbolKind_key __val__symbol __val__kind)
-              _idMap = HashMap.fromList [("symbol", 1), ("kind", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SymbolKind_key where
-  rnf (SymbolKind_key __field__symbol __field__kind)
-    = DeepSeq.rnf __field__symbol `Prelude.seq`
-        DeepSeq.rnf __field__kind `Prelude.seq` ()
-
-instance Default.Default SymbolKind_key where
-  def = SymbolKind_key Default.def Default.def
-
-instance Hashable.Hashable SymbolKind_key where
-  hashWithSalt __salt (SymbolKind_key _symbol _kind)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _symbol)
-        _kind
-
-data SymbolDocumentation_key = SymbolDocumentation_key{symbolDocumentation_key_symbol
-                                                       :: Symbol,
-                                                       symbolDocumentation_key_docs ::
-                                                       Documentation}
-                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SymbolDocumentation_key where
-  toJSON (SymbolDocumentation_key __field__symbol __field__docs)
-    = Aeson.object
-        ("symbol" .= __field__symbol :
-           "docs" .= __field__docs : Prelude.mempty)
-
-instance Thrift.ThriftStruct SymbolDocumentation_key where
-  buildStruct _proxy
-    (SymbolDocumentation_key __field__symbol __field__docs)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "symbol" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__symbol)
-           :
-           Thrift.genField _proxy "docs" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__docs)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__symbol <- ST.newSTRef Default.def
-            __field__docs <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__symbol
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__docs
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__symbol <- ST.readSTRef
-                                                                 __field__symbol
-                                             !__val__docs <- ST.readSTRef __field__docs
-                                             Prelude.pure
-                                               (SymbolDocumentation_key __val__symbol __val__docs)
-              _idMap = HashMap.fromList [("symbol", 1), ("docs", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SymbolDocumentation_key where
-  rnf (SymbolDocumentation_key __field__symbol __field__docs)
-    = DeepSeq.rnf __field__symbol `Prelude.seq`
-        DeepSeq.rnf __field__docs `Prelude.seq` ()
-
-instance Default.Default SymbolDocumentation_key where
-  def = SymbolDocumentation_key Default.def Default.def
-
-instance Hashable.Hashable SymbolDocumentation_key where
-  hashWithSalt __salt (SymbolDocumentation_key _symbol _docs)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _symbol)
-        _docs
-
-data SymbolDisplayName_key = SymbolDisplayName_key{symbolDisplayName_key_symbol
-                                                   :: Symbol,
-                                                   symbolDisplayName_key_displayName :: DisplayName}
-                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SymbolDisplayName_key where
-  toJSON (SymbolDisplayName_key __field__symbol __field__displayName)
-    = Aeson.object
-        ("symbol" .= __field__symbol :
-           "displayName" .= __field__displayName : Prelude.mempty)
-
-instance Thrift.ThriftStruct SymbolDisplayName_key where
-  buildStruct _proxy
-    (SymbolDisplayName_key __field__symbol __field__displayName)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "symbol" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__symbol)
-           :
-           Thrift.genField _proxy "displayName" (Thrift.getStructType _proxy)
-             2
-             1
-             (Thrift.buildStruct _proxy __field__displayName)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__symbol <- ST.newSTRef Default.def
-            __field__displayName <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__symbol
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__displayName
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__symbol <- ST.readSTRef
-                                                                 __field__symbol
-                                             !__val__displayName <- ST.readSTRef
-                                                                      __field__displayName
-                                             Prelude.pure
-                                               (SymbolDisplayName_key __val__symbol
-                                                  __val__displayName)
-              _idMap = HashMap.fromList [("symbol", 1), ("displayName", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SymbolDisplayName_key where
-  rnf (SymbolDisplayName_key __field__symbol __field__displayName)
-    = DeepSeq.rnf __field__symbol `Prelude.seq`
-        DeepSeq.rnf __field__displayName `Prelude.seq` ()
-
-instance Default.Default SymbolDisplayName_key where
-  def = SymbolDisplayName_key Default.def Default.def
-
-instance Hashable.Hashable SymbolDisplayName_key where
-  hashWithSalt __salt (SymbolDisplayName_key _symbol _displayName)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _symbol)
-        _displayName
-
-newtype SomeEntity = SomeEntity{someEntity_defn :: Definition}
-                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SomeEntity where
-  toJSON (SomeEntity __field__defn)
-    = Aeson.object ("defn" .= __field__defn : Prelude.mempty)
-
-instance Thrift.ThriftStruct SomeEntity where
-  buildStruct _proxy (SomeEntity __field__defn)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "defn" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__defn)
-           : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__defn <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__defn
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__defn <- ST.readSTRef __field__defn
-                                             Prelude.pure (SomeEntity __val__defn)
-              _idMap = HashMap.fromList [("defn", 1)]
-            _parse 0)
-
-instance DeepSeq.NFData SomeEntity where
-  rnf (SomeEntity __field__defn)
-    = DeepSeq.rnf __field__defn `Prelude.seq` ()
-
-instance Default.Default SomeEntity where
-  def = SomeEntity Default.def
-
-instance Hashable.Hashable SomeEntity where
-  hashWithSalt __salt (SomeEntity _defn)
-    = Hashable.hashWithSalt __salt _defn
-
-data ReferenceTarget_key = ReferenceTarget_key{referenceTarget_key_xref
-                                               :: Reference,
-                                               referenceTarget_key_target :: Definition}
-                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ReferenceTarget_key where
-  toJSON (ReferenceTarget_key __field__xref __field__target)
-    = Aeson.object
-        ("xref" .= __field__xref :
-           "target" .= __field__target : Prelude.mempty)
-
-instance Thrift.ThriftStruct ReferenceTarget_key where
-  buildStruct _proxy
-    (ReferenceTarget_key __field__xref __field__target)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "xref" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__xref)
-           :
-           Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__target)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__xref <- ST.newSTRef Default.def
-            __field__target <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__xref
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__target
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__xref <- ST.readSTRef __field__xref
-                                             !__val__target <- ST.readSTRef __field__target
-                                             Prelude.pure
-                                               (ReferenceTarget_key __val__xref __val__target)
-              _idMap = HashMap.fromList [("xref", 1), ("target", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData ReferenceTarget_key where
-  rnf (ReferenceTarget_key __field__xref __field__target)
-    = DeepSeq.rnf __field__xref `Prelude.seq`
-        DeepSeq.rnf __field__target `Prelude.seq` ()
-
-instance Default.Default ReferenceTarget_key where
-  def = ReferenceTarget_key Default.def Default.def
-
-instance Hashable.Hashable ReferenceTarget_key where
-  hashWithSalt __salt (ReferenceTarget_key _xref _target)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _xref)
-        _target
-
-data ReferenceLocation_key = ReferenceLocation_key{referenceLocation_key_file
-                                                   :: Glean.Schema.Src.File,
-                                                   referenceLocation_key_range ::
-                                                   Glean.Schema.LsifTypes.RangeSpan,
-                                                   referenceLocation_key_xref :: Reference}
-                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ReferenceLocation_key where
-  toJSON
-    (ReferenceLocation_key __field__file __field__range __field__xref)
-    = Aeson.object
-        ("file" .= __field__file :
-           "range" .= __field__range :
-             "xref" .= __field__xref : Prelude.mempty)
-
-instance Thrift.ThriftStruct ReferenceLocation_key where
-  buildStruct _proxy
-    (ReferenceLocation_key __field__file __field__range __field__xref)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__file)
-           :
-           Thrift.genField _proxy "range" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__range)
-             :
-             Thrift.genField _proxy "xref" (Thrift.getStructType _proxy) 3 2
-               (Thrift.buildStruct _proxy __field__xref)
-               : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__file <- ST.newSTRef Default.def
-            __field__range <- ST.newSTRef Default.def
-            __field__xref <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__file
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__range
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__xref
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__file <- ST.readSTRef __field__file
-                                             !__val__range <- ST.readSTRef __field__range
-                                             !__val__xref <- ST.readSTRef __field__xref
-                                             Prelude.pure
-                                               (ReferenceLocation_key __val__file __val__range
-                                                  __val__xref)
-              _idMap = HashMap.fromList [("file", 1), ("range", 2), ("xref", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData ReferenceLocation_key where
-  rnf
-    (ReferenceLocation_key __field__file __field__range __field__xref)
-    = DeepSeq.rnf __field__file `Prelude.seq`
-        DeepSeq.rnf __field__range `Prelude.seq`
-          DeepSeq.rnf __field__xref `Prelude.seq` ()
-
-instance Default.Default ReferenceLocation_key where
-  def = ReferenceLocation_key Default.def Default.def Default.def
-
-instance Hashable.Hashable ReferenceLocation_key where
-  hashWithSalt __salt (ReferenceLocation_key _file _range _xref)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _file) _range)
-        _xref
-
-data Reference_key = Reference_key{reference_key_symbol :: Symbol,
-                                   reference_key_location :: FileRange}
-                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Reference_key where
-  toJSON (Reference_key __field__symbol __field__location)
-    = Aeson.object
-        ("symbol" .= __field__symbol :
-           "location" .= __field__location : Prelude.mempty)
-
-instance Thrift.ThriftStruct Reference_key where
-  buildStruct _proxy
-    (Reference_key __field__symbol __field__location)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "symbol" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__symbol)
-           :
-           Thrift.genField _proxy "location" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__location)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__symbol <- ST.newSTRef Default.def
-            __field__location <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__symbol
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__location
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__symbol <- ST.readSTRef
-                                                                 __field__symbol
-                                             !__val__location <- ST.readSTRef __field__location
-                                             Prelude.pure
-                                               (Reference_key __val__symbol __val__location)
-              _idMap = HashMap.fromList [("symbol", 1), ("location", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData Reference_key where
-  rnf (Reference_key __field__symbol __field__location)
-    = DeepSeq.rnf __field__symbol `Prelude.seq`
-        DeepSeq.rnf __field__location `Prelude.seq` ()
-
-instance Default.Default Reference_key where
-  def = Reference_key Default.def Default.def
-
-instance Hashable.Hashable Reference_key where
-  hashWithSalt __salt (Reference_key _symbol _location)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _symbol)
-        _location
-
-data ProtocolVersion = ProtocolVersion_UnspecifiedProtocolVersion
-                     | ProtocolVersion__UNKNOWN Prelude.Int
-                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ProtocolVersion where
-  toJSON = Aeson.toJSON . Thrift.fromThriftEnum
-
-instance DeepSeq.NFData ProtocolVersion where
-  rnf __ProtocolVersion = Prelude.seq __ProtocolVersion ()
-
-instance Default.Default ProtocolVersion where
-  def = ProtocolVersion_UnspecifiedProtocolVersion
-
-instance Hashable.Hashable ProtocolVersion where
-  hashWithSalt _salt _val
-    = Hashable.hashWithSalt _salt (Thrift.fromThriftEnum _val)
-
-instance Thrift.ThriftEnum ProtocolVersion where
-  toThriftEnum 0 = ProtocolVersion_UnspecifiedProtocolVersion
-  toThriftEnum val = ProtocolVersion__UNKNOWN val
-  fromThriftEnum ProtocolVersion_UnspecifiedProtocolVersion = 0
-  fromThriftEnum (ProtocolVersion__UNKNOWN val) = val
-  allThriftEnumValues = [ProtocolVersion_UnspecifiedProtocolVersion]
-  toThriftEnumEither 0
-    = Prelude.Right ProtocolVersion_UnspecifiedProtocolVersion
-  toThriftEnumEither val
-    = Prelude.Left
-        ("toThriftEnumEither: not a valid identifier for enum ProtocolVersion: "
-           ++ Prelude.show val)
-
-data Metadata_key = Metadata_key{metadata_key_version ::
-                                 ProtocolVersion,
-                                 metadata_key_toolInfo ::
-                                 Prelude.Maybe Glean.Schema.LsifTypes.ToolInfo,
-                                 metadata_key_projectRoot :: Text.Text,
-                                 metadata_key_textEncoding :: TextEncoding}
-                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Metadata_key where
-  toJSON
-    (Metadata_key __field__version __field__toolInfo
-       __field__projectRoot __field__textEncoding)
-    = Aeson.object
-        ("version" .= __field__version :
-           Prelude.maybe Prelude.id ((:) . ("toolInfo" .=)) __field__toolInfo
-             ("projectRoot" .= __field__projectRoot :
-                "textEncoding" .= __field__textEncoding : Prelude.mempty))
-
-instance Thrift.ThriftStruct Metadata_key where
-  buildStruct _proxy
-    (Metadata_key __field__version __field__toolInfo
-       __field__projectRoot __field__textEncoding)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "version" (Thrift.getI32Type _proxy) 1 0
-           ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-               Thrift.fromThriftEnum)
-              __field__version)
-           :
-           let (__cereal__toolInfo, __id__toolInfo)
-                 = case __field__toolInfo of
-                     Prelude.Just _val -> ((:)
-                                             (Thrift.genField _proxy "toolInfo"
-                                                (Thrift.getStructType _proxy)
-                                                2
-                                                1
-                                                (Thrift.buildStruct _proxy _val)),
-                                           2)
-                     Prelude.Nothing -> (Prelude.id, 1)
-             in
-             __cereal__toolInfo
-               (Thrift.genField _proxy "projectRoot" (Thrift.getStringType _proxy)
-                  3
-                  __id__toolInfo
-                  (Thrift.genText _proxy __field__projectRoot)
-                  :
-                  Thrift.genField _proxy "textEncoding" (Thrift.getI32Type _proxy) 4
-                    3
-                    ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                        Thrift.fromThriftEnum)
-                       __field__textEncoding)
-                    : []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__version <- ST.newSTRef Default.def
-            __field__toolInfo <- ST.newSTRef Prelude.Nothing
-            __field__projectRoot <- ST.newSTRef ""
-            __field__textEncoding <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "ProtocolVersion")
-                                                                        ST.writeSTRef
-                                                                          __field__version
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__toolInfo
-                                                                          (Prelude.Just _val)
-                                                                 3 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__projectRoot
-                                                                          _val
-                                                                 4 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "TextEncoding")
-                                                                        ST.writeSTRef
-                                                                          __field__textEncoding
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__version <- ST.readSTRef
-                                                                  __field__version
-                                             !__val__toolInfo <- ST.readSTRef __field__toolInfo
-                                             !__val__projectRoot <- ST.readSTRef
-                                                                      __field__projectRoot
-                                             !__val__textEncoding <- ST.readSTRef
-                                                                       __field__textEncoding
-                                             Prelude.pure
-                                               (Metadata_key __val__version __val__toolInfo
-                                                  __val__projectRoot
-                                                  __val__textEncoding)
-              _idMap
-                = HashMap.fromList
-                    [("version", 1), ("toolInfo", 2), ("projectRoot", 3),
-                     ("textEncoding", 4)]
-            _parse 0)
-
-instance DeepSeq.NFData Metadata_key where
-  rnf
-    (Metadata_key __field__version __field__toolInfo
-       __field__projectRoot __field__textEncoding)
-    = DeepSeq.rnf __field__version `Prelude.seq`
-        DeepSeq.rnf __field__toolInfo `Prelude.seq`
-          DeepSeq.rnf __field__projectRoot `Prelude.seq`
-            DeepSeq.rnf __field__textEncoding `Prelude.seq` ()
-
-instance Default.Default Metadata_key where
-  def = Metadata_key Default.def Prelude.Nothing "" Default.def
-
-instance Hashable.Hashable Metadata_key where
-  hashWithSalt __salt
-    (Metadata_key _version _toolInfo _projectRoot _textEncoding)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _version)
-              _toolInfo)
-           _projectRoot)
-        _textEncoding
-
-data Location = Location{location_file :: Glean.Schema.Src.File,
-                         location_location :: Glean.Schema.Src.Range,
-                         location_name :: Text.Text}
-                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Location where
-  toJSON (Location __field__file __field__location __field__name)
-    = Aeson.object
-        ("file" .= __field__file :
-           "location" .= __field__location :
-             "name" .= __field__name : Prelude.mempty)
-
-instance Thrift.ThriftStruct Location where
-  buildStruct _proxy
-    (Location __field__file __field__location __field__name)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__file)
-           :
-           Thrift.genField _proxy "location" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__location)
-             :
-             Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 3 2
-               (Thrift.genText _proxy __field__name)
-               : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__file <- ST.newSTRef Default.def
-            __field__location <- ST.newSTRef Default.def
-            __field__name <- ST.newSTRef ""
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__file
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__location
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__file <- ST.readSTRef __field__file
-                                             !__val__location <- ST.readSTRef __field__location
-                                             !__val__name <- ST.readSTRef __field__name
-                                             Prelude.pure
-                                               (Location __val__file __val__location __val__name)
-              _idMap
-                = HashMap.fromList [("file", 1), ("location", 2), ("name", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData Location where
-  rnf (Location __field__file __field__location __field__name)
-    = DeepSeq.rnf __field__file `Prelude.seq`
-        DeepSeq.rnf __field__location `Prelude.seq`
-          DeepSeq.rnf __field__name `Prelude.seq` ()
-
-instance Default.Default Location where
-  def = Location Default.def Default.def ""
-
-instance Hashable.Hashable Location where
-  hashWithSalt __salt (Location _file _location _name)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _file)
-           _location)
-        _name
-
-data IsImplemented_key = IsImplemented_key{isImplemented_key_implemented
-                                           :: Symbol,
-                                           isImplemented_key_symbol :: Symbol}
-                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON IsImplemented_key where
-  toJSON (IsImplemented_key __field__implemented __field__symbol)
-    = Aeson.object
-        ("implemented" .= __field__implemented :
-           "symbol" .= __field__symbol : Prelude.mempty)
-
-instance Thrift.ThriftStruct IsImplemented_key where
-  buildStruct _proxy
-    (IsImplemented_key __field__implemented __field__symbol)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "implemented" (Thrift.getStructType _proxy)
-           1
-           0
-           (Thrift.buildStruct _proxy __field__implemented)
-           :
-           Thrift.genField _proxy "symbol" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__symbol)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__implemented <- ST.newSTRef Default.def
-            __field__symbol <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__implemented
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__symbol
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__implemented <- ST.readSTRef
-                                                                      __field__implemented
-                                             !__val__symbol <- ST.readSTRef __field__symbol
-                                             Prelude.pure
-                                               (IsImplemented_key __val__implemented __val__symbol)
-              _idMap = HashMap.fromList [("implemented", 1), ("symbol", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData IsImplemented_key where
-  rnf (IsImplemented_key __field__implemented __field__symbol)
-    = DeepSeq.rnf __field__implemented `Prelude.seq`
-        DeepSeq.rnf __field__symbol `Prelude.seq` ()
-
-instance Default.Default IsImplemented_key where
-  def = IsImplemented_key Default.def Default.def
-
-instance Hashable.Hashable IsImplemented_key where
-  hashWithSalt __salt (IsImplemented_key _implemented _symbol)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _implemented)
-        _symbol
-
-data IsImplementation_key = IsImplementation_key{isImplementation_key_symbol
-                                                 :: Symbol,
-                                                 isImplementation_key_implemented :: Symbol}
-                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON IsImplementation_key where
-  toJSON (IsImplementation_key __field__symbol __field__implemented)
-    = Aeson.object
-        ("symbol" .= __field__symbol :
-           "implemented" .= __field__implemented : Prelude.mempty)
-
-instance Thrift.ThriftStruct IsImplementation_key where
-  buildStruct _proxy
-    (IsImplementation_key __field__symbol __field__implemented)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "symbol" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__symbol)
-           :
-           Thrift.genField _proxy "implemented" (Thrift.getStructType _proxy)
-             2
-             1
-             (Thrift.buildStruct _proxy __field__implemented)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__symbol <- ST.newSTRef Default.def
-            __field__implemented <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__symbol
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__implemented
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__symbol <- ST.readSTRef
-                                                                 __field__symbol
-                                             !__val__implemented <- ST.readSTRef
-                                                                      __field__implemented
-                                             Prelude.pure
-                                               (IsImplementation_key __val__symbol
-                                                  __val__implemented)
-              _idMap = HashMap.fromList [("symbol", 1), ("implemented", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData IsImplementation_key where
-  rnf (IsImplementation_key __field__symbol __field__implemented)
-    = DeepSeq.rnf __field__symbol `Prelude.seq`
-        DeepSeq.rnf __field__implemented `Prelude.seq` ()
-
-instance Default.Default IsImplementation_key where
-  def = IsImplementation_key Default.def Default.def
-
-instance Hashable.Hashable IsImplementation_key where
-  hashWithSalt __salt (IsImplementation_key _symbol _implemented)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _symbol)
-        _implemented
-
-data FileXLangSymbolRef_key = FileXLangSymbolRef_key{fileXLangSymbolRef_key_file
-                                                     :: Glean.Schema.Src.File,
-                                                     fileXLangSymbolRef_key_range ::
-                                                     Glean.Schema.LsifTypes.RangeSpan,
-                                                     fileXLangSymbolRef_key_target :: Symbol}
-                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON FileXLangSymbolRef_key where
-  toJSON
-    (FileXLangSymbolRef_key __field__file __field__range
-       __field__target)
-    = Aeson.object
-        ("file" .= __field__file :
-           "range" .= __field__range :
-             "target" .= __field__target : Prelude.mempty)
-
-instance Thrift.ThriftStruct FileXLangSymbolRef_key where
-  buildStruct _proxy
-    (FileXLangSymbolRef_key __field__file __field__range
-       __field__target)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__file)
-           :
-           Thrift.genField _proxy "range" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__range)
-             :
-             Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 3 2
-               (Thrift.buildStruct _proxy __field__target)
-               : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__file <- ST.newSTRef Default.def
-            __field__range <- ST.newSTRef Default.def
-            __field__target <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__file
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__range
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__target
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__file <- ST.readSTRef __field__file
-                                             !__val__range <- ST.readSTRef __field__range
-                                             !__val__target <- ST.readSTRef __field__target
-                                             Prelude.pure
-                                               (FileXLangSymbolRef_key __val__file __val__range
-                                                  __val__target)
-              _idMap
-                = HashMap.fromList [("file", 1), ("range", 2), ("target", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData FileXLangSymbolRef_key where
-  rnf
-    (FileXLangSymbolRef_key __field__file __field__range
-       __field__target)
-    = DeepSeq.rnf __field__file `Prelude.seq`
-        DeepSeq.rnf __field__range `Prelude.seq`
-          DeepSeq.rnf __field__target `Prelude.seq` ()
-
-instance Default.Default FileXLangSymbolRef_key where
-  def = FileXLangSymbolRef_key Default.def Default.def Default.def
-
-instance Hashable.Hashable FileXLangSymbolRef_key where
-  hashWithSalt __salt (FileXLangSymbolRef_key _file _range _target)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _file) _range)
-        _target
-
-data FileRange_key = FileRange_key{fileRange_key_file ::
-                                   Glean.Schema.Src.File,
-                                   fileRange_key_range :: Glean.Schema.LsifTypes.RangeSpan}
-                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON FileRange_key where
-  toJSON (FileRange_key __field__file __field__range)
-    = Aeson.object
-        ("file" .= __field__file :
-           "range" .= __field__range : Prelude.mempty)
-
-instance Thrift.ThriftStruct FileRange_key where
-  buildStruct _proxy (FileRange_key __field__file __field__range)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__file)
-           :
-           Thrift.genField _proxy "range" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__range)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__file <- ST.newSTRef Default.def
-            __field__range <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__file
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__range
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__file <- ST.readSTRef __field__file
-                                             !__val__range <- ST.readSTRef __field__range
-                                             Prelude.pure (FileRange_key __val__file __val__range)
-              _idMap = HashMap.fromList [("file", 1), ("range", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData FileRange_key where
-  rnf (FileRange_key __field__file __field__range)
-    = DeepSeq.rnf __field__file `Prelude.seq`
-        DeepSeq.rnf __field__range `Prelude.seq` ()
-
-instance Default.Default FileRange_key where
-  def = FileRange_key Default.def Default.def
-
-instance Hashable.Hashable FileRange_key where
-  hashWithSalt __salt (FileRange_key _file _range)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _file) _range
-
-data FileLanguage_key = FileLanguage_key{fileLanguage_key_file ::
-                                         Glean.Schema.Src.File,
-                                         fileLanguage_key_language ::
-                                         Glean.Schema.LsifTypes.LanguageId}
-                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON FileLanguage_key where
-  toJSON (FileLanguage_key __field__file __field__language)
-    = Aeson.object
-        ("file" .= __field__file :
-           "language" .= __field__language : Prelude.mempty)
-
-instance Thrift.ThriftStruct FileLanguage_key where
-  buildStruct _proxy
-    (FileLanguage_key __field__file __field__language)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__file)
-           :
-           Thrift.genField _proxy "language" (Thrift.getI32Type _proxy) 2 1
-             ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                 Thrift.fromThriftEnum)
-                __field__language)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__file <- ST.newSTRef Default.def
-            __field__language <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__file
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "LanguageId")
-                                                                        ST.writeSTRef
-                                                                          __field__language
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__file <- ST.readSTRef __field__file
-                                             !__val__language <- ST.readSTRef __field__language
-                                             Prelude.pure
-                                               (FileLanguage_key __val__file __val__language)
-              _idMap = HashMap.fromList [("file", 1), ("language", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData FileLanguage_key where
-  rnf (FileLanguage_key __field__file __field__language)
-    = DeepSeq.rnf __field__file `Prelude.seq`
-        DeepSeq.rnf __field__language `Prelude.seq` ()
-
-instance Default.Default FileLanguage_key where
-  def = FileLanguage_key Default.def Default.def
-
-instance Hashable.Hashable FileLanguage_key where
-  hashWithSalt __salt (FileLanguage_key _file _language)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _file)
-        _language
-
-data Entity = Entity_rust SomeEntity
-            | Entity_go SomeEntity
-            | Entity_typescript SomeEntity
-            | Entity_java SomeEntity
-            | Entity_kotlin SomeEntity
-            | Entity_swift SomeEntity
-            | Entity_EMPTY
-              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Entity where
-  toJSON (Entity_rust __rust) = Aeson.object ["rust" .= __rust]
-  toJSON (Entity_go __go) = Aeson.object ["go" .= __go]
-  toJSON (Entity_typescript __typescript)
-    = Aeson.object ["typescript" .= __typescript]
-  toJSON (Entity_java __java) = Aeson.object ["java" .= __java]
-  toJSON (Entity_kotlin __kotlin)
-    = Aeson.object ["kotlin" .= __kotlin]
-  toJSON (Entity_swift __swift) = Aeson.object ["swift" .= __swift]
-  toJSON Entity_EMPTY = Aeson.object []
-
-instance Thrift.ThriftStruct Entity where
-  buildStruct _proxy (Entity_rust __rust)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "rust" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __rust)]
-  buildStruct _proxy (Entity_go __go)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "go" (Thrift.getStructType _proxy) 2 0
-           (Thrift.buildStruct _proxy __go)]
-  buildStruct _proxy (Entity_typescript __typescript)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "typescript" (Thrift.getStructType _proxy)
-           3
-           0
-           (Thrift.buildStruct _proxy __typescript)]
-  buildStruct _proxy (Entity_java __java)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "java" (Thrift.getStructType _proxy) 4 0
-           (Thrift.buildStruct _proxy __java)]
-  buildStruct _proxy (Entity_kotlin __kotlin)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "kotlin" (Thrift.getStructType _proxy) 5 0
-           (Thrift.buildStruct _proxy __kotlin)]
-  buildStruct _proxy (Entity_swift __swift)
-    = Thrift.genStruct _proxy
-        [Thrift.genField _proxy "swift" (Thrift.getStructType _proxy) 6 0
-           (Thrift.buildStruct _proxy __swift)]
-  buildStruct _proxy Entity_EMPTY = Thrift.genStruct _proxy []
-  parseStruct _proxy
-    = do _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap
-         case _fieldBegin of
-           Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                     1 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return (Entity_rust _val)
-                                                     2 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return (Entity_go _val)
-                                                     3 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return (Entity_typescript _val)
-                                                     4 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return (Entity_java _val)
-                                                     5 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return (Entity_kotlin _val)
-                                                     6 | _type == Thrift.getStructType _proxy ->
-                                                         do _val <- Thrift.parseStruct _proxy
-                                                            Thrift.parseStop _proxy
-                                                            Prelude.return (Entity_swift _val)
-                                                     _ -> do Thrift.parseSkip _proxy _type
-                                                               Prelude.Nothing
-                                                             Thrift.parseStop _proxy
-                                                             Prelude.return Entity_EMPTY
-           Thrift.FieldEnd -> Prelude.return Entity_EMPTY
-    where
-      _idMap
-        = HashMap.fromList
-            [("rust", 1), ("go", 2), ("typescript", 3), ("java", 4),
-             ("kotlin", 5), ("swift", 6)]
-
-instance DeepSeq.NFData Entity where
-  rnf (Entity_rust __rust) = DeepSeq.rnf __rust
-  rnf (Entity_go __go) = DeepSeq.rnf __go
-  rnf (Entity_typescript __typescript) = DeepSeq.rnf __typescript
-  rnf (Entity_java __java) = DeepSeq.rnf __java
-  rnf (Entity_kotlin __kotlin) = DeepSeq.rnf __kotlin
-  rnf (Entity_swift __swift) = DeepSeq.rnf __swift
-  rnf Entity_EMPTY = ()
-
-instance Default.Default Entity where
-  def = Entity_EMPTY
-
-instance Hashable.Hashable Entity where
-  hashWithSalt __salt (Entity_rust _rust)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 1 _rust)
-  hashWithSalt __salt (Entity_go _go)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 2 _go)
-  hashWithSalt __salt (Entity_typescript _typescript)
-    = Hashable.hashWithSalt __salt
-        (Hashable.hashWithSalt 3 _typescript)
-  hashWithSalt __salt (Entity_java _java)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 4 _java)
-  hashWithSalt __salt (Entity_kotlin _kotlin)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 5 _kotlin)
-  hashWithSalt __salt (Entity_swift _swift)
-    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 6 _swift)
-  hashWithSalt __salt Entity_EMPTY
-    = Hashable.hashWithSalt __salt (0 :: Prelude.Int)
-
-data EntityDefinition_key = EntityDefinition_key{entityDefinition_key_entity
-                                                 :: Entity,
-                                                 entityDefinition_key_defn :: Definition}
-                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON EntityDefinition_key where
-  toJSON (EntityDefinition_key __field__entity __field__defn)
-    = Aeson.object
-        ("entity" .= __field__entity :
-           "defn" .= __field__defn : Prelude.mempty)
-
-instance Thrift.ThriftStruct EntityDefinition_key where
-  buildStruct _proxy
-    (EntityDefinition_key __field__entity __field__defn)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__entity)
-           :
-           Thrift.genField _proxy "defn" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__defn)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__entity <- ST.newSTRef Default.def
-            __field__defn <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__defn
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__entity <- ST.readSTRef
-                                                                 __field__entity
-                                             !__val__defn <- ST.readSTRef __field__defn
-                                             Prelude.pure
-                                               (EntityDefinition_key __val__entity __val__defn)
-              _idMap = HashMap.fromList [("entity", 1), ("defn", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData EntityDefinition_key where
-  rnf (EntityDefinition_key __field__entity __field__defn)
-    = DeepSeq.rnf __field__entity `Prelude.seq`
-        DeepSeq.rnf __field__defn `Prelude.seq` ()
-
-instance Default.Default EntityDefinition_key where
-  def = EntityDefinition_key Default.def Default.def
-
-instance Hashable.Hashable EntityDefinition_key where
-  hashWithSalt __salt (EntityDefinition_key _entity _defn)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _entity)
-        _defn
-
-data EntityKind_key = EntityKind_key{entityKind_key_entity ::
-                                     Entity,
-                                     entityKind_key_kind :: Glean.Schema.LsifTypes.SymbolKind}
-                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON EntityKind_key where
-  toJSON (EntityKind_key __field__entity __field__kind)
-    = Aeson.object
-        ("entity" .= __field__entity :
-           "kind" .= __field__kind : Prelude.mempty)
-
-instance Thrift.ThriftStruct EntityKind_key where
-  buildStruct _proxy (EntityKind_key __field__entity __field__kind)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__entity)
-           :
-           Thrift.genField _proxy "kind" (Thrift.getI32Type _proxy) 2 1
-             ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                 Thrift.fromThriftEnum)
-                __field__kind)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__entity <- ST.newSTRef Default.def
-            __field__kind <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "SymbolKind")
-                                                                        ST.writeSTRef __field__kind
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__entity <- ST.readSTRef
-                                                                 __field__entity
-                                             !__val__kind <- ST.readSTRef __field__kind
-                                             Prelude.pure (EntityKind_key __val__entity __val__kind)
-              _idMap = HashMap.fromList [("entity", 1), ("kind", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData EntityKind_key where
-  rnf (EntityKind_key __field__entity __field__kind)
-    = DeepSeq.rnf __field__entity `Prelude.seq`
-        DeepSeq.rnf __field__kind `Prelude.seq` ()
-
-instance Default.Default EntityKind_key where
-  def = EntityKind_key Default.def Default.def
-
-instance Hashable.Hashable EntityKind_key where
-  hashWithSalt __salt (EntityKind_key _entity _kind)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _entity)
-        _kind
-
-data EntityLocation_key = EntityLocation_key{entityLocation_key_entity
-                                             :: Entity,
-                                             entityLocation_key_location :: Location}
-                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON EntityLocation_key where
-  toJSON (EntityLocation_key __field__entity __field__location)
-    = Aeson.object
-        ("entity" .= __field__entity :
-           "location" .= __field__location : Prelude.mempty)
-
-instance Thrift.ThriftStruct EntityLocation_key where
-  buildStruct _proxy
-    (EntityLocation_key __field__entity __field__location)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__entity)
-           :
-           Thrift.genField _proxy "location" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__location)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__entity <- ST.newSTRef Default.def
-            __field__location <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__location
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__entity <- ST.readSTRef
-                                                                 __field__entity
-                                             !__val__location <- ST.readSTRef __field__location
-                                             Prelude.pure
-                                               (EntityLocation_key __val__entity __val__location)
-              _idMap = HashMap.fromList [("entity", 1), ("location", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData EntityLocation_key where
-  rnf (EntityLocation_key __field__entity __field__location)
-    = DeepSeq.rnf __field__entity `Prelude.seq`
-        DeepSeq.rnf __field__location `Prelude.seq` ()
-
-instance Default.Default EntityLocation_key where
-  def = EntityLocation_key Default.def Default.def
-
-instance Hashable.Hashable EntityLocation_key where
-  hashWithSalt __salt (EntityLocation_key _entity _location)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _entity)
-        _location
-
-data EntityUses_key = EntityUses_key{entityUses_key_target ::
-                                     Entity,
-                                     entityUses_key_file :: Glean.Schema.Src.File,
-                                     entityUses_key_range :: Glean.Schema.Src.Range}
-                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON EntityUses_key where
-  toJSON
-    (EntityUses_key __field__target __field__file __field__range)
-    = Aeson.object
-        ("target" .= __field__target :
-           "file" .= __field__file :
-             "range" .= __field__range : Prelude.mempty)
-
-instance Thrift.ThriftStruct EntityUses_key where
-  buildStruct _proxy
-    (EntityUses_key __field__target __field__file __field__range)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__target)
-           :
-           Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__file)
-             :
-             Thrift.genField _proxy "range" (Thrift.getStructType _proxy) 3 2
-               (Thrift.buildStruct _proxy __field__range)
-               : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__target <- ST.newSTRef Default.def
-            __field__file <- ST.newSTRef Default.def
-            __field__range <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__target
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__file
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__range
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__target <- ST.readSTRef
-                                                                 __field__target
-                                             !__val__file <- ST.readSTRef __field__file
-                                             !__val__range <- ST.readSTRef __field__range
-                                             Prelude.pure
-                                               (EntityUses_key __val__target __val__file
-                                                  __val__range)
-              _idMap
-                = HashMap.fromList [("target", 1), ("file", 2), ("range", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData EntityUses_key where
-  rnf (EntityUses_key __field__target __field__file __field__range)
-    = DeepSeq.rnf __field__target `Prelude.seq`
-        DeepSeq.rnf __field__file `Prelude.seq`
-          DeepSeq.rnf __field__range `Prelude.seq` ()
-
-instance Default.Default EntityUses_key where
-  def = EntityUses_key Default.def Default.def Default.def
-
-instance Hashable.Hashable EntityUses_key where
-  hashWithSalt __salt (EntityUses_key _target _file _range)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _target)
-           _file)
-        _range
-
-data FileEntityXRefLocation_key = FileEntityXRefLocation_key{fileEntityXRefLocation_key_file
-                                                             :: Glean.Schema.Src.File,
-                                                             fileEntityXRefLocation_key_source ::
-                                                             Glean.Schema.Src.Range,
-                                                             fileEntityXRefLocation_key_target ::
-                                                             Location,
-                                                             fileEntityXRefLocation_key_entity ::
-                                                             Entity}
-                                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON FileEntityXRefLocation_key where
-  toJSON
-    (FileEntityXRefLocation_key __field__file __field__source
-       __field__target __field__entity)
-    = Aeson.object
-        ("file" .= __field__file :
-           "source" .= __field__source :
-             "target" .= __field__target :
-               "entity" .= __field__entity : Prelude.mempty)
-
-instance Thrift.ThriftStruct FileEntityXRefLocation_key where
-  buildStruct _proxy
-    (FileEntityXRefLocation_key __field__file __field__source
-       __field__target __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__file)
-           :
-           Thrift.genField _proxy "source" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__source)
-             :
-             Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 3 2
-               (Thrift.buildStruct _proxy __field__target)
-               :
-               Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4 3
-                 (Thrift.buildStruct _proxy __field__entity)
-                 : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__file <- ST.newSTRef Default.def
-            __field__source <- ST.newSTRef Default.def
-            __field__target <- ST.newSTRef Default.def
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__file
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__source
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__target
-                                                                          _val
-                                                                 4 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__file <- ST.readSTRef __field__file
-                                             !__val__source <- ST.readSTRef __field__source
-                                             !__val__target <- ST.readSTRef __field__target
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (FileEntityXRefLocation_key __val__file __val__source
-                                                  __val__target
-                                                  __val__entity)
-              _idMap
-                = HashMap.fromList
-                    [("file", 1), ("source", 2), ("target", 3), ("entity", 4)]
-            _parse 0)
-
-instance DeepSeq.NFData FileEntityXRefLocation_key where
-  rnf
-    (FileEntityXRefLocation_key __field__file __field__source
-       __field__target __field__entity)
-    = DeepSeq.rnf __field__file `Prelude.seq`
-        DeepSeq.rnf __field__source `Prelude.seq`
-          DeepSeq.rnf __field__target `Prelude.seq`
-            DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default FileEntityXRefLocation_key where
-  def
-    = FileEntityXRefLocation_key Default.def Default.def Default.def
-        Default.def
-
-instance Hashable.Hashable FileEntityXRefLocation_key where
-  hashWithSalt __salt
-    (FileEntityXRefLocation_key _file _source _target _entity)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _file)
-              _source)
-           _target)
-        _entity
-
-data ResolveLocation_key = ResolveLocation_key{resolveLocation_key_location
-                                               :: Location,
-                                               resolveLocation_key_entity :: Entity}
-                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ResolveLocation_key where
-  toJSON (ResolveLocation_key __field__location __field__entity)
-    = Aeson.object
-        ("location" .= __field__location :
-           "entity" .= __field__entity : Prelude.mempty)
-
-instance Thrift.ThriftStruct ResolveLocation_key where
-  buildStruct _proxy
-    (ResolveLocation_key __field__location __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "location" (Thrift.getStructType _proxy) 1
-           0
-           (Thrift.buildStruct _proxy __field__location)
-           :
-           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__entity)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__location <- ST.newSTRef Default.def
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__location
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__location <- ST.readSTRef
-                                                                   __field__location
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (ResolveLocation_key __val__location __val__entity)
-              _idMap = HashMap.fromList [("location", 1), ("entity", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData ResolveLocation_key where
-  rnf (ResolveLocation_key __field__location __field__entity)
-    = DeepSeq.rnf __field__location `Prelude.seq`
-        DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default ResolveLocation_key where
-  def = ResolveLocation_key Default.def Default.def
-
-instance Hashable.Hashable ResolveLocation_key where
-  hashWithSalt __salt (ResolveLocation_key _location _entity)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _location)
-        _entity
-
-data SearchByNameKind_key = SearchByNameKind_key{searchByNameKind_key_name
-                                                 :: Text.Text,
-                                                 searchByNameKind_key_kind ::
-                                                 Prelude.Maybe Glean.Schema.LsifTypes.SymbolKind,
-                                                 searchByNameKind_key_entity :: Entity}
-                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchByNameKind_key where
-  toJSON
-    (SearchByNameKind_key __field__name __field__kind __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           Prelude.maybe Prelude.id ((:) . ("kind" .=)) __field__kind
-             ("entity" .= __field__entity : Prelude.mempty))
-
-instance Thrift.ThriftStruct SearchByNameKind_key where
-  buildStruct _proxy
-    (SearchByNameKind_key __field__name __field__kind __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           let (__cereal__kind, __id__kind)
-                 = case __field__kind of
-                     Prelude.Just _val -> ((:)
-                                             (Thrift.genField _proxy "kind"
-                                                (Thrift.getI32Type _proxy)
-                                                2
-                                                1
-                                                ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                                                    Thrift.fromThriftEnum)
-                                                   _val)),
-                                           2)
-                     Prelude.Nothing -> (Prelude.id, 1)
-             in
-             __cereal__kind
-               (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 3
-                  __id__kind
-                  (Thrift.buildStruct _proxy __field__entity)
-                  : []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__kind <- ST.newSTRef Prelude.Nothing
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "SymbolKind")
-                                                                        ST.writeSTRef __field__kind
-                                                                          (Prelude.Just _val)
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__kind <- ST.readSTRef __field__kind
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (SearchByNameKind_key __val__name __val__kind
-                                                  __val__entity)
-              _idMap = HashMap.fromList [("name", 1), ("kind", 2), ("entity", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchByNameKind_key where
-  rnf
-    (SearchByNameKind_key __field__name __field__kind __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__kind `Prelude.seq`
-          DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default SearchByNameKind_key where
-  def = SearchByNameKind_key "" Prelude.Nothing Default.def
-
-instance Hashable.Hashable SearchByNameKind_key where
-  hashWithSalt __salt (SearchByNameKind_key _name _kind _entity)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _kind)
-        _entity
-
-data SearchBySymbol_key = SearchBySymbol_key{searchBySymbol_key_symbol
-                                             :: Symbol,
-                                             searchBySymbol_key_entity :: Entity}
-                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchBySymbol_key where
-  toJSON (SearchBySymbol_key __field__symbol __field__entity)
-    = Aeson.object
-        ("symbol" .= __field__symbol :
-           "entity" .= __field__entity : Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchBySymbol_key where
-  buildStruct _proxy
-    (SearchBySymbol_key __field__symbol __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "symbol" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__symbol)
-           :
-           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__entity)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__symbol <- ST.newSTRef Default.def
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__symbol
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__symbol <- ST.readSTRef
-                                                                 __field__symbol
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (SearchBySymbol_key __val__symbol __val__entity)
-              _idMap = HashMap.fromList [("symbol", 1), ("entity", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchBySymbol_key where
-  rnf (SearchBySymbol_key __field__symbol __field__entity)
-    = DeepSeq.rnf __field__symbol `Prelude.seq`
-        DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default SearchBySymbol_key where
-  def = SearchBySymbol_key Default.def Default.def
-
-instance Hashable.Hashable SearchBySymbol_key where
-  hashWithSalt __salt (SearchBySymbol_key _symbol _entity)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _symbol)
-        _entity
-
-data TagDefinition_key = TagDefinition_key{tagDefinition_key_language
-                                           :: Glean.Schema.LsifTypes.LanguageId,
-                                           tagDefinition_key_defn :: Definition,
-                                           tagDefinition_key_entity :: Entity}
-                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON TagDefinition_key where
-  toJSON
-    (TagDefinition_key __field__language __field__defn __field__entity)
-    = Aeson.object
-        ("language" .= __field__language :
-           "defn" .= __field__defn :
-             "entity" .= __field__entity : Prelude.mempty)
-
-instance Thrift.ThriftStruct TagDefinition_key where
-  buildStruct _proxy
-    (TagDefinition_key __field__language __field__defn __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "language" (Thrift.getI32Type _proxy) 1 0
-           ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-               Thrift.fromThriftEnum)
-              __field__language)
-           :
-           Thrift.genField _proxy "defn" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__defn)
-             :
-             Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 3 2
-               (Thrift.buildStruct _proxy __field__entity)
-               : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__language <- ST.newSTRef Default.def
-            __field__defn <- ST.newSTRef Default.def
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "LanguageId")
-                                                                        ST.writeSTRef
-                                                                          __field__language
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__defn
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__language <- ST.readSTRef
-                                                                   __field__language
-                                             !__val__defn <- ST.readSTRef __field__defn
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (TagDefinition_key __val__language __val__defn
-                                                  __val__entity)
-              _idMap
-                = HashMap.fromList [("language", 1), ("defn", 2), ("entity", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData TagDefinition_key where
-  rnf
-    (TagDefinition_key __field__language __field__defn __field__entity)
-    = DeepSeq.rnf __field__language `Prelude.seq`
-        DeepSeq.rnf __field__defn `Prelude.seq`
-          DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default TagDefinition_key where
-  def = TagDefinition_key Default.def Default.def Default.def
-
-instance Hashable.Hashable TagDefinition_key where
-  hashWithSalt __salt (TagDefinition_key _language _defn _entity)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _language)
-           _defn)
-        _entity
-
-data DisplayNameSymbol_key = DisplayNameSymbol_key{displayNameSymbol_key_displayName
-                                                   :: DisplayName,
-                                                   displayNameSymbol_key_symbol :: Symbol}
-                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON DisplayNameSymbol_key where
-  toJSON (DisplayNameSymbol_key __field__displayName __field__symbol)
-    = Aeson.object
-        ("displayName" .= __field__displayName :
-           "symbol" .= __field__symbol : Prelude.mempty)
-
-instance Thrift.ThriftStruct DisplayNameSymbol_key where
-  buildStruct _proxy
-    (DisplayNameSymbol_key __field__displayName __field__symbol)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "displayName" (Thrift.getStructType _proxy)
-           1
-           0
-           (Thrift.buildStruct _proxy __field__displayName)
-           :
-           Thrift.genField _proxy "symbol" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__symbol)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__displayName <- ST.newSTRef Default.def
-            __field__symbol <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__displayName
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__symbol
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__displayName <- ST.readSTRef
-                                                                      __field__displayName
-                                             !__val__symbol <- ST.readSTRef __field__symbol
-                                             Prelude.pure
-                                               (DisplayNameSymbol_key __val__displayName
-                                                  __val__symbol)
-              _idMap = HashMap.fromList [("displayName", 1), ("symbol", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData DisplayNameSymbol_key where
-  rnf (DisplayNameSymbol_key __field__displayName __field__symbol)
-    = DeepSeq.rnf __field__displayName `Prelude.seq`
-        DeepSeq.rnf __field__symbol `Prelude.seq` ()
-
-instance Default.Default DisplayNameSymbol_key where
-  def = DisplayNameSymbol_key Default.def Default.def
-
-instance Hashable.Hashable DisplayNameSymbol_key where
-  hashWithSalt __salt (DisplayNameSymbol_key _displayName _symbol)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _displayName)
-        _symbol
-
-data DefinitionUses_key = DefinitionUses_key{definitionUses_key_target
-                                             :: Definition,
-                                             definitionUses_key_xref :: Reference}
-                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON DefinitionUses_key where
-  toJSON (DefinitionUses_key __field__target __field__xref)
-    = Aeson.object
-        ("target" .= __field__target :
-           "xref" .= __field__xref : Prelude.mempty)
-
-instance Thrift.ThriftStruct DefinitionUses_key where
-  buildStruct _proxy
-    (DefinitionUses_key __field__target __field__xref)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__target)
-           :
-           Thrift.genField _proxy "xref" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__xref)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__target <- ST.newSTRef Default.def
-            __field__xref <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__target
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__xref
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__target <- ST.readSTRef
-                                                                 __field__target
-                                             !__val__xref <- ST.readSTRef __field__xref
-                                             Prelude.pure
-                                               (DefinitionUses_key __val__target __val__xref)
-              _idMap = HashMap.fromList [("target", 1), ("xref", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData DefinitionUses_key where
-  rnf (DefinitionUses_key __field__target __field__xref)
-    = DeepSeq.rnf __field__target `Prelude.seq`
-        DeepSeq.rnf __field__xref `Prelude.seq` ()
-
-instance Default.Default DefinitionUses_key where
-  def = DefinitionUses_key Default.def Default.def
-
-instance Hashable.Hashable DefinitionUses_key where
-  hashWithSalt __salt (DefinitionUses_key _target _xref)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _target)
-        _xref
-
-data DefinitionName_key = DefinitionName_key{definitionName_key_defn
-                                             :: Definition,
-                                             definitionName_key_docs :: LocalName}
-                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON DefinitionName_key where
-  toJSON (DefinitionName_key __field__defn __field__docs)
-    = Aeson.object
-        ("defn" .= __field__defn :
-           "docs" .= __field__docs : Prelude.mempty)
-
-instance Thrift.ThriftStruct DefinitionName_key where
-  buildStruct _proxy (DefinitionName_key __field__defn __field__docs)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "defn" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__defn)
-           :
-           Thrift.genField _proxy "docs" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__docs)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__defn <- ST.newSTRef Default.def
-            __field__docs <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__defn
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__docs
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__defn <- ST.readSTRef __field__defn
-                                             !__val__docs <- ST.readSTRef __field__docs
-                                             Prelude.pure
-                                               (DefinitionName_key __val__defn __val__docs)
-              _idMap = HashMap.fromList [("defn", 1), ("docs", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData DefinitionName_key where
-  rnf (DefinitionName_key __field__defn __field__docs)
-    = DeepSeq.rnf __field__defn `Prelude.seq`
-        DeepSeq.rnf __field__docs `Prelude.seq` ()
-
-instance Default.Default DefinitionName_key where
-  def = DefinitionName_key Default.def Default.def
-
-instance Hashable.Hashable DefinitionName_key where
-  hashWithSalt __salt (DefinitionName_key _defn _docs)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _defn) _docs
-
-data DefinitionLocation_key = DefinitionLocation_key{definitionLocation_key_file
-                                                     :: Glean.Schema.Src.File,
-                                                     definitionLocation_key_range ::
-                                                     Glean.Schema.LsifTypes.RangeSpan,
-                                                     definitionLocation_key_defn :: Definition}
-                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON DefinitionLocation_key where
-  toJSON
-    (DefinitionLocation_key __field__file __field__range __field__defn)
-    = Aeson.object
-        ("file" .= __field__file :
-           "range" .= __field__range :
-             "defn" .= __field__defn : Prelude.mempty)
-
-instance Thrift.ThriftStruct DefinitionLocation_key where
-  buildStruct _proxy
-    (DefinitionLocation_key __field__file __field__range __field__defn)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__file)
-           :
-           Thrift.genField _proxy "range" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__range)
-             :
-             Thrift.genField _proxy "defn" (Thrift.getStructType _proxy) 3 2
-               (Thrift.buildStruct _proxy __field__defn)
-               : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__file <- ST.newSTRef Default.def
-            __field__range <- ST.newSTRef Default.def
-            __field__defn <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__file
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__range
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__defn
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__file <- ST.readSTRef __field__file
-                                             !__val__range <- ST.readSTRef __field__range
-                                             !__val__defn <- ST.readSTRef __field__defn
-                                             Prelude.pure
-                                               (DefinitionLocation_key __val__file __val__range
-                                                  __val__defn)
-              _idMap = HashMap.fromList [("file", 1), ("range", 2), ("defn", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData DefinitionLocation_key where
-  rnf
-    (DefinitionLocation_key __field__file __field__range __field__defn)
-    = DeepSeq.rnf __field__file `Prelude.seq`
-        DeepSeq.rnf __field__range `Prelude.seq`
-          DeepSeq.rnf __field__defn `Prelude.seq` ()
-
-instance Default.Default DefinitionLocation_key where
-  def = DefinitionLocation_key Default.def Default.def Default.def
-
-instance Hashable.Hashable DefinitionLocation_key where
-  hashWithSalt __salt (DefinitionLocation_key _file _range _defn)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _file) _range)
-        _defn
-
-data DefinitionDocumentation_key = DefinitionDocumentation_key{definitionDocumentation_key_defn
-                                                               :: Definition,
-                                                               definitionDocumentation_key_docs ::
-                                                               Documentation}
-                                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON DefinitionDocumentation_key where
-  toJSON (DefinitionDocumentation_key __field__defn __field__docs)
-    = Aeson.object
-        ("defn" .= __field__defn :
-           "docs" .= __field__docs : Prelude.mempty)
-
-instance Thrift.ThriftStruct DefinitionDocumentation_key where
-  buildStruct _proxy
-    (DefinitionDocumentation_key __field__defn __field__docs)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "defn" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__defn)
-           :
-           Thrift.genField _proxy "docs" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__docs)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__defn <- ST.newSTRef Default.def
-            __field__docs <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__defn
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__docs
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__defn <- ST.readSTRef __field__defn
-                                             !__val__docs <- ST.readSTRef __field__docs
-                                             Prelude.pure
-                                               (DefinitionDocumentation_key __val__defn __val__docs)
-              _idMap = HashMap.fromList [("defn", 1), ("docs", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData DefinitionDocumentation_key where
-  rnf (DefinitionDocumentation_key __field__defn __field__docs)
-    = DeepSeq.rnf __field__defn `Prelude.seq`
-        DeepSeq.rnf __field__docs `Prelude.seq` ()
-
-instance Default.Default DefinitionDocumentation_key where
-  def = DefinitionDocumentation_key Default.def Default.def
-
-instance Hashable.Hashable DefinitionDocumentation_key where
-  hashWithSalt __salt (DefinitionDocumentation_key _defn _docs)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _defn) _docs
-
-data Definition_key = Definition_key{definition_key_symbol ::
-                                     Symbol,
-                                     definition_key_location :: FileRange}
-                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON Definition_key where
-  toJSON (Definition_key __field__symbol __field__location)
-    = Aeson.object
-        ("symbol" .= __field__symbol :
-           "location" .= __field__location : Prelude.mempty)
-
-instance Thrift.ThriftStruct Definition_key where
-  buildStruct _proxy
-    (Definition_key __field__symbol __field__location)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "symbol" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__symbol)
-           :
-           Thrift.genField _proxy "location" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__location)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__symbol <- ST.newSTRef Default.def
-            __field__location <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__symbol
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__location
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__symbol <- ST.readSTRef
-                                                                 __field__symbol
-                                             !__val__location <- ST.readSTRef __field__location
-                                             Prelude.pure
-                                               (Definition_key __val__symbol __val__location)
-              _idMap = HashMap.fromList [("symbol", 1), ("location", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData Definition_key where
-  rnf (Definition_key __field__symbol __field__location)
-    = DeepSeq.rnf __field__symbol `Prelude.seq`
-        DeepSeq.rnf __field__location `Prelude.seq` ()
-
-instance Default.Default Definition_key where
-  def = Definition_key Default.def Default.def
-
-instance Hashable.Hashable Definition_key where
-  hashWithSalt __salt (Definition_key _symbol _location)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _symbol)
-        _location
-{-# LINE 19 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.EntityLocation_key
-         where
-  buildRtsValue b (Glean.Schema.Scip.Types.EntityLocation_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Scip.Types.EntityLocation_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "scip.EntityLocation_key" (Prelude.Just 0))
-{-# LINE 28 "glean/schema/thrift/scip_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Scip.Types.EntityLocation_key =
-     'Angle.TField "entity" (Glean.Schema.Scip.Types.Entity)
-       ('Angle.TField "location" (Glean.Schema.Scip.Types.Location)
-          ('Angle.TNoFields))
-{-# LINE 30 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Scip.Types.EntityLocation
-         where
-  type KeyType Glean.Schema.Scip.Types.EntityLocation =
-       Glean.Schema.Scip.Types.EntityLocation_key
-  getName _proxy = Glean.PredicateRef "scip.EntityLocation" 1
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Scip.Types.entityLocation_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Scip.Types.EntityLocation x k
-  getFactKey = Glean.Schema.Scip.Types.entityLocation_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 39 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.EntityLocation where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 45 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.ReferenceTarget_key
-         where
-  buildRtsValue b (Glean.Schema.Scip.Types.ReferenceTarget_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Scip.Types.ReferenceTarget_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "scip.ReferenceTarget_key" (Prelude.Just 0))
-{-# LINE 54 "glean/schema/thrift/scip_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Scip.Types.ReferenceTarget_key =
-     'Angle.TField "xref"
-       (Glean.KeyType Glean.Schema.Scip.Types.Reference)
-       ('Angle.TField "target"
-          (Glean.KeyType Glean.Schema.Scip.Types.Definition)
-          ('Angle.TNoFields))
-{-# LINE 56 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Scip.Types.ReferenceTarget
-         where
-  type KeyType Glean.Schema.Scip.Types.ReferenceTarget =
-       Glean.Schema.Scip.Types.ReferenceTarget_key
-  getName _proxy = Glean.PredicateRef "scip.ReferenceTarget" 1
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Scip.Types.referenceTarget_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Scip.Types.ReferenceTarget x k
-  getFactKey = Glean.Schema.Scip.Types.referenceTarget_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 65 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.ReferenceTarget where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 71 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Scip.Types.FileEntityXRefLocation_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Scip.Types.FileEntityXRefLocation_key x1 x2 x3 x4)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-  decodeRtsValue
-    = Glean.Schema.Scip.Types.FileEntityXRefLocation_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "scip.FileEntityXRefLocation_key"
-           (Prelude.Just 0))
-{-# LINE 84 "glean/schema/thrift/scip_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.Scip.Types.FileEntityXRefLocation_key
-     =
-     'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
-       ('Angle.TField "source" (Glean.Schema.Src.Types.Range)
-          ('Angle.TField "target" (Glean.Schema.Scip.Types.Location)
-             ('Angle.TField "entity" (Glean.Schema.Scip.Types.Entity)
-                ('Angle.TNoFields))))
-{-# LINE 86 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Scip.Types.FileEntityXRefLocation
-         where
-  type KeyType Glean.Schema.Scip.Types.FileEntityXRefLocation =
-       Glean.Schema.Scip.Types.FileEntityXRefLocation_key
-  getName _proxy = Glean.PredicateRef "scip.FileEntityXRefLocation" 1
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Scip.Types.fileEntityXRefLocation_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Scip.Types.FileEntityXRefLocation x k
-  getFactKey = Glean.Schema.Scip.Types.fileEntityXRefLocation_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 95 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.FileEntityXRefLocation
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 101 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.IsImplementation_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Scip.Types.IsImplementation_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Scip.Types.IsImplementation_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "scip.IsImplementation_key" (Prelude.Just 0))
-{-# LINE 110 "glean/schema/thrift/scip_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Scip.Types.IsImplementation_key =
-     'Angle.TField "symbol"
-       (Glean.KeyType Glean.Schema.Scip.Types.Symbol)
-       ('Angle.TField "implemented"
-          (Glean.KeyType Glean.Schema.Scip.Types.Symbol)
-          ('Angle.TNoFields))
-{-# LINE 112 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Scip.Types.IsImplementation
-         where
-  type KeyType Glean.Schema.Scip.Types.IsImplementation =
-       Glean.Schema.Scip.Types.IsImplementation_key
-  getName _proxy = Glean.PredicateRef "scip.IsImplementation" 1
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Scip.Types.isImplementation_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Scip.Types.IsImplementation x k
-  getFactKey = Glean.Schema.Scip.Types.isImplementation_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 121 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.IsImplementation where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 127 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.SymbolName_key where
-  buildRtsValue b (Glean.Schema.Scip.Types.SymbolName_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Scip.Types.SymbolName_key <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "scip.SymbolName_key" (Prelude.Just 0))
-{-# LINE 136 "glean/schema/thrift/scip_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Scip.Types.SymbolName_key =
-     'Angle.TField "symbol"
-       (Glean.KeyType Glean.Schema.Scip.Types.Symbol)
-       ('Angle.TField "name"
-          (Glean.KeyType Glean.Schema.Scip.Types.LocalName)
-          ('Angle.TNoFields))
-{-# LINE 138 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Scip.Types.SymbolName where
-  type KeyType Glean.Schema.Scip.Types.SymbolName =
-       Glean.Schema.Scip.Types.SymbolName_key
-  getName _proxy = Glean.PredicateRef "scip.SymbolName" 1
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Scip.Types.symbolName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Scip.Types.SymbolName x k
-  getFactKey = Glean.Schema.Scip.Types.symbolName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 147 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.SymbolName where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 153 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.DefinitionName_key
-         where
-  buildRtsValue b (Glean.Schema.Scip.Types.DefinitionName_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Scip.Types.DefinitionName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "scip.DefinitionName_key" (Prelude.Just 0))
-{-# LINE 162 "glean/schema/thrift/scip_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Scip.Types.DefinitionName_key =
-     'Angle.TField "defn"
-       (Glean.KeyType Glean.Schema.Scip.Types.Definition)
-       ('Angle.TField "docs"
-          (Glean.KeyType Glean.Schema.Scip.Types.LocalName)
-          ('Angle.TNoFields))
-{-# LINE 164 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Scip.Types.DefinitionName
-         where
-  type KeyType Glean.Schema.Scip.Types.DefinitionName =
-       Glean.Schema.Scip.Types.DefinitionName_key
-  getName _proxy = Glean.PredicateRef "scip.DefinitionName" 1
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Scip.Types.definitionName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Scip.Types.DefinitionName x k
-  getFactKey = Glean.Schema.Scip.Types.definitionName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 173 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.DefinitionName where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 179 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.SearchByNameKind_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Scip.Types.SearchByNameKind_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Scip.Types.SearchByNameKind_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "scip.SearchByNameKind_key" (Prelude.Just 0))
-{-# LINE 190 "glean/schema/thrift/scip_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Scip.Types.SearchByNameKind_key =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "kind"
-          (Prelude.Maybe Glean.Schema.LsifTypes.Types.SymbolKind)
-          ('Angle.TField "entity" (Glean.Schema.Scip.Types.Entity)
-             ('Angle.TNoFields)))
-{-# LINE 192 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Scip.Types.SearchByNameKind
-         where
-  type KeyType Glean.Schema.Scip.Types.SearchByNameKind =
-       Glean.Schema.Scip.Types.SearchByNameKind_key
-  getName _proxy = Glean.PredicateRef "scip.SearchByNameKind" 1
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Scip.Types.searchByNameKind_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Scip.Types.SearchByNameKind x k
-  getFactKey = Glean.Schema.Scip.Types.searchByNameKind_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 201 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.SearchByNameKind where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 207 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.FileRange_key where
-  buildRtsValue b (Glean.Schema.Scip.Types.FileRange_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Scip.Types.FileRange_key <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "scip.FileRange_key" (Prelude.Just 0))
-{-# LINE 216 "glean/schema/thrift/scip_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Scip.Types.FileRange_key =
-     'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
-       ('Angle.TField "range" (Glean.Schema.LsifTypes.Types.RangeSpan)
-          ('Angle.TNoFields))
-{-# LINE 218 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Scip.Types.FileRange where
-  type KeyType Glean.Schema.Scip.Types.FileRange =
-       Glean.Schema.Scip.Types.FileRange_key
-  getName _proxy = Glean.PredicateRef "scip.FileRange" 1
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Scip.Types.fileRange_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Scip.Types.FileRange x k
-  getFactKey = Glean.Schema.Scip.Types.fileRange_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 227 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.FileRange where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 233 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.SymbolKind_key where
-  buildRtsValue b (Glean.Schema.Scip.Types.SymbolKind_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Scip.Types.SymbolKind_key <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "scip.SymbolKind_key" (Prelude.Just 0))
-{-# LINE 242 "glean/schema/thrift/scip_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Scip.Types.SymbolKind_key =
-     'Angle.TField "symbol"
-       (Glean.KeyType Glean.Schema.Scip.Types.Symbol)
-       ('Angle.TField "kind" (Glean.Schema.LsifTypes.Types.SymbolKind)
-          ('Angle.TNoFields))
-{-# LINE 244 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Scip.Types.SymbolKind where
-  type KeyType Glean.Schema.Scip.Types.SymbolKind =
-       Glean.Schema.Scip.Types.SymbolKind_key
-  getName _proxy = Glean.PredicateRef "scip.SymbolKind" 1
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Scip.Types.symbolKind_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Scip.Types.SymbolKind x k
-  getFactKey = Glean.Schema.Scip.Types.symbolKind_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 253 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.SymbolKind where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 259 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.ResolveLocation_key
-         where
-  buildRtsValue b (Glean.Schema.Scip.Types.ResolveLocation_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Scip.Types.ResolveLocation_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "scip.ResolveLocation_key" (Prelude.Just 0))
-{-# LINE 268 "glean/schema/thrift/scip_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Scip.Types.ResolveLocation_key =
-     'Angle.TField "location" (Glean.Schema.Scip.Types.Location)
-       ('Angle.TField "entity" (Glean.Schema.Scip.Types.Entity)
-          ('Angle.TNoFields))
-{-# LINE 270 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Scip.Types.ResolveLocation
-         where
-  type KeyType Glean.Schema.Scip.Types.ResolveLocation =
-       Glean.Schema.Scip.Types.ResolveLocation_key
-  getName _proxy = Glean.PredicateRef "scip.ResolveLocation" 1
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Scip.Types.resolveLocation_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Scip.Types.ResolveLocation x k
-  getFactKey = Glean.Schema.Scip.Types.resolveLocation_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 279 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.ResolveLocation where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 285 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.EntityUses_key where
-  buildRtsValue b (Glean.Schema.Scip.Types.EntityUses_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Scip.Types.EntityUses_key <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "scip.EntityUses_key" (Prelude.Just 0))
-{-# LINE 296 "glean/schema/thrift/scip_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Scip.Types.EntityUses_key =
-     'Angle.TField "target" (Glean.Schema.Scip.Types.Entity)
-       ('Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
-          ('Angle.TField "range" (Glean.Schema.Src.Types.Range)
-             ('Angle.TNoFields)))
-{-# LINE 298 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Scip.Types.EntityUses where
-  type KeyType Glean.Schema.Scip.Types.EntityUses =
-       Glean.Schema.Scip.Types.EntityUses_key
-  getName _proxy = Glean.PredicateRef "scip.EntityUses" 1
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Scip.Types.entityUses_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Scip.Types.EntityUses x k
-  getFactKey = Glean.Schema.Scip.Types.entityUses_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 307 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.EntityUses where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 313 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.DefinitionLocation_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Scip.Types.DefinitionLocation_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Scip.Types.DefinitionLocation_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "scip.DefinitionLocation_key" (Prelude.Just 0))
-{-# LINE 324 "glean/schema/thrift/scip_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Scip.Types.DefinitionLocation_key =
-     'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
-       ('Angle.TField "range" (Glean.Schema.LsifTypes.Types.RangeSpan)
-          ('Angle.TField "defn"
-             (Glean.KeyType Glean.Schema.Scip.Types.Definition)
-             ('Angle.TNoFields)))
-{-# LINE 326 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Scip.Types.DefinitionLocation
-         where
-  type KeyType Glean.Schema.Scip.Types.DefinitionLocation =
-       Glean.Schema.Scip.Types.DefinitionLocation_key
-  getName _proxy = Glean.PredicateRef "scip.DefinitionLocation" 1
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Scip.Types.definitionLocation_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Scip.Types.DefinitionLocation x k
-  getFactKey = Glean.Schema.Scip.Types.definitionLocation_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 335 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.DefinitionLocation
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 341 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.SearchBySymbol_key
-         where
-  buildRtsValue b (Glean.Schema.Scip.Types.SearchBySymbol_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Scip.Types.SearchBySymbol_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "scip.SearchBySymbol_key" (Prelude.Just 0))
-{-# LINE 350 "glean/schema/thrift/scip_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Scip.Types.SearchBySymbol_key =
-     'Angle.TField "symbol"
-       (Glean.KeyType Glean.Schema.Scip.Types.Symbol)
-       ('Angle.TField "entity" (Glean.Schema.Scip.Types.Entity)
-          ('Angle.TNoFields))
-{-# LINE 352 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Scip.Types.SearchBySymbol
-         where
-  type KeyType Glean.Schema.Scip.Types.SearchBySymbol =
-       Glean.Schema.Scip.Types.SearchBySymbol_key
-  getName _proxy = Glean.PredicateRef "scip.SearchBySymbol" 1
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Scip.Types.searchBySymbol_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Scip.Types.SearchBySymbol x k
-  getFactKey = Glean.Schema.Scip.Types.searchBySymbol_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 361 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.SearchBySymbol where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 367 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.FileXLangSymbolRef_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Scip.Types.FileXLangSymbolRef_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Scip.Types.FileXLangSymbolRef_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "scip.FileXLangSymbolRef_key" (Prelude.Just 0))
-{-# LINE 378 "glean/schema/thrift/scip_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Scip.Types.FileXLangSymbolRef_key =
-     'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
-       ('Angle.TField "range" (Glean.Schema.LsifTypes.Types.RangeSpan)
-          ('Angle.TField "target"
-             (Glean.KeyType Glean.Schema.Scip.Types.Symbol)
-             ('Angle.TNoFields)))
-{-# LINE 380 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Scip.Types.FileXLangSymbolRef
-         where
-  type KeyType Glean.Schema.Scip.Types.FileXLangSymbolRef =
-       Glean.Schema.Scip.Types.FileXLangSymbolRef_key
-  getName _proxy = Glean.PredicateRef "scip.FileXLangSymbolRef" 1
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Scip.Types.fileXLangSymbolRef_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Scip.Types.FileXLangSymbolRef x k
-  getFactKey = Glean.Schema.Scip.Types.fileXLangSymbolRef_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 389 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.FileXLangSymbolRef
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 395 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.ReferenceLocation_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Scip.Types.ReferenceLocation_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Scip.Types.ReferenceLocation_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "scip.ReferenceLocation_key" (Prelude.Just 0))
-{-# LINE 406 "glean/schema/thrift/scip_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Scip.Types.ReferenceLocation_key =
-     'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
-       ('Angle.TField "range" (Glean.Schema.LsifTypes.Types.RangeSpan)
-          ('Angle.TField "xref"
-             (Glean.KeyType Glean.Schema.Scip.Types.Reference)
-             ('Angle.TNoFields)))
-{-# LINE 408 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Scip.Types.ReferenceLocation
-         where
-  type KeyType Glean.Schema.Scip.Types.ReferenceLocation =
-       Glean.Schema.Scip.Types.ReferenceLocation_key
-  getName _proxy = Glean.PredicateRef "scip.ReferenceLocation" 1
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Scip.Types.referenceLocation_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Scip.Types.ReferenceLocation x k
-  getFactKey = Glean.Schema.Scip.Types.referenceLocation_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 417 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.ReferenceLocation where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 423 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.SymbolDocumentation_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Scip.Types.SymbolDocumentation_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Scip.Types.SymbolDocumentation_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "scip.SymbolDocumentation_key" (Prelude.Just 0))
-{-# LINE 432 "glean/schema/thrift/scip_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Scip.Types.SymbolDocumentation_key
-     =
-     'Angle.TField "symbol"
-       (Glean.KeyType Glean.Schema.Scip.Types.Symbol)
-       ('Angle.TField "docs"
-          (Glean.KeyType Glean.Schema.Scip.Types.Documentation)
-          ('Angle.TNoFields))
-{-# LINE 434 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Scip.Types.SymbolDocumentation
-         where
-  type KeyType Glean.Schema.Scip.Types.SymbolDocumentation =
-       Glean.Schema.Scip.Types.SymbolDocumentation_key
-  getName _proxy = Glean.PredicateRef "scip.SymbolDocumentation" 1
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Scip.Types.symbolDocumentation_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Scip.Types.SymbolDocumentation x k
-  getFactKey = Glean.Schema.Scip.Types.symbolDocumentation_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 443 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.SymbolDocumentation
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 449 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Scip.Types.LocalName where
-  type KeyType Glean.Schema.Scip.Types.LocalName = Data.Text.Text
-  getName _proxy = Glean.PredicateRef "scip.LocalName" 1
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Scip.Types.localName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Scip.Types.LocalName x k
-  getFactKey = Glean.Schema.Scip.Types.localName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 457 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.LocalName where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 463 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.Reference_key where
-  buildRtsValue b (Glean.Schema.Scip.Types.Reference_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Scip.Types.Reference_key <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "scip.Reference_key" (Prelude.Just 0))
-{-# LINE 472 "glean/schema/thrift/scip_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Scip.Types.Reference_key =
-     'Angle.TField "symbol"
-       (Glean.KeyType Glean.Schema.Scip.Types.Symbol)
-       ('Angle.TField "location"
-          (Glean.KeyType Glean.Schema.Scip.Types.FileRange)
-          ('Angle.TNoFields))
-{-# LINE 474 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Scip.Types.Reference where
-  type KeyType Glean.Schema.Scip.Types.Reference =
-       Glean.Schema.Scip.Types.Reference_key
-  getName _proxy = Glean.PredicateRef "scip.Reference" 1
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Scip.Types.reference_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Scip.Types.Reference x k
-  getFactKey = Glean.Schema.Scip.Types.reference_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 483 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.Reference where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 489 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Scip.Types.DisplayName where
-  type KeyType Glean.Schema.Scip.Types.DisplayName = Data.Text.Text
-  getName _proxy = Glean.PredicateRef "scip.DisplayName" 1
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Scip.Types.displayName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Scip.Types.DisplayName x k
-  getFactKey = Glean.Schema.Scip.Types.displayName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 497 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.DisplayName where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 503 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.Metadata_key where
-  buildRtsValue b (Glean.Schema.Scip.Types.Metadata_key x1 x2 x3 x4)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-  decodeRtsValue
-    = Glean.Schema.Scip.Types.Metadata_key <$> Glean.decodeRtsValue <*>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "scip.Metadata_key" (Prelude.Just 0))
-{-# LINE 516 "glean/schema/thrift/scip_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Scip.Types.Metadata_key =
-     'Angle.TField "version" (Glean.Schema.Scip.Types.ProtocolVersion)
-       ('Angle.TField "toolInfo"
-          (Prelude.Maybe Glean.Schema.LsifTypes.Types.ToolInfo)
-          ('Angle.TField "projectRoot" (Data.Text.Text)
-             ('Angle.TField "textEncoding"
-                (Glean.Schema.Scip.Types.TextEncoding)
-                ('Angle.TNoFields))))
-{-# LINE 518 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Scip.Types.Metadata where
-  type KeyType Glean.Schema.Scip.Types.Metadata =
-       Glean.Schema.Scip.Types.Metadata_key
-  getName _proxy = Glean.PredicateRef "scip.Metadata" 1
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Scip.Types.metadata_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Scip.Types.Metadata x k
-  getFactKey = Glean.Schema.Scip.Types.metadata_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 527 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.Metadata where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 533 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.Definition_key where
-  buildRtsValue b (Glean.Schema.Scip.Types.Definition_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Scip.Types.Definition_key <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "scip.Definition_key" (Prelude.Just 0))
-{-# LINE 542 "glean/schema/thrift/scip_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Scip.Types.Definition_key =
-     'Angle.TField "symbol"
-       (Glean.KeyType Glean.Schema.Scip.Types.Symbol)
-       ('Angle.TField "location"
-          (Glean.KeyType Glean.Schema.Scip.Types.FileRange)
-          ('Angle.TNoFields))
-{-# LINE 544 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Scip.Types.Definition where
-  type KeyType Glean.Schema.Scip.Types.Definition =
-       Glean.Schema.Scip.Types.Definition_key
-  getName _proxy = Glean.PredicateRef "scip.Definition" 1
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Scip.Types.definition_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Scip.Types.Definition x k
-  getFactKey = Glean.Schema.Scip.Types.definition_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 553 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.Definition where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 559 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.IsImplemented_key where
-  buildRtsValue b (Glean.Schema.Scip.Types.IsImplemented_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Scip.Types.IsImplemented_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "scip.IsImplemented_key" (Prelude.Just 0))
-{-# LINE 568 "glean/schema/thrift/scip_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Scip.Types.IsImplemented_key =
-     'Angle.TField "implemented"
-       (Glean.KeyType Glean.Schema.Scip.Types.Symbol)
-       ('Angle.TField "symbol"
-          (Glean.KeyType Glean.Schema.Scip.Types.Symbol)
-          ('Angle.TNoFields))
-{-# LINE 570 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Scip.Types.IsImplemented
-         where
-  type KeyType Glean.Schema.Scip.Types.IsImplemented =
-       Glean.Schema.Scip.Types.IsImplemented_key
-  getName _proxy = Glean.PredicateRef "scip.IsImplemented" 1
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Scip.Types.isImplemented_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Scip.Types.IsImplemented x k
-  getFactKey = Glean.Schema.Scip.Types.isImplemented_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 579 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.IsImplemented where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 585 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.DisplayNameSymbol_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Scip.Types.DisplayNameSymbol_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Scip.Types.DisplayNameSymbol_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "scip.DisplayNameSymbol_key" (Prelude.Just 0))
-{-# LINE 594 "glean/schema/thrift/scip_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Scip.Types.DisplayNameSymbol_key =
-     'Angle.TField "displayName"
-       (Glean.KeyType Glean.Schema.Scip.Types.DisplayName)
-       ('Angle.TField "symbol"
-          (Glean.KeyType Glean.Schema.Scip.Types.Symbol)
-          ('Angle.TNoFields))
-{-# LINE 596 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Scip.Types.DisplayNameSymbol
-         where
-  type KeyType Glean.Schema.Scip.Types.DisplayNameSymbol =
-       Glean.Schema.Scip.Types.DisplayNameSymbol_key
-  getName _proxy = Glean.PredicateRef "scip.DisplayNameSymbol" 1
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Scip.Types.displayNameSymbol_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Scip.Types.DisplayNameSymbol x k
-  getFactKey = Glean.Schema.Scip.Types.displayNameSymbol_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 605 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.DisplayNameSymbol where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 611 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.FileLanguage_key where
-  buildRtsValue b (Glean.Schema.Scip.Types.FileLanguage_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Scip.Types.FileLanguage_key <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "scip.FileLanguage_key" (Prelude.Just 0))
-{-# LINE 620 "glean/schema/thrift/scip_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Scip.Types.FileLanguage_key =
-     'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
-       ('Angle.TField "language" (Glean.Schema.LsifTypes.Types.LanguageId)
-          ('Angle.TNoFields))
-{-# LINE 622 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Scip.Types.FileLanguage where
-  type KeyType Glean.Schema.Scip.Types.FileLanguage =
-       Glean.Schema.Scip.Types.FileLanguage_key
-  getName _proxy = Glean.PredicateRef "scip.FileLanguage" 1
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Scip.Types.fileLanguage_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Scip.Types.FileLanguage x k
-  getFactKey = Glean.Schema.Scip.Types.fileLanguage_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 631 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.FileLanguage where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 637 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Scip.Types.Documentation
-         where
-  type KeyType Glean.Schema.Scip.Types.Documentation = Data.Text.Text
-  getName _proxy = Glean.PredicateRef "scip.Documentation" 1
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Scip.Types.documentation_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Scip.Types.Documentation x k
-  getFactKey = Glean.Schema.Scip.Types.documentation_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 645 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.Documentation where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 651 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Scip.Types.Symbol where
-  type KeyType Glean.Schema.Scip.Types.Symbol = Data.Text.Text
-  getName _proxy = Glean.PredicateRef "scip.Symbol" 1
-  getId = Glean.IdOf . Glean.Fid . Glean.Schema.Scip.Types.symbol_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Scip.Types.Symbol x k
-  getFactKey = Glean.Schema.Scip.Types.symbol_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 659 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.Symbol where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 665 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.Scip.Types.DefinitionDocumentation_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Scip.Types.DefinitionDocumentation_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Scip.Types.DefinitionDocumentation_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "scip.DefinitionDocumentation_key"
-           (Prelude.Just 0))
-{-# LINE 674 "glean/schema/thrift/scip_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.Scip.Types.DefinitionDocumentation_key
-     =
-     'Angle.TField "defn"
-       (Glean.KeyType Glean.Schema.Scip.Types.Definition)
-       ('Angle.TField "docs"
-          (Glean.KeyType Glean.Schema.Scip.Types.Documentation)
-          ('Angle.TNoFields))
-{-# LINE 676 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.Scip.Types.DefinitionDocumentation
-         where
-  type KeyType Glean.Schema.Scip.Types.DefinitionDocumentation =
-       Glean.Schema.Scip.Types.DefinitionDocumentation_key
-  getName _proxy
-    = Glean.PredicateRef "scip.DefinitionDocumentation" 1
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Scip.Types.definitionDocumentation_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Scip.Types.DefinitionDocumentation x k
-  getFactKey = Glean.Schema.Scip.Types.definitionDocumentation_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 685 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.DefinitionDocumentation
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 691 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.SymbolDisplayName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Scip.Types.SymbolDisplayName_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Scip.Types.SymbolDisplayName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "scip.SymbolDisplayName_key" (Prelude.Just 0))
-{-# LINE 700 "glean/schema/thrift/scip_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Scip.Types.SymbolDisplayName_key =
-     'Angle.TField "symbol"
-       (Glean.KeyType Glean.Schema.Scip.Types.Symbol)
-       ('Angle.TField "displayName"
-          (Glean.KeyType Glean.Schema.Scip.Types.DisplayName)
-          ('Angle.TNoFields))
-{-# LINE 702 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Scip.Types.SymbolDisplayName
-         where
-  type KeyType Glean.Schema.Scip.Types.SymbolDisplayName =
-       Glean.Schema.Scip.Types.SymbolDisplayName_key
-  getName _proxy = Glean.PredicateRef "scip.SymbolDisplayName" 1
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Scip.Types.symbolDisplayName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Scip.Types.SymbolDisplayName x k
-  getFactKey = Glean.Schema.Scip.Types.symbolDisplayName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 711 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.SymbolDisplayName where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 717 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.TagDefinition_key where
-  buildRtsValue b
-    (Glean.Schema.Scip.Types.TagDefinition_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Scip.Types.TagDefinition_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "scip.TagDefinition_key" (Prelude.Just 0))
-{-# LINE 728 "glean/schema/thrift/scip_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Scip.Types.TagDefinition_key =
-     'Angle.TField "language" (Glean.Schema.LsifTypes.Types.LanguageId)
-       ('Angle.TField "defn"
-          (Glean.KeyType Glean.Schema.Scip.Types.Definition)
-          ('Angle.TField "entity" (Glean.Schema.Scip.Types.Entity)
-             ('Angle.TNoFields)))
-{-# LINE 730 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Scip.Types.TagDefinition
-         where
-  type KeyType Glean.Schema.Scip.Types.TagDefinition =
-       Glean.Schema.Scip.Types.TagDefinition_key
-  getName _proxy = Glean.PredicateRef "scip.TagDefinition" 1
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Scip.Types.tagDefinition_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Scip.Types.TagDefinition x k
-  getFactKey = Glean.Schema.Scip.Types.tagDefinition_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 739 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.TagDefinition where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 745 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.EntityDefinition_key
-         where
-  buildRtsValue b
-    (Glean.Schema.Scip.Types.EntityDefinition_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Scip.Types.EntityDefinition_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "scip.EntityDefinition_key" (Prelude.Just 0))
-{-# LINE 754 "glean/schema/thrift/scip_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Scip.Types.EntityDefinition_key =
-     'Angle.TField "entity" (Glean.Schema.Scip.Types.Entity)
-       ('Angle.TField "defn"
-          (Glean.KeyType Glean.Schema.Scip.Types.Definition)
-          ('Angle.TNoFields))
-{-# LINE 756 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Scip.Types.EntityDefinition
-         where
-  type KeyType Glean.Schema.Scip.Types.EntityDefinition =
-       Glean.Schema.Scip.Types.EntityDefinition_key
-  getName _proxy = Glean.PredicateRef "scip.EntityDefinition" 1
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Scip.Types.entityDefinition_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Scip.Types.EntityDefinition x k
-  getFactKey = Glean.Schema.Scip.Types.entityDefinition_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 765 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.EntityDefinition where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 771 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.DefinitionUses_key
-         where
-  buildRtsValue b (Glean.Schema.Scip.Types.DefinitionUses_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Scip.Types.DefinitionUses_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "scip.DefinitionUses_key" (Prelude.Just 0))
-{-# LINE 780 "glean/schema/thrift/scip_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Scip.Types.DefinitionUses_key =
-     'Angle.TField "target"
-       (Glean.KeyType Glean.Schema.Scip.Types.Definition)
-       ('Angle.TField "xref"
-          (Glean.KeyType Glean.Schema.Scip.Types.Reference)
-          ('Angle.TNoFields))
-{-# LINE 782 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Scip.Types.DefinitionUses
-         where
-  type KeyType Glean.Schema.Scip.Types.DefinitionUses =
-       Glean.Schema.Scip.Types.DefinitionUses_key
-  getName _proxy = Glean.PredicateRef "scip.DefinitionUses" 1
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.Scip.Types.definitionUses_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Scip.Types.DefinitionUses x k
-  getFactKey = Glean.Schema.Scip.Types.definitionUses_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 791 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.DefinitionUses where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 797 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.EntityKind_key where
-  buildRtsValue b (Glean.Schema.Scip.Types.EntityKind_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.Scip.Types.EntityKind_key <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "scip.EntityKind_key" (Prelude.Just 0))
-{-# LINE 806 "glean/schema/thrift/scip_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.Scip.Types.EntityKind_key =
-     'Angle.TField "entity" (Glean.Schema.Scip.Types.Entity)
-       ('Angle.TField "kind" (Glean.Schema.LsifTypes.Types.SymbolKind)
-          ('Angle.TNoFields))
-{-# LINE 808 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Predicate Glean.Schema.Scip.Types.EntityKind where
-  type KeyType Glean.Schema.Scip.Types.EntityKind =
-       Glean.Schema.Scip.Types.EntityKind_key
-  getName _proxy = Glean.PredicateRef "scip.EntityKind" 1
-  getId
-    = Glean.IdOf . Glean.Fid . Glean.Schema.Scip.Types.entityKind_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.Scip.Types.EntityKind x k
-  getFactKey = Glean.Schema.Scip.Types.entityKind_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 817 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.EntityKind where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 823 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.SomeEntity where
-  buildRtsValue b (Glean.Schema.Scip.Types.SomeEntity x1)
-    = do Glean.buildRtsValue b x1
-  decodeRtsValue
-    = Glean.Schema.Scip.Types.SomeEntity <$> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "scip.SomeEntity" (Prelude.Just 1))
-{-# LINE 830 "glean/schema/thrift/scip_include.hs" #-}
-type instance Angle.RecordFields Glean.Schema.Scip.Types.SomeEntity
-     =
-     'Angle.TField "defn"
-       (Glean.KeyType Glean.Schema.Scip.Types.Definition)
-       ('Angle.TNoFields)
-{-# LINE 832 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.ProtocolVersion where
-  buildRtsValue = Glean.thriftEnum_buildRtsValue
-  decodeRtsValue = Glean.thriftEnumD
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "scip.ProtocolVersion" (Prelude.Just 1))
-{-# LINE 837 "glean/schema/thrift/scip_include.hs" #-}
-type instance
-     Angle.SumFields Glean.Schema.Scip.Types.ProtocolVersion =
-     'Angle.TField "UnspecifiedProtocolVersion"
-       (Glean.Schema.Builtin.Types.Unit)
-       ('Angle.TNoFields)
-{-# LINE 839 "glean/schema/thrift/scip_include.hs" #-}
-instance Angle.AngleEnum Glean.Schema.Scip.Types.ProtocolVersion
-         where
-  type AngleEnumTy Glean.Schema.Scip.Types.ProtocolVersion =
-       Glean.Schema.Scip.Types.ProtocolVersion
-  enumName v = Text.pack (Prelude.drop 16 (Prelude.show v))
-{-# LINE 843 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.TextEncoding where
-  buildRtsValue = Glean.thriftEnum_buildRtsValue
-  decodeRtsValue = Glean.thriftEnumD
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "scip.TextEncoding" (Prelude.Just 1))
-{-# LINE 848 "glean/schema/thrift/scip_include.hs" #-}
-type instance Angle.SumFields Glean.Schema.Scip.Types.TextEncoding
-     =
-     'Angle.TField "UnspecifiedTextEncoding"
-       (Glean.Schema.Builtin.Types.Unit)
-       ('Angle.TField "UTF8" (Glean.Schema.Builtin.Types.Unit)
-          ('Angle.TField "UTF16" (Glean.Schema.Builtin.Types.Unit)
-             ('Angle.TNoFields)))
-{-# LINE 850 "glean/schema/thrift/scip_include.hs" #-}
-instance Angle.AngleEnum Glean.Schema.Scip.Types.TextEncoding where
-  type AngleEnumTy Glean.Schema.Scip.Types.TextEncoding =
-       Glean.Schema.Scip.Types.TextEncoding
-  enumName v = Text.pack (Prelude.drop 13 (Prelude.show v))
-{-# LINE 854 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.Location where
-  buildRtsValue b (Glean.Schema.Scip.Types.Location x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.Scip.Types.Location <$> Glean.decodeRtsValue <*>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "scip.Location" (Prelude.Just 1))
-{-# LINE 865 "glean/schema/thrift/scip_include.hs" #-}
-type instance Angle.RecordFields Glean.Schema.Scip.Types.Location =
-     'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
-       ('Angle.TField "location" (Glean.Schema.Src.Types.Range)
-          ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields)))
-{-# LINE 867 "glean/schema/thrift/scip_include.hs" #-}
-instance Glean.Type Glean.Schema.Scip.Types.Entity where
-  buildRtsValue b Glean.Schema.Scip.Types.Entity_EMPTY
-    = Glean.buildRtsSelector b 6
-  buildRtsValue b (Glean.Schema.Scip.Types.Entity_rust x)
-    = do Glean.buildRtsSelector b 0
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Scip.Types.Entity_go x)
-    = do Glean.buildRtsSelector b 1
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Scip.Types.Entity_typescript x)
-    = do Glean.buildRtsSelector b 2
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Scip.Types.Entity_java x)
-    = do Glean.buildRtsSelector b 3
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Scip.Types.Entity_kotlin x)
-    = do Glean.buildRtsSelector b 4
-         Glean.buildRtsValue b x
-  buildRtsValue b (Glean.Schema.Scip.Types.Entity_swift x)
-    = do Glean.buildRtsSelector b 5
-         Glean.buildRtsValue b x
-  decodeRtsValue
-    = Glean.sumD (Prelude.pure Glean.Schema.Scip.Types.Entity_EMPTY)
-        [Glean.mapD Glean.Schema.Scip.Types.Entity_rust,
-         Glean.mapD Glean.Schema.Scip.Types.Entity_go,
-         Glean.mapD Glean.Schema.Scip.Types.Entity_typescript,
-         Glean.mapD Glean.Schema.Scip.Types.Entity_java,
-         Glean.mapD Glean.Schema.Scip.Types.Entity_kotlin,
-         Glean.mapD Glean.Schema.Scip.Types.Entity_swift]
-  sourceType _
-    = Angle.NamedTy () (Angle.SourceRef "scip.Entity" (Prelude.Just 1))
-{-# LINE 899 "glean/schema/thrift/scip_include.hs" #-}
-type instance Angle.SumFields Glean.Schema.Scip.Types.Entity =
-     'Angle.TField "rust" (Glean.Schema.Scip.Types.SomeEntity)
-       ('Angle.TField "go" (Glean.Schema.Scip.Types.SomeEntity)
-          ('Angle.TField "typescript" (Glean.Schema.Scip.Types.SomeEntity)
-             ('Angle.TField "java" (Glean.Schema.Scip.Types.SomeEntity)
-                ('Angle.TField "kotlin" (Glean.Schema.Scip.Types.SomeEntity)
-                   ('Angle.TField "swift" (Glean.Schema.Scip.Types.SomeEntity)
-                      ('Angle.TNoFields))))))
+        LowerCaseDisplayNameSymbol_id,
+        LowerCaseDisplayNameSymbol(LowerCaseDisplayNameSymbol,
+                                   lowerCaseDisplayNameSymbol_id, lowerCaseDisplayNameSymbol_key),
+        LocalName_id, LocalName(LocalName, localName_id, localName_key),
+        IsImplemented_id,
+        IsImplemented(IsImplemented, isImplemented_id, isImplemented_key),
+        IsImplementation_id,
+        IsImplementation(IsImplementation, isImplementation_id,
+                         isImplementation_key),
+        FileRange_id, FileRange(FileRange, fileRange_id, fileRange_key),
+        FileLanguage_id,
+        FileLanguage(FileLanguage, fileLanguage_id, fileLanguage_key),
+        EntityDefinition_id,
+        EntityDefinition(EntityDefinition, entityDefinition_id,
+                         entityDefinition_key),
+        EntityKind_id,
+        EntityKind(EntityKind, entityKind_id, entityKind_key),
+        EntityLocation_id,
+        EntityLocation(EntityLocation, entityLocation_id,
+                       entityLocation_key),
+        EntityUses_id,
+        EntityUses(EntityUses, entityUses_id, entityUses_key),
+        FileEntityXRefLocation_id,
+        FileEntityXRefLocation(FileEntityXRefLocation,
+                               fileEntityXRefLocation_id, fileEntityXRefLocation_key),
+        ResolveLocation_id,
+        ResolveLocation(ResolveLocation, resolveLocation_id,
+                        resolveLocation_key),
+        SearchByLowerCaseNameKindLanguage_id,
+        SearchByLowerCaseNameKindLanguage(SearchByLowerCaseNameKindLanguage,
+                                          searchByLowerCaseNameKindLanguage_id,
+                                          searchByLowerCaseNameKindLanguage_key),
+        SearchByNameKindLanguage_id,
+        SearchByNameKindLanguage(SearchByNameKindLanguage,
+                                 searchByNameKindLanguage_id, searchByNameKindLanguage_key),
+        SearchBySymbol_id,
+        SearchBySymbol(SearchBySymbol, searchBySymbol_id,
+                       searchBySymbol_key),
+        TagDefinition_id,
+        TagDefinition(TagDefinition, tagDefinition_id, tagDefinition_key),
+        EnclosingSymbol_id,
+        EnclosingSymbol(EnclosingSymbol, enclosingSymbol_id,
+                        enclosingSymbol_key),
+        EnclosingRange_id,
+        EnclosingRange(EnclosingRange, enclosingRange_id,
+                       enclosingRange_key),
+        EnclosedSymbol_id,
+        EnclosedSymbol(EnclosedSymbol, enclosedSymbol_id,
+                       enclosedSymbol_key),
+        Documentation_id,
+        Documentation(Documentation, documentation_id, documentation_key),
+        DisplayNameSymbol_id,
+        DisplayNameSymbol(DisplayNameSymbol, displayNameSymbol_id,
+                          displayNameSymbol_key),
+        DisplayName_id,
+        DisplayName(DisplayName, displayName_id, displayName_key),
+        DefinitionUses_id,
+        DefinitionUses(DefinitionUses, definitionUses_id,
+                       definitionUses_key),
+        DefinitionName_id,
+        DefinitionName(DefinitionName, definitionName_id,
+                       definitionName_key),
+        DefinitionLocation_id,
+        DefinitionLocation(DefinitionLocation, definitionLocation_id,
+                           definitionLocation_key),
+        DefinitionDocumentation_id,
+        DefinitionDocumentation(DefinitionDocumentation,
+                                definitionDocumentation_id, definitionDocumentation_key),
+        Definition_id,
+        Definition(Definition, definition_id, definition_key),
+        TextEncoding(TextEncoding_UnspecifiedTextEncoding,
+                     TextEncoding_UTF8, TextEncoding_UTF16, TextEncoding__UNKNOWN),
+        SymbolName_key(SymbolName_key, symbolName_key_symbol,
+                       symbolName_key_name),
+        SymbolKind_key(SymbolKind_key, symbolKind_key_symbol,
+                       symbolKind_key_kind),
+        SymbolDocumentation_key(SymbolDocumentation_key,
+                                symbolDocumentation_key_symbol, symbolDocumentation_key_docs),
+        SymbolDisplayName_key(SymbolDisplayName_key,
+                              symbolDisplayName_key_symbol, symbolDisplayName_key_displayName),
+        SomeEntity(SomeEntity, someEntity_defn),
+        ReferenceTarget_key(ReferenceTarget_key, referenceTarget_key_xref,
+                            referenceTarget_key_target),
+        ReferenceLocation_key(ReferenceLocation_key,
+                              referenceLocation_key_file, referenceLocation_key_range,
+                              referenceLocation_key_xref),
+        Reference_key(Reference_key, reference_key_symbol,
+                      reference_key_location),
+        ProtocolVersion(ProtocolVersion_UnspecifiedProtocolVersion,
+                        ProtocolVersion__UNKNOWN),
+        Metadata_key(Metadata_key, metadata_key_version,
+                     metadata_key_toolInfo, metadata_key_projectRoot,
+                     metadata_key_textEncoding),
+        LowerCaseDisplayNameSymbol_key(LowerCaseDisplayNameSymbol_key,
+                                       lowerCaseDisplayNameSymbol_key_displayName,
+                                       lowerCaseDisplayNameSymbol_key_symbol),
+        Location(Location, location_file, location_location,
+                 location_name),
+        IsImplemented_key(IsImplemented_key, isImplemented_key_implemented,
+                          isImplemented_key_symbol),
+        IsImplementation_key(IsImplementation_key,
+                             isImplementation_key_symbol, isImplementation_key_implemented),
+        FileRange_key(FileRange_key, fileRange_key_file,
+                      fileRange_key_range),
+        FileLanguage_key(FileLanguage_key, fileLanguage_key_file,
+                         fileLanguage_key_language),
+        Entity(Entity_EMPTY, Entity_rust, Entity_go, Entity_typescript,
+               Entity_java, Entity_kotlin, Entity_swift, Entity_python,
+               Entity_typescriptReact, Entity_javascript, Entity_javascriptReact,
+               Entity_c, Entity_cpp, Entity_ruby, Entity_csharp,
+               Entity_visualBasic, Entity_dart, Entity_php),
+        EntityDefinition_key(EntityDefinition_key,
+                             entityDefinition_key_entity, entityDefinition_key_defn),
+        EntityKind_key(EntityKind_key, entityKind_key_entity,
+                       entityKind_key_kind),
+        EntityLocation_key(EntityLocation_key, entityLocation_key_entity,
+                           entityLocation_key_location),
+        EntityUses_key(EntityUses_key, entityUses_key_target,
+                       entityUses_key_file, entityUses_key_range),
+        FileEntityXRefLocation_key(FileEntityXRefLocation_key,
+                                   fileEntityXRefLocation_key_file,
+                                   fileEntityXRefLocation_key_source,
+                                   fileEntityXRefLocation_key_target,
+                                   fileEntityXRefLocation_key_entity),
+        ResolveLocation_key(ResolveLocation_key,
+                            resolveLocation_key_location, resolveLocation_key_entity),
+        SearchByLowerCaseNameKindLanguage_key(SearchByLowerCaseNameKindLanguage_key,
+                                              searchByLowerCaseNameKindLanguage_key_name,
+                                              searchByLowerCaseNameKindLanguage_key_kind,
+                                              searchByLowerCaseNameKindLanguage_key_language,
+                                              searchByLowerCaseNameKindLanguage_key_entity),
+        SearchByNameKindLanguage_key(SearchByNameKindLanguage_key,
+                                     searchByNameKindLanguage_key_name,
+                                     searchByNameKindLanguage_key_kind,
+                                     searchByNameKindLanguage_key_language,
+                                     searchByNameKindLanguage_key_entity),
+        SearchBySymbol_key(SearchBySymbol_key, searchBySymbol_key_symbol,
+                           searchBySymbol_key_language, searchBySymbol_key_entity),
+        TagDefinition_key(TagDefinition_key, tagDefinition_key_language,
+                          tagDefinition_key_defn, tagDefinition_key_entity),
+        EnclosingSymbol_key(EnclosingSymbol_key,
+                            enclosingSymbol_key_symbol, enclosingSymbol_key_enclosing),
+        EnclosingRange_key(EnclosingRange_key, enclosingRange_key_range,
+                           enclosingRange_key_enclosingRange),
+        EnclosedSymbol_key(EnclosedSymbol_key, enclosedSymbol_key_symbol,
+                           enclosedSymbol_key_enclosed),
+        DisplayNameSymbol_key(DisplayNameSymbol_key,
+                              displayNameSymbol_key_displayName, displayNameSymbol_key_symbol),
+        DefinitionUses_key(DefinitionUses_key, definitionUses_key_target,
+                           definitionUses_key_xref),
+        DefinitionName_key(DefinitionName_key, definitionName_key_defn,
+                           definitionName_key_docs),
+        DefinitionLocation_key(DefinitionLocation_key,
+                               definitionLocation_key_file, definitionLocation_key_range,
+                               definitionLocation_key_defn),
+        DefinitionDocumentation_key(DefinitionDocumentation_key,
+                                    definitionDocumentation_key_defn,
+                                    definitionDocumentation_key_docs),
+        Definition_key(Definition_key, definition_key_symbol,
+                       definition_key_location))
+       where
+import qualified Control.DeepSeq as DeepSeq
+import qualified Control.Exception as Exception
+import qualified Control.Monad as Monad
+import qualified Control.Monad.ST.Trans as ST
+import qualified Control.Monad.Trans.Class as Trans
+import qualified Data.Aeson as Aeson
+import qualified Data.Aeson.Types as Aeson
+import qualified Data.Default as Default
+import qualified Data.Function as Function
+import qualified Data.HashMap.Strict as HashMap
+import qualified Data.Hashable as Hashable
+import qualified Data.Int as Int
+import qualified Data.List as List
+import qualified Data.Map.Strict as Map
+import qualified Data.Ord as Ord
+import qualified Data.Text as Text
+import qualified Data.Text.Encoding as Text
+import qualified Facebook.Thrift.Annotation.Thrift.Thrift.Types
+       as Facebook.Thrift.Annotation.Thrift.Thrift
+import qualified GHC.Magic as GHC
+import qualified Glean.Schema.Builtin.Types as Glean.Schema.Builtin
+import qualified Glean.Schema.LsifTypes.Types
+       as Glean.Schema.LsifTypes
+import qualified Glean.Schema.Src.Types as Glean.Schema.Src
+import qualified Glean.Types as Glean
+import qualified Prelude as Prelude
+import qualified Rust.Types as Rust
+import qualified Thrift.Binary.Parser as Parser
+import qualified Thrift.CodegenTypesOnly as Thrift
+import Control.Applicative ((<|>), (*>), (<*))
+import Data.Aeson ((.:), (.:?), (.=), (.!=))
+import Data.Aeson ((.:), (.=))
+import Data.Monoid ((<>))
+import Prelude ((.), (++), (>), (==))
+import Prelude ((.), (<$>), (<*>), (>>=), (==), (++))
+import Prelude ((.), (<$>), (<*>), (>>=), (==), (/=), (<), (++))
+{-# LINE 5 "glean/schema/thrift/scip_include.hs" #-}
+import qualified Data.ByteString
+{-# LINE 6 "glean/schema/thrift/scip_include.hs" #-}
+import qualified Data.Default
+{-# LINE 7 "glean/schema/thrift/scip_include.hs" #-}
+import qualified Data.Text
+{-# LINE 9 "glean/schema/thrift/scip_include.hs" #-}
+import qualified Glean.Types as Glean
+{-# LINE 10 "glean/schema/thrift/scip_include.hs" #-}
+import qualified Glean.Typed as Glean
+{-# LINE 11 "glean/schema/thrift/scip_include.hs" #-}
+import qualified Glean.Query.Angle as Angle
+{-# LINE 12 "glean/schema/thrift/scip_include.hs" #-}
+import qualified Glean.Angle.Types as Angle
+{-# LINE 14 "glean/schema/thrift/scip_include.hs" #-}
+import qualified Glean.Schema.Builtin.Types
+{-# LINE 15 "glean/schema/thrift/scip_include.hs" #-}
+import qualified Glean.Schema.LsifTypes.Types
+{-# LINE 16 "glean/schema/thrift/scip_include.hs" #-}
+import qualified Glean.Schema.Src.Types
+{-# LINE 260 ".build/def/codegen/thrift-schema-hs/glean/schema/thrift/gen-hs2/Glean/Schema/Scip/Types.hs" #-}
+
+pREDICATE_VERSIONS :: Map.Map Text.Text Int.Int64
+pREDICATE_VERSIONS
+  = Map.fromList
+      [("EntityLocation", 1), ("ReferenceTarget", 1),
+       ("FileEntityXRefLocation", 1), ("IsImplementation", 1),
+       ("SymbolName", 1), ("LowerCaseDisplayNameSymbol", 1),
+       ("DefinitionName", 1), ("FileRange", 1), ("SymbolKind", 1),
+       ("ResolveLocation", 1), ("EntityUses", 1),
+       ("DefinitionLocation", 1), ("SearchBySymbol", 1),
+       ("ReferenceLocation", 1), ("SymbolDocumentation", 1),
+       ("LocalName", 1), ("Reference", 1), ("DisplayName", 1),
+       ("Metadata", 1), ("Definition", 1),
+       ("SearchByNameKindLanguage", 1), ("IsImplemented", 1),
+       ("EnclosingSymbol", 1), ("DisplayNameSymbol", 1),
+       ("FileLanguage", 1), ("Documentation", 1), ("Symbol", 1),
+       ("EnclosedSymbol", 1), ("SearchByLowerCaseNameKindLanguage", 1),
+       ("DefinitionDocumentation", 1), ("SymbolDisplayName", 1),
+       ("TagDefinition", 1), ("EnclosingRange", 1),
+       ("EntityDefinition", 1), ("DefinitionUses", 1), ("EntityKind", 1)]
+
+type SymbolName_id = Glean.Id
+
+data SymbolName = SymbolName{symbolName_id ::
+                             {-# UNPACK #-} !SymbolName_id,
+                             symbolName_key :: Prelude.Maybe SymbolName_key}
+                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SymbolName where
+  toJSON (SymbolName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SymbolName where
+  buildStruct _proxy (SymbolName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (SymbolName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SymbolName where
+  rnf (SymbolName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SymbolName where
+  def = SymbolName Default.def Prelude.Nothing
+
+instance Hashable.Hashable SymbolName where
+  hashWithSalt __salt (SymbolName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SymbolKind_id = Glean.Id
+
+data SymbolKind = SymbolKind{symbolKind_id ::
+                             {-# UNPACK #-} !SymbolKind_id,
+                             symbolKind_key :: Prelude.Maybe SymbolKind_key}
+                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SymbolKind where
+  toJSON (SymbolKind __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SymbolKind where
+  buildStruct _proxy (SymbolKind __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (SymbolKind __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SymbolKind where
+  rnf (SymbolKind __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SymbolKind where
+  def = SymbolKind Default.def Prelude.Nothing
+
+instance Hashable.Hashable SymbolKind where
+  hashWithSalt __salt (SymbolKind _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SymbolDocumentation_id = Glean.Id
+
+data SymbolDocumentation = SymbolDocumentation{symbolDocumentation_id
+                                               :: {-# UNPACK #-} !SymbolDocumentation_id,
+                                               symbolDocumentation_key ::
+                                               Prelude.Maybe SymbolDocumentation_key}
+                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SymbolDocumentation where
+  toJSON (SymbolDocumentation __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SymbolDocumentation where
+  buildStruct _proxy (SymbolDocumentation __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (SymbolDocumentation __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SymbolDocumentation where
+  rnf (SymbolDocumentation __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SymbolDocumentation where
+  def = SymbolDocumentation Default.def Prelude.Nothing
+
+instance Hashable.Hashable SymbolDocumentation where
+  hashWithSalt __salt (SymbolDocumentation _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SymbolDisplayName_id = Glean.Id
+
+data SymbolDisplayName = SymbolDisplayName{symbolDisplayName_id ::
+                                           {-# UNPACK #-} !SymbolDisplayName_id,
+                                           symbolDisplayName_key ::
+                                           Prelude.Maybe SymbolDisplayName_key}
+                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SymbolDisplayName where
+  toJSON (SymbolDisplayName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SymbolDisplayName where
+  buildStruct _proxy (SymbolDisplayName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (SymbolDisplayName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SymbolDisplayName where
+  rnf (SymbolDisplayName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SymbolDisplayName where
+  def = SymbolDisplayName Default.def Prelude.Nothing
+
+instance Hashable.Hashable SymbolDisplayName where
+  hashWithSalt __salt (SymbolDisplayName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type Symbol_id = Glean.Id
+
+data Symbol = Symbol{symbol_id :: {-# UNPACK #-} !Symbol_id,
+                     symbol_key :: Prelude.Maybe Text.Text}
+              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Symbol where
+  toJSON (Symbol __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct Symbol where
+  buildStruct _proxy (Symbol __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStringType _proxy)
+                                    2
+                                    1
+                                    (Thrift.genText _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (Symbol __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData Symbol where
+  rnf (Symbol __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default Symbol where
+  def = Symbol Default.def Prelude.Nothing
+
+instance Hashable.Hashable Symbol where
+  hashWithSalt __salt (Symbol _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type ReferenceTarget_id = Glean.Id
+
+data ReferenceTarget = ReferenceTarget{referenceTarget_id ::
+                                       {-# UNPACK #-} !ReferenceTarget_id,
+                                       referenceTarget_key :: Prelude.Maybe ReferenceTarget_key}
+                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ReferenceTarget where
+  toJSON (ReferenceTarget __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct ReferenceTarget where
+  buildStruct _proxy (ReferenceTarget __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (ReferenceTarget __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ReferenceTarget where
+  rnf (ReferenceTarget __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default ReferenceTarget where
+  def = ReferenceTarget Default.def Prelude.Nothing
+
+instance Hashable.Hashable ReferenceTarget where
+  hashWithSalt __salt (ReferenceTarget _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type ReferenceLocation_id = Glean.Id
+
+data ReferenceLocation = ReferenceLocation{referenceLocation_id ::
+                                           {-# UNPACK #-} !ReferenceLocation_id,
+                                           referenceLocation_key ::
+                                           Prelude.Maybe ReferenceLocation_key}
+                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ReferenceLocation where
+  toJSON (ReferenceLocation __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct ReferenceLocation where
+  buildStruct _proxy (ReferenceLocation __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (ReferenceLocation __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ReferenceLocation where
+  rnf (ReferenceLocation __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default ReferenceLocation where
+  def = ReferenceLocation Default.def Prelude.Nothing
+
+instance Hashable.Hashable ReferenceLocation where
+  hashWithSalt __salt (ReferenceLocation _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type Reference_id = Glean.Id
+
+data Reference = Reference{reference_id ::
+                           {-# UNPACK #-} !Reference_id,
+                           reference_key :: Prelude.Maybe Reference_key}
+                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Reference where
+  toJSON (Reference __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct Reference where
+  buildStruct _proxy (Reference __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (Reference __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData Reference where
+  rnf (Reference __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default Reference where
+  def = Reference Default.def Prelude.Nothing
+
+instance Hashable.Hashable Reference where
+  hashWithSalt __salt (Reference _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type Metadata_id = Glean.Id
+
+data Metadata = Metadata{metadata_id ::
+                         {-# UNPACK #-} !Metadata_id,
+                         metadata_key :: Prelude.Maybe Metadata_key}
+                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Metadata where
+  toJSON (Metadata __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct Metadata where
+  buildStruct _proxy (Metadata __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (Metadata __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData Metadata where
+  rnf (Metadata __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default Metadata where
+  def = Metadata Default.def Prelude.Nothing
+
+instance Hashable.Hashable Metadata where
+  hashWithSalt __salt (Metadata _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type LowerCaseDisplayNameSymbol_id = Glean.Id
+
+data LowerCaseDisplayNameSymbol = LowerCaseDisplayNameSymbol{lowerCaseDisplayNameSymbol_id
+                                                             ::
+                                                             {-# UNPACK #-} !LowerCaseDisplayNameSymbol_id,
+                                                             lowerCaseDisplayNameSymbol_key ::
+                                                             Prelude.Maybe
+                                                               LowerCaseDisplayNameSymbol_key}
+                                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON LowerCaseDisplayNameSymbol where
+  toJSON (LowerCaseDisplayNameSymbol __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct LowerCaseDisplayNameSymbol where
+  buildStruct _proxy
+    (LowerCaseDisplayNameSymbol __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (LowerCaseDisplayNameSymbol __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData LowerCaseDisplayNameSymbol where
+  rnf (LowerCaseDisplayNameSymbol __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default LowerCaseDisplayNameSymbol where
+  def = LowerCaseDisplayNameSymbol Default.def Prelude.Nothing
+
+instance Hashable.Hashable LowerCaseDisplayNameSymbol where
+  hashWithSalt __salt (LowerCaseDisplayNameSymbol _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type LocalName_id = Glean.Id
+
+data LocalName = LocalName{localName_id ::
+                           {-# UNPACK #-} !LocalName_id,
+                           localName_key :: Prelude.Maybe Text.Text}
+                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON LocalName where
+  toJSON (LocalName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct LocalName where
+  buildStruct _proxy (LocalName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStringType _proxy)
+                                    2
+                                    1
+                                    (Thrift.genText _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (LocalName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData LocalName where
+  rnf (LocalName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default LocalName where
+  def = LocalName Default.def Prelude.Nothing
+
+instance Hashable.Hashable LocalName where
+  hashWithSalt __salt (LocalName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type IsImplemented_id = Glean.Id
+
+data IsImplemented = IsImplemented{isImplemented_id ::
+                                   {-# UNPACK #-} !IsImplemented_id,
+                                   isImplemented_key :: Prelude.Maybe IsImplemented_key}
+                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON IsImplemented where
+  toJSON (IsImplemented __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct IsImplemented where
+  buildStruct _proxy (IsImplemented __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (IsImplemented __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData IsImplemented where
+  rnf (IsImplemented __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default IsImplemented where
+  def = IsImplemented Default.def Prelude.Nothing
+
+instance Hashable.Hashable IsImplemented where
+  hashWithSalt __salt (IsImplemented _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type IsImplementation_id = Glean.Id
+
+data IsImplementation = IsImplementation{isImplementation_id ::
+                                         {-# UNPACK #-} !IsImplementation_id,
+                                         isImplementation_key :: Prelude.Maybe IsImplementation_key}
+                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON IsImplementation where
+  toJSON (IsImplementation __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct IsImplementation where
+  buildStruct _proxy (IsImplementation __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (IsImplementation __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData IsImplementation where
+  rnf (IsImplementation __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default IsImplementation where
+  def = IsImplementation Default.def Prelude.Nothing
+
+instance Hashable.Hashable IsImplementation where
+  hashWithSalt __salt (IsImplementation _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type FileRange_id = Glean.Id
+
+data FileRange = FileRange{fileRange_id ::
+                           {-# UNPACK #-} !FileRange_id,
+                           fileRange_key :: Prelude.Maybe FileRange_key}
+                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FileRange where
+  toJSON (FileRange __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct FileRange where
+  buildStruct _proxy (FileRange __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (FileRange __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData FileRange where
+  rnf (FileRange __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default FileRange where
+  def = FileRange Default.def Prelude.Nothing
+
+instance Hashable.Hashable FileRange where
+  hashWithSalt __salt (FileRange _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type FileLanguage_id = Glean.Id
+
+data FileLanguage = FileLanguage{fileLanguage_id ::
+                                 {-# UNPACK #-} !FileLanguage_id,
+                                 fileLanguage_key :: Prelude.Maybe FileLanguage_key}
+                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FileLanguage where
+  toJSON (FileLanguage __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct FileLanguage where
+  buildStruct _proxy (FileLanguage __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (FileLanguage __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData FileLanguage where
+  rnf (FileLanguage __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default FileLanguage where
+  def = FileLanguage Default.def Prelude.Nothing
+
+instance Hashable.Hashable FileLanguage where
+  hashWithSalt __salt (FileLanguage _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type EntityDefinition_id = Glean.Id
+
+data EntityDefinition = EntityDefinition{entityDefinition_id ::
+                                         {-# UNPACK #-} !EntityDefinition_id,
+                                         entityDefinition_key :: Prelude.Maybe EntityDefinition_key}
+                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON EntityDefinition where
+  toJSON (EntityDefinition __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct EntityDefinition where
+  buildStruct _proxy (EntityDefinition __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (EntityDefinition __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData EntityDefinition where
+  rnf (EntityDefinition __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default EntityDefinition where
+  def = EntityDefinition Default.def Prelude.Nothing
+
+instance Hashable.Hashable EntityDefinition where
+  hashWithSalt __salt (EntityDefinition _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type EntityKind_id = Glean.Id
+
+data EntityKind = EntityKind{entityKind_id ::
+                             {-# UNPACK #-} !EntityKind_id,
+                             entityKind_key :: Prelude.Maybe EntityKind_key}
+                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON EntityKind where
+  toJSON (EntityKind __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct EntityKind where
+  buildStruct _proxy (EntityKind __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (EntityKind __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData EntityKind where
+  rnf (EntityKind __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default EntityKind where
+  def = EntityKind Default.def Prelude.Nothing
+
+instance Hashable.Hashable EntityKind where
+  hashWithSalt __salt (EntityKind _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type EntityLocation_id = Glean.Id
+
+data EntityLocation = EntityLocation{entityLocation_id ::
+                                     {-# UNPACK #-} !EntityLocation_id,
+                                     entityLocation_key :: Prelude.Maybe EntityLocation_key}
+                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON EntityLocation where
+  toJSON (EntityLocation __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct EntityLocation where
+  buildStruct _proxy (EntityLocation __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (EntityLocation __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData EntityLocation where
+  rnf (EntityLocation __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default EntityLocation where
+  def = EntityLocation Default.def Prelude.Nothing
+
+instance Hashable.Hashable EntityLocation where
+  hashWithSalt __salt (EntityLocation _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type EntityUses_id = Glean.Id
+
+data EntityUses = EntityUses{entityUses_id ::
+                             {-# UNPACK #-} !EntityUses_id,
+                             entityUses_key :: Prelude.Maybe EntityUses_key}
+                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON EntityUses where
+  toJSON (EntityUses __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct EntityUses where
+  buildStruct _proxy (EntityUses __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (EntityUses __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData EntityUses where
+  rnf (EntityUses __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default EntityUses where
+  def = EntityUses Default.def Prelude.Nothing
+
+instance Hashable.Hashable EntityUses where
+  hashWithSalt __salt (EntityUses _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type FileEntityXRefLocation_id = Glean.Id
+
+data FileEntityXRefLocation = FileEntityXRefLocation{fileEntityXRefLocation_id
+                                                     :: {-# UNPACK #-} !FileEntityXRefLocation_id,
+                                                     fileEntityXRefLocation_key ::
+                                                     Prelude.Maybe FileEntityXRefLocation_key}
+                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FileEntityXRefLocation where
+  toJSON (FileEntityXRefLocation __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct FileEntityXRefLocation where
+  buildStruct _proxy
+    (FileEntityXRefLocation __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (FileEntityXRefLocation __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData FileEntityXRefLocation where
+  rnf (FileEntityXRefLocation __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default FileEntityXRefLocation where
+  def = FileEntityXRefLocation Default.def Prelude.Nothing
+
+instance Hashable.Hashable FileEntityXRefLocation where
+  hashWithSalt __salt (FileEntityXRefLocation _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type ResolveLocation_id = Glean.Id
+
+data ResolveLocation = ResolveLocation{resolveLocation_id ::
+                                       {-# UNPACK #-} !ResolveLocation_id,
+                                       resolveLocation_key :: Prelude.Maybe ResolveLocation_key}
+                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ResolveLocation where
+  toJSON (ResolveLocation __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct ResolveLocation where
+  buildStruct _proxy (ResolveLocation __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (ResolveLocation __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ResolveLocation where
+  rnf (ResolveLocation __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default ResolveLocation where
+  def = ResolveLocation Default.def Prelude.Nothing
+
+instance Hashable.Hashable ResolveLocation where
+  hashWithSalt __salt (ResolveLocation _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SearchByLowerCaseNameKindLanguage_id = Glean.Id
+
+data SearchByLowerCaseNameKindLanguage = SearchByLowerCaseNameKindLanguage{searchByLowerCaseNameKindLanguage_id
+                                                                           ::
+                                                                           {-# UNPACK #-} !SearchByLowerCaseNameKindLanguage_id,
+                                                                           searchByLowerCaseNameKindLanguage_key
+                                                                           ::
+                                                                           Prelude.Maybe
+                                                                             SearchByLowerCaseNameKindLanguage_key}
+                                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchByLowerCaseNameKindLanguage where
+  toJSON (SearchByLowerCaseNameKindLanguage __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchByLowerCaseNameKindLanguage
+         where
+  buildStruct _proxy
+    (SearchByLowerCaseNameKindLanguage __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (SearchByLowerCaseNameKindLanguage __val__id
+                                                  __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchByLowerCaseNameKindLanguage where
+  rnf (SearchByLowerCaseNameKindLanguage __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SearchByLowerCaseNameKindLanguage where
+  def = SearchByLowerCaseNameKindLanguage Default.def Prelude.Nothing
+
+instance Hashable.Hashable SearchByLowerCaseNameKindLanguage where
+  hashWithSalt __salt (SearchByLowerCaseNameKindLanguage _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SearchByNameKindLanguage_id = Glean.Id
+
+data SearchByNameKindLanguage = SearchByNameKindLanguage{searchByNameKindLanguage_id
+                                                         ::
+                                                         {-# UNPACK #-} !SearchByNameKindLanguage_id,
+                                                         searchByNameKindLanguage_key ::
+                                                         Prelude.Maybe SearchByNameKindLanguage_key}
+                                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchByNameKindLanguage where
+  toJSON (SearchByNameKindLanguage __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchByNameKindLanguage where
+  buildStruct _proxy
+    (SearchByNameKindLanguage __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (SearchByNameKindLanguage __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchByNameKindLanguage where
+  rnf (SearchByNameKindLanguage __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SearchByNameKindLanguage where
+  def = SearchByNameKindLanguage Default.def Prelude.Nothing
+
+instance Hashable.Hashable SearchByNameKindLanguage where
+  hashWithSalt __salt (SearchByNameKindLanguage _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SearchBySymbol_id = Glean.Id
+
+data SearchBySymbol = SearchBySymbol{searchBySymbol_id ::
+                                     {-# UNPACK #-} !SearchBySymbol_id,
+                                     searchBySymbol_key :: Prelude.Maybe SearchBySymbol_key}
+                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchBySymbol where
+  toJSON (SearchBySymbol __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchBySymbol where
+  buildStruct _proxy (SearchBySymbol __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (SearchBySymbol __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchBySymbol where
+  rnf (SearchBySymbol __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SearchBySymbol where
+  def = SearchBySymbol Default.def Prelude.Nothing
+
+instance Hashable.Hashable SearchBySymbol where
+  hashWithSalt __salt (SearchBySymbol _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type TagDefinition_id = Glean.Id
+
+data TagDefinition = TagDefinition{tagDefinition_id ::
+                                   {-# UNPACK #-} !TagDefinition_id,
+                                   tagDefinition_key :: Prelude.Maybe TagDefinition_key}
+                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TagDefinition where
+  toJSON (TagDefinition __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct TagDefinition where
+  buildStruct _proxy (TagDefinition __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (TagDefinition __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData TagDefinition where
+  rnf (TagDefinition __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default TagDefinition where
+  def = TagDefinition Default.def Prelude.Nothing
+
+instance Hashable.Hashable TagDefinition where
+  hashWithSalt __salt (TagDefinition _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type EnclosingSymbol_id = Glean.Id
+
+data EnclosingSymbol = EnclosingSymbol{enclosingSymbol_id ::
+                                       {-# UNPACK #-} !EnclosingSymbol_id,
+                                       enclosingSymbol_key :: Prelude.Maybe EnclosingSymbol_key}
+                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON EnclosingSymbol where
+  toJSON (EnclosingSymbol __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct EnclosingSymbol where
+  buildStruct _proxy (EnclosingSymbol __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (EnclosingSymbol __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData EnclosingSymbol where
+  rnf (EnclosingSymbol __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default EnclosingSymbol where
+  def = EnclosingSymbol Default.def Prelude.Nothing
+
+instance Hashable.Hashable EnclosingSymbol where
+  hashWithSalt __salt (EnclosingSymbol _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type EnclosingRange_id = Glean.Id
+
+data EnclosingRange = EnclosingRange{enclosingRange_id ::
+                                     {-# UNPACK #-} !EnclosingRange_id,
+                                     enclosingRange_key :: Prelude.Maybe EnclosingRange_key}
+                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON EnclosingRange where
+  toJSON (EnclosingRange __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct EnclosingRange where
+  buildStruct _proxy (EnclosingRange __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (EnclosingRange __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData EnclosingRange where
+  rnf (EnclosingRange __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default EnclosingRange where
+  def = EnclosingRange Default.def Prelude.Nothing
+
+instance Hashable.Hashable EnclosingRange where
+  hashWithSalt __salt (EnclosingRange _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type EnclosedSymbol_id = Glean.Id
+
+data EnclosedSymbol = EnclosedSymbol{enclosedSymbol_id ::
+                                     {-# UNPACK #-} !EnclosedSymbol_id,
+                                     enclosedSymbol_key :: Prelude.Maybe EnclosedSymbol_key}
+                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON EnclosedSymbol where
+  toJSON (EnclosedSymbol __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct EnclosedSymbol where
+  buildStruct _proxy (EnclosedSymbol __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (EnclosedSymbol __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData EnclosedSymbol where
+  rnf (EnclosedSymbol __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default EnclosedSymbol where
+  def = EnclosedSymbol Default.def Prelude.Nothing
+
+instance Hashable.Hashable EnclosedSymbol where
+  hashWithSalt __salt (EnclosedSymbol _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type Documentation_id = Glean.Id
+
+data Documentation = Documentation{documentation_id ::
+                                   {-# UNPACK #-} !Documentation_id,
+                                   documentation_key :: Prelude.Maybe Text.Text}
+                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Documentation where
+  toJSON (Documentation __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct Documentation where
+  buildStruct _proxy (Documentation __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStringType _proxy)
+                                    2
+                                    1
+                                    (Thrift.genText _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (Documentation __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData Documentation where
+  rnf (Documentation __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default Documentation where
+  def = Documentation Default.def Prelude.Nothing
+
+instance Hashable.Hashable Documentation where
+  hashWithSalt __salt (Documentation _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type DisplayNameSymbol_id = Glean.Id
+
+data DisplayNameSymbol = DisplayNameSymbol{displayNameSymbol_id ::
+                                           {-# UNPACK #-} !DisplayNameSymbol_id,
+                                           displayNameSymbol_key ::
+                                           Prelude.Maybe DisplayNameSymbol_key}
+                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON DisplayNameSymbol where
+  toJSON (DisplayNameSymbol __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct DisplayNameSymbol where
+  buildStruct _proxy (DisplayNameSymbol __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (DisplayNameSymbol __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData DisplayNameSymbol where
+  rnf (DisplayNameSymbol __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default DisplayNameSymbol where
+  def = DisplayNameSymbol Default.def Prelude.Nothing
+
+instance Hashable.Hashable DisplayNameSymbol where
+  hashWithSalt __salt (DisplayNameSymbol _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type DisplayName_id = Glean.Id
+
+data DisplayName = DisplayName{displayName_id ::
+                               {-# UNPACK #-} !DisplayName_id,
+                               displayName_key :: Prelude.Maybe Text.Text}
+                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON DisplayName where
+  toJSON (DisplayName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct DisplayName where
+  buildStruct _proxy (DisplayName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStringType _proxy)
+                                    2
+                                    1
+                                    (Thrift.genText _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (DisplayName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData DisplayName where
+  rnf (DisplayName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default DisplayName where
+  def = DisplayName Default.def Prelude.Nothing
+
+instance Hashable.Hashable DisplayName where
+  hashWithSalt __salt (DisplayName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type DefinitionUses_id = Glean.Id
+
+data DefinitionUses = DefinitionUses{definitionUses_id ::
+                                     {-# UNPACK #-} !DefinitionUses_id,
+                                     definitionUses_key :: Prelude.Maybe DefinitionUses_key}
+                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON DefinitionUses where
+  toJSON (DefinitionUses __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct DefinitionUses where
+  buildStruct _proxy (DefinitionUses __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (DefinitionUses __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData DefinitionUses where
+  rnf (DefinitionUses __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default DefinitionUses where
+  def = DefinitionUses Default.def Prelude.Nothing
+
+instance Hashable.Hashable DefinitionUses where
+  hashWithSalt __salt (DefinitionUses _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type DefinitionName_id = Glean.Id
+
+data DefinitionName = DefinitionName{definitionName_id ::
+                                     {-# UNPACK #-} !DefinitionName_id,
+                                     definitionName_key :: Prelude.Maybe DefinitionName_key}
+                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON DefinitionName where
+  toJSON (DefinitionName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct DefinitionName where
+  buildStruct _proxy (DefinitionName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (DefinitionName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData DefinitionName where
+  rnf (DefinitionName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default DefinitionName where
+  def = DefinitionName Default.def Prelude.Nothing
+
+instance Hashable.Hashable DefinitionName where
+  hashWithSalt __salt (DefinitionName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type DefinitionLocation_id = Glean.Id
+
+data DefinitionLocation = DefinitionLocation{definitionLocation_id
+                                             :: {-# UNPACK #-} !DefinitionLocation_id,
+                                             definitionLocation_key ::
+                                             Prelude.Maybe DefinitionLocation_key}
+                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON DefinitionLocation where
+  toJSON (DefinitionLocation __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct DefinitionLocation where
+  buildStruct _proxy (DefinitionLocation __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (DefinitionLocation __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData DefinitionLocation where
+  rnf (DefinitionLocation __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default DefinitionLocation where
+  def = DefinitionLocation Default.def Prelude.Nothing
+
+instance Hashable.Hashable DefinitionLocation where
+  hashWithSalt __salt (DefinitionLocation _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type DefinitionDocumentation_id = Glean.Id
+
+data DefinitionDocumentation = DefinitionDocumentation{definitionDocumentation_id
+                                                       ::
+                                                       {-# UNPACK #-} !DefinitionDocumentation_id,
+                                                       definitionDocumentation_key ::
+                                                       Prelude.Maybe DefinitionDocumentation_key}
+                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON DefinitionDocumentation where
+  toJSON (DefinitionDocumentation __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct DefinitionDocumentation where
+  buildStruct _proxy
+    (DefinitionDocumentation __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (DefinitionDocumentation __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData DefinitionDocumentation where
+  rnf (DefinitionDocumentation __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default DefinitionDocumentation where
+  def = DefinitionDocumentation Default.def Prelude.Nothing
+
+instance Hashable.Hashable DefinitionDocumentation where
+  hashWithSalt __salt (DefinitionDocumentation _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type Definition_id = Glean.Id
+
+data Definition = Definition{definition_id ::
+                             {-# UNPACK #-} !Definition_id,
+                             definition_key :: Prelude.Maybe Definition_key}
+                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Definition where
+  toJSON (Definition __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct Definition where
+  buildStruct _proxy (Definition __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (Definition __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData Definition where
+  rnf (Definition __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default Definition where
+  def = Definition Default.def Prelude.Nothing
+
+instance Hashable.Hashable Definition where
+  hashWithSalt __salt (Definition _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+data TextEncoding = TextEncoding_UnspecifiedTextEncoding
+                  | TextEncoding_UTF8
+                  | TextEncoding_UTF16
+                  | TextEncoding__UNKNOWN Prelude.Int
+                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TextEncoding where
+  toJSON = Aeson.toJSON . Thrift.fromThriftEnum
+
+instance DeepSeq.NFData TextEncoding where
+  rnf __TextEncoding = Prelude.seq __TextEncoding ()
+
+instance Default.Default TextEncoding where
+  def = TextEncoding_UnspecifiedTextEncoding
+
+instance Hashable.Hashable TextEncoding where
+  hashWithSalt _salt _val
+    = Hashable.hashWithSalt _salt (Thrift.fromThriftEnum _val)
+
+instance Thrift.ThriftEnum TextEncoding where
+  toThriftEnum 0 = TextEncoding_UnspecifiedTextEncoding
+  toThriftEnum 1 = TextEncoding_UTF8
+  toThriftEnum 2 = TextEncoding_UTF16
+  toThriftEnum val = TextEncoding__UNKNOWN val
+  fromThriftEnum TextEncoding_UnspecifiedTextEncoding = 0
+  fromThriftEnum TextEncoding_UTF8 = 1
+  fromThriftEnum TextEncoding_UTF16 = 2
+  fromThriftEnum (TextEncoding__UNKNOWN val) = val
+  allThriftEnumValues
+    = [TextEncoding_UnspecifiedTextEncoding, TextEncoding_UTF8,
+       TextEncoding_UTF16]
+  toThriftEnumEither 0
+    = Prelude.Right TextEncoding_UnspecifiedTextEncoding
+  toThriftEnumEither 1 = Prelude.Right TextEncoding_UTF8
+  toThriftEnumEither 2 = Prelude.Right TextEncoding_UTF16
+  toThriftEnumEither val
+    = Prelude.Left
+        ("toThriftEnumEither: not a valid identifier for enum TextEncoding: "
+           ++ Prelude.show val)
+
+data SymbolName_key = SymbolName_key{symbolName_key_symbol ::
+                                     Symbol,
+                                     symbolName_key_name :: LocalName}
+                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SymbolName_key where
+  toJSON (SymbolName_key __field__symbol __field__name)
+    = Aeson.object
+        ("symbol" .= __field__symbol :
+           "name" .= __field__name : Prelude.mempty)
+
+instance Thrift.ThriftStruct SymbolName_key where
+  buildStruct _proxy (SymbolName_key __field__symbol __field__name)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "symbol" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__symbol)
+           :
+           Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__name)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__symbol <- ST.newSTRef Default.def
+            __field__name <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__symbol
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__symbol <- ST.readSTRef
+                                                                 __field__symbol
+                                             !__val__name <- ST.readSTRef __field__name
+                                             Prelude.pure (SymbolName_key __val__symbol __val__name)
+              _idMap = HashMap.fromList [("symbol", 1), ("name", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SymbolName_key where
+  rnf (SymbolName_key __field__symbol __field__name)
+    = DeepSeq.rnf __field__symbol `Prelude.seq`
+        DeepSeq.rnf __field__name `Prelude.seq` ()
+
+instance Default.Default SymbolName_key where
+  def = SymbolName_key Default.def Default.def
+
+instance Hashable.Hashable SymbolName_key where
+  hashWithSalt __salt (SymbolName_key _symbol _name)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _symbol)
+        _name
+
+data SymbolKind_key = SymbolKind_key{symbolKind_key_symbol ::
+                                     Symbol,
+                                     symbolKind_key_kind :: Glean.Schema.LsifTypes.SymbolKind}
+                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SymbolKind_key where
+  toJSON (SymbolKind_key __field__symbol __field__kind)
+    = Aeson.object
+        ("symbol" .= __field__symbol :
+           "kind" .= __field__kind : Prelude.mempty)
+
+instance Thrift.ThriftStruct SymbolKind_key where
+  buildStruct _proxy (SymbolKind_key __field__symbol __field__kind)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "symbol" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__symbol)
+           :
+           Thrift.genField _proxy "kind" (Thrift.getI32Type _proxy) 2 1
+             ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                 Thrift.fromThriftEnum)
+                __field__kind)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__symbol <- ST.newSTRef Default.def
+            __field__kind <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__symbol
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "SymbolKind")
+                                                                        ST.writeSTRef __field__kind
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__symbol <- ST.readSTRef
+                                                                 __field__symbol
+                                             !__val__kind <- ST.readSTRef __field__kind
+                                             Prelude.pure (SymbolKind_key __val__symbol __val__kind)
+              _idMap = HashMap.fromList [("symbol", 1), ("kind", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SymbolKind_key where
+  rnf (SymbolKind_key __field__symbol __field__kind)
+    = DeepSeq.rnf __field__symbol `Prelude.seq`
+        DeepSeq.rnf __field__kind `Prelude.seq` ()
+
+instance Default.Default SymbolKind_key where
+  def = SymbolKind_key Default.def Default.def
+
+instance Hashable.Hashable SymbolKind_key where
+  hashWithSalt __salt (SymbolKind_key _symbol _kind)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _symbol)
+        _kind
+
+data SymbolDocumentation_key = SymbolDocumentation_key{symbolDocumentation_key_symbol
+                                                       :: Symbol,
+                                                       symbolDocumentation_key_docs ::
+                                                       Documentation}
+                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SymbolDocumentation_key where
+  toJSON (SymbolDocumentation_key __field__symbol __field__docs)
+    = Aeson.object
+        ("symbol" .= __field__symbol :
+           "docs" .= __field__docs : Prelude.mempty)
+
+instance Thrift.ThriftStruct SymbolDocumentation_key where
+  buildStruct _proxy
+    (SymbolDocumentation_key __field__symbol __field__docs)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "symbol" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__symbol)
+           :
+           Thrift.genField _proxy "docs" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__docs)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__symbol <- ST.newSTRef Default.def
+            __field__docs <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__symbol
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__docs
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__symbol <- ST.readSTRef
+                                                                 __field__symbol
+                                             !__val__docs <- ST.readSTRef __field__docs
+                                             Prelude.pure
+                                               (SymbolDocumentation_key __val__symbol __val__docs)
+              _idMap = HashMap.fromList [("symbol", 1), ("docs", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SymbolDocumentation_key where
+  rnf (SymbolDocumentation_key __field__symbol __field__docs)
+    = DeepSeq.rnf __field__symbol `Prelude.seq`
+        DeepSeq.rnf __field__docs `Prelude.seq` ()
+
+instance Default.Default SymbolDocumentation_key where
+  def = SymbolDocumentation_key Default.def Default.def
+
+instance Hashable.Hashable SymbolDocumentation_key where
+  hashWithSalt __salt (SymbolDocumentation_key _symbol _docs)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _symbol)
+        _docs
+
+data SymbolDisplayName_key = SymbolDisplayName_key{symbolDisplayName_key_symbol
+                                                   :: Symbol,
+                                                   symbolDisplayName_key_displayName :: DisplayName}
+                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SymbolDisplayName_key where
+  toJSON (SymbolDisplayName_key __field__symbol __field__displayName)
+    = Aeson.object
+        ("symbol" .= __field__symbol :
+           "displayName" .= __field__displayName : Prelude.mempty)
+
+instance Thrift.ThriftStruct SymbolDisplayName_key where
+  buildStruct _proxy
+    (SymbolDisplayName_key __field__symbol __field__displayName)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "symbol" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__symbol)
+           :
+           Thrift.genField _proxy "displayName" (Thrift.getStructType _proxy)
+             2
+             1
+             (Thrift.buildStruct _proxy __field__displayName)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__symbol <- ST.newSTRef Default.def
+            __field__displayName <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__symbol
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__displayName
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__symbol <- ST.readSTRef
+                                                                 __field__symbol
+                                             !__val__displayName <- ST.readSTRef
+                                                                      __field__displayName
+                                             Prelude.pure
+                                               (SymbolDisplayName_key __val__symbol
+                                                  __val__displayName)
+              _idMap = HashMap.fromList [("symbol", 1), ("displayName", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SymbolDisplayName_key where
+  rnf (SymbolDisplayName_key __field__symbol __field__displayName)
+    = DeepSeq.rnf __field__symbol `Prelude.seq`
+        DeepSeq.rnf __field__displayName `Prelude.seq` ()
+
+instance Default.Default SymbolDisplayName_key where
+  def = SymbolDisplayName_key Default.def Default.def
+
+instance Hashable.Hashable SymbolDisplayName_key where
+  hashWithSalt __salt (SymbolDisplayName_key _symbol _displayName)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _symbol)
+        _displayName
+
+newtype SomeEntity = SomeEntity{someEntity_defn :: Definition}
+                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SomeEntity where
+  toJSON (SomeEntity __field__defn)
+    = Aeson.object ("defn" .= __field__defn : Prelude.mempty)
+
+instance Thrift.ThriftStruct SomeEntity where
+  buildStruct _proxy (SomeEntity __field__defn)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "defn" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__defn)
+           : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__defn <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__defn
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__defn <- ST.readSTRef __field__defn
+                                             Prelude.pure (SomeEntity __val__defn)
+              _idMap = HashMap.fromList [("defn", 1)]
+            _parse 0)
+
+instance DeepSeq.NFData SomeEntity where
+  rnf (SomeEntity __field__defn)
+    = DeepSeq.rnf __field__defn `Prelude.seq` ()
+
+instance Default.Default SomeEntity where
+  def = SomeEntity Default.def
+
+instance Hashable.Hashable SomeEntity where
+  hashWithSalt __salt (SomeEntity _defn)
+    = Hashable.hashWithSalt __salt _defn
+
+data ReferenceTarget_key = ReferenceTarget_key{referenceTarget_key_xref
+                                               :: Reference,
+                                               referenceTarget_key_target :: Definition}
+                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ReferenceTarget_key where
+  toJSON (ReferenceTarget_key __field__xref __field__target)
+    = Aeson.object
+        ("xref" .= __field__xref :
+           "target" .= __field__target : Prelude.mempty)
+
+instance Thrift.ThriftStruct ReferenceTarget_key where
+  buildStruct _proxy
+    (ReferenceTarget_key __field__xref __field__target)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "xref" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__xref)
+           :
+           Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__target)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__xref <- ST.newSTRef Default.def
+            __field__target <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__xref
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__target
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__xref <- ST.readSTRef __field__xref
+                                             !__val__target <- ST.readSTRef __field__target
+                                             Prelude.pure
+                                               (ReferenceTarget_key __val__xref __val__target)
+              _idMap = HashMap.fromList [("xref", 1), ("target", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ReferenceTarget_key where
+  rnf (ReferenceTarget_key __field__xref __field__target)
+    = DeepSeq.rnf __field__xref `Prelude.seq`
+        DeepSeq.rnf __field__target `Prelude.seq` ()
+
+instance Default.Default ReferenceTarget_key where
+  def = ReferenceTarget_key Default.def Default.def
+
+instance Hashable.Hashable ReferenceTarget_key where
+  hashWithSalt __salt (ReferenceTarget_key _xref _target)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _xref)
+        _target
+
+data ReferenceLocation_key = ReferenceLocation_key{referenceLocation_key_file
+                                                   :: Glean.Schema.Src.File,
+                                                   referenceLocation_key_range ::
+                                                   Glean.Schema.LsifTypes.RangeSpan,
+                                                   referenceLocation_key_xref :: Reference}
+                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ReferenceLocation_key where
+  toJSON
+    (ReferenceLocation_key __field__file __field__range __field__xref)
+    = Aeson.object
+        ("file" .= __field__file :
+           "range" .= __field__range :
+             "xref" .= __field__xref : Prelude.mempty)
+
+instance Thrift.ThriftStruct ReferenceLocation_key where
+  buildStruct _proxy
+    (ReferenceLocation_key __field__file __field__range __field__xref)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__file)
+           :
+           Thrift.genField _proxy "range" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__range)
+             :
+             Thrift.genField _proxy "xref" (Thrift.getStructType _proxy) 3 2
+               (Thrift.buildStruct _proxy __field__xref)
+               : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__file <- ST.newSTRef Default.def
+            __field__range <- ST.newSTRef Default.def
+            __field__xref <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__file
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__range
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__xref
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__file <- ST.readSTRef __field__file
+                                             !__val__range <- ST.readSTRef __field__range
+                                             !__val__xref <- ST.readSTRef __field__xref
+                                             Prelude.pure
+                                               (ReferenceLocation_key __val__file __val__range
+                                                  __val__xref)
+              _idMap = HashMap.fromList [("file", 1), ("range", 2), ("xref", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData ReferenceLocation_key where
+  rnf
+    (ReferenceLocation_key __field__file __field__range __field__xref)
+    = DeepSeq.rnf __field__file `Prelude.seq`
+        DeepSeq.rnf __field__range `Prelude.seq`
+          DeepSeq.rnf __field__xref `Prelude.seq` ()
+
+instance Default.Default ReferenceLocation_key where
+  def = ReferenceLocation_key Default.def Default.def Default.def
+
+instance Hashable.Hashable ReferenceLocation_key where
+  hashWithSalt __salt (ReferenceLocation_key _file _range _xref)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _file) _range)
+        _xref
+
+data Reference_key = Reference_key{reference_key_symbol :: Symbol,
+                                   reference_key_location :: FileRange}
+                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Reference_key where
+  toJSON (Reference_key __field__symbol __field__location)
+    = Aeson.object
+        ("symbol" .= __field__symbol :
+           "location" .= __field__location : Prelude.mempty)
+
+instance Thrift.ThriftStruct Reference_key where
+  buildStruct _proxy
+    (Reference_key __field__symbol __field__location)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "symbol" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__symbol)
+           :
+           Thrift.genField _proxy "location" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__location)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__symbol <- ST.newSTRef Default.def
+            __field__location <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__symbol
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__location
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__symbol <- ST.readSTRef
+                                                                 __field__symbol
+                                             !__val__location <- ST.readSTRef __field__location
+                                             Prelude.pure
+                                               (Reference_key __val__symbol __val__location)
+              _idMap = HashMap.fromList [("symbol", 1), ("location", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData Reference_key where
+  rnf (Reference_key __field__symbol __field__location)
+    = DeepSeq.rnf __field__symbol `Prelude.seq`
+        DeepSeq.rnf __field__location `Prelude.seq` ()
+
+instance Default.Default Reference_key where
+  def = Reference_key Default.def Default.def
+
+instance Hashable.Hashable Reference_key where
+  hashWithSalt __salt (Reference_key _symbol _location)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _symbol)
+        _location
+
+data ProtocolVersion = ProtocolVersion_UnspecifiedProtocolVersion
+                     | ProtocolVersion__UNKNOWN Prelude.Int
+                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ProtocolVersion where
+  toJSON = Aeson.toJSON . Thrift.fromThriftEnum
+
+instance DeepSeq.NFData ProtocolVersion where
+  rnf __ProtocolVersion = Prelude.seq __ProtocolVersion ()
+
+instance Default.Default ProtocolVersion where
+  def = ProtocolVersion_UnspecifiedProtocolVersion
+
+instance Hashable.Hashable ProtocolVersion where
+  hashWithSalt _salt _val
+    = Hashable.hashWithSalt _salt (Thrift.fromThriftEnum _val)
+
+instance Thrift.ThriftEnum ProtocolVersion where
+  toThriftEnum 0 = ProtocolVersion_UnspecifiedProtocolVersion
+  toThriftEnum val = ProtocolVersion__UNKNOWN val
+  fromThriftEnum ProtocolVersion_UnspecifiedProtocolVersion = 0
+  fromThriftEnum (ProtocolVersion__UNKNOWN val) = val
+  allThriftEnumValues = [ProtocolVersion_UnspecifiedProtocolVersion]
+  toThriftEnumEither 0
+    = Prelude.Right ProtocolVersion_UnspecifiedProtocolVersion
+  toThriftEnumEither val
+    = Prelude.Left
+        ("toThriftEnumEither: not a valid identifier for enum ProtocolVersion: "
+           ++ Prelude.show val)
+
+data Metadata_key = Metadata_key{metadata_key_version ::
+                                 ProtocolVersion,
+                                 metadata_key_toolInfo ::
+                                 Prelude.Maybe Glean.Schema.LsifTypes.ToolInfo,
+                                 metadata_key_projectRoot :: Text.Text,
+                                 metadata_key_textEncoding :: TextEncoding}
+                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Metadata_key where
+  toJSON
+    (Metadata_key __field__version __field__toolInfo
+       __field__projectRoot __field__textEncoding)
+    = Aeson.object
+        ("version" .= __field__version :
+           Prelude.maybe Prelude.id ((:) . ("toolInfo" .=)) __field__toolInfo
+             ("projectRoot" .= __field__projectRoot :
+                "textEncoding" .= __field__textEncoding : Prelude.mempty))
+
+instance Thrift.ThriftStruct Metadata_key where
+  buildStruct _proxy
+    (Metadata_key __field__version __field__toolInfo
+       __field__projectRoot __field__textEncoding)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "version" (Thrift.getI32Type _proxy) 1 0
+           ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+               Thrift.fromThriftEnum)
+              __field__version)
+           :
+           let (__cereal__toolInfo, __id__toolInfo)
+                 = case __field__toolInfo of
+                     Prelude.Just _val -> ((:)
+                                             (Thrift.genField _proxy "toolInfo"
+                                                (Thrift.getStructType _proxy)
+                                                2
+                                                1
+                                                (Thrift.buildStruct _proxy _val)),
+                                           2)
+                     Prelude.Nothing -> (Prelude.id, 1)
+             in
+             __cereal__toolInfo
+               (Thrift.genField _proxy "projectRoot" (Thrift.getStringType _proxy)
+                  3
+                  __id__toolInfo
+                  (Thrift.genText _proxy __field__projectRoot)
+                  :
+                  Thrift.genField _proxy "textEncoding" (Thrift.getI32Type _proxy) 4
+                    3
+                    ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                        Thrift.fromThriftEnum)
+                       __field__textEncoding)
+                    : []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__version <- ST.newSTRef Default.def
+            __field__toolInfo <- ST.newSTRef Prelude.Nothing
+            __field__projectRoot <- ST.newSTRef ""
+            __field__textEncoding <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "ProtocolVersion")
+                                                                        ST.writeSTRef
+                                                                          __field__version
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__toolInfo
+                                                                          (Prelude.Just _val)
+                                                                 3 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__projectRoot
+                                                                          _val
+                                                                 4 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "TextEncoding")
+                                                                        ST.writeSTRef
+                                                                          __field__textEncoding
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__version <- ST.readSTRef
+                                                                  __field__version
+                                             !__val__toolInfo <- ST.readSTRef __field__toolInfo
+                                             !__val__projectRoot <- ST.readSTRef
+                                                                      __field__projectRoot
+                                             !__val__textEncoding <- ST.readSTRef
+                                                                       __field__textEncoding
+                                             Prelude.pure
+                                               (Metadata_key __val__version __val__toolInfo
+                                                  __val__projectRoot
+                                                  __val__textEncoding)
+              _idMap
+                = HashMap.fromList
+                    [("version", 1), ("toolInfo", 2), ("projectRoot", 3),
+                     ("textEncoding", 4)]
+            _parse 0)
+
+instance DeepSeq.NFData Metadata_key where
+  rnf
+    (Metadata_key __field__version __field__toolInfo
+       __field__projectRoot __field__textEncoding)
+    = DeepSeq.rnf __field__version `Prelude.seq`
+        DeepSeq.rnf __field__toolInfo `Prelude.seq`
+          DeepSeq.rnf __field__projectRoot `Prelude.seq`
+            DeepSeq.rnf __field__textEncoding `Prelude.seq` ()
+
+instance Default.Default Metadata_key where
+  def = Metadata_key Default.def Prelude.Nothing "" Default.def
+
+instance Hashable.Hashable Metadata_key where
+  hashWithSalt __salt
+    (Metadata_key _version _toolInfo _projectRoot _textEncoding)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _version)
+              _toolInfo)
+           _projectRoot)
+        _textEncoding
+
+data LowerCaseDisplayNameSymbol_key = LowerCaseDisplayNameSymbol_key{lowerCaseDisplayNameSymbol_key_displayName
+                                                                     :: Text.Text,
+                                                                     lowerCaseDisplayNameSymbol_key_symbol
+                                                                     :: Symbol}
+                                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON LowerCaseDisplayNameSymbol_key where
+  toJSON
+    (LowerCaseDisplayNameSymbol_key __field__displayName
+       __field__symbol)
+    = Aeson.object
+        ("displayName" .= __field__displayName :
+           "symbol" .= __field__symbol : Prelude.mempty)
+
+instance Thrift.ThriftStruct LowerCaseDisplayNameSymbol_key where
+  buildStruct _proxy
+    (LowerCaseDisplayNameSymbol_key __field__displayName
+       __field__symbol)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "displayName" (Thrift.getStringType _proxy)
+           1
+           0
+           (Thrift.genText _proxy __field__displayName)
+           :
+           Thrift.genField _proxy "symbol" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__symbol)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__displayName <- ST.newSTRef ""
+            __field__symbol <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__displayName
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__symbol
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__displayName <- ST.readSTRef
+                                                                      __field__displayName
+                                             !__val__symbol <- ST.readSTRef __field__symbol
+                                             Prelude.pure
+                                               (LowerCaseDisplayNameSymbol_key __val__displayName
+                                                  __val__symbol)
+              _idMap = HashMap.fromList [("displayName", 1), ("symbol", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData LowerCaseDisplayNameSymbol_key where
+  rnf
+    (LowerCaseDisplayNameSymbol_key __field__displayName
+       __field__symbol)
+    = DeepSeq.rnf __field__displayName `Prelude.seq`
+        DeepSeq.rnf __field__symbol `Prelude.seq` ()
+
+instance Default.Default LowerCaseDisplayNameSymbol_key where
+  def = LowerCaseDisplayNameSymbol_key "" Default.def
+
+instance Hashable.Hashable LowerCaseDisplayNameSymbol_key where
+  hashWithSalt __salt
+    (LowerCaseDisplayNameSymbol_key _displayName _symbol)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _displayName)
+        _symbol
+
+data Location = Location{location_file :: Glean.Schema.Src.File,
+                         location_location :: Glean.Schema.Src.Range,
+                         location_name :: Text.Text}
+                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Location where
+  toJSON (Location __field__file __field__location __field__name)
+    = Aeson.object
+        ("file" .= __field__file :
+           "location" .= __field__location :
+             "name" .= __field__name : Prelude.mempty)
+
+instance Thrift.ThriftStruct Location where
+  buildStruct _proxy
+    (Location __field__file __field__location __field__name)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__file)
+           :
+           Thrift.genField _proxy "location" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__location)
+             :
+             Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 3 2
+               (Thrift.genText _proxy __field__name)
+               : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__file <- ST.newSTRef Default.def
+            __field__location <- ST.newSTRef Default.def
+            __field__name <- ST.newSTRef ""
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__file
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__location
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__file <- ST.readSTRef __field__file
+                                             !__val__location <- ST.readSTRef __field__location
+                                             !__val__name <- ST.readSTRef __field__name
+                                             Prelude.pure
+                                               (Location __val__file __val__location __val__name)
+              _idMap
+                = HashMap.fromList [("file", 1), ("location", 2), ("name", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData Location where
+  rnf (Location __field__file __field__location __field__name)
+    = DeepSeq.rnf __field__file `Prelude.seq`
+        DeepSeq.rnf __field__location `Prelude.seq`
+          DeepSeq.rnf __field__name `Prelude.seq` ()
+
+instance Default.Default Location where
+  def = Location Default.def Default.def ""
+
+instance Hashable.Hashable Location where
+  hashWithSalt __salt (Location _file _location _name)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _file)
+           _location)
+        _name
+
+data IsImplemented_key = IsImplemented_key{isImplemented_key_implemented
+                                           :: Symbol,
+                                           isImplemented_key_symbol :: Symbol}
+                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON IsImplemented_key where
+  toJSON (IsImplemented_key __field__implemented __field__symbol)
+    = Aeson.object
+        ("implemented" .= __field__implemented :
+           "symbol" .= __field__symbol : Prelude.mempty)
+
+instance Thrift.ThriftStruct IsImplemented_key where
+  buildStruct _proxy
+    (IsImplemented_key __field__implemented __field__symbol)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "implemented" (Thrift.getStructType _proxy)
+           1
+           0
+           (Thrift.buildStruct _proxy __field__implemented)
+           :
+           Thrift.genField _proxy "symbol" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__symbol)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__implemented <- ST.newSTRef Default.def
+            __field__symbol <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__implemented
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__symbol
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__implemented <- ST.readSTRef
+                                                                      __field__implemented
+                                             !__val__symbol <- ST.readSTRef __field__symbol
+                                             Prelude.pure
+                                               (IsImplemented_key __val__implemented __val__symbol)
+              _idMap = HashMap.fromList [("implemented", 1), ("symbol", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData IsImplemented_key where
+  rnf (IsImplemented_key __field__implemented __field__symbol)
+    = DeepSeq.rnf __field__implemented `Prelude.seq`
+        DeepSeq.rnf __field__symbol `Prelude.seq` ()
+
+instance Default.Default IsImplemented_key where
+  def = IsImplemented_key Default.def Default.def
+
+instance Hashable.Hashable IsImplemented_key where
+  hashWithSalt __salt (IsImplemented_key _implemented _symbol)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _implemented)
+        _symbol
+
+data IsImplementation_key = IsImplementation_key{isImplementation_key_symbol
+                                                 :: Symbol,
+                                                 isImplementation_key_implemented :: Symbol}
+                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON IsImplementation_key where
+  toJSON (IsImplementation_key __field__symbol __field__implemented)
+    = Aeson.object
+        ("symbol" .= __field__symbol :
+           "implemented" .= __field__implemented : Prelude.mempty)
+
+instance Thrift.ThriftStruct IsImplementation_key where
+  buildStruct _proxy
+    (IsImplementation_key __field__symbol __field__implemented)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "symbol" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__symbol)
+           :
+           Thrift.genField _proxy "implemented" (Thrift.getStructType _proxy)
+             2
+             1
+             (Thrift.buildStruct _proxy __field__implemented)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__symbol <- ST.newSTRef Default.def
+            __field__implemented <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__symbol
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__implemented
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__symbol <- ST.readSTRef
+                                                                 __field__symbol
+                                             !__val__implemented <- ST.readSTRef
+                                                                      __field__implemented
+                                             Prelude.pure
+                                               (IsImplementation_key __val__symbol
+                                                  __val__implemented)
+              _idMap = HashMap.fromList [("symbol", 1), ("implemented", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData IsImplementation_key where
+  rnf (IsImplementation_key __field__symbol __field__implemented)
+    = DeepSeq.rnf __field__symbol `Prelude.seq`
+        DeepSeq.rnf __field__implemented `Prelude.seq` ()
+
+instance Default.Default IsImplementation_key where
+  def = IsImplementation_key Default.def Default.def
+
+instance Hashable.Hashable IsImplementation_key where
+  hashWithSalt __salt (IsImplementation_key _symbol _implemented)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _symbol)
+        _implemented
+
+data FileRange_key = FileRange_key{fileRange_key_file ::
+                                   Glean.Schema.Src.File,
+                                   fileRange_key_range :: Glean.Schema.LsifTypes.RangeSpan}
+                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FileRange_key where
+  toJSON (FileRange_key __field__file __field__range)
+    = Aeson.object
+        ("file" .= __field__file :
+           "range" .= __field__range : Prelude.mempty)
+
+instance Thrift.ThriftStruct FileRange_key where
+  buildStruct _proxy (FileRange_key __field__file __field__range)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__file)
+           :
+           Thrift.genField _proxy "range" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__range)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__file <- ST.newSTRef Default.def
+            __field__range <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__file
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__range
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__file <- ST.readSTRef __field__file
+                                             !__val__range <- ST.readSTRef __field__range
+                                             Prelude.pure (FileRange_key __val__file __val__range)
+              _idMap = HashMap.fromList [("file", 1), ("range", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData FileRange_key where
+  rnf (FileRange_key __field__file __field__range)
+    = DeepSeq.rnf __field__file `Prelude.seq`
+        DeepSeq.rnf __field__range `Prelude.seq` ()
+
+instance Default.Default FileRange_key where
+  def = FileRange_key Default.def Default.def
+
+instance Hashable.Hashable FileRange_key where
+  hashWithSalt __salt (FileRange_key _file _range)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _file) _range
+
+data FileLanguage_key = FileLanguage_key{fileLanguage_key_file ::
+                                         Glean.Schema.Src.File,
+                                         fileLanguage_key_language ::
+                                         Glean.Schema.LsifTypes.LanguageId}
+                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FileLanguage_key where
+  toJSON (FileLanguage_key __field__file __field__language)
+    = Aeson.object
+        ("file" .= __field__file :
+           "language" .= __field__language : Prelude.mempty)
+
+instance Thrift.ThriftStruct FileLanguage_key where
+  buildStruct _proxy
+    (FileLanguage_key __field__file __field__language)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__file)
+           :
+           Thrift.genField _proxy "language" (Thrift.getI32Type _proxy) 2 1
+             ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                 Thrift.fromThriftEnum)
+                __field__language)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__file <- ST.newSTRef Default.def
+            __field__language <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__file
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "LanguageId")
+                                                                        ST.writeSTRef
+                                                                          __field__language
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__file <- ST.readSTRef __field__file
+                                             !__val__language <- ST.readSTRef __field__language
+                                             Prelude.pure
+                                               (FileLanguage_key __val__file __val__language)
+              _idMap = HashMap.fromList [("file", 1), ("language", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData FileLanguage_key where
+  rnf (FileLanguage_key __field__file __field__language)
+    = DeepSeq.rnf __field__file `Prelude.seq`
+        DeepSeq.rnf __field__language `Prelude.seq` ()
+
+instance Default.Default FileLanguage_key where
+  def = FileLanguage_key Default.def Default.def
+
+instance Hashable.Hashable FileLanguage_key where
+  hashWithSalt __salt (FileLanguage_key _file _language)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _file)
+        _language
+
+data Entity = Entity_rust SomeEntity
+            | Entity_go SomeEntity
+            | Entity_typescript SomeEntity
+            | Entity_java SomeEntity
+            | Entity_kotlin SomeEntity
+            | Entity_swift SomeEntity
+            | Entity_python SomeEntity
+            | Entity_typescriptReact SomeEntity
+            | Entity_javascript SomeEntity
+            | Entity_javascriptReact SomeEntity
+            | Entity_c SomeEntity
+            | Entity_cpp SomeEntity
+            | Entity_ruby SomeEntity
+            | Entity_csharp SomeEntity
+            | Entity_visualBasic SomeEntity
+            | Entity_dart SomeEntity
+            | Entity_php SomeEntity
+            | Entity_EMPTY
+              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Entity where
+  toJSON (Entity_rust __rust) = Aeson.object ["rust" .= __rust]
+  toJSON (Entity_go __go) = Aeson.object ["go" .= __go]
+  toJSON (Entity_typescript __typescript)
+    = Aeson.object ["typescript" .= __typescript]
+  toJSON (Entity_java __java) = Aeson.object ["java" .= __java]
+  toJSON (Entity_kotlin __kotlin)
+    = Aeson.object ["kotlin" .= __kotlin]
+  toJSON (Entity_swift __swift) = Aeson.object ["swift" .= __swift]
+  toJSON (Entity_python __python)
+    = Aeson.object ["python" .= __python]
+  toJSON (Entity_typescriptReact __typescriptReact)
+    = Aeson.object ["typescriptReact" .= __typescriptReact]
+  toJSON (Entity_javascript __javascript)
+    = Aeson.object ["javascript" .= __javascript]
+  toJSON (Entity_javascriptReact __javascriptReact)
+    = Aeson.object ["javascriptReact" .= __javascriptReact]
+  toJSON (Entity_c __c) = Aeson.object ["c" .= __c]
+  toJSON (Entity_cpp __cpp) = Aeson.object ["cpp" .= __cpp]
+  toJSON (Entity_ruby __ruby) = Aeson.object ["ruby" .= __ruby]
+  toJSON (Entity_csharp __csharp)
+    = Aeson.object ["csharp" .= __csharp]
+  toJSON (Entity_visualBasic __visualBasic)
+    = Aeson.object ["visualBasic" .= __visualBasic]
+  toJSON (Entity_dart __dart) = Aeson.object ["dart" .= __dart]
+  toJSON (Entity_php __php) = Aeson.object ["php" .= __php]
+  toJSON Entity_EMPTY = Aeson.object []
+
+instance Thrift.ThriftStruct Entity where
+  buildStruct _proxy (Entity_rust __rust)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "rust" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __rust)]
+  buildStruct _proxy (Entity_go __go)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "go" (Thrift.getStructType _proxy) 2 0
+           (Thrift.buildStruct _proxy __go)]
+  buildStruct _proxy (Entity_typescript __typescript)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "typescript" (Thrift.getStructType _proxy)
+           3
+           0
+           (Thrift.buildStruct _proxy __typescript)]
+  buildStruct _proxy (Entity_java __java)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "java" (Thrift.getStructType _proxy) 4 0
+           (Thrift.buildStruct _proxy __java)]
+  buildStruct _proxy (Entity_kotlin __kotlin)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "kotlin" (Thrift.getStructType _proxy) 5 0
+           (Thrift.buildStruct _proxy __kotlin)]
+  buildStruct _proxy (Entity_swift __swift)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "swift" (Thrift.getStructType _proxy) 6 0
+           (Thrift.buildStruct _proxy __swift)]
+  buildStruct _proxy (Entity_python __python)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "python" (Thrift.getStructType _proxy) 7 0
+           (Thrift.buildStruct _proxy __python)]
+  buildStruct _proxy (Entity_typescriptReact __typescriptReact)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "typescriptReact"
+           (Thrift.getStructType _proxy)
+           8
+           0
+           (Thrift.buildStruct _proxy __typescriptReact)]
+  buildStruct _proxy (Entity_javascript __javascript)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "javascript" (Thrift.getStructType _proxy)
+           9
+           0
+           (Thrift.buildStruct _proxy __javascript)]
+  buildStruct _proxy (Entity_javascriptReact __javascriptReact)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "javascriptReact"
+           (Thrift.getStructType _proxy)
+           10
+           0
+           (Thrift.buildStruct _proxy __javascriptReact)]
+  buildStruct _proxy (Entity_c __c)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "c" (Thrift.getStructType _proxy) 11 0
+           (Thrift.buildStruct _proxy __c)]
+  buildStruct _proxy (Entity_cpp __cpp)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "cpp" (Thrift.getStructType _proxy) 12 0
+           (Thrift.buildStruct _proxy __cpp)]
+  buildStruct _proxy (Entity_ruby __ruby)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "ruby" (Thrift.getStructType _proxy) 13 0
+           (Thrift.buildStruct _proxy __ruby)]
+  buildStruct _proxy (Entity_csharp __csharp)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "csharp" (Thrift.getStructType _proxy) 14 0
+           (Thrift.buildStruct _proxy __csharp)]
+  buildStruct _proxy (Entity_visualBasic __visualBasic)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "visualBasic" (Thrift.getStructType _proxy)
+           15
+           0
+           (Thrift.buildStruct _proxy __visualBasic)]
+  buildStruct _proxy (Entity_dart __dart)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "dart" (Thrift.getStructType _proxy) 16 0
+           (Thrift.buildStruct _proxy __dart)]
+  buildStruct _proxy (Entity_php __php)
+    = Thrift.genStruct _proxy
+        [Thrift.genField _proxy "php" (Thrift.getStructType _proxy) 17 0
+           (Thrift.buildStruct _proxy __php)]
+  buildStruct _proxy Entity_EMPTY = Thrift.genStruct _proxy []
+  parseStruct _proxy
+    = do _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap
+         case _fieldBegin of
+           Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                     1 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return (Entity_rust _val)
+                                                     2 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return (Entity_go _val)
+                                                     3 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return (Entity_typescript _val)
+                                                     4 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return (Entity_java _val)
+                                                     5 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return (Entity_kotlin _val)
+                                                     6 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return (Entity_swift _val)
+                                                     7 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return (Entity_python _val)
+                                                     8 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return
+                                                              (Entity_typescriptReact _val)
+                                                     9 | _type == Thrift.getStructType _proxy ->
+                                                         do _val <- Thrift.parseStruct _proxy
+                                                            Thrift.parseStop _proxy
+                                                            Prelude.return (Entity_javascript _val)
+                                                     10 | _type == Thrift.getStructType _proxy ->
+                                                          do _val <- Thrift.parseStruct _proxy
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return
+                                                               (Entity_javascriptReact _val)
+                                                     11 | _type == Thrift.getStructType _proxy ->
+                                                          do _val <- Thrift.parseStruct _proxy
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return (Entity_c _val)
+                                                     12 | _type == Thrift.getStructType _proxy ->
+                                                          do _val <- Thrift.parseStruct _proxy
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return (Entity_cpp _val)
+                                                     13 | _type == Thrift.getStructType _proxy ->
+                                                          do _val <- Thrift.parseStruct _proxy
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return (Entity_ruby _val)
+                                                     14 | _type == Thrift.getStructType _proxy ->
+                                                          do _val <- Thrift.parseStruct _proxy
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return (Entity_csharp _val)
+                                                     15 | _type == Thrift.getStructType _proxy ->
+                                                          do _val <- Thrift.parseStruct _proxy
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return
+                                                               (Entity_visualBasic _val)
+                                                     16 | _type == Thrift.getStructType _proxy ->
+                                                          do _val <- Thrift.parseStruct _proxy
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return (Entity_dart _val)
+                                                     17 | _type == Thrift.getStructType _proxy ->
+                                                          do _val <- Thrift.parseStruct _proxy
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return (Entity_php _val)
+                                                     _ -> do Thrift.parseSkip _proxy _type
+                                                               Prelude.Nothing
+                                                             Thrift.parseStop _proxy
+                                                             Prelude.return Entity_EMPTY
+           Thrift.FieldEnd -> Prelude.return Entity_EMPTY
+    where
+      _idMap
+        = HashMap.fromList
+            [("rust", 1), ("go", 2), ("typescript", 3), ("java", 4),
+             ("kotlin", 5), ("swift", 6), ("python", 7), ("typescriptReact", 8),
+             ("javascript", 9), ("javascriptReact", 10), ("c", 11), ("cpp", 12),
+             ("ruby", 13), ("csharp", 14), ("visualBasic", 15), ("dart", 16),
+             ("php", 17)]
+
+instance DeepSeq.NFData Entity where
+  rnf (Entity_rust __rust) = DeepSeq.rnf __rust
+  rnf (Entity_go __go) = DeepSeq.rnf __go
+  rnf (Entity_typescript __typescript) = DeepSeq.rnf __typescript
+  rnf (Entity_java __java) = DeepSeq.rnf __java
+  rnf (Entity_kotlin __kotlin) = DeepSeq.rnf __kotlin
+  rnf (Entity_swift __swift) = DeepSeq.rnf __swift
+  rnf (Entity_python __python) = DeepSeq.rnf __python
+  rnf (Entity_typescriptReact __typescriptReact)
+    = DeepSeq.rnf __typescriptReact
+  rnf (Entity_javascript __javascript) = DeepSeq.rnf __javascript
+  rnf (Entity_javascriptReact __javascriptReact)
+    = DeepSeq.rnf __javascriptReact
+  rnf (Entity_c __c) = DeepSeq.rnf __c
+  rnf (Entity_cpp __cpp) = DeepSeq.rnf __cpp
+  rnf (Entity_ruby __ruby) = DeepSeq.rnf __ruby
+  rnf (Entity_csharp __csharp) = DeepSeq.rnf __csharp
+  rnf (Entity_visualBasic __visualBasic) = DeepSeq.rnf __visualBasic
+  rnf (Entity_dart __dart) = DeepSeq.rnf __dart
+  rnf (Entity_php __php) = DeepSeq.rnf __php
+  rnf Entity_EMPTY = ()
+
+instance Default.Default Entity where
+  def = Entity_EMPTY
+
+instance Hashable.Hashable Entity where
+  hashWithSalt __salt (Entity_rust _rust)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 1 _rust)
+  hashWithSalt __salt (Entity_go _go)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 2 _go)
+  hashWithSalt __salt (Entity_typescript _typescript)
+    = Hashable.hashWithSalt __salt
+        (Hashable.hashWithSalt 3 _typescript)
+  hashWithSalt __salt (Entity_java _java)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 4 _java)
+  hashWithSalt __salt (Entity_kotlin _kotlin)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 5 _kotlin)
+  hashWithSalt __salt (Entity_swift _swift)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 6 _swift)
+  hashWithSalt __salt (Entity_python _python)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 7 _python)
+  hashWithSalt __salt (Entity_typescriptReact _typescriptReact)
+    = Hashable.hashWithSalt __salt
+        (Hashable.hashWithSalt 8 _typescriptReact)
+  hashWithSalt __salt (Entity_javascript _javascript)
+    = Hashable.hashWithSalt __salt
+        (Hashable.hashWithSalt 9 _javascript)
+  hashWithSalt __salt (Entity_javascriptReact _javascriptReact)
+    = Hashable.hashWithSalt __salt
+        (Hashable.hashWithSalt 10 _javascriptReact)
+  hashWithSalt __salt (Entity_c _c)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 11 _c)
+  hashWithSalt __salt (Entity_cpp _cpp)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 12 _cpp)
+  hashWithSalt __salt (Entity_ruby _ruby)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 13 _ruby)
+  hashWithSalt __salt (Entity_csharp _csharp)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 14 _csharp)
+  hashWithSalt __salt (Entity_visualBasic _visualBasic)
+    = Hashable.hashWithSalt __salt
+        (Hashable.hashWithSalt 15 _visualBasic)
+  hashWithSalt __salt (Entity_dart _dart)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 16 _dart)
+  hashWithSalt __salt (Entity_php _php)
+    = Hashable.hashWithSalt __salt (Hashable.hashWithSalt 17 _php)
+  hashWithSalt __salt Entity_EMPTY
+    = Hashable.hashWithSalt __salt (0 :: Prelude.Int)
+
+data EntityDefinition_key = EntityDefinition_key{entityDefinition_key_entity
+                                                 :: Entity,
+                                                 entityDefinition_key_defn :: Definition}
+                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON EntityDefinition_key where
+  toJSON (EntityDefinition_key __field__entity __field__defn)
+    = Aeson.object
+        ("entity" .= __field__entity :
+           "defn" .= __field__defn : Prelude.mempty)
+
+instance Thrift.ThriftStruct EntityDefinition_key where
+  buildStruct _proxy
+    (EntityDefinition_key __field__entity __field__defn)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__entity)
+           :
+           Thrift.genField _proxy "defn" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__defn)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__entity <- ST.newSTRef Default.def
+            __field__defn <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__defn
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__entity <- ST.readSTRef
+                                                                 __field__entity
+                                             !__val__defn <- ST.readSTRef __field__defn
+                                             Prelude.pure
+                                               (EntityDefinition_key __val__entity __val__defn)
+              _idMap = HashMap.fromList [("entity", 1), ("defn", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData EntityDefinition_key where
+  rnf (EntityDefinition_key __field__entity __field__defn)
+    = DeepSeq.rnf __field__entity `Prelude.seq`
+        DeepSeq.rnf __field__defn `Prelude.seq` ()
+
+instance Default.Default EntityDefinition_key where
+  def = EntityDefinition_key Default.def Default.def
+
+instance Hashable.Hashable EntityDefinition_key where
+  hashWithSalt __salt (EntityDefinition_key _entity _defn)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _entity)
+        _defn
+
+data EntityKind_key = EntityKind_key{entityKind_key_entity ::
+                                     Entity,
+                                     entityKind_key_kind :: Glean.Schema.LsifTypes.SymbolKind}
+                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON EntityKind_key where
+  toJSON (EntityKind_key __field__entity __field__kind)
+    = Aeson.object
+        ("entity" .= __field__entity :
+           "kind" .= __field__kind : Prelude.mempty)
+
+instance Thrift.ThriftStruct EntityKind_key where
+  buildStruct _proxy (EntityKind_key __field__entity __field__kind)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__entity)
+           :
+           Thrift.genField _proxy "kind" (Thrift.getI32Type _proxy) 2 1
+             ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                 Thrift.fromThriftEnum)
+                __field__kind)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__entity <- ST.newSTRef Default.def
+            __field__kind <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "SymbolKind")
+                                                                        ST.writeSTRef __field__kind
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__entity <- ST.readSTRef
+                                                                 __field__entity
+                                             !__val__kind <- ST.readSTRef __field__kind
+                                             Prelude.pure (EntityKind_key __val__entity __val__kind)
+              _idMap = HashMap.fromList [("entity", 1), ("kind", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData EntityKind_key where
+  rnf (EntityKind_key __field__entity __field__kind)
+    = DeepSeq.rnf __field__entity `Prelude.seq`
+        DeepSeq.rnf __field__kind `Prelude.seq` ()
+
+instance Default.Default EntityKind_key where
+  def = EntityKind_key Default.def Default.def
+
+instance Hashable.Hashable EntityKind_key where
+  hashWithSalt __salt (EntityKind_key _entity _kind)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _entity)
+        _kind
+
+data EntityLocation_key = EntityLocation_key{entityLocation_key_entity
+                                             :: Entity,
+                                             entityLocation_key_location :: Location}
+                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON EntityLocation_key where
+  toJSON (EntityLocation_key __field__entity __field__location)
+    = Aeson.object
+        ("entity" .= __field__entity :
+           "location" .= __field__location : Prelude.mempty)
+
+instance Thrift.ThriftStruct EntityLocation_key where
+  buildStruct _proxy
+    (EntityLocation_key __field__entity __field__location)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__entity)
+           :
+           Thrift.genField _proxy "location" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__location)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__entity <- ST.newSTRef Default.def
+            __field__location <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__location
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__entity <- ST.readSTRef
+                                                                 __field__entity
+                                             !__val__location <- ST.readSTRef __field__location
+                                             Prelude.pure
+                                               (EntityLocation_key __val__entity __val__location)
+              _idMap = HashMap.fromList [("entity", 1), ("location", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData EntityLocation_key where
+  rnf (EntityLocation_key __field__entity __field__location)
+    = DeepSeq.rnf __field__entity `Prelude.seq`
+        DeepSeq.rnf __field__location `Prelude.seq` ()
+
+instance Default.Default EntityLocation_key where
+  def = EntityLocation_key Default.def Default.def
+
+instance Hashable.Hashable EntityLocation_key where
+  hashWithSalt __salt (EntityLocation_key _entity _location)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _entity)
+        _location
+
+data EntityUses_key = EntityUses_key{entityUses_key_target ::
+                                     Entity,
+                                     entityUses_key_file :: Glean.Schema.Src.File,
+                                     entityUses_key_range :: Glean.Schema.Src.Range}
+                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON EntityUses_key where
+  toJSON
+    (EntityUses_key __field__target __field__file __field__range)
+    = Aeson.object
+        ("target" .= __field__target :
+           "file" .= __field__file :
+             "range" .= __field__range : Prelude.mempty)
+
+instance Thrift.ThriftStruct EntityUses_key where
+  buildStruct _proxy
+    (EntityUses_key __field__target __field__file __field__range)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__target)
+           :
+           Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__file)
+             :
+             Thrift.genField _proxy "range" (Thrift.getStructType _proxy) 3 2
+               (Thrift.buildStruct _proxy __field__range)
+               : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__target <- ST.newSTRef Default.def
+            __field__file <- ST.newSTRef Default.def
+            __field__range <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__target
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__file
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__range
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__target <- ST.readSTRef
+                                                                 __field__target
+                                             !__val__file <- ST.readSTRef __field__file
+                                             !__val__range <- ST.readSTRef __field__range
+                                             Prelude.pure
+                                               (EntityUses_key __val__target __val__file
+                                                  __val__range)
+              _idMap
+                = HashMap.fromList [("target", 1), ("file", 2), ("range", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData EntityUses_key where
+  rnf (EntityUses_key __field__target __field__file __field__range)
+    = DeepSeq.rnf __field__target `Prelude.seq`
+        DeepSeq.rnf __field__file `Prelude.seq`
+          DeepSeq.rnf __field__range `Prelude.seq` ()
+
+instance Default.Default EntityUses_key where
+  def = EntityUses_key Default.def Default.def Default.def
+
+instance Hashable.Hashable EntityUses_key where
+  hashWithSalt __salt (EntityUses_key _target _file _range)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _target)
+           _file)
+        _range
+
+data FileEntityXRefLocation_key = FileEntityXRefLocation_key{fileEntityXRefLocation_key_file
+                                                             :: Glean.Schema.Src.File,
+                                                             fileEntityXRefLocation_key_source ::
+                                                             Glean.Schema.Src.Range,
+                                                             fileEntityXRefLocation_key_target ::
+                                                             Location,
+                                                             fileEntityXRefLocation_key_entity ::
+                                                             Entity}
+                                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FileEntityXRefLocation_key where
+  toJSON
+    (FileEntityXRefLocation_key __field__file __field__source
+       __field__target __field__entity)
+    = Aeson.object
+        ("file" .= __field__file :
+           "source" .= __field__source :
+             "target" .= __field__target :
+               "entity" .= __field__entity : Prelude.mempty)
+
+instance Thrift.ThriftStruct FileEntityXRefLocation_key where
+  buildStruct _proxy
+    (FileEntityXRefLocation_key __field__file __field__source
+       __field__target __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__file)
+           :
+           Thrift.genField _proxy "source" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__source)
+             :
+             Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 3 2
+               (Thrift.buildStruct _proxy __field__target)
+               :
+               Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4 3
+                 (Thrift.buildStruct _proxy __field__entity)
+                 : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__file <- ST.newSTRef Default.def
+            __field__source <- ST.newSTRef Default.def
+            __field__target <- ST.newSTRef Default.def
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__file
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__source
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__target
+                                                                          _val
+                                                                 4 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__file <- ST.readSTRef __field__file
+                                             !__val__source <- ST.readSTRef __field__source
+                                             !__val__target <- ST.readSTRef __field__target
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (FileEntityXRefLocation_key __val__file __val__source
+                                                  __val__target
+                                                  __val__entity)
+              _idMap
+                = HashMap.fromList
+                    [("file", 1), ("source", 2), ("target", 3), ("entity", 4)]
+            _parse 0)
+
+instance DeepSeq.NFData FileEntityXRefLocation_key where
+  rnf
+    (FileEntityXRefLocation_key __field__file __field__source
+       __field__target __field__entity)
+    = DeepSeq.rnf __field__file `Prelude.seq`
+        DeepSeq.rnf __field__source `Prelude.seq`
+          DeepSeq.rnf __field__target `Prelude.seq`
+            DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default FileEntityXRefLocation_key where
+  def
+    = FileEntityXRefLocation_key Default.def Default.def Default.def
+        Default.def
+
+instance Hashable.Hashable FileEntityXRefLocation_key where
+  hashWithSalt __salt
+    (FileEntityXRefLocation_key _file _source _target _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _file)
+              _source)
+           _target)
+        _entity
+
+data ResolveLocation_key = ResolveLocation_key{resolveLocation_key_location
+                                               :: Location,
+                                               resolveLocation_key_entity :: Entity}
+                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ResolveLocation_key where
+  toJSON (ResolveLocation_key __field__location __field__entity)
+    = Aeson.object
+        ("location" .= __field__location :
+           "entity" .= __field__entity : Prelude.mempty)
+
+instance Thrift.ThriftStruct ResolveLocation_key where
+  buildStruct _proxy
+    (ResolveLocation_key __field__location __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "location" (Thrift.getStructType _proxy) 1
+           0
+           (Thrift.buildStruct _proxy __field__location)
+           :
+           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__entity)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__location <- ST.newSTRef Default.def
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__location
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__location <- ST.readSTRef
+                                                                   __field__location
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (ResolveLocation_key __val__location __val__entity)
+              _idMap = HashMap.fromList [("location", 1), ("entity", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ResolveLocation_key where
+  rnf (ResolveLocation_key __field__location __field__entity)
+    = DeepSeq.rnf __field__location `Prelude.seq`
+        DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default ResolveLocation_key where
+  def = ResolveLocation_key Default.def Default.def
+
+instance Hashable.Hashable ResolveLocation_key where
+  hashWithSalt __salt (ResolveLocation_key _location _entity)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _location)
+        _entity
+
+data SearchByLowerCaseNameKindLanguage_key = SearchByLowerCaseNameKindLanguage_key{searchByLowerCaseNameKindLanguage_key_name
+                                                                                   :: Text.Text,
+                                                                                   searchByLowerCaseNameKindLanguage_key_kind
+                                                                                   ::
+                                                                                   Prelude.Maybe
+                                                                                     Glean.Schema.LsifTypes.SymbolKind,
+                                                                                   searchByLowerCaseNameKindLanguage_key_language
+                                                                                   ::
+                                                                                   Glean.Schema.LsifTypes.LanguageId,
+                                                                                   searchByLowerCaseNameKindLanguage_key_entity
+                                                                                   :: Entity}
+                                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchByLowerCaseNameKindLanguage_key where
+  toJSON
+    (SearchByLowerCaseNameKindLanguage_key __field__name __field__kind
+       __field__language __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           Prelude.maybe Prelude.id ((:) . ("kind" .=)) __field__kind
+             ("language" .= __field__language :
+                "entity" .= __field__entity : Prelude.mempty))
+
+instance Thrift.ThriftStruct SearchByLowerCaseNameKindLanguage_key
+         where
+  buildStruct _proxy
+    (SearchByLowerCaseNameKindLanguage_key __field__name __field__kind
+       __field__language __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           let (__cereal__kind, __id__kind)
+                 = case __field__kind of
+                     Prelude.Just _val -> ((:)
+                                             (Thrift.genField _proxy "kind"
+                                                (Thrift.getI32Type _proxy)
+                                                2
+                                                1
+                                                ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                                                    Thrift.fromThriftEnum)
+                                                   _val)),
+                                           2)
+                     Prelude.Nothing -> (Prelude.id, 1)
+             in
+             __cereal__kind
+               (Thrift.genField _proxy "language" (Thrift.getI32Type _proxy) 3
+                  __id__kind
+                  ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                      Thrift.fromThriftEnum)
+                     __field__language)
+                  :
+                  Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4 3
+                    (Thrift.buildStruct _proxy __field__entity)
+                    : []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__kind <- ST.newSTRef Prelude.Nothing
+            __field__language <- ST.newSTRef Default.def
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "SymbolKind")
+                                                                        ST.writeSTRef __field__kind
+                                                                          (Prelude.Just _val)
+                                                                 3 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "LanguageId")
+                                                                        ST.writeSTRef
+                                                                          __field__language
+                                                                          _val
+                                                                 4 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__kind <- ST.readSTRef __field__kind
+                                             !__val__language <- ST.readSTRef __field__language
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (SearchByLowerCaseNameKindLanguage_key __val__name
+                                                  __val__kind
+                                                  __val__language
+                                                  __val__entity)
+              _idMap
+                = HashMap.fromList
+                    [("name", 1), ("kind", 2), ("language", 3), ("entity", 4)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchByLowerCaseNameKindLanguage_key where
+  rnf
+    (SearchByLowerCaseNameKindLanguage_key __field__name __field__kind
+       __field__language __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__kind `Prelude.seq`
+          DeepSeq.rnf __field__language `Prelude.seq`
+            DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default SearchByLowerCaseNameKindLanguage_key
+         where
+  def
+    = SearchByLowerCaseNameKindLanguage_key "" Prelude.Nothing
+        Default.def
+        Default.def
+
+instance Hashable.Hashable SearchByLowerCaseNameKindLanguage_key
+         where
+  hashWithSalt __salt
+    (SearchByLowerCaseNameKindLanguage_key _name _kind _language
+       _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _kind)
+           _language)
+        _entity
+
+data SearchByNameKindLanguage_key = SearchByNameKindLanguage_key{searchByNameKindLanguage_key_name
+                                                                 :: Text.Text,
+                                                                 searchByNameKindLanguage_key_kind
+                                                                 ::
+                                                                 Prelude.Maybe
+                                                                   Glean.Schema.LsifTypes.SymbolKind,
+                                                                 searchByNameKindLanguage_key_language
+                                                                 ::
+                                                                 Glean.Schema.LsifTypes.LanguageId,
+                                                                 searchByNameKindLanguage_key_entity
+                                                                 :: Entity}
+                                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchByNameKindLanguage_key where
+  toJSON
+    (SearchByNameKindLanguage_key __field__name __field__kind
+       __field__language __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           Prelude.maybe Prelude.id ((:) . ("kind" .=)) __field__kind
+             ("language" .= __field__language :
+                "entity" .= __field__entity : Prelude.mempty))
+
+instance Thrift.ThriftStruct SearchByNameKindLanguage_key where
+  buildStruct _proxy
+    (SearchByNameKindLanguage_key __field__name __field__kind
+       __field__language __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           let (__cereal__kind, __id__kind)
+                 = case __field__kind of
+                     Prelude.Just _val -> ((:)
+                                             (Thrift.genField _proxy "kind"
+                                                (Thrift.getI32Type _proxy)
+                                                2
+                                                1
+                                                ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                                                    Thrift.fromThriftEnum)
+                                                   _val)),
+                                           2)
+                     Prelude.Nothing -> (Prelude.id, 1)
+             in
+             __cereal__kind
+               (Thrift.genField _proxy "language" (Thrift.getI32Type _proxy) 3
+                  __id__kind
+                  ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                      Thrift.fromThriftEnum)
+                     __field__language)
+                  :
+                  Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4 3
+                    (Thrift.buildStruct _proxy __field__entity)
+                    : []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__kind <- ST.newSTRef Prelude.Nothing
+            __field__language <- ST.newSTRef Default.def
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "SymbolKind")
+                                                                        ST.writeSTRef __field__kind
+                                                                          (Prelude.Just _val)
+                                                                 3 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "LanguageId")
+                                                                        ST.writeSTRef
+                                                                          __field__language
+                                                                          _val
+                                                                 4 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__kind <- ST.readSTRef __field__kind
+                                             !__val__language <- ST.readSTRef __field__language
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (SearchByNameKindLanguage_key __val__name __val__kind
+                                                  __val__language
+                                                  __val__entity)
+              _idMap
+                = HashMap.fromList
+                    [("name", 1), ("kind", 2), ("language", 3), ("entity", 4)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchByNameKindLanguage_key where
+  rnf
+    (SearchByNameKindLanguage_key __field__name __field__kind
+       __field__language __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__kind `Prelude.seq`
+          DeepSeq.rnf __field__language `Prelude.seq`
+            DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default SearchByNameKindLanguage_key where
+  def
+    = SearchByNameKindLanguage_key "" Prelude.Nothing Default.def
+        Default.def
+
+instance Hashable.Hashable SearchByNameKindLanguage_key where
+  hashWithSalt __salt
+    (SearchByNameKindLanguage_key _name _kind _language _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _kind)
+           _language)
+        _entity
+
+data SearchBySymbol_key = SearchBySymbol_key{searchBySymbol_key_symbol
+                                             :: Symbol,
+                                             searchBySymbol_key_language ::
+                                             Glean.Schema.LsifTypes.LanguageId,
+                                             searchBySymbol_key_entity :: Entity}
+                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchBySymbol_key where
+  toJSON
+    (SearchBySymbol_key __field__symbol __field__language
+       __field__entity)
+    = Aeson.object
+        ("symbol" .= __field__symbol :
+           "language" .= __field__language :
+             "entity" .= __field__entity : Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchBySymbol_key where
+  buildStruct _proxy
+    (SearchBySymbol_key __field__symbol __field__language
+       __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "symbol" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__symbol)
+           :
+           Thrift.genField _proxy "language" (Thrift.getI32Type _proxy) 2 1
+             ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                 Thrift.fromThriftEnum)
+                __field__language)
+             :
+             Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 3 2
+               (Thrift.buildStruct _proxy __field__entity)
+               : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__symbol <- ST.newSTRef Default.def
+            __field__language <- ST.newSTRef Default.def
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__symbol
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "LanguageId")
+                                                                        ST.writeSTRef
+                                                                          __field__language
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__symbol <- ST.readSTRef
+                                                                 __field__symbol
+                                             !__val__language <- ST.readSTRef __field__language
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (SearchBySymbol_key __val__symbol __val__language
+                                                  __val__entity)
+              _idMap
+                = HashMap.fromList [("symbol", 1), ("language", 2), ("entity", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchBySymbol_key where
+  rnf
+    (SearchBySymbol_key __field__symbol __field__language
+       __field__entity)
+    = DeepSeq.rnf __field__symbol `Prelude.seq`
+        DeepSeq.rnf __field__language `Prelude.seq`
+          DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default SearchBySymbol_key where
+  def = SearchBySymbol_key Default.def Default.def Default.def
+
+instance Hashable.Hashable SearchBySymbol_key where
+  hashWithSalt __salt (SearchBySymbol_key _symbol _language _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _symbol)
+           _language)
+        _entity
+
+data TagDefinition_key = TagDefinition_key{tagDefinition_key_language
+                                           :: Glean.Schema.LsifTypes.LanguageId,
+                                           tagDefinition_key_defn :: Definition,
+                                           tagDefinition_key_entity :: Entity}
+                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON TagDefinition_key where
+  toJSON
+    (TagDefinition_key __field__language __field__defn __field__entity)
+    = Aeson.object
+        ("language" .= __field__language :
+           "defn" .= __field__defn :
+             "entity" .= __field__entity : Prelude.mempty)
+
+instance Thrift.ThriftStruct TagDefinition_key where
+  buildStruct _proxy
+    (TagDefinition_key __field__language __field__defn __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "language" (Thrift.getI32Type _proxy) 1 0
+           ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+               Thrift.fromThriftEnum)
+              __field__language)
+           :
+           Thrift.genField _proxy "defn" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__defn)
+             :
+             Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 3 2
+               (Thrift.buildStruct _proxy __field__entity)
+               : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__language <- ST.newSTRef Default.def
+            __field__defn <- ST.newSTRef Default.def
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "LanguageId")
+                                                                        ST.writeSTRef
+                                                                          __field__language
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__defn
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__language <- ST.readSTRef
+                                                                   __field__language
+                                             !__val__defn <- ST.readSTRef __field__defn
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (TagDefinition_key __val__language __val__defn
+                                                  __val__entity)
+              _idMap
+                = HashMap.fromList [("language", 1), ("defn", 2), ("entity", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData TagDefinition_key where
+  rnf
+    (TagDefinition_key __field__language __field__defn __field__entity)
+    = DeepSeq.rnf __field__language `Prelude.seq`
+        DeepSeq.rnf __field__defn `Prelude.seq`
+          DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default TagDefinition_key where
+  def = TagDefinition_key Default.def Default.def Default.def
+
+instance Hashable.Hashable TagDefinition_key where
+  hashWithSalt __salt (TagDefinition_key _language _defn _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _language)
+           _defn)
+        _entity
+
+data EnclosingSymbol_key = EnclosingSymbol_key{enclosingSymbol_key_symbol
+                                               :: Symbol,
+                                               enclosingSymbol_key_enclosing :: Symbol}
+                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON EnclosingSymbol_key where
+  toJSON (EnclosingSymbol_key __field__symbol __field__enclosing)
+    = Aeson.object
+        ("symbol" .= __field__symbol :
+           "enclosing" .= __field__enclosing : Prelude.mempty)
+
+instance Thrift.ThriftStruct EnclosingSymbol_key where
+  buildStruct _proxy
+    (EnclosingSymbol_key __field__symbol __field__enclosing)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "symbol" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__symbol)
+           :
+           Thrift.genField _proxy "enclosing" (Thrift.getStructType _proxy) 2
+             1
+             (Thrift.buildStruct _proxy __field__enclosing)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__symbol <- ST.newSTRef Default.def
+            __field__enclosing <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__symbol
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__enclosing
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__symbol <- ST.readSTRef
+                                                                 __field__symbol
+                                             !__val__enclosing <- ST.readSTRef __field__enclosing
+                                             Prelude.pure
+                                               (EnclosingSymbol_key __val__symbol __val__enclosing)
+              _idMap = HashMap.fromList [("symbol", 1), ("enclosing", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData EnclosingSymbol_key where
+  rnf (EnclosingSymbol_key __field__symbol __field__enclosing)
+    = DeepSeq.rnf __field__symbol `Prelude.seq`
+        DeepSeq.rnf __field__enclosing `Prelude.seq` ()
+
+instance Default.Default EnclosingSymbol_key where
+  def = EnclosingSymbol_key Default.def Default.def
+
+instance Hashable.Hashable EnclosingSymbol_key where
+  hashWithSalt __salt (EnclosingSymbol_key _symbol _enclosing)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _symbol)
+        _enclosing
+
+data EnclosingRange_key = EnclosingRange_key{enclosingRange_key_range
+                                             :: FileRange,
+                                             enclosingRange_key_enclosingRange :: FileRange}
+                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON EnclosingRange_key where
+  toJSON (EnclosingRange_key __field__range __field__enclosingRange)
+    = Aeson.object
+        ("range" .= __field__range :
+           "enclosingRange" .= __field__enclosingRange : Prelude.mempty)
+
+instance Thrift.ThriftStruct EnclosingRange_key where
+  buildStruct _proxy
+    (EnclosingRange_key __field__range __field__enclosingRange)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "range" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__range)
+           :
+           Thrift.genField _proxy "enclosingRange"
+             (Thrift.getStructType _proxy)
+             2
+             1
+             (Thrift.buildStruct _proxy __field__enclosingRange)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__range <- ST.newSTRef Default.def
+            __field__enclosingRange <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__range
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__enclosingRange
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__range <- ST.readSTRef __field__range
+                                             !__val__enclosingRange <- ST.readSTRef
+                                                                         __field__enclosingRange
+                                             Prelude.pure
+                                               (EnclosingRange_key __val__range
+                                                  __val__enclosingRange)
+              _idMap = HashMap.fromList [("range", 1), ("enclosingRange", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData EnclosingRange_key where
+  rnf (EnclosingRange_key __field__range __field__enclosingRange)
+    = DeepSeq.rnf __field__range `Prelude.seq`
+        DeepSeq.rnf __field__enclosingRange `Prelude.seq` ()
+
+instance Default.Default EnclosingRange_key where
+  def = EnclosingRange_key Default.def Default.def
+
+instance Hashable.Hashable EnclosingRange_key where
+  hashWithSalt __salt (EnclosingRange_key _range _enclosingRange)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _range)
+        _enclosingRange
+
+data EnclosedSymbol_key = EnclosedSymbol_key{enclosedSymbol_key_symbol
+                                             :: Symbol,
+                                             enclosedSymbol_key_enclosed :: Symbol}
+                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON EnclosedSymbol_key where
+  toJSON (EnclosedSymbol_key __field__symbol __field__enclosed)
+    = Aeson.object
+        ("symbol" .= __field__symbol :
+           "enclosed" .= __field__enclosed : Prelude.mempty)
+
+instance Thrift.ThriftStruct EnclosedSymbol_key where
+  buildStruct _proxy
+    (EnclosedSymbol_key __field__symbol __field__enclosed)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "symbol" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__symbol)
+           :
+           Thrift.genField _proxy "enclosed" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__enclosed)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__symbol <- ST.newSTRef Default.def
+            __field__enclosed <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__symbol
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__enclosed
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__symbol <- ST.readSTRef
+                                                                 __field__symbol
+                                             !__val__enclosed <- ST.readSTRef __field__enclosed
+                                             Prelude.pure
+                                               (EnclosedSymbol_key __val__symbol __val__enclosed)
+              _idMap = HashMap.fromList [("symbol", 1), ("enclosed", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData EnclosedSymbol_key where
+  rnf (EnclosedSymbol_key __field__symbol __field__enclosed)
+    = DeepSeq.rnf __field__symbol `Prelude.seq`
+        DeepSeq.rnf __field__enclosed `Prelude.seq` ()
+
+instance Default.Default EnclosedSymbol_key where
+  def = EnclosedSymbol_key Default.def Default.def
+
+instance Hashable.Hashable EnclosedSymbol_key where
+  hashWithSalt __salt (EnclosedSymbol_key _symbol _enclosed)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _symbol)
+        _enclosed
+
+data DisplayNameSymbol_key = DisplayNameSymbol_key{displayNameSymbol_key_displayName
+                                                   :: DisplayName,
+                                                   displayNameSymbol_key_symbol :: Symbol}
+                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON DisplayNameSymbol_key where
+  toJSON (DisplayNameSymbol_key __field__displayName __field__symbol)
+    = Aeson.object
+        ("displayName" .= __field__displayName :
+           "symbol" .= __field__symbol : Prelude.mempty)
+
+instance Thrift.ThriftStruct DisplayNameSymbol_key where
+  buildStruct _proxy
+    (DisplayNameSymbol_key __field__displayName __field__symbol)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "displayName" (Thrift.getStructType _proxy)
+           1
+           0
+           (Thrift.buildStruct _proxy __field__displayName)
+           :
+           Thrift.genField _proxy "symbol" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__symbol)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__displayName <- ST.newSTRef Default.def
+            __field__symbol <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__displayName
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__symbol
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__displayName <- ST.readSTRef
+                                                                      __field__displayName
+                                             !__val__symbol <- ST.readSTRef __field__symbol
+                                             Prelude.pure
+                                               (DisplayNameSymbol_key __val__displayName
+                                                  __val__symbol)
+              _idMap = HashMap.fromList [("displayName", 1), ("symbol", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData DisplayNameSymbol_key where
+  rnf (DisplayNameSymbol_key __field__displayName __field__symbol)
+    = DeepSeq.rnf __field__displayName `Prelude.seq`
+        DeepSeq.rnf __field__symbol `Prelude.seq` ()
+
+instance Default.Default DisplayNameSymbol_key where
+  def = DisplayNameSymbol_key Default.def Default.def
+
+instance Hashable.Hashable DisplayNameSymbol_key where
+  hashWithSalt __salt (DisplayNameSymbol_key _displayName _symbol)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _displayName)
+        _symbol
+
+data DefinitionUses_key = DefinitionUses_key{definitionUses_key_target
+                                             :: Definition,
+                                             definitionUses_key_xref :: Reference}
+                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON DefinitionUses_key where
+  toJSON (DefinitionUses_key __field__target __field__xref)
+    = Aeson.object
+        ("target" .= __field__target :
+           "xref" .= __field__xref : Prelude.mempty)
+
+instance Thrift.ThriftStruct DefinitionUses_key where
+  buildStruct _proxy
+    (DefinitionUses_key __field__target __field__xref)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "target" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__target)
+           :
+           Thrift.genField _proxy "xref" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__xref)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__target <- ST.newSTRef Default.def
+            __field__xref <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__target
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__xref
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__target <- ST.readSTRef
+                                                                 __field__target
+                                             !__val__xref <- ST.readSTRef __field__xref
+                                             Prelude.pure
+                                               (DefinitionUses_key __val__target __val__xref)
+              _idMap = HashMap.fromList [("target", 1), ("xref", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData DefinitionUses_key where
+  rnf (DefinitionUses_key __field__target __field__xref)
+    = DeepSeq.rnf __field__target `Prelude.seq`
+        DeepSeq.rnf __field__xref `Prelude.seq` ()
+
+instance Default.Default DefinitionUses_key where
+  def = DefinitionUses_key Default.def Default.def
+
+instance Hashable.Hashable DefinitionUses_key where
+  hashWithSalt __salt (DefinitionUses_key _target _xref)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _target)
+        _xref
+
+data DefinitionName_key = DefinitionName_key{definitionName_key_defn
+                                             :: Definition,
+                                             definitionName_key_docs :: LocalName}
+                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON DefinitionName_key where
+  toJSON (DefinitionName_key __field__defn __field__docs)
+    = Aeson.object
+        ("defn" .= __field__defn :
+           "docs" .= __field__docs : Prelude.mempty)
+
+instance Thrift.ThriftStruct DefinitionName_key where
+  buildStruct _proxy (DefinitionName_key __field__defn __field__docs)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "defn" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__defn)
+           :
+           Thrift.genField _proxy "docs" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__docs)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__defn <- ST.newSTRef Default.def
+            __field__docs <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__defn
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__docs
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__defn <- ST.readSTRef __field__defn
+                                             !__val__docs <- ST.readSTRef __field__docs
+                                             Prelude.pure
+                                               (DefinitionName_key __val__defn __val__docs)
+              _idMap = HashMap.fromList [("defn", 1), ("docs", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData DefinitionName_key where
+  rnf (DefinitionName_key __field__defn __field__docs)
+    = DeepSeq.rnf __field__defn `Prelude.seq`
+        DeepSeq.rnf __field__docs `Prelude.seq` ()
+
+instance Default.Default DefinitionName_key where
+  def = DefinitionName_key Default.def Default.def
+
+instance Hashable.Hashable DefinitionName_key where
+  hashWithSalt __salt (DefinitionName_key _defn _docs)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _defn) _docs
+
+data DefinitionLocation_key = DefinitionLocation_key{definitionLocation_key_file
+                                                     :: Glean.Schema.Src.File,
+                                                     definitionLocation_key_range ::
+                                                     Glean.Schema.LsifTypes.RangeSpan,
+                                                     definitionLocation_key_defn :: Definition}
+                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON DefinitionLocation_key where
+  toJSON
+    (DefinitionLocation_key __field__file __field__range __field__defn)
+    = Aeson.object
+        ("file" .= __field__file :
+           "range" .= __field__range :
+             "defn" .= __field__defn : Prelude.mempty)
+
+instance Thrift.ThriftStruct DefinitionLocation_key where
+  buildStruct _proxy
+    (DefinitionLocation_key __field__file __field__range __field__defn)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "file" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__file)
+           :
+           Thrift.genField _proxy "range" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__range)
+             :
+             Thrift.genField _proxy "defn" (Thrift.getStructType _proxy) 3 2
+               (Thrift.buildStruct _proxy __field__defn)
+               : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__file <- ST.newSTRef Default.def
+            __field__range <- ST.newSTRef Default.def
+            __field__defn <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__file
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__range
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__defn
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__file <- ST.readSTRef __field__file
+                                             !__val__range <- ST.readSTRef __field__range
+                                             !__val__defn <- ST.readSTRef __field__defn
+                                             Prelude.pure
+                                               (DefinitionLocation_key __val__file __val__range
+                                                  __val__defn)
+              _idMap = HashMap.fromList [("file", 1), ("range", 2), ("defn", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData DefinitionLocation_key where
+  rnf
+    (DefinitionLocation_key __field__file __field__range __field__defn)
+    = DeepSeq.rnf __field__file `Prelude.seq`
+        DeepSeq.rnf __field__range `Prelude.seq`
+          DeepSeq.rnf __field__defn `Prelude.seq` ()
+
+instance Default.Default DefinitionLocation_key where
+  def = DefinitionLocation_key Default.def Default.def Default.def
+
+instance Hashable.Hashable DefinitionLocation_key where
+  hashWithSalt __salt (DefinitionLocation_key _file _range _defn)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _file) _range)
+        _defn
+
+data DefinitionDocumentation_key = DefinitionDocumentation_key{definitionDocumentation_key_defn
+                                                               :: Definition,
+                                                               definitionDocumentation_key_docs ::
+                                                               Documentation}
+                                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON DefinitionDocumentation_key where
+  toJSON (DefinitionDocumentation_key __field__defn __field__docs)
+    = Aeson.object
+        ("defn" .= __field__defn :
+           "docs" .= __field__docs : Prelude.mempty)
+
+instance Thrift.ThriftStruct DefinitionDocumentation_key where
+  buildStruct _proxy
+    (DefinitionDocumentation_key __field__defn __field__docs)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "defn" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__defn)
+           :
+           Thrift.genField _proxy "docs" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__docs)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__defn <- ST.newSTRef Default.def
+            __field__docs <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__defn
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__docs
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__defn <- ST.readSTRef __field__defn
+                                             !__val__docs <- ST.readSTRef __field__docs
+                                             Prelude.pure
+                                               (DefinitionDocumentation_key __val__defn __val__docs)
+              _idMap = HashMap.fromList [("defn", 1), ("docs", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData DefinitionDocumentation_key where
+  rnf (DefinitionDocumentation_key __field__defn __field__docs)
+    = DeepSeq.rnf __field__defn `Prelude.seq`
+        DeepSeq.rnf __field__docs `Prelude.seq` ()
+
+instance Default.Default DefinitionDocumentation_key where
+  def = DefinitionDocumentation_key Default.def Default.def
+
+instance Hashable.Hashable DefinitionDocumentation_key where
+  hashWithSalt __salt (DefinitionDocumentation_key _defn _docs)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _defn) _docs
+
+data Definition_key = Definition_key{definition_key_symbol ::
+                                     Symbol,
+                                     definition_key_location :: FileRange}
+                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Definition_key where
+  toJSON (Definition_key __field__symbol __field__location)
+    = Aeson.object
+        ("symbol" .= __field__symbol :
+           "location" .= __field__location : Prelude.mempty)
+
+instance Thrift.ThriftStruct Definition_key where
+  buildStruct _proxy
+    (Definition_key __field__symbol __field__location)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "symbol" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__symbol)
+           :
+           Thrift.genField _proxy "location" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__location)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__symbol <- ST.newSTRef Default.def
+            __field__location <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__symbol
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__location
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__symbol <- ST.readSTRef
+                                                                 __field__symbol
+                                             !__val__location <- ST.readSTRef __field__location
+                                             Prelude.pure
+                                               (Definition_key __val__symbol __val__location)
+              _idMap = HashMap.fromList [("symbol", 1), ("location", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData Definition_key where
+  rnf (Definition_key __field__symbol __field__location)
+    = DeepSeq.rnf __field__symbol `Prelude.seq`
+        DeepSeq.rnf __field__location `Prelude.seq` ()
+
+instance Default.Default Definition_key where
+  def = Definition_key Default.def Default.def
+
+instance Hashable.Hashable Definition_key where
+  hashWithSalt __salt (Definition_key _symbol _location)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _symbol)
+        _location
+{-# LINE 19 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.EntityLocation_key
+         where
+  buildRtsValue b (Glean.Schema.Scip.Types.EntityLocation_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Scip.Types.EntityLocation_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "scip.EntityLocation_key" (Prelude.Just 0))
+{-# LINE 28 "glean/schema/thrift/scip_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Scip.Types.EntityLocation_key =
+     'Angle.TField "entity" (Glean.Schema.Scip.Types.Entity)
+       ('Angle.TField "location" (Glean.Schema.Scip.Types.Location)
+          ('Angle.TNoFields))
+{-# LINE 30 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Scip.Types.EntityLocation
+         where
+  type KeyType Glean.Schema.Scip.Types.EntityLocation =
+       Glean.Schema.Scip.Types.EntityLocation_key
+  getName _proxy = Glean.PredicateRef "scip.EntityLocation" 1
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Scip.Types.entityLocation_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Scip.Types.EntityLocation x k
+  getFactKey = Glean.Schema.Scip.Types.entityLocation_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 39 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.EntityLocation where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 45 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.ReferenceTarget_key
+         where
+  buildRtsValue b (Glean.Schema.Scip.Types.ReferenceTarget_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Scip.Types.ReferenceTarget_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "scip.ReferenceTarget_key" (Prelude.Just 0))
+{-# LINE 54 "glean/schema/thrift/scip_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Scip.Types.ReferenceTarget_key =
+     'Angle.TField "xref"
+       (Glean.KeyType Glean.Schema.Scip.Types.Reference)
+       ('Angle.TField "target"
+          (Glean.KeyType Glean.Schema.Scip.Types.Definition)
+          ('Angle.TNoFields))
+{-# LINE 56 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Scip.Types.ReferenceTarget
+         where
+  type KeyType Glean.Schema.Scip.Types.ReferenceTarget =
+       Glean.Schema.Scip.Types.ReferenceTarget_key
+  getName _proxy = Glean.PredicateRef "scip.ReferenceTarget" 1
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Scip.Types.referenceTarget_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Scip.Types.ReferenceTarget x k
+  getFactKey = Glean.Schema.Scip.Types.referenceTarget_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 65 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.ReferenceTarget where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 71 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Scip.Types.FileEntityXRefLocation_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Scip.Types.FileEntityXRefLocation_key x1 x2 x3 x4)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+  decodeRtsValue
+    = Glean.Schema.Scip.Types.FileEntityXRefLocation_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "scip.FileEntityXRefLocation_key"
+           (Prelude.Just 0))
+{-# LINE 84 "glean/schema/thrift/scip_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.Scip.Types.FileEntityXRefLocation_key
+     =
+     'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
+       ('Angle.TField "source" (Glean.Schema.Src.Types.Range)
+          ('Angle.TField "target" (Glean.Schema.Scip.Types.Location)
+             ('Angle.TField "entity" (Glean.Schema.Scip.Types.Entity)
+                ('Angle.TNoFields))))
+{-# LINE 86 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Scip.Types.FileEntityXRefLocation
+         where
+  type KeyType Glean.Schema.Scip.Types.FileEntityXRefLocation =
+       Glean.Schema.Scip.Types.FileEntityXRefLocation_key
+  getName _proxy = Glean.PredicateRef "scip.FileEntityXRefLocation" 1
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Scip.Types.fileEntityXRefLocation_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Scip.Types.FileEntityXRefLocation x k
+  getFactKey = Glean.Schema.Scip.Types.fileEntityXRefLocation_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 95 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.FileEntityXRefLocation
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 101 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.IsImplementation_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Scip.Types.IsImplementation_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Scip.Types.IsImplementation_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "scip.IsImplementation_key" (Prelude.Just 0))
+{-# LINE 110 "glean/schema/thrift/scip_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Scip.Types.IsImplementation_key =
+     'Angle.TField "symbol"
+       (Glean.KeyType Glean.Schema.Scip.Types.Symbol)
+       ('Angle.TField "implemented"
+          (Glean.KeyType Glean.Schema.Scip.Types.Symbol)
+          ('Angle.TNoFields))
+{-# LINE 112 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Scip.Types.IsImplementation
+         where
+  type KeyType Glean.Schema.Scip.Types.IsImplementation =
+       Glean.Schema.Scip.Types.IsImplementation_key
+  getName _proxy = Glean.PredicateRef "scip.IsImplementation" 1
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Scip.Types.isImplementation_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Scip.Types.IsImplementation x k
+  getFactKey = Glean.Schema.Scip.Types.isImplementation_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 121 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.IsImplementation where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 127 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.SymbolName_key where
+  buildRtsValue b (Glean.Schema.Scip.Types.SymbolName_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Scip.Types.SymbolName_key <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "scip.SymbolName_key" (Prelude.Just 0))
+{-# LINE 136 "glean/schema/thrift/scip_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Scip.Types.SymbolName_key =
+     'Angle.TField "symbol"
+       (Glean.KeyType Glean.Schema.Scip.Types.Symbol)
+       ('Angle.TField "name"
+          (Glean.KeyType Glean.Schema.Scip.Types.LocalName)
+          ('Angle.TNoFields))
+{-# LINE 138 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Scip.Types.SymbolName where
+  type KeyType Glean.Schema.Scip.Types.SymbolName =
+       Glean.Schema.Scip.Types.SymbolName_key
+  getName _proxy = Glean.PredicateRef "scip.SymbolName" 1
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Scip.Types.symbolName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Scip.Types.SymbolName x k
+  getFactKey = Glean.Schema.Scip.Types.symbolName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 147 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.SymbolName where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 153 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Scip.Types.LowerCaseDisplayNameSymbol_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Scip.Types.LowerCaseDisplayNameSymbol_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Scip.Types.LowerCaseDisplayNameSymbol_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "scip.LowerCaseDisplayNameSymbol_key"
+           (Prelude.Just 0))
+{-# LINE 162 "glean/schema/thrift/scip_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.Scip.Types.LowerCaseDisplayNameSymbol_key
+     =
+     'Angle.TField "displayName" (Data.Text.Text)
+       ('Angle.TField "symbol"
+          (Glean.KeyType Glean.Schema.Scip.Types.Symbol)
+          ('Angle.TNoFields))
+{-# LINE 164 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Scip.Types.LowerCaseDisplayNameSymbol
+         where
+  type KeyType Glean.Schema.Scip.Types.LowerCaseDisplayNameSymbol =
+       Glean.Schema.Scip.Types.LowerCaseDisplayNameSymbol_key
+  getName _proxy
+    = Glean.PredicateRef "scip.LowerCaseDisplayNameSymbol" 1
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Scip.Types.lowerCaseDisplayNameSymbol_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Scip.Types.LowerCaseDisplayNameSymbol x k
+  getFactKey = Glean.Schema.Scip.Types.lowerCaseDisplayNameSymbol_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 173 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Scip.Types.LowerCaseDisplayNameSymbol
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 179 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.DefinitionName_key
+         where
+  buildRtsValue b (Glean.Schema.Scip.Types.DefinitionName_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Scip.Types.DefinitionName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "scip.DefinitionName_key" (Prelude.Just 0))
+{-# LINE 188 "glean/schema/thrift/scip_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Scip.Types.DefinitionName_key =
+     'Angle.TField "defn"
+       (Glean.KeyType Glean.Schema.Scip.Types.Definition)
+       ('Angle.TField "docs"
+          (Glean.KeyType Glean.Schema.Scip.Types.LocalName)
+          ('Angle.TNoFields))
+{-# LINE 190 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Scip.Types.DefinitionName
+         where
+  type KeyType Glean.Schema.Scip.Types.DefinitionName =
+       Glean.Schema.Scip.Types.DefinitionName_key
+  getName _proxy = Glean.PredicateRef "scip.DefinitionName" 1
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Scip.Types.definitionName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Scip.Types.DefinitionName x k
+  getFactKey = Glean.Schema.Scip.Types.definitionName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 199 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.DefinitionName where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 205 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.FileRange_key where
+  buildRtsValue b (Glean.Schema.Scip.Types.FileRange_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Scip.Types.FileRange_key <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "scip.FileRange_key" (Prelude.Just 0))
+{-# LINE 214 "glean/schema/thrift/scip_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Scip.Types.FileRange_key =
+     'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
+       ('Angle.TField "range" (Glean.Schema.LsifTypes.Types.RangeSpan)
+          ('Angle.TNoFields))
+{-# LINE 216 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Scip.Types.FileRange where
+  type KeyType Glean.Schema.Scip.Types.FileRange =
+       Glean.Schema.Scip.Types.FileRange_key
+  getName _proxy = Glean.PredicateRef "scip.FileRange" 1
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Scip.Types.fileRange_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Scip.Types.FileRange x k
+  getFactKey = Glean.Schema.Scip.Types.fileRange_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 225 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.FileRange where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 231 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.SymbolKind_key where
+  buildRtsValue b (Glean.Schema.Scip.Types.SymbolKind_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Scip.Types.SymbolKind_key <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "scip.SymbolKind_key" (Prelude.Just 0))
+{-# LINE 240 "glean/schema/thrift/scip_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Scip.Types.SymbolKind_key =
+     'Angle.TField "symbol"
+       (Glean.KeyType Glean.Schema.Scip.Types.Symbol)
+       ('Angle.TField "kind" (Glean.Schema.LsifTypes.Types.SymbolKind)
+          ('Angle.TNoFields))
+{-# LINE 242 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Scip.Types.SymbolKind where
+  type KeyType Glean.Schema.Scip.Types.SymbolKind =
+       Glean.Schema.Scip.Types.SymbolKind_key
+  getName _proxy = Glean.PredicateRef "scip.SymbolKind" 1
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Scip.Types.symbolKind_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Scip.Types.SymbolKind x k
+  getFactKey = Glean.Schema.Scip.Types.symbolKind_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 251 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.SymbolKind where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 257 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.ResolveLocation_key
+         where
+  buildRtsValue b (Glean.Schema.Scip.Types.ResolveLocation_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Scip.Types.ResolveLocation_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "scip.ResolveLocation_key" (Prelude.Just 0))
+{-# LINE 266 "glean/schema/thrift/scip_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Scip.Types.ResolveLocation_key =
+     'Angle.TField "location" (Glean.Schema.Scip.Types.Location)
+       ('Angle.TField "entity" (Glean.Schema.Scip.Types.Entity)
+          ('Angle.TNoFields))
+{-# LINE 268 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Scip.Types.ResolveLocation
+         where
+  type KeyType Glean.Schema.Scip.Types.ResolveLocation =
+       Glean.Schema.Scip.Types.ResolveLocation_key
+  getName _proxy = Glean.PredicateRef "scip.ResolveLocation" 1
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Scip.Types.resolveLocation_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Scip.Types.ResolveLocation x k
+  getFactKey = Glean.Schema.Scip.Types.resolveLocation_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 277 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.ResolveLocation where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 283 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.EntityUses_key where
+  buildRtsValue b (Glean.Schema.Scip.Types.EntityUses_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Scip.Types.EntityUses_key <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "scip.EntityUses_key" (Prelude.Just 0))
+{-# LINE 294 "glean/schema/thrift/scip_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Scip.Types.EntityUses_key =
+     'Angle.TField "target" (Glean.Schema.Scip.Types.Entity)
+       ('Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
+          ('Angle.TField "range" (Glean.Schema.Src.Types.Range)
+             ('Angle.TNoFields)))
+{-# LINE 296 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Scip.Types.EntityUses where
+  type KeyType Glean.Schema.Scip.Types.EntityUses =
+       Glean.Schema.Scip.Types.EntityUses_key
+  getName _proxy = Glean.PredicateRef "scip.EntityUses" 1
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Scip.Types.entityUses_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Scip.Types.EntityUses x k
+  getFactKey = Glean.Schema.Scip.Types.entityUses_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 305 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.EntityUses where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 311 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.DefinitionLocation_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Scip.Types.DefinitionLocation_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Scip.Types.DefinitionLocation_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "scip.DefinitionLocation_key" (Prelude.Just 0))
+{-# LINE 322 "glean/schema/thrift/scip_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Scip.Types.DefinitionLocation_key =
+     'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
+       ('Angle.TField "range" (Glean.Schema.LsifTypes.Types.RangeSpan)
+          ('Angle.TField "defn"
+             (Glean.KeyType Glean.Schema.Scip.Types.Definition)
+             ('Angle.TNoFields)))
+{-# LINE 324 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Scip.Types.DefinitionLocation
+         where
+  type KeyType Glean.Schema.Scip.Types.DefinitionLocation =
+       Glean.Schema.Scip.Types.DefinitionLocation_key
+  getName _proxy = Glean.PredicateRef "scip.DefinitionLocation" 1
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Scip.Types.definitionLocation_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Scip.Types.DefinitionLocation x k
+  getFactKey = Glean.Schema.Scip.Types.definitionLocation_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 333 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.DefinitionLocation
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 339 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.SearchBySymbol_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Scip.Types.SearchBySymbol_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Scip.Types.SearchBySymbol_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "scip.SearchBySymbol_key" (Prelude.Just 0))
+{-# LINE 350 "glean/schema/thrift/scip_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Scip.Types.SearchBySymbol_key =
+     'Angle.TField "symbol"
+       (Glean.KeyType Glean.Schema.Scip.Types.Symbol)
+       ('Angle.TField "language" (Glean.Schema.LsifTypes.Types.LanguageId)
+          ('Angle.TField "entity" (Glean.Schema.Scip.Types.Entity)
+             ('Angle.TNoFields)))
+{-# LINE 352 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Scip.Types.SearchBySymbol
+         where
+  type KeyType Glean.Schema.Scip.Types.SearchBySymbol =
+       Glean.Schema.Scip.Types.SearchBySymbol_key
+  getName _proxy = Glean.PredicateRef "scip.SearchBySymbol" 1
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Scip.Types.searchBySymbol_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Scip.Types.SearchBySymbol x k
+  getFactKey = Glean.Schema.Scip.Types.searchBySymbol_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 361 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.SearchBySymbol where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 367 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.ReferenceLocation_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Scip.Types.ReferenceLocation_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Scip.Types.ReferenceLocation_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "scip.ReferenceLocation_key" (Prelude.Just 0))
+{-# LINE 378 "glean/schema/thrift/scip_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Scip.Types.ReferenceLocation_key =
+     'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
+       ('Angle.TField "range" (Glean.Schema.LsifTypes.Types.RangeSpan)
+          ('Angle.TField "xref"
+             (Glean.KeyType Glean.Schema.Scip.Types.Reference)
+             ('Angle.TNoFields)))
+{-# LINE 380 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Scip.Types.ReferenceLocation
+         where
+  type KeyType Glean.Schema.Scip.Types.ReferenceLocation =
+       Glean.Schema.Scip.Types.ReferenceLocation_key
+  getName _proxy = Glean.PredicateRef "scip.ReferenceLocation" 1
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Scip.Types.referenceLocation_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Scip.Types.ReferenceLocation x k
+  getFactKey = Glean.Schema.Scip.Types.referenceLocation_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 389 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.ReferenceLocation where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 395 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.SymbolDocumentation_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Scip.Types.SymbolDocumentation_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Scip.Types.SymbolDocumentation_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "scip.SymbolDocumentation_key" (Prelude.Just 0))
+{-# LINE 404 "glean/schema/thrift/scip_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Scip.Types.SymbolDocumentation_key
+     =
+     'Angle.TField "symbol"
+       (Glean.KeyType Glean.Schema.Scip.Types.Symbol)
+       ('Angle.TField "docs"
+          (Glean.KeyType Glean.Schema.Scip.Types.Documentation)
+          ('Angle.TNoFields))
+{-# LINE 406 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Scip.Types.SymbolDocumentation
+         where
+  type KeyType Glean.Schema.Scip.Types.SymbolDocumentation =
+       Glean.Schema.Scip.Types.SymbolDocumentation_key
+  getName _proxy = Glean.PredicateRef "scip.SymbolDocumentation" 1
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Scip.Types.symbolDocumentation_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Scip.Types.SymbolDocumentation x k
+  getFactKey = Glean.Schema.Scip.Types.symbolDocumentation_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 415 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.SymbolDocumentation
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 421 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Scip.Types.LocalName where
+  type KeyType Glean.Schema.Scip.Types.LocalName = Data.Text.Text
+  getName _proxy = Glean.PredicateRef "scip.LocalName" 1
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Scip.Types.localName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Scip.Types.LocalName x k
+  getFactKey = Glean.Schema.Scip.Types.localName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 429 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.LocalName where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 435 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.Reference_key where
+  buildRtsValue b (Glean.Schema.Scip.Types.Reference_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Scip.Types.Reference_key <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "scip.Reference_key" (Prelude.Just 0))
+{-# LINE 444 "glean/schema/thrift/scip_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Scip.Types.Reference_key =
+     'Angle.TField "symbol"
+       (Glean.KeyType Glean.Schema.Scip.Types.Symbol)
+       ('Angle.TField "location"
+          (Glean.KeyType Glean.Schema.Scip.Types.FileRange)
+          ('Angle.TNoFields))
+{-# LINE 446 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Scip.Types.Reference where
+  type KeyType Glean.Schema.Scip.Types.Reference =
+       Glean.Schema.Scip.Types.Reference_key
+  getName _proxy = Glean.PredicateRef "scip.Reference" 1
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Scip.Types.reference_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Scip.Types.Reference x k
+  getFactKey = Glean.Schema.Scip.Types.reference_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 455 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.Reference where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 461 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Scip.Types.DisplayName where
+  type KeyType Glean.Schema.Scip.Types.DisplayName = Data.Text.Text
+  getName _proxy = Glean.PredicateRef "scip.DisplayName" 1
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Scip.Types.displayName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Scip.Types.DisplayName x k
+  getFactKey = Glean.Schema.Scip.Types.displayName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 469 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.DisplayName where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 475 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.Metadata_key where
+  buildRtsValue b (Glean.Schema.Scip.Types.Metadata_key x1 x2 x3 x4)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+  decodeRtsValue
+    = Glean.Schema.Scip.Types.Metadata_key <$> Glean.decodeRtsValue <*>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "scip.Metadata_key" (Prelude.Just 0))
+{-# LINE 488 "glean/schema/thrift/scip_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Scip.Types.Metadata_key =
+     'Angle.TField "version" (Glean.Schema.Scip.Types.ProtocolVersion)
+       ('Angle.TField "toolInfo"
+          (Prelude.Maybe Glean.Schema.LsifTypes.Types.ToolInfo)
+          ('Angle.TField "projectRoot" (Data.Text.Text)
+             ('Angle.TField "textEncoding"
+                (Glean.Schema.Scip.Types.TextEncoding)
+                ('Angle.TNoFields))))
+{-# LINE 490 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Scip.Types.Metadata where
+  type KeyType Glean.Schema.Scip.Types.Metadata =
+       Glean.Schema.Scip.Types.Metadata_key
+  getName _proxy = Glean.PredicateRef "scip.Metadata" 1
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Scip.Types.metadata_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Scip.Types.Metadata x k
+  getFactKey = Glean.Schema.Scip.Types.metadata_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 499 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.Metadata where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 505 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.Definition_key where
+  buildRtsValue b (Glean.Schema.Scip.Types.Definition_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Scip.Types.Definition_key <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "scip.Definition_key" (Prelude.Just 0))
+{-# LINE 514 "glean/schema/thrift/scip_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Scip.Types.Definition_key =
+     'Angle.TField "symbol"
+       (Glean.KeyType Glean.Schema.Scip.Types.Symbol)
+       ('Angle.TField "location"
+          (Glean.KeyType Glean.Schema.Scip.Types.FileRange)
+          ('Angle.TNoFields))
+{-# LINE 516 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Scip.Types.Definition where
+  type KeyType Glean.Schema.Scip.Types.Definition =
+       Glean.Schema.Scip.Types.Definition_key
+  getName _proxy = Glean.PredicateRef "scip.Definition" 1
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Scip.Types.definition_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Scip.Types.Definition x k
+  getFactKey = Glean.Schema.Scip.Types.definition_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 525 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.Definition where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 531 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Scip.Types.SearchByNameKindLanguage_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Scip.Types.SearchByNameKindLanguage_key x1 x2 x3 x4)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+  decodeRtsValue
+    = Glean.Schema.Scip.Types.SearchByNameKindLanguage_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "scip.SearchByNameKindLanguage_key"
+           (Prelude.Just 0))
+{-# LINE 544 "glean/schema/thrift/scip_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.Scip.Types.SearchByNameKindLanguage_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "kind"
+          (Prelude.Maybe Glean.Schema.LsifTypes.Types.SymbolKind)
+          ('Angle.TField "language" (Glean.Schema.LsifTypes.Types.LanguageId)
+             ('Angle.TField "entity" (Glean.Schema.Scip.Types.Entity)
+                ('Angle.TNoFields))))
+{-# LINE 546 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Scip.Types.SearchByNameKindLanguage
+         where
+  type KeyType Glean.Schema.Scip.Types.SearchByNameKindLanguage =
+       Glean.Schema.Scip.Types.SearchByNameKindLanguage_key
+  getName _proxy
+    = Glean.PredicateRef "scip.SearchByNameKindLanguage" 1
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Scip.Types.searchByNameKindLanguage_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Scip.Types.SearchByNameKindLanguage x k
+  getFactKey = Glean.Schema.Scip.Types.searchByNameKindLanguage_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 555 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Scip.Types.SearchByNameKindLanguage
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 561 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.IsImplemented_key where
+  buildRtsValue b (Glean.Schema.Scip.Types.IsImplemented_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Scip.Types.IsImplemented_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "scip.IsImplemented_key" (Prelude.Just 0))
+{-# LINE 570 "glean/schema/thrift/scip_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Scip.Types.IsImplemented_key =
+     'Angle.TField "implemented"
+       (Glean.KeyType Glean.Schema.Scip.Types.Symbol)
+       ('Angle.TField "symbol"
+          (Glean.KeyType Glean.Schema.Scip.Types.Symbol)
+          ('Angle.TNoFields))
+{-# LINE 572 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Scip.Types.IsImplemented
+         where
+  type KeyType Glean.Schema.Scip.Types.IsImplemented =
+       Glean.Schema.Scip.Types.IsImplemented_key
+  getName _proxy = Glean.PredicateRef "scip.IsImplemented" 1
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Scip.Types.isImplemented_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Scip.Types.IsImplemented x k
+  getFactKey = Glean.Schema.Scip.Types.isImplemented_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 581 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.IsImplemented where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 587 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.EnclosingSymbol_key
+         where
+  buildRtsValue b (Glean.Schema.Scip.Types.EnclosingSymbol_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Scip.Types.EnclosingSymbol_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "scip.EnclosingSymbol_key" (Prelude.Just 0))
+{-# LINE 596 "glean/schema/thrift/scip_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Scip.Types.EnclosingSymbol_key =
+     'Angle.TField "symbol"
+       (Glean.KeyType Glean.Schema.Scip.Types.Symbol)
+       ('Angle.TField "enclosing"
+          (Glean.KeyType Glean.Schema.Scip.Types.Symbol)
+          ('Angle.TNoFields))
+{-# LINE 598 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Scip.Types.EnclosingSymbol
+         where
+  type KeyType Glean.Schema.Scip.Types.EnclosingSymbol =
+       Glean.Schema.Scip.Types.EnclosingSymbol_key
+  getName _proxy = Glean.PredicateRef "scip.EnclosingSymbol" 1
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Scip.Types.enclosingSymbol_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Scip.Types.EnclosingSymbol x k
+  getFactKey = Glean.Schema.Scip.Types.enclosingSymbol_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 607 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.EnclosingSymbol where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 613 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.DisplayNameSymbol_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Scip.Types.DisplayNameSymbol_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Scip.Types.DisplayNameSymbol_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "scip.DisplayNameSymbol_key" (Prelude.Just 0))
+{-# LINE 622 "glean/schema/thrift/scip_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Scip.Types.DisplayNameSymbol_key =
+     'Angle.TField "displayName"
+       (Glean.KeyType Glean.Schema.Scip.Types.DisplayName)
+       ('Angle.TField "symbol"
+          (Glean.KeyType Glean.Schema.Scip.Types.Symbol)
+          ('Angle.TNoFields))
+{-# LINE 624 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Scip.Types.DisplayNameSymbol
+         where
+  type KeyType Glean.Schema.Scip.Types.DisplayNameSymbol =
+       Glean.Schema.Scip.Types.DisplayNameSymbol_key
+  getName _proxy = Glean.PredicateRef "scip.DisplayNameSymbol" 1
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Scip.Types.displayNameSymbol_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Scip.Types.DisplayNameSymbol x k
+  getFactKey = Glean.Schema.Scip.Types.displayNameSymbol_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 633 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.DisplayNameSymbol where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 639 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.FileLanguage_key where
+  buildRtsValue b (Glean.Schema.Scip.Types.FileLanguage_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Scip.Types.FileLanguage_key <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "scip.FileLanguage_key" (Prelude.Just 0))
+{-# LINE 648 "glean/schema/thrift/scip_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Scip.Types.FileLanguage_key =
+     'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
+       ('Angle.TField "language" (Glean.Schema.LsifTypes.Types.LanguageId)
+          ('Angle.TNoFields))
+{-# LINE 650 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Scip.Types.FileLanguage where
+  type KeyType Glean.Schema.Scip.Types.FileLanguage =
+       Glean.Schema.Scip.Types.FileLanguage_key
+  getName _proxy = Glean.PredicateRef "scip.FileLanguage" 1
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Scip.Types.fileLanguage_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Scip.Types.FileLanguage x k
+  getFactKey = Glean.Schema.Scip.Types.fileLanguage_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 659 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.FileLanguage where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 665 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Scip.Types.Documentation
+         where
+  type KeyType Glean.Schema.Scip.Types.Documentation = Data.Text.Text
+  getName _proxy = Glean.PredicateRef "scip.Documentation" 1
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Scip.Types.documentation_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Scip.Types.Documentation x k
+  getFactKey = Glean.Schema.Scip.Types.documentation_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 673 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.Documentation where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 679 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Scip.Types.Symbol where
+  type KeyType Glean.Schema.Scip.Types.Symbol = Data.Text.Text
+  getName _proxy = Glean.PredicateRef "scip.Symbol" 1
+  getId = Glean.IdOf . Glean.Fid . Glean.Schema.Scip.Types.symbol_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Scip.Types.Symbol x k
+  getFactKey = Glean.Schema.Scip.Types.symbol_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 687 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.Symbol where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 693 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.EnclosedSymbol_key
+         where
+  buildRtsValue b (Glean.Schema.Scip.Types.EnclosedSymbol_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Scip.Types.EnclosedSymbol_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "scip.EnclosedSymbol_key" (Prelude.Just 0))
+{-# LINE 702 "glean/schema/thrift/scip_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Scip.Types.EnclosedSymbol_key =
+     'Angle.TField "symbol"
+       (Glean.KeyType Glean.Schema.Scip.Types.Symbol)
+       ('Angle.TField "enclosed"
+          (Glean.KeyType Glean.Schema.Scip.Types.Symbol)
+          ('Angle.TNoFields))
+{-# LINE 704 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Scip.Types.EnclosedSymbol
+         where
+  type KeyType Glean.Schema.Scip.Types.EnclosedSymbol =
+       Glean.Schema.Scip.Types.EnclosedSymbol_key
+  getName _proxy = Glean.PredicateRef "scip.EnclosedSymbol" 1
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Scip.Types.enclosedSymbol_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Scip.Types.EnclosedSymbol x k
+  getFactKey = Glean.Schema.Scip.Types.enclosedSymbol_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 713 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.EnclosedSymbol where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 719 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Scip.Types.SearchByLowerCaseNameKindLanguage_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Scip.Types.SearchByLowerCaseNameKindLanguage_key x1
+       x2 x3 x4)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+  decodeRtsValue
+    = Glean.Schema.Scip.Types.SearchByLowerCaseNameKindLanguage_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "scip.SearchByLowerCaseNameKindLanguage_key"
+           (Prelude.Just 0))
+{-# LINE 732 "glean/schema/thrift/scip_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.Scip.Types.SearchByLowerCaseNameKindLanguage_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "kind"
+          (Prelude.Maybe Glean.Schema.LsifTypes.Types.SymbolKind)
+          ('Angle.TField "language" (Glean.Schema.LsifTypes.Types.LanguageId)
+             ('Angle.TField "entity" (Glean.Schema.Scip.Types.Entity)
+                ('Angle.TNoFields))))
+{-# LINE 734 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Scip.Types.SearchByLowerCaseNameKindLanguage
+         where
+  type KeyType
+         Glean.Schema.Scip.Types.SearchByLowerCaseNameKindLanguage
+       = Glean.Schema.Scip.Types.SearchByLowerCaseNameKindLanguage_key
+  getName _proxy
+    = Glean.PredicateRef "scip.SearchByLowerCaseNameKindLanguage" 1
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.Scip.Types.searchByLowerCaseNameKindLanguage_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Scip.Types.SearchByLowerCaseNameKindLanguage x k
+  getFactKey
+    = Glean.Schema.Scip.Types.searchByLowerCaseNameKindLanguage_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 744 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Scip.Types.SearchByLowerCaseNameKindLanguage
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 750 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.Scip.Types.DefinitionDocumentation_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Scip.Types.DefinitionDocumentation_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Scip.Types.DefinitionDocumentation_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "scip.DefinitionDocumentation_key"
+           (Prelude.Just 0))
+{-# LINE 759 "glean/schema/thrift/scip_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.Scip.Types.DefinitionDocumentation_key
+     =
+     'Angle.TField "defn"
+       (Glean.KeyType Glean.Schema.Scip.Types.Definition)
+       ('Angle.TField "docs"
+          (Glean.KeyType Glean.Schema.Scip.Types.Documentation)
+          ('Angle.TNoFields))
+{-# LINE 761 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.Scip.Types.DefinitionDocumentation
+         where
+  type KeyType Glean.Schema.Scip.Types.DefinitionDocumentation =
+       Glean.Schema.Scip.Types.DefinitionDocumentation_key
+  getName _proxy
+    = Glean.PredicateRef "scip.DefinitionDocumentation" 1
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Scip.Types.definitionDocumentation_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Scip.Types.DefinitionDocumentation x k
+  getFactKey = Glean.Schema.Scip.Types.definitionDocumentation_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 770 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.DefinitionDocumentation
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 776 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.SymbolDisplayName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Scip.Types.SymbolDisplayName_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Scip.Types.SymbolDisplayName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "scip.SymbolDisplayName_key" (Prelude.Just 0))
+{-# LINE 785 "glean/schema/thrift/scip_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Scip.Types.SymbolDisplayName_key =
+     'Angle.TField "symbol"
+       (Glean.KeyType Glean.Schema.Scip.Types.Symbol)
+       ('Angle.TField "displayName"
+          (Glean.KeyType Glean.Schema.Scip.Types.DisplayName)
+          ('Angle.TNoFields))
+{-# LINE 787 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Scip.Types.SymbolDisplayName
+         where
+  type KeyType Glean.Schema.Scip.Types.SymbolDisplayName =
+       Glean.Schema.Scip.Types.SymbolDisplayName_key
+  getName _proxy = Glean.PredicateRef "scip.SymbolDisplayName" 1
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Scip.Types.symbolDisplayName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Scip.Types.SymbolDisplayName x k
+  getFactKey = Glean.Schema.Scip.Types.symbolDisplayName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 796 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.SymbolDisplayName where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 802 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.TagDefinition_key where
+  buildRtsValue b
+    (Glean.Schema.Scip.Types.TagDefinition_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Scip.Types.TagDefinition_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "scip.TagDefinition_key" (Prelude.Just 0))
+{-# LINE 813 "glean/schema/thrift/scip_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Scip.Types.TagDefinition_key =
+     'Angle.TField "language" (Glean.Schema.LsifTypes.Types.LanguageId)
+       ('Angle.TField "defn"
+          (Glean.KeyType Glean.Schema.Scip.Types.Definition)
+          ('Angle.TField "entity" (Glean.Schema.Scip.Types.Entity)
+             ('Angle.TNoFields)))
+{-# LINE 815 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Scip.Types.TagDefinition
+         where
+  type KeyType Glean.Schema.Scip.Types.TagDefinition =
+       Glean.Schema.Scip.Types.TagDefinition_key
+  getName _proxy = Glean.PredicateRef "scip.TagDefinition" 1
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Scip.Types.tagDefinition_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Scip.Types.TagDefinition x k
+  getFactKey = Glean.Schema.Scip.Types.tagDefinition_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 824 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.TagDefinition where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 830 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.EnclosingRange_key
+         where
+  buildRtsValue b (Glean.Schema.Scip.Types.EnclosingRange_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Scip.Types.EnclosingRange_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "scip.EnclosingRange_key" (Prelude.Just 0))
+{-# LINE 839 "glean/schema/thrift/scip_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Scip.Types.EnclosingRange_key =
+     'Angle.TField "range"
+       (Glean.KeyType Glean.Schema.Scip.Types.FileRange)
+       ('Angle.TField "enclosingRange"
+          (Glean.KeyType Glean.Schema.Scip.Types.FileRange)
+          ('Angle.TNoFields))
+{-# LINE 841 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Scip.Types.EnclosingRange
+         where
+  type KeyType Glean.Schema.Scip.Types.EnclosingRange =
+       Glean.Schema.Scip.Types.EnclosingRange_key
+  getName _proxy = Glean.PredicateRef "scip.EnclosingRange" 1
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Scip.Types.enclosingRange_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Scip.Types.EnclosingRange x k
+  getFactKey = Glean.Schema.Scip.Types.enclosingRange_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 850 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.EnclosingRange where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 856 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.EntityDefinition_key
+         where
+  buildRtsValue b
+    (Glean.Schema.Scip.Types.EntityDefinition_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Scip.Types.EntityDefinition_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "scip.EntityDefinition_key" (Prelude.Just 0))
+{-# LINE 865 "glean/schema/thrift/scip_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Scip.Types.EntityDefinition_key =
+     'Angle.TField "entity" (Glean.Schema.Scip.Types.Entity)
+       ('Angle.TField "defn"
+          (Glean.KeyType Glean.Schema.Scip.Types.Definition)
+          ('Angle.TNoFields))
+{-# LINE 867 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Scip.Types.EntityDefinition
+         where
+  type KeyType Glean.Schema.Scip.Types.EntityDefinition =
+       Glean.Schema.Scip.Types.EntityDefinition_key
+  getName _proxy = Glean.PredicateRef "scip.EntityDefinition" 1
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Scip.Types.entityDefinition_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Scip.Types.EntityDefinition x k
+  getFactKey = Glean.Schema.Scip.Types.entityDefinition_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 876 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.EntityDefinition where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 882 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.DefinitionUses_key
+         where
+  buildRtsValue b (Glean.Schema.Scip.Types.DefinitionUses_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Scip.Types.DefinitionUses_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "scip.DefinitionUses_key" (Prelude.Just 0))
+{-# LINE 891 "glean/schema/thrift/scip_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Scip.Types.DefinitionUses_key =
+     'Angle.TField "target"
+       (Glean.KeyType Glean.Schema.Scip.Types.Definition)
+       ('Angle.TField "xref"
+          (Glean.KeyType Glean.Schema.Scip.Types.Reference)
+          ('Angle.TNoFields))
+{-# LINE 893 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Scip.Types.DefinitionUses
+         where
+  type KeyType Glean.Schema.Scip.Types.DefinitionUses =
+       Glean.Schema.Scip.Types.DefinitionUses_key
+  getName _proxy = Glean.PredicateRef "scip.DefinitionUses" 1
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.Scip.Types.definitionUses_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Scip.Types.DefinitionUses x k
+  getFactKey = Glean.Schema.Scip.Types.definitionUses_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 902 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.DefinitionUses where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 908 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.EntityKind_key where
+  buildRtsValue b (Glean.Schema.Scip.Types.EntityKind_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.Scip.Types.EntityKind_key <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "scip.EntityKind_key" (Prelude.Just 0))
+{-# LINE 917 "glean/schema/thrift/scip_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.Scip.Types.EntityKind_key =
+     'Angle.TField "entity" (Glean.Schema.Scip.Types.Entity)
+       ('Angle.TField "kind" (Glean.Schema.LsifTypes.Types.SymbolKind)
+          ('Angle.TNoFields))
+{-# LINE 919 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Scip.Types.EntityKind where
+  type KeyType Glean.Schema.Scip.Types.EntityKind =
+       Glean.Schema.Scip.Types.EntityKind_key
+  getName _proxy = Glean.PredicateRef "scip.EntityKind" 1
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Scip.Types.entityKind_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.Scip.Types.EntityKind x k
+  getFactKey = Glean.Schema.Scip.Types.entityKind_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 928 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.EntityKind where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 934 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.SomeEntity where
+  buildRtsValue b (Glean.Schema.Scip.Types.SomeEntity x1)
+    = do Glean.buildRtsValue b x1
+  decodeRtsValue
+    = Glean.Schema.Scip.Types.SomeEntity <$> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "scip.SomeEntity" (Prelude.Just 1))
+{-# LINE 941 "glean/schema/thrift/scip_include.hs" #-}
+type instance Angle.RecordFields Glean.Schema.Scip.Types.SomeEntity
+     =
+     'Angle.TField "defn"
+       (Glean.KeyType Glean.Schema.Scip.Types.Definition)
+       ('Angle.TNoFields)
+{-# LINE 943 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.ProtocolVersion where
+  buildRtsValue = Glean.thriftEnum_buildRtsValue
+  decodeRtsValue = Glean.thriftEnumD
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "scip.ProtocolVersion" (Prelude.Just 1))
+{-# LINE 948 "glean/schema/thrift/scip_include.hs" #-}
+type instance
+     Angle.SumFields Glean.Schema.Scip.Types.ProtocolVersion =
+     'Angle.TField "UnspecifiedProtocolVersion"
+       (Glean.Schema.Builtin.Types.Unit)
+       ('Angle.TNoFields)
+{-# LINE 950 "glean/schema/thrift/scip_include.hs" #-}
+instance Angle.AngleEnum Glean.Schema.Scip.Types.ProtocolVersion
+         where
+  type AngleEnumTy Glean.Schema.Scip.Types.ProtocolVersion =
+       Glean.Schema.Scip.Types.ProtocolVersion
+  enumName v = Text.pack (Prelude.drop 16 (Prelude.show v))
+{-# LINE 954 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.TextEncoding where
+  buildRtsValue = Glean.thriftEnum_buildRtsValue
+  decodeRtsValue = Glean.thriftEnumD
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "scip.TextEncoding" (Prelude.Just 1))
+{-# LINE 959 "glean/schema/thrift/scip_include.hs" #-}
+type instance Angle.SumFields Glean.Schema.Scip.Types.TextEncoding
+     =
+     'Angle.TField "UnspecifiedTextEncoding"
+       (Glean.Schema.Builtin.Types.Unit)
+       ('Angle.TField "UTF8" (Glean.Schema.Builtin.Types.Unit)
+          ('Angle.TField "UTF16" (Glean.Schema.Builtin.Types.Unit)
+             ('Angle.TNoFields)))
+{-# LINE 961 "glean/schema/thrift/scip_include.hs" #-}
+instance Angle.AngleEnum Glean.Schema.Scip.Types.TextEncoding where
+  type AngleEnumTy Glean.Schema.Scip.Types.TextEncoding =
+       Glean.Schema.Scip.Types.TextEncoding
+  enumName v = Text.pack (Prelude.drop 13 (Prelude.show v))
+{-# LINE 965 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.Location where
+  buildRtsValue b (Glean.Schema.Scip.Types.Location x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.Scip.Types.Location <$> Glean.decodeRtsValue <*>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "scip.Location" (Prelude.Just 1))
+{-# LINE 976 "glean/schema/thrift/scip_include.hs" #-}
+type instance Angle.RecordFields Glean.Schema.Scip.Types.Location =
+     'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
+       ('Angle.TField "location" (Glean.Schema.Src.Types.Range)
+          ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields)))
+{-# LINE 978 "glean/schema/thrift/scip_include.hs" #-}
+instance Glean.Type Glean.Schema.Scip.Types.Entity where
+  buildRtsValue b Glean.Schema.Scip.Types.Entity_EMPTY
+    = Glean.buildRtsSelector b 17
+  buildRtsValue b (Glean.Schema.Scip.Types.Entity_rust x)
+    = do Glean.buildRtsSelector b 0
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Scip.Types.Entity_go x)
+    = do Glean.buildRtsSelector b 1
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Scip.Types.Entity_typescript x)
+    = do Glean.buildRtsSelector b 2
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Scip.Types.Entity_java x)
+    = do Glean.buildRtsSelector b 3
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Scip.Types.Entity_kotlin x)
+    = do Glean.buildRtsSelector b 4
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Scip.Types.Entity_swift x)
+    = do Glean.buildRtsSelector b 5
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Scip.Types.Entity_python x)
+    = do Glean.buildRtsSelector b 6
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Scip.Types.Entity_typescriptReact x)
+    = do Glean.buildRtsSelector b 7
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Scip.Types.Entity_javascript x)
+    = do Glean.buildRtsSelector b 8
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Scip.Types.Entity_javascriptReact x)
+    = do Glean.buildRtsSelector b 9
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Scip.Types.Entity_c x)
+    = do Glean.buildRtsSelector b 10
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Scip.Types.Entity_cpp x)
+    = do Glean.buildRtsSelector b 11
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Scip.Types.Entity_ruby x)
+    = do Glean.buildRtsSelector b 12
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Scip.Types.Entity_csharp x)
+    = do Glean.buildRtsSelector b 13
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Scip.Types.Entity_visualBasic x)
+    = do Glean.buildRtsSelector b 14
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Scip.Types.Entity_dart x)
+    = do Glean.buildRtsSelector b 15
+         Glean.buildRtsValue b x
+  buildRtsValue b (Glean.Schema.Scip.Types.Entity_php x)
+    = do Glean.buildRtsSelector b 16
+         Glean.buildRtsValue b x
+  decodeRtsValue
+    = Glean.sumD (Prelude.pure Glean.Schema.Scip.Types.Entity_EMPTY)
+        [Glean.mapD Glean.Schema.Scip.Types.Entity_rust,
+         Glean.mapD Glean.Schema.Scip.Types.Entity_go,
+         Glean.mapD Glean.Schema.Scip.Types.Entity_typescript,
+         Glean.mapD Glean.Schema.Scip.Types.Entity_java,
+         Glean.mapD Glean.Schema.Scip.Types.Entity_kotlin,
+         Glean.mapD Glean.Schema.Scip.Types.Entity_swift,
+         Glean.mapD Glean.Schema.Scip.Types.Entity_python,
+         Glean.mapD Glean.Schema.Scip.Types.Entity_typescriptReact,
+         Glean.mapD Glean.Schema.Scip.Types.Entity_javascript,
+         Glean.mapD Glean.Schema.Scip.Types.Entity_javascriptReact,
+         Glean.mapD Glean.Schema.Scip.Types.Entity_c,
+         Glean.mapD Glean.Schema.Scip.Types.Entity_cpp,
+         Glean.mapD Glean.Schema.Scip.Types.Entity_ruby,
+         Glean.mapD Glean.Schema.Scip.Types.Entity_csharp,
+         Glean.mapD Glean.Schema.Scip.Types.Entity_visualBasic,
+         Glean.mapD Glean.Schema.Scip.Types.Entity_dart,
+         Glean.mapD Glean.Schema.Scip.Types.Entity_php]
+  sourceType _
+    = Angle.NamedTy () (Angle.SourceRef "scip.Entity" (Prelude.Just 1))
+{-# LINE 1054 "glean/schema/thrift/scip_include.hs" #-}
+type instance Angle.SumFields Glean.Schema.Scip.Types.Entity =
+     'Angle.TField "rust" (Glean.Schema.Scip.Types.SomeEntity)
+       ('Angle.TField "go" (Glean.Schema.Scip.Types.SomeEntity)
+          ('Angle.TField "typescript" (Glean.Schema.Scip.Types.SomeEntity)
+             ('Angle.TField "java" (Glean.Schema.Scip.Types.SomeEntity)
+                ('Angle.TField "kotlin" (Glean.Schema.Scip.Types.SomeEntity)
+                   ('Angle.TField "swift" (Glean.Schema.Scip.Types.SomeEntity)
+                      ('Angle.TField "python" (Glean.Schema.Scip.Types.SomeEntity)
+                         ('Angle.TField "typescriptReact"
+                            (Glean.Schema.Scip.Types.SomeEntity)
+                            ('Angle.TField "javascript" (Glean.Schema.Scip.Types.SomeEntity)
+                               ('Angle.TField "javascriptReact"
+                                  (Glean.Schema.Scip.Types.SomeEntity)
+                                  ('Angle.TField "c" (Glean.Schema.Scip.Types.SomeEntity)
+                                     ('Angle.TField "cpp" (Glean.Schema.Scip.Types.SomeEntity)
+                                        ('Angle.TField "ruby" (Glean.Schema.Scip.Types.SomeEntity)
+                                           ('Angle.TField "csharp"
+                                              (Glean.Schema.Scip.Types.SomeEntity)
+                                              ('Angle.TField "visualBasic"
+                                                 (Glean.Schema.Scip.Types.SomeEntity)
+                                                 ('Angle.TField "dart"
+                                                    (Glean.Schema.Scip.Types.SomeEntity)
+                                                    ('Angle.TField "php"
+                                                       (Glean.Schema.Scip.Types.SomeEntity)
+                                                       ('Angle.TNoFields)))))))))))))))))
diff --git a/glean/schema/thrift/gen-hs2/Glean/Schema/SearchCode/Types.hs b/glean/schema/thrift/gen-hs2/Glean/Schema/SearchCode/Types.hs
--- a/glean/schema/thrift/gen-hs2/Glean/Schema/SearchCode/Types.hs
+++ b/glean/schema/thrift/gen-hs2/Glean/Schema/SearchCode/Types.hs
@@ -27,16908 +27,17717 @@
         ThriftSearchByLowerCaseName(ThriftSearchByLowerCaseName,
                                     thriftSearchByLowerCaseName_id,
                                     thriftSearchByLowerCaseName_key),
-        SearchByScopeAndKind_id,
-        SearchByScopeAndKind(SearchByScopeAndKind, searchByScopeAndKind_id,
-                             searchByScopeAndKind_key),
-        SearchByScope_id,
-        SearchByScope(SearchByScope, searchByScope_id, searchByScope_key),
-        SearchByNameKindAndLanguage_id,
-        SearchByNameKindAndLanguage(SearchByNameKindAndLanguage,
-                                    searchByNameKindAndLanguage_id,
-                                    searchByNameKindAndLanguage_key),
-        SearchByNameAndLanguage_id,
-        SearchByNameAndLanguage(SearchByNameAndLanguage,
-                                searchByNameAndLanguage_id, searchByNameAndLanguage_key),
-        SearchByLowerCaseScopeAndKind_id,
-        SearchByLowerCaseScopeAndKind(SearchByLowerCaseScopeAndKind,
-                                      searchByLowerCaseScopeAndKind_id,
-                                      searchByLowerCaseScopeAndKind_key),
-        SearchByLowerCaseScope_id,
-        SearchByLowerCaseScope(SearchByLowerCaseScope,
-                               searchByLowerCaseScope_id, searchByLowerCaseScope_key),
-        SearchByLowerCaseNameKindAndLanguage_id,
-        SearchByLowerCaseNameKindAndLanguage(SearchByLowerCaseNameKindAndLanguage,
-                                             searchByLowerCaseNameKindAndLanguage_id,
-                                             searchByLowerCaseNameKindAndLanguage_key),
-        SearchByLowerCaseNameAndLanguage_id,
-        SearchByLowerCaseNameAndLanguage(SearchByLowerCaseNameAndLanguage,
-                                         searchByLowerCaseNameAndLanguage_id,
-                                         searchByLowerCaseNameAndLanguage_key),
-        RustSearchByNameAndKind_id,
-        RustSearchByNameAndKind(RustSearchByNameAndKind,
-                                rustSearchByNameAndKind_id, rustSearchByNameAndKind_key),
-        PythonSearchByScopeAndKind_id,
-        PythonSearchByScopeAndKind(PythonSearchByScopeAndKind,
-                                   pythonSearchByScopeAndKind_id, pythonSearchByScopeAndKind_key),
-        PythonSearchByNameKindAndScopeFact_id,
-        PythonSearchByNameKindAndScopeFact(PythonSearchByNameKindAndScopeFact,
-                                           pythonSearchByNameKindAndScopeFact_id,
-                                           pythonSearchByNameKindAndScopeFact_key),
-        PythonSearchByLowerCaseScopeAndKind_id,
-        PythonSearchByLowerCaseScopeAndKind(PythonSearchByLowerCaseScopeAndKind,
-                                            pythonSearchByLowerCaseScopeAndKind_id,
-                                            pythonSearchByLowerCaseScopeAndKind_key),
-        PythonSearchByLowerCaseNameKindAndScopeFact_id,
-        PythonSearchByLowerCaseNameKindAndScopeFact(PythonSearchByLowerCaseNameKindAndScopeFact,
-                                                    pythonSearchByLowerCaseNameKindAndScopeFact_id,
-                                                    pythonSearchByLowerCaseNameKindAndScopeFact_key),
-        PythonNameLowerCase_id,
-        PythonNameLowerCase(PythonNameLowerCase, pythonNameLowerCase_id,
-                            pythonNameLowerCase_key),
-        PpSearchByNameKind_id,
-        PpSearchByNameKind(PpSearchByNameKind, ppSearchByNameKind_id,
-                           ppSearchByNameKind_key),
-        PpSearchByLowerCaseNameKind_id,
-        PpSearchByLowerCaseNameKind(PpSearchByLowerCaseNameKind,
-                                    ppSearchByLowerCaseNameKind_id,
-                                    ppSearchByLowerCaseNameKind_key),
-        LsifSearchByName_id,
-        LsifSearchByName(LsifSearchByName, lsifSearchByName_id,
-                         lsifSearchByName_key),
-        LsifSearchByLowerCaseName_id,
-        LsifSearchByLowerCaseName(LsifSearchByLowerCaseName,
-                                  lsifSearchByLowerCaseName_id, lsifSearchByLowerCaseName_key),
-        KotlinSearchByScopeWithName_id,
-        KotlinSearchByScopeWithName(KotlinSearchByScopeWithName,
-                                    kotlinSearchByScopeWithName_id,
-                                    kotlinSearchByScopeWithName_key),
-        KotlinSearchByScope_id,
-        KotlinSearchByScope(KotlinSearchByScope, kotlinSearchByScope_id,
-                            kotlinSearchByScope_key),
-        KotlinSearchByNameWithFact_id,
-        KotlinSearchByNameWithFact(KotlinSearchByNameWithFact,
-                                   kotlinSearchByNameWithFact_id, kotlinSearchByNameWithFact_key),
-        KotlinSearchByName_id,
-        KotlinSearchByName(KotlinSearchByName, kotlinSearchByName_id,
-                           kotlinSearchByName_key),
-        KotlinSearchByLowerCaseScope_id,
-        KotlinSearchByLowerCaseScope(KotlinSearchByLowerCaseScope,
-                                     kotlinSearchByLowerCaseScope_id,
-                                     kotlinSearchByLowerCaseScope_key),
-        KotlinSearchByLowerCaseName_id,
-        KotlinSearchByLowerCaseName(KotlinSearchByLowerCaseName,
-                                    kotlinSearchByLowerCaseName_id,
-                                    kotlinSearchByLowerCaseName_key),
-        JavaSearchByScopeWithName_id,
-        JavaSearchByScopeWithName(JavaSearchByScopeWithName,
-                                  javaSearchByScopeWithName_id, javaSearchByScopeWithName_key),
-        JavaSearchByScope_id,
-        JavaSearchByScope(JavaSearchByScope, javaSearchByScope_id,
-                          javaSearchByScope_key),
-        JavaSearchByNameWithFact_id,
-        JavaSearchByNameWithFact(JavaSearchByNameWithFact,
-                                 javaSearchByNameWithFact_id, javaSearchByNameWithFact_key),
-        JavaSearchByName_id,
-        JavaSearchByName(JavaSearchByName, javaSearchByName_id,
-                         javaSearchByName_key),
-        JavaSearchByLowerCaseScope_id,
-        JavaSearchByLowerCaseScope(JavaSearchByLowerCaseScope,
-                                   javaSearchByLowerCaseScope_id, javaSearchByLowerCaseScope_key),
-        JavaSearchByLowerCaseName_id,
-        JavaSearchByLowerCaseName(JavaSearchByLowerCaseName,
-                                  javaSearchByLowerCaseName_id, javaSearchByLowerCaseName_key),
-        HsSearchByName_id,
-        HsSearchByName(HsSearchByName, hsSearchByName_id,
-                       hsSearchByName_key),
-        HsSearchByLowerCaseName_id,
-        HsSearchByLowerCaseName(HsSearchByLowerCaseName,
-                                hsSearchByLowerCaseName_id, hsSearchByLowerCaseName_key),
-        HackSearchByScopeWithNameKinds_id,
-        HackSearchByScopeWithNameKinds(HackSearchByScopeWithNameKinds,
-                                       hackSearchByScopeWithNameKinds_id,
-                                       hackSearchByScopeWithNameKinds_key),
-        HackSearchByScopeAndKind_id,
-        HackSearchByScopeAndKind(HackSearchByScopeAndKind,
-                                 hackSearchByScopeAndKind_id, hackSearchByScopeAndKind_key),
-        HackSearchByNameKindWithQName_id,
-        HackSearchByNameKindWithQName(HackSearchByNameKindWithQName,
-                                      hackSearchByNameKindWithQName_id,
-                                      hackSearchByNameKindWithQName_key),
-        HackSearchByNameKindWithNamespace_id,
-        HackSearchByNameKindWithNamespace(HackSearchByNameKindWithNamespace,
-                                          hackSearchByNameKindWithNamespace_id,
-                                          hackSearchByNameKindWithNamespace_key),
-        HackSearchByNameAndKind_id,
-        HackSearchByNameAndKind(HackSearchByNameAndKind,
-                                hackSearchByNameAndKind_id, hackSearchByNameAndKind_key),
-        HackSearchByLowerCaseScopeAndKind_id,
-        HackSearchByLowerCaseScopeAndKind(HackSearchByLowerCaseScopeAndKind,
-                                          hackSearchByLowerCaseScopeAndKind_id,
-                                          hackSearchByLowerCaseScopeAndKind_key),
-        HackSearchByLowerCaseNameAndKind_id,
-        HackSearchByLowerCaseNameAndKind(HackSearchByLowerCaseNameAndKind,
-                                         hackSearchByLowerCaseNameAndKind_id,
-                                         hackSearchByLowerCaseNameAndKind_key),
-        HackNameLowerCase_id,
-        HackNameLowerCase(HackNameLowerCase, hackNameLowerCase_id,
-                          hackNameLowerCase_key),
-        GraphQLSearchByName_id,
-        GraphQLSearchByName(GraphQLSearchByName, graphQLSearchByName_id,
-                            graphQLSearchByName_key),
-        GraphQLSearchByLowerCaseName_id,
-        GraphQLSearchByLowerCaseName(GraphQLSearchByLowerCaseName,
-                                     graphQLSearchByLowerCaseName_id,
-                                     graphQLSearchByLowerCaseName_key),
-        FlowSearchByScopeAndKind_id,
-        FlowSearchByScopeAndKind(FlowSearchByScopeAndKind,
-                                 flowSearchByScopeAndKind_id, flowSearchByScopeAndKind_key),
-        FlowSearchByNameKindAndScopeFact_id,
-        FlowSearchByNameKindAndScopeFact(FlowSearchByNameKindAndScopeFact,
-                                         flowSearchByNameKindAndScopeFact_id,
-                                         flowSearchByNameKindAndScopeFact_key),
-        FlowSearchByLowerCaseScopeAndKind_id,
-        FlowSearchByLowerCaseScopeAndKind(FlowSearchByLowerCaseScopeAndKind,
-                                          flowSearchByLowerCaseScopeAndKind_id,
-                                          flowSearchByLowerCaseScopeAndKind_key),
-        FlowSearchByLowerCaseNameKindAndScopeFact_id,
-        FlowSearchByLowerCaseNameKindAndScopeFact(FlowSearchByLowerCaseNameKindAndScopeFact,
-                                                  flowSearchByLowerCaseNameKindAndScopeFact_id,
-                                                  flowSearchByLowerCaseNameKindAndScopeFact_key),
-        FlowNameLowerCase_id,
-        FlowNameLowerCase(FlowNameLowerCase, flowNameLowerCase_id,
-                          flowNameLowerCase_key),
-        FbthriftSearchByNameFact_id,
-        FbthriftSearchByNameFact(FbthriftSearchByNameFact,
-                                 fbthriftSearchByNameFact_id, fbthriftSearchByNameFact_key),
-        ErlangSearchByName_id,
-        ErlangSearchByName(ErlangSearchByName, erlangSearchByName_id,
-                           erlangSearchByName_key),
-        ErlangSearchByLowerCaseName_id,
-        ErlangSearchByLowerCaseName(ErlangSearchByLowerCaseName,
-                                    erlangSearchByLowerCaseName_id,
-                                    erlangSearchByLowerCaseName_key),
-        CxxSearchByScopeAndKind_id,
-        CxxSearchByScopeAndKind(CxxSearchByScopeAndKind,
-                                cxxSearchByScopeAndKind_id, cxxSearchByScopeAndKind_key),
-        CxxSearchByNameKindAndScopeFact_id,
-        CxxSearchByNameKindAndScopeFact(CxxSearchByNameKindAndScopeFact,
-                                        cxxSearchByNameKindAndScopeFact_id,
-                                        cxxSearchByNameKindAndScopeFact_key),
-        CxxSearchByLowerCaseScopeAndKind_id,
-        CxxSearchByLowerCaseScopeAndKind(CxxSearchByLowerCaseScopeAndKind,
-                                         cxxSearchByLowerCaseScopeAndKind_id,
-                                         cxxSearchByLowerCaseScopeAndKind_key),
-        CxxSearchByLowerCaseNameKindAndScopeFact_id,
-        CxxSearchByLowerCaseNameKindAndScopeFact(CxxSearchByLowerCaseNameKindAndScopeFact,
-                                                 cxxSearchByLowerCaseNameKindAndScopeFact_id,
-                                                 cxxSearchByLowerCaseNameKindAndScopeFact_key),
-        CxxPreferDefinitions_id,
-        CxxPreferDefinitions(CxxPreferDefinitions, cxxPreferDefinitions_id,
-                             cxxPreferDefinitions_key),
-        CxxNameLowerCase_id,
-        CxxNameLowerCase(CxxNameLowerCase, cxxNameLowerCase_id,
-                         cxxNameLowerCase_key),
-        CSharpSearchByName_id,
-        CSharpSearchByName(CSharpSearchByName, cSharpSearchByName_id,
-                           cSharpSearchByName_key),
-        CSharpSearchByLowerCaseName_id,
-        CSharpSearchByLowerCaseName(CSharpSearchByLowerCaseName,
-                                    cSharpSearchByLowerCaseName_id,
-                                    cSharpSearchByLowerCaseName_key),
-        BuckSearchByName_id,
-        BuckSearchByName(BuckSearchByName, buckSearchByName_id,
-                         buckSearchByName_key),
-        BuckSearchByLowerCaseName_id,
-        BuckSearchByLowerCaseName(BuckSearchByLowerCaseName,
-                                  buckSearchByLowerCaseName_id, buckSearchByLowerCaseName_key),
-        BuckSearchByLocalNameFact_id,
-        BuckSearchByLocalNameFact(BuckSearchByLocalNameFact,
-                                  buckSearchByLocalNameFact_id, buckSearchByLocalNameFact_key),
-        AngleSearchByName_id,
-        AngleSearchByName(AngleSearchByName, angleSearchByName_id,
-                          angleSearchByName_key),
-        AngleSearchByLowerCaseName_id,
-        AngleSearchByLowerCaseName(AngleSearchByLowerCaseName,
-                                   angleSearchByLowerCaseName_id, angleSearchByLowerCaseName_key),
-        ThriftSearchByName_key(ThriftSearchByName_key,
-                               thriftSearchByName_key_name, thriftSearchByName_key_entity),
-        ThriftSearchByLowerCaseName_key(ThriftSearchByLowerCaseName_key,
-                                        thriftSearchByLowerCaseName_key_name,
-                                        thriftSearchByLowerCaseName_key_entity),
-        SearchByScopeAndKind_key(SearchByScopeAndKind_key,
-                                 searchByScopeAndKind_key_name, searchByScopeAndKind_key_scope,
-                                 searchByScopeAndKind_key_language, searchByScopeAndKind_key_kinds,
-                                 searchByScopeAndKind_key_entity),
-        SearchByScope_key(SearchByScope_key, searchByScope_key_name,
-                          searchByScope_key_scope, searchByScope_key_language,
-                          searchByScope_key_entity),
-        SearchByNameKindAndLanguage_key(SearchByNameKindAndLanguage_key,
-                                        searchByNameKindAndLanguage_key_name,
-                                        searchByNameKindAndLanguage_key_language,
-                                        searchByNameKindAndLanguage_key_kinds,
-                                        searchByNameKindAndLanguage_key_entity),
-        SearchByNameAndLanguage_key(SearchByNameAndLanguage_key,
-                                    searchByNameAndLanguage_key_name,
-                                    searchByNameAndLanguage_key_language,
-                                    searchByNameAndLanguage_key_entity),
-        SearchByLowerCaseScopeAndKind_key(SearchByLowerCaseScopeAndKind_key,
-                                          searchByLowerCaseScopeAndKind_key_name,
-                                          searchByLowerCaseScopeAndKind_key_scope,
-                                          searchByLowerCaseScopeAndKind_key_language,
-                                          searchByLowerCaseScopeAndKind_key_kinds,
-                                          searchByLowerCaseScopeAndKind_key_entity),
-        SearchByLowerCaseScope_key(SearchByLowerCaseScope_key,
-                                   searchByLowerCaseScope_key_name,
-                                   searchByLowerCaseScope_key_scope,
-                                   searchByLowerCaseScope_key_language,
-                                   searchByLowerCaseScope_key_entity),
-        SearchByLowerCaseNameKindAndLanguage_key(SearchByLowerCaseNameKindAndLanguage_key,
-                                                 searchByLowerCaseNameKindAndLanguage_key_name,
-                                                 searchByLowerCaseNameKindAndLanguage_key_language,
-                                                 searchByLowerCaseNameKindAndLanguage_key_kinds,
-                                                 searchByLowerCaseNameKindAndLanguage_key_entity),
-        SearchByLowerCaseNameAndLanguage_key(SearchByLowerCaseNameAndLanguage_key,
-                                             searchByLowerCaseNameAndLanguage_key_name,
-                                             searchByLowerCaseNameAndLanguage_key_language,
-                                             searchByLowerCaseNameAndLanguage_key_entity),
-        RustSearchByNameAndKind_key(RustSearchByNameAndKind_key,
-                                    rustSearchByNameAndKind_key_name,
-                                    rustSearchByNameAndKind_key_kind,
-                                    rustSearchByNameAndKind_key_entity),
-        PythonSearchByScopeAndKind_key(PythonSearchByScopeAndKind_key,
-                                       pythonSearchByScopeAndKind_key_name,
-                                       pythonSearchByScopeAndKind_key_scope,
-                                       pythonSearchByScopeAndKind_key_kinds,
-                                       pythonSearchByScopeAndKind_key_entity),
-        PythonSearchByNameKindAndScopeFact_key(PythonSearchByNameKindAndScopeFact_key,
-                                               pythonSearchByNameKindAndScopeFact_key_name,
-                                               pythonSearchByNameKindAndScopeFact_key_scope,
-                                               pythonSearchByNameKindAndScopeFact_key_kinds,
-                                               pythonSearchByNameKindAndScopeFact_key_entity),
-        PythonSearchByLowerCaseScopeAndKind_key(PythonSearchByLowerCaseScopeAndKind_key,
-                                                pythonSearchByLowerCaseScopeAndKind_key_name,
-                                                pythonSearchByLowerCaseScopeAndKind_key_scope,
-                                                pythonSearchByLowerCaseScopeAndKind_key_kinds,
-                                                pythonSearchByLowerCaseScopeAndKind_key_entity),
-        PythonSearchByLowerCaseNameKindAndScopeFact_key(PythonSearchByLowerCaseNameKindAndScopeFact_key,
-                                                        pythonSearchByLowerCaseNameKindAndScopeFact_key_name,
-                                                        pythonSearchByLowerCaseNameKindAndScopeFact_key_scope,
-                                                        pythonSearchByLowerCaseNameKindAndScopeFact_key_kinds,
-                                                        pythonSearchByLowerCaseNameKindAndScopeFact_key_entity),
-        PythonNameLowerCase_key(PythonNameLowerCase_key,
-                                pythonNameLowerCase_key_nameLowercase,
-                                pythonNameLowerCase_key_kinds, pythonNameLowerCase_key_name),
-        PpSearchByNameKind_key(PpSearchByNameKind_key,
-                               ppSearchByNameKind_key_name, ppSearchByNameKind_key_kinds,
-                               ppSearchByNameKind_key_entity),
-        PpSearchByLowerCaseNameKind_key(PpSearchByLowerCaseNameKind_key,
-                                        ppSearchByLowerCaseNameKind_key_name,
-                                        ppSearchByLowerCaseNameKind_key_kinds,
-                                        ppSearchByLowerCaseNameKind_key_entity),
-        LsifSearchByName_key(LsifSearchByName_key,
-                             lsifSearchByName_key_name, lsifSearchByName_key_entity),
-        LsifSearchByLowerCaseName_key(LsifSearchByLowerCaseName_key,
-                                      lsifSearchByLowerCaseName_key_name,
-                                      lsifSearchByLowerCaseName_key_entity),
-        KotlinSearchByScopeWithName_key(KotlinSearchByScopeWithName_key,
-                                        kotlinSearchByScopeWithName_key_name,
-                                        kotlinSearchByScopeWithName_key_insensitive,
-                                        kotlinSearchByScopeWithName_key_scope,
-                                        kotlinSearchByScopeWithName_key_entity),
-        KotlinSearchByScope_key(KotlinSearchByScope_key,
-                                kotlinSearchByScope_key_name, kotlinSearchByScope_key_scope,
-                                kotlinSearchByScope_key_entity),
-        KotlinSearchByNameWithFact_key(KotlinSearchByNameWithFact_key,
-                                       kotlinSearchByNameWithFact_key_name,
-                                       kotlinSearchByNameWithFact_key_entity),
-        KotlinSearchByName_key(KotlinSearchByName_key,
-                               kotlinSearchByName_key_name, kotlinSearchByName_key_entity),
-        KotlinSearchByLowerCaseScope_key(KotlinSearchByLowerCaseScope_key,
-                                         kotlinSearchByLowerCaseScope_key_name,
-                                         kotlinSearchByLowerCaseScope_key_scope,
-                                         kotlinSearchByLowerCaseScope_key_entity),
-        KotlinSearchByLowerCaseName_key(KotlinSearchByLowerCaseName_key,
-                                        kotlinSearchByLowerCaseName_key_name,
-                                        kotlinSearchByLowerCaseName_key_entity),
-        JavaSearchByScopeWithName_key(JavaSearchByScopeWithName_key,
-                                      javaSearchByScopeWithName_key_name,
-                                      javaSearchByScopeWithName_key_insensitive,
-                                      javaSearchByScopeWithName_key_scope,
-                                      javaSearchByScopeWithName_key_entity),
-        JavaSearchByScope_key(JavaSearchByScope_key,
-                              javaSearchByScope_key_name, javaSearchByScope_key_scope,
-                              javaSearchByScope_key_entity),
-        JavaSearchByNameWithFact_key(JavaSearchByNameWithFact_key,
-                                     javaSearchByNameWithFact_key_name,
-                                     javaSearchByNameWithFact_key_entity),
-        JavaSearchByName_key(JavaSearchByName_key,
-                             javaSearchByName_key_name, javaSearchByName_key_entity),
-        JavaSearchByLowerCaseScope_key(JavaSearchByLowerCaseScope_key,
-                                       javaSearchByLowerCaseScope_key_name,
-                                       javaSearchByLowerCaseScope_key_scope,
-                                       javaSearchByLowerCaseScope_key_entity),
-        JavaSearchByLowerCaseName_key(JavaSearchByLowerCaseName_key,
-                                      javaSearchByLowerCaseName_key_name,
-                                      javaSearchByLowerCaseName_key_entity),
-        HsSearchByName_key(HsSearchByName_key, hsSearchByName_key_name,
-                           hsSearchByName_key_entity),
-        HsSearchByLowerCaseName_key(HsSearchByLowerCaseName_key,
-                                    hsSearchByLowerCaseName_key_name,
-                                    hsSearchByLowerCaseName_key_entity),
-        HackSearchByScopeWithNameKinds_key(HackSearchByScopeWithNameKinds_key,
-                                           hackSearchByScopeWithNameKinds_key_name,
-                                           hackSearchByScopeWithNameKinds_key_insensitive,
-                                           hackSearchByScopeWithNameKinds_key_scope,
-                                           hackSearchByScopeWithNameKinds_key_kinds,
-                                           hackSearchByScopeWithNameKinds_key_entity),
-        HackSearchByScopeAndKind_key(HackSearchByScopeAndKind_key,
-                                     hackSearchByScopeAndKind_key_name,
-                                     hackSearchByScopeAndKind_key_scope,
-                                     hackSearchByScopeAndKind_key_kinds,
-                                     hackSearchByScopeAndKind_key_entity),
-        HackSearchByNameKindWithQName_key(HackSearchByNameKindWithQName_key,
-                                          hackSearchByNameKindWithQName_key_name,
-                                          hackSearchByNameKindWithQName_key_scope,
-                                          hackSearchByNameKindWithQName_key_scopeNamespace,
-                                          hackSearchByNameKindWithQName_key_kinds,
-                                          hackSearchByNameKindWithQName_key_entity),
-        HackSearchByNameKindWithNamespace_key(HackSearchByNameKindWithNamespace_key,
-                                              hackSearchByNameKindWithNamespace_key_name,
-                                              hackSearchByNameKindWithNamespace_key_scope,
-                                              hackSearchByNameKindWithNamespace_key_kinds,
-                                              hackSearchByNameKindWithNamespace_key_entity),
-        HackSearchByNameAndKind_key(HackSearchByNameAndKind_key,
-                                    hackSearchByNameAndKind_key_name,
-                                    hackSearchByNameAndKind_key_kinds,
-                                    hackSearchByNameAndKind_key_entity),
-        HackSearchByLowerCaseScopeAndKind_key(HackSearchByLowerCaseScopeAndKind_key,
-                                              hackSearchByLowerCaseScopeAndKind_key_name,
-                                              hackSearchByLowerCaseScopeAndKind_key_scope,
-                                              hackSearchByLowerCaseScopeAndKind_key_kinds,
-                                              hackSearchByLowerCaseScopeAndKind_key_entity),
-        HackSearchByLowerCaseNameAndKind_key(HackSearchByLowerCaseNameAndKind_key,
-                                             hackSearchByLowerCaseNameAndKind_key_name,
-                                             hackSearchByLowerCaseNameAndKind_key_kinds,
-                                             hackSearchByLowerCaseNameAndKind_key_entity),
-        HackNameLowerCase_key(HackNameLowerCase_key,
-                              hackNameLowerCase_key_nameLowercase, hackNameLowerCase_key_kinds,
-                              hackNameLowerCase_key_name),
-        GraphQLSearchByName_key(GraphQLSearchByName_key,
-                                graphQLSearchByName_key_name, graphQLSearchByName_key_entity),
-        GraphQLSearchByLowerCaseName_key(GraphQLSearchByLowerCaseName_key,
-                                         graphQLSearchByLowerCaseName_key_name,
-                                         graphQLSearchByLowerCaseName_key_entity),
-        FlowSearchByScopeAndKind_key(FlowSearchByScopeAndKind_key,
-                                     flowSearchByScopeAndKind_key_name,
-                                     flowSearchByScopeAndKind_key_scope,
-                                     flowSearchByScopeAndKind_key_kinds,
-                                     flowSearchByScopeAndKind_key_entity),
-        FlowSearchByNameKindAndScopeFact_key(FlowSearchByNameKindAndScopeFact_key,
-                                             flowSearchByNameKindAndScopeFact_key_name,
-                                             flowSearchByNameKindAndScopeFact_key_scope,
-                                             flowSearchByNameKindAndScopeFact_key_kinds,
-                                             flowSearchByNameKindAndScopeFact_key_entity),
-        FlowSearchByLowerCaseScopeAndKind_key(FlowSearchByLowerCaseScopeAndKind_key,
-                                              flowSearchByLowerCaseScopeAndKind_key_name,
-                                              flowSearchByLowerCaseScopeAndKind_key_scope,
-                                              flowSearchByLowerCaseScopeAndKind_key_kinds,
-                                              flowSearchByLowerCaseScopeAndKind_key_entity),
-        FlowSearchByLowerCaseNameKindAndScopeFact_key(FlowSearchByLowerCaseNameKindAndScopeFact_key,
-                                                      flowSearchByLowerCaseNameKindAndScopeFact_key_name,
-                                                      flowSearchByLowerCaseNameKindAndScopeFact_key_scope,
-                                                      flowSearchByLowerCaseNameKindAndScopeFact_key_kinds,
-                                                      flowSearchByLowerCaseNameKindAndScopeFact_key_entity),
-        FlowNameLowerCase_key(FlowNameLowerCase_key,
-                              flowNameLowerCase_key_nameLowercase, flowNameLowerCase_key_kinds,
-                              flowNameLowerCase_key_name),
-        FbthriftSearchByNameFact_key(FbthriftSearchByNameFact_key,
-                                     fbthriftSearchByNameFact_key_name,
-                                     fbthriftSearchByNameFact_key_entity),
-        ErlangSearchByName_key(ErlangSearchByName_key,
-                               erlangSearchByName_key_name, erlangSearchByName_key_entity),
-        ErlangSearchByLowerCaseName_key(ErlangSearchByLowerCaseName_key,
-                                        erlangSearchByLowerCaseName_key_name,
-                                        erlangSearchByLowerCaseName_key_entity),
-        CxxSearchByScopeAndKind_key(CxxSearchByScopeAndKind_key,
-                                    cxxSearchByScopeAndKind_key_name,
-                                    cxxSearchByScopeAndKind_key_scope,
-                                    cxxSearchByScopeAndKind_key_kinds,
-                                    cxxSearchByScopeAndKind_key_entity),
-        CxxSearchByNameKindAndScopeFact_key(CxxSearchByNameKindAndScopeFact_key,
-                                            cxxSearchByNameKindAndScopeFact_key_name,
-                                            cxxSearchByNameKindAndScopeFact_key_scope,
-                                            cxxSearchByNameKindAndScopeFact_key_kinds,
-                                            cxxSearchByNameKindAndScopeFact_key_entity),
-        CxxSearchByLowerCaseScopeAndKind_key(CxxSearchByLowerCaseScopeAndKind_key,
-                                             cxxSearchByLowerCaseScopeAndKind_key_name,
-                                             cxxSearchByLowerCaseScopeAndKind_key_scope,
-                                             cxxSearchByLowerCaseScopeAndKind_key_kinds,
-                                             cxxSearchByLowerCaseScopeAndKind_key_entity),
-        CxxSearchByLowerCaseNameKindAndScopeFact_key(CxxSearchByLowerCaseNameKindAndScopeFact_key,
-                                                     cxxSearchByLowerCaseNameKindAndScopeFact_key_name,
-                                                     cxxSearchByLowerCaseNameKindAndScopeFact_key_scope,
-                                                     cxxSearchByLowerCaseNameKindAndScopeFact_key_kinds,
-                                                     cxxSearchByLowerCaseNameKindAndScopeFact_key_entity),
-        CxxPreferDefinitions_key(CxxPreferDefinitions_key,
-                                 cxxPreferDefinitions_key_from, cxxPreferDefinitions_key_to),
-        CxxNameLowerCase_key(CxxNameLowerCase_key,
-                             cxxNameLowerCase_key_nameLowercase, cxxNameLowerCase_key_kinds,
-                             cxxNameLowerCase_key_name),
-        CSharpSearchByName_key(CSharpSearchByName_key,
-                               cSharpSearchByName_key_name, cSharpSearchByName_key_entity),
-        CSharpSearchByLowerCaseName_key(CSharpSearchByLowerCaseName_key,
-                                        cSharpSearchByLowerCaseName_key_name,
-                                        cSharpSearchByLowerCaseName_key_entity),
-        BuckSearchByName_key(BuckSearchByName_key,
-                             buckSearchByName_key_name, buckSearchByName_key_entity),
-        BuckSearchByLowerCaseName_key(BuckSearchByLowerCaseName_key,
-                                      buckSearchByLowerCaseName_key_name,
-                                      buckSearchByLowerCaseName_key_entity),
-        BuckSearchByLocalNameFact_key(BuckSearchByLocalNameFact_key,
-                                      buckSearchByLocalNameFact_key_name,
-                                      buckSearchByLocalNameFact_key_entity),
-        AngleSearchByName_key(AngleSearchByName_key,
-                              angleSearchByName_key_name, angleSearchByName_key_entity),
-        AngleSearchByLowerCaseName_key(AngleSearchByLowerCaseName_key,
-                                       angleSearchByLowerCaseName_key_name,
-                                       angleSearchByLowerCaseName_key_entity))
-       where
-import qualified Control.DeepSeq as DeepSeq
-import qualified Control.Monad as Monad
-import qualified Control.Monad.ST.Trans as ST
-import qualified Control.Monad.Trans.Class as Trans
-import qualified Data.Aeson as Aeson
-import qualified Data.Aeson.Types as Aeson
-import qualified Data.Default as Default
-import qualified Data.HashMap.Strict as HashMap
-import qualified Data.Hashable as Hashable
-import qualified Data.Int as Int
-import qualified Data.List as List
-import qualified Data.Map.Strict as Map
-import qualified Data.Ord as Ord
-import qualified Data.Text as Text
-import qualified Data.Text.Encoding as Text
-import qualified Facebook.Thrift.Annotation.Thrift.Thrift.Types
-       as Facebook.Thrift.Annotation.Thrift.Thrift
-import qualified Glean.Schema.Buck.Types as Glean.Schema.Buck
-import qualified Glean.Schema.Builtin.Types as Glean.Schema.Builtin
-import qualified Glean.Schema.Code.Types as Glean.Schema.Code
-import qualified Glean.Schema.CodeCxx.Types as Glean.Schema.CodeCxx
-import qualified Glean.Schema.CodemarkupTypes.Types
-       as Glean.Schema.CodemarkupTypes
-import qualified Glean.Schema.Cxx1.Types as Glean.Schema.Cxx1
-import qualified Glean.Schema.Fbthrift.Types
-       as Glean.Schema.Fbthrift
-import qualified Glean.Schema.Flow.Types as Glean.Schema.Flow
-import qualified Glean.Schema.Hack.Types as Glean.Schema.Hack
-import qualified Glean.Schema.JavakotlinAlpha.Types
-       as Glean.Schema.JavakotlinAlpha
-import qualified Glean.Schema.Python.Types as Glean.Schema.Python
-import qualified Glean.Types as Glean
-import qualified Prelude as Prelude
-import qualified Rust.Types as Rust
-import qualified Thrift.Binary.Parser as Parser
-import qualified Thrift.CodegenTypesOnly as Thrift
-import Control.Applicative ((<|>), (*>), (<*))
-import Data.Aeson ((.:), (.:?), (.=), (.!=))
-import Data.Monoid ((<>))
-import Prelude ((.), (<$>), (<*>), (>>=), (==), (/=), (<), (++))
-{-# LINE 5 "glean/schema/thrift/search_code_include.hs" #-}
-import qualified Data.ByteString
-{-# LINE 6 "glean/schema/thrift/search_code_include.hs" #-}
-import qualified Data.Default
-{-# LINE 7 "glean/schema/thrift/search_code_include.hs" #-}
-import qualified Data.Text
-{-# LINE 9 "glean/schema/thrift/search_code_include.hs" #-}
-import qualified Glean.Types as Glean
-{-# LINE 10 "glean/schema/thrift/search_code_include.hs" #-}
-import qualified Glean.Typed as Glean
-{-# LINE 11 "glean/schema/thrift/search_code_include.hs" #-}
-import qualified Glean.Query.Angle as Angle
-{-# LINE 12 "glean/schema/thrift/search_code_include.hs" #-}
-import qualified Glean.Angle.Types as Angle
-{-# LINE 14 "glean/schema/thrift/search_code_include.hs" #-}
-import qualified Glean.Schema.Buck.Types
-{-# LINE 15 "glean/schema/thrift/search_code_include.hs" #-}
-import qualified Glean.Schema.Builtin.Types
-{-# LINE 16 "glean/schema/thrift/search_code_include.hs" #-}
-import qualified Glean.Schema.Code.Types
-{-# LINE 17 "glean/schema/thrift/search_code_include.hs" #-}
-import qualified Glean.Schema.CodeCxx.Types
-{-# LINE 18 "glean/schema/thrift/search_code_include.hs" #-}
-import qualified Glean.Schema.CodemarkupTypes.Types
-{-# LINE 19 "glean/schema/thrift/search_code_include.hs" #-}
-import qualified Glean.Schema.Cxx1.Types
-{-# LINE 20 "glean/schema/thrift/search_code_include.hs" #-}
-import qualified Glean.Schema.Fbthrift.Types
-{-# LINE 21 "glean/schema/thrift/search_code_include.hs" #-}
-import qualified Glean.Schema.Flow.Types
-{-# LINE 22 "glean/schema/thrift/search_code_include.hs" #-}
-import qualified Glean.Schema.Hack.Types
-{-# LINE 23 "glean/schema/thrift/search_code_include.hs" #-}
-import qualified Glean.Schema.JavakotlinAlpha.Types
-{-# LINE 24 "glean/schema/thrift/search_code_include.hs" #-}
-import qualified Glean.Schema.Python.Types
-{-# LINE 563 ".build/def/codegen/thrift-schema-hs/glean/schema/thrift/gen-hs2/Glean/Schema/SearchCode/Types.hs" #-}
-
-pREDICATE_VERSIONS :: Map.Map Text.Text Int.Int64
-pREDICATE_VERSIONS
-  = Map.fromList
-      [("BuckSearchByName", 16), ("BuckSearchByLowerCaseName", 16),
-       ("HackSearchByNameKindWithNamespace", 16),
-       ("CxxNameLowerCase", 16), ("JavaSearchByScope", 16),
-       ("KotlinSearchByNameWithFact", 16),
-       ("KotlinSearchByLowerCaseName", 16),
-       ("PythonSearchByLowerCaseScopeAndKind", 16),
-       ("KotlinSearchByScopeWithName", 16),
-       ("BuckSearchByLocalNameFact", 16),
-       ("SearchByLowerCaseScopeAndKind", 16),
-       ("HackSearchByNameKindWithQName", 16),
-       ("FlowSearchByLowerCaseScopeAndKind", 16),
-       ("PythonSearchByScopeAndKind", 16),
-       ("HsSearchByLowerCaseName", 16), ("CxxPreferDefinitions", 16),
-       ("KotlinSearchByScope", 16), ("AngleSearchByName", 16),
-       ("SearchByScope", 16), ("CxxSearchByScopeAndKind", 16),
-       ("CSharpSearchByLowerCaseName", 16), ("LsifSearchByName", 16),
-       ("HackNameLowerCase", 16), ("FlowSearchByScopeAndKind", 16),
-       ("CSharpSearchByName", 16), ("ThriftSearchByName", 16),
-       ("JavaSearchByScopeWithName", 16),
-       ("CxxSearchByLowerCaseNameKindAndScopeFact", 16),
-       ("HackSearchByNameAndKind", 16), ("FbthriftSearchByNameFact", 16),
-       ("ErlangSearchByName", 16), ("SearchByNameKindAndLanguage", 16),
-       ("HackSearchByScopeAndKind", 16),
-       ("CxxSearchByLowerCaseScopeAndKind", 16),
-       ("PpSearchByLowerCaseNameKind", 16),
-       ("SearchByLowerCaseNameAndLanguage", 16),
-       ("KotlinSearchByName", 16), ("AngleSearchByLowerCaseName", 16),
-       ("KotlinSearchByLowerCaseScope", 16),
-       ("JavaSearchByLowerCaseName", 16),
-       ("LsifSearchByLowerCaseName", 16), ("SearchByScopeAndKind", 16),
-       ("SearchByLowerCaseNameKindAndLanguage", 16),
-       ("FlowNameLowerCase", 16), ("HackSearchByScopeWithNameKinds", 16),
-       ("HsSearchByName", 16), ("HackSearchByLowerCaseScopeAndKind", 16),
-       ("SearchByNameAndLanguage", 16),
-       ("FlowSearchByNameKindAndScopeFact", 16),
-       ("PythonSearchByLowerCaseNameKindAndScopeFact", 16),
-       ("CxxSearchByNameKindAndScopeFact", 16),
-       ("FlowSearchByLowerCaseNameKindAndScopeFact", 16),
-       ("RustSearchByNameAndKind", 16), ("PythonNameLowerCase", 16),
-       ("JavaSearchByNameWithFact", 16),
-       ("JavaSearchByLowerCaseScope", 16), ("SearchByLowerCaseScope", 16),
-       ("HackSearchByLowerCaseNameAndKind", 16),
-       ("PpSearchByNameKind", 16), ("JavaSearchByName", 16),
-       ("ThriftSearchByLowerCaseName", 16),
-       ("GraphQLSearchByLowerCaseName", 16),
-       ("ErlangSearchByLowerCaseName", 16),
-       ("PythonSearchByNameKindAndScopeFact", 16),
-       ("GraphQLSearchByName", 16)]
-
-type ThriftSearchByName_id = Glean.Id
-
-data ThriftSearchByName = ThriftSearchByName{thriftSearchByName_id
-                                             :: {-# UNPACK #-} !ThriftSearchByName_id,
-                                             thriftSearchByName_key ::
-                                             Prelude.Maybe ThriftSearchByName_key}
-                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ThriftSearchByName where
-  toJSON (ThriftSearchByName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct ThriftSearchByName where
-  buildStruct _proxy (ThriftSearchByName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (ThriftSearchByName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData ThriftSearchByName where
-  rnf (ThriftSearchByName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default ThriftSearchByName where
-  def = ThriftSearchByName Default.def Prelude.Nothing
-
-instance Hashable.Hashable ThriftSearchByName where
-  hashWithSalt __salt (ThriftSearchByName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type ThriftSearchByLowerCaseName_id = Glean.Id
-
-data ThriftSearchByLowerCaseName = ThriftSearchByLowerCaseName{thriftSearchByLowerCaseName_id
-                                                               ::
-                                                               {-# UNPACK #-} !ThriftSearchByLowerCaseName_id,
-                                                               thriftSearchByLowerCaseName_key ::
-                                                               Prelude.Maybe
-                                                                 ThriftSearchByLowerCaseName_key}
-                                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ThriftSearchByLowerCaseName where
-  toJSON (ThriftSearchByLowerCaseName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct ThriftSearchByLowerCaseName where
-  buildStruct _proxy
-    (ThriftSearchByLowerCaseName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (ThriftSearchByLowerCaseName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData ThriftSearchByLowerCaseName where
-  rnf (ThriftSearchByLowerCaseName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default ThriftSearchByLowerCaseName where
-  def = ThriftSearchByLowerCaseName Default.def Prelude.Nothing
-
-instance Hashable.Hashable ThriftSearchByLowerCaseName where
-  hashWithSalt __salt (ThriftSearchByLowerCaseName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type SearchByScopeAndKind_id = Glean.Id
-
-data SearchByScopeAndKind = SearchByScopeAndKind{searchByScopeAndKind_id
-                                                 :: {-# UNPACK #-} !SearchByScopeAndKind_id,
-                                                 searchByScopeAndKind_key ::
-                                                 Prelude.Maybe SearchByScopeAndKind_key}
-                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchByScopeAndKind where
-  toJSON (SearchByScopeAndKind __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchByScopeAndKind where
-  buildStruct _proxy (SearchByScopeAndKind __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (SearchByScopeAndKind __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchByScopeAndKind where
-  rnf (SearchByScopeAndKind __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default SearchByScopeAndKind where
-  def = SearchByScopeAndKind Default.def Prelude.Nothing
-
-instance Hashable.Hashable SearchByScopeAndKind where
-  hashWithSalt __salt (SearchByScopeAndKind _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type SearchByScope_id = Glean.Id
-
-data SearchByScope = SearchByScope{searchByScope_id ::
-                                   {-# UNPACK #-} !SearchByScope_id,
-                                   searchByScope_key :: Prelude.Maybe SearchByScope_key}
-                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchByScope where
-  toJSON (SearchByScope __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchByScope where
-  buildStruct _proxy (SearchByScope __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (SearchByScope __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchByScope where
-  rnf (SearchByScope __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default SearchByScope where
-  def = SearchByScope Default.def Prelude.Nothing
-
-instance Hashable.Hashable SearchByScope where
-  hashWithSalt __salt (SearchByScope _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type SearchByNameKindAndLanguage_id = Glean.Id
-
-data SearchByNameKindAndLanguage = SearchByNameKindAndLanguage{searchByNameKindAndLanguage_id
-                                                               ::
-                                                               {-# UNPACK #-} !SearchByNameKindAndLanguage_id,
-                                                               searchByNameKindAndLanguage_key ::
-                                                               Prelude.Maybe
-                                                                 SearchByNameKindAndLanguage_key}
-                                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchByNameKindAndLanguage where
-  toJSON (SearchByNameKindAndLanguage __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchByNameKindAndLanguage where
-  buildStruct _proxy
-    (SearchByNameKindAndLanguage __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (SearchByNameKindAndLanguage __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchByNameKindAndLanguage where
-  rnf (SearchByNameKindAndLanguage __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default SearchByNameKindAndLanguage where
-  def = SearchByNameKindAndLanguage Default.def Prelude.Nothing
-
-instance Hashable.Hashable SearchByNameKindAndLanguage where
-  hashWithSalt __salt (SearchByNameKindAndLanguage _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type SearchByNameAndLanguage_id = Glean.Id
-
-data SearchByNameAndLanguage = SearchByNameAndLanguage{searchByNameAndLanguage_id
-                                                       ::
-                                                       {-# UNPACK #-} !SearchByNameAndLanguage_id,
-                                                       searchByNameAndLanguage_key ::
-                                                       Prelude.Maybe SearchByNameAndLanguage_key}
-                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchByNameAndLanguage where
-  toJSON (SearchByNameAndLanguage __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchByNameAndLanguage where
-  buildStruct _proxy
-    (SearchByNameAndLanguage __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (SearchByNameAndLanguage __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchByNameAndLanguage where
-  rnf (SearchByNameAndLanguage __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default SearchByNameAndLanguage where
-  def = SearchByNameAndLanguage Default.def Prelude.Nothing
-
-instance Hashable.Hashable SearchByNameAndLanguage where
-  hashWithSalt __salt (SearchByNameAndLanguage _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type SearchByLowerCaseScopeAndKind_id = Glean.Id
-
-data SearchByLowerCaseScopeAndKind = SearchByLowerCaseScopeAndKind{searchByLowerCaseScopeAndKind_id
-                                                                   ::
-                                                                   {-# UNPACK #-} !SearchByLowerCaseScopeAndKind_id,
-                                                                   searchByLowerCaseScopeAndKind_key
-                                                                   ::
-                                                                   Prelude.Maybe
-                                                                     SearchByLowerCaseScopeAndKind_key}
-                                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchByLowerCaseScopeAndKind where
-  toJSON (SearchByLowerCaseScopeAndKind __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchByLowerCaseScopeAndKind where
-  buildStruct _proxy
-    (SearchByLowerCaseScopeAndKind __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (SearchByLowerCaseScopeAndKind __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchByLowerCaseScopeAndKind where
-  rnf (SearchByLowerCaseScopeAndKind __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default SearchByLowerCaseScopeAndKind where
-  def = SearchByLowerCaseScopeAndKind Default.def Prelude.Nothing
-
-instance Hashable.Hashable SearchByLowerCaseScopeAndKind where
-  hashWithSalt __salt (SearchByLowerCaseScopeAndKind _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type SearchByLowerCaseScope_id = Glean.Id
-
-data SearchByLowerCaseScope = SearchByLowerCaseScope{searchByLowerCaseScope_id
-                                                     :: {-# UNPACK #-} !SearchByLowerCaseScope_id,
-                                                     searchByLowerCaseScope_key ::
-                                                     Prelude.Maybe SearchByLowerCaseScope_key}
-                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchByLowerCaseScope where
-  toJSON (SearchByLowerCaseScope __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchByLowerCaseScope where
-  buildStruct _proxy
-    (SearchByLowerCaseScope __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (SearchByLowerCaseScope __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchByLowerCaseScope where
-  rnf (SearchByLowerCaseScope __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default SearchByLowerCaseScope where
-  def = SearchByLowerCaseScope Default.def Prelude.Nothing
-
-instance Hashable.Hashable SearchByLowerCaseScope where
-  hashWithSalt __salt (SearchByLowerCaseScope _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type SearchByLowerCaseNameKindAndLanguage_id = Glean.Id
-
-data SearchByLowerCaseNameKindAndLanguage = SearchByLowerCaseNameKindAndLanguage{searchByLowerCaseNameKindAndLanguage_id
-                                                                                 ::
-                                                                                 {-# UNPACK #-} !SearchByLowerCaseNameKindAndLanguage_id,
-                                                                                 searchByLowerCaseNameKindAndLanguage_key
-                                                                                 ::
-                                                                                 Prelude.Maybe
-                                                                                   SearchByLowerCaseNameKindAndLanguage_key}
-                                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchByLowerCaseNameKindAndLanguage where
-  toJSON
-    (SearchByLowerCaseNameKindAndLanguage __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchByLowerCaseNameKindAndLanguage
-         where
-  buildStruct _proxy
-    (SearchByLowerCaseNameKindAndLanguage __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (SearchByLowerCaseNameKindAndLanguage __val__id
-                                                  __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchByLowerCaseNameKindAndLanguage where
-  rnf (SearchByLowerCaseNameKindAndLanguage __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default SearchByLowerCaseNameKindAndLanguage where
-  def
-    = SearchByLowerCaseNameKindAndLanguage Default.def Prelude.Nothing
-
-instance Hashable.Hashable SearchByLowerCaseNameKindAndLanguage
-         where
-  hashWithSalt __salt (SearchByLowerCaseNameKindAndLanguage _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type SearchByLowerCaseNameAndLanguage_id = Glean.Id
-
-data SearchByLowerCaseNameAndLanguage = SearchByLowerCaseNameAndLanguage{searchByLowerCaseNameAndLanguage_id
-                                                                         ::
-                                                                         {-# UNPACK #-} !SearchByLowerCaseNameAndLanguage_id,
-                                                                         searchByLowerCaseNameAndLanguage_key
-                                                                         ::
-                                                                         Prelude.Maybe
-                                                                           SearchByLowerCaseNameAndLanguage_key}
-                                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchByLowerCaseNameAndLanguage where
-  toJSON (SearchByLowerCaseNameAndLanguage __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchByLowerCaseNameAndLanguage where
-  buildStruct _proxy
-    (SearchByLowerCaseNameAndLanguage __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (SearchByLowerCaseNameAndLanguage __val__id
-                                                  __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchByLowerCaseNameAndLanguage where
-  rnf (SearchByLowerCaseNameAndLanguage __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default SearchByLowerCaseNameAndLanguage where
-  def = SearchByLowerCaseNameAndLanguage Default.def Prelude.Nothing
-
-instance Hashable.Hashable SearchByLowerCaseNameAndLanguage where
-  hashWithSalt __salt (SearchByLowerCaseNameAndLanguage _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type RustSearchByNameAndKind_id = Glean.Id
-
-data RustSearchByNameAndKind = RustSearchByNameAndKind{rustSearchByNameAndKind_id
-                                                       ::
-                                                       {-# UNPACK #-} !RustSearchByNameAndKind_id,
-                                                       rustSearchByNameAndKind_key ::
-                                                       Prelude.Maybe RustSearchByNameAndKind_key}
-                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON RustSearchByNameAndKind where
-  toJSON (RustSearchByNameAndKind __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct RustSearchByNameAndKind where
-  buildStruct _proxy
-    (RustSearchByNameAndKind __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (RustSearchByNameAndKind __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData RustSearchByNameAndKind where
-  rnf (RustSearchByNameAndKind __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default RustSearchByNameAndKind where
-  def = RustSearchByNameAndKind Default.def Prelude.Nothing
-
-instance Hashable.Hashable RustSearchByNameAndKind where
-  hashWithSalt __salt (RustSearchByNameAndKind _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type PythonSearchByScopeAndKind_id = Glean.Id
-
-data PythonSearchByScopeAndKind = PythonSearchByScopeAndKind{pythonSearchByScopeAndKind_id
-                                                             ::
-                                                             {-# UNPACK #-} !PythonSearchByScopeAndKind_id,
-                                                             pythonSearchByScopeAndKind_key ::
-                                                             Prelude.Maybe
-                                                               PythonSearchByScopeAndKind_key}
-                                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON PythonSearchByScopeAndKind where
-  toJSON (PythonSearchByScopeAndKind __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct PythonSearchByScopeAndKind where
-  buildStruct _proxy
-    (PythonSearchByScopeAndKind __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (PythonSearchByScopeAndKind __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData PythonSearchByScopeAndKind where
-  rnf (PythonSearchByScopeAndKind __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default PythonSearchByScopeAndKind where
-  def = PythonSearchByScopeAndKind Default.def Prelude.Nothing
-
-instance Hashable.Hashable PythonSearchByScopeAndKind where
-  hashWithSalt __salt (PythonSearchByScopeAndKind _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type PythonSearchByNameKindAndScopeFact_id = Glean.Id
-
-data PythonSearchByNameKindAndScopeFact = PythonSearchByNameKindAndScopeFact{pythonSearchByNameKindAndScopeFact_id
-                                                                             ::
-                                                                             {-# UNPACK #-} !PythonSearchByNameKindAndScopeFact_id,
-                                                                             pythonSearchByNameKindAndScopeFact_key
-                                                                             ::
-                                                                             Prelude.Maybe
-                                                                               PythonSearchByNameKindAndScopeFact_key}
-                                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON PythonSearchByNameKindAndScopeFact where
-  toJSON
-    (PythonSearchByNameKindAndScopeFact __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct PythonSearchByNameKindAndScopeFact
-         where
-  buildStruct _proxy
-    (PythonSearchByNameKindAndScopeFact __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (PythonSearchByNameKindAndScopeFact __val__id
-                                                  __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData PythonSearchByNameKindAndScopeFact where
-  rnf (PythonSearchByNameKindAndScopeFact __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default PythonSearchByNameKindAndScopeFact where
-  def
-    = PythonSearchByNameKindAndScopeFact Default.def Prelude.Nothing
-
-instance Hashable.Hashable PythonSearchByNameKindAndScopeFact where
-  hashWithSalt __salt (PythonSearchByNameKindAndScopeFact _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type PythonSearchByLowerCaseScopeAndKind_id = Glean.Id
-
-data PythonSearchByLowerCaseScopeAndKind = PythonSearchByLowerCaseScopeAndKind{pythonSearchByLowerCaseScopeAndKind_id
-                                                                               ::
-                                                                               {-# UNPACK #-} !PythonSearchByLowerCaseScopeAndKind_id,
-                                                                               pythonSearchByLowerCaseScopeAndKind_key
-                                                                               ::
-                                                                               Prelude.Maybe
-                                                                                 PythonSearchByLowerCaseScopeAndKind_key}
-                                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON PythonSearchByLowerCaseScopeAndKind where
-  toJSON
-    (PythonSearchByLowerCaseScopeAndKind __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct PythonSearchByLowerCaseScopeAndKind
-         where
-  buildStruct _proxy
-    (PythonSearchByLowerCaseScopeAndKind __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (PythonSearchByLowerCaseScopeAndKind __val__id
-                                                  __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData PythonSearchByLowerCaseScopeAndKind where
-  rnf (PythonSearchByLowerCaseScopeAndKind __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default PythonSearchByLowerCaseScopeAndKind where
-  def
-    = PythonSearchByLowerCaseScopeAndKind Default.def Prelude.Nothing
-
-instance Hashable.Hashable PythonSearchByLowerCaseScopeAndKind
-         where
-  hashWithSalt __salt (PythonSearchByLowerCaseScopeAndKind _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type PythonSearchByLowerCaseNameKindAndScopeFact_id = Glean.Id
-
-data PythonSearchByLowerCaseNameKindAndScopeFact = PythonSearchByLowerCaseNameKindAndScopeFact{pythonSearchByLowerCaseNameKindAndScopeFact_id
-                                                                                               ::
-                                                                                               {-# UNPACK #-} !PythonSearchByLowerCaseNameKindAndScopeFact_id,
-                                                                                               pythonSearchByLowerCaseNameKindAndScopeFact_key
-                                                                                               ::
-                                                                                               Prelude.Maybe
-                                                                                                 PythonSearchByLowerCaseNameKindAndScopeFact_key}
-                                                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON PythonSearchByLowerCaseNameKindAndScopeFact
-         where
-  toJSON
-    (PythonSearchByLowerCaseNameKindAndScopeFact __field__id
-       __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct
-           PythonSearchByLowerCaseNameKindAndScopeFact
-         where
-  buildStruct _proxy
-    (PythonSearchByLowerCaseNameKindAndScopeFact __field__id
-       __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (PythonSearchByLowerCaseNameKindAndScopeFact
-                                                  __val__id
-                                                  __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData PythonSearchByLowerCaseNameKindAndScopeFact
-         where
-  rnf
-    (PythonSearchByLowerCaseNameKindAndScopeFact __field__id
-       __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default
-           PythonSearchByLowerCaseNameKindAndScopeFact
-         where
-  def
-    = PythonSearchByLowerCaseNameKindAndScopeFact Default.def
-        Prelude.Nothing
-
-instance Hashable.Hashable
-           PythonSearchByLowerCaseNameKindAndScopeFact
-         where
-  hashWithSalt __salt
-    (PythonSearchByLowerCaseNameKindAndScopeFact _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type PythonNameLowerCase_id = Glean.Id
-
-data PythonNameLowerCase = PythonNameLowerCase{pythonNameLowerCase_id
-                                               :: {-# UNPACK #-} !PythonNameLowerCase_id,
-                                               pythonNameLowerCase_key ::
-                                               Prelude.Maybe PythonNameLowerCase_key}
-                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON PythonNameLowerCase where
-  toJSON (PythonNameLowerCase __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct PythonNameLowerCase where
-  buildStruct _proxy (PythonNameLowerCase __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (PythonNameLowerCase __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData PythonNameLowerCase where
-  rnf (PythonNameLowerCase __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default PythonNameLowerCase where
-  def = PythonNameLowerCase Default.def Prelude.Nothing
-
-instance Hashable.Hashable PythonNameLowerCase where
-  hashWithSalt __salt (PythonNameLowerCase _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type PpSearchByNameKind_id = Glean.Id
-
-data PpSearchByNameKind = PpSearchByNameKind{ppSearchByNameKind_id
-                                             :: {-# UNPACK #-} !PpSearchByNameKind_id,
-                                             ppSearchByNameKind_key ::
-                                             Prelude.Maybe PpSearchByNameKind_key}
-                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON PpSearchByNameKind where
-  toJSON (PpSearchByNameKind __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct PpSearchByNameKind where
-  buildStruct _proxy (PpSearchByNameKind __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (PpSearchByNameKind __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData PpSearchByNameKind where
-  rnf (PpSearchByNameKind __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default PpSearchByNameKind where
-  def = PpSearchByNameKind Default.def Prelude.Nothing
-
-instance Hashable.Hashable PpSearchByNameKind where
-  hashWithSalt __salt (PpSearchByNameKind _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type PpSearchByLowerCaseNameKind_id = Glean.Id
-
-data PpSearchByLowerCaseNameKind = PpSearchByLowerCaseNameKind{ppSearchByLowerCaseNameKind_id
-                                                               ::
-                                                               {-# UNPACK #-} !PpSearchByLowerCaseNameKind_id,
-                                                               ppSearchByLowerCaseNameKind_key ::
-                                                               Prelude.Maybe
-                                                                 PpSearchByLowerCaseNameKind_key}
-                                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON PpSearchByLowerCaseNameKind where
-  toJSON (PpSearchByLowerCaseNameKind __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct PpSearchByLowerCaseNameKind where
-  buildStruct _proxy
-    (PpSearchByLowerCaseNameKind __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (PpSearchByLowerCaseNameKind __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData PpSearchByLowerCaseNameKind where
-  rnf (PpSearchByLowerCaseNameKind __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default PpSearchByLowerCaseNameKind where
-  def = PpSearchByLowerCaseNameKind Default.def Prelude.Nothing
-
-instance Hashable.Hashable PpSearchByLowerCaseNameKind where
-  hashWithSalt __salt (PpSearchByLowerCaseNameKind _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type LsifSearchByName_id = Glean.Id
-
-data LsifSearchByName = LsifSearchByName{lsifSearchByName_id ::
-                                         {-# UNPACK #-} !LsifSearchByName_id,
-                                         lsifSearchByName_key :: Prelude.Maybe LsifSearchByName_key}
-                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON LsifSearchByName where
-  toJSON (LsifSearchByName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct LsifSearchByName where
-  buildStruct _proxy (LsifSearchByName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (LsifSearchByName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData LsifSearchByName where
-  rnf (LsifSearchByName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default LsifSearchByName where
-  def = LsifSearchByName Default.def Prelude.Nothing
-
-instance Hashable.Hashable LsifSearchByName where
-  hashWithSalt __salt (LsifSearchByName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type LsifSearchByLowerCaseName_id = Glean.Id
-
-data LsifSearchByLowerCaseName = LsifSearchByLowerCaseName{lsifSearchByLowerCaseName_id
-                                                           ::
-                                                           {-# UNPACK #-} !LsifSearchByLowerCaseName_id,
-                                                           lsifSearchByLowerCaseName_key ::
-                                                           Prelude.Maybe
-                                                             LsifSearchByLowerCaseName_key}
-                                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON LsifSearchByLowerCaseName where
-  toJSON (LsifSearchByLowerCaseName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct LsifSearchByLowerCaseName where
-  buildStruct _proxy
-    (LsifSearchByLowerCaseName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (LsifSearchByLowerCaseName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData LsifSearchByLowerCaseName where
-  rnf (LsifSearchByLowerCaseName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default LsifSearchByLowerCaseName where
-  def = LsifSearchByLowerCaseName Default.def Prelude.Nothing
-
-instance Hashable.Hashable LsifSearchByLowerCaseName where
-  hashWithSalt __salt (LsifSearchByLowerCaseName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type KotlinSearchByScopeWithName_id = Glean.Id
-
-data KotlinSearchByScopeWithName = KotlinSearchByScopeWithName{kotlinSearchByScopeWithName_id
-                                                               ::
-                                                               {-# UNPACK #-} !KotlinSearchByScopeWithName_id,
-                                                               kotlinSearchByScopeWithName_key ::
-                                                               Prelude.Maybe
-                                                                 KotlinSearchByScopeWithName_key}
-                                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON KotlinSearchByScopeWithName where
-  toJSON (KotlinSearchByScopeWithName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct KotlinSearchByScopeWithName where
-  buildStruct _proxy
-    (KotlinSearchByScopeWithName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (KotlinSearchByScopeWithName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData KotlinSearchByScopeWithName where
-  rnf (KotlinSearchByScopeWithName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default KotlinSearchByScopeWithName where
-  def = KotlinSearchByScopeWithName Default.def Prelude.Nothing
-
-instance Hashable.Hashable KotlinSearchByScopeWithName where
-  hashWithSalt __salt (KotlinSearchByScopeWithName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type KotlinSearchByScope_id = Glean.Id
-
-data KotlinSearchByScope = KotlinSearchByScope{kotlinSearchByScope_id
-                                               :: {-# UNPACK #-} !KotlinSearchByScope_id,
-                                               kotlinSearchByScope_key ::
-                                               Prelude.Maybe KotlinSearchByScope_key}
-                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON KotlinSearchByScope where
-  toJSON (KotlinSearchByScope __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct KotlinSearchByScope where
-  buildStruct _proxy (KotlinSearchByScope __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (KotlinSearchByScope __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData KotlinSearchByScope where
-  rnf (KotlinSearchByScope __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default KotlinSearchByScope where
-  def = KotlinSearchByScope Default.def Prelude.Nothing
-
-instance Hashable.Hashable KotlinSearchByScope where
-  hashWithSalt __salt (KotlinSearchByScope _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type KotlinSearchByNameWithFact_id = Glean.Id
-
-data KotlinSearchByNameWithFact = KotlinSearchByNameWithFact{kotlinSearchByNameWithFact_id
-                                                             ::
-                                                             {-# UNPACK #-} !KotlinSearchByNameWithFact_id,
-                                                             kotlinSearchByNameWithFact_key ::
-                                                             Prelude.Maybe
-                                                               KotlinSearchByNameWithFact_key}
-                                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON KotlinSearchByNameWithFact where
-  toJSON (KotlinSearchByNameWithFact __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct KotlinSearchByNameWithFact where
-  buildStruct _proxy
-    (KotlinSearchByNameWithFact __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (KotlinSearchByNameWithFact __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData KotlinSearchByNameWithFact where
-  rnf (KotlinSearchByNameWithFact __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default KotlinSearchByNameWithFact where
-  def = KotlinSearchByNameWithFact Default.def Prelude.Nothing
-
-instance Hashable.Hashable KotlinSearchByNameWithFact where
-  hashWithSalt __salt (KotlinSearchByNameWithFact _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type KotlinSearchByName_id = Glean.Id
-
-data KotlinSearchByName = KotlinSearchByName{kotlinSearchByName_id
-                                             :: {-# UNPACK #-} !KotlinSearchByName_id,
-                                             kotlinSearchByName_key ::
-                                             Prelude.Maybe KotlinSearchByName_key}
-                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON KotlinSearchByName where
-  toJSON (KotlinSearchByName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct KotlinSearchByName where
-  buildStruct _proxy (KotlinSearchByName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (KotlinSearchByName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData KotlinSearchByName where
-  rnf (KotlinSearchByName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default KotlinSearchByName where
-  def = KotlinSearchByName Default.def Prelude.Nothing
-
-instance Hashable.Hashable KotlinSearchByName where
-  hashWithSalt __salt (KotlinSearchByName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type KotlinSearchByLowerCaseScope_id = Glean.Id
-
-data KotlinSearchByLowerCaseScope = KotlinSearchByLowerCaseScope{kotlinSearchByLowerCaseScope_id
-                                                                 ::
-                                                                 {-# UNPACK #-} !KotlinSearchByLowerCaseScope_id,
-                                                                 kotlinSearchByLowerCaseScope_key ::
-                                                                 Prelude.Maybe
-                                                                   KotlinSearchByLowerCaseScope_key}
-                                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON KotlinSearchByLowerCaseScope where
-  toJSON (KotlinSearchByLowerCaseScope __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct KotlinSearchByLowerCaseScope where
-  buildStruct _proxy
-    (KotlinSearchByLowerCaseScope __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (KotlinSearchByLowerCaseScope __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData KotlinSearchByLowerCaseScope where
-  rnf (KotlinSearchByLowerCaseScope __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default KotlinSearchByLowerCaseScope where
-  def = KotlinSearchByLowerCaseScope Default.def Prelude.Nothing
-
-instance Hashable.Hashable KotlinSearchByLowerCaseScope where
-  hashWithSalt __salt (KotlinSearchByLowerCaseScope _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type KotlinSearchByLowerCaseName_id = Glean.Id
-
-data KotlinSearchByLowerCaseName = KotlinSearchByLowerCaseName{kotlinSearchByLowerCaseName_id
-                                                               ::
-                                                               {-# UNPACK #-} !KotlinSearchByLowerCaseName_id,
-                                                               kotlinSearchByLowerCaseName_key ::
-                                                               Prelude.Maybe
-                                                                 KotlinSearchByLowerCaseName_key}
-                                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON KotlinSearchByLowerCaseName where
-  toJSON (KotlinSearchByLowerCaseName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct KotlinSearchByLowerCaseName where
-  buildStruct _proxy
-    (KotlinSearchByLowerCaseName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (KotlinSearchByLowerCaseName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData KotlinSearchByLowerCaseName where
-  rnf (KotlinSearchByLowerCaseName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default KotlinSearchByLowerCaseName where
-  def = KotlinSearchByLowerCaseName Default.def Prelude.Nothing
-
-instance Hashable.Hashable KotlinSearchByLowerCaseName where
-  hashWithSalt __salt (KotlinSearchByLowerCaseName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type JavaSearchByScopeWithName_id = Glean.Id
-
-data JavaSearchByScopeWithName = JavaSearchByScopeWithName{javaSearchByScopeWithName_id
-                                                           ::
-                                                           {-# UNPACK #-} !JavaSearchByScopeWithName_id,
-                                                           javaSearchByScopeWithName_key ::
-                                                           Prelude.Maybe
-                                                             JavaSearchByScopeWithName_key}
-                                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON JavaSearchByScopeWithName where
-  toJSON (JavaSearchByScopeWithName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct JavaSearchByScopeWithName where
-  buildStruct _proxy
-    (JavaSearchByScopeWithName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (JavaSearchByScopeWithName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData JavaSearchByScopeWithName where
-  rnf (JavaSearchByScopeWithName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default JavaSearchByScopeWithName where
-  def = JavaSearchByScopeWithName Default.def Prelude.Nothing
-
-instance Hashable.Hashable JavaSearchByScopeWithName where
-  hashWithSalt __salt (JavaSearchByScopeWithName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type JavaSearchByScope_id = Glean.Id
-
-data JavaSearchByScope = JavaSearchByScope{javaSearchByScope_id ::
-                                           {-# UNPACK #-} !JavaSearchByScope_id,
-                                           javaSearchByScope_key ::
-                                           Prelude.Maybe JavaSearchByScope_key}
-                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON JavaSearchByScope where
-  toJSON (JavaSearchByScope __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct JavaSearchByScope where
-  buildStruct _proxy (JavaSearchByScope __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (JavaSearchByScope __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData JavaSearchByScope where
-  rnf (JavaSearchByScope __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default JavaSearchByScope where
-  def = JavaSearchByScope Default.def Prelude.Nothing
-
-instance Hashable.Hashable JavaSearchByScope where
-  hashWithSalt __salt (JavaSearchByScope _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type JavaSearchByNameWithFact_id = Glean.Id
-
-data JavaSearchByNameWithFact = JavaSearchByNameWithFact{javaSearchByNameWithFact_id
-                                                         ::
-                                                         {-# UNPACK #-} !JavaSearchByNameWithFact_id,
-                                                         javaSearchByNameWithFact_key ::
-                                                         Prelude.Maybe JavaSearchByNameWithFact_key}
-                                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON JavaSearchByNameWithFact where
-  toJSON (JavaSearchByNameWithFact __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct JavaSearchByNameWithFact where
-  buildStruct _proxy
-    (JavaSearchByNameWithFact __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (JavaSearchByNameWithFact __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData JavaSearchByNameWithFact where
-  rnf (JavaSearchByNameWithFact __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default JavaSearchByNameWithFact where
-  def = JavaSearchByNameWithFact Default.def Prelude.Nothing
-
-instance Hashable.Hashable JavaSearchByNameWithFact where
-  hashWithSalt __salt (JavaSearchByNameWithFact _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type JavaSearchByName_id = Glean.Id
-
-data JavaSearchByName = JavaSearchByName{javaSearchByName_id ::
-                                         {-# UNPACK #-} !JavaSearchByName_id,
-                                         javaSearchByName_key :: Prelude.Maybe JavaSearchByName_key}
-                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON JavaSearchByName where
-  toJSON (JavaSearchByName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct JavaSearchByName where
-  buildStruct _proxy (JavaSearchByName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (JavaSearchByName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData JavaSearchByName where
-  rnf (JavaSearchByName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default JavaSearchByName where
-  def = JavaSearchByName Default.def Prelude.Nothing
-
-instance Hashable.Hashable JavaSearchByName where
-  hashWithSalt __salt (JavaSearchByName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type JavaSearchByLowerCaseScope_id = Glean.Id
-
-data JavaSearchByLowerCaseScope = JavaSearchByLowerCaseScope{javaSearchByLowerCaseScope_id
-                                                             ::
-                                                             {-# UNPACK #-} !JavaSearchByLowerCaseScope_id,
-                                                             javaSearchByLowerCaseScope_key ::
-                                                             Prelude.Maybe
-                                                               JavaSearchByLowerCaseScope_key}
-                                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON JavaSearchByLowerCaseScope where
-  toJSON (JavaSearchByLowerCaseScope __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct JavaSearchByLowerCaseScope where
-  buildStruct _proxy
-    (JavaSearchByLowerCaseScope __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (JavaSearchByLowerCaseScope __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData JavaSearchByLowerCaseScope where
-  rnf (JavaSearchByLowerCaseScope __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default JavaSearchByLowerCaseScope where
-  def = JavaSearchByLowerCaseScope Default.def Prelude.Nothing
-
-instance Hashable.Hashable JavaSearchByLowerCaseScope where
-  hashWithSalt __salt (JavaSearchByLowerCaseScope _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type JavaSearchByLowerCaseName_id = Glean.Id
-
-data JavaSearchByLowerCaseName = JavaSearchByLowerCaseName{javaSearchByLowerCaseName_id
-                                                           ::
-                                                           {-# UNPACK #-} !JavaSearchByLowerCaseName_id,
-                                                           javaSearchByLowerCaseName_key ::
-                                                           Prelude.Maybe
-                                                             JavaSearchByLowerCaseName_key}
-                                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON JavaSearchByLowerCaseName where
-  toJSON (JavaSearchByLowerCaseName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct JavaSearchByLowerCaseName where
-  buildStruct _proxy
-    (JavaSearchByLowerCaseName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (JavaSearchByLowerCaseName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData JavaSearchByLowerCaseName where
-  rnf (JavaSearchByLowerCaseName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default JavaSearchByLowerCaseName where
-  def = JavaSearchByLowerCaseName Default.def Prelude.Nothing
-
-instance Hashable.Hashable JavaSearchByLowerCaseName where
-  hashWithSalt __salt (JavaSearchByLowerCaseName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type HsSearchByName_id = Glean.Id
-
-data HsSearchByName = HsSearchByName{hsSearchByName_id ::
-                                     {-# UNPACK #-} !HsSearchByName_id,
-                                     hsSearchByName_key :: Prelude.Maybe HsSearchByName_key}
-                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON HsSearchByName where
-  toJSON (HsSearchByName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct HsSearchByName where
-  buildStruct _proxy (HsSearchByName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (HsSearchByName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData HsSearchByName where
-  rnf (HsSearchByName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default HsSearchByName where
-  def = HsSearchByName Default.def Prelude.Nothing
-
-instance Hashable.Hashable HsSearchByName where
-  hashWithSalt __salt (HsSearchByName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type HsSearchByLowerCaseName_id = Glean.Id
-
-data HsSearchByLowerCaseName = HsSearchByLowerCaseName{hsSearchByLowerCaseName_id
-                                                       ::
-                                                       {-# UNPACK #-} !HsSearchByLowerCaseName_id,
-                                                       hsSearchByLowerCaseName_key ::
-                                                       Prelude.Maybe HsSearchByLowerCaseName_key}
-                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON HsSearchByLowerCaseName where
-  toJSON (HsSearchByLowerCaseName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct HsSearchByLowerCaseName where
-  buildStruct _proxy
-    (HsSearchByLowerCaseName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (HsSearchByLowerCaseName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData HsSearchByLowerCaseName where
-  rnf (HsSearchByLowerCaseName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default HsSearchByLowerCaseName where
-  def = HsSearchByLowerCaseName Default.def Prelude.Nothing
-
-instance Hashable.Hashable HsSearchByLowerCaseName where
-  hashWithSalt __salt (HsSearchByLowerCaseName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type HackSearchByScopeWithNameKinds_id = Glean.Id
-
-data HackSearchByScopeWithNameKinds = HackSearchByScopeWithNameKinds{hackSearchByScopeWithNameKinds_id
-                                                                     ::
-                                                                     {-# UNPACK #-} !HackSearchByScopeWithNameKinds_id,
-                                                                     hackSearchByScopeWithNameKinds_key
-                                                                     ::
-                                                                     Prelude.Maybe
-                                                                       HackSearchByScopeWithNameKinds_key}
-                                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON HackSearchByScopeWithNameKinds where
-  toJSON (HackSearchByScopeWithNameKinds __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct HackSearchByScopeWithNameKinds where
-  buildStruct _proxy
-    (HackSearchByScopeWithNameKinds __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (HackSearchByScopeWithNameKinds __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData HackSearchByScopeWithNameKinds where
-  rnf (HackSearchByScopeWithNameKinds __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default HackSearchByScopeWithNameKinds where
-  def = HackSearchByScopeWithNameKinds Default.def Prelude.Nothing
-
-instance Hashable.Hashable HackSearchByScopeWithNameKinds where
-  hashWithSalt __salt (HackSearchByScopeWithNameKinds _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type HackSearchByScopeAndKind_id = Glean.Id
-
-data HackSearchByScopeAndKind = HackSearchByScopeAndKind{hackSearchByScopeAndKind_id
-                                                         ::
-                                                         {-# UNPACK #-} !HackSearchByScopeAndKind_id,
-                                                         hackSearchByScopeAndKind_key ::
-                                                         Prelude.Maybe HackSearchByScopeAndKind_key}
-                                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON HackSearchByScopeAndKind where
-  toJSON (HackSearchByScopeAndKind __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct HackSearchByScopeAndKind where
-  buildStruct _proxy
-    (HackSearchByScopeAndKind __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (HackSearchByScopeAndKind __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData HackSearchByScopeAndKind where
-  rnf (HackSearchByScopeAndKind __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default HackSearchByScopeAndKind where
-  def = HackSearchByScopeAndKind Default.def Prelude.Nothing
-
-instance Hashable.Hashable HackSearchByScopeAndKind where
-  hashWithSalt __salt (HackSearchByScopeAndKind _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type HackSearchByNameKindWithQName_id = Glean.Id
-
-data HackSearchByNameKindWithQName = HackSearchByNameKindWithQName{hackSearchByNameKindWithQName_id
-                                                                   ::
-                                                                   {-# UNPACK #-} !HackSearchByNameKindWithQName_id,
-                                                                   hackSearchByNameKindWithQName_key
-                                                                   ::
-                                                                   Prelude.Maybe
-                                                                     HackSearchByNameKindWithQName_key}
-                                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON HackSearchByNameKindWithQName where
-  toJSON (HackSearchByNameKindWithQName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct HackSearchByNameKindWithQName where
-  buildStruct _proxy
-    (HackSearchByNameKindWithQName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (HackSearchByNameKindWithQName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData HackSearchByNameKindWithQName where
-  rnf (HackSearchByNameKindWithQName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default HackSearchByNameKindWithQName where
-  def = HackSearchByNameKindWithQName Default.def Prelude.Nothing
-
-instance Hashable.Hashable HackSearchByNameKindWithQName where
-  hashWithSalt __salt (HackSearchByNameKindWithQName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type HackSearchByNameKindWithNamespace_id = Glean.Id
-
-data HackSearchByNameKindWithNamespace = HackSearchByNameKindWithNamespace{hackSearchByNameKindWithNamespace_id
-                                                                           ::
-                                                                           {-# UNPACK #-} !HackSearchByNameKindWithNamespace_id,
-                                                                           hackSearchByNameKindWithNamespace_key
-                                                                           ::
-                                                                           Prelude.Maybe
-                                                                             HackSearchByNameKindWithNamespace_key}
-                                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON HackSearchByNameKindWithNamespace where
-  toJSON (HackSearchByNameKindWithNamespace __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct HackSearchByNameKindWithNamespace
-         where
-  buildStruct _proxy
-    (HackSearchByNameKindWithNamespace __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (HackSearchByNameKindWithNamespace __val__id
-                                                  __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData HackSearchByNameKindWithNamespace where
-  rnf (HackSearchByNameKindWithNamespace __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default HackSearchByNameKindWithNamespace where
-  def = HackSearchByNameKindWithNamespace Default.def Prelude.Nothing
-
-instance Hashable.Hashable HackSearchByNameKindWithNamespace where
-  hashWithSalt __salt (HackSearchByNameKindWithNamespace _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type HackSearchByNameAndKind_id = Glean.Id
-
-data HackSearchByNameAndKind = HackSearchByNameAndKind{hackSearchByNameAndKind_id
-                                                       ::
-                                                       {-# UNPACK #-} !HackSearchByNameAndKind_id,
-                                                       hackSearchByNameAndKind_key ::
-                                                       Prelude.Maybe HackSearchByNameAndKind_key}
-                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON HackSearchByNameAndKind where
-  toJSON (HackSearchByNameAndKind __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct HackSearchByNameAndKind where
-  buildStruct _proxy
-    (HackSearchByNameAndKind __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (HackSearchByNameAndKind __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData HackSearchByNameAndKind where
-  rnf (HackSearchByNameAndKind __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default HackSearchByNameAndKind where
-  def = HackSearchByNameAndKind Default.def Prelude.Nothing
-
-instance Hashable.Hashable HackSearchByNameAndKind where
-  hashWithSalt __salt (HackSearchByNameAndKind _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type HackSearchByLowerCaseScopeAndKind_id = Glean.Id
-
-data HackSearchByLowerCaseScopeAndKind = HackSearchByLowerCaseScopeAndKind{hackSearchByLowerCaseScopeAndKind_id
-                                                                           ::
-                                                                           {-# UNPACK #-} !HackSearchByLowerCaseScopeAndKind_id,
-                                                                           hackSearchByLowerCaseScopeAndKind_key
-                                                                           ::
-                                                                           Prelude.Maybe
-                                                                             HackSearchByLowerCaseScopeAndKind_key}
-                                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON HackSearchByLowerCaseScopeAndKind where
-  toJSON (HackSearchByLowerCaseScopeAndKind __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct HackSearchByLowerCaseScopeAndKind
-         where
-  buildStruct _proxy
-    (HackSearchByLowerCaseScopeAndKind __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (HackSearchByLowerCaseScopeAndKind __val__id
-                                                  __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData HackSearchByLowerCaseScopeAndKind where
-  rnf (HackSearchByLowerCaseScopeAndKind __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default HackSearchByLowerCaseScopeAndKind where
-  def = HackSearchByLowerCaseScopeAndKind Default.def Prelude.Nothing
-
-instance Hashable.Hashable HackSearchByLowerCaseScopeAndKind where
-  hashWithSalt __salt (HackSearchByLowerCaseScopeAndKind _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type HackSearchByLowerCaseNameAndKind_id = Glean.Id
-
-data HackSearchByLowerCaseNameAndKind = HackSearchByLowerCaseNameAndKind{hackSearchByLowerCaseNameAndKind_id
-                                                                         ::
-                                                                         {-# UNPACK #-} !HackSearchByLowerCaseNameAndKind_id,
-                                                                         hackSearchByLowerCaseNameAndKind_key
-                                                                         ::
-                                                                         Prelude.Maybe
-                                                                           HackSearchByLowerCaseNameAndKind_key}
-                                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON HackSearchByLowerCaseNameAndKind where
-  toJSON (HackSearchByLowerCaseNameAndKind __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct HackSearchByLowerCaseNameAndKind where
-  buildStruct _proxy
-    (HackSearchByLowerCaseNameAndKind __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (HackSearchByLowerCaseNameAndKind __val__id
-                                                  __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData HackSearchByLowerCaseNameAndKind where
-  rnf (HackSearchByLowerCaseNameAndKind __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default HackSearchByLowerCaseNameAndKind where
-  def = HackSearchByLowerCaseNameAndKind Default.def Prelude.Nothing
-
-instance Hashable.Hashable HackSearchByLowerCaseNameAndKind where
-  hashWithSalt __salt (HackSearchByLowerCaseNameAndKind _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type HackNameLowerCase_id = Glean.Id
-
-data HackNameLowerCase = HackNameLowerCase{hackNameLowerCase_id ::
-                                           {-# UNPACK #-} !HackNameLowerCase_id,
-                                           hackNameLowerCase_key ::
-                                           Prelude.Maybe HackNameLowerCase_key}
-                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON HackNameLowerCase where
-  toJSON (HackNameLowerCase __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct HackNameLowerCase where
-  buildStruct _proxy (HackNameLowerCase __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (HackNameLowerCase __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData HackNameLowerCase where
-  rnf (HackNameLowerCase __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default HackNameLowerCase where
-  def = HackNameLowerCase Default.def Prelude.Nothing
-
-instance Hashable.Hashable HackNameLowerCase where
-  hashWithSalt __salt (HackNameLowerCase _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type GraphQLSearchByName_id = Glean.Id
-
-data GraphQLSearchByName = GraphQLSearchByName{graphQLSearchByName_id
-                                               :: {-# UNPACK #-} !GraphQLSearchByName_id,
-                                               graphQLSearchByName_key ::
-                                               Prelude.Maybe GraphQLSearchByName_key}
-                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON GraphQLSearchByName where
-  toJSON (GraphQLSearchByName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct GraphQLSearchByName where
-  buildStruct _proxy (GraphQLSearchByName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (GraphQLSearchByName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData GraphQLSearchByName where
-  rnf (GraphQLSearchByName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default GraphQLSearchByName where
-  def = GraphQLSearchByName Default.def Prelude.Nothing
-
-instance Hashable.Hashable GraphQLSearchByName where
-  hashWithSalt __salt (GraphQLSearchByName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type GraphQLSearchByLowerCaseName_id = Glean.Id
-
-data GraphQLSearchByLowerCaseName = GraphQLSearchByLowerCaseName{graphQLSearchByLowerCaseName_id
-                                                                 ::
-                                                                 {-# UNPACK #-} !GraphQLSearchByLowerCaseName_id,
-                                                                 graphQLSearchByLowerCaseName_key ::
-                                                                 Prelude.Maybe
-                                                                   GraphQLSearchByLowerCaseName_key}
-                                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON GraphQLSearchByLowerCaseName where
-  toJSON (GraphQLSearchByLowerCaseName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct GraphQLSearchByLowerCaseName where
-  buildStruct _proxy
-    (GraphQLSearchByLowerCaseName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (GraphQLSearchByLowerCaseName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData GraphQLSearchByLowerCaseName where
-  rnf (GraphQLSearchByLowerCaseName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default GraphQLSearchByLowerCaseName where
-  def = GraphQLSearchByLowerCaseName Default.def Prelude.Nothing
-
-instance Hashable.Hashable GraphQLSearchByLowerCaseName where
-  hashWithSalt __salt (GraphQLSearchByLowerCaseName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type FlowSearchByScopeAndKind_id = Glean.Id
-
-data FlowSearchByScopeAndKind = FlowSearchByScopeAndKind{flowSearchByScopeAndKind_id
-                                                         ::
-                                                         {-# UNPACK #-} !FlowSearchByScopeAndKind_id,
-                                                         flowSearchByScopeAndKind_key ::
-                                                         Prelude.Maybe FlowSearchByScopeAndKind_key}
-                                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON FlowSearchByScopeAndKind where
-  toJSON (FlowSearchByScopeAndKind __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct FlowSearchByScopeAndKind where
-  buildStruct _proxy
-    (FlowSearchByScopeAndKind __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (FlowSearchByScopeAndKind __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData FlowSearchByScopeAndKind where
-  rnf (FlowSearchByScopeAndKind __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default FlowSearchByScopeAndKind where
-  def = FlowSearchByScopeAndKind Default.def Prelude.Nothing
-
-instance Hashable.Hashable FlowSearchByScopeAndKind where
-  hashWithSalt __salt (FlowSearchByScopeAndKind _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type FlowSearchByNameKindAndScopeFact_id = Glean.Id
-
-data FlowSearchByNameKindAndScopeFact = FlowSearchByNameKindAndScopeFact{flowSearchByNameKindAndScopeFact_id
-                                                                         ::
-                                                                         {-# UNPACK #-} !FlowSearchByNameKindAndScopeFact_id,
-                                                                         flowSearchByNameKindAndScopeFact_key
-                                                                         ::
-                                                                         Prelude.Maybe
-                                                                           FlowSearchByNameKindAndScopeFact_key}
-                                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON FlowSearchByNameKindAndScopeFact where
-  toJSON (FlowSearchByNameKindAndScopeFact __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct FlowSearchByNameKindAndScopeFact where
-  buildStruct _proxy
-    (FlowSearchByNameKindAndScopeFact __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (FlowSearchByNameKindAndScopeFact __val__id
-                                                  __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData FlowSearchByNameKindAndScopeFact where
-  rnf (FlowSearchByNameKindAndScopeFact __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default FlowSearchByNameKindAndScopeFact where
-  def = FlowSearchByNameKindAndScopeFact Default.def Prelude.Nothing
-
-instance Hashable.Hashable FlowSearchByNameKindAndScopeFact where
-  hashWithSalt __salt (FlowSearchByNameKindAndScopeFact _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type FlowSearchByLowerCaseScopeAndKind_id = Glean.Id
-
-data FlowSearchByLowerCaseScopeAndKind = FlowSearchByLowerCaseScopeAndKind{flowSearchByLowerCaseScopeAndKind_id
-                                                                           ::
-                                                                           {-# UNPACK #-} !FlowSearchByLowerCaseScopeAndKind_id,
-                                                                           flowSearchByLowerCaseScopeAndKind_key
-                                                                           ::
-                                                                           Prelude.Maybe
-                                                                             FlowSearchByLowerCaseScopeAndKind_key}
-                                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON FlowSearchByLowerCaseScopeAndKind where
-  toJSON (FlowSearchByLowerCaseScopeAndKind __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct FlowSearchByLowerCaseScopeAndKind
-         where
-  buildStruct _proxy
-    (FlowSearchByLowerCaseScopeAndKind __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (FlowSearchByLowerCaseScopeAndKind __val__id
-                                                  __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData FlowSearchByLowerCaseScopeAndKind where
-  rnf (FlowSearchByLowerCaseScopeAndKind __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default FlowSearchByLowerCaseScopeAndKind where
-  def = FlowSearchByLowerCaseScopeAndKind Default.def Prelude.Nothing
-
-instance Hashable.Hashable FlowSearchByLowerCaseScopeAndKind where
-  hashWithSalt __salt (FlowSearchByLowerCaseScopeAndKind _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type FlowSearchByLowerCaseNameKindAndScopeFact_id = Glean.Id
-
-data FlowSearchByLowerCaseNameKindAndScopeFact = FlowSearchByLowerCaseNameKindAndScopeFact{flowSearchByLowerCaseNameKindAndScopeFact_id
-                                                                                           ::
-                                                                                           {-# UNPACK #-} !FlowSearchByLowerCaseNameKindAndScopeFact_id,
-                                                                                           flowSearchByLowerCaseNameKindAndScopeFact_key
-                                                                                           ::
-                                                                                           Prelude.Maybe
-                                                                                             FlowSearchByLowerCaseNameKindAndScopeFact_key}
-                                                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON FlowSearchByLowerCaseNameKindAndScopeFact
-         where
-  toJSON
-    (FlowSearchByLowerCaseNameKindAndScopeFact __field__id
-       __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct
-           FlowSearchByLowerCaseNameKindAndScopeFact
-         where
-  buildStruct _proxy
-    (FlowSearchByLowerCaseNameKindAndScopeFact __field__id
-       __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (FlowSearchByLowerCaseNameKindAndScopeFact __val__id
-                                                  __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData FlowSearchByLowerCaseNameKindAndScopeFact
-         where
-  rnf
-    (FlowSearchByLowerCaseNameKindAndScopeFact __field__id
-       __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default FlowSearchByLowerCaseNameKindAndScopeFact
-         where
-  def
-    = FlowSearchByLowerCaseNameKindAndScopeFact Default.def
-        Prelude.Nothing
-
-instance Hashable.Hashable
-           FlowSearchByLowerCaseNameKindAndScopeFact
-         where
-  hashWithSalt __salt
-    (FlowSearchByLowerCaseNameKindAndScopeFact _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type FlowNameLowerCase_id = Glean.Id
-
-data FlowNameLowerCase = FlowNameLowerCase{flowNameLowerCase_id ::
-                                           {-# UNPACK #-} !FlowNameLowerCase_id,
-                                           flowNameLowerCase_key ::
-                                           Prelude.Maybe FlowNameLowerCase_key}
-                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON FlowNameLowerCase where
-  toJSON (FlowNameLowerCase __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct FlowNameLowerCase where
-  buildStruct _proxy (FlowNameLowerCase __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (FlowNameLowerCase __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData FlowNameLowerCase where
-  rnf (FlowNameLowerCase __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default FlowNameLowerCase where
-  def = FlowNameLowerCase Default.def Prelude.Nothing
-
-instance Hashable.Hashable FlowNameLowerCase where
-  hashWithSalt __salt (FlowNameLowerCase _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type FbthriftSearchByNameFact_id = Glean.Id
-
-data FbthriftSearchByNameFact = FbthriftSearchByNameFact{fbthriftSearchByNameFact_id
-                                                         ::
-                                                         {-# UNPACK #-} !FbthriftSearchByNameFact_id,
-                                                         fbthriftSearchByNameFact_key ::
-                                                         Prelude.Maybe FbthriftSearchByNameFact_key}
-                                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON FbthriftSearchByNameFact where
-  toJSON (FbthriftSearchByNameFact __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct FbthriftSearchByNameFact where
-  buildStruct _proxy
-    (FbthriftSearchByNameFact __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (FbthriftSearchByNameFact __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData FbthriftSearchByNameFact where
-  rnf (FbthriftSearchByNameFact __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default FbthriftSearchByNameFact where
-  def = FbthriftSearchByNameFact Default.def Prelude.Nothing
-
-instance Hashable.Hashable FbthriftSearchByNameFact where
-  hashWithSalt __salt (FbthriftSearchByNameFact _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type ErlangSearchByName_id = Glean.Id
-
-data ErlangSearchByName = ErlangSearchByName{erlangSearchByName_id
-                                             :: {-# UNPACK #-} !ErlangSearchByName_id,
-                                             erlangSearchByName_key ::
-                                             Prelude.Maybe ErlangSearchByName_key}
-                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ErlangSearchByName where
-  toJSON (ErlangSearchByName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct ErlangSearchByName where
-  buildStruct _proxy (ErlangSearchByName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (ErlangSearchByName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData ErlangSearchByName where
-  rnf (ErlangSearchByName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default ErlangSearchByName where
-  def = ErlangSearchByName Default.def Prelude.Nothing
-
-instance Hashable.Hashable ErlangSearchByName where
-  hashWithSalt __salt (ErlangSearchByName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type ErlangSearchByLowerCaseName_id = Glean.Id
-
-data ErlangSearchByLowerCaseName = ErlangSearchByLowerCaseName{erlangSearchByLowerCaseName_id
-                                                               ::
-                                                               {-# UNPACK #-} !ErlangSearchByLowerCaseName_id,
-                                                               erlangSearchByLowerCaseName_key ::
-                                                               Prelude.Maybe
-                                                                 ErlangSearchByLowerCaseName_key}
-                                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ErlangSearchByLowerCaseName where
-  toJSON (ErlangSearchByLowerCaseName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct ErlangSearchByLowerCaseName where
-  buildStruct _proxy
-    (ErlangSearchByLowerCaseName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (ErlangSearchByLowerCaseName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData ErlangSearchByLowerCaseName where
-  rnf (ErlangSearchByLowerCaseName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default ErlangSearchByLowerCaseName where
-  def = ErlangSearchByLowerCaseName Default.def Prelude.Nothing
-
-instance Hashable.Hashable ErlangSearchByLowerCaseName where
-  hashWithSalt __salt (ErlangSearchByLowerCaseName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type CxxSearchByScopeAndKind_id = Glean.Id
-
-data CxxSearchByScopeAndKind = CxxSearchByScopeAndKind{cxxSearchByScopeAndKind_id
-                                                       ::
-                                                       {-# UNPACK #-} !CxxSearchByScopeAndKind_id,
-                                                       cxxSearchByScopeAndKind_key ::
-                                                       Prelude.Maybe CxxSearchByScopeAndKind_key}
-                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON CxxSearchByScopeAndKind where
-  toJSON (CxxSearchByScopeAndKind __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct CxxSearchByScopeAndKind where
-  buildStruct _proxy
-    (CxxSearchByScopeAndKind __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (CxxSearchByScopeAndKind __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData CxxSearchByScopeAndKind where
-  rnf (CxxSearchByScopeAndKind __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default CxxSearchByScopeAndKind where
-  def = CxxSearchByScopeAndKind Default.def Prelude.Nothing
-
-instance Hashable.Hashable CxxSearchByScopeAndKind where
-  hashWithSalt __salt (CxxSearchByScopeAndKind _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type CxxSearchByNameKindAndScopeFact_id = Glean.Id
-
-data CxxSearchByNameKindAndScopeFact = CxxSearchByNameKindAndScopeFact{cxxSearchByNameKindAndScopeFact_id
-                                                                       ::
-                                                                       {-# UNPACK #-} !CxxSearchByNameKindAndScopeFact_id,
-                                                                       cxxSearchByNameKindAndScopeFact_key
-                                                                       ::
-                                                                       Prelude.Maybe
-                                                                         CxxSearchByNameKindAndScopeFact_key}
-                                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON CxxSearchByNameKindAndScopeFact where
-  toJSON (CxxSearchByNameKindAndScopeFact __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct CxxSearchByNameKindAndScopeFact where
-  buildStruct _proxy
-    (CxxSearchByNameKindAndScopeFact __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (CxxSearchByNameKindAndScopeFact __val__id
-                                                  __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData CxxSearchByNameKindAndScopeFact where
-  rnf (CxxSearchByNameKindAndScopeFact __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default CxxSearchByNameKindAndScopeFact where
-  def = CxxSearchByNameKindAndScopeFact Default.def Prelude.Nothing
-
-instance Hashable.Hashable CxxSearchByNameKindAndScopeFact where
-  hashWithSalt __salt (CxxSearchByNameKindAndScopeFact _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type CxxSearchByLowerCaseScopeAndKind_id = Glean.Id
-
-data CxxSearchByLowerCaseScopeAndKind = CxxSearchByLowerCaseScopeAndKind{cxxSearchByLowerCaseScopeAndKind_id
-                                                                         ::
-                                                                         {-# UNPACK #-} !CxxSearchByLowerCaseScopeAndKind_id,
-                                                                         cxxSearchByLowerCaseScopeAndKind_key
-                                                                         ::
-                                                                         Prelude.Maybe
-                                                                           CxxSearchByLowerCaseScopeAndKind_key}
-                                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON CxxSearchByLowerCaseScopeAndKind where
-  toJSON (CxxSearchByLowerCaseScopeAndKind __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct CxxSearchByLowerCaseScopeAndKind where
-  buildStruct _proxy
-    (CxxSearchByLowerCaseScopeAndKind __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (CxxSearchByLowerCaseScopeAndKind __val__id
-                                                  __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData CxxSearchByLowerCaseScopeAndKind where
-  rnf (CxxSearchByLowerCaseScopeAndKind __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default CxxSearchByLowerCaseScopeAndKind where
-  def = CxxSearchByLowerCaseScopeAndKind Default.def Prelude.Nothing
-
-instance Hashable.Hashable CxxSearchByLowerCaseScopeAndKind where
-  hashWithSalt __salt (CxxSearchByLowerCaseScopeAndKind _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type CxxSearchByLowerCaseNameKindAndScopeFact_id = Glean.Id
-
-data CxxSearchByLowerCaseNameKindAndScopeFact = CxxSearchByLowerCaseNameKindAndScopeFact{cxxSearchByLowerCaseNameKindAndScopeFact_id
-                                                                                         ::
-                                                                                         {-# UNPACK #-} !CxxSearchByLowerCaseNameKindAndScopeFact_id,
-                                                                                         cxxSearchByLowerCaseNameKindAndScopeFact_key
-                                                                                         ::
-                                                                                         Prelude.Maybe
-                                                                                           CxxSearchByLowerCaseNameKindAndScopeFact_key}
-                                                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON CxxSearchByLowerCaseNameKindAndScopeFact
-         where
-  toJSON
-    (CxxSearchByLowerCaseNameKindAndScopeFact __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct
-           CxxSearchByLowerCaseNameKindAndScopeFact
-         where
-  buildStruct _proxy
-    (CxxSearchByLowerCaseNameKindAndScopeFact __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (CxxSearchByLowerCaseNameKindAndScopeFact __val__id
-                                                  __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData CxxSearchByLowerCaseNameKindAndScopeFact
-         where
-  rnf
-    (CxxSearchByLowerCaseNameKindAndScopeFact __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default CxxSearchByLowerCaseNameKindAndScopeFact
-         where
-  def
-    = CxxSearchByLowerCaseNameKindAndScopeFact Default.def
-        Prelude.Nothing
-
-instance Hashable.Hashable CxxSearchByLowerCaseNameKindAndScopeFact
-         where
-  hashWithSalt __salt
-    (CxxSearchByLowerCaseNameKindAndScopeFact _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type CxxPreferDefinitions_id = Glean.Id
-
-data CxxPreferDefinitions = CxxPreferDefinitions{cxxPreferDefinitions_id
-                                                 :: {-# UNPACK #-} !CxxPreferDefinitions_id,
-                                                 cxxPreferDefinitions_key ::
-                                                 Prelude.Maybe CxxPreferDefinitions_key}
-                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON CxxPreferDefinitions where
-  toJSON (CxxPreferDefinitions __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct CxxPreferDefinitions where
-  buildStruct _proxy (CxxPreferDefinitions __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (CxxPreferDefinitions __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData CxxPreferDefinitions where
-  rnf (CxxPreferDefinitions __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default CxxPreferDefinitions where
-  def = CxxPreferDefinitions Default.def Prelude.Nothing
-
-instance Hashable.Hashable CxxPreferDefinitions where
-  hashWithSalt __salt (CxxPreferDefinitions _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type CxxNameLowerCase_id = Glean.Id
-
-data CxxNameLowerCase = CxxNameLowerCase{cxxNameLowerCase_id ::
-                                         {-# UNPACK #-} !CxxNameLowerCase_id,
-                                         cxxNameLowerCase_key :: Prelude.Maybe CxxNameLowerCase_key}
-                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON CxxNameLowerCase where
-  toJSON (CxxNameLowerCase __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct CxxNameLowerCase where
-  buildStruct _proxy (CxxNameLowerCase __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (CxxNameLowerCase __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData CxxNameLowerCase where
-  rnf (CxxNameLowerCase __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default CxxNameLowerCase where
-  def = CxxNameLowerCase Default.def Prelude.Nothing
-
-instance Hashable.Hashable CxxNameLowerCase where
-  hashWithSalt __salt (CxxNameLowerCase _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type CSharpSearchByName_id = Glean.Id
-
-data CSharpSearchByName = CSharpSearchByName{cSharpSearchByName_id
-                                             :: {-# UNPACK #-} !CSharpSearchByName_id,
-                                             cSharpSearchByName_key ::
-                                             Prelude.Maybe CSharpSearchByName_key}
-                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON CSharpSearchByName where
-  toJSON (CSharpSearchByName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct CSharpSearchByName where
-  buildStruct _proxy (CSharpSearchByName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (CSharpSearchByName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData CSharpSearchByName where
-  rnf (CSharpSearchByName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default CSharpSearchByName where
-  def = CSharpSearchByName Default.def Prelude.Nothing
-
-instance Hashable.Hashable CSharpSearchByName where
-  hashWithSalt __salt (CSharpSearchByName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type CSharpSearchByLowerCaseName_id = Glean.Id
-
-data CSharpSearchByLowerCaseName = CSharpSearchByLowerCaseName{cSharpSearchByLowerCaseName_id
-                                                               ::
-                                                               {-# UNPACK #-} !CSharpSearchByLowerCaseName_id,
-                                                               cSharpSearchByLowerCaseName_key ::
-                                                               Prelude.Maybe
-                                                                 CSharpSearchByLowerCaseName_key}
-                                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON CSharpSearchByLowerCaseName where
-  toJSON (CSharpSearchByLowerCaseName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct CSharpSearchByLowerCaseName where
-  buildStruct _proxy
-    (CSharpSearchByLowerCaseName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (CSharpSearchByLowerCaseName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData CSharpSearchByLowerCaseName where
-  rnf (CSharpSearchByLowerCaseName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default CSharpSearchByLowerCaseName where
-  def = CSharpSearchByLowerCaseName Default.def Prelude.Nothing
-
-instance Hashable.Hashable CSharpSearchByLowerCaseName where
-  hashWithSalt __salt (CSharpSearchByLowerCaseName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type BuckSearchByName_id = Glean.Id
-
-data BuckSearchByName = BuckSearchByName{buckSearchByName_id ::
-                                         {-# UNPACK #-} !BuckSearchByName_id,
-                                         buckSearchByName_key :: Prelude.Maybe BuckSearchByName_key}
-                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON BuckSearchByName where
-  toJSON (BuckSearchByName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct BuckSearchByName where
-  buildStruct _proxy (BuckSearchByName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (BuckSearchByName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData BuckSearchByName where
-  rnf (BuckSearchByName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default BuckSearchByName where
-  def = BuckSearchByName Default.def Prelude.Nothing
-
-instance Hashable.Hashable BuckSearchByName where
-  hashWithSalt __salt (BuckSearchByName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type BuckSearchByLowerCaseName_id = Glean.Id
-
-data BuckSearchByLowerCaseName = BuckSearchByLowerCaseName{buckSearchByLowerCaseName_id
-                                                           ::
-                                                           {-# UNPACK #-} !BuckSearchByLowerCaseName_id,
-                                                           buckSearchByLowerCaseName_key ::
-                                                           Prelude.Maybe
-                                                             BuckSearchByLowerCaseName_key}
-                                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON BuckSearchByLowerCaseName where
-  toJSON (BuckSearchByLowerCaseName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct BuckSearchByLowerCaseName where
-  buildStruct _proxy
-    (BuckSearchByLowerCaseName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (BuckSearchByLowerCaseName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData BuckSearchByLowerCaseName where
-  rnf (BuckSearchByLowerCaseName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default BuckSearchByLowerCaseName where
-  def = BuckSearchByLowerCaseName Default.def Prelude.Nothing
-
-instance Hashable.Hashable BuckSearchByLowerCaseName where
-  hashWithSalt __salt (BuckSearchByLowerCaseName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type BuckSearchByLocalNameFact_id = Glean.Id
-
-data BuckSearchByLocalNameFact = BuckSearchByLocalNameFact{buckSearchByLocalNameFact_id
-                                                           ::
-                                                           {-# UNPACK #-} !BuckSearchByLocalNameFact_id,
-                                                           buckSearchByLocalNameFact_key ::
-                                                           Prelude.Maybe
-                                                             BuckSearchByLocalNameFact_key}
-                                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON BuckSearchByLocalNameFact where
-  toJSON (BuckSearchByLocalNameFact __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct BuckSearchByLocalNameFact where
-  buildStruct _proxy
-    (BuckSearchByLocalNameFact __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (BuckSearchByLocalNameFact __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData BuckSearchByLocalNameFact where
-  rnf (BuckSearchByLocalNameFact __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default BuckSearchByLocalNameFact where
-  def = BuckSearchByLocalNameFact Default.def Prelude.Nothing
-
-instance Hashable.Hashable BuckSearchByLocalNameFact where
-  hashWithSalt __salt (BuckSearchByLocalNameFact _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type AngleSearchByName_id = Glean.Id
-
-data AngleSearchByName = AngleSearchByName{angleSearchByName_id ::
-                                           {-# UNPACK #-} !AngleSearchByName_id,
-                                           angleSearchByName_key ::
-                                           Prelude.Maybe AngleSearchByName_key}
-                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON AngleSearchByName where
-  toJSON (AngleSearchByName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct AngleSearchByName where
-  buildStruct _proxy (AngleSearchByName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure (AngleSearchByName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData AngleSearchByName where
-  rnf (AngleSearchByName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default AngleSearchByName where
-  def = AngleSearchByName Default.def Prelude.Nothing
-
-instance Hashable.Hashable AngleSearchByName where
-  hashWithSalt __salt (AngleSearchByName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-type AngleSearchByLowerCaseName_id = Glean.Id
-
-data AngleSearchByLowerCaseName = AngleSearchByLowerCaseName{angleSearchByLowerCaseName_id
-                                                             ::
-                                                             {-# UNPACK #-} !AngleSearchByLowerCaseName_id,
-                                                             angleSearchByLowerCaseName_key ::
-                                                             Prelude.Maybe
-                                                               AngleSearchByLowerCaseName_key}
-                                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON AngleSearchByLowerCaseName where
-  toJSON (AngleSearchByLowerCaseName __field__id __field__key)
-    = Aeson.object
-        ("id" .= __field__id :
-           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
-             Prelude.mempty)
-
-instance Thrift.ThriftStruct AngleSearchByLowerCaseName where
-  buildStruct _proxy
-    (AngleSearchByLowerCaseName __field__id __field__key)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
-           (Thrift.genI64 _proxy __field__id)
-           :
-           case __field__key of
-             Prelude.Just _val -> Thrift.genField _proxy "key"
-                                    (Thrift.getStructType _proxy)
-                                    2
-                                    1
-                                    (Thrift.buildStruct _proxy _val)
-                                    : []
-             Prelude.Nothing -> [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__id <- ST.newSTRef Default.def
-            __field__key <- ST.newSTRef Prelude.Nothing
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getI64Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseI64
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__id
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__key
-                                                                          (Prelude.Just _val)
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
-                                             !__val__key <- ST.readSTRef __field__key
-                                             Prelude.pure
-                                               (AngleSearchByLowerCaseName __val__id __val__key)
-              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData AngleSearchByLowerCaseName where
-  rnf (AngleSearchByLowerCaseName __field__id __field__key)
-    = DeepSeq.rnf __field__id `Prelude.seq`
-        DeepSeq.rnf __field__key `Prelude.seq` ()
-
-instance Default.Default AngleSearchByLowerCaseName where
-  def = AngleSearchByLowerCaseName Default.def Prelude.Nothing
-
-instance Hashable.Hashable AngleSearchByLowerCaseName where
-  hashWithSalt __salt (AngleSearchByLowerCaseName _id _key)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
-
-data ThriftSearchByName_key = ThriftSearchByName_key{thriftSearchByName_key_name
-                                                     :: Text.Text,
-                                                     thriftSearchByName_key_entity ::
-                                                     Glean.Schema.Code.Entity}
-                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ThriftSearchByName_key where
-  toJSON (ThriftSearchByName_key __field__name __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "entity" .= __field__entity : Prelude.mempty)
-
-instance Thrift.ThriftStruct ThriftSearchByName_key where
-  buildStruct _proxy
-    (ThriftSearchByName_key __field__name __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__entity)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (ThriftSearchByName_key __val__name __val__entity)
-              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData ThriftSearchByName_key where
-  rnf (ThriftSearchByName_key __field__name __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default ThriftSearchByName_key where
-  def = ThriftSearchByName_key "" Default.def
-
-instance Hashable.Hashable ThriftSearchByName_key where
-  hashWithSalt __salt (ThriftSearchByName_key _name _entity)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-        _entity
-
-data ThriftSearchByLowerCaseName_key = ThriftSearchByLowerCaseName_key{thriftSearchByLowerCaseName_key_name
-                                                                       :: Text.Text,
-                                                                       thriftSearchByLowerCaseName_key_entity
-                                                                       :: Glean.Schema.Code.Entity}
-                                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ThriftSearchByLowerCaseName_key where
-  toJSON
-    (ThriftSearchByLowerCaseName_key __field__name __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "entity" .= __field__entity : Prelude.mempty)
-
-instance Thrift.ThriftStruct ThriftSearchByLowerCaseName_key where
-  buildStruct _proxy
-    (ThriftSearchByLowerCaseName_key __field__name __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__entity)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (ThriftSearchByLowerCaseName_key __val__name
-                                                  __val__entity)
-              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData ThriftSearchByLowerCaseName_key where
-  rnf (ThriftSearchByLowerCaseName_key __field__name __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default ThriftSearchByLowerCaseName_key where
-  def = ThriftSearchByLowerCaseName_key "" Default.def
-
-instance Hashable.Hashable ThriftSearchByLowerCaseName_key where
-  hashWithSalt __salt (ThriftSearchByLowerCaseName_key _name _entity)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-        _entity
-
-data SearchByScopeAndKind_key = SearchByScopeAndKind_key{searchByScopeAndKind_key_name
-                                                         :: Text.Text,
-                                                         searchByScopeAndKind_key_scope ::
-                                                         [Text.Text],
-                                                         searchByScopeAndKind_key_language ::
-                                                         Glean.Schema.Code.Language,
-                                                         searchByScopeAndKind_key_kinds ::
-                                                         Prelude.Maybe
-                                                           Glean.Schema.CodemarkupTypes.SymbolKind,
-                                                         searchByScopeAndKind_key_entity ::
-                                                         Glean.Schema.Code.Entity}
-                                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchByScopeAndKind_key where
-  toJSON
-    (SearchByScopeAndKind_key __field__name __field__scope
-       __field__language __field__kinds __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "scope" .= __field__scope :
-             "language" .= __field__language :
-               Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
-                 ("entity" .= __field__entity : Prelude.mempty))
-
-instance Thrift.ThriftStruct SearchByScopeAndKind_key where
-  buildStruct _proxy
-    (SearchByScopeAndKind_key __field__name __field__scope
-       __field__language __field__kinds __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "scope" (Thrift.getListType _proxy) 2 1
-             (Thrift.genList _proxy (Thrift.getStringType _proxy)
-                (Thrift.genText _proxy)
-                __field__scope)
-             :
-             Thrift.genField _proxy "language" (Thrift.getI32Type _proxy) 3 2
-               ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                   Thrift.fromThriftEnum)
-                  __field__language)
-               :
-               let (__cereal__kinds, __id__kinds)
-                     = case __field__kinds of
-                         Prelude.Just _val -> ((:)
-                                                 (Thrift.genField _proxy "kinds"
-                                                    (Thrift.getI32Type _proxy)
-                                                    4
-                                                    3
-                                                    ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                                                        Thrift.fromThriftEnum)
-                                                       _val)),
-                                               4)
-                         Prelude.Nothing -> (Prelude.id, 3)
-                 in
-                 __cereal__kinds
-                   (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 5
-                      __id__kinds
-                      (Thrift.buildStruct _proxy __field__entity)
-                      : []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__scope <- ST.newSTRef Default.def
-            __field__language <- ST.newSTRef Default.def
-            __field__kinds <- ST.newSTRef Prelude.Nothing
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseText
-                                                                                           _proxy))
-                                                                        ST.writeSTRef __field__scope
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "Language")
-                                                                        ST.writeSTRef
-                                                                          __field__language
-                                                                          _val
-                                                                 4 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "SymbolKind")
-                                                                        ST.writeSTRef __field__kinds
-                                                                          (Prelude.Just _val)
-                                                                 5 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__scope <- ST.readSTRef __field__scope
-                                             !__val__language <- ST.readSTRef __field__language
-                                             !__val__kinds <- ST.readSTRef __field__kinds
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (SearchByScopeAndKind_key __val__name __val__scope
-                                                  __val__language
-                                                  __val__kinds
-                                                  __val__entity)
-              _idMap
-                = HashMap.fromList
-                    [("name", 1), ("scope", 2), ("language", 3), ("kinds", 4),
-                     ("entity", 5)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchByScopeAndKind_key where
-  rnf
-    (SearchByScopeAndKind_key __field__name __field__scope
-       __field__language __field__kinds __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__scope `Prelude.seq`
-          DeepSeq.rnf __field__language `Prelude.seq`
-            DeepSeq.rnf __field__kinds `Prelude.seq`
-              DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default SearchByScopeAndKind_key where
-  def
-    = SearchByScopeAndKind_key "" Default.def Default.def
-        Prelude.Nothing
-        Default.def
-
-instance Hashable.Hashable SearchByScopeAndKind_key where
-  hashWithSalt __salt
-    (SearchByScopeAndKind_key _name _scope _language _kinds _entity)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt
-              (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
-              _language)
-           _kinds)
-        _entity
-
-data SearchByScope_key = SearchByScope_key{searchByScope_key_name
-                                           :: Text.Text,
-                                           searchByScope_key_scope :: [Text.Text],
-                                           searchByScope_key_language :: Glean.Schema.Code.Language,
-                                           searchByScope_key_entity :: Glean.Schema.Code.Entity}
-                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchByScope_key where
-  toJSON
-    (SearchByScope_key __field__name __field__scope __field__language
-       __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "scope" .= __field__scope :
-             "language" .= __field__language :
-               "entity" .= __field__entity : Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchByScope_key where
-  buildStruct _proxy
-    (SearchByScope_key __field__name __field__scope __field__language
-       __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "scope" (Thrift.getListType _proxy) 2 1
-             (Thrift.genList _proxy (Thrift.getStringType _proxy)
-                (Thrift.genText _proxy)
-                __field__scope)
-             :
-             Thrift.genField _proxy "language" (Thrift.getI32Type _proxy) 3 2
-               ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                   Thrift.fromThriftEnum)
-                  __field__language)
-               :
-               Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4 3
-                 (Thrift.buildStruct _proxy __field__entity)
-                 : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__scope <- ST.newSTRef Default.def
-            __field__language <- ST.newSTRef Default.def
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseText
-                                                                                           _proxy))
-                                                                        ST.writeSTRef __field__scope
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "Language")
-                                                                        ST.writeSTRef
-                                                                          __field__language
-                                                                          _val
-                                                                 4 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__scope <- ST.readSTRef __field__scope
-                                             !__val__language <- ST.readSTRef __field__language
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (SearchByScope_key __val__name __val__scope
-                                                  __val__language
-                                                  __val__entity)
-              _idMap
-                = HashMap.fromList
-                    [("name", 1), ("scope", 2), ("language", 3), ("entity", 4)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchByScope_key where
-  rnf
-    (SearchByScope_key __field__name __field__scope __field__language
-       __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__scope `Prelude.seq`
-          DeepSeq.rnf __field__language `Prelude.seq`
-            DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default SearchByScope_key where
-  def = SearchByScope_key "" Default.def Default.def Default.def
-
-instance Hashable.Hashable SearchByScope_key where
-  hashWithSalt __salt
-    (SearchByScope_key _name _scope _language _entity)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
-           _language)
-        _entity
-
-data SearchByNameKindAndLanguage_key = SearchByNameKindAndLanguage_key{searchByNameKindAndLanguage_key_name
-                                                                       :: Text.Text,
-                                                                       searchByNameKindAndLanguage_key_language
-                                                                       ::
-                                                                       Glean.Schema.Code.Language,
-                                                                       searchByNameKindAndLanguage_key_kinds
-                                                                       ::
-                                                                       Prelude.Maybe
-                                                                         Glean.Schema.CodemarkupTypes.SymbolKind,
-                                                                       searchByNameKindAndLanguage_key_entity
-                                                                       :: Glean.Schema.Code.Entity}
-                                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchByNameKindAndLanguage_key where
-  toJSON
-    (SearchByNameKindAndLanguage_key __field__name __field__language
-       __field__kinds __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "language" .= __field__language :
-             Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
-               ("entity" .= __field__entity : Prelude.mempty))
-
-instance Thrift.ThriftStruct SearchByNameKindAndLanguage_key where
-  buildStruct _proxy
-    (SearchByNameKindAndLanguage_key __field__name __field__language
-       __field__kinds __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "language" (Thrift.getI32Type _proxy) 2 1
-             ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                 Thrift.fromThriftEnum)
-                __field__language)
-             :
-             let (__cereal__kinds, __id__kinds)
-                   = case __field__kinds of
-                       Prelude.Just _val -> ((:)
-                                               (Thrift.genField _proxy "kinds"
-                                                  (Thrift.getI32Type _proxy)
-                                                  3
-                                                  2
-                                                  ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                                                      Thrift.fromThriftEnum)
-                                                     _val)),
-                                             3)
-                       Prelude.Nothing -> (Prelude.id, 2)
-               in
-               __cereal__kinds
-                 (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4
-                    __id__kinds
-                    (Thrift.buildStruct _proxy __field__entity)
-                    : []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__language <- ST.newSTRef Default.def
-            __field__kinds <- ST.newSTRef Prelude.Nothing
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "Language")
-                                                                        ST.writeSTRef
-                                                                          __field__language
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "SymbolKind")
-                                                                        ST.writeSTRef __field__kinds
-                                                                          (Prelude.Just _val)
-                                                                 4 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__language <- ST.readSTRef __field__language
-                                             !__val__kinds <- ST.readSTRef __field__kinds
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (SearchByNameKindAndLanguage_key __val__name
-                                                  __val__language
-                                                  __val__kinds
-                                                  __val__entity)
-              _idMap
-                = HashMap.fromList
-                    [("name", 1), ("language", 2), ("kinds", 3), ("entity", 4)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchByNameKindAndLanguage_key where
-  rnf
-    (SearchByNameKindAndLanguage_key __field__name __field__language
-       __field__kinds __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__language `Prelude.seq`
-          DeepSeq.rnf __field__kinds `Prelude.seq`
-            DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default SearchByNameKindAndLanguage_key where
-  def
-    = SearchByNameKindAndLanguage_key "" Default.def Prelude.Nothing
-        Default.def
-
-instance Hashable.Hashable SearchByNameKindAndLanguage_key where
-  hashWithSalt __salt
-    (SearchByNameKindAndLanguage_key _name _language _kinds _entity)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-              _language)
-           _kinds)
-        _entity
-
-data SearchByNameAndLanguage_key = SearchByNameAndLanguage_key{searchByNameAndLanguage_key_name
-                                                               :: Text.Text,
-                                                               searchByNameAndLanguage_key_language
-                                                               :: Glean.Schema.Code.Language,
-                                                               searchByNameAndLanguage_key_entity ::
-                                                               Glean.Schema.Code.Entity}
-                                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchByNameAndLanguage_key where
-  toJSON
-    (SearchByNameAndLanguage_key __field__name __field__language
-       __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "language" .= __field__language :
-             "entity" .= __field__entity : Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchByNameAndLanguage_key where
-  buildStruct _proxy
-    (SearchByNameAndLanguage_key __field__name __field__language
-       __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "language" (Thrift.getI32Type _proxy) 2 1
-             ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                 Thrift.fromThriftEnum)
-                __field__language)
-             :
-             Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 3 2
-               (Thrift.buildStruct _proxy __field__entity)
-               : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__language <- ST.newSTRef Default.def
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "Language")
-                                                                        ST.writeSTRef
-                                                                          __field__language
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__language <- ST.readSTRef __field__language
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (SearchByNameAndLanguage_key __val__name
-                                                  __val__language
-                                                  __val__entity)
-              _idMap
-                = HashMap.fromList [("name", 1), ("language", 2), ("entity", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchByNameAndLanguage_key where
-  rnf
-    (SearchByNameAndLanguage_key __field__name __field__language
-       __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__language `Prelude.seq`
-          DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default SearchByNameAndLanguage_key where
-  def = SearchByNameAndLanguage_key "" Default.def Default.def
-
-instance Hashable.Hashable SearchByNameAndLanguage_key where
-  hashWithSalt __salt
-    (SearchByNameAndLanguage_key _name _language _entity)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-           _language)
-        _entity
-
-data SearchByLowerCaseScopeAndKind_key = SearchByLowerCaseScopeAndKind_key{searchByLowerCaseScopeAndKind_key_name
-                                                                           :: Text.Text,
-                                                                           searchByLowerCaseScopeAndKind_key_scope
-                                                                           :: [Text.Text],
-                                                                           searchByLowerCaseScopeAndKind_key_language
-                                                                           ::
-                                                                           Glean.Schema.Code.Language,
-                                                                           searchByLowerCaseScopeAndKind_key_kinds
-                                                                           ::
-                                                                           Prelude.Maybe
-                                                                             Glean.Schema.CodemarkupTypes.SymbolKind,
-                                                                           searchByLowerCaseScopeAndKind_key_entity
-                                                                           ::
-                                                                           Glean.Schema.Code.Entity}
-                                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchByLowerCaseScopeAndKind_key where
-  toJSON
-    (SearchByLowerCaseScopeAndKind_key __field__name __field__scope
-       __field__language __field__kinds __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "scope" .= __field__scope :
-             "language" .= __field__language :
-               Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
-                 ("entity" .= __field__entity : Prelude.mempty))
-
-instance Thrift.ThriftStruct SearchByLowerCaseScopeAndKind_key
-         where
-  buildStruct _proxy
-    (SearchByLowerCaseScopeAndKind_key __field__name __field__scope
-       __field__language __field__kinds __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "scope" (Thrift.getListType _proxy) 2 1
-             (Thrift.genList _proxy (Thrift.getStringType _proxy)
-                (Thrift.genText _proxy)
-                __field__scope)
-             :
-             Thrift.genField _proxy "language" (Thrift.getI32Type _proxy) 3 2
-               ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                   Thrift.fromThriftEnum)
-                  __field__language)
-               :
-               let (__cereal__kinds, __id__kinds)
-                     = case __field__kinds of
-                         Prelude.Just _val -> ((:)
-                                                 (Thrift.genField _proxy "kinds"
-                                                    (Thrift.getI32Type _proxy)
-                                                    4
-                                                    3
-                                                    ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                                                        Thrift.fromThriftEnum)
-                                                       _val)),
-                                               4)
-                         Prelude.Nothing -> (Prelude.id, 3)
-                 in
-                 __cereal__kinds
-                   (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 5
-                      __id__kinds
-                      (Thrift.buildStruct _proxy __field__entity)
-                      : []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__scope <- ST.newSTRef Default.def
-            __field__language <- ST.newSTRef Default.def
-            __field__kinds <- ST.newSTRef Prelude.Nothing
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseText
-                                                                                           _proxy))
-                                                                        ST.writeSTRef __field__scope
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "Language")
-                                                                        ST.writeSTRef
-                                                                          __field__language
-                                                                          _val
-                                                                 4 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "SymbolKind")
-                                                                        ST.writeSTRef __field__kinds
-                                                                          (Prelude.Just _val)
-                                                                 5 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__scope <- ST.readSTRef __field__scope
-                                             !__val__language <- ST.readSTRef __field__language
-                                             !__val__kinds <- ST.readSTRef __field__kinds
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (SearchByLowerCaseScopeAndKind_key __val__name
-                                                  __val__scope
-                                                  __val__language
-                                                  __val__kinds
-                                                  __val__entity)
-              _idMap
-                = HashMap.fromList
-                    [("name", 1), ("scope", 2), ("language", 3), ("kinds", 4),
-                     ("entity", 5)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchByLowerCaseScopeAndKind_key where
-  rnf
-    (SearchByLowerCaseScopeAndKind_key __field__name __field__scope
-       __field__language __field__kinds __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__scope `Prelude.seq`
-          DeepSeq.rnf __field__language `Prelude.seq`
-            DeepSeq.rnf __field__kinds `Prelude.seq`
-              DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default SearchByLowerCaseScopeAndKind_key where
-  def
-    = SearchByLowerCaseScopeAndKind_key "" Default.def Default.def
-        Prelude.Nothing
-        Default.def
-
-instance Hashable.Hashable SearchByLowerCaseScopeAndKind_key where
-  hashWithSalt __salt
-    (SearchByLowerCaseScopeAndKind_key _name _scope _language _kinds
-       _entity)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt
-              (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
-              _language)
-           _kinds)
-        _entity
-
-data SearchByLowerCaseScope_key = SearchByLowerCaseScope_key{searchByLowerCaseScope_key_name
-                                                             :: Text.Text,
-                                                             searchByLowerCaseScope_key_scope ::
-                                                             [Text.Text],
-                                                             searchByLowerCaseScope_key_language ::
-                                                             Glean.Schema.Code.Language,
-                                                             searchByLowerCaseScope_key_entity ::
-                                                             Glean.Schema.Code.Entity}
-                                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchByLowerCaseScope_key where
-  toJSON
-    (SearchByLowerCaseScope_key __field__name __field__scope
-       __field__language __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "scope" .= __field__scope :
-             "language" .= __field__language :
-               "entity" .= __field__entity : Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchByLowerCaseScope_key where
-  buildStruct _proxy
-    (SearchByLowerCaseScope_key __field__name __field__scope
-       __field__language __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "scope" (Thrift.getListType _proxy) 2 1
-             (Thrift.genList _proxy (Thrift.getStringType _proxy)
-                (Thrift.genText _proxy)
-                __field__scope)
-             :
-             Thrift.genField _proxy "language" (Thrift.getI32Type _proxy) 3 2
-               ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                   Thrift.fromThriftEnum)
-                  __field__language)
-               :
-               Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4 3
-                 (Thrift.buildStruct _proxy __field__entity)
-                 : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__scope <- ST.newSTRef Default.def
-            __field__language <- ST.newSTRef Default.def
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseText
-                                                                                           _proxy))
-                                                                        ST.writeSTRef __field__scope
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "Language")
-                                                                        ST.writeSTRef
-                                                                          __field__language
-                                                                          _val
-                                                                 4 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__scope <- ST.readSTRef __field__scope
-                                             !__val__language <- ST.readSTRef __field__language
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (SearchByLowerCaseScope_key __val__name __val__scope
-                                                  __val__language
-                                                  __val__entity)
-              _idMap
-                = HashMap.fromList
-                    [("name", 1), ("scope", 2), ("language", 3), ("entity", 4)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchByLowerCaseScope_key where
-  rnf
-    (SearchByLowerCaseScope_key __field__name __field__scope
-       __field__language __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__scope `Prelude.seq`
-          DeepSeq.rnf __field__language `Prelude.seq`
-            DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default SearchByLowerCaseScope_key where
-  def
-    = SearchByLowerCaseScope_key "" Default.def Default.def Default.def
-
-instance Hashable.Hashable SearchByLowerCaseScope_key where
-  hashWithSalt __salt
-    (SearchByLowerCaseScope_key _name _scope _language _entity)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
-           _language)
-        _entity
-
-data SearchByLowerCaseNameKindAndLanguage_key = SearchByLowerCaseNameKindAndLanguage_key{searchByLowerCaseNameKindAndLanguage_key_name
-                                                                                         ::
-                                                                                         Text.Text,
-                                                                                         searchByLowerCaseNameKindAndLanguage_key_language
-                                                                                         ::
-                                                                                         Glean.Schema.Code.Language,
-                                                                                         searchByLowerCaseNameKindAndLanguage_key_kinds
-                                                                                         ::
-                                                                                         Prelude.Maybe
-                                                                                           Glean.Schema.CodemarkupTypes.SymbolKind,
-                                                                                         searchByLowerCaseNameKindAndLanguage_key_entity
-                                                                                         ::
-                                                                                         Glean.Schema.Code.Entity}
-                                                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchByLowerCaseNameKindAndLanguage_key
-         where
-  toJSON
-    (SearchByLowerCaseNameKindAndLanguage_key __field__name
-       __field__language __field__kinds __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "language" .= __field__language :
-             Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
-               ("entity" .= __field__entity : Prelude.mempty))
-
-instance Thrift.ThriftStruct
-           SearchByLowerCaseNameKindAndLanguage_key
-         where
-  buildStruct _proxy
-    (SearchByLowerCaseNameKindAndLanguage_key __field__name
-       __field__language __field__kinds __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "language" (Thrift.getI32Type _proxy) 2 1
-             ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                 Thrift.fromThriftEnum)
-                __field__language)
-             :
-             let (__cereal__kinds, __id__kinds)
-                   = case __field__kinds of
-                       Prelude.Just _val -> ((:)
-                                               (Thrift.genField _proxy "kinds"
-                                                  (Thrift.getI32Type _proxy)
-                                                  3
-                                                  2
-                                                  ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                                                      Thrift.fromThriftEnum)
-                                                     _val)),
-                                             3)
-                       Prelude.Nothing -> (Prelude.id, 2)
-               in
-               __cereal__kinds
-                 (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4
-                    __id__kinds
-                    (Thrift.buildStruct _proxy __field__entity)
-                    : []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__language <- ST.newSTRef Default.def
-            __field__kinds <- ST.newSTRef Prelude.Nothing
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "Language")
-                                                                        ST.writeSTRef
-                                                                          __field__language
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "SymbolKind")
-                                                                        ST.writeSTRef __field__kinds
-                                                                          (Prelude.Just _val)
-                                                                 4 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__language <- ST.readSTRef __field__language
-                                             !__val__kinds <- ST.readSTRef __field__kinds
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (SearchByLowerCaseNameKindAndLanguage_key __val__name
-                                                  __val__language
-                                                  __val__kinds
-                                                  __val__entity)
-              _idMap
-                = HashMap.fromList
-                    [("name", 1), ("language", 2), ("kinds", 3), ("entity", 4)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchByLowerCaseNameKindAndLanguage_key
-         where
-  rnf
-    (SearchByLowerCaseNameKindAndLanguage_key __field__name
-       __field__language __field__kinds __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__language `Prelude.seq`
-          DeepSeq.rnf __field__kinds `Prelude.seq`
-            DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default SearchByLowerCaseNameKindAndLanguage_key
-         where
-  def
-    = SearchByLowerCaseNameKindAndLanguage_key "" Default.def
-        Prelude.Nothing
-        Default.def
-
-instance Hashable.Hashable SearchByLowerCaseNameKindAndLanguage_key
-         where
-  hashWithSalt __salt
-    (SearchByLowerCaseNameKindAndLanguage_key _name _language _kinds
-       _entity)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-              _language)
-           _kinds)
-        _entity
-
-data SearchByLowerCaseNameAndLanguage_key = SearchByLowerCaseNameAndLanguage_key{searchByLowerCaseNameAndLanguage_key_name
-                                                                                 :: Text.Text,
-                                                                                 searchByLowerCaseNameAndLanguage_key_language
-                                                                                 ::
-                                                                                 Glean.Schema.Code.Language,
-                                                                                 searchByLowerCaseNameAndLanguage_key_entity
-                                                                                 ::
-                                                                                 Glean.Schema.Code.Entity}
-                                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON SearchByLowerCaseNameAndLanguage_key where
-  toJSON
-    (SearchByLowerCaseNameAndLanguage_key __field__name
-       __field__language __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "language" .= __field__language :
-             "entity" .= __field__entity : Prelude.mempty)
-
-instance Thrift.ThriftStruct SearchByLowerCaseNameAndLanguage_key
-         where
-  buildStruct _proxy
-    (SearchByLowerCaseNameAndLanguage_key __field__name
-       __field__language __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "language" (Thrift.getI32Type _proxy) 2 1
-             ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                 Thrift.fromThriftEnum)
-                __field__language)
-             :
-             Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 3 2
-               (Thrift.buildStruct _proxy __field__entity)
-               : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__language <- ST.newSTRef Default.def
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "Language")
-                                                                        ST.writeSTRef
-                                                                          __field__language
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__language <- ST.readSTRef __field__language
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (SearchByLowerCaseNameAndLanguage_key __val__name
-                                                  __val__language
-                                                  __val__entity)
-              _idMap
-                = HashMap.fromList [("name", 1), ("language", 2), ("entity", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData SearchByLowerCaseNameAndLanguage_key where
-  rnf
-    (SearchByLowerCaseNameAndLanguage_key __field__name
-       __field__language __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__language `Prelude.seq`
-          DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default SearchByLowerCaseNameAndLanguage_key where
-  def
-    = SearchByLowerCaseNameAndLanguage_key "" Default.def Default.def
-
-instance Hashable.Hashable SearchByLowerCaseNameAndLanguage_key
-         where
-  hashWithSalt __salt
-    (SearchByLowerCaseNameAndLanguage_key _name _language _entity)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-           _language)
-        _entity
-
-data RustSearchByNameAndKind_key = RustSearchByNameAndKind_key{rustSearchByNameAndKind_key_name
-                                                               :: Text.Text,
-                                                               rustSearchByNameAndKind_key_kind ::
-                                                               Prelude.Maybe
-                                                                 Glean.Schema.CodemarkupTypes.SymbolKind,
-                                                               rustSearchByNameAndKind_key_entity ::
-                                                               Glean.Schema.Code.Entity}
-                                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON RustSearchByNameAndKind_key where
-  toJSON
-    (RustSearchByNameAndKind_key __field__name __field__kind
-       __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           Prelude.maybe Prelude.id ((:) . ("kind" .=)) __field__kind
-             ("entity" .= __field__entity : Prelude.mempty))
-
-instance Thrift.ThriftStruct RustSearchByNameAndKind_key where
-  buildStruct _proxy
-    (RustSearchByNameAndKind_key __field__name __field__kind
-       __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           let (__cereal__kind, __id__kind)
-                 = case __field__kind of
-                     Prelude.Just _val -> ((:)
-                                             (Thrift.genField _proxy "kind"
-                                                (Thrift.getI32Type _proxy)
-                                                2
-                                                1
-                                                ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                                                    Thrift.fromThriftEnum)
-                                                   _val)),
-                                           2)
-                     Prelude.Nothing -> (Prelude.id, 1)
-             in
-             __cereal__kind
-               (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 3
-                  __id__kind
-                  (Thrift.buildStruct _proxy __field__entity)
-                  : []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__kind <- ST.newSTRef Prelude.Nothing
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "SymbolKind")
-                                                                        ST.writeSTRef __field__kind
-                                                                          (Prelude.Just _val)
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__kind <- ST.readSTRef __field__kind
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (RustSearchByNameAndKind_key __val__name __val__kind
-                                                  __val__entity)
-              _idMap = HashMap.fromList [("name", 1), ("kind", 2), ("entity", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData RustSearchByNameAndKind_key where
-  rnf
-    (RustSearchByNameAndKind_key __field__name __field__kind
-       __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__kind `Prelude.seq`
-          DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default RustSearchByNameAndKind_key where
-  def = RustSearchByNameAndKind_key "" Prelude.Nothing Default.def
-
-instance Hashable.Hashable RustSearchByNameAndKind_key where
-  hashWithSalt __salt
-    (RustSearchByNameAndKind_key _name _kind _entity)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _kind)
-        _entity
-
-data PythonSearchByScopeAndKind_key = PythonSearchByScopeAndKind_key{pythonSearchByScopeAndKind_key_name
-                                                                     :: Text.Text,
-                                                                     pythonSearchByScopeAndKind_key_scope
-                                                                     :: [Text.Text],
-                                                                     pythonSearchByScopeAndKind_key_kinds
-                                                                     ::
-                                                                     Prelude.Maybe
-                                                                       Glean.Schema.CodemarkupTypes.SymbolKind,
-                                                                     pythonSearchByScopeAndKind_key_entity
-                                                                     :: Glean.Schema.Code.Entity}
-                                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON PythonSearchByScopeAndKind_key where
-  toJSON
-    (PythonSearchByScopeAndKind_key __field__name __field__scope
-       __field__kinds __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "scope" .= __field__scope :
-             Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
-               ("entity" .= __field__entity : Prelude.mempty))
-
-instance Thrift.ThriftStruct PythonSearchByScopeAndKind_key where
-  buildStruct _proxy
-    (PythonSearchByScopeAndKind_key __field__name __field__scope
-       __field__kinds __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "scope" (Thrift.getListType _proxy) 2 1
-             (Thrift.genList _proxy (Thrift.getStringType _proxy)
-                (Thrift.genText _proxy)
-                __field__scope)
-             :
-             let (__cereal__kinds, __id__kinds)
-                   = case __field__kinds of
-                       Prelude.Just _val -> ((:)
-                                               (Thrift.genField _proxy "kinds"
-                                                  (Thrift.getI32Type _proxy)
-                                                  3
-                                                  2
-                                                  ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                                                      Thrift.fromThriftEnum)
-                                                     _val)),
-                                             3)
-                       Prelude.Nothing -> (Prelude.id, 2)
-               in
-               __cereal__kinds
-                 (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4
-                    __id__kinds
-                    (Thrift.buildStruct _proxy __field__entity)
-                    : []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__scope <- ST.newSTRef Default.def
-            __field__kinds <- ST.newSTRef Prelude.Nothing
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseText
-                                                                                           _proxy))
-                                                                        ST.writeSTRef __field__scope
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "SymbolKind")
-                                                                        ST.writeSTRef __field__kinds
-                                                                          (Prelude.Just _val)
-                                                                 4 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__scope <- ST.readSTRef __field__scope
-                                             !__val__kinds <- ST.readSTRef __field__kinds
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (PythonSearchByScopeAndKind_key __val__name
-                                                  __val__scope
-                                                  __val__kinds
-                                                  __val__entity)
-              _idMap
-                = HashMap.fromList
-                    [("name", 1), ("scope", 2), ("kinds", 3), ("entity", 4)]
-            _parse 0)
-
-instance DeepSeq.NFData PythonSearchByScopeAndKind_key where
-  rnf
-    (PythonSearchByScopeAndKind_key __field__name __field__scope
-       __field__kinds __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__scope `Prelude.seq`
-          DeepSeq.rnf __field__kinds `Prelude.seq`
-            DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default PythonSearchByScopeAndKind_key where
-  def
-    = PythonSearchByScopeAndKind_key "" Default.def Prelude.Nothing
-        Default.def
-
-instance Hashable.Hashable PythonSearchByScopeAndKind_key where
-  hashWithSalt __salt
-    (PythonSearchByScopeAndKind_key _name _scope _kinds _entity)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
-           _kinds)
-        _entity
-
-data PythonSearchByNameKindAndScopeFact_key = PythonSearchByNameKindAndScopeFact_key{pythonSearchByNameKindAndScopeFact_key_name
-                                                                                     :: Text.Text,
-                                                                                     pythonSearchByNameKindAndScopeFact_key_scope
-                                                                                     ::
-                                                                                     Prelude.Maybe
-                                                                                       Glean.Schema.Python.SName,
-                                                                                     pythonSearchByNameKindAndScopeFact_key_kinds
-                                                                                     ::
-                                                                                     Prelude.Maybe
-                                                                                       Glean.Schema.CodemarkupTypes.SymbolKind,
-                                                                                     pythonSearchByNameKindAndScopeFact_key_entity
-                                                                                     ::
-                                                                                     Glean.Schema.Code.Entity}
-                                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON PythonSearchByNameKindAndScopeFact_key where
-  toJSON
-    (PythonSearchByNameKindAndScopeFact_key __field__name
-       __field__scope __field__kinds __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           Prelude.maybe Prelude.id ((:) . ("scope" .=)) __field__scope
-             (Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
-                ("entity" .= __field__entity : Prelude.mempty)))
-
-instance Thrift.ThriftStruct PythonSearchByNameKindAndScopeFact_key
-         where
-  buildStruct _proxy
-    (PythonSearchByNameKindAndScopeFact_key __field__name
-       __field__scope __field__kinds __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           let (__cereal__scope, __id__scope)
-                 = case __field__scope of
-                     Prelude.Just _val -> ((:)
-                                             (Thrift.genField _proxy "scope"
-                                                (Thrift.getStructType _proxy)
-                                                2
-                                                1
-                                                (Thrift.buildStruct _proxy _val)),
-                                           2)
-                     Prelude.Nothing -> (Prelude.id, 1)
-             in
-             __cereal__scope
-               (let (__cereal__kinds, __id__kinds)
-                      = case __field__kinds of
-                          Prelude.Just _val -> ((:)
-                                                  (Thrift.genField _proxy "kinds"
-                                                     (Thrift.getI32Type _proxy)
-                                                     3
-                                                     __id__scope
-                                                     ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                                                         Thrift.fromThriftEnum)
-                                                        _val)),
-                                                3)
-                          Prelude.Nothing -> (Prelude.id, __id__scope)
-                  in
-                  __cereal__kinds
-                    (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4
-                       __id__kinds
-                       (Thrift.buildStruct _proxy __field__entity)
-                       : [])))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__scope <- ST.newSTRef Prelude.Nothing
-            __field__kinds <- ST.newSTRef Prelude.Nothing
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__scope
-                                                                          (Prelude.Just _val)
-                                                                 3 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "SymbolKind")
-                                                                        ST.writeSTRef __field__kinds
-                                                                          (Prelude.Just _val)
-                                                                 4 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__scope <- ST.readSTRef __field__scope
-                                             !__val__kinds <- ST.readSTRef __field__kinds
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (PythonSearchByNameKindAndScopeFact_key __val__name
-                                                  __val__scope
-                                                  __val__kinds
-                                                  __val__entity)
-              _idMap
-                = HashMap.fromList
-                    [("name", 1), ("scope", 2), ("kinds", 3), ("entity", 4)]
-            _parse 0)
-
-instance DeepSeq.NFData PythonSearchByNameKindAndScopeFact_key
-         where
-  rnf
-    (PythonSearchByNameKindAndScopeFact_key __field__name
-       __field__scope __field__kinds __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__scope `Prelude.seq`
-          DeepSeq.rnf __field__kinds `Prelude.seq`
-            DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default PythonSearchByNameKindAndScopeFact_key
-         where
-  def
-    = PythonSearchByNameKindAndScopeFact_key "" Prelude.Nothing
-        Prelude.Nothing
-        Default.def
-
-instance Hashable.Hashable PythonSearchByNameKindAndScopeFact_key
-         where
-  hashWithSalt __salt
-    (PythonSearchByNameKindAndScopeFact_key _name _scope _kinds
-       _entity)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
-           _kinds)
-        _entity
-
-data PythonSearchByLowerCaseScopeAndKind_key = PythonSearchByLowerCaseScopeAndKind_key{pythonSearchByLowerCaseScopeAndKind_key_name
-                                                                                       :: Text.Text,
-                                                                                       pythonSearchByLowerCaseScopeAndKind_key_scope
-                                                                                       ::
-                                                                                       [Text.Text],
-                                                                                       pythonSearchByLowerCaseScopeAndKind_key_kinds
-                                                                                       ::
-                                                                                       Prelude.Maybe
-                                                                                         Glean.Schema.CodemarkupTypes.SymbolKind,
-                                                                                       pythonSearchByLowerCaseScopeAndKind_key_entity
-                                                                                       ::
-                                                                                       Glean.Schema.Code.Entity}
-                                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON PythonSearchByLowerCaseScopeAndKind_key where
-  toJSON
-    (PythonSearchByLowerCaseScopeAndKind_key __field__name
-       __field__scope __field__kinds __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "scope" .= __field__scope :
-             Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
-               ("entity" .= __field__entity : Prelude.mempty))
-
-instance Thrift.ThriftStruct
-           PythonSearchByLowerCaseScopeAndKind_key
-         where
-  buildStruct _proxy
-    (PythonSearchByLowerCaseScopeAndKind_key __field__name
-       __field__scope __field__kinds __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "scope" (Thrift.getListType _proxy) 2 1
-             (Thrift.genList _proxy (Thrift.getStringType _proxy)
-                (Thrift.genText _proxy)
-                __field__scope)
-             :
-             let (__cereal__kinds, __id__kinds)
-                   = case __field__kinds of
-                       Prelude.Just _val -> ((:)
-                                               (Thrift.genField _proxy "kinds"
-                                                  (Thrift.getI32Type _proxy)
-                                                  3
-                                                  2
-                                                  ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                                                      Thrift.fromThriftEnum)
-                                                     _val)),
-                                             3)
-                       Prelude.Nothing -> (Prelude.id, 2)
-               in
-               __cereal__kinds
-                 (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4
-                    __id__kinds
-                    (Thrift.buildStruct _proxy __field__entity)
-                    : []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__scope <- ST.newSTRef Default.def
-            __field__kinds <- ST.newSTRef Prelude.Nothing
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseText
-                                                                                           _proxy))
-                                                                        ST.writeSTRef __field__scope
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "SymbolKind")
-                                                                        ST.writeSTRef __field__kinds
-                                                                          (Prelude.Just _val)
-                                                                 4 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__scope <- ST.readSTRef __field__scope
-                                             !__val__kinds <- ST.readSTRef __field__kinds
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (PythonSearchByLowerCaseScopeAndKind_key __val__name
-                                                  __val__scope
-                                                  __val__kinds
-                                                  __val__entity)
-              _idMap
-                = HashMap.fromList
-                    [("name", 1), ("scope", 2), ("kinds", 3), ("entity", 4)]
-            _parse 0)
-
-instance DeepSeq.NFData PythonSearchByLowerCaseScopeAndKind_key
-         where
-  rnf
-    (PythonSearchByLowerCaseScopeAndKind_key __field__name
-       __field__scope __field__kinds __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__scope `Prelude.seq`
-          DeepSeq.rnf __field__kinds `Prelude.seq`
-            DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default PythonSearchByLowerCaseScopeAndKind_key
-         where
-  def
-    = PythonSearchByLowerCaseScopeAndKind_key "" Default.def
-        Prelude.Nothing
-        Default.def
-
-instance Hashable.Hashable PythonSearchByLowerCaseScopeAndKind_key
-         where
-  hashWithSalt __salt
-    (PythonSearchByLowerCaseScopeAndKind_key _name _scope _kinds
-       _entity)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
-           _kinds)
-        _entity
-
-data PythonSearchByLowerCaseNameKindAndScopeFact_key = PythonSearchByLowerCaseNameKindAndScopeFact_key{pythonSearchByLowerCaseNameKindAndScopeFact_key_name
-                                                                                                       ::
-                                                                                                       Text.Text,
-                                                                                                       pythonSearchByLowerCaseNameKindAndScopeFact_key_scope
-                                                                                                       ::
-                                                                                                       Prelude.Maybe
-                                                                                                         Glean.Schema.Python.SName,
-                                                                                                       pythonSearchByLowerCaseNameKindAndScopeFact_key_kinds
-                                                                                                       ::
-                                                                                                       Prelude.Maybe
-                                                                                                         Glean.Schema.CodemarkupTypes.SymbolKind,
-                                                                                                       pythonSearchByLowerCaseNameKindAndScopeFact_key_entity
-                                                                                                       ::
-                                                                                                       Glean.Schema.Code.Entity}
-                                                       deriving (Prelude.Eq, Prelude.Show,
-                                                                 Prelude.Ord)
-
-instance Aeson.ToJSON
-           PythonSearchByLowerCaseNameKindAndScopeFact_key
-         where
-  toJSON
-    (PythonSearchByLowerCaseNameKindAndScopeFact_key __field__name
-       __field__scope __field__kinds __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           Prelude.maybe Prelude.id ((:) . ("scope" .=)) __field__scope
-             (Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
-                ("entity" .= __field__entity : Prelude.mempty)))
-
-instance Thrift.ThriftStruct
-           PythonSearchByLowerCaseNameKindAndScopeFact_key
-         where
-  buildStruct _proxy
-    (PythonSearchByLowerCaseNameKindAndScopeFact_key __field__name
-       __field__scope __field__kinds __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           let (__cereal__scope, __id__scope)
-                 = case __field__scope of
-                     Prelude.Just _val -> ((:)
-                                             (Thrift.genField _proxy "scope"
-                                                (Thrift.getStructType _proxy)
-                                                2
-                                                1
-                                                (Thrift.buildStruct _proxy _val)),
-                                           2)
-                     Prelude.Nothing -> (Prelude.id, 1)
-             in
-             __cereal__scope
-               (let (__cereal__kinds, __id__kinds)
-                      = case __field__kinds of
-                          Prelude.Just _val -> ((:)
-                                                  (Thrift.genField _proxy "kinds"
-                                                     (Thrift.getI32Type _proxy)
-                                                     3
-                                                     __id__scope
-                                                     ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                                                         Thrift.fromThriftEnum)
-                                                        _val)),
-                                                3)
-                          Prelude.Nothing -> (Prelude.id, __id__scope)
-                  in
-                  __cereal__kinds
-                    (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4
-                       __id__kinds
-                       (Thrift.buildStruct _proxy __field__entity)
-                       : [])))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__scope <- ST.newSTRef Prelude.Nothing
-            __field__kinds <- ST.newSTRef Prelude.Nothing
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__scope
-                                                                          (Prelude.Just _val)
-                                                                 3 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "SymbolKind")
-                                                                        ST.writeSTRef __field__kinds
-                                                                          (Prelude.Just _val)
-                                                                 4 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__scope <- ST.readSTRef __field__scope
-                                             !__val__kinds <- ST.readSTRef __field__kinds
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (PythonSearchByLowerCaseNameKindAndScopeFact_key
-                                                  __val__name
-                                                  __val__scope
-                                                  __val__kinds
-                                                  __val__entity)
-              _idMap
-                = HashMap.fromList
-                    [("name", 1), ("scope", 2), ("kinds", 3), ("entity", 4)]
-            _parse 0)
-
-instance DeepSeq.NFData
-           PythonSearchByLowerCaseNameKindAndScopeFact_key
-         where
-  rnf
-    (PythonSearchByLowerCaseNameKindAndScopeFact_key __field__name
-       __field__scope __field__kinds __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__scope `Prelude.seq`
-          DeepSeq.rnf __field__kinds `Prelude.seq`
-            DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default
-           PythonSearchByLowerCaseNameKindAndScopeFact_key
-         where
-  def
-    = PythonSearchByLowerCaseNameKindAndScopeFact_key ""
-        Prelude.Nothing
-        Prelude.Nothing
-        Default.def
-
-instance Hashable.Hashable
-           PythonSearchByLowerCaseNameKindAndScopeFact_key
-         where
-  hashWithSalt __salt
-    (PythonSearchByLowerCaseNameKindAndScopeFact_key _name _scope
-       _kinds _entity)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
-           _kinds)
-        _entity
-
-data PythonNameLowerCase_key = PythonNameLowerCase_key{pythonNameLowerCase_key_nameLowercase
-                                                       :: Text.Text,
-                                                       pythonNameLowerCase_key_kinds ::
-                                                       Prelude.Maybe
-                                                         Glean.Schema.CodemarkupTypes.SymbolKind,
-                                                       pythonNameLowerCase_key_name :: Text.Text}
-                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON PythonNameLowerCase_key where
-  toJSON
-    (PythonNameLowerCase_key __field__nameLowercase __field__kinds
-       __field__name)
-    = Aeson.object
-        ("nameLowercase" .= __field__nameLowercase :
-           Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
-             ("name" .= __field__name : Prelude.mempty))
-
-instance Thrift.ThriftStruct PythonNameLowerCase_key where
-  buildStruct _proxy
-    (PythonNameLowerCase_key __field__nameLowercase __field__kinds
-       __field__name)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "nameLowercase"
-           (Thrift.getStringType _proxy)
-           1
-           0
-           (Thrift.genText _proxy __field__nameLowercase)
-           :
-           let (__cereal__kinds, __id__kinds)
-                 = case __field__kinds of
-                     Prelude.Just _val -> ((:)
-                                             (Thrift.genField _proxy "kinds"
-                                                (Thrift.getI32Type _proxy)
-                                                2
-                                                1
-                                                ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                                                    Thrift.fromThriftEnum)
-                                                   _val)),
-                                           2)
-                     Prelude.Nothing -> (Prelude.id, 1)
-             in
-             __cereal__kinds
-               (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 3
-                  __id__kinds
-                  (Thrift.genText _proxy __field__name)
-                  : []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__nameLowercase <- ST.newSTRef ""
-            __field__kinds <- ST.newSTRef Prelude.Nothing
-            __field__name <- ST.newSTRef ""
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__nameLowercase
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "SymbolKind")
-                                                                        ST.writeSTRef __field__kinds
-                                                                          (Prelude.Just _val)
-                                                                 3 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__nameLowercase <- ST.readSTRef
-                                                                        __field__nameLowercase
-                                             !__val__kinds <- ST.readSTRef __field__kinds
-                                             !__val__name <- ST.readSTRef __field__name
-                                             Prelude.pure
-                                               (PythonNameLowerCase_key __val__nameLowercase
-                                                  __val__kinds
-                                                  __val__name)
-              _idMap
-                = HashMap.fromList
-                    [("nameLowercase", 1), ("kinds", 2), ("name", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData PythonNameLowerCase_key where
-  rnf
-    (PythonNameLowerCase_key __field__nameLowercase __field__kinds
-       __field__name)
-    = DeepSeq.rnf __field__nameLowercase `Prelude.seq`
-        DeepSeq.rnf __field__kinds `Prelude.seq`
-          DeepSeq.rnf __field__name `Prelude.seq` ()
-
-instance Default.Default PythonNameLowerCase_key where
-  def = PythonNameLowerCase_key "" Prelude.Nothing ""
-
-instance Hashable.Hashable PythonNameLowerCase_key where
-  hashWithSalt __salt
-    (PythonNameLowerCase_key _nameLowercase _kinds _name)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt __salt _nameLowercase)
-           _kinds)
-        _name
-
-data PpSearchByNameKind_key = PpSearchByNameKind_key{ppSearchByNameKind_key_name
-                                                     :: Text.Text,
-                                                     ppSearchByNameKind_key_kinds ::
-                                                     Prelude.Maybe
-                                                       Glean.Schema.CodemarkupTypes.SymbolKind,
-                                                     ppSearchByNameKind_key_entity ::
-                                                     Glean.Schema.Code.Entity}
-                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON PpSearchByNameKind_key where
-  toJSON
-    (PpSearchByNameKind_key __field__name __field__kinds
-       __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
-             ("entity" .= __field__entity : Prelude.mempty))
-
-instance Thrift.ThriftStruct PpSearchByNameKind_key where
-  buildStruct _proxy
-    (PpSearchByNameKind_key __field__name __field__kinds
-       __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           let (__cereal__kinds, __id__kinds)
-                 = case __field__kinds of
-                     Prelude.Just _val -> ((:)
-                                             (Thrift.genField _proxy "kinds"
-                                                (Thrift.getI32Type _proxy)
-                                                2
-                                                1
-                                                ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                                                    Thrift.fromThriftEnum)
-                                                   _val)),
-                                           2)
-                     Prelude.Nothing -> (Prelude.id, 1)
-             in
-             __cereal__kinds
-               (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 3
-                  __id__kinds
-                  (Thrift.buildStruct _proxy __field__entity)
-                  : []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__kinds <- ST.newSTRef Prelude.Nothing
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "SymbolKind")
-                                                                        ST.writeSTRef __field__kinds
-                                                                          (Prelude.Just _val)
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__kinds <- ST.readSTRef __field__kinds
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (PpSearchByNameKind_key __val__name __val__kinds
-                                                  __val__entity)
-              _idMap
-                = HashMap.fromList [("name", 1), ("kinds", 2), ("entity", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData PpSearchByNameKind_key where
-  rnf
-    (PpSearchByNameKind_key __field__name __field__kinds
-       __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__kinds `Prelude.seq`
-          DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default PpSearchByNameKind_key where
-  def = PpSearchByNameKind_key "" Prelude.Nothing Default.def
-
-instance Hashable.Hashable PpSearchByNameKind_key where
-  hashWithSalt __salt (PpSearchByNameKind_key _name _kinds _entity)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _kinds)
-        _entity
-
-data PpSearchByLowerCaseNameKind_key = PpSearchByLowerCaseNameKind_key{ppSearchByLowerCaseNameKind_key_name
-                                                                       :: Text.Text,
-                                                                       ppSearchByLowerCaseNameKind_key_kinds
-                                                                       ::
-                                                                       Prelude.Maybe
-                                                                         Glean.Schema.CodemarkupTypes.SymbolKind,
-                                                                       ppSearchByLowerCaseNameKind_key_entity
-                                                                       :: Glean.Schema.Code.Entity}
-                                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON PpSearchByLowerCaseNameKind_key where
-  toJSON
-    (PpSearchByLowerCaseNameKind_key __field__name __field__kinds
-       __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
-             ("entity" .= __field__entity : Prelude.mempty))
-
-instance Thrift.ThriftStruct PpSearchByLowerCaseNameKind_key where
-  buildStruct _proxy
-    (PpSearchByLowerCaseNameKind_key __field__name __field__kinds
-       __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           let (__cereal__kinds, __id__kinds)
-                 = case __field__kinds of
-                     Prelude.Just _val -> ((:)
-                                             (Thrift.genField _proxy "kinds"
-                                                (Thrift.getI32Type _proxy)
-                                                2
-                                                1
-                                                ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                                                    Thrift.fromThriftEnum)
-                                                   _val)),
-                                           2)
-                     Prelude.Nothing -> (Prelude.id, 1)
-             in
-             __cereal__kinds
-               (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 3
-                  __id__kinds
-                  (Thrift.buildStruct _proxy __field__entity)
-                  : []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__kinds <- ST.newSTRef Prelude.Nothing
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "SymbolKind")
-                                                                        ST.writeSTRef __field__kinds
-                                                                          (Prelude.Just _val)
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__kinds <- ST.readSTRef __field__kinds
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (PpSearchByLowerCaseNameKind_key __val__name
-                                                  __val__kinds
-                                                  __val__entity)
-              _idMap
-                = HashMap.fromList [("name", 1), ("kinds", 2), ("entity", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData PpSearchByLowerCaseNameKind_key where
-  rnf
-    (PpSearchByLowerCaseNameKind_key __field__name __field__kinds
-       __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__kinds `Prelude.seq`
-          DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default PpSearchByLowerCaseNameKind_key where
-  def
-    = PpSearchByLowerCaseNameKind_key "" Prelude.Nothing Default.def
-
-instance Hashable.Hashable PpSearchByLowerCaseNameKind_key where
-  hashWithSalt __salt
-    (PpSearchByLowerCaseNameKind_key _name _kinds _entity)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _kinds)
-        _entity
-
-data LsifSearchByName_key = LsifSearchByName_key{lsifSearchByName_key_name
-                                                 :: Text.Text,
-                                                 lsifSearchByName_key_entity ::
-                                                 Glean.Schema.Code.Entity}
-                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON LsifSearchByName_key where
-  toJSON (LsifSearchByName_key __field__name __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "entity" .= __field__entity : Prelude.mempty)
-
-instance Thrift.ThriftStruct LsifSearchByName_key where
-  buildStruct _proxy
-    (LsifSearchByName_key __field__name __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__entity)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (LsifSearchByName_key __val__name __val__entity)
-              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData LsifSearchByName_key where
-  rnf (LsifSearchByName_key __field__name __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default LsifSearchByName_key where
-  def = LsifSearchByName_key "" Default.def
-
-instance Hashable.Hashable LsifSearchByName_key where
-  hashWithSalt __salt (LsifSearchByName_key _name _entity)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-        _entity
-
-data LsifSearchByLowerCaseName_key = LsifSearchByLowerCaseName_key{lsifSearchByLowerCaseName_key_name
-                                                                   :: Text.Text,
-                                                                   lsifSearchByLowerCaseName_key_entity
-                                                                   :: Glean.Schema.Code.Entity}
-                                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON LsifSearchByLowerCaseName_key where
-  toJSON
-    (LsifSearchByLowerCaseName_key __field__name __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "entity" .= __field__entity : Prelude.mempty)
-
-instance Thrift.ThriftStruct LsifSearchByLowerCaseName_key where
-  buildStruct _proxy
-    (LsifSearchByLowerCaseName_key __field__name __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__entity)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (LsifSearchByLowerCaseName_key __val__name
-                                                  __val__entity)
-              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData LsifSearchByLowerCaseName_key where
-  rnf (LsifSearchByLowerCaseName_key __field__name __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default LsifSearchByLowerCaseName_key where
-  def = LsifSearchByLowerCaseName_key "" Default.def
-
-instance Hashable.Hashable LsifSearchByLowerCaseName_key where
-  hashWithSalt __salt (LsifSearchByLowerCaseName_key _name _entity)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-        _entity
-
-data KotlinSearchByScopeWithName_key = KotlinSearchByScopeWithName_key{kotlinSearchByScopeWithName_key_name
-                                                                       ::
-                                                                       Glean.Schema.JavakotlinAlpha.Name,
-                                                                       kotlinSearchByScopeWithName_key_insensitive
-                                                                       :: Prelude.Bool,
-                                                                       kotlinSearchByScopeWithName_key_scope
-                                                                       :: [Text.Text],
-                                                                       kotlinSearchByScopeWithName_key_entity
-                                                                       :: Glean.Schema.Code.Entity}
-                                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON KotlinSearchByScopeWithName_key where
-  toJSON
-    (KotlinSearchByScopeWithName_key __field__name __field__insensitive
-       __field__scope __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "insensitive" .= __field__insensitive :
-             "scope" .= __field__scope :
-               "entity" .= __field__entity : Prelude.mempty)
-
-instance Thrift.ThriftStruct KotlinSearchByScopeWithName_key where
-  buildStruct _proxy
-    (KotlinSearchByScopeWithName_key __field__name __field__insensitive
-       __field__scope __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__name)
-           :
-           Thrift.genFieldBool _proxy "insensitive" 2 1 __field__insensitive :
-             Thrift.genField _proxy "scope" (Thrift.getListType _proxy) 3 2
-               (Thrift.genList _proxy (Thrift.getStringType _proxy)
-                  (Thrift.genText _proxy)
-                  __field__scope)
-               :
-               Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4 3
-                 (Thrift.buildStruct _proxy __field__entity)
-                 : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef Default.def
-            __field__insensitive <- ST.newSTRef Prelude.False
-            __field__scope <- ST.newSTRef Default.def
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getBoolType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseBoolF
-                                                                                      _proxy
-                                                                                      _bool)
-                                                                        ST.writeSTRef
-                                                                          __field__insensitive
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseText
-                                                                                           _proxy))
-                                                                        ST.writeSTRef __field__scope
-                                                                          _val
-                                                                 4 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__insensitive <- ST.readSTRef
-                                                                      __field__insensitive
-                                             !__val__scope <- ST.readSTRef __field__scope
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (KotlinSearchByScopeWithName_key __val__name
-                                                  __val__insensitive
-                                                  __val__scope
-                                                  __val__entity)
-              _idMap
-                = HashMap.fromList
-                    [("name", 1), ("insensitive", 2), ("scope", 3), ("entity", 4)]
-            _parse 0)
-
-instance DeepSeq.NFData KotlinSearchByScopeWithName_key where
-  rnf
-    (KotlinSearchByScopeWithName_key __field__name __field__insensitive
-       __field__scope __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__insensitive `Prelude.seq`
-          DeepSeq.rnf __field__scope `Prelude.seq`
-            DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default KotlinSearchByScopeWithName_key where
-  def
-    = KotlinSearchByScopeWithName_key Default.def Prelude.False
-        Default.def
-        Default.def
-
-instance Hashable.Hashable KotlinSearchByScopeWithName_key where
-  hashWithSalt __salt
-    (KotlinSearchByScopeWithName_key _name _insensitive _scope _entity)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-              _insensitive)
-           _scope)
-        _entity
-
-data KotlinSearchByScope_key = KotlinSearchByScope_key{kotlinSearchByScope_key_name
-                                                       :: Text.Text,
-                                                       kotlinSearchByScope_key_scope :: [Text.Text],
-                                                       kotlinSearchByScope_key_entity ::
-                                                       Glean.Schema.Code.Entity}
-                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON KotlinSearchByScope_key where
-  toJSON
-    (KotlinSearchByScope_key __field__name __field__scope
-       __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "scope" .= __field__scope :
-             "entity" .= __field__entity : Prelude.mempty)
-
-instance Thrift.ThriftStruct KotlinSearchByScope_key where
-  buildStruct _proxy
-    (KotlinSearchByScope_key __field__name __field__scope
-       __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "scope" (Thrift.getListType _proxy) 2 1
-             (Thrift.genList _proxy (Thrift.getStringType _proxy)
-                (Thrift.genText _proxy)
-                __field__scope)
-             :
-             Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 3 2
-               (Thrift.buildStruct _proxy __field__entity)
-               : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__scope <- ST.newSTRef Default.def
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseText
-                                                                                           _proxy))
-                                                                        ST.writeSTRef __field__scope
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__scope <- ST.readSTRef __field__scope
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (KotlinSearchByScope_key __val__name __val__scope
-                                                  __val__entity)
-              _idMap
-                = HashMap.fromList [("name", 1), ("scope", 2), ("entity", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData KotlinSearchByScope_key where
-  rnf
-    (KotlinSearchByScope_key __field__name __field__scope
-       __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__scope `Prelude.seq`
-          DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default KotlinSearchByScope_key where
-  def = KotlinSearchByScope_key "" Default.def Default.def
-
-instance Hashable.Hashable KotlinSearchByScope_key where
-  hashWithSalt __salt (KotlinSearchByScope_key _name _scope _entity)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
-        _entity
-
-data KotlinSearchByNameWithFact_key = KotlinSearchByNameWithFact_key{kotlinSearchByNameWithFact_key_name
-                                                                     ::
-                                                                     Glean.Schema.JavakotlinAlpha.QName,
-                                                                     kotlinSearchByNameWithFact_key_entity
-                                                                     :: Glean.Schema.Code.Entity}
-                                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON KotlinSearchByNameWithFact_key where
-  toJSON
-    (KotlinSearchByNameWithFact_key __field__name __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "entity" .= __field__entity : Prelude.mempty)
-
-instance Thrift.ThriftStruct KotlinSearchByNameWithFact_key where
-  buildStruct _proxy
-    (KotlinSearchByNameWithFact_key __field__name __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__name)
-           :
-           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__entity)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef Default.def
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (KotlinSearchByNameWithFact_key __val__name
-                                                  __val__entity)
-              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData KotlinSearchByNameWithFact_key where
-  rnf (KotlinSearchByNameWithFact_key __field__name __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default KotlinSearchByNameWithFact_key where
-  def = KotlinSearchByNameWithFact_key Default.def Default.def
-
-instance Hashable.Hashable KotlinSearchByNameWithFact_key where
-  hashWithSalt __salt (KotlinSearchByNameWithFact_key _name _entity)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-        _entity
-
-data KotlinSearchByName_key = KotlinSearchByName_key{kotlinSearchByName_key_name
-                                                     :: Text.Text,
-                                                     kotlinSearchByName_key_entity ::
-                                                     Glean.Schema.Code.Entity}
-                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON KotlinSearchByName_key where
-  toJSON (KotlinSearchByName_key __field__name __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "entity" .= __field__entity : Prelude.mempty)
-
-instance Thrift.ThriftStruct KotlinSearchByName_key where
-  buildStruct _proxy
-    (KotlinSearchByName_key __field__name __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__entity)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (KotlinSearchByName_key __val__name __val__entity)
-              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData KotlinSearchByName_key where
-  rnf (KotlinSearchByName_key __field__name __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default KotlinSearchByName_key where
-  def = KotlinSearchByName_key "" Default.def
-
-instance Hashable.Hashable KotlinSearchByName_key where
-  hashWithSalt __salt (KotlinSearchByName_key _name _entity)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-        _entity
-
-data KotlinSearchByLowerCaseScope_key = KotlinSearchByLowerCaseScope_key{kotlinSearchByLowerCaseScope_key_name
-                                                                         :: Text.Text,
-                                                                         kotlinSearchByLowerCaseScope_key_scope
-                                                                         :: [Text.Text],
-                                                                         kotlinSearchByLowerCaseScope_key_entity
-                                                                         ::
-                                                                         Glean.Schema.Code.Entity}
-                                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON KotlinSearchByLowerCaseScope_key where
-  toJSON
-    (KotlinSearchByLowerCaseScope_key __field__name __field__scope
-       __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "scope" .= __field__scope :
-             "entity" .= __field__entity : Prelude.mempty)
-
-instance Thrift.ThriftStruct KotlinSearchByLowerCaseScope_key where
-  buildStruct _proxy
-    (KotlinSearchByLowerCaseScope_key __field__name __field__scope
-       __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "scope" (Thrift.getListType _proxy) 2 1
-             (Thrift.genList _proxy (Thrift.getStringType _proxy)
-                (Thrift.genText _proxy)
-                __field__scope)
-             :
-             Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 3 2
-               (Thrift.buildStruct _proxy __field__entity)
-               : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__scope <- ST.newSTRef Default.def
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseText
-                                                                                           _proxy))
-                                                                        ST.writeSTRef __field__scope
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__scope <- ST.readSTRef __field__scope
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (KotlinSearchByLowerCaseScope_key __val__name
-                                                  __val__scope
-                                                  __val__entity)
-              _idMap
-                = HashMap.fromList [("name", 1), ("scope", 2), ("entity", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData KotlinSearchByLowerCaseScope_key where
-  rnf
-    (KotlinSearchByLowerCaseScope_key __field__name __field__scope
-       __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__scope `Prelude.seq`
-          DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default KotlinSearchByLowerCaseScope_key where
-  def = KotlinSearchByLowerCaseScope_key "" Default.def Default.def
-
-instance Hashable.Hashable KotlinSearchByLowerCaseScope_key where
-  hashWithSalt __salt
-    (KotlinSearchByLowerCaseScope_key _name _scope _entity)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
-        _entity
-
-data KotlinSearchByLowerCaseName_key = KotlinSearchByLowerCaseName_key{kotlinSearchByLowerCaseName_key_name
-                                                                       :: Text.Text,
-                                                                       kotlinSearchByLowerCaseName_key_entity
-                                                                       :: Glean.Schema.Code.Entity}
-                                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON KotlinSearchByLowerCaseName_key where
-  toJSON
-    (KotlinSearchByLowerCaseName_key __field__name __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "entity" .= __field__entity : Prelude.mempty)
-
-instance Thrift.ThriftStruct KotlinSearchByLowerCaseName_key where
-  buildStruct _proxy
-    (KotlinSearchByLowerCaseName_key __field__name __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__entity)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (KotlinSearchByLowerCaseName_key __val__name
-                                                  __val__entity)
-              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData KotlinSearchByLowerCaseName_key where
-  rnf (KotlinSearchByLowerCaseName_key __field__name __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default KotlinSearchByLowerCaseName_key where
-  def = KotlinSearchByLowerCaseName_key "" Default.def
-
-instance Hashable.Hashable KotlinSearchByLowerCaseName_key where
-  hashWithSalt __salt (KotlinSearchByLowerCaseName_key _name _entity)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-        _entity
-
-data JavaSearchByScopeWithName_key = JavaSearchByScopeWithName_key{javaSearchByScopeWithName_key_name
-                                                                   ::
-                                                                   Glean.Schema.JavakotlinAlpha.Name,
-                                                                   javaSearchByScopeWithName_key_insensitive
-                                                                   :: Prelude.Bool,
-                                                                   javaSearchByScopeWithName_key_scope
-                                                                   :: [Text.Text],
-                                                                   javaSearchByScopeWithName_key_entity
-                                                                   :: Glean.Schema.Code.Entity}
-                                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON JavaSearchByScopeWithName_key where
-  toJSON
-    (JavaSearchByScopeWithName_key __field__name __field__insensitive
-       __field__scope __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "insensitive" .= __field__insensitive :
-             "scope" .= __field__scope :
-               "entity" .= __field__entity : Prelude.mempty)
-
-instance Thrift.ThriftStruct JavaSearchByScopeWithName_key where
-  buildStruct _proxy
-    (JavaSearchByScopeWithName_key __field__name __field__insensitive
-       __field__scope __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__name)
-           :
-           Thrift.genFieldBool _proxy "insensitive" 2 1 __field__insensitive :
-             Thrift.genField _proxy "scope" (Thrift.getListType _proxy) 3 2
-               (Thrift.genList _proxy (Thrift.getStringType _proxy)
-                  (Thrift.genText _proxy)
-                  __field__scope)
-               :
-               Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4 3
-                 (Thrift.buildStruct _proxy __field__entity)
-                 : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef Default.def
-            __field__insensitive <- ST.newSTRef Prelude.False
-            __field__scope <- ST.newSTRef Default.def
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getBoolType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseBoolF
-                                                                                      _proxy
-                                                                                      _bool)
-                                                                        ST.writeSTRef
-                                                                          __field__insensitive
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseText
-                                                                                           _proxy))
-                                                                        ST.writeSTRef __field__scope
-                                                                          _val
-                                                                 4 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__insensitive <- ST.readSTRef
-                                                                      __field__insensitive
-                                             !__val__scope <- ST.readSTRef __field__scope
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (JavaSearchByScopeWithName_key __val__name
-                                                  __val__insensitive
-                                                  __val__scope
-                                                  __val__entity)
-              _idMap
-                = HashMap.fromList
-                    [("name", 1), ("insensitive", 2), ("scope", 3), ("entity", 4)]
-            _parse 0)
-
-instance DeepSeq.NFData JavaSearchByScopeWithName_key where
-  rnf
-    (JavaSearchByScopeWithName_key __field__name __field__insensitive
-       __field__scope __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__insensitive `Prelude.seq`
-          DeepSeq.rnf __field__scope `Prelude.seq`
-            DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default JavaSearchByScopeWithName_key where
-  def
-    = JavaSearchByScopeWithName_key Default.def Prelude.False
-        Default.def
-        Default.def
-
-instance Hashable.Hashable JavaSearchByScopeWithName_key where
-  hashWithSalt __salt
-    (JavaSearchByScopeWithName_key _name _insensitive _scope _entity)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-              _insensitive)
-           _scope)
-        _entity
-
-data JavaSearchByScope_key = JavaSearchByScope_key{javaSearchByScope_key_name
-                                                   :: Text.Text,
-                                                   javaSearchByScope_key_scope :: [Text.Text],
-                                                   javaSearchByScope_key_entity ::
-                                                   Glean.Schema.Code.Entity}
-                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON JavaSearchByScope_key where
-  toJSON
-    (JavaSearchByScope_key __field__name __field__scope
-       __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "scope" .= __field__scope :
-             "entity" .= __field__entity : Prelude.mempty)
-
-instance Thrift.ThriftStruct JavaSearchByScope_key where
-  buildStruct _proxy
-    (JavaSearchByScope_key __field__name __field__scope
-       __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "scope" (Thrift.getListType _proxy) 2 1
-             (Thrift.genList _proxy (Thrift.getStringType _proxy)
-                (Thrift.genText _proxy)
-                __field__scope)
-             :
-             Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 3 2
-               (Thrift.buildStruct _proxy __field__entity)
-               : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__scope <- ST.newSTRef Default.def
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseText
-                                                                                           _proxy))
-                                                                        ST.writeSTRef __field__scope
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__scope <- ST.readSTRef __field__scope
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (JavaSearchByScope_key __val__name __val__scope
-                                                  __val__entity)
-              _idMap
-                = HashMap.fromList [("name", 1), ("scope", 2), ("entity", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData JavaSearchByScope_key where
-  rnf
-    (JavaSearchByScope_key __field__name __field__scope
-       __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__scope `Prelude.seq`
-          DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default JavaSearchByScope_key where
-  def = JavaSearchByScope_key "" Default.def Default.def
-
-instance Hashable.Hashable JavaSearchByScope_key where
-  hashWithSalt __salt (JavaSearchByScope_key _name _scope _entity)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
-        _entity
-
-data JavaSearchByNameWithFact_key = JavaSearchByNameWithFact_key{javaSearchByNameWithFact_key_name
-                                                                 ::
-                                                                 Glean.Schema.JavakotlinAlpha.QName,
-                                                                 javaSearchByNameWithFact_key_entity
-                                                                 :: Glean.Schema.Code.Entity}
-                                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON JavaSearchByNameWithFact_key where
-  toJSON (JavaSearchByNameWithFact_key __field__name __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "entity" .= __field__entity : Prelude.mempty)
-
-instance Thrift.ThriftStruct JavaSearchByNameWithFact_key where
-  buildStruct _proxy
-    (JavaSearchByNameWithFact_key __field__name __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__name)
-           :
-           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__entity)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef Default.def
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (JavaSearchByNameWithFact_key __val__name
-                                                  __val__entity)
-              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData JavaSearchByNameWithFact_key where
-  rnf (JavaSearchByNameWithFact_key __field__name __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default JavaSearchByNameWithFact_key where
-  def = JavaSearchByNameWithFact_key Default.def Default.def
-
-instance Hashable.Hashable JavaSearchByNameWithFact_key where
-  hashWithSalt __salt (JavaSearchByNameWithFact_key _name _entity)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-        _entity
-
-data JavaSearchByName_key = JavaSearchByName_key{javaSearchByName_key_name
-                                                 :: Text.Text,
-                                                 javaSearchByName_key_entity ::
-                                                 Glean.Schema.Code.Entity}
-                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON JavaSearchByName_key where
-  toJSON (JavaSearchByName_key __field__name __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "entity" .= __field__entity : Prelude.mempty)
-
-instance Thrift.ThriftStruct JavaSearchByName_key where
-  buildStruct _proxy
-    (JavaSearchByName_key __field__name __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__entity)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (JavaSearchByName_key __val__name __val__entity)
-              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData JavaSearchByName_key where
-  rnf (JavaSearchByName_key __field__name __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default JavaSearchByName_key where
-  def = JavaSearchByName_key "" Default.def
-
-instance Hashable.Hashable JavaSearchByName_key where
-  hashWithSalt __salt (JavaSearchByName_key _name _entity)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-        _entity
-
-data JavaSearchByLowerCaseScope_key = JavaSearchByLowerCaseScope_key{javaSearchByLowerCaseScope_key_name
-                                                                     :: Text.Text,
-                                                                     javaSearchByLowerCaseScope_key_scope
-                                                                     :: [Text.Text],
-                                                                     javaSearchByLowerCaseScope_key_entity
-                                                                     :: Glean.Schema.Code.Entity}
-                                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON JavaSearchByLowerCaseScope_key where
-  toJSON
-    (JavaSearchByLowerCaseScope_key __field__name __field__scope
-       __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "scope" .= __field__scope :
-             "entity" .= __field__entity : Prelude.mempty)
-
-instance Thrift.ThriftStruct JavaSearchByLowerCaseScope_key where
-  buildStruct _proxy
-    (JavaSearchByLowerCaseScope_key __field__name __field__scope
-       __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "scope" (Thrift.getListType _proxy) 2 1
-             (Thrift.genList _proxy (Thrift.getStringType _proxy)
-                (Thrift.genText _proxy)
-                __field__scope)
-             :
-             Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 3 2
-               (Thrift.buildStruct _proxy __field__entity)
-               : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__scope <- ST.newSTRef Default.def
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseText
-                                                                                           _proxy))
-                                                                        ST.writeSTRef __field__scope
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__scope <- ST.readSTRef __field__scope
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (JavaSearchByLowerCaseScope_key __val__name
-                                                  __val__scope
-                                                  __val__entity)
-              _idMap
-                = HashMap.fromList [("name", 1), ("scope", 2), ("entity", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData JavaSearchByLowerCaseScope_key where
-  rnf
-    (JavaSearchByLowerCaseScope_key __field__name __field__scope
-       __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__scope `Prelude.seq`
-          DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default JavaSearchByLowerCaseScope_key where
-  def = JavaSearchByLowerCaseScope_key "" Default.def Default.def
-
-instance Hashable.Hashable JavaSearchByLowerCaseScope_key where
-  hashWithSalt __salt
-    (JavaSearchByLowerCaseScope_key _name _scope _entity)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
-        _entity
-
-data JavaSearchByLowerCaseName_key = JavaSearchByLowerCaseName_key{javaSearchByLowerCaseName_key_name
-                                                                   :: Text.Text,
-                                                                   javaSearchByLowerCaseName_key_entity
-                                                                   :: Glean.Schema.Code.Entity}
-                                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON JavaSearchByLowerCaseName_key where
-  toJSON
-    (JavaSearchByLowerCaseName_key __field__name __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "entity" .= __field__entity : Prelude.mempty)
-
-instance Thrift.ThriftStruct JavaSearchByLowerCaseName_key where
-  buildStruct _proxy
-    (JavaSearchByLowerCaseName_key __field__name __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__entity)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (JavaSearchByLowerCaseName_key __val__name
-                                                  __val__entity)
-              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData JavaSearchByLowerCaseName_key where
-  rnf (JavaSearchByLowerCaseName_key __field__name __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default JavaSearchByLowerCaseName_key where
-  def = JavaSearchByLowerCaseName_key "" Default.def
-
-instance Hashable.Hashable JavaSearchByLowerCaseName_key where
-  hashWithSalt __salt (JavaSearchByLowerCaseName_key _name _entity)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-        _entity
-
-data HsSearchByName_key = HsSearchByName_key{hsSearchByName_key_name
-                                             :: Text.Text,
-                                             hsSearchByName_key_entity :: Glean.Schema.Code.Entity}
-                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON HsSearchByName_key where
-  toJSON (HsSearchByName_key __field__name __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "entity" .= __field__entity : Prelude.mempty)
-
-instance Thrift.ThriftStruct HsSearchByName_key where
-  buildStruct _proxy
-    (HsSearchByName_key __field__name __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__entity)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (HsSearchByName_key __val__name __val__entity)
-              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData HsSearchByName_key where
-  rnf (HsSearchByName_key __field__name __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default HsSearchByName_key where
-  def = HsSearchByName_key "" Default.def
-
-instance Hashable.Hashable HsSearchByName_key where
-  hashWithSalt __salt (HsSearchByName_key _name _entity)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-        _entity
-
-data HsSearchByLowerCaseName_key = HsSearchByLowerCaseName_key{hsSearchByLowerCaseName_key_name
-                                                               :: Text.Text,
-                                                               hsSearchByLowerCaseName_key_entity ::
-                                                               Glean.Schema.Code.Entity}
-                                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON HsSearchByLowerCaseName_key where
-  toJSON (HsSearchByLowerCaseName_key __field__name __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "entity" .= __field__entity : Prelude.mempty)
-
-instance Thrift.ThriftStruct HsSearchByLowerCaseName_key where
-  buildStruct _proxy
-    (HsSearchByLowerCaseName_key __field__name __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__entity)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (HsSearchByLowerCaseName_key __val__name
-                                                  __val__entity)
-              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData HsSearchByLowerCaseName_key where
-  rnf (HsSearchByLowerCaseName_key __field__name __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default HsSearchByLowerCaseName_key where
-  def = HsSearchByLowerCaseName_key "" Default.def
-
-instance Hashable.Hashable HsSearchByLowerCaseName_key where
-  hashWithSalt __salt (HsSearchByLowerCaseName_key _name _entity)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-        _entity
-
-data HackSearchByScopeWithNameKinds_key = HackSearchByScopeWithNameKinds_key{hackSearchByScopeWithNameKinds_key_name
-                                                                             :: Text.Text,
-                                                                             hackSearchByScopeWithNameKinds_key_insensitive
-                                                                             :: Prelude.Bool,
-                                                                             hackSearchByScopeWithNameKinds_key_scope
-                                                                             :: [Text.Text],
-                                                                             hackSearchByScopeWithNameKinds_key_kinds
-                                                                             ::
-                                                                             Prelude.Maybe
-                                                                               Glean.Schema.CodemarkupTypes.SymbolKind,
-                                                                             hackSearchByScopeWithNameKinds_key_entity
-                                                                             ::
-                                                                             Glean.Schema.Code.Entity}
-                                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON HackSearchByScopeWithNameKinds_key where
-  toJSON
-    (HackSearchByScopeWithNameKinds_key __field__name
-       __field__insensitive __field__scope __field__kinds __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "insensitive" .= __field__insensitive :
-             "scope" .= __field__scope :
-               Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
-                 ("entity" .= __field__entity : Prelude.mempty))
-
-instance Thrift.ThriftStruct HackSearchByScopeWithNameKinds_key
-         where
-  buildStruct _proxy
-    (HackSearchByScopeWithNameKinds_key __field__name
-       __field__insensitive __field__scope __field__kinds __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genFieldBool _proxy "insensitive" 2 1 __field__insensitive :
-             Thrift.genField _proxy "scope" (Thrift.getListType _proxy) 3 2
-               (Thrift.genList _proxy (Thrift.getStringType _proxy)
-                  (Thrift.genText _proxy)
-                  __field__scope)
-               :
-               let (__cereal__kinds, __id__kinds)
-                     = case __field__kinds of
-                         Prelude.Just _val -> ((:)
-                                                 (Thrift.genField _proxy "kinds"
-                                                    (Thrift.getI32Type _proxy)
-                                                    4
-                                                    3
-                                                    ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                                                        Thrift.fromThriftEnum)
-                                                       _val)),
-                                               4)
-                         Prelude.Nothing -> (Prelude.id, 3)
-                 in
-                 __cereal__kinds
-                   (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 5
-                      __id__kinds
-                      (Thrift.buildStruct _proxy __field__entity)
-                      : []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__insensitive <- ST.newSTRef Prelude.False
-            __field__scope <- ST.newSTRef Default.def
-            __field__kinds <- ST.newSTRef Prelude.Nothing
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getBoolType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseBoolF
-                                                                                      _proxy
-                                                                                      _bool)
-                                                                        ST.writeSTRef
-                                                                          __field__insensitive
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseText
-                                                                                           _proxy))
-                                                                        ST.writeSTRef __field__scope
-                                                                          _val
-                                                                 4 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "SymbolKind")
-                                                                        ST.writeSTRef __field__kinds
-                                                                          (Prelude.Just _val)
-                                                                 5 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__insensitive <- ST.readSTRef
-                                                                      __field__insensitive
-                                             !__val__scope <- ST.readSTRef __field__scope
-                                             !__val__kinds <- ST.readSTRef __field__kinds
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (HackSearchByScopeWithNameKinds_key __val__name
-                                                  __val__insensitive
-                                                  __val__scope
-                                                  __val__kinds
-                                                  __val__entity)
-              _idMap
-                = HashMap.fromList
-                    [("name", 1), ("insensitive", 2), ("scope", 3), ("kinds", 4),
-                     ("entity", 5)]
-            _parse 0)
-
-instance DeepSeq.NFData HackSearchByScopeWithNameKinds_key where
-  rnf
-    (HackSearchByScopeWithNameKinds_key __field__name
-       __field__insensitive __field__scope __field__kinds __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__insensitive `Prelude.seq`
-          DeepSeq.rnf __field__scope `Prelude.seq`
-            DeepSeq.rnf __field__kinds `Prelude.seq`
-              DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default HackSearchByScopeWithNameKinds_key where
-  def
-    = HackSearchByScopeWithNameKinds_key "" Prelude.False Default.def
-        Prelude.Nothing
-        Default.def
-
-instance Hashable.Hashable HackSearchByScopeWithNameKinds_key where
-  hashWithSalt __salt
-    (HackSearchByScopeWithNameKinds_key _name _insensitive _scope
-       _kinds _entity)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt
-              (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-                 _insensitive)
-              _scope)
-           _kinds)
-        _entity
-
-data HackSearchByScopeAndKind_key = HackSearchByScopeAndKind_key{hackSearchByScopeAndKind_key_name
-                                                                 :: Text.Text,
-                                                                 hackSearchByScopeAndKind_key_scope
-                                                                 :: [Text.Text],
-                                                                 hackSearchByScopeAndKind_key_kinds
-                                                                 ::
-                                                                 Prelude.Maybe
-                                                                   Glean.Schema.CodemarkupTypes.SymbolKind,
-                                                                 hackSearchByScopeAndKind_key_entity
-                                                                 :: Glean.Schema.Code.Entity}
-                                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON HackSearchByScopeAndKind_key where
-  toJSON
-    (HackSearchByScopeAndKind_key __field__name __field__scope
-       __field__kinds __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "scope" .= __field__scope :
-             Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
-               ("entity" .= __field__entity : Prelude.mempty))
-
-instance Thrift.ThriftStruct HackSearchByScopeAndKind_key where
-  buildStruct _proxy
-    (HackSearchByScopeAndKind_key __field__name __field__scope
-       __field__kinds __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "scope" (Thrift.getListType _proxy) 2 1
-             (Thrift.genList _proxy (Thrift.getStringType _proxy)
-                (Thrift.genText _proxy)
-                __field__scope)
-             :
-             let (__cereal__kinds, __id__kinds)
-                   = case __field__kinds of
-                       Prelude.Just _val -> ((:)
-                                               (Thrift.genField _proxy "kinds"
-                                                  (Thrift.getI32Type _proxy)
-                                                  3
-                                                  2
-                                                  ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                                                      Thrift.fromThriftEnum)
-                                                     _val)),
-                                             3)
-                       Prelude.Nothing -> (Prelude.id, 2)
-               in
-               __cereal__kinds
-                 (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4
-                    __id__kinds
-                    (Thrift.buildStruct _proxy __field__entity)
-                    : []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__scope <- ST.newSTRef Default.def
-            __field__kinds <- ST.newSTRef Prelude.Nothing
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseText
-                                                                                           _proxy))
-                                                                        ST.writeSTRef __field__scope
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "SymbolKind")
-                                                                        ST.writeSTRef __field__kinds
-                                                                          (Prelude.Just _val)
-                                                                 4 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__scope <- ST.readSTRef __field__scope
-                                             !__val__kinds <- ST.readSTRef __field__kinds
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (HackSearchByScopeAndKind_key __val__name
-                                                  __val__scope
-                                                  __val__kinds
-                                                  __val__entity)
-              _idMap
-                = HashMap.fromList
-                    [("name", 1), ("scope", 2), ("kinds", 3), ("entity", 4)]
-            _parse 0)
-
-instance DeepSeq.NFData HackSearchByScopeAndKind_key where
-  rnf
-    (HackSearchByScopeAndKind_key __field__name __field__scope
-       __field__kinds __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__scope `Prelude.seq`
-          DeepSeq.rnf __field__kinds `Prelude.seq`
-            DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default HackSearchByScopeAndKind_key where
-  def
-    = HackSearchByScopeAndKind_key "" Default.def Prelude.Nothing
-        Default.def
-
-instance Hashable.Hashable HackSearchByScopeAndKind_key where
-  hashWithSalt __salt
-    (HackSearchByScopeAndKind_key _name _scope _kinds _entity)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
-           _kinds)
-        _entity
-
-data HackSearchByNameKindWithQName_key = HackSearchByNameKindWithQName_key{hackSearchByNameKindWithQName_key_name
-                                                                           :: Text.Text,
-                                                                           hackSearchByNameKindWithQName_key_scope
-                                                                           ::
-                                                                           Glean.Schema.Hack.Name,
-                                                                           hackSearchByNameKindWithQName_key_scopeNamespace
-                                                                           ::
-                                                                           Prelude.Maybe
-                                                                             Glean.Schema.Hack.NamespaceQName,
-                                                                           hackSearchByNameKindWithQName_key_kinds
-                                                                           ::
-                                                                           Prelude.Maybe
-                                                                             Glean.Schema.CodemarkupTypes.SymbolKind,
-                                                                           hackSearchByNameKindWithQName_key_entity
-                                                                           ::
-                                                                           Glean.Schema.Code.Entity}
-                                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON HackSearchByNameKindWithQName_key where
-  toJSON
-    (HackSearchByNameKindWithQName_key __field__name __field__scope
-       __field__scopeNamespace __field__kinds __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "scope" .= __field__scope :
-             Prelude.maybe Prelude.id ((:) . ("scopeNamespace" .=))
-               __field__scopeNamespace
-               (Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
-                  ("entity" .= __field__entity : Prelude.mempty)))
-
-instance Thrift.ThriftStruct HackSearchByNameKindWithQName_key
-         where
-  buildStruct _proxy
-    (HackSearchByNameKindWithQName_key __field__name __field__scope
-       __field__scopeNamespace __field__kinds __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "scope" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__scope)
-             :
-             let (__cereal__scopeNamespace, __id__scopeNamespace)
-                   = case __field__scopeNamespace of
-                       Prelude.Just _val -> ((:)
-                                               (Thrift.genField _proxy "scopeNamespace"
-                                                  (Thrift.getStructType _proxy)
-                                                  3
-                                                  2
-                                                  (Thrift.buildStruct _proxy _val)),
-                                             3)
-                       Prelude.Nothing -> (Prelude.id, 2)
-               in
-               __cereal__scopeNamespace
-                 (let (__cereal__kinds, __id__kinds)
-                        = case __field__kinds of
-                            Prelude.Just _val -> ((:)
-                                                    (Thrift.genField _proxy "kinds"
-                                                       (Thrift.getI32Type _proxy)
-                                                       4
-                                                       __id__scopeNamespace
-                                                       ((Thrift.genI32 _proxy . Prelude.fromIntegral
-                                                           . Thrift.fromThriftEnum)
-                                                          _val)),
-                                                  4)
-                            Prelude.Nothing -> (Prelude.id, __id__scopeNamespace)
-                    in
-                    __cereal__kinds
-                      (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 5
-                         __id__kinds
-                         (Thrift.buildStruct _proxy __field__entity)
-                         : [])))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__scope <- ST.newSTRef Default.def
-            __field__scopeNamespace <- ST.newSTRef Prelude.Nothing
-            __field__kinds <- ST.newSTRef Prelude.Nothing
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__scope
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__scopeNamespace
-                                                                          (Prelude.Just _val)
-                                                                 4 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "SymbolKind")
-                                                                        ST.writeSTRef __field__kinds
-                                                                          (Prelude.Just _val)
-                                                                 5 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__scope <- ST.readSTRef __field__scope
-                                             !__val__scopeNamespace <- ST.readSTRef
-                                                                         __field__scopeNamespace
-                                             !__val__kinds <- ST.readSTRef __field__kinds
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (HackSearchByNameKindWithQName_key __val__name
-                                                  __val__scope
-                                                  __val__scopeNamespace
-                                                  __val__kinds
-                                                  __val__entity)
-              _idMap
-                = HashMap.fromList
-                    [("name", 1), ("scope", 2), ("scopeNamespace", 3), ("kinds", 4),
-                     ("entity", 5)]
-            _parse 0)
-
-instance DeepSeq.NFData HackSearchByNameKindWithQName_key where
-  rnf
-    (HackSearchByNameKindWithQName_key __field__name __field__scope
-       __field__scopeNamespace __field__kinds __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__scope `Prelude.seq`
-          DeepSeq.rnf __field__scopeNamespace `Prelude.seq`
-            DeepSeq.rnf __field__kinds `Prelude.seq`
-              DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default HackSearchByNameKindWithQName_key where
-  def
-    = HackSearchByNameKindWithQName_key "" Default.def Prelude.Nothing
-        Prelude.Nothing
-        Default.def
-
-instance Hashable.Hashable HackSearchByNameKindWithQName_key where
-  hashWithSalt __salt
-    (HackSearchByNameKindWithQName_key _name _scope _scopeNamespace
-       _kinds _entity)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt
-              (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
-              _scopeNamespace)
-           _kinds)
-        _entity
-
-data HackSearchByNameKindWithNamespace_key = HackSearchByNameKindWithNamespace_key{hackSearchByNameKindWithNamespace_key_name
-                                                                                   :: Text.Text,
-                                                                                   hackSearchByNameKindWithNamespace_key_scope
-                                                                                   ::
-                                                                                   Prelude.Maybe
-                                                                                     Glean.Schema.Hack.NamespaceQName,
-                                                                                   hackSearchByNameKindWithNamespace_key_kinds
-                                                                                   ::
-                                                                                   Prelude.Maybe
-                                                                                     Glean.Schema.CodemarkupTypes.SymbolKind,
-                                                                                   hackSearchByNameKindWithNamespace_key_entity
-                                                                                   ::
-                                                                                   Glean.Schema.Code.Entity}
-                                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON HackSearchByNameKindWithNamespace_key where
-  toJSON
-    (HackSearchByNameKindWithNamespace_key __field__name __field__scope
-       __field__kinds __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           Prelude.maybe Prelude.id ((:) . ("scope" .=)) __field__scope
-             (Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
-                ("entity" .= __field__entity : Prelude.mempty)))
-
-instance Thrift.ThriftStruct HackSearchByNameKindWithNamespace_key
-         where
-  buildStruct _proxy
-    (HackSearchByNameKindWithNamespace_key __field__name __field__scope
-       __field__kinds __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           let (__cereal__scope, __id__scope)
-                 = case __field__scope of
-                     Prelude.Just _val -> ((:)
-                                             (Thrift.genField _proxy "scope"
-                                                (Thrift.getStructType _proxy)
-                                                2
-                                                1
-                                                (Thrift.buildStruct _proxy _val)),
-                                           2)
-                     Prelude.Nothing -> (Prelude.id, 1)
-             in
-             __cereal__scope
-               (let (__cereal__kinds, __id__kinds)
-                      = case __field__kinds of
-                          Prelude.Just _val -> ((:)
-                                                  (Thrift.genField _proxy "kinds"
-                                                     (Thrift.getI32Type _proxy)
-                                                     3
-                                                     __id__scope
-                                                     ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                                                         Thrift.fromThriftEnum)
-                                                        _val)),
-                                                3)
-                          Prelude.Nothing -> (Prelude.id, __id__scope)
-                  in
-                  __cereal__kinds
-                    (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4
-                       __id__kinds
-                       (Thrift.buildStruct _proxy __field__entity)
-                       : [])))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__scope <- ST.newSTRef Prelude.Nothing
-            __field__kinds <- ST.newSTRef Prelude.Nothing
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__scope
-                                                                          (Prelude.Just _val)
-                                                                 3 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "SymbolKind")
-                                                                        ST.writeSTRef __field__kinds
-                                                                          (Prelude.Just _val)
-                                                                 4 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__scope <- ST.readSTRef __field__scope
-                                             !__val__kinds <- ST.readSTRef __field__kinds
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (HackSearchByNameKindWithNamespace_key __val__name
-                                                  __val__scope
-                                                  __val__kinds
-                                                  __val__entity)
-              _idMap
-                = HashMap.fromList
-                    [("name", 1), ("scope", 2), ("kinds", 3), ("entity", 4)]
-            _parse 0)
-
-instance DeepSeq.NFData HackSearchByNameKindWithNamespace_key where
-  rnf
-    (HackSearchByNameKindWithNamespace_key __field__name __field__scope
-       __field__kinds __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__scope `Prelude.seq`
-          DeepSeq.rnf __field__kinds `Prelude.seq`
-            DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default HackSearchByNameKindWithNamespace_key
-         where
-  def
-    = HackSearchByNameKindWithNamespace_key "" Prelude.Nothing
-        Prelude.Nothing
-        Default.def
-
-instance Hashable.Hashable HackSearchByNameKindWithNamespace_key
-         where
-  hashWithSalt __salt
-    (HackSearchByNameKindWithNamespace_key _name _scope _kinds _entity)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
-           _kinds)
-        _entity
-
-data HackSearchByNameAndKind_key = HackSearchByNameAndKind_key{hackSearchByNameAndKind_key_name
-                                                               :: Text.Text,
-                                                               hackSearchByNameAndKind_key_kinds ::
-                                                               Prelude.Maybe
-                                                                 Glean.Schema.CodemarkupTypes.SymbolKind,
-                                                               hackSearchByNameAndKind_key_entity ::
-                                                               Glean.Schema.Code.Entity}
-                                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON HackSearchByNameAndKind_key where
-  toJSON
-    (HackSearchByNameAndKind_key __field__name __field__kinds
-       __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
-             ("entity" .= __field__entity : Prelude.mempty))
-
-instance Thrift.ThriftStruct HackSearchByNameAndKind_key where
-  buildStruct _proxy
-    (HackSearchByNameAndKind_key __field__name __field__kinds
-       __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           let (__cereal__kinds, __id__kinds)
-                 = case __field__kinds of
-                     Prelude.Just _val -> ((:)
-                                             (Thrift.genField _proxy "kinds"
-                                                (Thrift.getI32Type _proxy)
-                                                2
-                                                1
-                                                ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                                                    Thrift.fromThriftEnum)
-                                                   _val)),
-                                           2)
-                     Prelude.Nothing -> (Prelude.id, 1)
-             in
-             __cereal__kinds
-               (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 3
-                  __id__kinds
-                  (Thrift.buildStruct _proxy __field__entity)
-                  : []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__kinds <- ST.newSTRef Prelude.Nothing
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "SymbolKind")
-                                                                        ST.writeSTRef __field__kinds
-                                                                          (Prelude.Just _val)
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__kinds <- ST.readSTRef __field__kinds
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (HackSearchByNameAndKind_key __val__name __val__kinds
-                                                  __val__entity)
-              _idMap
-                = HashMap.fromList [("name", 1), ("kinds", 2), ("entity", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData HackSearchByNameAndKind_key where
-  rnf
-    (HackSearchByNameAndKind_key __field__name __field__kinds
-       __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__kinds `Prelude.seq`
-          DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default HackSearchByNameAndKind_key where
-  def = HackSearchByNameAndKind_key "" Prelude.Nothing Default.def
-
-instance Hashable.Hashable HackSearchByNameAndKind_key where
-  hashWithSalt __salt
-    (HackSearchByNameAndKind_key _name _kinds _entity)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _kinds)
-        _entity
-
-data HackSearchByLowerCaseScopeAndKind_key = HackSearchByLowerCaseScopeAndKind_key{hackSearchByLowerCaseScopeAndKind_key_name
-                                                                                   :: Text.Text,
-                                                                                   hackSearchByLowerCaseScopeAndKind_key_scope
-                                                                                   :: [Text.Text],
-                                                                                   hackSearchByLowerCaseScopeAndKind_key_kinds
-                                                                                   ::
-                                                                                   Prelude.Maybe
-                                                                                     Glean.Schema.CodemarkupTypes.SymbolKind,
-                                                                                   hackSearchByLowerCaseScopeAndKind_key_entity
-                                                                                   ::
-                                                                                   Glean.Schema.Code.Entity}
-                                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON HackSearchByLowerCaseScopeAndKind_key where
-  toJSON
-    (HackSearchByLowerCaseScopeAndKind_key __field__name __field__scope
-       __field__kinds __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "scope" .= __field__scope :
-             Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
-               ("entity" .= __field__entity : Prelude.mempty))
-
-instance Thrift.ThriftStruct HackSearchByLowerCaseScopeAndKind_key
-         where
-  buildStruct _proxy
-    (HackSearchByLowerCaseScopeAndKind_key __field__name __field__scope
-       __field__kinds __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "scope" (Thrift.getListType _proxy) 2 1
-             (Thrift.genList _proxy (Thrift.getStringType _proxy)
-                (Thrift.genText _proxy)
-                __field__scope)
-             :
-             let (__cereal__kinds, __id__kinds)
-                   = case __field__kinds of
-                       Prelude.Just _val -> ((:)
-                                               (Thrift.genField _proxy "kinds"
-                                                  (Thrift.getI32Type _proxy)
-                                                  3
-                                                  2
-                                                  ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                                                      Thrift.fromThriftEnum)
-                                                     _val)),
-                                             3)
-                       Prelude.Nothing -> (Prelude.id, 2)
-               in
-               __cereal__kinds
-                 (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4
-                    __id__kinds
-                    (Thrift.buildStruct _proxy __field__entity)
-                    : []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__scope <- ST.newSTRef Default.def
-            __field__kinds <- ST.newSTRef Prelude.Nothing
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseText
-                                                                                           _proxy))
-                                                                        ST.writeSTRef __field__scope
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "SymbolKind")
-                                                                        ST.writeSTRef __field__kinds
-                                                                          (Prelude.Just _val)
-                                                                 4 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__scope <- ST.readSTRef __field__scope
-                                             !__val__kinds <- ST.readSTRef __field__kinds
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (HackSearchByLowerCaseScopeAndKind_key __val__name
-                                                  __val__scope
-                                                  __val__kinds
-                                                  __val__entity)
-              _idMap
-                = HashMap.fromList
-                    [("name", 1), ("scope", 2), ("kinds", 3), ("entity", 4)]
-            _parse 0)
-
-instance DeepSeq.NFData HackSearchByLowerCaseScopeAndKind_key where
-  rnf
-    (HackSearchByLowerCaseScopeAndKind_key __field__name __field__scope
-       __field__kinds __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__scope `Prelude.seq`
-          DeepSeq.rnf __field__kinds `Prelude.seq`
-            DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default HackSearchByLowerCaseScopeAndKind_key
-         where
-  def
-    = HackSearchByLowerCaseScopeAndKind_key "" Default.def
-        Prelude.Nothing
-        Default.def
-
-instance Hashable.Hashable HackSearchByLowerCaseScopeAndKind_key
-         where
-  hashWithSalt __salt
-    (HackSearchByLowerCaseScopeAndKind_key _name _scope _kinds _entity)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
-           _kinds)
-        _entity
-
-data HackSearchByLowerCaseNameAndKind_key = HackSearchByLowerCaseNameAndKind_key{hackSearchByLowerCaseNameAndKind_key_name
-                                                                                 :: Text.Text,
-                                                                                 hackSearchByLowerCaseNameAndKind_key_kinds
-                                                                                 ::
-                                                                                 Prelude.Maybe
-                                                                                   Glean.Schema.CodemarkupTypes.SymbolKind,
-                                                                                 hackSearchByLowerCaseNameAndKind_key_entity
-                                                                                 ::
-                                                                                 Glean.Schema.Code.Entity}
-                                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON HackSearchByLowerCaseNameAndKind_key where
-  toJSON
-    (HackSearchByLowerCaseNameAndKind_key __field__name __field__kinds
-       __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
-             ("entity" .= __field__entity : Prelude.mempty))
-
-instance Thrift.ThriftStruct HackSearchByLowerCaseNameAndKind_key
-         where
-  buildStruct _proxy
-    (HackSearchByLowerCaseNameAndKind_key __field__name __field__kinds
-       __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           let (__cereal__kinds, __id__kinds)
-                 = case __field__kinds of
-                     Prelude.Just _val -> ((:)
-                                             (Thrift.genField _proxy "kinds"
-                                                (Thrift.getI32Type _proxy)
-                                                2
-                                                1
-                                                ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                                                    Thrift.fromThriftEnum)
-                                                   _val)),
-                                           2)
-                     Prelude.Nothing -> (Prelude.id, 1)
-             in
-             __cereal__kinds
-               (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 3
-                  __id__kinds
-                  (Thrift.buildStruct _proxy __field__entity)
-                  : []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__kinds <- ST.newSTRef Prelude.Nothing
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "SymbolKind")
-                                                                        ST.writeSTRef __field__kinds
-                                                                          (Prelude.Just _val)
-                                                                 3 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__kinds <- ST.readSTRef __field__kinds
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (HackSearchByLowerCaseNameAndKind_key __val__name
-                                                  __val__kinds
-                                                  __val__entity)
-              _idMap
-                = HashMap.fromList [("name", 1), ("kinds", 2), ("entity", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData HackSearchByLowerCaseNameAndKind_key where
-  rnf
-    (HackSearchByLowerCaseNameAndKind_key __field__name __field__kinds
-       __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__kinds `Prelude.seq`
-          DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default HackSearchByLowerCaseNameAndKind_key where
-  def
-    = HackSearchByLowerCaseNameAndKind_key "" Prelude.Nothing
-        Default.def
-
-instance Hashable.Hashable HackSearchByLowerCaseNameAndKind_key
-         where
-  hashWithSalt __salt
-    (HackSearchByLowerCaseNameAndKind_key _name _kinds _entity)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _kinds)
-        _entity
-
-data HackNameLowerCase_key = HackNameLowerCase_key{hackNameLowerCase_key_nameLowercase
-                                                   :: Text.Text,
-                                                   hackNameLowerCase_key_kinds ::
-                                                   Prelude.Maybe
-                                                     Glean.Schema.CodemarkupTypes.SymbolKind,
-                                                   hackNameLowerCase_key_name :: Text.Text}
-                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON HackNameLowerCase_key where
-  toJSON
-    (HackNameLowerCase_key __field__nameLowercase __field__kinds
-       __field__name)
-    = Aeson.object
-        ("nameLowercase" .= __field__nameLowercase :
-           Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
-             ("name" .= __field__name : Prelude.mempty))
-
-instance Thrift.ThriftStruct HackNameLowerCase_key where
-  buildStruct _proxy
-    (HackNameLowerCase_key __field__nameLowercase __field__kinds
-       __field__name)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "nameLowercase"
-           (Thrift.getStringType _proxy)
-           1
-           0
-           (Thrift.genText _proxy __field__nameLowercase)
-           :
-           let (__cereal__kinds, __id__kinds)
-                 = case __field__kinds of
-                     Prelude.Just _val -> ((:)
-                                             (Thrift.genField _proxy "kinds"
-                                                (Thrift.getI32Type _proxy)
-                                                2
-                                                1
-                                                ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                                                    Thrift.fromThriftEnum)
-                                                   _val)),
-                                           2)
-                     Prelude.Nothing -> (Prelude.id, 1)
-             in
-             __cereal__kinds
-               (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 3
-                  __id__kinds
-                  (Thrift.genText _proxy __field__name)
-                  : []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__nameLowercase <- ST.newSTRef ""
-            __field__kinds <- ST.newSTRef Prelude.Nothing
-            __field__name <- ST.newSTRef ""
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__nameLowercase
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "SymbolKind")
-                                                                        ST.writeSTRef __field__kinds
-                                                                          (Prelude.Just _val)
-                                                                 3 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__nameLowercase <- ST.readSTRef
-                                                                        __field__nameLowercase
-                                             !__val__kinds <- ST.readSTRef __field__kinds
-                                             !__val__name <- ST.readSTRef __field__name
-                                             Prelude.pure
-                                               (HackNameLowerCase_key __val__nameLowercase
-                                                  __val__kinds
-                                                  __val__name)
-              _idMap
-                = HashMap.fromList
-                    [("nameLowercase", 1), ("kinds", 2), ("name", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData HackNameLowerCase_key where
-  rnf
-    (HackNameLowerCase_key __field__nameLowercase __field__kinds
-       __field__name)
-    = DeepSeq.rnf __field__nameLowercase `Prelude.seq`
-        DeepSeq.rnf __field__kinds `Prelude.seq`
-          DeepSeq.rnf __field__name `Prelude.seq` ()
-
-instance Default.Default HackNameLowerCase_key where
-  def = HackNameLowerCase_key "" Prelude.Nothing ""
-
-instance Hashable.Hashable HackNameLowerCase_key where
-  hashWithSalt __salt
-    (HackNameLowerCase_key _nameLowercase _kinds _name)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt __salt _nameLowercase)
-           _kinds)
-        _name
-
-data GraphQLSearchByName_key = GraphQLSearchByName_key{graphQLSearchByName_key_name
-                                                       :: Text.Text,
-                                                       graphQLSearchByName_key_entity ::
-                                                       Glean.Schema.Code.Entity}
-                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON GraphQLSearchByName_key where
-  toJSON (GraphQLSearchByName_key __field__name __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "entity" .= __field__entity : Prelude.mempty)
-
-instance Thrift.ThriftStruct GraphQLSearchByName_key where
-  buildStruct _proxy
-    (GraphQLSearchByName_key __field__name __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__entity)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (GraphQLSearchByName_key __val__name __val__entity)
-              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData GraphQLSearchByName_key where
-  rnf (GraphQLSearchByName_key __field__name __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default GraphQLSearchByName_key where
-  def = GraphQLSearchByName_key "" Default.def
-
-instance Hashable.Hashable GraphQLSearchByName_key where
-  hashWithSalt __salt (GraphQLSearchByName_key _name _entity)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-        _entity
-
-data GraphQLSearchByLowerCaseName_key = GraphQLSearchByLowerCaseName_key{graphQLSearchByLowerCaseName_key_name
-                                                                         :: Text.Text,
-                                                                         graphQLSearchByLowerCaseName_key_entity
-                                                                         ::
-                                                                         Glean.Schema.Code.Entity}
-                                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON GraphQLSearchByLowerCaseName_key where
-  toJSON
-    (GraphQLSearchByLowerCaseName_key __field__name __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "entity" .= __field__entity : Prelude.mempty)
-
-instance Thrift.ThriftStruct GraphQLSearchByLowerCaseName_key where
-  buildStruct _proxy
-    (GraphQLSearchByLowerCaseName_key __field__name __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__entity)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (GraphQLSearchByLowerCaseName_key __val__name
-                                                  __val__entity)
-              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData GraphQLSearchByLowerCaseName_key where
-  rnf
-    (GraphQLSearchByLowerCaseName_key __field__name __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default GraphQLSearchByLowerCaseName_key where
-  def = GraphQLSearchByLowerCaseName_key "" Default.def
-
-instance Hashable.Hashable GraphQLSearchByLowerCaseName_key where
-  hashWithSalt __salt
-    (GraphQLSearchByLowerCaseName_key _name _entity)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-        _entity
-
-data FlowSearchByScopeAndKind_key = FlowSearchByScopeAndKind_key{flowSearchByScopeAndKind_key_name
-                                                                 :: Text.Text,
-                                                                 flowSearchByScopeAndKind_key_scope
-                                                                 :: [Text.Text],
-                                                                 flowSearchByScopeAndKind_key_kinds
-                                                                 ::
-                                                                 Prelude.Maybe
-                                                                   Glean.Schema.CodemarkupTypes.SymbolKind,
-                                                                 flowSearchByScopeAndKind_key_entity
-                                                                 :: Glean.Schema.Code.Entity}
-                                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON FlowSearchByScopeAndKind_key where
-  toJSON
-    (FlowSearchByScopeAndKind_key __field__name __field__scope
-       __field__kinds __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "scope" .= __field__scope :
-             Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
-               ("entity" .= __field__entity : Prelude.mempty))
-
-instance Thrift.ThriftStruct FlowSearchByScopeAndKind_key where
-  buildStruct _proxy
-    (FlowSearchByScopeAndKind_key __field__name __field__scope
-       __field__kinds __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "scope" (Thrift.getListType _proxy) 2 1
-             (Thrift.genList _proxy (Thrift.getStringType _proxy)
-                (Thrift.genText _proxy)
-                __field__scope)
-             :
-             let (__cereal__kinds, __id__kinds)
-                   = case __field__kinds of
-                       Prelude.Just _val -> ((:)
-                                               (Thrift.genField _proxy "kinds"
-                                                  (Thrift.getI32Type _proxy)
-                                                  3
-                                                  2
-                                                  ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                                                      Thrift.fromThriftEnum)
-                                                     _val)),
-                                             3)
-                       Prelude.Nothing -> (Prelude.id, 2)
-               in
-               __cereal__kinds
-                 (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4
-                    __id__kinds
-                    (Thrift.buildStruct _proxy __field__entity)
-                    : []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__scope <- ST.newSTRef Default.def
-            __field__kinds <- ST.newSTRef Prelude.Nothing
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseText
-                                                                                           _proxy))
-                                                                        ST.writeSTRef __field__scope
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "SymbolKind")
-                                                                        ST.writeSTRef __field__kinds
-                                                                          (Prelude.Just _val)
-                                                                 4 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__scope <- ST.readSTRef __field__scope
-                                             !__val__kinds <- ST.readSTRef __field__kinds
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (FlowSearchByScopeAndKind_key __val__name
-                                                  __val__scope
-                                                  __val__kinds
-                                                  __val__entity)
-              _idMap
-                = HashMap.fromList
-                    [("name", 1), ("scope", 2), ("kinds", 3), ("entity", 4)]
-            _parse 0)
-
-instance DeepSeq.NFData FlowSearchByScopeAndKind_key where
-  rnf
-    (FlowSearchByScopeAndKind_key __field__name __field__scope
-       __field__kinds __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__scope `Prelude.seq`
-          DeepSeq.rnf __field__kinds `Prelude.seq`
-            DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default FlowSearchByScopeAndKind_key where
-  def
-    = FlowSearchByScopeAndKind_key "" Default.def Prelude.Nothing
-        Default.def
-
-instance Hashable.Hashable FlowSearchByScopeAndKind_key where
-  hashWithSalt __salt
-    (FlowSearchByScopeAndKind_key _name _scope _kinds _entity)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
-           _kinds)
-        _entity
-
-data FlowSearchByNameKindAndScopeFact_key = FlowSearchByNameKindAndScopeFact_key{flowSearchByNameKindAndScopeFact_key_name
-                                                                                 :: Text.Text,
-                                                                                 flowSearchByNameKindAndScopeFact_key_scope
-                                                                                 ::
-                                                                                 Prelude.Maybe
-                                                                                   Glean.Schema.Flow.Module,
-                                                                                 flowSearchByNameKindAndScopeFact_key_kinds
-                                                                                 ::
-                                                                                 Prelude.Maybe
-                                                                                   Glean.Schema.CodemarkupTypes.SymbolKind,
-                                                                                 flowSearchByNameKindAndScopeFact_key_entity
-                                                                                 ::
-                                                                                 Glean.Schema.Code.Entity}
-                                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON FlowSearchByNameKindAndScopeFact_key where
-  toJSON
-    (FlowSearchByNameKindAndScopeFact_key __field__name __field__scope
-       __field__kinds __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           Prelude.maybe Prelude.id ((:) . ("scope" .=)) __field__scope
-             (Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
-                ("entity" .= __field__entity : Prelude.mempty)))
-
-instance Thrift.ThriftStruct FlowSearchByNameKindAndScopeFact_key
-         where
-  buildStruct _proxy
-    (FlowSearchByNameKindAndScopeFact_key __field__name __field__scope
-       __field__kinds __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           let (__cereal__scope, __id__scope)
-                 = case __field__scope of
-                     Prelude.Just _val -> ((:)
-                                             (Thrift.genField _proxy "scope"
-                                                (Thrift.getStructType _proxy)
-                                                2
-                                                1
-                                                (Thrift.buildStruct _proxy _val)),
-                                           2)
-                     Prelude.Nothing -> (Prelude.id, 1)
-             in
-             __cereal__scope
-               (let (__cereal__kinds, __id__kinds)
-                      = case __field__kinds of
-                          Prelude.Just _val -> ((:)
-                                                  (Thrift.genField _proxy "kinds"
-                                                     (Thrift.getI32Type _proxy)
-                                                     3
-                                                     __id__scope
-                                                     ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                                                         Thrift.fromThriftEnum)
-                                                        _val)),
-                                                3)
-                          Prelude.Nothing -> (Prelude.id, __id__scope)
-                  in
-                  __cereal__kinds
-                    (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4
-                       __id__kinds
-                       (Thrift.buildStruct _proxy __field__entity)
-                       : [])))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__scope <- ST.newSTRef Prelude.Nothing
-            __field__kinds <- ST.newSTRef Prelude.Nothing
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__scope
-                                                                          (Prelude.Just _val)
-                                                                 3 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "SymbolKind")
-                                                                        ST.writeSTRef __field__kinds
-                                                                          (Prelude.Just _val)
-                                                                 4 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__scope <- ST.readSTRef __field__scope
-                                             !__val__kinds <- ST.readSTRef __field__kinds
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (FlowSearchByNameKindAndScopeFact_key __val__name
-                                                  __val__scope
-                                                  __val__kinds
-                                                  __val__entity)
-              _idMap
-                = HashMap.fromList
-                    [("name", 1), ("scope", 2), ("kinds", 3), ("entity", 4)]
-            _parse 0)
-
-instance DeepSeq.NFData FlowSearchByNameKindAndScopeFact_key where
-  rnf
-    (FlowSearchByNameKindAndScopeFact_key __field__name __field__scope
-       __field__kinds __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__scope `Prelude.seq`
-          DeepSeq.rnf __field__kinds `Prelude.seq`
-            DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default FlowSearchByNameKindAndScopeFact_key where
-  def
-    = FlowSearchByNameKindAndScopeFact_key "" Prelude.Nothing
-        Prelude.Nothing
-        Default.def
-
-instance Hashable.Hashable FlowSearchByNameKindAndScopeFact_key
-         where
-  hashWithSalt __salt
-    (FlowSearchByNameKindAndScopeFact_key _name _scope _kinds _entity)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
-           _kinds)
-        _entity
-
-data FlowSearchByLowerCaseScopeAndKind_key = FlowSearchByLowerCaseScopeAndKind_key{flowSearchByLowerCaseScopeAndKind_key_name
-                                                                                   :: Text.Text,
-                                                                                   flowSearchByLowerCaseScopeAndKind_key_scope
-                                                                                   :: [Text.Text],
-                                                                                   flowSearchByLowerCaseScopeAndKind_key_kinds
-                                                                                   ::
-                                                                                   Prelude.Maybe
-                                                                                     Glean.Schema.CodemarkupTypes.SymbolKind,
-                                                                                   flowSearchByLowerCaseScopeAndKind_key_entity
-                                                                                   ::
-                                                                                   Glean.Schema.Code.Entity}
-                                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON FlowSearchByLowerCaseScopeAndKind_key where
-  toJSON
-    (FlowSearchByLowerCaseScopeAndKind_key __field__name __field__scope
-       __field__kinds __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "scope" .= __field__scope :
-             Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
-               ("entity" .= __field__entity : Prelude.mempty))
-
-instance Thrift.ThriftStruct FlowSearchByLowerCaseScopeAndKind_key
-         where
-  buildStruct _proxy
-    (FlowSearchByLowerCaseScopeAndKind_key __field__name __field__scope
-       __field__kinds __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "scope" (Thrift.getListType _proxy) 2 1
-             (Thrift.genList _proxy (Thrift.getStringType _proxy)
-                (Thrift.genText _proxy)
-                __field__scope)
-             :
-             let (__cereal__kinds, __id__kinds)
-                   = case __field__kinds of
-                       Prelude.Just _val -> ((:)
-                                               (Thrift.genField _proxy "kinds"
-                                                  (Thrift.getI32Type _proxy)
-                                                  3
-                                                  2
-                                                  ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                                                      Thrift.fromThriftEnum)
-                                                     _val)),
-                                             3)
-                       Prelude.Nothing -> (Prelude.id, 2)
-               in
-               __cereal__kinds
-                 (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4
-                    __id__kinds
-                    (Thrift.buildStruct _proxy __field__entity)
-                    : []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__scope <- ST.newSTRef Default.def
-            __field__kinds <- ST.newSTRef Prelude.Nothing
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseText
-                                                                                           _proxy))
-                                                                        ST.writeSTRef __field__scope
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "SymbolKind")
-                                                                        ST.writeSTRef __field__kinds
-                                                                          (Prelude.Just _val)
-                                                                 4 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__scope <- ST.readSTRef __field__scope
-                                             !__val__kinds <- ST.readSTRef __field__kinds
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (FlowSearchByLowerCaseScopeAndKind_key __val__name
-                                                  __val__scope
-                                                  __val__kinds
-                                                  __val__entity)
-              _idMap
-                = HashMap.fromList
-                    [("name", 1), ("scope", 2), ("kinds", 3), ("entity", 4)]
-            _parse 0)
-
-instance DeepSeq.NFData FlowSearchByLowerCaseScopeAndKind_key where
-  rnf
-    (FlowSearchByLowerCaseScopeAndKind_key __field__name __field__scope
-       __field__kinds __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__scope `Prelude.seq`
-          DeepSeq.rnf __field__kinds `Prelude.seq`
-            DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default FlowSearchByLowerCaseScopeAndKind_key
-         where
-  def
-    = FlowSearchByLowerCaseScopeAndKind_key "" Default.def
-        Prelude.Nothing
-        Default.def
-
-instance Hashable.Hashable FlowSearchByLowerCaseScopeAndKind_key
-         where
-  hashWithSalt __salt
-    (FlowSearchByLowerCaseScopeAndKind_key _name _scope _kinds _entity)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
-           _kinds)
-        _entity
-
-data FlowSearchByLowerCaseNameKindAndScopeFact_key = FlowSearchByLowerCaseNameKindAndScopeFact_key{flowSearchByLowerCaseNameKindAndScopeFact_key_name
-                                                                                                   ::
-                                                                                                   Text.Text,
-                                                                                                   flowSearchByLowerCaseNameKindAndScopeFact_key_scope
-                                                                                                   ::
-                                                                                                   Prelude.Maybe
-                                                                                                     Glean.Schema.Flow.Module,
-                                                                                                   flowSearchByLowerCaseNameKindAndScopeFact_key_kinds
-                                                                                                   ::
-                                                                                                   Prelude.Maybe
-                                                                                                     Glean.Schema.CodemarkupTypes.SymbolKind,
-                                                                                                   flowSearchByLowerCaseNameKindAndScopeFact_key_entity
-                                                                                                   ::
-                                                                                                   Glean.Schema.Code.Entity}
-                                                     deriving (Prelude.Eq, Prelude.Show,
-                                                               Prelude.Ord)
-
-instance Aeson.ToJSON FlowSearchByLowerCaseNameKindAndScopeFact_key
-         where
-  toJSON
-    (FlowSearchByLowerCaseNameKindAndScopeFact_key __field__name
-       __field__scope __field__kinds __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           Prelude.maybe Prelude.id ((:) . ("scope" .=)) __field__scope
-             (Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
-                ("entity" .= __field__entity : Prelude.mempty)))
-
-instance Thrift.ThriftStruct
-           FlowSearchByLowerCaseNameKindAndScopeFact_key
-         where
-  buildStruct _proxy
-    (FlowSearchByLowerCaseNameKindAndScopeFact_key __field__name
-       __field__scope __field__kinds __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           let (__cereal__scope, __id__scope)
-                 = case __field__scope of
-                     Prelude.Just _val -> ((:)
-                                             (Thrift.genField _proxy "scope"
-                                                (Thrift.getStructType _proxy)
-                                                2
-                                                1
-                                                (Thrift.buildStruct _proxy _val)),
-                                           2)
-                     Prelude.Nothing -> (Prelude.id, 1)
-             in
-             __cereal__scope
-               (let (__cereal__kinds, __id__kinds)
-                      = case __field__kinds of
-                          Prelude.Just _val -> ((:)
-                                                  (Thrift.genField _proxy "kinds"
-                                                     (Thrift.getI32Type _proxy)
-                                                     3
-                                                     __id__scope
-                                                     ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                                                         Thrift.fromThriftEnum)
-                                                        _val)),
-                                                3)
-                          Prelude.Nothing -> (Prelude.id, __id__scope)
-                  in
-                  __cereal__kinds
-                    (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4
-                       __id__kinds
-                       (Thrift.buildStruct _proxy __field__entity)
-                       : [])))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__scope <- ST.newSTRef Prelude.Nothing
-            __field__kinds <- ST.newSTRef Prelude.Nothing
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__scope
-                                                                          (Prelude.Just _val)
-                                                                 3 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "SymbolKind")
-                                                                        ST.writeSTRef __field__kinds
-                                                                          (Prelude.Just _val)
-                                                                 4 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__scope <- ST.readSTRef __field__scope
-                                             !__val__kinds <- ST.readSTRef __field__kinds
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (FlowSearchByLowerCaseNameKindAndScopeFact_key
-                                                  __val__name
-                                                  __val__scope
-                                                  __val__kinds
-                                                  __val__entity)
-              _idMap
-                = HashMap.fromList
-                    [("name", 1), ("scope", 2), ("kinds", 3), ("entity", 4)]
-            _parse 0)
-
-instance DeepSeq.NFData
-           FlowSearchByLowerCaseNameKindAndScopeFact_key
-         where
-  rnf
-    (FlowSearchByLowerCaseNameKindAndScopeFact_key __field__name
-       __field__scope __field__kinds __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__scope `Prelude.seq`
-          DeepSeq.rnf __field__kinds `Prelude.seq`
-            DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default
-           FlowSearchByLowerCaseNameKindAndScopeFact_key
-         where
-  def
-    = FlowSearchByLowerCaseNameKindAndScopeFact_key "" Prelude.Nothing
-        Prelude.Nothing
-        Default.def
-
-instance Hashable.Hashable
-           FlowSearchByLowerCaseNameKindAndScopeFact_key
-         where
-  hashWithSalt __salt
-    (FlowSearchByLowerCaseNameKindAndScopeFact_key _name _scope _kinds
-       _entity)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
-           _kinds)
-        _entity
-
-data FlowNameLowerCase_key = FlowNameLowerCase_key{flowNameLowerCase_key_nameLowercase
-                                                   :: Text.Text,
-                                                   flowNameLowerCase_key_kinds ::
-                                                   Prelude.Maybe
-                                                     Glean.Schema.CodemarkupTypes.SymbolKind,
-                                                   flowNameLowerCase_key_name :: Text.Text}
-                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON FlowNameLowerCase_key where
-  toJSON
-    (FlowNameLowerCase_key __field__nameLowercase __field__kinds
-       __field__name)
-    = Aeson.object
-        ("nameLowercase" .= __field__nameLowercase :
-           Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
-             ("name" .= __field__name : Prelude.mempty))
-
-instance Thrift.ThriftStruct FlowNameLowerCase_key where
-  buildStruct _proxy
-    (FlowNameLowerCase_key __field__nameLowercase __field__kinds
-       __field__name)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "nameLowercase"
-           (Thrift.getStringType _proxy)
-           1
-           0
-           (Thrift.genText _proxy __field__nameLowercase)
-           :
-           let (__cereal__kinds, __id__kinds)
-                 = case __field__kinds of
-                     Prelude.Just _val -> ((:)
-                                             (Thrift.genField _proxy "kinds"
-                                                (Thrift.getI32Type _proxy)
-                                                2
-                                                1
-                                                ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                                                    Thrift.fromThriftEnum)
-                                                   _val)),
-                                           2)
-                     Prelude.Nothing -> (Prelude.id, 1)
-             in
-             __cereal__kinds
-               (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 3
-                  __id__kinds
-                  (Thrift.genText _proxy __field__name)
-                  : []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__nameLowercase <- ST.newSTRef ""
-            __field__kinds <- ST.newSTRef Prelude.Nothing
-            __field__name <- ST.newSTRef ""
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__nameLowercase
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "SymbolKind")
-                                                                        ST.writeSTRef __field__kinds
-                                                                          (Prelude.Just _val)
-                                                                 3 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__nameLowercase <- ST.readSTRef
-                                                                        __field__nameLowercase
-                                             !__val__kinds <- ST.readSTRef __field__kinds
-                                             !__val__name <- ST.readSTRef __field__name
-                                             Prelude.pure
-                                               (FlowNameLowerCase_key __val__nameLowercase
-                                                  __val__kinds
-                                                  __val__name)
-              _idMap
-                = HashMap.fromList
-                    [("nameLowercase", 1), ("kinds", 2), ("name", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData FlowNameLowerCase_key where
-  rnf
-    (FlowNameLowerCase_key __field__nameLowercase __field__kinds
-       __field__name)
-    = DeepSeq.rnf __field__nameLowercase `Prelude.seq`
-        DeepSeq.rnf __field__kinds `Prelude.seq`
-          DeepSeq.rnf __field__name `Prelude.seq` ()
-
-instance Default.Default FlowNameLowerCase_key where
-  def = FlowNameLowerCase_key "" Prelude.Nothing ""
-
-instance Hashable.Hashable FlowNameLowerCase_key where
-  hashWithSalt __salt
-    (FlowNameLowerCase_key _nameLowercase _kinds _name)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt __salt _nameLowercase)
-           _kinds)
-        _name
-
-data FbthriftSearchByNameFact_key = FbthriftSearchByNameFact_key{fbthriftSearchByNameFact_key_name
-                                                                 ::
-                                                                 Glean.Schema.Fbthrift.Identifier,
-                                                                 fbthriftSearchByNameFact_key_entity
-                                                                 :: Glean.Schema.Code.Entity}
-                                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON FbthriftSearchByNameFact_key where
-  toJSON (FbthriftSearchByNameFact_key __field__name __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "entity" .= __field__entity : Prelude.mempty)
-
-instance Thrift.ThriftStruct FbthriftSearchByNameFact_key where
-  buildStruct _proxy
-    (FbthriftSearchByNameFact_key __field__name __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__name)
-           :
-           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__entity)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef Default.def
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (FbthriftSearchByNameFact_key __val__name
-                                                  __val__entity)
-              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData FbthriftSearchByNameFact_key where
-  rnf (FbthriftSearchByNameFact_key __field__name __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default FbthriftSearchByNameFact_key where
-  def = FbthriftSearchByNameFact_key Default.def Default.def
-
-instance Hashable.Hashable FbthriftSearchByNameFact_key where
-  hashWithSalt __salt (FbthriftSearchByNameFact_key _name _entity)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-        _entity
-
-data ErlangSearchByName_key = ErlangSearchByName_key{erlangSearchByName_key_name
-                                                     :: Text.Text,
-                                                     erlangSearchByName_key_entity ::
-                                                     Glean.Schema.Code.Entity}
-                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ErlangSearchByName_key where
-  toJSON (ErlangSearchByName_key __field__name __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "entity" .= __field__entity : Prelude.mempty)
-
-instance Thrift.ThriftStruct ErlangSearchByName_key where
-  buildStruct _proxy
-    (ErlangSearchByName_key __field__name __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__entity)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (ErlangSearchByName_key __val__name __val__entity)
-              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData ErlangSearchByName_key where
-  rnf (ErlangSearchByName_key __field__name __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default ErlangSearchByName_key where
-  def = ErlangSearchByName_key "" Default.def
-
-instance Hashable.Hashable ErlangSearchByName_key where
-  hashWithSalt __salt (ErlangSearchByName_key _name _entity)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-        _entity
-
-data ErlangSearchByLowerCaseName_key = ErlangSearchByLowerCaseName_key{erlangSearchByLowerCaseName_key_name
-                                                                       :: Text.Text,
-                                                                       erlangSearchByLowerCaseName_key_entity
-                                                                       :: Glean.Schema.Code.Entity}
-                                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON ErlangSearchByLowerCaseName_key where
-  toJSON
-    (ErlangSearchByLowerCaseName_key __field__name __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "entity" .= __field__entity : Prelude.mempty)
-
-instance Thrift.ThriftStruct ErlangSearchByLowerCaseName_key where
-  buildStruct _proxy
-    (ErlangSearchByLowerCaseName_key __field__name __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__entity)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (ErlangSearchByLowerCaseName_key __val__name
-                                                  __val__entity)
-              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData ErlangSearchByLowerCaseName_key where
-  rnf (ErlangSearchByLowerCaseName_key __field__name __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default ErlangSearchByLowerCaseName_key where
-  def = ErlangSearchByLowerCaseName_key "" Default.def
-
-instance Hashable.Hashable ErlangSearchByLowerCaseName_key where
-  hashWithSalt __salt (ErlangSearchByLowerCaseName_key _name _entity)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-        _entity
-
-data CxxSearchByScopeAndKind_key = CxxSearchByScopeAndKind_key{cxxSearchByScopeAndKind_key_name
-                                                               :: Text.Text,
-                                                               cxxSearchByScopeAndKind_key_scope ::
-                                                               [Text.Text],
-                                                               cxxSearchByScopeAndKind_key_kinds ::
-                                                               Prelude.Maybe
-                                                                 Glean.Schema.CodemarkupTypes.SymbolKind,
-                                                               cxxSearchByScopeAndKind_key_entity ::
-                                                               Glean.Schema.Code.Entity}
-                                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON CxxSearchByScopeAndKind_key where
-  toJSON
-    (CxxSearchByScopeAndKind_key __field__name __field__scope
-       __field__kinds __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "scope" .= __field__scope :
-             Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
-               ("entity" .= __field__entity : Prelude.mempty))
-
-instance Thrift.ThriftStruct CxxSearchByScopeAndKind_key where
-  buildStruct _proxy
-    (CxxSearchByScopeAndKind_key __field__name __field__scope
-       __field__kinds __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "scope" (Thrift.getListType _proxy) 2 1
-             (Thrift.genList _proxy (Thrift.getStringType _proxy)
-                (Thrift.genText _proxy)
-                __field__scope)
-             :
-             let (__cereal__kinds, __id__kinds)
-                   = case __field__kinds of
-                       Prelude.Just _val -> ((:)
-                                               (Thrift.genField _proxy "kinds"
-                                                  (Thrift.getI32Type _proxy)
-                                                  3
-                                                  2
-                                                  ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                                                      Thrift.fromThriftEnum)
-                                                     _val)),
-                                             3)
-                       Prelude.Nothing -> (Prelude.id, 2)
-               in
-               __cereal__kinds
-                 (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4
-                    __id__kinds
-                    (Thrift.buildStruct _proxy __field__entity)
-                    : []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__scope <- ST.newSTRef Default.def
-            __field__kinds <- ST.newSTRef Prelude.Nothing
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseText
-                                                                                           _proxy))
-                                                                        ST.writeSTRef __field__scope
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "SymbolKind")
-                                                                        ST.writeSTRef __field__kinds
-                                                                          (Prelude.Just _val)
-                                                                 4 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__scope <- ST.readSTRef __field__scope
-                                             !__val__kinds <- ST.readSTRef __field__kinds
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (CxxSearchByScopeAndKind_key __val__name __val__scope
-                                                  __val__kinds
-                                                  __val__entity)
-              _idMap
-                = HashMap.fromList
-                    [("name", 1), ("scope", 2), ("kinds", 3), ("entity", 4)]
-            _parse 0)
-
-instance DeepSeq.NFData CxxSearchByScopeAndKind_key where
-  rnf
-    (CxxSearchByScopeAndKind_key __field__name __field__scope
-       __field__kinds __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__scope `Prelude.seq`
-          DeepSeq.rnf __field__kinds `Prelude.seq`
-            DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default CxxSearchByScopeAndKind_key where
-  def
-    = CxxSearchByScopeAndKind_key "" Default.def Prelude.Nothing
-        Default.def
-
-instance Hashable.Hashable CxxSearchByScopeAndKind_key where
-  hashWithSalt __salt
-    (CxxSearchByScopeAndKind_key _name _scope _kinds _entity)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
-           _kinds)
-        _entity
-
-data CxxSearchByNameKindAndScopeFact_key = CxxSearchByNameKindAndScopeFact_key{cxxSearchByNameKindAndScopeFact_key_name
-                                                                               :: Text.Text,
-                                                                               cxxSearchByNameKindAndScopeFact_key_scope
-                                                                               ::
-                                                                               Glean.Schema.Cxx1.Scope,
-                                                                               cxxSearchByNameKindAndScopeFact_key_kinds
-                                                                               ::
-                                                                               Prelude.Maybe
-                                                                                 Glean.Schema.CodemarkupTypes.SymbolKind,
-                                                                               cxxSearchByNameKindAndScopeFact_key_entity
-                                                                               ::
-                                                                               Glean.Schema.Code.Entity}
-                                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON CxxSearchByNameKindAndScopeFact_key where
-  toJSON
-    (CxxSearchByNameKindAndScopeFact_key __field__name __field__scope
-       __field__kinds __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "scope" .= __field__scope :
-             Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
-               ("entity" .= __field__entity : Prelude.mempty))
-
-instance Thrift.ThriftStruct CxxSearchByNameKindAndScopeFact_key
-         where
-  buildStruct _proxy
-    (CxxSearchByNameKindAndScopeFact_key __field__name __field__scope
-       __field__kinds __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "scope" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__scope)
-             :
-             let (__cereal__kinds, __id__kinds)
-                   = case __field__kinds of
-                       Prelude.Just _val -> ((:)
-                                               (Thrift.genField _proxy "kinds"
-                                                  (Thrift.getI32Type _proxy)
-                                                  3
-                                                  2
-                                                  ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                                                      Thrift.fromThriftEnum)
-                                                     _val)),
-                                             3)
-                       Prelude.Nothing -> (Prelude.id, 2)
-               in
-               __cereal__kinds
-                 (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4
-                    __id__kinds
-                    (Thrift.buildStruct _proxy __field__entity)
-                    : []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__scope <- ST.newSTRef Default.def
-            __field__kinds <- ST.newSTRef Prelude.Nothing
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__scope
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "SymbolKind")
-                                                                        ST.writeSTRef __field__kinds
-                                                                          (Prelude.Just _val)
-                                                                 4 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__scope <- ST.readSTRef __field__scope
-                                             !__val__kinds <- ST.readSTRef __field__kinds
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (CxxSearchByNameKindAndScopeFact_key __val__name
-                                                  __val__scope
-                                                  __val__kinds
-                                                  __val__entity)
-              _idMap
-                = HashMap.fromList
-                    [("name", 1), ("scope", 2), ("kinds", 3), ("entity", 4)]
-            _parse 0)
-
-instance DeepSeq.NFData CxxSearchByNameKindAndScopeFact_key where
-  rnf
-    (CxxSearchByNameKindAndScopeFact_key __field__name __field__scope
-       __field__kinds __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__scope `Prelude.seq`
-          DeepSeq.rnf __field__kinds `Prelude.seq`
-            DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default CxxSearchByNameKindAndScopeFact_key where
-  def
-    = CxxSearchByNameKindAndScopeFact_key "" Default.def
-        Prelude.Nothing
-        Default.def
-
-instance Hashable.Hashable CxxSearchByNameKindAndScopeFact_key
-         where
-  hashWithSalt __salt
-    (CxxSearchByNameKindAndScopeFact_key _name _scope _kinds _entity)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
-           _kinds)
-        _entity
-
-data CxxSearchByLowerCaseScopeAndKind_key = CxxSearchByLowerCaseScopeAndKind_key{cxxSearchByLowerCaseScopeAndKind_key_name
-                                                                                 :: Text.Text,
-                                                                                 cxxSearchByLowerCaseScopeAndKind_key_scope
-                                                                                 :: [Text.Text],
-                                                                                 cxxSearchByLowerCaseScopeAndKind_key_kinds
-                                                                                 ::
-                                                                                 Prelude.Maybe
-                                                                                   Glean.Schema.CodemarkupTypes.SymbolKind,
-                                                                                 cxxSearchByLowerCaseScopeAndKind_key_entity
-                                                                                 ::
-                                                                                 Glean.Schema.Code.Entity}
-                                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON CxxSearchByLowerCaseScopeAndKind_key where
-  toJSON
-    (CxxSearchByLowerCaseScopeAndKind_key __field__name __field__scope
-       __field__kinds __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "scope" .= __field__scope :
-             Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
-               ("entity" .= __field__entity : Prelude.mempty))
-
-instance Thrift.ThriftStruct CxxSearchByLowerCaseScopeAndKind_key
-         where
-  buildStruct _proxy
-    (CxxSearchByLowerCaseScopeAndKind_key __field__name __field__scope
-       __field__kinds __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "scope" (Thrift.getListType _proxy) 2 1
-             (Thrift.genList _proxy (Thrift.getStringType _proxy)
-                (Thrift.genText _proxy)
-                __field__scope)
-             :
-             let (__cereal__kinds, __id__kinds)
-                   = case __field__kinds of
-                       Prelude.Just _val -> ((:)
-                                               (Thrift.genField _proxy "kinds"
-                                                  (Thrift.getI32Type _proxy)
-                                                  3
-                                                  2
-                                                  ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                                                      Thrift.fromThriftEnum)
-                                                     _val)),
-                                             3)
-                       Prelude.Nothing -> (Prelude.id, 2)
-               in
-               __cereal__kinds
-                 (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4
-                    __id__kinds
-                    (Thrift.buildStruct _proxy __field__entity)
-                    : []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__scope <- ST.newSTRef Default.def
-            __field__kinds <- ST.newSTRef Prelude.Nothing
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getListType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Prelude.snd <$>
-                                                                                      Thrift.parseList
-                                                                                        _proxy
-                                                                                        (Thrift.parseText
-                                                                                           _proxy))
-                                                                        ST.writeSTRef __field__scope
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "SymbolKind")
-                                                                        ST.writeSTRef __field__kinds
-                                                                          (Prelude.Just _val)
-                                                                 4 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__scope <- ST.readSTRef __field__scope
-                                             !__val__kinds <- ST.readSTRef __field__kinds
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (CxxSearchByLowerCaseScopeAndKind_key __val__name
-                                                  __val__scope
-                                                  __val__kinds
-                                                  __val__entity)
-              _idMap
-                = HashMap.fromList
-                    [("name", 1), ("scope", 2), ("kinds", 3), ("entity", 4)]
-            _parse 0)
-
-instance DeepSeq.NFData CxxSearchByLowerCaseScopeAndKind_key where
-  rnf
-    (CxxSearchByLowerCaseScopeAndKind_key __field__name __field__scope
-       __field__kinds __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__scope `Prelude.seq`
-          DeepSeq.rnf __field__kinds `Prelude.seq`
-            DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default CxxSearchByLowerCaseScopeAndKind_key where
-  def
-    = CxxSearchByLowerCaseScopeAndKind_key "" Default.def
-        Prelude.Nothing
-        Default.def
-
-instance Hashable.Hashable CxxSearchByLowerCaseScopeAndKind_key
-         where
-  hashWithSalt __salt
-    (CxxSearchByLowerCaseScopeAndKind_key _name _scope _kinds _entity)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
-           _kinds)
-        _entity
-
-data CxxSearchByLowerCaseNameKindAndScopeFact_key = CxxSearchByLowerCaseNameKindAndScopeFact_key{cxxSearchByLowerCaseNameKindAndScopeFact_key_name
-                                                                                                 ::
-                                                                                                 Text.Text,
-                                                                                                 cxxSearchByLowerCaseNameKindAndScopeFact_key_scope
-                                                                                                 ::
-                                                                                                 Glean.Schema.Cxx1.Scope,
-                                                                                                 cxxSearchByLowerCaseNameKindAndScopeFact_key_kinds
-                                                                                                 ::
-                                                                                                 Prelude.Maybe
-                                                                                                   Glean.Schema.CodemarkupTypes.SymbolKind,
-                                                                                                 cxxSearchByLowerCaseNameKindAndScopeFact_key_entity
-                                                                                                 ::
-                                                                                                 Glean.Schema.Code.Entity}
-                                                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON CxxSearchByLowerCaseNameKindAndScopeFact_key
-         where
-  toJSON
-    (CxxSearchByLowerCaseNameKindAndScopeFact_key __field__name
-       __field__scope __field__kinds __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "scope" .= __field__scope :
-             Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
-               ("entity" .= __field__entity : Prelude.mempty))
-
-instance Thrift.ThriftStruct
-           CxxSearchByLowerCaseNameKindAndScopeFact_key
-         where
-  buildStruct _proxy
-    (CxxSearchByLowerCaseNameKindAndScopeFact_key __field__name
-       __field__scope __field__kinds __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "scope" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__scope)
-             :
-             let (__cereal__kinds, __id__kinds)
-                   = case __field__kinds of
-                       Prelude.Just _val -> ((:)
-                                               (Thrift.genField _proxy "kinds"
-                                                  (Thrift.getI32Type _proxy)
-                                                  3
-                                                  2
-                                                  ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                                                      Thrift.fromThriftEnum)
-                                                     _val)),
-                                             3)
-                       Prelude.Nothing -> (Prelude.id, 2)
-               in
-               __cereal__kinds
-                 (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4
-                    __id__kinds
-                    (Thrift.buildStruct _proxy __field__entity)
-                    : []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__scope <- ST.newSTRef Default.def
-            __field__kinds <- ST.newSTRef Prelude.Nothing
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__scope
-                                                                          _val
-                                                                 3 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "SymbolKind")
-                                                                        ST.writeSTRef __field__kinds
-                                                                          (Prelude.Just _val)
-                                                                 4 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__scope <- ST.readSTRef __field__scope
-                                             !__val__kinds <- ST.readSTRef __field__kinds
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (CxxSearchByLowerCaseNameKindAndScopeFact_key
-                                                  __val__name
-                                                  __val__scope
-                                                  __val__kinds
-                                                  __val__entity)
-              _idMap
-                = HashMap.fromList
-                    [("name", 1), ("scope", 2), ("kinds", 3), ("entity", 4)]
-            _parse 0)
-
-instance DeepSeq.NFData
-           CxxSearchByLowerCaseNameKindAndScopeFact_key
-         where
-  rnf
-    (CxxSearchByLowerCaseNameKindAndScopeFact_key __field__name
-       __field__scope __field__kinds __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__scope `Prelude.seq`
-          DeepSeq.rnf __field__kinds `Prelude.seq`
-            DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default
-           CxxSearchByLowerCaseNameKindAndScopeFact_key
-         where
-  def
-    = CxxSearchByLowerCaseNameKindAndScopeFact_key "" Default.def
-        Prelude.Nothing
-        Default.def
-
-instance Hashable.Hashable
-           CxxSearchByLowerCaseNameKindAndScopeFact_key
-         where
-  hashWithSalt __salt
-    (CxxSearchByLowerCaseNameKindAndScopeFact_key _name _scope _kinds
-       _entity)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
-           _kinds)
-        _entity
-
-data CxxPreferDefinitions_key = CxxPreferDefinitions_key{cxxPreferDefinitions_key_from
-                                                         :: Glean.Schema.CodeCxx.Entity,
-                                                         cxxPreferDefinitions_key_to ::
-                                                         Glean.Schema.CodeCxx.Entity}
-                                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON CxxPreferDefinitions_key where
-  toJSON (CxxPreferDefinitions_key __field__from __field__to)
-    = Aeson.object
-        ("from" .= __field__from : "to" .= __field__to : Prelude.mempty)
-
-instance Thrift.ThriftStruct CxxPreferDefinitions_key where
-  buildStruct _proxy
-    (CxxPreferDefinitions_key __field__from __field__to)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "from" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__from)
-           :
-           Thrift.genField _proxy "to" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__to)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__from <- ST.newSTRef Default.def
-            __field__to <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__from
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__to
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__from <- ST.readSTRef __field__from
-                                             !__val__to <- ST.readSTRef __field__to
-                                             Prelude.pure
-                                               (CxxPreferDefinitions_key __val__from __val__to)
-              _idMap = HashMap.fromList [("from", 1), ("to", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData CxxPreferDefinitions_key where
-  rnf (CxxPreferDefinitions_key __field__from __field__to)
-    = DeepSeq.rnf __field__from `Prelude.seq`
-        DeepSeq.rnf __field__to `Prelude.seq` ()
-
-instance Default.Default CxxPreferDefinitions_key where
-  def = CxxPreferDefinitions_key Default.def Default.def
-
-instance Hashable.Hashable CxxPreferDefinitions_key where
-  hashWithSalt __salt (CxxPreferDefinitions_key _from _to)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _from) _to
-
-data CxxNameLowerCase_key = CxxNameLowerCase_key{cxxNameLowerCase_key_nameLowercase
-                                                 :: Text.Text,
-                                                 cxxNameLowerCase_key_kinds ::
-                                                 Prelude.Maybe
-                                                   Glean.Schema.CodemarkupTypes.SymbolKind,
-                                                 cxxNameLowerCase_key_name :: Text.Text}
-                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON CxxNameLowerCase_key where
-  toJSON
-    (CxxNameLowerCase_key __field__nameLowercase __field__kinds
-       __field__name)
-    = Aeson.object
-        ("nameLowercase" .= __field__nameLowercase :
-           Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
-             ("name" .= __field__name : Prelude.mempty))
-
-instance Thrift.ThriftStruct CxxNameLowerCase_key where
-  buildStruct _proxy
-    (CxxNameLowerCase_key __field__nameLowercase __field__kinds
-       __field__name)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "nameLowercase"
-           (Thrift.getStringType _proxy)
-           1
-           0
-           (Thrift.genText _proxy __field__nameLowercase)
-           :
-           let (__cereal__kinds, __id__kinds)
-                 = case __field__kinds of
-                     Prelude.Just _val -> ((:)
-                                             (Thrift.genField _proxy "kinds"
-                                                (Thrift.getI32Type _proxy)
-                                                2
-                                                1
-                                                ((Thrift.genI32 _proxy . Prelude.fromIntegral .
-                                                    Thrift.fromThriftEnum)
-                                                   _val)),
-                                           2)
-                     Prelude.Nothing -> (Prelude.id, 1)
-             in
-             __cereal__kinds
-               (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 3
-                  __id__kinds
-                  (Thrift.genText _proxy __field__name)
-                  : []))
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__nameLowercase <- ST.newSTRef ""
-            __field__kinds <- ST.newSTRef Prelude.Nothing
-            __field__name <- ST.newSTRef ""
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__nameLowercase
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getI32Type _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseEnum
-                                                                                      _proxy
-                                                                                      "SymbolKind")
-                                                                        ST.writeSTRef __field__kinds
-                                                                          (Prelude.Just _val)
-                                                                 3 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__nameLowercase <- ST.readSTRef
-                                                                        __field__nameLowercase
-                                             !__val__kinds <- ST.readSTRef __field__kinds
-                                             !__val__name <- ST.readSTRef __field__name
-                                             Prelude.pure
-                                               (CxxNameLowerCase_key __val__nameLowercase
-                                                  __val__kinds
-                                                  __val__name)
-              _idMap
-                = HashMap.fromList
-                    [("nameLowercase", 1), ("kinds", 2), ("name", 3)]
-            _parse 0)
-
-instance DeepSeq.NFData CxxNameLowerCase_key where
-  rnf
-    (CxxNameLowerCase_key __field__nameLowercase __field__kinds
-       __field__name)
-    = DeepSeq.rnf __field__nameLowercase `Prelude.seq`
-        DeepSeq.rnf __field__kinds `Prelude.seq`
-          DeepSeq.rnf __field__name `Prelude.seq` ()
-
-instance Default.Default CxxNameLowerCase_key where
-  def = CxxNameLowerCase_key "" Prelude.Nothing ""
-
-instance Hashable.Hashable CxxNameLowerCase_key where
-  hashWithSalt __salt
-    (CxxNameLowerCase_key _nameLowercase _kinds _name)
-    = Hashable.hashWithSalt
-        (Hashable.hashWithSalt
-           (Hashable.hashWithSalt __salt _nameLowercase)
-           _kinds)
-        _name
-
-data CSharpSearchByName_key = CSharpSearchByName_key{cSharpSearchByName_key_name
-                                                     :: Text.Text,
-                                                     cSharpSearchByName_key_entity ::
-                                                     Glean.Schema.Code.Entity}
-                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON CSharpSearchByName_key where
-  toJSON (CSharpSearchByName_key __field__name __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "entity" .= __field__entity : Prelude.mempty)
-
-instance Thrift.ThriftStruct CSharpSearchByName_key where
-  buildStruct _proxy
-    (CSharpSearchByName_key __field__name __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__entity)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (CSharpSearchByName_key __val__name __val__entity)
-              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData CSharpSearchByName_key where
-  rnf (CSharpSearchByName_key __field__name __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default CSharpSearchByName_key where
-  def = CSharpSearchByName_key "" Default.def
-
-instance Hashable.Hashable CSharpSearchByName_key where
-  hashWithSalt __salt (CSharpSearchByName_key _name _entity)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-        _entity
-
-data CSharpSearchByLowerCaseName_key = CSharpSearchByLowerCaseName_key{cSharpSearchByLowerCaseName_key_name
-                                                                       :: Text.Text,
-                                                                       cSharpSearchByLowerCaseName_key_entity
-                                                                       :: Glean.Schema.Code.Entity}
-                                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON CSharpSearchByLowerCaseName_key where
-  toJSON
-    (CSharpSearchByLowerCaseName_key __field__name __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "entity" .= __field__entity : Prelude.mempty)
-
-instance Thrift.ThriftStruct CSharpSearchByLowerCaseName_key where
-  buildStruct _proxy
-    (CSharpSearchByLowerCaseName_key __field__name __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__entity)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (CSharpSearchByLowerCaseName_key __val__name
-                                                  __val__entity)
-              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData CSharpSearchByLowerCaseName_key where
-  rnf (CSharpSearchByLowerCaseName_key __field__name __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default CSharpSearchByLowerCaseName_key where
-  def = CSharpSearchByLowerCaseName_key "" Default.def
-
-instance Hashable.Hashable CSharpSearchByLowerCaseName_key where
-  hashWithSalt __salt (CSharpSearchByLowerCaseName_key _name _entity)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-        _entity
-
-data BuckSearchByName_key = BuckSearchByName_key{buckSearchByName_key_name
-                                                 :: Text.Text,
-                                                 buckSearchByName_key_entity ::
-                                                 Glean.Schema.Code.Entity}
-                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON BuckSearchByName_key where
-  toJSON (BuckSearchByName_key __field__name __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "entity" .= __field__entity : Prelude.mempty)
-
-instance Thrift.ThriftStruct BuckSearchByName_key where
-  buildStruct _proxy
-    (BuckSearchByName_key __field__name __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__entity)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (BuckSearchByName_key __val__name __val__entity)
-              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData BuckSearchByName_key where
-  rnf (BuckSearchByName_key __field__name __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default BuckSearchByName_key where
-  def = BuckSearchByName_key "" Default.def
-
-instance Hashable.Hashable BuckSearchByName_key where
-  hashWithSalt __salt (BuckSearchByName_key _name _entity)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-        _entity
-
-data BuckSearchByLowerCaseName_key = BuckSearchByLowerCaseName_key{buckSearchByLowerCaseName_key_name
-                                                                   :: Text.Text,
-                                                                   buckSearchByLowerCaseName_key_entity
-                                                                   :: Glean.Schema.Code.Entity}
-                                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON BuckSearchByLowerCaseName_key where
-  toJSON
-    (BuckSearchByLowerCaseName_key __field__name __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "entity" .= __field__entity : Prelude.mempty)
-
-instance Thrift.ThriftStruct BuckSearchByLowerCaseName_key where
-  buildStruct _proxy
-    (BuckSearchByLowerCaseName_key __field__name __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__entity)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (BuckSearchByLowerCaseName_key __val__name
-                                                  __val__entity)
-              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData BuckSearchByLowerCaseName_key where
-  rnf (BuckSearchByLowerCaseName_key __field__name __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default BuckSearchByLowerCaseName_key where
-  def = BuckSearchByLowerCaseName_key "" Default.def
-
-instance Hashable.Hashable BuckSearchByLowerCaseName_key where
-  hashWithSalt __salt (BuckSearchByLowerCaseName_key _name _entity)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-        _entity
-
-data BuckSearchByLocalNameFact_key = BuckSearchByLocalNameFact_key{buckSearchByLocalNameFact_key_name
-                                                                   :: Glean.Schema.Buck.LocalName,
-                                                                   buckSearchByLocalNameFact_key_entity
-                                                                   :: Glean.Schema.Code.Entity}
-                                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON BuckSearchByLocalNameFact_key where
-  toJSON
-    (BuckSearchByLocalNameFact_key __field__name __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "entity" .= __field__entity : Prelude.mempty)
-
-instance Thrift.ThriftStruct BuckSearchByLocalNameFact_key where
-  buildStruct _proxy
-    (BuckSearchByLocalNameFact_key __field__name __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
-           (Thrift.buildStruct _proxy __field__name)
-           :
-           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__entity)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef Default.def
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (BuckSearchByLocalNameFact_key __val__name
-                                                  __val__entity)
-              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData BuckSearchByLocalNameFact_key where
-  rnf (BuckSearchByLocalNameFact_key __field__name __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default BuckSearchByLocalNameFact_key where
-  def = BuckSearchByLocalNameFact_key Default.def Default.def
-
-instance Hashable.Hashable BuckSearchByLocalNameFact_key where
-  hashWithSalt __salt (BuckSearchByLocalNameFact_key _name _entity)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-        _entity
-
-data AngleSearchByName_key = AngleSearchByName_key{angleSearchByName_key_name
-                                                   :: Text.Text,
-                                                   angleSearchByName_key_entity ::
-                                                   Glean.Schema.Code.Entity}
-                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON AngleSearchByName_key where
-  toJSON (AngleSearchByName_key __field__name __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "entity" .= __field__entity : Prelude.mempty)
-
-instance Thrift.ThriftStruct AngleSearchByName_key where
-  buildStruct _proxy
-    (AngleSearchByName_key __field__name __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__entity)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (AngleSearchByName_key __val__name __val__entity)
-              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData AngleSearchByName_key where
-  rnf (AngleSearchByName_key __field__name __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default AngleSearchByName_key where
-  def = AngleSearchByName_key "" Default.def
-
-instance Hashable.Hashable AngleSearchByName_key where
-  hashWithSalt __salt (AngleSearchByName_key _name _entity)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-        _entity
-
-data AngleSearchByLowerCaseName_key = AngleSearchByLowerCaseName_key{angleSearchByLowerCaseName_key_name
-                                                                     :: Text.Text,
-                                                                     angleSearchByLowerCaseName_key_entity
-                                                                     :: Glean.Schema.Code.Entity}
-                                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON AngleSearchByLowerCaseName_key where
-  toJSON
-    (AngleSearchByLowerCaseName_key __field__name __field__entity)
-    = Aeson.object
-        ("name" .= __field__name :
-           "entity" .= __field__entity : Prelude.mempty)
-
-instance Thrift.ThriftStruct AngleSearchByLowerCaseName_key where
-  buildStruct _proxy
-    (AngleSearchByLowerCaseName_key __field__name __field__entity)
-    = Thrift.genStruct _proxy
-        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
-           (Thrift.genText _proxy __field__name)
-           :
-           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
-             (Thrift.buildStruct _proxy __field__entity)
-             : [])
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            __field__name <- ST.newSTRef ""
-            __field__entity <- ST.newSTRef Default.def
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 1 | _type ==
-                                                                       Thrift.getStringType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseText
-                                                                                      _proxy)
-                                                                        ST.writeSTRef __field__name
-                                                                          _val
-                                                                 2 | _type ==
-                                                                       Thrift.getStructType _proxy
-                                                                     ->
-                                                                     do !_val <- Trans.lift
-                                                                                   (Thrift.parseStruct
-                                                                                      _proxy)
-                                                                        ST.writeSTRef
-                                                                          __field__entity
-                                                                          _val
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
-                                             !__val__entity <- ST.readSTRef __field__entity
-                                             Prelude.pure
-                                               (AngleSearchByLowerCaseName_key __val__name
-                                                  __val__entity)
-              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
-            _parse 0)
-
-instance DeepSeq.NFData AngleSearchByLowerCaseName_key where
-  rnf (AngleSearchByLowerCaseName_key __field__name __field__entity)
-    = DeepSeq.rnf __field__name `Prelude.seq`
-        DeepSeq.rnf __field__entity `Prelude.seq` ()
-
-instance Default.Default AngleSearchByLowerCaseName_key where
-  def = AngleSearchByLowerCaseName_key "" Default.def
-
-instance Hashable.Hashable AngleSearchByLowerCaseName_key where
-  hashWithSalt __salt (AngleSearchByLowerCaseName_key _name _entity)
-    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
-        _entity
-{-# LINE 27 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.BuckSearchByName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.BuckSearchByName_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.BuckSearchByName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.BuckSearchByName_key"
-           (Prelude.Just 0))
-{-# LINE 36 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.BuckSearchByName_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-          ('Angle.TNoFields))
-{-# LINE 38 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.BuckSearchByName
-         where
-  type KeyType Glean.Schema.SearchCode.Types.BuckSearchByName =
-       Glean.Schema.SearchCode.Types.BuckSearchByName_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.BuckSearchByName" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.SearchCode.Types.buckSearchByName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.BuckSearchByName x k
-  getFactKey = Glean.Schema.SearchCode.Types.buckSearchByName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 47 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type Glean.Schema.SearchCode.Types.BuckSearchByName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 53 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.BuckSearchByLowerCaseName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.BuckSearchByLowerCaseName_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.BuckSearchByLowerCaseName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.BuckSearchByLowerCaseName_key"
-           (Prelude.Just 0))
-{-# LINE 62 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.BuckSearchByLowerCaseName_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-          ('Angle.TNoFields))
-{-# LINE 64 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.BuckSearchByLowerCaseName
-         where
-  type KeyType
-         Glean.Schema.SearchCode.Types.BuckSearchByLowerCaseName
-       = Glean.Schema.SearchCode.Types.BuckSearchByLowerCaseName_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.BuckSearchByLowerCaseName" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.SearchCode.Types.buckSearchByLowerCaseName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.BuckSearchByLowerCaseName x k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.buckSearchByLowerCaseName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 74 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.BuckSearchByLowerCaseName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 80 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.HackSearchByNameKindWithNamespace_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.HackSearchByNameKindWithNamespace_key
-       x1 x2 x3 x4)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.HackSearchByNameKindWithNamespace_key
-        <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef
-           "search.code.HackSearchByNameKindWithNamespace_key"
-           (Prelude.Just 0))
-{-# LINE 93 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.HackSearchByNameKindWithNamespace_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "scope"
-          (Prelude.Maybe Glean.Schema.Hack.Types.NamespaceQName)
-          ('Angle.TField "kinds"
-             (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
-             ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-                ('Angle.TNoFields))))
-{-# LINE 95 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.HackSearchByNameKindWithNamespace
-         where
-  type KeyType
-         Glean.Schema.SearchCode.Types.HackSearchByNameKindWithNamespace
-       =
-       Glean.Schema.SearchCode.Types.HackSearchByNameKindWithNamespace_key
-  getName _proxy
-    = Glean.PredicateRef
-        "search.code.HackSearchByNameKindWithNamespace"
-        16
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.SearchCode.Types.hackSearchByNameKindWithNamespace_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.HackSearchByNameKindWithNamespace x
-        k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.hackSearchByNameKindWithNamespace_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 105 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.HackSearchByNameKindWithNamespace
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 111 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.CxxNameLowerCase_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.CxxNameLowerCase_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.CxxNameLowerCase_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.CxxNameLowerCase_key"
-           (Prelude.Just 0))
-{-# LINE 122 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.CxxNameLowerCase_key
-     =
-     'Angle.TField "nameLowercase" (Data.Text.Text)
-       ('Angle.TField "kinds"
-          (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
-          ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields)))
-{-# LINE 124 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.CxxNameLowerCase
-         where
-  type KeyType Glean.Schema.SearchCode.Types.CxxNameLowerCase =
-       Glean.Schema.SearchCode.Types.CxxNameLowerCase_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.CxxNameLowerCase" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.SearchCode.Types.cxxNameLowerCase_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.CxxNameLowerCase x k
-  getFactKey = Glean.Schema.SearchCode.Types.cxxNameLowerCase_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 133 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type Glean.Schema.SearchCode.Types.CxxNameLowerCase
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 139 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.JavaSearchByScope_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.JavaSearchByScope_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.JavaSearchByScope_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.JavaSearchByScope_key"
-           (Prelude.Just 0))
-{-# LINE 150 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.JavaSearchByScope_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "scope" ([Data.Text.Text])
-          ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-             ('Angle.TNoFields)))
-{-# LINE 152 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.JavaSearchByScope
-         where
-  type KeyType Glean.Schema.SearchCode.Types.JavaSearchByScope =
-       Glean.Schema.SearchCode.Types.JavaSearchByScope_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.JavaSearchByScope" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.SearchCode.Types.javaSearchByScope_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.JavaSearchByScope x k
-  getFactKey = Glean.Schema.SearchCode.Types.javaSearchByScope_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 161 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type Glean.Schema.SearchCode.Types.JavaSearchByScope
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 167 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.KotlinSearchByNameWithFact_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.KotlinSearchByNameWithFact_key x1
-       x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.KotlinSearchByNameWithFact_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.KotlinSearchByNameWithFact_key"
-           (Prelude.Just 0))
-{-# LINE 176 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.KotlinSearchByNameWithFact_key
-     =
-     'Angle.TField "name"
-       (Glean.KeyType Glean.Schema.JavakotlinAlpha.Types.QName)
-       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-          ('Angle.TNoFields))
-{-# LINE 178 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.KotlinSearchByNameWithFact
-         where
-  type KeyType
-         Glean.Schema.SearchCode.Types.KotlinSearchByNameWithFact
-       = Glean.Schema.SearchCode.Types.KotlinSearchByNameWithFact_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.KotlinSearchByNameWithFact" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.SearchCode.Types.kotlinSearchByNameWithFact_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.KotlinSearchByNameWithFact x k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.kotlinSearchByNameWithFact_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 188 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.KotlinSearchByNameWithFact
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 194 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.KotlinSearchByLowerCaseName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.KotlinSearchByLowerCaseName_key x1
-       x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.KotlinSearchByLowerCaseName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.KotlinSearchByLowerCaseName_key"
-           (Prelude.Just 0))
-{-# LINE 203 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.KotlinSearchByLowerCaseName_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-          ('Angle.TNoFields))
-{-# LINE 205 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.KotlinSearchByLowerCaseName
-         where
-  type KeyType
-         Glean.Schema.SearchCode.Types.KotlinSearchByLowerCaseName
-       = Glean.Schema.SearchCode.Types.KotlinSearchByLowerCaseName_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.KotlinSearchByLowerCaseName" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.SearchCode.Types.kotlinSearchByLowerCaseName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.KotlinSearchByLowerCaseName x k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.kotlinSearchByLowerCaseName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 215 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.KotlinSearchByLowerCaseName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 221 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.PythonSearchByLowerCaseScopeAndKind_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.PythonSearchByLowerCaseScopeAndKind_key
-       x1 x2 x3 x4)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.PythonSearchByLowerCaseScopeAndKind_key
-        <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef
-           "search.code.PythonSearchByLowerCaseScopeAndKind_key"
-           (Prelude.Just 0))
-{-# LINE 234 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.PythonSearchByLowerCaseScopeAndKind_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "scope" ([Data.Text.Text])
-          ('Angle.TField "kinds"
-             (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
-             ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-                ('Angle.TNoFields))))
-{-# LINE 236 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.PythonSearchByLowerCaseScopeAndKind
-         where
-  type KeyType
-         Glean.Schema.SearchCode.Types.PythonSearchByLowerCaseScopeAndKind
-       =
-       Glean.Schema.SearchCode.Types.PythonSearchByLowerCaseScopeAndKind_key
-  getName _proxy
-    = Glean.PredicateRef
-        "search.code.PythonSearchByLowerCaseScopeAndKind"
-        16
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.SearchCode.Types.pythonSearchByLowerCaseScopeAndKind_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.PythonSearchByLowerCaseScopeAndKind
-        x
-        k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.pythonSearchByLowerCaseScopeAndKind_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 246 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.PythonSearchByLowerCaseScopeAndKind
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 252 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.KotlinSearchByScopeWithName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.KotlinSearchByScopeWithName_key x1
-       x2 x3 x4)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.KotlinSearchByScopeWithName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.KotlinSearchByScopeWithName_key"
-           (Prelude.Just 0))
-{-# LINE 265 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.KotlinSearchByScopeWithName_key
-     =
-     'Angle.TField "name"
-       (Glean.KeyType Glean.Schema.JavakotlinAlpha.Types.Name)
-       ('Angle.TField "insensitive" (Prelude.Bool)
-          ('Angle.TField "scope" ([Data.Text.Text])
-             ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-                ('Angle.TNoFields))))
-{-# LINE 267 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.KotlinSearchByScopeWithName
-         where
-  type KeyType
-         Glean.Schema.SearchCode.Types.KotlinSearchByScopeWithName
-       = Glean.Schema.SearchCode.Types.KotlinSearchByScopeWithName_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.KotlinSearchByScopeWithName" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.SearchCode.Types.kotlinSearchByScopeWithName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.KotlinSearchByScopeWithName x k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.kotlinSearchByScopeWithName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 277 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.KotlinSearchByScopeWithName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 283 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.BuckSearchByLocalNameFact_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.BuckSearchByLocalNameFact_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.BuckSearchByLocalNameFact_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.BuckSearchByLocalNameFact_key"
-           (Prelude.Just 0))
-{-# LINE 292 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.BuckSearchByLocalNameFact_key
-     =
-     'Angle.TField "name"
-       (Glean.KeyType Glean.Schema.Buck.Types.LocalName)
-       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-          ('Angle.TNoFields))
-{-# LINE 294 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.BuckSearchByLocalNameFact
-         where
-  type KeyType
-         Glean.Schema.SearchCode.Types.BuckSearchByLocalNameFact
-       = Glean.Schema.SearchCode.Types.BuckSearchByLocalNameFact_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.BuckSearchByLocalNameFact" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.SearchCode.Types.buckSearchByLocalNameFact_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.BuckSearchByLocalNameFact x k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.buckSearchByLocalNameFact_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 304 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.BuckSearchByLocalNameFact
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 310 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.SearchByLowerCaseScopeAndKind_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.SearchByLowerCaseScopeAndKind_key x1
-       x2 x3 x4 x5)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-         Glean.buildRtsValue b x5
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.SearchByLowerCaseScopeAndKind_key
-        <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.SearchByLowerCaseScopeAndKind_key"
-           (Prelude.Just 0))
-{-# LINE 325 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.SearchByLowerCaseScopeAndKind_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "scope" ([Data.Text.Text])
-          ('Angle.TField "language" (Glean.Schema.Code.Types.Language)
-             ('Angle.TField "kinds"
-                (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
-                ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-                   ('Angle.TNoFields)))))
-{-# LINE 327 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.SearchByLowerCaseScopeAndKind
-         where
-  type KeyType
-         Glean.Schema.SearchCode.Types.SearchByLowerCaseScopeAndKind
-       = Glean.Schema.SearchCode.Types.SearchByLowerCaseScopeAndKind_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.SearchByLowerCaseScopeAndKind" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.SearchCode.Types.searchByLowerCaseScopeAndKind_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.SearchByLowerCaseScopeAndKind x k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.searchByLowerCaseScopeAndKind_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 337 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.SearchByLowerCaseScopeAndKind
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 343 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.HackSearchByNameKindWithQName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.HackSearchByNameKindWithQName_key x1
-       x2 x3 x4 x5)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-         Glean.buildRtsValue b x5
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.HackSearchByNameKindWithQName_key
-        <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.HackSearchByNameKindWithQName_key"
-           (Prelude.Just 0))
-{-# LINE 358 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.HackSearchByNameKindWithQName_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "scope" (Glean.KeyType Glean.Schema.Hack.Types.Name)
-          ('Angle.TField "scopeNamespace"
-             (Prelude.Maybe Glean.Schema.Hack.Types.NamespaceQName)
-             ('Angle.TField "kinds"
-                (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
-                ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-                   ('Angle.TNoFields)))))
-{-# LINE 360 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.HackSearchByNameKindWithQName
-         where
-  type KeyType
-         Glean.Schema.SearchCode.Types.HackSearchByNameKindWithQName
-       = Glean.Schema.SearchCode.Types.HackSearchByNameKindWithQName_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.HackSearchByNameKindWithQName" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.SearchCode.Types.hackSearchByNameKindWithQName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.HackSearchByNameKindWithQName x k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.hackSearchByNameKindWithQName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 370 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.HackSearchByNameKindWithQName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 376 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.FlowSearchByLowerCaseScopeAndKind_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.FlowSearchByLowerCaseScopeAndKind_key
-       x1 x2 x3 x4)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.FlowSearchByLowerCaseScopeAndKind_key
-        <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef
-           "search.code.FlowSearchByLowerCaseScopeAndKind_key"
-           (Prelude.Just 0))
-{-# LINE 389 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.FlowSearchByLowerCaseScopeAndKind_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "scope" ([Data.Text.Text])
-          ('Angle.TField "kinds"
-             (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
-             ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-                ('Angle.TNoFields))))
-{-# LINE 391 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.FlowSearchByLowerCaseScopeAndKind
-         where
-  type KeyType
-         Glean.Schema.SearchCode.Types.FlowSearchByLowerCaseScopeAndKind
-       =
-       Glean.Schema.SearchCode.Types.FlowSearchByLowerCaseScopeAndKind_key
-  getName _proxy
-    = Glean.PredicateRef
-        "search.code.FlowSearchByLowerCaseScopeAndKind"
-        16
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.SearchCode.Types.flowSearchByLowerCaseScopeAndKind_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.FlowSearchByLowerCaseScopeAndKind x
-        k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.flowSearchByLowerCaseScopeAndKind_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 401 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.FlowSearchByLowerCaseScopeAndKind
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 407 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.PythonSearchByScopeAndKind_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.PythonSearchByScopeAndKind_key x1 x2
-       x3 x4)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.PythonSearchByScopeAndKind_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.PythonSearchByScopeAndKind_key"
-           (Prelude.Just 0))
-{-# LINE 420 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.PythonSearchByScopeAndKind_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "scope" ([Data.Text.Text])
-          ('Angle.TField "kinds"
-             (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
-             ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-                ('Angle.TNoFields))))
-{-# LINE 422 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.PythonSearchByScopeAndKind
-         where
-  type KeyType
-         Glean.Schema.SearchCode.Types.PythonSearchByScopeAndKind
-       = Glean.Schema.SearchCode.Types.PythonSearchByScopeAndKind_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.PythonSearchByScopeAndKind" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.SearchCode.Types.pythonSearchByScopeAndKind_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.PythonSearchByScopeAndKind x k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.pythonSearchByScopeAndKind_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 432 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.PythonSearchByScopeAndKind
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 438 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.HsSearchByLowerCaseName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.HsSearchByLowerCaseName_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.HsSearchByLowerCaseName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.HsSearchByLowerCaseName_key"
-           (Prelude.Just 0))
-{-# LINE 447 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.HsSearchByLowerCaseName_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-          ('Angle.TNoFields))
-{-# LINE 449 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.HsSearchByLowerCaseName
-         where
-  type KeyType Glean.Schema.SearchCode.Types.HsSearchByLowerCaseName
-       = Glean.Schema.SearchCode.Types.HsSearchByLowerCaseName_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.HsSearchByLowerCaseName" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.SearchCode.Types.hsSearchByLowerCaseName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.HsSearchByLowerCaseName x k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.hsSearchByLowerCaseName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 458 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.HsSearchByLowerCaseName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 464 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.CxxPreferDefinitions_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.CxxPreferDefinitions_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.CxxPreferDefinitions_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.CxxPreferDefinitions_key"
-           (Prelude.Just 0))
-{-# LINE 473 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.CxxPreferDefinitions_key
-     =
-     'Angle.TField "from" (Glean.Schema.CodeCxx.Types.Entity)
-       ('Angle.TField "to" (Glean.Schema.CodeCxx.Types.Entity)
-          ('Angle.TNoFields))
-{-# LINE 475 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.CxxPreferDefinitions
-         where
-  type KeyType Glean.Schema.SearchCode.Types.CxxPreferDefinitions =
-       Glean.Schema.SearchCode.Types.CxxPreferDefinitions_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.CxxPreferDefinitions" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.SearchCode.Types.cxxPreferDefinitions_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.CxxPreferDefinitions x k
-  getFactKey = Glean.Schema.SearchCode.Types.cxxPreferDefinitions_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 484 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.CxxPreferDefinitions
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 490 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.KotlinSearchByScope_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.KotlinSearchByScope_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.KotlinSearchByScope_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.KotlinSearchByScope_key"
-           (Prelude.Just 0))
-{-# LINE 501 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.KotlinSearchByScope_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "scope" ([Data.Text.Text])
-          ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-             ('Angle.TNoFields)))
-{-# LINE 503 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.KotlinSearchByScope
-         where
-  type KeyType Glean.Schema.SearchCode.Types.KotlinSearchByScope =
-       Glean.Schema.SearchCode.Types.KotlinSearchByScope_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.KotlinSearchByScope" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.SearchCode.Types.kotlinSearchByScope_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.KotlinSearchByScope x k
-  getFactKey = Glean.Schema.SearchCode.Types.kotlinSearchByScope_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 512 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.KotlinSearchByScope
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 518 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.AngleSearchByName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.AngleSearchByName_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.AngleSearchByName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.AngleSearchByName_key"
-           (Prelude.Just 0))
-{-# LINE 527 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.AngleSearchByName_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-          ('Angle.TNoFields))
-{-# LINE 529 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.AngleSearchByName
-         where
-  type KeyType Glean.Schema.SearchCode.Types.AngleSearchByName =
-       Glean.Schema.SearchCode.Types.AngleSearchByName_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.AngleSearchByName" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.SearchCode.Types.angleSearchByName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.AngleSearchByName x k
-  getFactKey = Glean.Schema.SearchCode.Types.angleSearchByName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 538 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type Glean.Schema.SearchCode.Types.AngleSearchByName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 544 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type Glean.Schema.SearchCode.Types.SearchByScope_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.SearchByScope_key x1 x2 x3 x4)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.SearchByScope_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.SearchByScope_key" (Prelude.Just 0))
-{-# LINE 557 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.SearchCode.Types.SearchByScope_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "scope" ([Data.Text.Text])
-          ('Angle.TField "language" (Glean.Schema.Code.Types.Language)
-             ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-                ('Angle.TNoFields))))
-{-# LINE 559 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.SearchByScope
-         where
-  type KeyType Glean.Schema.SearchCode.Types.SearchByScope =
-       Glean.Schema.SearchCode.Types.SearchByScope_key
-  getName _proxy = Glean.PredicateRef "search.code.SearchByScope" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.SearchCode.Types.searchByScope_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.SearchByScope x k
-  getFactKey = Glean.Schema.SearchCode.Types.searchByScope_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 568 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type Glean.Schema.SearchCode.Types.SearchByScope
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 574 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.CxxSearchByScopeAndKind_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.CxxSearchByScopeAndKind_key x1 x2 x3
-       x4)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.CxxSearchByScopeAndKind_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.CxxSearchByScopeAndKind_key"
-           (Prelude.Just 0))
-{-# LINE 587 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.CxxSearchByScopeAndKind_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "scope" ([Data.Text.Text])
-          ('Angle.TField "kinds"
-             (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
-             ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-                ('Angle.TNoFields))))
-{-# LINE 589 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.CxxSearchByScopeAndKind
-         where
-  type KeyType Glean.Schema.SearchCode.Types.CxxSearchByScopeAndKind
-       = Glean.Schema.SearchCode.Types.CxxSearchByScopeAndKind_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.CxxSearchByScopeAndKind" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.SearchCode.Types.cxxSearchByScopeAndKind_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.CxxSearchByScopeAndKind x k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.cxxSearchByScopeAndKind_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 598 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.CxxSearchByScopeAndKind
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 604 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.CSharpSearchByLowerCaseName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.CSharpSearchByLowerCaseName_key x1
-       x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.CSharpSearchByLowerCaseName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.CSharpSearchByLowerCaseName_key"
-           (Prelude.Just 0))
-{-# LINE 613 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.CSharpSearchByLowerCaseName_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-          ('Angle.TNoFields))
-{-# LINE 615 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.CSharpSearchByLowerCaseName
-         where
-  type KeyType
-         Glean.Schema.SearchCode.Types.CSharpSearchByLowerCaseName
-       = Glean.Schema.SearchCode.Types.CSharpSearchByLowerCaseName_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.CSharpSearchByLowerCaseName" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.SearchCode.Types.cSharpSearchByLowerCaseName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.CSharpSearchByLowerCaseName x k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.cSharpSearchByLowerCaseName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 625 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.CSharpSearchByLowerCaseName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 631 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.LsifSearchByName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.LsifSearchByName_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.LsifSearchByName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.LsifSearchByName_key"
-           (Prelude.Just 0))
-{-# LINE 640 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.LsifSearchByName_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-          ('Angle.TNoFields))
-{-# LINE 642 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.LsifSearchByName
-         where
-  type KeyType Glean.Schema.SearchCode.Types.LsifSearchByName =
-       Glean.Schema.SearchCode.Types.LsifSearchByName_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.LsifSearchByName" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.SearchCode.Types.lsifSearchByName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.LsifSearchByName x k
-  getFactKey = Glean.Schema.SearchCode.Types.lsifSearchByName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 651 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type Glean.Schema.SearchCode.Types.LsifSearchByName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 657 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.HackNameLowerCase_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.HackNameLowerCase_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.HackNameLowerCase_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.HackNameLowerCase_key"
-           (Prelude.Just 0))
-{-# LINE 668 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.HackNameLowerCase_key
-     =
-     'Angle.TField "nameLowercase" (Data.Text.Text)
-       ('Angle.TField "kinds"
-          (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
-          ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields)))
-{-# LINE 670 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.HackNameLowerCase
-         where
-  type KeyType Glean.Schema.SearchCode.Types.HackNameLowerCase =
-       Glean.Schema.SearchCode.Types.HackNameLowerCase_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.HackNameLowerCase" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.SearchCode.Types.hackNameLowerCase_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.HackNameLowerCase x k
-  getFactKey = Glean.Schema.SearchCode.Types.hackNameLowerCase_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 679 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type Glean.Schema.SearchCode.Types.HackNameLowerCase
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 685 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.FlowSearchByScopeAndKind_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.FlowSearchByScopeAndKind_key x1 x2
-       x3 x4)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.FlowSearchByScopeAndKind_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.FlowSearchByScopeAndKind_key"
-           (Prelude.Just 0))
-{-# LINE 698 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.FlowSearchByScopeAndKind_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "scope" ([Data.Text.Text])
-          ('Angle.TField "kinds"
-             (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
-             ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-                ('Angle.TNoFields))))
-{-# LINE 700 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.FlowSearchByScopeAndKind
-         where
-  type KeyType Glean.Schema.SearchCode.Types.FlowSearchByScopeAndKind
-       = Glean.Schema.SearchCode.Types.FlowSearchByScopeAndKind_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.FlowSearchByScopeAndKind" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.SearchCode.Types.flowSearchByScopeAndKind_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.FlowSearchByScopeAndKind x k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.flowSearchByScopeAndKind_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 710 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.FlowSearchByScopeAndKind
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 716 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.CSharpSearchByName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.CSharpSearchByName_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.CSharpSearchByName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.CSharpSearchByName_key"
-           (Prelude.Just 0))
-{-# LINE 725 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.CSharpSearchByName_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-          ('Angle.TNoFields))
-{-# LINE 727 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.CSharpSearchByName
-         where
-  type KeyType Glean.Schema.SearchCode.Types.CSharpSearchByName =
-       Glean.Schema.SearchCode.Types.CSharpSearchByName_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.CSharpSearchByName" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.SearchCode.Types.cSharpSearchByName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.CSharpSearchByName x k
-  getFactKey = Glean.Schema.SearchCode.Types.cSharpSearchByName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 736 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.CSharpSearchByName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 742 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.ThriftSearchByName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.ThriftSearchByName_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.ThriftSearchByName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.ThriftSearchByName_key"
-           (Prelude.Just 0))
-{-# LINE 751 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.ThriftSearchByName_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-          ('Angle.TNoFields))
-{-# LINE 753 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.ThriftSearchByName
-         where
-  type KeyType Glean.Schema.SearchCode.Types.ThriftSearchByName =
-       Glean.Schema.SearchCode.Types.ThriftSearchByName_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.ThriftSearchByName" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.SearchCode.Types.thriftSearchByName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.ThriftSearchByName x k
-  getFactKey = Glean.Schema.SearchCode.Types.thriftSearchByName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 762 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.ThriftSearchByName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 768 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.JavaSearchByScopeWithName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.JavaSearchByScopeWithName_key x1 x2
-       x3 x4)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.JavaSearchByScopeWithName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.JavaSearchByScopeWithName_key"
-           (Prelude.Just 0))
-{-# LINE 781 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.JavaSearchByScopeWithName_key
-     =
-     'Angle.TField "name"
-       (Glean.KeyType Glean.Schema.JavakotlinAlpha.Types.Name)
-       ('Angle.TField "insensitive" (Prelude.Bool)
-          ('Angle.TField "scope" ([Data.Text.Text])
-             ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-                ('Angle.TNoFields))))
-{-# LINE 783 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.JavaSearchByScopeWithName
-         where
-  type KeyType
-         Glean.Schema.SearchCode.Types.JavaSearchByScopeWithName
-       = Glean.Schema.SearchCode.Types.JavaSearchByScopeWithName_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.JavaSearchByScopeWithName" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.SearchCode.Types.javaSearchByScopeWithName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.JavaSearchByScopeWithName x k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.javaSearchByScopeWithName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 793 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.JavaSearchByScopeWithName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 799 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.CxxSearchByLowerCaseNameKindAndScopeFact_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.CxxSearchByLowerCaseNameKindAndScopeFact_key
-       x1 x2 x3 x4)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.CxxSearchByLowerCaseNameKindAndScopeFact_key
-        <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef
-           "search.code.CxxSearchByLowerCaseNameKindAndScopeFact_key"
-           (Prelude.Just 0))
-{-# LINE 812 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.CxxSearchByLowerCaseNameKindAndScopeFact_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "scope" (Glean.Schema.Cxx1.Types.Scope)
-          ('Angle.TField "kinds"
-             (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
-             ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-                ('Angle.TNoFields))))
-{-# LINE 814 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.CxxSearchByLowerCaseNameKindAndScopeFact
-         where
-  type KeyType
-         Glean.Schema.SearchCode.Types.CxxSearchByLowerCaseNameKindAndScopeFact
-       =
-       Glean.Schema.SearchCode.Types.CxxSearchByLowerCaseNameKindAndScopeFact_key
-  getName _proxy
-    = Glean.PredicateRef
-        "search.code.CxxSearchByLowerCaseNameKindAndScopeFact"
-        16
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.SearchCode.Types.cxxSearchByLowerCaseNameKindAndScopeFact_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.CxxSearchByLowerCaseNameKindAndScopeFact
-        x
-        k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.cxxSearchByLowerCaseNameKindAndScopeFact_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 824 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.CxxSearchByLowerCaseNameKindAndScopeFact
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 830 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.HackSearchByNameAndKind_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.HackSearchByNameAndKind_key x1 x2
-       x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.HackSearchByNameAndKind_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.HackSearchByNameAndKind_key"
-           (Prelude.Just 0))
-{-# LINE 841 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.HackSearchByNameAndKind_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "kinds"
-          (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
-          ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-             ('Angle.TNoFields)))
-{-# LINE 843 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.HackSearchByNameAndKind
-         where
-  type KeyType Glean.Schema.SearchCode.Types.HackSearchByNameAndKind
-       = Glean.Schema.SearchCode.Types.HackSearchByNameAndKind_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.HackSearchByNameAndKind" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.SearchCode.Types.hackSearchByNameAndKind_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.HackSearchByNameAndKind x k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.hackSearchByNameAndKind_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 852 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.HackSearchByNameAndKind
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 858 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.FbthriftSearchByNameFact_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.FbthriftSearchByNameFact_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.FbthriftSearchByNameFact_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.FbthriftSearchByNameFact_key"
-           (Prelude.Just 0))
-{-# LINE 867 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.FbthriftSearchByNameFact_key
-     =
-     'Angle.TField "name"
-       (Glean.KeyType Glean.Schema.Fbthrift.Types.Identifier)
-       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-          ('Angle.TNoFields))
-{-# LINE 869 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.FbthriftSearchByNameFact
-         where
-  type KeyType Glean.Schema.SearchCode.Types.FbthriftSearchByNameFact
-       = Glean.Schema.SearchCode.Types.FbthriftSearchByNameFact_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.FbthriftSearchByNameFact" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.SearchCode.Types.fbthriftSearchByNameFact_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.FbthriftSearchByNameFact x k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.fbthriftSearchByNameFact_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 879 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.FbthriftSearchByNameFact
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 885 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.ErlangSearchByName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.ErlangSearchByName_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.ErlangSearchByName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.ErlangSearchByName_key"
-           (Prelude.Just 0))
-{-# LINE 894 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.ErlangSearchByName_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-          ('Angle.TNoFields))
-{-# LINE 896 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.ErlangSearchByName
-         where
-  type KeyType Glean.Schema.SearchCode.Types.ErlangSearchByName =
-       Glean.Schema.SearchCode.Types.ErlangSearchByName_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.ErlangSearchByName" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.SearchCode.Types.erlangSearchByName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.ErlangSearchByName x k
-  getFactKey = Glean.Schema.SearchCode.Types.erlangSearchByName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 905 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.ErlangSearchByName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 911 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.SearchByNameKindAndLanguage_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.SearchByNameKindAndLanguage_key x1
-       x2 x3 x4)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.SearchByNameKindAndLanguage_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.SearchByNameKindAndLanguage_key"
-           (Prelude.Just 0))
-{-# LINE 924 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.SearchByNameKindAndLanguage_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "language" (Glean.Schema.Code.Types.Language)
-          ('Angle.TField "kinds"
-             (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
-             ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-                ('Angle.TNoFields))))
-{-# LINE 926 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.SearchByNameKindAndLanguage
-         where
-  type KeyType
-         Glean.Schema.SearchCode.Types.SearchByNameKindAndLanguage
-       = Glean.Schema.SearchCode.Types.SearchByNameKindAndLanguage_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.SearchByNameKindAndLanguage" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.SearchCode.Types.searchByNameKindAndLanguage_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.SearchByNameKindAndLanguage x k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.searchByNameKindAndLanguage_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 936 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.SearchByNameKindAndLanguage
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 942 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.HackSearchByScopeAndKind_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.HackSearchByScopeAndKind_key x1 x2
-       x3 x4)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.HackSearchByScopeAndKind_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.HackSearchByScopeAndKind_key"
-           (Prelude.Just 0))
-{-# LINE 955 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.HackSearchByScopeAndKind_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "scope" ([Data.Text.Text])
-          ('Angle.TField "kinds"
-             (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
-             ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-                ('Angle.TNoFields))))
-{-# LINE 957 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.HackSearchByScopeAndKind
-         where
-  type KeyType Glean.Schema.SearchCode.Types.HackSearchByScopeAndKind
-       = Glean.Schema.SearchCode.Types.HackSearchByScopeAndKind_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.HackSearchByScopeAndKind" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.SearchCode.Types.hackSearchByScopeAndKind_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.HackSearchByScopeAndKind x k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.hackSearchByScopeAndKind_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 967 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.HackSearchByScopeAndKind
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 973 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.CxxSearchByLowerCaseScopeAndKind_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.CxxSearchByLowerCaseScopeAndKind_key
-       x1 x2 x3 x4)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.CxxSearchByLowerCaseScopeAndKind_key
-        <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.CxxSearchByLowerCaseScopeAndKind_key"
-           (Prelude.Just 0))
-{-# LINE 986 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.CxxSearchByLowerCaseScopeAndKind_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "scope" ([Data.Text.Text])
-          ('Angle.TField "kinds"
-             (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
-             ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-                ('Angle.TNoFields))))
-{-# LINE 988 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.CxxSearchByLowerCaseScopeAndKind
-         where
-  type KeyType
-         Glean.Schema.SearchCode.Types.CxxSearchByLowerCaseScopeAndKind
-       =
-       Glean.Schema.SearchCode.Types.CxxSearchByLowerCaseScopeAndKind_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.CxxSearchByLowerCaseScopeAndKind"
-        16
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.SearchCode.Types.cxxSearchByLowerCaseScopeAndKind_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.CxxSearchByLowerCaseScopeAndKind x
-        k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.cxxSearchByLowerCaseScopeAndKind_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 998 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.CxxSearchByLowerCaseScopeAndKind
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1004 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.PpSearchByLowerCaseNameKind_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.PpSearchByLowerCaseNameKind_key x1
-       x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.PpSearchByLowerCaseNameKind_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.PpSearchByLowerCaseNameKind_key"
-           (Prelude.Just 0))
-{-# LINE 1015 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.PpSearchByLowerCaseNameKind_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "kinds"
-          (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
-          ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-             ('Angle.TNoFields)))
-{-# LINE 1017 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.PpSearchByLowerCaseNameKind
-         where
-  type KeyType
-         Glean.Schema.SearchCode.Types.PpSearchByLowerCaseNameKind
-       = Glean.Schema.SearchCode.Types.PpSearchByLowerCaseNameKind_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.PpSearchByLowerCaseNameKind" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.SearchCode.Types.ppSearchByLowerCaseNameKind_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.PpSearchByLowerCaseNameKind x k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.ppSearchByLowerCaseNameKind_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1027 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.PpSearchByLowerCaseNameKind
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1033 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.SearchByLowerCaseNameAndLanguage_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.SearchByLowerCaseNameAndLanguage_key
-       x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.SearchByLowerCaseNameAndLanguage_key
-        <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.SearchByLowerCaseNameAndLanguage_key"
-           (Prelude.Just 0))
-{-# LINE 1044 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.SearchByLowerCaseNameAndLanguage_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "language" (Glean.Schema.Code.Types.Language)
-          ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-             ('Angle.TNoFields)))
-{-# LINE 1046 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.SearchByLowerCaseNameAndLanguage
-         where
-  type KeyType
-         Glean.Schema.SearchCode.Types.SearchByLowerCaseNameAndLanguage
-       =
-       Glean.Schema.SearchCode.Types.SearchByLowerCaseNameAndLanguage_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.SearchByLowerCaseNameAndLanguage"
-        16
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.SearchCode.Types.searchByLowerCaseNameAndLanguage_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.SearchByLowerCaseNameAndLanguage x
-        k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.searchByLowerCaseNameAndLanguage_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1056 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.SearchByLowerCaseNameAndLanguage
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1062 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.KotlinSearchByName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.KotlinSearchByName_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.KotlinSearchByName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.KotlinSearchByName_key"
-           (Prelude.Just 0))
-{-# LINE 1071 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.KotlinSearchByName_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-          ('Angle.TNoFields))
-{-# LINE 1073 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.KotlinSearchByName
-         where
-  type KeyType Glean.Schema.SearchCode.Types.KotlinSearchByName =
-       Glean.Schema.SearchCode.Types.KotlinSearchByName_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.KotlinSearchByName" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.SearchCode.Types.kotlinSearchByName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.KotlinSearchByName x k
-  getFactKey = Glean.Schema.SearchCode.Types.kotlinSearchByName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1082 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.KotlinSearchByName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1088 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.AngleSearchByLowerCaseName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.AngleSearchByLowerCaseName_key x1
-       x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.AngleSearchByLowerCaseName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.AngleSearchByLowerCaseName_key"
-           (Prelude.Just 0))
-{-# LINE 1097 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.AngleSearchByLowerCaseName_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-          ('Angle.TNoFields))
-{-# LINE 1099 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.AngleSearchByLowerCaseName
-         where
-  type KeyType
-         Glean.Schema.SearchCode.Types.AngleSearchByLowerCaseName
-       = Glean.Schema.SearchCode.Types.AngleSearchByLowerCaseName_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.AngleSearchByLowerCaseName" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.SearchCode.Types.angleSearchByLowerCaseName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.AngleSearchByLowerCaseName x k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.angleSearchByLowerCaseName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1109 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.AngleSearchByLowerCaseName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1115 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.KotlinSearchByLowerCaseScope_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.KotlinSearchByLowerCaseScope_key x1
-       x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.KotlinSearchByLowerCaseScope_key
-        <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.KotlinSearchByLowerCaseScope_key"
-           (Prelude.Just 0))
-{-# LINE 1126 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.KotlinSearchByLowerCaseScope_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "scope" ([Data.Text.Text])
-          ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-             ('Angle.TNoFields)))
-{-# LINE 1128 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.KotlinSearchByLowerCaseScope
-         where
-  type KeyType
-         Glean.Schema.SearchCode.Types.KotlinSearchByLowerCaseScope
-       = Glean.Schema.SearchCode.Types.KotlinSearchByLowerCaseScope_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.KotlinSearchByLowerCaseScope" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.SearchCode.Types.kotlinSearchByLowerCaseScope_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.KotlinSearchByLowerCaseScope x k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.kotlinSearchByLowerCaseScope_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1138 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.KotlinSearchByLowerCaseScope
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1144 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.JavaSearchByLowerCaseName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.JavaSearchByLowerCaseName_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.JavaSearchByLowerCaseName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.JavaSearchByLowerCaseName_key"
-           (Prelude.Just 0))
-{-# LINE 1153 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.JavaSearchByLowerCaseName_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-          ('Angle.TNoFields))
-{-# LINE 1155 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.JavaSearchByLowerCaseName
-         where
-  type KeyType
-         Glean.Schema.SearchCode.Types.JavaSearchByLowerCaseName
-       = Glean.Schema.SearchCode.Types.JavaSearchByLowerCaseName_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.JavaSearchByLowerCaseName" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.SearchCode.Types.javaSearchByLowerCaseName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.JavaSearchByLowerCaseName x k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.javaSearchByLowerCaseName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1165 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.JavaSearchByLowerCaseName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1171 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.LsifSearchByLowerCaseName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.LsifSearchByLowerCaseName_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.LsifSearchByLowerCaseName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.LsifSearchByLowerCaseName_key"
-           (Prelude.Just 0))
-{-# LINE 1180 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.LsifSearchByLowerCaseName_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-          ('Angle.TNoFields))
-{-# LINE 1182 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.LsifSearchByLowerCaseName
-         where
-  type KeyType
-         Glean.Schema.SearchCode.Types.LsifSearchByLowerCaseName
-       = Glean.Schema.SearchCode.Types.LsifSearchByLowerCaseName_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.LsifSearchByLowerCaseName" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.SearchCode.Types.lsifSearchByLowerCaseName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.LsifSearchByLowerCaseName x k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.lsifSearchByLowerCaseName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1192 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.LsifSearchByLowerCaseName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1198 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.SearchByScopeAndKind_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.SearchByScopeAndKind_key x1 x2 x3 x4
-       x5)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-         Glean.buildRtsValue b x5
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.SearchByScopeAndKind_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.SearchByScopeAndKind_key"
-           (Prelude.Just 0))
-{-# LINE 1213 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.SearchByScopeAndKind_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "scope" ([Data.Text.Text])
-          ('Angle.TField "language" (Glean.Schema.Code.Types.Language)
-             ('Angle.TField "kinds"
-                (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
-                ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-                   ('Angle.TNoFields)))))
-{-# LINE 1215 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.SearchByScopeAndKind
-         where
-  type KeyType Glean.Schema.SearchCode.Types.SearchByScopeAndKind =
-       Glean.Schema.SearchCode.Types.SearchByScopeAndKind_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.SearchByScopeAndKind" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.SearchCode.Types.searchByScopeAndKind_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.SearchByScopeAndKind x k
-  getFactKey = Glean.Schema.SearchCode.Types.searchByScopeAndKind_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1224 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.SearchByScopeAndKind
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1230 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.SearchByLowerCaseNameKindAndLanguage_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.SearchByLowerCaseNameKindAndLanguage_key
-       x1 x2 x3 x4)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.SearchByLowerCaseNameKindAndLanguage_key
-        <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef
-           "search.code.SearchByLowerCaseNameKindAndLanguage_key"
-           (Prelude.Just 0))
-{-# LINE 1243 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.SearchByLowerCaseNameKindAndLanguage_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "language" (Glean.Schema.Code.Types.Language)
-          ('Angle.TField "kinds"
-             (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
-             ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-                ('Angle.TNoFields))))
-{-# LINE 1245 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.SearchByLowerCaseNameKindAndLanguage
-         where
-  type KeyType
-         Glean.Schema.SearchCode.Types.SearchByLowerCaseNameKindAndLanguage
-       =
-       Glean.Schema.SearchCode.Types.SearchByLowerCaseNameKindAndLanguage_key
-  getName _proxy
-    = Glean.PredicateRef
-        "search.code.SearchByLowerCaseNameKindAndLanguage"
-        16
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.SearchCode.Types.searchByLowerCaseNameKindAndLanguage_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.SearchByLowerCaseNameKindAndLanguage
-        x
-        k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.searchByLowerCaseNameKindAndLanguage_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1255 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.SearchByLowerCaseNameKindAndLanguage
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1261 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.FlowNameLowerCase_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.FlowNameLowerCase_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.FlowNameLowerCase_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.FlowNameLowerCase_key"
-           (Prelude.Just 0))
-{-# LINE 1272 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.FlowNameLowerCase_key
-     =
-     'Angle.TField "nameLowercase" (Data.Text.Text)
-       ('Angle.TField "kinds"
-          (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
-          ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields)))
-{-# LINE 1274 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.FlowNameLowerCase
-         where
-  type KeyType Glean.Schema.SearchCode.Types.FlowNameLowerCase =
-       Glean.Schema.SearchCode.Types.FlowNameLowerCase_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.FlowNameLowerCase" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.SearchCode.Types.flowNameLowerCase_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.FlowNameLowerCase x k
-  getFactKey = Glean.Schema.SearchCode.Types.flowNameLowerCase_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1283 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type Glean.Schema.SearchCode.Types.FlowNameLowerCase
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1289 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.HackSearchByScopeWithNameKinds_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.HackSearchByScopeWithNameKinds_key
-       x1 x2 x3 x4 x5)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-         Glean.buildRtsValue b x5
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.HackSearchByScopeWithNameKinds_key
-        <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.HackSearchByScopeWithNameKinds_key"
-           (Prelude.Just 0))
-{-# LINE 1304 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.HackSearchByScopeWithNameKinds_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "insensitive" (Prelude.Bool)
-          ('Angle.TField "scope" ([Data.Text.Text])
-             ('Angle.TField "kinds"
-                (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
-                ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-                   ('Angle.TNoFields)))))
-{-# LINE 1306 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.HackSearchByScopeWithNameKinds
-         where
-  type KeyType
-         Glean.Schema.SearchCode.Types.HackSearchByScopeWithNameKinds
-       = Glean.Schema.SearchCode.Types.HackSearchByScopeWithNameKinds_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.HackSearchByScopeWithNameKinds"
-        16
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.SearchCode.Types.hackSearchByScopeWithNameKinds_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.HackSearchByScopeWithNameKinds x k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.hackSearchByScopeWithNameKinds_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1316 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.HackSearchByScopeWithNameKinds
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1322 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.HsSearchByName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.HsSearchByName_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.HsSearchByName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.HsSearchByName_key" (Prelude.Just 0))
-{-# LINE 1331 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields Glean.Schema.SearchCode.Types.HsSearchByName_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-          ('Angle.TNoFields))
-{-# LINE 1333 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.HsSearchByName
-         where
-  type KeyType Glean.Schema.SearchCode.Types.HsSearchByName =
-       Glean.Schema.SearchCode.Types.HsSearchByName_key
-  getName _proxy = Glean.PredicateRef "search.code.HsSearchByName" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.SearchCode.Types.hsSearchByName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.HsSearchByName x k
-  getFactKey = Glean.Schema.SearchCode.Types.hsSearchByName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1342 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type Glean.Schema.SearchCode.Types.HsSearchByName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1348 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.HackSearchByLowerCaseScopeAndKind_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.HackSearchByLowerCaseScopeAndKind_key
-       x1 x2 x3 x4)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.HackSearchByLowerCaseScopeAndKind_key
-        <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef
-           "search.code.HackSearchByLowerCaseScopeAndKind_key"
-           (Prelude.Just 0))
-{-# LINE 1361 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.HackSearchByLowerCaseScopeAndKind_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "scope" ([Data.Text.Text])
-          ('Angle.TField "kinds"
-             (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
-             ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-                ('Angle.TNoFields))))
-{-# LINE 1363 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.HackSearchByLowerCaseScopeAndKind
-         where
-  type KeyType
-         Glean.Schema.SearchCode.Types.HackSearchByLowerCaseScopeAndKind
-       =
-       Glean.Schema.SearchCode.Types.HackSearchByLowerCaseScopeAndKind_key
-  getName _proxy
-    = Glean.PredicateRef
-        "search.code.HackSearchByLowerCaseScopeAndKind"
-        16
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.SearchCode.Types.hackSearchByLowerCaseScopeAndKind_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.HackSearchByLowerCaseScopeAndKind x
-        k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.hackSearchByLowerCaseScopeAndKind_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1373 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.HackSearchByLowerCaseScopeAndKind
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1379 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.SearchByNameAndLanguage_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.SearchByNameAndLanguage_key x1 x2
-       x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.SearchByNameAndLanguage_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.SearchByNameAndLanguage_key"
-           (Prelude.Just 0))
-{-# LINE 1390 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.SearchByNameAndLanguage_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "language" (Glean.Schema.Code.Types.Language)
-          ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-             ('Angle.TNoFields)))
-{-# LINE 1392 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.SearchByNameAndLanguage
-         where
-  type KeyType Glean.Schema.SearchCode.Types.SearchByNameAndLanguage
-       = Glean.Schema.SearchCode.Types.SearchByNameAndLanguage_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.SearchByNameAndLanguage" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.SearchCode.Types.searchByNameAndLanguage_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.SearchByNameAndLanguage x k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.searchByNameAndLanguage_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1401 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.SearchByNameAndLanguage
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1407 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.FlowSearchByNameKindAndScopeFact_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.FlowSearchByNameKindAndScopeFact_key
-       x1 x2 x3 x4)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.FlowSearchByNameKindAndScopeFact_key
-        <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.FlowSearchByNameKindAndScopeFact_key"
-           (Prelude.Just 0))
-{-# LINE 1420 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.FlowSearchByNameKindAndScopeFact_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "scope"
-          (Prelude.Maybe Glean.Schema.Flow.Types.Module)
-          ('Angle.TField "kinds"
-             (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
-             ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-                ('Angle.TNoFields))))
-{-# LINE 1422 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.FlowSearchByNameKindAndScopeFact
-         where
-  type KeyType
-         Glean.Schema.SearchCode.Types.FlowSearchByNameKindAndScopeFact
-       =
-       Glean.Schema.SearchCode.Types.FlowSearchByNameKindAndScopeFact_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.FlowSearchByNameKindAndScopeFact"
-        16
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.SearchCode.Types.flowSearchByNameKindAndScopeFact_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.FlowSearchByNameKindAndScopeFact x
-        k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.flowSearchByNameKindAndScopeFact_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1432 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.FlowSearchByNameKindAndScopeFact
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1438 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.PythonSearchByLowerCaseNameKindAndScopeFact_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.PythonSearchByLowerCaseNameKindAndScopeFact_key
-       x1 x2 x3 x4)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.PythonSearchByLowerCaseNameKindAndScopeFact_key
-        <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef
-           "search.code.PythonSearchByLowerCaseNameKindAndScopeFact_key"
-           (Prelude.Just 0))
-{-# LINE 1451 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.PythonSearchByLowerCaseNameKindAndScopeFact_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "scope"
-          (Prelude.Maybe Glean.Schema.Python.Types.SName)
-          ('Angle.TField "kinds"
-             (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
-             ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-                ('Angle.TNoFields))))
-{-# LINE 1453 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.PythonSearchByLowerCaseNameKindAndScopeFact
-         where
-  type KeyType
-         Glean.Schema.SearchCode.Types.PythonSearchByLowerCaseNameKindAndScopeFact
-       =
-       Glean.Schema.SearchCode.Types.PythonSearchByLowerCaseNameKindAndScopeFact_key
-  getName _proxy
-    = Glean.PredicateRef
-        "search.code.PythonSearchByLowerCaseNameKindAndScopeFact"
-        16
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.SearchCode.Types.pythonSearchByLowerCaseNameKindAndScopeFact_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.PythonSearchByLowerCaseNameKindAndScopeFact
-        x
-        k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.pythonSearchByLowerCaseNameKindAndScopeFact_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1463 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.PythonSearchByLowerCaseNameKindAndScopeFact
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1469 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.CxxSearchByNameKindAndScopeFact_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.CxxSearchByNameKindAndScopeFact_key
-       x1 x2 x3 x4)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.CxxSearchByNameKindAndScopeFact_key
-        <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.CxxSearchByNameKindAndScopeFact_key"
-           (Prelude.Just 0))
-{-# LINE 1482 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.CxxSearchByNameKindAndScopeFact_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "scope" (Glean.Schema.Cxx1.Types.Scope)
-          ('Angle.TField "kinds"
-             (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
-             ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-                ('Angle.TNoFields))))
-{-# LINE 1484 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.CxxSearchByNameKindAndScopeFact
-         where
-  type KeyType
-         Glean.Schema.SearchCode.Types.CxxSearchByNameKindAndScopeFact
-       = Glean.Schema.SearchCode.Types.CxxSearchByNameKindAndScopeFact_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.CxxSearchByNameKindAndScopeFact"
-        16
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.SearchCode.Types.cxxSearchByNameKindAndScopeFact_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.CxxSearchByNameKindAndScopeFact x k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.cxxSearchByNameKindAndScopeFact_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1494 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.CxxSearchByNameKindAndScopeFact
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1500 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.FlowSearchByLowerCaseNameKindAndScopeFact_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.FlowSearchByLowerCaseNameKindAndScopeFact_key
-       x1 x2 x3 x4)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.FlowSearchByLowerCaseNameKindAndScopeFact_key
-        <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef
-           "search.code.FlowSearchByLowerCaseNameKindAndScopeFact_key"
-           (Prelude.Just 0))
-{-# LINE 1513 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.FlowSearchByLowerCaseNameKindAndScopeFact_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "scope"
-          (Prelude.Maybe Glean.Schema.Flow.Types.Module)
-          ('Angle.TField "kinds"
-             (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
-             ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-                ('Angle.TNoFields))))
-{-# LINE 1515 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.FlowSearchByLowerCaseNameKindAndScopeFact
-         where
-  type KeyType
-         Glean.Schema.SearchCode.Types.FlowSearchByLowerCaseNameKindAndScopeFact
-       =
-       Glean.Schema.SearchCode.Types.FlowSearchByLowerCaseNameKindAndScopeFact_key
-  getName _proxy
-    = Glean.PredicateRef
-        "search.code.FlowSearchByLowerCaseNameKindAndScopeFact"
-        16
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.SearchCode.Types.flowSearchByLowerCaseNameKindAndScopeFact_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.FlowSearchByLowerCaseNameKindAndScopeFact
-        x
-        k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.flowSearchByLowerCaseNameKindAndScopeFact_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1525 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.FlowSearchByLowerCaseNameKindAndScopeFact
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1531 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.RustSearchByNameAndKind_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.RustSearchByNameAndKind_key x1 x2
-       x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.RustSearchByNameAndKind_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.RustSearchByNameAndKind_key"
-           (Prelude.Just 0))
-{-# LINE 1542 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.RustSearchByNameAndKind_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "kind"
-          (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
-          ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-             ('Angle.TNoFields)))
-{-# LINE 1544 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.RustSearchByNameAndKind
-         where
-  type KeyType Glean.Schema.SearchCode.Types.RustSearchByNameAndKind
-       = Glean.Schema.SearchCode.Types.RustSearchByNameAndKind_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.RustSearchByNameAndKind" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.SearchCode.Types.rustSearchByNameAndKind_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.RustSearchByNameAndKind x k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.rustSearchByNameAndKind_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1553 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.RustSearchByNameAndKind
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1559 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.PythonNameLowerCase_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.PythonNameLowerCase_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.PythonNameLowerCase_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.PythonNameLowerCase_key"
-           (Prelude.Just 0))
-{-# LINE 1570 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.PythonNameLowerCase_key
-     =
-     'Angle.TField "nameLowercase" (Data.Text.Text)
-       ('Angle.TField "kinds"
-          (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
-          ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields)))
-{-# LINE 1572 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.PythonNameLowerCase
-         where
-  type KeyType Glean.Schema.SearchCode.Types.PythonNameLowerCase =
-       Glean.Schema.SearchCode.Types.PythonNameLowerCase_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.PythonNameLowerCase" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.SearchCode.Types.pythonNameLowerCase_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.PythonNameLowerCase x k
-  getFactKey = Glean.Schema.SearchCode.Types.pythonNameLowerCase_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1581 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.PythonNameLowerCase
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1587 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.JavaSearchByNameWithFact_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.JavaSearchByNameWithFact_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.JavaSearchByNameWithFact_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.JavaSearchByNameWithFact_key"
-           (Prelude.Just 0))
-{-# LINE 1596 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.JavaSearchByNameWithFact_key
-     =
-     'Angle.TField "name"
-       (Glean.KeyType Glean.Schema.JavakotlinAlpha.Types.QName)
-       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-          ('Angle.TNoFields))
-{-# LINE 1598 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.JavaSearchByNameWithFact
-         where
-  type KeyType Glean.Schema.SearchCode.Types.JavaSearchByNameWithFact
-       = Glean.Schema.SearchCode.Types.JavaSearchByNameWithFact_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.JavaSearchByNameWithFact" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.SearchCode.Types.javaSearchByNameWithFact_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.JavaSearchByNameWithFact x k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.javaSearchByNameWithFact_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1608 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.JavaSearchByNameWithFact
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1614 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.JavaSearchByLowerCaseScope_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.JavaSearchByLowerCaseScope_key x1 x2
-       x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.JavaSearchByLowerCaseScope_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.JavaSearchByLowerCaseScope_key"
-           (Prelude.Just 0))
-{-# LINE 1625 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.JavaSearchByLowerCaseScope_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "scope" ([Data.Text.Text])
-          ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-             ('Angle.TNoFields)))
-{-# LINE 1627 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.JavaSearchByLowerCaseScope
-         where
-  type KeyType
-         Glean.Schema.SearchCode.Types.JavaSearchByLowerCaseScope
-       = Glean.Schema.SearchCode.Types.JavaSearchByLowerCaseScope_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.JavaSearchByLowerCaseScope" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.SearchCode.Types.javaSearchByLowerCaseScope_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.JavaSearchByLowerCaseScope x k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.javaSearchByLowerCaseScope_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1637 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.JavaSearchByLowerCaseScope
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1643 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.SearchByLowerCaseScope_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.SearchByLowerCaseScope_key x1 x2 x3
-       x4)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.SearchByLowerCaseScope_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.SearchByLowerCaseScope_key"
-           (Prelude.Just 0))
-{-# LINE 1656 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.SearchByLowerCaseScope_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "scope" ([Data.Text.Text])
-          ('Angle.TField "language" (Glean.Schema.Code.Types.Language)
-             ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-                ('Angle.TNoFields))))
-{-# LINE 1658 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.SearchByLowerCaseScope
-         where
-  type KeyType Glean.Schema.SearchCode.Types.SearchByLowerCaseScope =
-       Glean.Schema.SearchCode.Types.SearchByLowerCaseScope_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.SearchByLowerCaseScope" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.SearchCode.Types.searchByLowerCaseScope_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.SearchByLowerCaseScope x k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.searchByLowerCaseScope_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1667 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.SearchByLowerCaseScope
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1673 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.HackSearchByLowerCaseNameAndKind_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.HackSearchByLowerCaseNameAndKind_key
-       x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.HackSearchByLowerCaseNameAndKind_key
-        <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.HackSearchByLowerCaseNameAndKind_key"
-           (Prelude.Just 0))
-{-# LINE 1684 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.HackSearchByLowerCaseNameAndKind_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "kinds"
-          (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
-          ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-             ('Angle.TNoFields)))
-{-# LINE 1686 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.HackSearchByLowerCaseNameAndKind
-         where
-  type KeyType
-         Glean.Schema.SearchCode.Types.HackSearchByLowerCaseNameAndKind
-       =
-       Glean.Schema.SearchCode.Types.HackSearchByLowerCaseNameAndKind_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.HackSearchByLowerCaseNameAndKind"
-        16
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.SearchCode.Types.hackSearchByLowerCaseNameAndKind_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.HackSearchByLowerCaseNameAndKind x
-        k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.hackSearchByLowerCaseNameAndKind_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1696 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.HackSearchByLowerCaseNameAndKind
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1702 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.PpSearchByNameKind_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.PpSearchByNameKind_key x1 x2 x3)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.PpSearchByNameKind_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.PpSearchByNameKind_key"
-           (Prelude.Just 0))
-{-# LINE 1713 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.PpSearchByNameKind_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "kinds"
-          (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
-          ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-             ('Angle.TNoFields)))
-{-# LINE 1715 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.PpSearchByNameKind
-         where
-  type KeyType Glean.Schema.SearchCode.Types.PpSearchByNameKind =
-       Glean.Schema.SearchCode.Types.PpSearchByNameKind_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.PpSearchByNameKind" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.SearchCode.Types.ppSearchByNameKind_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.PpSearchByNameKind x k
-  getFactKey = Glean.Schema.SearchCode.Types.ppSearchByNameKind_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1724 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.PpSearchByNameKind
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1730 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.JavaSearchByName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.JavaSearchByName_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.JavaSearchByName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.JavaSearchByName_key"
-           (Prelude.Just 0))
-{-# LINE 1739 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.JavaSearchByName_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-          ('Angle.TNoFields))
-{-# LINE 1741 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.JavaSearchByName
-         where
-  type KeyType Glean.Schema.SearchCode.Types.JavaSearchByName =
-       Glean.Schema.SearchCode.Types.JavaSearchByName_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.JavaSearchByName" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.SearchCode.Types.javaSearchByName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.JavaSearchByName x k
-  getFactKey = Glean.Schema.SearchCode.Types.javaSearchByName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1750 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type Glean.Schema.SearchCode.Types.JavaSearchByName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1756 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.ThriftSearchByLowerCaseName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.ThriftSearchByLowerCaseName_key x1
-       x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.ThriftSearchByLowerCaseName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.ThriftSearchByLowerCaseName_key"
-           (Prelude.Just 0))
-{-# LINE 1765 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.ThriftSearchByLowerCaseName_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-          ('Angle.TNoFields))
-{-# LINE 1767 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.ThriftSearchByLowerCaseName
-         where
-  type KeyType
-         Glean.Schema.SearchCode.Types.ThriftSearchByLowerCaseName
-       = Glean.Schema.SearchCode.Types.ThriftSearchByLowerCaseName_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.ThriftSearchByLowerCaseName" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.SearchCode.Types.thriftSearchByLowerCaseName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.ThriftSearchByLowerCaseName x k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.thriftSearchByLowerCaseName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1777 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.ThriftSearchByLowerCaseName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1783 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.GraphQLSearchByLowerCaseName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.GraphQLSearchByLowerCaseName_key x1
-       x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.GraphQLSearchByLowerCaseName_key
-        <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.GraphQLSearchByLowerCaseName_key"
-           (Prelude.Just 0))
-{-# LINE 1792 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.GraphQLSearchByLowerCaseName_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-          ('Angle.TNoFields))
-{-# LINE 1794 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.GraphQLSearchByLowerCaseName
-         where
-  type KeyType
-         Glean.Schema.SearchCode.Types.GraphQLSearchByLowerCaseName
-       = Glean.Schema.SearchCode.Types.GraphQLSearchByLowerCaseName_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.GraphQLSearchByLowerCaseName" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.SearchCode.Types.graphQLSearchByLowerCaseName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.GraphQLSearchByLowerCaseName x k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.graphQLSearchByLowerCaseName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1804 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.GraphQLSearchByLowerCaseName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1810 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.ErlangSearchByLowerCaseName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.ErlangSearchByLowerCaseName_key x1
-       x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.ErlangSearchByLowerCaseName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.ErlangSearchByLowerCaseName_key"
-           (Prelude.Just 0))
-{-# LINE 1819 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.ErlangSearchByLowerCaseName_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-          ('Angle.TNoFields))
-{-# LINE 1821 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.ErlangSearchByLowerCaseName
-         where
-  type KeyType
-         Glean.Schema.SearchCode.Types.ErlangSearchByLowerCaseName
-       = Glean.Schema.SearchCode.Types.ErlangSearchByLowerCaseName_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.ErlangSearchByLowerCaseName" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.SearchCode.Types.erlangSearchByLowerCaseName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.ErlangSearchByLowerCaseName x k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.erlangSearchByLowerCaseName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1831 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.ErlangSearchByLowerCaseName
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1837 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.PythonSearchByNameKindAndScopeFact_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.PythonSearchByNameKindAndScopeFact_key
-       x1 x2 x3 x4)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-         Glean.buildRtsValue b x3
-         Glean.buildRtsValue b x4
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.PythonSearchByNameKindAndScopeFact_key
-        <$> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef
-           "search.code.PythonSearchByNameKindAndScopeFact_key"
-           (Prelude.Just 0))
-{-# LINE 1850 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.PythonSearchByNameKindAndScopeFact_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "scope"
-          (Prelude.Maybe Glean.Schema.Python.Types.SName)
-          ('Angle.TField "kinds"
-             (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
-             ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-                ('Angle.TNoFields))))
-{-# LINE 1852 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.PythonSearchByNameKindAndScopeFact
-         where
-  type KeyType
-         Glean.Schema.SearchCode.Types.PythonSearchByNameKindAndScopeFact
-       =
-       Glean.Schema.SearchCode.Types.PythonSearchByNameKindAndScopeFact_key
-  getName _proxy
-    = Glean.PredicateRef
-        "search.code.PythonSearchByNameKindAndScopeFact"
-        16
-  getId
-    = Glean.IdOf .
-        Glean.Fid .
-          Glean.Schema.SearchCode.Types.pythonSearchByNameKindAndScopeFact_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.PythonSearchByNameKindAndScopeFact
-        x
-        k
-  getFactKey
-    = Glean.Schema.SearchCode.Types.pythonSearchByNameKindAndScopeFact_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1862 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.PythonSearchByNameKindAndScopeFact
-         where
-  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
-  decodeRtsValue = Glean.decodeRef
-  decodeAsFact = Glean.decodeFact
-  sourceType = Glean.predicateSourceType
-{-# LINE 1868 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Type
-           Glean.Schema.SearchCode.Types.GraphQLSearchByName_key
-         where
-  buildRtsValue b
-    (Glean.Schema.SearchCode.Types.GraphQLSearchByName_key x1 x2)
-    = do Glean.buildRtsValue b x1
-         Glean.buildRtsValue b x2
-  decodeRtsValue
-    = Glean.Schema.SearchCode.Types.GraphQLSearchByName_key <$>
-        Glean.decodeRtsValue
-        <*> Glean.decodeRtsValue
-  sourceType _
-    = Angle.NamedTy ()
-        (Angle.SourceRef "search.code.GraphQLSearchByName_key"
-           (Prelude.Just 0))
-{-# LINE 1877 "glean/schema/thrift/search_code_include.hs" #-}
-type instance
-     Angle.RecordFields
-       Glean.Schema.SearchCode.Types.GraphQLSearchByName_key
-     =
-     'Angle.TField "name" (Data.Text.Text)
-       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
-          ('Angle.TNoFields))
-{-# LINE 1879 "glean/schema/thrift/search_code_include.hs" #-}
-instance Glean.Predicate
-           Glean.Schema.SearchCode.Types.GraphQLSearchByName
-         where
-  type KeyType Glean.Schema.SearchCode.Types.GraphQLSearchByName =
-       Glean.Schema.SearchCode.Types.GraphQLSearchByName_key
-  getName _proxy
-    = Glean.PredicateRef "search.code.GraphQLSearchByName" 16
-  getId
-    = Glean.IdOf .
-        Glean.Fid . Glean.Schema.SearchCode.Types.graphQLSearchByName_id
-  mkFact (Glean.IdOf (Glean.Fid x)) k _
-    = Glean.Schema.SearchCode.Types.GraphQLSearchByName x k
-  getFactKey = Glean.Schema.SearchCode.Types.graphQLSearchByName_key
-  getFactValue _ = Prelude.Just ()
-{-# LINE 1888 "glean/schema/thrift/search_code_include.hs" #-}
+        SwiftSearchByNameAndKind_id,
+        SwiftSearchByNameAndKind(SwiftSearchByNameAndKind,
+                                 swiftSearchByNameAndKind_id, swiftSearchByNameAndKind_key),
+        SwiftSearchByLowerCaseNameAndKind_id,
+        SwiftSearchByLowerCaseNameAndKind(SwiftSearchByLowerCaseNameAndKind,
+                                          swiftSearchByLowerCaseNameAndKind_id,
+                                          swiftSearchByLowerCaseNameAndKind_key),
+        SearchByScopeAndKind_id,
+        SearchByScopeAndKind(SearchByScopeAndKind, searchByScopeAndKind_id,
+                             searchByScopeAndKind_key),
+        SearchByScope_id,
+        SearchByScope(SearchByScope, searchByScope_id, searchByScope_key),
+        SearchByNameKindAndLanguage_id,
+        SearchByNameKindAndLanguage(SearchByNameKindAndLanguage,
+                                    searchByNameKindAndLanguage_id,
+                                    searchByNameKindAndLanguage_key),
+        SearchByNameAndLanguage_id,
+        SearchByNameAndLanguage(SearchByNameAndLanguage,
+                                searchByNameAndLanguage_id, searchByNameAndLanguage_key),
+        SearchByLowerCaseScopeAndKind_id,
+        SearchByLowerCaseScopeAndKind(SearchByLowerCaseScopeAndKind,
+                                      searchByLowerCaseScopeAndKind_id,
+                                      searchByLowerCaseScopeAndKind_key),
+        SearchByLowerCaseScope_id,
+        SearchByLowerCaseScope(SearchByLowerCaseScope,
+                               searchByLowerCaseScope_id, searchByLowerCaseScope_key),
+        SearchByLowerCaseNameKindAndLanguage_id,
+        SearchByLowerCaseNameKindAndLanguage(SearchByLowerCaseNameKindAndLanguage,
+                                             searchByLowerCaseNameKindAndLanguage_id,
+                                             searchByLowerCaseNameKindAndLanguage_key),
+        SearchByLowerCaseNameAndLanguage_id,
+        SearchByLowerCaseNameAndLanguage(SearchByLowerCaseNameAndLanguage,
+                                         searchByLowerCaseNameAndLanguage_id,
+                                         searchByLowerCaseNameAndLanguage_key),
+        RustSearchByNameAndKind_id,
+        RustSearchByNameAndKind(RustSearchByNameAndKind,
+                                rustSearchByNameAndKind_id, rustSearchByNameAndKind_key),
+        RustSearchByLowerCaseNameAndKind_id,
+        RustSearchByLowerCaseNameAndKind(RustSearchByLowerCaseNameAndKind,
+                                         rustSearchByLowerCaseNameAndKind_id,
+                                         rustSearchByLowerCaseNameAndKind_key),
+        PythonSearchByScopeAndKind_id,
+        PythonSearchByScopeAndKind(PythonSearchByScopeAndKind,
+                                   pythonSearchByScopeAndKind_id, pythonSearchByScopeAndKind_key),
+        PythonSearchByNameKindAndScopeFact_id,
+        PythonSearchByNameKindAndScopeFact(PythonSearchByNameKindAndScopeFact,
+                                           pythonSearchByNameKindAndScopeFact_id,
+                                           pythonSearchByNameKindAndScopeFact_key),
+        PythonSearchByLowerCaseScopeAndKind_id,
+        PythonSearchByLowerCaseScopeAndKind(PythonSearchByLowerCaseScopeAndKind,
+                                            pythonSearchByLowerCaseScopeAndKind_id,
+                                            pythonSearchByLowerCaseScopeAndKind_key),
+        PythonSearchByLowerCaseNameKindAndScopeFact_id,
+        PythonSearchByLowerCaseNameKindAndScopeFact(PythonSearchByLowerCaseNameKindAndScopeFact,
+                                                    pythonSearchByLowerCaseNameKindAndScopeFact_id,
+                                                    pythonSearchByLowerCaseNameKindAndScopeFact_key),
+        PythonNameLowerCase_id,
+        PythonNameLowerCase(PythonNameLowerCase, pythonNameLowerCase_id,
+                            pythonNameLowerCase_key),
+        PpSearchByNameKind_id,
+        PpSearchByNameKind(PpSearchByNameKind, ppSearchByNameKind_id,
+                           ppSearchByNameKind_key),
+        PpSearchByLowerCaseNameKind_id,
+        PpSearchByLowerCaseNameKind(PpSearchByLowerCaseNameKind,
+                                    ppSearchByLowerCaseNameKind_id,
+                                    ppSearchByLowerCaseNameKind_key),
+        LsifSearchByName_id,
+        LsifSearchByName(LsifSearchByName, lsifSearchByName_id,
+                         lsifSearchByName_key),
+        LsifSearchByLowerCaseName_id,
+        LsifSearchByLowerCaseName(LsifSearchByLowerCaseName,
+                                  lsifSearchByLowerCaseName_id, lsifSearchByLowerCaseName_key),
+        KotlinSearchByScopeWithName_id,
+        KotlinSearchByScopeWithName(KotlinSearchByScopeWithName,
+                                    kotlinSearchByScopeWithName_id,
+                                    kotlinSearchByScopeWithName_key),
+        KotlinSearchByScope_id,
+        KotlinSearchByScope(KotlinSearchByScope, kotlinSearchByScope_id,
+                            kotlinSearchByScope_key),
+        KotlinSearchByNameWithFact_id,
+        KotlinSearchByNameWithFact(KotlinSearchByNameWithFact,
+                                   kotlinSearchByNameWithFact_id, kotlinSearchByNameWithFact_key),
+        KotlinSearchByName_id,
+        KotlinSearchByName(KotlinSearchByName, kotlinSearchByName_id,
+                           kotlinSearchByName_key),
+        KotlinSearchByLowerCaseScope_id,
+        KotlinSearchByLowerCaseScope(KotlinSearchByLowerCaseScope,
+                                     kotlinSearchByLowerCaseScope_id,
+                                     kotlinSearchByLowerCaseScope_key),
+        KotlinSearchByLowerCaseName_id,
+        KotlinSearchByLowerCaseName(KotlinSearchByLowerCaseName,
+                                    kotlinSearchByLowerCaseName_id,
+                                    kotlinSearchByLowerCaseName_key),
+        JavaSearchByScopeWithName_id,
+        JavaSearchByScopeWithName(JavaSearchByScopeWithName,
+                                  javaSearchByScopeWithName_id, javaSearchByScopeWithName_key),
+        JavaSearchByScope_id,
+        JavaSearchByScope(JavaSearchByScope, javaSearchByScope_id,
+                          javaSearchByScope_key),
+        JavaSearchByNameWithFact_id,
+        JavaSearchByNameWithFact(JavaSearchByNameWithFact,
+                                 javaSearchByNameWithFact_id, javaSearchByNameWithFact_key),
+        JavaSearchByName_id,
+        JavaSearchByName(JavaSearchByName, javaSearchByName_id,
+                         javaSearchByName_key),
+        JavaSearchByLowerCaseScope_id,
+        JavaSearchByLowerCaseScope(JavaSearchByLowerCaseScope,
+                                   javaSearchByLowerCaseScope_id, javaSearchByLowerCaseScope_key),
+        JavaSearchByLowerCaseName_id,
+        JavaSearchByLowerCaseName(JavaSearchByLowerCaseName,
+                                  javaSearchByLowerCaseName_id, javaSearchByLowerCaseName_key),
+        HsSearchByName_id,
+        HsSearchByName(HsSearchByName, hsSearchByName_id,
+                       hsSearchByName_key),
+        HsSearchByLowerCaseName_id,
+        HsSearchByLowerCaseName(HsSearchByLowerCaseName,
+                                hsSearchByLowerCaseName_id, hsSearchByLowerCaseName_key),
+        HackSearchByScopeWithNameKinds_id,
+        HackSearchByScopeWithNameKinds(HackSearchByScopeWithNameKinds,
+                                       hackSearchByScopeWithNameKinds_id,
+                                       hackSearchByScopeWithNameKinds_key),
+        HackSearchByScopeAndKind_id,
+        HackSearchByScopeAndKind(HackSearchByScopeAndKind,
+                                 hackSearchByScopeAndKind_id, hackSearchByScopeAndKind_key),
+        HackSearchByNameKindWithQName_id,
+        HackSearchByNameKindWithQName(HackSearchByNameKindWithQName,
+                                      hackSearchByNameKindWithQName_id,
+                                      hackSearchByNameKindWithQName_key),
+        HackSearchByNameKindWithNamespace_id,
+        HackSearchByNameKindWithNamespace(HackSearchByNameKindWithNamespace,
+                                          hackSearchByNameKindWithNamespace_id,
+                                          hackSearchByNameKindWithNamespace_key),
+        HackSearchByNameAndKind_id,
+        HackSearchByNameAndKind(HackSearchByNameAndKind,
+                                hackSearchByNameAndKind_id, hackSearchByNameAndKind_key),
+        HackSearchByLowerCaseScopeAndKind_id,
+        HackSearchByLowerCaseScopeAndKind(HackSearchByLowerCaseScopeAndKind,
+                                          hackSearchByLowerCaseScopeAndKind_id,
+                                          hackSearchByLowerCaseScopeAndKind_key),
+        HackSearchByLowerCaseNameAndKind_id,
+        HackSearchByLowerCaseNameAndKind(HackSearchByLowerCaseNameAndKind,
+                                         hackSearchByLowerCaseNameAndKind_id,
+                                         hackSearchByLowerCaseNameAndKind_key),
+        HackNameLowerCase_id,
+        HackNameLowerCase(HackNameLowerCase, hackNameLowerCase_id,
+                          hackNameLowerCase_key),
+        GraphQLSearchByName_id,
+        GraphQLSearchByName(GraphQLSearchByName, graphQLSearchByName_id,
+                            graphQLSearchByName_key),
+        GraphQLSearchByLowerCaseName_id,
+        GraphQLSearchByLowerCaseName(GraphQLSearchByLowerCaseName,
+                                     graphQLSearchByLowerCaseName_id,
+                                     graphQLSearchByLowerCaseName_key),
+        FlowSearchByScopeAndKind_id,
+        FlowSearchByScopeAndKind(FlowSearchByScopeAndKind,
+                                 flowSearchByScopeAndKind_id, flowSearchByScopeAndKind_key),
+        FlowSearchByNameKindAndScopeFact_id,
+        FlowSearchByNameKindAndScopeFact(FlowSearchByNameKindAndScopeFact,
+                                         flowSearchByNameKindAndScopeFact_id,
+                                         flowSearchByNameKindAndScopeFact_key),
+        FlowSearchByLowerCaseScopeAndKind_id,
+        FlowSearchByLowerCaseScopeAndKind(FlowSearchByLowerCaseScopeAndKind,
+                                          flowSearchByLowerCaseScopeAndKind_id,
+                                          flowSearchByLowerCaseScopeAndKind_key),
+        FlowSearchByLowerCaseNameKindAndScopeFact_id,
+        FlowSearchByLowerCaseNameKindAndScopeFact(FlowSearchByLowerCaseNameKindAndScopeFact,
+                                                  flowSearchByLowerCaseNameKindAndScopeFact_id,
+                                                  flowSearchByLowerCaseNameKindAndScopeFact_key),
+        FlowNameLowerCase_id,
+        FlowNameLowerCase(FlowNameLowerCase, flowNameLowerCase_id,
+                          flowNameLowerCase_key),
+        FbthriftSearchByNameFact_id,
+        FbthriftSearchByNameFact(FbthriftSearchByNameFact,
+                                 fbthriftSearchByNameFact_id, fbthriftSearchByNameFact_key),
+        ErlangSearchByName_id,
+        ErlangSearchByName(ErlangSearchByName, erlangSearchByName_id,
+                           erlangSearchByName_key),
+        ErlangSearchByLowerCaseName_id,
+        ErlangSearchByLowerCaseName(ErlangSearchByLowerCaseName,
+                                    erlangSearchByLowerCaseName_id,
+                                    erlangSearchByLowerCaseName_key),
+        CxxSearchByScopeAndKind_id,
+        CxxSearchByScopeAndKind(CxxSearchByScopeAndKind,
+                                cxxSearchByScopeAndKind_id, cxxSearchByScopeAndKind_key),
+        CxxSearchByNameKindAndScopeFact_id,
+        CxxSearchByNameKindAndScopeFact(CxxSearchByNameKindAndScopeFact,
+                                        cxxSearchByNameKindAndScopeFact_id,
+                                        cxxSearchByNameKindAndScopeFact_key),
+        CxxSearchByLowerCaseScopeAndKind_id,
+        CxxSearchByLowerCaseScopeAndKind(CxxSearchByLowerCaseScopeAndKind,
+                                         cxxSearchByLowerCaseScopeAndKind_id,
+                                         cxxSearchByLowerCaseScopeAndKind_key),
+        CxxSearchByLowerCaseNameKindAndScopeFact_id,
+        CxxSearchByLowerCaseNameKindAndScopeFact(CxxSearchByLowerCaseNameKindAndScopeFact,
+                                                 cxxSearchByLowerCaseNameKindAndScopeFact_id,
+                                                 cxxSearchByLowerCaseNameKindAndScopeFact_key),
+        CxxPreferDefinitions_id,
+        CxxPreferDefinitions(CxxPreferDefinitions, cxxPreferDefinitions_id,
+                             cxxPreferDefinitions_key),
+        CxxNameLowerCase_id,
+        CxxNameLowerCase(CxxNameLowerCase, cxxNameLowerCase_id,
+                         cxxNameLowerCase_key),
+        CSharpSearchByName_id,
+        CSharpSearchByName(CSharpSearchByName, cSharpSearchByName_id,
+                           cSharpSearchByName_key),
+        CSharpSearchByLowerCaseName_id,
+        CSharpSearchByLowerCaseName(CSharpSearchByLowerCaseName,
+                                    cSharpSearchByLowerCaseName_id,
+                                    cSharpSearchByLowerCaseName_key),
+        BuckSearchByName_id,
+        BuckSearchByName(BuckSearchByName, buckSearchByName_id,
+                         buckSearchByName_key),
+        BuckSearchByLowerCaseName_id,
+        BuckSearchByLowerCaseName(BuckSearchByLowerCaseName,
+                                  buckSearchByLowerCaseName_id, buckSearchByLowerCaseName_key),
+        BuckSearchByLocalNameFact_id,
+        BuckSearchByLocalNameFact(BuckSearchByLocalNameFact,
+                                  buckSearchByLocalNameFact_id, buckSearchByLocalNameFact_key),
+        AngleSearchByName_id,
+        AngleSearchByName(AngleSearchByName, angleSearchByName_id,
+                          angleSearchByName_key),
+        AngleSearchByLowerCaseName_id,
+        AngleSearchByLowerCaseName(AngleSearchByLowerCaseName,
+                                   angleSearchByLowerCaseName_id, angleSearchByLowerCaseName_key),
+        ThriftSearchByName_key(ThriftSearchByName_key,
+                               thriftSearchByName_key_name, thriftSearchByName_key_entity),
+        ThriftSearchByLowerCaseName_key(ThriftSearchByLowerCaseName_key,
+                                        thriftSearchByLowerCaseName_key_name,
+                                        thriftSearchByLowerCaseName_key_entity),
+        SwiftSearchByNameAndKind_key(SwiftSearchByNameAndKind_key,
+                                     swiftSearchByNameAndKind_key_name,
+                                     swiftSearchByNameAndKind_key_kind,
+                                     swiftSearchByNameAndKind_key_entity),
+        SwiftSearchByLowerCaseNameAndKind_key(SwiftSearchByLowerCaseNameAndKind_key,
+                                              swiftSearchByLowerCaseNameAndKind_key_name,
+                                              swiftSearchByLowerCaseNameAndKind_key_kind,
+                                              swiftSearchByLowerCaseNameAndKind_key_entity),
+        SearchByScopeAndKind_key(SearchByScopeAndKind_key,
+                                 searchByScopeAndKind_key_name, searchByScopeAndKind_key_scope,
+                                 searchByScopeAndKind_key_language, searchByScopeAndKind_key_kinds,
+                                 searchByScopeAndKind_key_entity),
+        SearchByScope_key(SearchByScope_key, searchByScope_key_name,
+                          searchByScope_key_scope, searchByScope_key_language,
+                          searchByScope_key_entity),
+        SearchByNameKindAndLanguage_key(SearchByNameKindAndLanguage_key,
+                                        searchByNameKindAndLanguage_key_name,
+                                        searchByNameKindAndLanguage_key_language,
+                                        searchByNameKindAndLanguage_key_kinds,
+                                        searchByNameKindAndLanguage_key_entity),
+        SearchByNameAndLanguage_key(SearchByNameAndLanguage_key,
+                                    searchByNameAndLanguage_key_name,
+                                    searchByNameAndLanguage_key_language,
+                                    searchByNameAndLanguage_key_entity),
+        SearchByLowerCaseScopeAndKind_key(SearchByLowerCaseScopeAndKind_key,
+                                          searchByLowerCaseScopeAndKind_key_name,
+                                          searchByLowerCaseScopeAndKind_key_scope,
+                                          searchByLowerCaseScopeAndKind_key_language,
+                                          searchByLowerCaseScopeAndKind_key_kinds,
+                                          searchByLowerCaseScopeAndKind_key_entity),
+        SearchByLowerCaseScope_key(SearchByLowerCaseScope_key,
+                                   searchByLowerCaseScope_key_name,
+                                   searchByLowerCaseScope_key_scope,
+                                   searchByLowerCaseScope_key_language,
+                                   searchByLowerCaseScope_key_entity),
+        SearchByLowerCaseNameKindAndLanguage_key(SearchByLowerCaseNameKindAndLanguage_key,
+                                                 searchByLowerCaseNameKindAndLanguage_key_name,
+                                                 searchByLowerCaseNameKindAndLanguage_key_language,
+                                                 searchByLowerCaseNameKindAndLanguage_key_kinds,
+                                                 searchByLowerCaseNameKindAndLanguage_key_entity),
+        SearchByLowerCaseNameAndLanguage_key(SearchByLowerCaseNameAndLanguage_key,
+                                             searchByLowerCaseNameAndLanguage_key_name,
+                                             searchByLowerCaseNameAndLanguage_key_language,
+                                             searchByLowerCaseNameAndLanguage_key_entity),
+        RustSearchByNameAndKind_key(RustSearchByNameAndKind_key,
+                                    rustSearchByNameAndKind_key_name,
+                                    rustSearchByNameAndKind_key_kind,
+                                    rustSearchByNameAndKind_key_entity),
+        RustSearchByLowerCaseNameAndKind_key(RustSearchByLowerCaseNameAndKind_key,
+                                             rustSearchByLowerCaseNameAndKind_key_name,
+                                             rustSearchByLowerCaseNameAndKind_key_kind,
+                                             rustSearchByLowerCaseNameAndKind_key_entity),
+        PythonSearchByScopeAndKind_key(PythonSearchByScopeAndKind_key,
+                                       pythonSearchByScopeAndKind_key_name,
+                                       pythonSearchByScopeAndKind_key_scope,
+                                       pythonSearchByScopeAndKind_key_kinds,
+                                       pythonSearchByScopeAndKind_key_entity),
+        PythonSearchByNameKindAndScopeFact_key(PythonSearchByNameKindAndScopeFact_key,
+                                               pythonSearchByNameKindAndScopeFact_key_name,
+                                               pythonSearchByNameKindAndScopeFact_key_scope,
+                                               pythonSearchByNameKindAndScopeFact_key_kinds,
+                                               pythonSearchByNameKindAndScopeFact_key_entity),
+        PythonSearchByLowerCaseScopeAndKind_key(PythonSearchByLowerCaseScopeAndKind_key,
+                                                pythonSearchByLowerCaseScopeAndKind_key_name,
+                                                pythonSearchByLowerCaseScopeAndKind_key_scope,
+                                                pythonSearchByLowerCaseScopeAndKind_key_kinds,
+                                                pythonSearchByLowerCaseScopeAndKind_key_entity),
+        PythonSearchByLowerCaseNameKindAndScopeFact_key(PythonSearchByLowerCaseNameKindAndScopeFact_key,
+                                                        pythonSearchByLowerCaseNameKindAndScopeFact_key_name,
+                                                        pythonSearchByLowerCaseNameKindAndScopeFact_key_scope,
+                                                        pythonSearchByLowerCaseNameKindAndScopeFact_key_kinds,
+                                                        pythonSearchByLowerCaseNameKindAndScopeFact_key_entity),
+        PythonNameLowerCase_key(PythonNameLowerCase_key,
+                                pythonNameLowerCase_key_nameLowercase,
+                                pythonNameLowerCase_key_kinds, pythonNameLowerCase_key_name),
+        PpSearchByNameKind_key(PpSearchByNameKind_key,
+                               ppSearchByNameKind_key_name, ppSearchByNameKind_key_kinds,
+                               ppSearchByNameKind_key_entity),
+        PpSearchByLowerCaseNameKind_key(PpSearchByLowerCaseNameKind_key,
+                                        ppSearchByLowerCaseNameKind_key_name,
+                                        ppSearchByLowerCaseNameKind_key_kinds,
+                                        ppSearchByLowerCaseNameKind_key_entity),
+        LsifSearchByName_key(LsifSearchByName_key,
+                             lsifSearchByName_key_name, lsifSearchByName_key_entity),
+        LsifSearchByLowerCaseName_key(LsifSearchByLowerCaseName_key,
+                                      lsifSearchByLowerCaseName_key_name,
+                                      lsifSearchByLowerCaseName_key_entity),
+        KotlinSearchByScopeWithName_key(KotlinSearchByScopeWithName_key,
+                                        kotlinSearchByScopeWithName_key_name,
+                                        kotlinSearchByScopeWithName_key_insensitive,
+                                        kotlinSearchByScopeWithName_key_scope,
+                                        kotlinSearchByScopeWithName_key_entity),
+        KotlinSearchByScope_key(KotlinSearchByScope_key,
+                                kotlinSearchByScope_key_name, kotlinSearchByScope_key_scope,
+                                kotlinSearchByScope_key_entity),
+        KotlinSearchByNameWithFact_key(KotlinSearchByNameWithFact_key,
+                                       kotlinSearchByNameWithFact_key_name,
+                                       kotlinSearchByNameWithFact_key_entity),
+        KotlinSearchByName_key(KotlinSearchByName_key,
+                               kotlinSearchByName_key_name, kotlinSearchByName_key_entity),
+        KotlinSearchByLowerCaseScope_key(KotlinSearchByLowerCaseScope_key,
+                                         kotlinSearchByLowerCaseScope_key_name,
+                                         kotlinSearchByLowerCaseScope_key_scope,
+                                         kotlinSearchByLowerCaseScope_key_entity),
+        KotlinSearchByLowerCaseName_key(KotlinSearchByLowerCaseName_key,
+                                        kotlinSearchByLowerCaseName_key_name,
+                                        kotlinSearchByLowerCaseName_key_entity),
+        JavaSearchByScopeWithName_key(JavaSearchByScopeWithName_key,
+                                      javaSearchByScopeWithName_key_name,
+                                      javaSearchByScopeWithName_key_insensitive,
+                                      javaSearchByScopeWithName_key_scope,
+                                      javaSearchByScopeWithName_key_entity),
+        JavaSearchByScope_key(JavaSearchByScope_key,
+                              javaSearchByScope_key_name, javaSearchByScope_key_scope,
+                              javaSearchByScope_key_entity),
+        JavaSearchByNameWithFact_key(JavaSearchByNameWithFact_key,
+                                     javaSearchByNameWithFact_key_name,
+                                     javaSearchByNameWithFact_key_entity),
+        JavaSearchByName_key(JavaSearchByName_key,
+                             javaSearchByName_key_name, javaSearchByName_key_entity),
+        JavaSearchByLowerCaseScope_key(JavaSearchByLowerCaseScope_key,
+                                       javaSearchByLowerCaseScope_key_name,
+                                       javaSearchByLowerCaseScope_key_scope,
+                                       javaSearchByLowerCaseScope_key_entity),
+        JavaSearchByLowerCaseName_key(JavaSearchByLowerCaseName_key,
+                                      javaSearchByLowerCaseName_key_name,
+                                      javaSearchByLowerCaseName_key_entity),
+        HsSearchByName_key(HsSearchByName_key, hsSearchByName_key_name,
+                           hsSearchByName_key_entity),
+        HsSearchByLowerCaseName_key(HsSearchByLowerCaseName_key,
+                                    hsSearchByLowerCaseName_key_name,
+                                    hsSearchByLowerCaseName_key_entity),
+        HackSearchByScopeWithNameKinds_key(HackSearchByScopeWithNameKinds_key,
+                                           hackSearchByScopeWithNameKinds_key_name,
+                                           hackSearchByScopeWithNameKinds_key_insensitive,
+                                           hackSearchByScopeWithNameKinds_key_scope,
+                                           hackSearchByScopeWithNameKinds_key_kinds,
+                                           hackSearchByScopeWithNameKinds_key_entity),
+        HackSearchByScopeAndKind_key(HackSearchByScopeAndKind_key,
+                                     hackSearchByScopeAndKind_key_name,
+                                     hackSearchByScopeAndKind_key_scope,
+                                     hackSearchByScopeAndKind_key_kinds,
+                                     hackSearchByScopeAndKind_key_entity),
+        HackSearchByNameKindWithQName_key(HackSearchByNameKindWithQName_key,
+                                          hackSearchByNameKindWithQName_key_name,
+                                          hackSearchByNameKindWithQName_key_scope,
+                                          hackSearchByNameKindWithQName_key_scopeNamespace,
+                                          hackSearchByNameKindWithQName_key_kinds,
+                                          hackSearchByNameKindWithQName_key_entity),
+        HackSearchByNameKindWithNamespace_key(HackSearchByNameKindWithNamespace_key,
+                                              hackSearchByNameKindWithNamespace_key_name,
+                                              hackSearchByNameKindWithNamespace_key_scope,
+                                              hackSearchByNameKindWithNamespace_key_kinds,
+                                              hackSearchByNameKindWithNamespace_key_entity),
+        HackSearchByNameAndKind_key(HackSearchByNameAndKind_key,
+                                    hackSearchByNameAndKind_key_name,
+                                    hackSearchByNameAndKind_key_kinds,
+                                    hackSearchByNameAndKind_key_entity),
+        HackSearchByLowerCaseScopeAndKind_key(HackSearchByLowerCaseScopeAndKind_key,
+                                              hackSearchByLowerCaseScopeAndKind_key_name,
+                                              hackSearchByLowerCaseScopeAndKind_key_scope,
+                                              hackSearchByLowerCaseScopeAndKind_key_kinds,
+                                              hackSearchByLowerCaseScopeAndKind_key_entity),
+        HackSearchByLowerCaseNameAndKind_key(HackSearchByLowerCaseNameAndKind_key,
+                                             hackSearchByLowerCaseNameAndKind_key_name,
+                                             hackSearchByLowerCaseNameAndKind_key_kinds,
+                                             hackSearchByLowerCaseNameAndKind_key_entity),
+        HackNameLowerCase_key(HackNameLowerCase_key,
+                              hackNameLowerCase_key_nameLowercase, hackNameLowerCase_key_kinds,
+                              hackNameLowerCase_key_name),
+        GraphQLSearchByName_key(GraphQLSearchByName_key,
+                                graphQLSearchByName_key_name, graphQLSearchByName_key_entity),
+        GraphQLSearchByLowerCaseName_key(GraphQLSearchByLowerCaseName_key,
+                                         graphQLSearchByLowerCaseName_key_name,
+                                         graphQLSearchByLowerCaseName_key_entity),
+        FlowSearchByScopeAndKind_key(FlowSearchByScopeAndKind_key,
+                                     flowSearchByScopeAndKind_key_name,
+                                     flowSearchByScopeAndKind_key_scope,
+                                     flowSearchByScopeAndKind_key_kinds,
+                                     flowSearchByScopeAndKind_key_entity),
+        FlowSearchByNameKindAndScopeFact_key(FlowSearchByNameKindAndScopeFact_key,
+                                             flowSearchByNameKindAndScopeFact_key_name,
+                                             flowSearchByNameKindAndScopeFact_key_scope,
+                                             flowSearchByNameKindAndScopeFact_key_kinds,
+                                             flowSearchByNameKindAndScopeFact_key_entity),
+        FlowSearchByLowerCaseScopeAndKind_key(FlowSearchByLowerCaseScopeAndKind_key,
+                                              flowSearchByLowerCaseScopeAndKind_key_name,
+                                              flowSearchByLowerCaseScopeAndKind_key_scope,
+                                              flowSearchByLowerCaseScopeAndKind_key_kinds,
+                                              flowSearchByLowerCaseScopeAndKind_key_entity),
+        FlowSearchByLowerCaseNameKindAndScopeFact_key(FlowSearchByLowerCaseNameKindAndScopeFact_key,
+                                                      flowSearchByLowerCaseNameKindAndScopeFact_key_name,
+                                                      flowSearchByLowerCaseNameKindAndScopeFact_key_scope,
+                                                      flowSearchByLowerCaseNameKindAndScopeFact_key_kinds,
+                                                      flowSearchByLowerCaseNameKindAndScopeFact_key_entity),
+        FlowNameLowerCase_key(FlowNameLowerCase_key,
+                              flowNameLowerCase_key_nameLowercase, flowNameLowerCase_key_kinds,
+                              flowNameLowerCase_key_name),
+        FbthriftSearchByNameFact_key(FbthriftSearchByNameFact_key,
+                                     fbthriftSearchByNameFact_key_name,
+                                     fbthriftSearchByNameFact_key_entity),
+        ErlangSearchByName_key(ErlangSearchByName_key,
+                               erlangSearchByName_key_name, erlangSearchByName_key_entity),
+        ErlangSearchByLowerCaseName_key(ErlangSearchByLowerCaseName_key,
+                                        erlangSearchByLowerCaseName_key_name,
+                                        erlangSearchByLowerCaseName_key_entity),
+        CxxSearchByScopeAndKind_key(CxxSearchByScopeAndKind_key,
+                                    cxxSearchByScopeAndKind_key_name,
+                                    cxxSearchByScopeAndKind_key_scope,
+                                    cxxSearchByScopeAndKind_key_kinds,
+                                    cxxSearchByScopeAndKind_key_entity),
+        CxxSearchByNameKindAndScopeFact_key(CxxSearchByNameKindAndScopeFact_key,
+                                            cxxSearchByNameKindAndScopeFact_key_name,
+                                            cxxSearchByNameKindAndScopeFact_key_scope,
+                                            cxxSearchByNameKindAndScopeFact_key_kinds,
+                                            cxxSearchByNameKindAndScopeFact_key_entity),
+        CxxSearchByLowerCaseScopeAndKind_key(CxxSearchByLowerCaseScopeAndKind_key,
+                                             cxxSearchByLowerCaseScopeAndKind_key_name,
+                                             cxxSearchByLowerCaseScopeAndKind_key_scope,
+                                             cxxSearchByLowerCaseScopeAndKind_key_kinds,
+                                             cxxSearchByLowerCaseScopeAndKind_key_entity),
+        CxxSearchByLowerCaseNameKindAndScopeFact_key(CxxSearchByLowerCaseNameKindAndScopeFact_key,
+                                                     cxxSearchByLowerCaseNameKindAndScopeFact_key_name,
+                                                     cxxSearchByLowerCaseNameKindAndScopeFact_key_scope,
+                                                     cxxSearchByLowerCaseNameKindAndScopeFact_key_kinds,
+                                                     cxxSearchByLowerCaseNameKindAndScopeFact_key_entity),
+        CxxPreferDefinitions_key(CxxPreferDefinitions_key,
+                                 cxxPreferDefinitions_key_from, cxxPreferDefinitions_key_to),
+        CxxNameLowerCase_key(CxxNameLowerCase_key,
+                             cxxNameLowerCase_key_nameLowercase, cxxNameLowerCase_key_kinds,
+                             cxxNameLowerCase_key_name),
+        CSharpSearchByName_key(CSharpSearchByName_key,
+                               cSharpSearchByName_key_name, cSharpSearchByName_key_entity),
+        CSharpSearchByLowerCaseName_key(CSharpSearchByLowerCaseName_key,
+                                        cSharpSearchByLowerCaseName_key_name,
+                                        cSharpSearchByLowerCaseName_key_entity),
+        BuckSearchByName_key(BuckSearchByName_key,
+                             buckSearchByName_key_name, buckSearchByName_key_entity),
+        BuckSearchByLowerCaseName_key(BuckSearchByLowerCaseName_key,
+                                      buckSearchByLowerCaseName_key_name,
+                                      buckSearchByLowerCaseName_key_entity),
+        BuckSearchByLocalNameFact_key(BuckSearchByLocalNameFact_key,
+                                      buckSearchByLocalNameFact_key_name,
+                                      buckSearchByLocalNameFact_key_entity),
+        AngleSearchByName_key(AngleSearchByName_key,
+                              angleSearchByName_key_name, angleSearchByName_key_entity),
+        AngleSearchByLowerCaseName_key(AngleSearchByLowerCaseName_key,
+                                       angleSearchByLowerCaseName_key_name,
+                                       angleSearchByLowerCaseName_key_entity))
+       where
+import qualified Control.DeepSeq as DeepSeq
+import qualified Control.Monad as Monad
+import qualified Control.Monad.ST.Trans as ST
+import qualified Control.Monad.Trans.Class as Trans
+import qualified Data.Aeson as Aeson
+import qualified Data.Aeson.Types as Aeson
+import qualified Data.Default as Default
+import qualified Data.HashMap.Strict as HashMap
+import qualified Data.Hashable as Hashable
+import qualified Data.Int as Int
+import qualified Data.List as List
+import qualified Data.Map.Strict as Map
+import qualified Data.Ord as Ord
+import qualified Data.Text as Text
+import qualified Data.Text.Encoding as Text
+import qualified Facebook.Thrift.Annotation.Thrift.Thrift.Types
+       as Facebook.Thrift.Annotation.Thrift.Thrift
+import qualified Glean.Schema.Buck.Types as Glean.Schema.Buck
+import qualified Glean.Schema.Builtin.Types as Glean.Schema.Builtin
+import qualified Glean.Schema.Code.Types as Glean.Schema.Code
+import qualified Glean.Schema.CodeCxx.Types as Glean.Schema.CodeCxx
+import qualified Glean.Schema.CodemarkupTypes.Types
+       as Glean.Schema.CodemarkupTypes
+import qualified Glean.Schema.Cxx1.Types as Glean.Schema.Cxx1
+import qualified Glean.Schema.Fbthrift.Types
+       as Glean.Schema.Fbthrift
+import qualified Glean.Schema.Flow.Types as Glean.Schema.Flow
+import qualified Glean.Schema.Hack.Types as Glean.Schema.Hack
+import qualified Glean.Schema.JavakotlinAlpha.Types
+       as Glean.Schema.JavakotlinAlpha
+import qualified Glean.Schema.Python.Types as Glean.Schema.Python
+import qualified Glean.Types as Glean
+import qualified Prelude as Prelude
+import qualified Rust.Types as Rust
+import qualified Thrift.Binary.Parser as Parser
+import qualified Thrift.CodegenTypesOnly as Thrift
+import Control.Applicative ((<|>), (*>), (<*))
+import Data.Aeson ((.:), (.:?), (.=), (.!=))
+import Data.Monoid ((<>))
+import Prelude ((.), (<$>), (<*>), (>>=), (==), (/=), (<), (++))
+{-# LINE 5 "glean/schema/thrift/search_code_include.hs" #-}
+import qualified Data.ByteString
+{-# LINE 6 "glean/schema/thrift/search_code_include.hs" #-}
+import qualified Data.Default
+{-# LINE 7 "glean/schema/thrift/search_code_include.hs" #-}
+import qualified Data.Text
+{-# LINE 9 "glean/schema/thrift/search_code_include.hs" #-}
+import qualified Glean.Types as Glean
+{-# LINE 10 "glean/schema/thrift/search_code_include.hs" #-}
+import qualified Glean.Typed as Glean
+{-# LINE 11 "glean/schema/thrift/search_code_include.hs" #-}
+import qualified Glean.Query.Angle as Angle
+{-# LINE 12 "glean/schema/thrift/search_code_include.hs" #-}
+import qualified Glean.Angle.Types as Angle
+{-# LINE 14 "glean/schema/thrift/search_code_include.hs" #-}
+import qualified Glean.Schema.Buck.Types
+{-# LINE 15 "glean/schema/thrift/search_code_include.hs" #-}
+import qualified Glean.Schema.Builtin.Types
+{-# LINE 16 "glean/schema/thrift/search_code_include.hs" #-}
+import qualified Glean.Schema.Code.Types
+{-# LINE 17 "glean/schema/thrift/search_code_include.hs" #-}
+import qualified Glean.Schema.CodeCxx.Types
+{-# LINE 18 "glean/schema/thrift/search_code_include.hs" #-}
+import qualified Glean.Schema.CodemarkupTypes.Types
+{-# LINE 19 "glean/schema/thrift/search_code_include.hs" #-}
+import qualified Glean.Schema.Cxx1.Types
+{-# LINE 20 "glean/schema/thrift/search_code_include.hs" #-}
+import qualified Glean.Schema.Fbthrift.Types
+{-# LINE 21 "glean/schema/thrift/search_code_include.hs" #-}
+import qualified Glean.Schema.Flow.Types
+{-# LINE 22 "glean/schema/thrift/search_code_include.hs" #-}
+import qualified Glean.Schema.Hack.Types
+{-# LINE 23 "glean/schema/thrift/search_code_include.hs" #-}
+import qualified Glean.Schema.JavakotlinAlpha.Types
+{-# LINE 24 "glean/schema/thrift/search_code_include.hs" #-}
+import qualified Glean.Schema.Python.Types
+{-# LINE 586 ".build/def/codegen/thrift-schema-hs/glean/schema/thrift/gen-hs2/Glean/Schema/SearchCode/Types.hs" #-}
+
+pREDICATE_VERSIONS :: Map.Map Text.Text Int.Int64
+pREDICATE_VERSIONS
+  = Map.fromList
+      [("BuckSearchByName", 16), ("BuckSearchByLowerCaseName", 16),
+       ("HackSearchByNameKindWithNamespace", 16),
+       ("CxxNameLowerCase", 16), ("JavaSearchByScope", 16),
+       ("SwiftSearchByNameAndKind", 16),
+       ("KotlinSearchByNameWithFact", 16),
+       ("KotlinSearchByLowerCaseName", 16),
+       ("PythonSearchByLowerCaseScopeAndKind", 16),
+       ("SwiftSearchByLowerCaseNameAndKind", 16),
+       ("KotlinSearchByScopeWithName", 16),
+       ("BuckSearchByLocalNameFact", 16),
+       ("SearchByLowerCaseScopeAndKind", 16),
+       ("HackSearchByNameKindWithQName", 16),
+       ("FlowSearchByLowerCaseScopeAndKind", 16),
+       ("PythonSearchByScopeAndKind", 16),
+       ("HsSearchByLowerCaseName", 16), ("CxxPreferDefinitions", 16),
+       ("KotlinSearchByScope", 16), ("AngleSearchByName", 16),
+       ("SearchByScope", 16), ("CxxSearchByScopeAndKind", 16),
+       ("CSharpSearchByLowerCaseName", 16), ("LsifSearchByName", 16),
+       ("HackNameLowerCase", 16),
+       ("RustSearchByLowerCaseNameAndKind", 16),
+       ("FlowSearchByScopeAndKind", 16), ("CSharpSearchByName", 16),
+       ("ThriftSearchByName", 16), ("JavaSearchByScopeWithName", 16),
+       ("CxxSearchByLowerCaseNameKindAndScopeFact", 16),
+       ("HackSearchByNameAndKind", 16), ("FbthriftSearchByNameFact", 16),
+       ("ErlangSearchByName", 16), ("SearchByNameKindAndLanguage", 16),
+       ("HackSearchByScopeAndKind", 16),
+       ("CxxSearchByLowerCaseScopeAndKind", 16),
+       ("PpSearchByLowerCaseNameKind", 16),
+       ("SearchByLowerCaseNameAndLanguage", 16),
+       ("KotlinSearchByName", 16), ("AngleSearchByLowerCaseName", 16),
+       ("KotlinSearchByLowerCaseScope", 16),
+       ("JavaSearchByLowerCaseName", 16),
+       ("LsifSearchByLowerCaseName", 16), ("SearchByScopeAndKind", 16),
+       ("SearchByLowerCaseNameKindAndLanguage", 16),
+       ("FlowNameLowerCase", 16), ("HackSearchByScopeWithNameKinds", 16),
+       ("HsSearchByName", 16), ("HackSearchByLowerCaseScopeAndKind", 16),
+       ("SearchByNameAndLanguage", 16),
+       ("FlowSearchByNameKindAndScopeFact", 16),
+       ("PythonSearchByLowerCaseNameKindAndScopeFact", 16),
+       ("CxxSearchByNameKindAndScopeFact", 16),
+       ("FlowSearchByLowerCaseNameKindAndScopeFact", 16),
+       ("RustSearchByNameAndKind", 16), ("PythonNameLowerCase", 16),
+       ("JavaSearchByNameWithFact", 16),
+       ("JavaSearchByLowerCaseScope", 16), ("SearchByLowerCaseScope", 16),
+       ("HackSearchByLowerCaseNameAndKind", 16),
+       ("PpSearchByNameKind", 16), ("JavaSearchByName", 16),
+       ("ThriftSearchByLowerCaseName", 16),
+       ("GraphQLSearchByLowerCaseName", 16),
+       ("ErlangSearchByLowerCaseName", 16),
+       ("PythonSearchByNameKindAndScopeFact", 16),
+       ("GraphQLSearchByName", 16)]
+
+type ThriftSearchByName_id = Glean.Id
+
+data ThriftSearchByName = ThriftSearchByName{thriftSearchByName_id
+                                             :: {-# UNPACK #-} !ThriftSearchByName_id,
+                                             thriftSearchByName_key ::
+                                             Prelude.Maybe ThriftSearchByName_key}
+                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ThriftSearchByName where
+  toJSON (ThriftSearchByName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct ThriftSearchByName where
+  buildStruct _proxy (ThriftSearchByName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (ThriftSearchByName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ThriftSearchByName where
+  rnf (ThriftSearchByName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default ThriftSearchByName where
+  def = ThriftSearchByName Default.def Prelude.Nothing
+
+instance Hashable.Hashable ThriftSearchByName where
+  hashWithSalt __salt (ThriftSearchByName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type ThriftSearchByLowerCaseName_id = Glean.Id
+
+data ThriftSearchByLowerCaseName = ThriftSearchByLowerCaseName{thriftSearchByLowerCaseName_id
+                                                               ::
+                                                               {-# UNPACK #-} !ThriftSearchByLowerCaseName_id,
+                                                               thriftSearchByLowerCaseName_key ::
+                                                               Prelude.Maybe
+                                                                 ThriftSearchByLowerCaseName_key}
+                                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ThriftSearchByLowerCaseName where
+  toJSON (ThriftSearchByLowerCaseName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct ThriftSearchByLowerCaseName where
+  buildStruct _proxy
+    (ThriftSearchByLowerCaseName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (ThriftSearchByLowerCaseName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ThriftSearchByLowerCaseName where
+  rnf (ThriftSearchByLowerCaseName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default ThriftSearchByLowerCaseName where
+  def = ThriftSearchByLowerCaseName Default.def Prelude.Nothing
+
+instance Hashable.Hashable ThriftSearchByLowerCaseName where
+  hashWithSalt __salt (ThriftSearchByLowerCaseName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SwiftSearchByNameAndKind_id = Glean.Id
+
+data SwiftSearchByNameAndKind = SwiftSearchByNameAndKind{swiftSearchByNameAndKind_id
+                                                         ::
+                                                         {-# UNPACK #-} !SwiftSearchByNameAndKind_id,
+                                                         swiftSearchByNameAndKind_key ::
+                                                         Prelude.Maybe SwiftSearchByNameAndKind_key}
+                                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SwiftSearchByNameAndKind where
+  toJSON (SwiftSearchByNameAndKind __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SwiftSearchByNameAndKind where
+  buildStruct _proxy
+    (SwiftSearchByNameAndKind __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (SwiftSearchByNameAndKind __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SwiftSearchByNameAndKind where
+  rnf (SwiftSearchByNameAndKind __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SwiftSearchByNameAndKind where
+  def = SwiftSearchByNameAndKind Default.def Prelude.Nothing
+
+instance Hashable.Hashable SwiftSearchByNameAndKind where
+  hashWithSalt __salt (SwiftSearchByNameAndKind _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SwiftSearchByLowerCaseNameAndKind_id = Glean.Id
+
+data SwiftSearchByLowerCaseNameAndKind = SwiftSearchByLowerCaseNameAndKind{swiftSearchByLowerCaseNameAndKind_id
+                                                                           ::
+                                                                           {-# UNPACK #-} !SwiftSearchByLowerCaseNameAndKind_id,
+                                                                           swiftSearchByLowerCaseNameAndKind_key
+                                                                           ::
+                                                                           Prelude.Maybe
+                                                                             SwiftSearchByLowerCaseNameAndKind_key}
+                                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SwiftSearchByLowerCaseNameAndKind where
+  toJSON (SwiftSearchByLowerCaseNameAndKind __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SwiftSearchByLowerCaseNameAndKind
+         where
+  buildStruct _proxy
+    (SwiftSearchByLowerCaseNameAndKind __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (SwiftSearchByLowerCaseNameAndKind __val__id
+                                                  __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SwiftSearchByLowerCaseNameAndKind where
+  rnf (SwiftSearchByLowerCaseNameAndKind __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SwiftSearchByLowerCaseNameAndKind where
+  def = SwiftSearchByLowerCaseNameAndKind Default.def Prelude.Nothing
+
+instance Hashable.Hashable SwiftSearchByLowerCaseNameAndKind where
+  hashWithSalt __salt (SwiftSearchByLowerCaseNameAndKind _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SearchByScopeAndKind_id = Glean.Id
+
+data SearchByScopeAndKind = SearchByScopeAndKind{searchByScopeAndKind_id
+                                                 :: {-# UNPACK #-} !SearchByScopeAndKind_id,
+                                                 searchByScopeAndKind_key ::
+                                                 Prelude.Maybe SearchByScopeAndKind_key}
+                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchByScopeAndKind where
+  toJSON (SearchByScopeAndKind __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchByScopeAndKind where
+  buildStruct _proxy (SearchByScopeAndKind __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (SearchByScopeAndKind __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchByScopeAndKind where
+  rnf (SearchByScopeAndKind __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SearchByScopeAndKind where
+  def = SearchByScopeAndKind Default.def Prelude.Nothing
+
+instance Hashable.Hashable SearchByScopeAndKind where
+  hashWithSalt __salt (SearchByScopeAndKind _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SearchByScope_id = Glean.Id
+
+data SearchByScope = SearchByScope{searchByScope_id ::
+                                   {-# UNPACK #-} !SearchByScope_id,
+                                   searchByScope_key :: Prelude.Maybe SearchByScope_key}
+                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchByScope where
+  toJSON (SearchByScope __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchByScope where
+  buildStruct _proxy (SearchByScope __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (SearchByScope __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchByScope where
+  rnf (SearchByScope __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SearchByScope where
+  def = SearchByScope Default.def Prelude.Nothing
+
+instance Hashable.Hashable SearchByScope where
+  hashWithSalt __salt (SearchByScope _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SearchByNameKindAndLanguage_id = Glean.Id
+
+data SearchByNameKindAndLanguage = SearchByNameKindAndLanguage{searchByNameKindAndLanguage_id
+                                                               ::
+                                                               {-# UNPACK #-} !SearchByNameKindAndLanguage_id,
+                                                               searchByNameKindAndLanguage_key ::
+                                                               Prelude.Maybe
+                                                                 SearchByNameKindAndLanguage_key}
+                                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchByNameKindAndLanguage where
+  toJSON (SearchByNameKindAndLanguage __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchByNameKindAndLanguage where
+  buildStruct _proxy
+    (SearchByNameKindAndLanguage __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (SearchByNameKindAndLanguage __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchByNameKindAndLanguage where
+  rnf (SearchByNameKindAndLanguage __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SearchByNameKindAndLanguage where
+  def = SearchByNameKindAndLanguage Default.def Prelude.Nothing
+
+instance Hashable.Hashable SearchByNameKindAndLanguage where
+  hashWithSalt __salt (SearchByNameKindAndLanguage _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SearchByNameAndLanguage_id = Glean.Id
+
+data SearchByNameAndLanguage = SearchByNameAndLanguage{searchByNameAndLanguage_id
+                                                       ::
+                                                       {-# UNPACK #-} !SearchByNameAndLanguage_id,
+                                                       searchByNameAndLanguage_key ::
+                                                       Prelude.Maybe SearchByNameAndLanguage_key}
+                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchByNameAndLanguage where
+  toJSON (SearchByNameAndLanguage __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchByNameAndLanguage where
+  buildStruct _proxy
+    (SearchByNameAndLanguage __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (SearchByNameAndLanguage __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchByNameAndLanguage where
+  rnf (SearchByNameAndLanguage __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SearchByNameAndLanguage where
+  def = SearchByNameAndLanguage Default.def Prelude.Nothing
+
+instance Hashable.Hashable SearchByNameAndLanguage where
+  hashWithSalt __salt (SearchByNameAndLanguage _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SearchByLowerCaseScopeAndKind_id = Glean.Id
+
+data SearchByLowerCaseScopeAndKind = SearchByLowerCaseScopeAndKind{searchByLowerCaseScopeAndKind_id
+                                                                   ::
+                                                                   {-# UNPACK #-} !SearchByLowerCaseScopeAndKind_id,
+                                                                   searchByLowerCaseScopeAndKind_key
+                                                                   ::
+                                                                   Prelude.Maybe
+                                                                     SearchByLowerCaseScopeAndKind_key}
+                                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchByLowerCaseScopeAndKind where
+  toJSON (SearchByLowerCaseScopeAndKind __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchByLowerCaseScopeAndKind where
+  buildStruct _proxy
+    (SearchByLowerCaseScopeAndKind __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (SearchByLowerCaseScopeAndKind __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchByLowerCaseScopeAndKind where
+  rnf (SearchByLowerCaseScopeAndKind __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SearchByLowerCaseScopeAndKind where
+  def = SearchByLowerCaseScopeAndKind Default.def Prelude.Nothing
+
+instance Hashable.Hashable SearchByLowerCaseScopeAndKind where
+  hashWithSalt __salt (SearchByLowerCaseScopeAndKind _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SearchByLowerCaseScope_id = Glean.Id
+
+data SearchByLowerCaseScope = SearchByLowerCaseScope{searchByLowerCaseScope_id
+                                                     :: {-# UNPACK #-} !SearchByLowerCaseScope_id,
+                                                     searchByLowerCaseScope_key ::
+                                                     Prelude.Maybe SearchByLowerCaseScope_key}
+                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchByLowerCaseScope where
+  toJSON (SearchByLowerCaseScope __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchByLowerCaseScope where
+  buildStruct _proxy
+    (SearchByLowerCaseScope __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (SearchByLowerCaseScope __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchByLowerCaseScope where
+  rnf (SearchByLowerCaseScope __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SearchByLowerCaseScope where
+  def = SearchByLowerCaseScope Default.def Prelude.Nothing
+
+instance Hashable.Hashable SearchByLowerCaseScope where
+  hashWithSalt __salt (SearchByLowerCaseScope _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SearchByLowerCaseNameKindAndLanguage_id = Glean.Id
+
+data SearchByLowerCaseNameKindAndLanguage = SearchByLowerCaseNameKindAndLanguage{searchByLowerCaseNameKindAndLanguage_id
+                                                                                 ::
+                                                                                 {-# UNPACK #-} !SearchByLowerCaseNameKindAndLanguage_id,
+                                                                                 searchByLowerCaseNameKindAndLanguage_key
+                                                                                 ::
+                                                                                 Prelude.Maybe
+                                                                                   SearchByLowerCaseNameKindAndLanguage_key}
+                                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchByLowerCaseNameKindAndLanguage where
+  toJSON
+    (SearchByLowerCaseNameKindAndLanguage __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchByLowerCaseNameKindAndLanguage
+         where
+  buildStruct _proxy
+    (SearchByLowerCaseNameKindAndLanguage __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (SearchByLowerCaseNameKindAndLanguage __val__id
+                                                  __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchByLowerCaseNameKindAndLanguage where
+  rnf (SearchByLowerCaseNameKindAndLanguage __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SearchByLowerCaseNameKindAndLanguage where
+  def
+    = SearchByLowerCaseNameKindAndLanguage Default.def Prelude.Nothing
+
+instance Hashable.Hashable SearchByLowerCaseNameKindAndLanguage
+         where
+  hashWithSalt __salt (SearchByLowerCaseNameKindAndLanguage _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type SearchByLowerCaseNameAndLanguage_id = Glean.Id
+
+data SearchByLowerCaseNameAndLanguage = SearchByLowerCaseNameAndLanguage{searchByLowerCaseNameAndLanguage_id
+                                                                         ::
+                                                                         {-# UNPACK #-} !SearchByLowerCaseNameAndLanguage_id,
+                                                                         searchByLowerCaseNameAndLanguage_key
+                                                                         ::
+                                                                         Prelude.Maybe
+                                                                           SearchByLowerCaseNameAndLanguage_key}
+                                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchByLowerCaseNameAndLanguage where
+  toJSON (SearchByLowerCaseNameAndLanguage __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchByLowerCaseNameAndLanguage where
+  buildStruct _proxy
+    (SearchByLowerCaseNameAndLanguage __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (SearchByLowerCaseNameAndLanguage __val__id
+                                                  __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchByLowerCaseNameAndLanguage where
+  rnf (SearchByLowerCaseNameAndLanguage __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default SearchByLowerCaseNameAndLanguage where
+  def = SearchByLowerCaseNameAndLanguage Default.def Prelude.Nothing
+
+instance Hashable.Hashable SearchByLowerCaseNameAndLanguage where
+  hashWithSalt __salt (SearchByLowerCaseNameAndLanguage _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type RustSearchByNameAndKind_id = Glean.Id
+
+data RustSearchByNameAndKind = RustSearchByNameAndKind{rustSearchByNameAndKind_id
+                                                       ::
+                                                       {-# UNPACK #-} !RustSearchByNameAndKind_id,
+                                                       rustSearchByNameAndKind_key ::
+                                                       Prelude.Maybe RustSearchByNameAndKind_key}
+                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON RustSearchByNameAndKind where
+  toJSON (RustSearchByNameAndKind __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct RustSearchByNameAndKind where
+  buildStruct _proxy
+    (RustSearchByNameAndKind __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (RustSearchByNameAndKind __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData RustSearchByNameAndKind where
+  rnf (RustSearchByNameAndKind __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default RustSearchByNameAndKind where
+  def = RustSearchByNameAndKind Default.def Prelude.Nothing
+
+instance Hashable.Hashable RustSearchByNameAndKind where
+  hashWithSalt __salt (RustSearchByNameAndKind _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type RustSearchByLowerCaseNameAndKind_id = Glean.Id
+
+data RustSearchByLowerCaseNameAndKind = RustSearchByLowerCaseNameAndKind{rustSearchByLowerCaseNameAndKind_id
+                                                                         ::
+                                                                         {-# UNPACK #-} !RustSearchByLowerCaseNameAndKind_id,
+                                                                         rustSearchByLowerCaseNameAndKind_key
+                                                                         ::
+                                                                         Prelude.Maybe
+                                                                           RustSearchByLowerCaseNameAndKind_key}
+                                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON RustSearchByLowerCaseNameAndKind where
+  toJSON (RustSearchByLowerCaseNameAndKind __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct RustSearchByLowerCaseNameAndKind where
+  buildStruct _proxy
+    (RustSearchByLowerCaseNameAndKind __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (RustSearchByLowerCaseNameAndKind __val__id
+                                                  __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData RustSearchByLowerCaseNameAndKind where
+  rnf (RustSearchByLowerCaseNameAndKind __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default RustSearchByLowerCaseNameAndKind where
+  def = RustSearchByLowerCaseNameAndKind Default.def Prelude.Nothing
+
+instance Hashable.Hashable RustSearchByLowerCaseNameAndKind where
+  hashWithSalt __salt (RustSearchByLowerCaseNameAndKind _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type PythonSearchByScopeAndKind_id = Glean.Id
+
+data PythonSearchByScopeAndKind = PythonSearchByScopeAndKind{pythonSearchByScopeAndKind_id
+                                                             ::
+                                                             {-# UNPACK #-} !PythonSearchByScopeAndKind_id,
+                                                             pythonSearchByScopeAndKind_key ::
+                                                             Prelude.Maybe
+                                                               PythonSearchByScopeAndKind_key}
+                                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON PythonSearchByScopeAndKind where
+  toJSON (PythonSearchByScopeAndKind __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct PythonSearchByScopeAndKind where
+  buildStruct _proxy
+    (PythonSearchByScopeAndKind __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (PythonSearchByScopeAndKind __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData PythonSearchByScopeAndKind where
+  rnf (PythonSearchByScopeAndKind __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default PythonSearchByScopeAndKind where
+  def = PythonSearchByScopeAndKind Default.def Prelude.Nothing
+
+instance Hashable.Hashable PythonSearchByScopeAndKind where
+  hashWithSalt __salt (PythonSearchByScopeAndKind _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type PythonSearchByNameKindAndScopeFact_id = Glean.Id
+
+data PythonSearchByNameKindAndScopeFact = PythonSearchByNameKindAndScopeFact{pythonSearchByNameKindAndScopeFact_id
+                                                                             ::
+                                                                             {-# UNPACK #-} !PythonSearchByNameKindAndScopeFact_id,
+                                                                             pythonSearchByNameKindAndScopeFact_key
+                                                                             ::
+                                                                             Prelude.Maybe
+                                                                               PythonSearchByNameKindAndScopeFact_key}
+                                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON PythonSearchByNameKindAndScopeFact where
+  toJSON
+    (PythonSearchByNameKindAndScopeFact __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct PythonSearchByNameKindAndScopeFact
+         where
+  buildStruct _proxy
+    (PythonSearchByNameKindAndScopeFact __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (PythonSearchByNameKindAndScopeFact __val__id
+                                                  __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData PythonSearchByNameKindAndScopeFact where
+  rnf (PythonSearchByNameKindAndScopeFact __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default PythonSearchByNameKindAndScopeFact where
+  def
+    = PythonSearchByNameKindAndScopeFact Default.def Prelude.Nothing
+
+instance Hashable.Hashable PythonSearchByNameKindAndScopeFact where
+  hashWithSalt __salt (PythonSearchByNameKindAndScopeFact _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type PythonSearchByLowerCaseScopeAndKind_id = Glean.Id
+
+data PythonSearchByLowerCaseScopeAndKind = PythonSearchByLowerCaseScopeAndKind{pythonSearchByLowerCaseScopeAndKind_id
+                                                                               ::
+                                                                               {-# UNPACK #-} !PythonSearchByLowerCaseScopeAndKind_id,
+                                                                               pythonSearchByLowerCaseScopeAndKind_key
+                                                                               ::
+                                                                               Prelude.Maybe
+                                                                                 PythonSearchByLowerCaseScopeAndKind_key}
+                                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON PythonSearchByLowerCaseScopeAndKind where
+  toJSON
+    (PythonSearchByLowerCaseScopeAndKind __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct PythonSearchByLowerCaseScopeAndKind
+         where
+  buildStruct _proxy
+    (PythonSearchByLowerCaseScopeAndKind __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (PythonSearchByLowerCaseScopeAndKind __val__id
+                                                  __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData PythonSearchByLowerCaseScopeAndKind where
+  rnf (PythonSearchByLowerCaseScopeAndKind __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default PythonSearchByLowerCaseScopeAndKind where
+  def
+    = PythonSearchByLowerCaseScopeAndKind Default.def Prelude.Nothing
+
+instance Hashable.Hashable PythonSearchByLowerCaseScopeAndKind
+         where
+  hashWithSalt __salt (PythonSearchByLowerCaseScopeAndKind _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type PythonSearchByLowerCaseNameKindAndScopeFact_id = Glean.Id
+
+data PythonSearchByLowerCaseNameKindAndScopeFact = PythonSearchByLowerCaseNameKindAndScopeFact{pythonSearchByLowerCaseNameKindAndScopeFact_id
+                                                                                               ::
+                                                                                               {-# UNPACK #-} !PythonSearchByLowerCaseNameKindAndScopeFact_id,
+                                                                                               pythonSearchByLowerCaseNameKindAndScopeFact_key
+                                                                                               ::
+                                                                                               Prelude.Maybe
+                                                                                                 PythonSearchByLowerCaseNameKindAndScopeFact_key}
+                                                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON PythonSearchByLowerCaseNameKindAndScopeFact
+         where
+  toJSON
+    (PythonSearchByLowerCaseNameKindAndScopeFact __field__id
+       __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct
+           PythonSearchByLowerCaseNameKindAndScopeFact
+         where
+  buildStruct _proxy
+    (PythonSearchByLowerCaseNameKindAndScopeFact __field__id
+       __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (PythonSearchByLowerCaseNameKindAndScopeFact
+                                                  __val__id
+                                                  __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData PythonSearchByLowerCaseNameKindAndScopeFact
+         where
+  rnf
+    (PythonSearchByLowerCaseNameKindAndScopeFact __field__id
+       __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default
+           PythonSearchByLowerCaseNameKindAndScopeFact
+         where
+  def
+    = PythonSearchByLowerCaseNameKindAndScopeFact Default.def
+        Prelude.Nothing
+
+instance Hashable.Hashable
+           PythonSearchByLowerCaseNameKindAndScopeFact
+         where
+  hashWithSalt __salt
+    (PythonSearchByLowerCaseNameKindAndScopeFact _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type PythonNameLowerCase_id = Glean.Id
+
+data PythonNameLowerCase = PythonNameLowerCase{pythonNameLowerCase_id
+                                               :: {-# UNPACK #-} !PythonNameLowerCase_id,
+                                               pythonNameLowerCase_key ::
+                                               Prelude.Maybe PythonNameLowerCase_key}
+                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON PythonNameLowerCase where
+  toJSON (PythonNameLowerCase __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct PythonNameLowerCase where
+  buildStruct _proxy (PythonNameLowerCase __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (PythonNameLowerCase __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData PythonNameLowerCase where
+  rnf (PythonNameLowerCase __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default PythonNameLowerCase where
+  def = PythonNameLowerCase Default.def Prelude.Nothing
+
+instance Hashable.Hashable PythonNameLowerCase where
+  hashWithSalt __salt (PythonNameLowerCase _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type PpSearchByNameKind_id = Glean.Id
+
+data PpSearchByNameKind = PpSearchByNameKind{ppSearchByNameKind_id
+                                             :: {-# UNPACK #-} !PpSearchByNameKind_id,
+                                             ppSearchByNameKind_key ::
+                                             Prelude.Maybe PpSearchByNameKind_key}
+                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON PpSearchByNameKind where
+  toJSON (PpSearchByNameKind __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct PpSearchByNameKind where
+  buildStruct _proxy (PpSearchByNameKind __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (PpSearchByNameKind __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData PpSearchByNameKind where
+  rnf (PpSearchByNameKind __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default PpSearchByNameKind where
+  def = PpSearchByNameKind Default.def Prelude.Nothing
+
+instance Hashable.Hashable PpSearchByNameKind where
+  hashWithSalt __salt (PpSearchByNameKind _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type PpSearchByLowerCaseNameKind_id = Glean.Id
+
+data PpSearchByLowerCaseNameKind = PpSearchByLowerCaseNameKind{ppSearchByLowerCaseNameKind_id
+                                                               ::
+                                                               {-# UNPACK #-} !PpSearchByLowerCaseNameKind_id,
+                                                               ppSearchByLowerCaseNameKind_key ::
+                                                               Prelude.Maybe
+                                                                 PpSearchByLowerCaseNameKind_key}
+                                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON PpSearchByLowerCaseNameKind where
+  toJSON (PpSearchByLowerCaseNameKind __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct PpSearchByLowerCaseNameKind where
+  buildStruct _proxy
+    (PpSearchByLowerCaseNameKind __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (PpSearchByLowerCaseNameKind __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData PpSearchByLowerCaseNameKind where
+  rnf (PpSearchByLowerCaseNameKind __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default PpSearchByLowerCaseNameKind where
+  def = PpSearchByLowerCaseNameKind Default.def Prelude.Nothing
+
+instance Hashable.Hashable PpSearchByLowerCaseNameKind where
+  hashWithSalt __salt (PpSearchByLowerCaseNameKind _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type LsifSearchByName_id = Glean.Id
+
+data LsifSearchByName = LsifSearchByName{lsifSearchByName_id ::
+                                         {-# UNPACK #-} !LsifSearchByName_id,
+                                         lsifSearchByName_key :: Prelude.Maybe LsifSearchByName_key}
+                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON LsifSearchByName where
+  toJSON (LsifSearchByName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct LsifSearchByName where
+  buildStruct _proxy (LsifSearchByName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (LsifSearchByName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData LsifSearchByName where
+  rnf (LsifSearchByName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default LsifSearchByName where
+  def = LsifSearchByName Default.def Prelude.Nothing
+
+instance Hashable.Hashable LsifSearchByName where
+  hashWithSalt __salt (LsifSearchByName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type LsifSearchByLowerCaseName_id = Glean.Id
+
+data LsifSearchByLowerCaseName = LsifSearchByLowerCaseName{lsifSearchByLowerCaseName_id
+                                                           ::
+                                                           {-# UNPACK #-} !LsifSearchByLowerCaseName_id,
+                                                           lsifSearchByLowerCaseName_key ::
+                                                           Prelude.Maybe
+                                                             LsifSearchByLowerCaseName_key}
+                                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON LsifSearchByLowerCaseName where
+  toJSON (LsifSearchByLowerCaseName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct LsifSearchByLowerCaseName where
+  buildStruct _proxy
+    (LsifSearchByLowerCaseName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (LsifSearchByLowerCaseName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData LsifSearchByLowerCaseName where
+  rnf (LsifSearchByLowerCaseName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default LsifSearchByLowerCaseName where
+  def = LsifSearchByLowerCaseName Default.def Prelude.Nothing
+
+instance Hashable.Hashable LsifSearchByLowerCaseName where
+  hashWithSalt __salt (LsifSearchByLowerCaseName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type KotlinSearchByScopeWithName_id = Glean.Id
+
+data KotlinSearchByScopeWithName = KotlinSearchByScopeWithName{kotlinSearchByScopeWithName_id
+                                                               ::
+                                                               {-# UNPACK #-} !KotlinSearchByScopeWithName_id,
+                                                               kotlinSearchByScopeWithName_key ::
+                                                               Prelude.Maybe
+                                                                 KotlinSearchByScopeWithName_key}
+                                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON KotlinSearchByScopeWithName where
+  toJSON (KotlinSearchByScopeWithName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct KotlinSearchByScopeWithName where
+  buildStruct _proxy
+    (KotlinSearchByScopeWithName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (KotlinSearchByScopeWithName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData KotlinSearchByScopeWithName where
+  rnf (KotlinSearchByScopeWithName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default KotlinSearchByScopeWithName where
+  def = KotlinSearchByScopeWithName Default.def Prelude.Nothing
+
+instance Hashable.Hashable KotlinSearchByScopeWithName where
+  hashWithSalt __salt (KotlinSearchByScopeWithName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type KotlinSearchByScope_id = Glean.Id
+
+data KotlinSearchByScope = KotlinSearchByScope{kotlinSearchByScope_id
+                                               :: {-# UNPACK #-} !KotlinSearchByScope_id,
+                                               kotlinSearchByScope_key ::
+                                               Prelude.Maybe KotlinSearchByScope_key}
+                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON KotlinSearchByScope where
+  toJSON (KotlinSearchByScope __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct KotlinSearchByScope where
+  buildStruct _proxy (KotlinSearchByScope __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (KotlinSearchByScope __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData KotlinSearchByScope where
+  rnf (KotlinSearchByScope __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default KotlinSearchByScope where
+  def = KotlinSearchByScope Default.def Prelude.Nothing
+
+instance Hashable.Hashable KotlinSearchByScope where
+  hashWithSalt __salt (KotlinSearchByScope _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type KotlinSearchByNameWithFact_id = Glean.Id
+
+data KotlinSearchByNameWithFact = KotlinSearchByNameWithFact{kotlinSearchByNameWithFact_id
+                                                             ::
+                                                             {-# UNPACK #-} !KotlinSearchByNameWithFact_id,
+                                                             kotlinSearchByNameWithFact_key ::
+                                                             Prelude.Maybe
+                                                               KotlinSearchByNameWithFact_key}
+                                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON KotlinSearchByNameWithFact where
+  toJSON (KotlinSearchByNameWithFact __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct KotlinSearchByNameWithFact where
+  buildStruct _proxy
+    (KotlinSearchByNameWithFact __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (KotlinSearchByNameWithFact __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData KotlinSearchByNameWithFact where
+  rnf (KotlinSearchByNameWithFact __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default KotlinSearchByNameWithFact where
+  def = KotlinSearchByNameWithFact Default.def Prelude.Nothing
+
+instance Hashable.Hashable KotlinSearchByNameWithFact where
+  hashWithSalt __salt (KotlinSearchByNameWithFact _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type KotlinSearchByName_id = Glean.Id
+
+data KotlinSearchByName = KotlinSearchByName{kotlinSearchByName_id
+                                             :: {-# UNPACK #-} !KotlinSearchByName_id,
+                                             kotlinSearchByName_key ::
+                                             Prelude.Maybe KotlinSearchByName_key}
+                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON KotlinSearchByName where
+  toJSON (KotlinSearchByName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct KotlinSearchByName where
+  buildStruct _proxy (KotlinSearchByName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (KotlinSearchByName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData KotlinSearchByName where
+  rnf (KotlinSearchByName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default KotlinSearchByName where
+  def = KotlinSearchByName Default.def Prelude.Nothing
+
+instance Hashable.Hashable KotlinSearchByName where
+  hashWithSalt __salt (KotlinSearchByName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type KotlinSearchByLowerCaseScope_id = Glean.Id
+
+data KotlinSearchByLowerCaseScope = KotlinSearchByLowerCaseScope{kotlinSearchByLowerCaseScope_id
+                                                                 ::
+                                                                 {-# UNPACK #-} !KotlinSearchByLowerCaseScope_id,
+                                                                 kotlinSearchByLowerCaseScope_key ::
+                                                                 Prelude.Maybe
+                                                                   KotlinSearchByLowerCaseScope_key}
+                                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON KotlinSearchByLowerCaseScope where
+  toJSON (KotlinSearchByLowerCaseScope __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct KotlinSearchByLowerCaseScope where
+  buildStruct _proxy
+    (KotlinSearchByLowerCaseScope __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (KotlinSearchByLowerCaseScope __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData KotlinSearchByLowerCaseScope where
+  rnf (KotlinSearchByLowerCaseScope __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default KotlinSearchByLowerCaseScope where
+  def = KotlinSearchByLowerCaseScope Default.def Prelude.Nothing
+
+instance Hashable.Hashable KotlinSearchByLowerCaseScope where
+  hashWithSalt __salt (KotlinSearchByLowerCaseScope _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type KotlinSearchByLowerCaseName_id = Glean.Id
+
+data KotlinSearchByLowerCaseName = KotlinSearchByLowerCaseName{kotlinSearchByLowerCaseName_id
+                                                               ::
+                                                               {-# UNPACK #-} !KotlinSearchByLowerCaseName_id,
+                                                               kotlinSearchByLowerCaseName_key ::
+                                                               Prelude.Maybe
+                                                                 KotlinSearchByLowerCaseName_key}
+                                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON KotlinSearchByLowerCaseName where
+  toJSON (KotlinSearchByLowerCaseName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct KotlinSearchByLowerCaseName where
+  buildStruct _proxy
+    (KotlinSearchByLowerCaseName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (KotlinSearchByLowerCaseName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData KotlinSearchByLowerCaseName where
+  rnf (KotlinSearchByLowerCaseName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default KotlinSearchByLowerCaseName where
+  def = KotlinSearchByLowerCaseName Default.def Prelude.Nothing
+
+instance Hashable.Hashable KotlinSearchByLowerCaseName where
+  hashWithSalt __salt (KotlinSearchByLowerCaseName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type JavaSearchByScopeWithName_id = Glean.Id
+
+data JavaSearchByScopeWithName = JavaSearchByScopeWithName{javaSearchByScopeWithName_id
+                                                           ::
+                                                           {-# UNPACK #-} !JavaSearchByScopeWithName_id,
+                                                           javaSearchByScopeWithName_key ::
+                                                           Prelude.Maybe
+                                                             JavaSearchByScopeWithName_key}
+                                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON JavaSearchByScopeWithName where
+  toJSON (JavaSearchByScopeWithName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct JavaSearchByScopeWithName where
+  buildStruct _proxy
+    (JavaSearchByScopeWithName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (JavaSearchByScopeWithName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData JavaSearchByScopeWithName where
+  rnf (JavaSearchByScopeWithName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default JavaSearchByScopeWithName where
+  def = JavaSearchByScopeWithName Default.def Prelude.Nothing
+
+instance Hashable.Hashable JavaSearchByScopeWithName where
+  hashWithSalt __salt (JavaSearchByScopeWithName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type JavaSearchByScope_id = Glean.Id
+
+data JavaSearchByScope = JavaSearchByScope{javaSearchByScope_id ::
+                                           {-# UNPACK #-} !JavaSearchByScope_id,
+                                           javaSearchByScope_key ::
+                                           Prelude.Maybe JavaSearchByScope_key}
+                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON JavaSearchByScope where
+  toJSON (JavaSearchByScope __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct JavaSearchByScope where
+  buildStruct _proxy (JavaSearchByScope __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (JavaSearchByScope __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData JavaSearchByScope where
+  rnf (JavaSearchByScope __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default JavaSearchByScope where
+  def = JavaSearchByScope Default.def Prelude.Nothing
+
+instance Hashable.Hashable JavaSearchByScope where
+  hashWithSalt __salt (JavaSearchByScope _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type JavaSearchByNameWithFact_id = Glean.Id
+
+data JavaSearchByNameWithFact = JavaSearchByNameWithFact{javaSearchByNameWithFact_id
+                                                         ::
+                                                         {-# UNPACK #-} !JavaSearchByNameWithFact_id,
+                                                         javaSearchByNameWithFact_key ::
+                                                         Prelude.Maybe JavaSearchByNameWithFact_key}
+                                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON JavaSearchByNameWithFact where
+  toJSON (JavaSearchByNameWithFact __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct JavaSearchByNameWithFact where
+  buildStruct _proxy
+    (JavaSearchByNameWithFact __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (JavaSearchByNameWithFact __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData JavaSearchByNameWithFact where
+  rnf (JavaSearchByNameWithFact __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default JavaSearchByNameWithFact where
+  def = JavaSearchByNameWithFact Default.def Prelude.Nothing
+
+instance Hashable.Hashable JavaSearchByNameWithFact where
+  hashWithSalt __salt (JavaSearchByNameWithFact _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type JavaSearchByName_id = Glean.Id
+
+data JavaSearchByName = JavaSearchByName{javaSearchByName_id ::
+                                         {-# UNPACK #-} !JavaSearchByName_id,
+                                         javaSearchByName_key :: Prelude.Maybe JavaSearchByName_key}
+                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON JavaSearchByName where
+  toJSON (JavaSearchByName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct JavaSearchByName where
+  buildStruct _proxy (JavaSearchByName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (JavaSearchByName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData JavaSearchByName where
+  rnf (JavaSearchByName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default JavaSearchByName where
+  def = JavaSearchByName Default.def Prelude.Nothing
+
+instance Hashable.Hashable JavaSearchByName where
+  hashWithSalt __salt (JavaSearchByName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type JavaSearchByLowerCaseScope_id = Glean.Id
+
+data JavaSearchByLowerCaseScope = JavaSearchByLowerCaseScope{javaSearchByLowerCaseScope_id
+                                                             ::
+                                                             {-# UNPACK #-} !JavaSearchByLowerCaseScope_id,
+                                                             javaSearchByLowerCaseScope_key ::
+                                                             Prelude.Maybe
+                                                               JavaSearchByLowerCaseScope_key}
+                                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON JavaSearchByLowerCaseScope where
+  toJSON (JavaSearchByLowerCaseScope __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct JavaSearchByLowerCaseScope where
+  buildStruct _proxy
+    (JavaSearchByLowerCaseScope __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (JavaSearchByLowerCaseScope __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData JavaSearchByLowerCaseScope where
+  rnf (JavaSearchByLowerCaseScope __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default JavaSearchByLowerCaseScope where
+  def = JavaSearchByLowerCaseScope Default.def Prelude.Nothing
+
+instance Hashable.Hashable JavaSearchByLowerCaseScope where
+  hashWithSalt __salt (JavaSearchByLowerCaseScope _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type JavaSearchByLowerCaseName_id = Glean.Id
+
+data JavaSearchByLowerCaseName = JavaSearchByLowerCaseName{javaSearchByLowerCaseName_id
+                                                           ::
+                                                           {-# UNPACK #-} !JavaSearchByLowerCaseName_id,
+                                                           javaSearchByLowerCaseName_key ::
+                                                           Prelude.Maybe
+                                                             JavaSearchByLowerCaseName_key}
+                                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON JavaSearchByLowerCaseName where
+  toJSON (JavaSearchByLowerCaseName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct JavaSearchByLowerCaseName where
+  buildStruct _proxy
+    (JavaSearchByLowerCaseName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (JavaSearchByLowerCaseName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData JavaSearchByLowerCaseName where
+  rnf (JavaSearchByLowerCaseName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default JavaSearchByLowerCaseName where
+  def = JavaSearchByLowerCaseName Default.def Prelude.Nothing
+
+instance Hashable.Hashable JavaSearchByLowerCaseName where
+  hashWithSalt __salt (JavaSearchByLowerCaseName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type HsSearchByName_id = Glean.Id
+
+data HsSearchByName = HsSearchByName{hsSearchByName_id ::
+                                     {-# UNPACK #-} !HsSearchByName_id,
+                                     hsSearchByName_key :: Prelude.Maybe HsSearchByName_key}
+                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON HsSearchByName where
+  toJSON (HsSearchByName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct HsSearchByName where
+  buildStruct _proxy (HsSearchByName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (HsSearchByName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData HsSearchByName where
+  rnf (HsSearchByName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default HsSearchByName where
+  def = HsSearchByName Default.def Prelude.Nothing
+
+instance Hashable.Hashable HsSearchByName where
+  hashWithSalt __salt (HsSearchByName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type HsSearchByLowerCaseName_id = Glean.Id
+
+data HsSearchByLowerCaseName = HsSearchByLowerCaseName{hsSearchByLowerCaseName_id
+                                                       ::
+                                                       {-# UNPACK #-} !HsSearchByLowerCaseName_id,
+                                                       hsSearchByLowerCaseName_key ::
+                                                       Prelude.Maybe HsSearchByLowerCaseName_key}
+                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON HsSearchByLowerCaseName where
+  toJSON (HsSearchByLowerCaseName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct HsSearchByLowerCaseName where
+  buildStruct _proxy
+    (HsSearchByLowerCaseName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (HsSearchByLowerCaseName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData HsSearchByLowerCaseName where
+  rnf (HsSearchByLowerCaseName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default HsSearchByLowerCaseName where
+  def = HsSearchByLowerCaseName Default.def Prelude.Nothing
+
+instance Hashable.Hashable HsSearchByLowerCaseName where
+  hashWithSalt __salt (HsSearchByLowerCaseName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type HackSearchByScopeWithNameKinds_id = Glean.Id
+
+data HackSearchByScopeWithNameKinds = HackSearchByScopeWithNameKinds{hackSearchByScopeWithNameKinds_id
+                                                                     ::
+                                                                     {-# UNPACK #-} !HackSearchByScopeWithNameKinds_id,
+                                                                     hackSearchByScopeWithNameKinds_key
+                                                                     ::
+                                                                     Prelude.Maybe
+                                                                       HackSearchByScopeWithNameKinds_key}
+                                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON HackSearchByScopeWithNameKinds where
+  toJSON (HackSearchByScopeWithNameKinds __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct HackSearchByScopeWithNameKinds where
+  buildStruct _proxy
+    (HackSearchByScopeWithNameKinds __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (HackSearchByScopeWithNameKinds __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData HackSearchByScopeWithNameKinds where
+  rnf (HackSearchByScopeWithNameKinds __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default HackSearchByScopeWithNameKinds where
+  def = HackSearchByScopeWithNameKinds Default.def Prelude.Nothing
+
+instance Hashable.Hashable HackSearchByScopeWithNameKinds where
+  hashWithSalt __salt (HackSearchByScopeWithNameKinds _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type HackSearchByScopeAndKind_id = Glean.Id
+
+data HackSearchByScopeAndKind = HackSearchByScopeAndKind{hackSearchByScopeAndKind_id
+                                                         ::
+                                                         {-# UNPACK #-} !HackSearchByScopeAndKind_id,
+                                                         hackSearchByScopeAndKind_key ::
+                                                         Prelude.Maybe HackSearchByScopeAndKind_key}
+                                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON HackSearchByScopeAndKind where
+  toJSON (HackSearchByScopeAndKind __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct HackSearchByScopeAndKind where
+  buildStruct _proxy
+    (HackSearchByScopeAndKind __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (HackSearchByScopeAndKind __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData HackSearchByScopeAndKind where
+  rnf (HackSearchByScopeAndKind __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default HackSearchByScopeAndKind where
+  def = HackSearchByScopeAndKind Default.def Prelude.Nothing
+
+instance Hashable.Hashable HackSearchByScopeAndKind where
+  hashWithSalt __salt (HackSearchByScopeAndKind _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type HackSearchByNameKindWithQName_id = Glean.Id
+
+data HackSearchByNameKindWithQName = HackSearchByNameKindWithQName{hackSearchByNameKindWithQName_id
+                                                                   ::
+                                                                   {-# UNPACK #-} !HackSearchByNameKindWithQName_id,
+                                                                   hackSearchByNameKindWithQName_key
+                                                                   ::
+                                                                   Prelude.Maybe
+                                                                     HackSearchByNameKindWithQName_key}
+                                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON HackSearchByNameKindWithQName where
+  toJSON (HackSearchByNameKindWithQName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct HackSearchByNameKindWithQName where
+  buildStruct _proxy
+    (HackSearchByNameKindWithQName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (HackSearchByNameKindWithQName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData HackSearchByNameKindWithQName where
+  rnf (HackSearchByNameKindWithQName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default HackSearchByNameKindWithQName where
+  def = HackSearchByNameKindWithQName Default.def Prelude.Nothing
+
+instance Hashable.Hashable HackSearchByNameKindWithQName where
+  hashWithSalt __salt (HackSearchByNameKindWithQName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type HackSearchByNameKindWithNamespace_id = Glean.Id
+
+data HackSearchByNameKindWithNamespace = HackSearchByNameKindWithNamespace{hackSearchByNameKindWithNamespace_id
+                                                                           ::
+                                                                           {-# UNPACK #-} !HackSearchByNameKindWithNamespace_id,
+                                                                           hackSearchByNameKindWithNamespace_key
+                                                                           ::
+                                                                           Prelude.Maybe
+                                                                             HackSearchByNameKindWithNamespace_key}
+                                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON HackSearchByNameKindWithNamespace where
+  toJSON (HackSearchByNameKindWithNamespace __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct HackSearchByNameKindWithNamespace
+         where
+  buildStruct _proxy
+    (HackSearchByNameKindWithNamespace __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (HackSearchByNameKindWithNamespace __val__id
+                                                  __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData HackSearchByNameKindWithNamespace where
+  rnf (HackSearchByNameKindWithNamespace __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default HackSearchByNameKindWithNamespace where
+  def = HackSearchByNameKindWithNamespace Default.def Prelude.Nothing
+
+instance Hashable.Hashable HackSearchByNameKindWithNamespace where
+  hashWithSalt __salt (HackSearchByNameKindWithNamespace _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type HackSearchByNameAndKind_id = Glean.Id
+
+data HackSearchByNameAndKind = HackSearchByNameAndKind{hackSearchByNameAndKind_id
+                                                       ::
+                                                       {-# UNPACK #-} !HackSearchByNameAndKind_id,
+                                                       hackSearchByNameAndKind_key ::
+                                                       Prelude.Maybe HackSearchByNameAndKind_key}
+                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON HackSearchByNameAndKind where
+  toJSON (HackSearchByNameAndKind __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct HackSearchByNameAndKind where
+  buildStruct _proxy
+    (HackSearchByNameAndKind __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (HackSearchByNameAndKind __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData HackSearchByNameAndKind where
+  rnf (HackSearchByNameAndKind __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default HackSearchByNameAndKind where
+  def = HackSearchByNameAndKind Default.def Prelude.Nothing
+
+instance Hashable.Hashable HackSearchByNameAndKind where
+  hashWithSalt __salt (HackSearchByNameAndKind _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type HackSearchByLowerCaseScopeAndKind_id = Glean.Id
+
+data HackSearchByLowerCaseScopeAndKind = HackSearchByLowerCaseScopeAndKind{hackSearchByLowerCaseScopeAndKind_id
+                                                                           ::
+                                                                           {-# UNPACK #-} !HackSearchByLowerCaseScopeAndKind_id,
+                                                                           hackSearchByLowerCaseScopeAndKind_key
+                                                                           ::
+                                                                           Prelude.Maybe
+                                                                             HackSearchByLowerCaseScopeAndKind_key}
+                                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON HackSearchByLowerCaseScopeAndKind where
+  toJSON (HackSearchByLowerCaseScopeAndKind __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct HackSearchByLowerCaseScopeAndKind
+         where
+  buildStruct _proxy
+    (HackSearchByLowerCaseScopeAndKind __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (HackSearchByLowerCaseScopeAndKind __val__id
+                                                  __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData HackSearchByLowerCaseScopeAndKind where
+  rnf (HackSearchByLowerCaseScopeAndKind __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default HackSearchByLowerCaseScopeAndKind where
+  def = HackSearchByLowerCaseScopeAndKind Default.def Prelude.Nothing
+
+instance Hashable.Hashable HackSearchByLowerCaseScopeAndKind where
+  hashWithSalt __salt (HackSearchByLowerCaseScopeAndKind _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type HackSearchByLowerCaseNameAndKind_id = Glean.Id
+
+data HackSearchByLowerCaseNameAndKind = HackSearchByLowerCaseNameAndKind{hackSearchByLowerCaseNameAndKind_id
+                                                                         ::
+                                                                         {-# UNPACK #-} !HackSearchByLowerCaseNameAndKind_id,
+                                                                         hackSearchByLowerCaseNameAndKind_key
+                                                                         ::
+                                                                         Prelude.Maybe
+                                                                           HackSearchByLowerCaseNameAndKind_key}
+                                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON HackSearchByLowerCaseNameAndKind where
+  toJSON (HackSearchByLowerCaseNameAndKind __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct HackSearchByLowerCaseNameAndKind where
+  buildStruct _proxy
+    (HackSearchByLowerCaseNameAndKind __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (HackSearchByLowerCaseNameAndKind __val__id
+                                                  __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData HackSearchByLowerCaseNameAndKind where
+  rnf (HackSearchByLowerCaseNameAndKind __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default HackSearchByLowerCaseNameAndKind where
+  def = HackSearchByLowerCaseNameAndKind Default.def Prelude.Nothing
+
+instance Hashable.Hashable HackSearchByLowerCaseNameAndKind where
+  hashWithSalt __salt (HackSearchByLowerCaseNameAndKind _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type HackNameLowerCase_id = Glean.Id
+
+data HackNameLowerCase = HackNameLowerCase{hackNameLowerCase_id ::
+                                           {-# UNPACK #-} !HackNameLowerCase_id,
+                                           hackNameLowerCase_key ::
+                                           Prelude.Maybe HackNameLowerCase_key}
+                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON HackNameLowerCase where
+  toJSON (HackNameLowerCase __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct HackNameLowerCase where
+  buildStruct _proxy (HackNameLowerCase __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (HackNameLowerCase __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData HackNameLowerCase where
+  rnf (HackNameLowerCase __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default HackNameLowerCase where
+  def = HackNameLowerCase Default.def Prelude.Nothing
+
+instance Hashable.Hashable HackNameLowerCase where
+  hashWithSalt __salt (HackNameLowerCase _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type GraphQLSearchByName_id = Glean.Id
+
+data GraphQLSearchByName = GraphQLSearchByName{graphQLSearchByName_id
+                                               :: {-# UNPACK #-} !GraphQLSearchByName_id,
+                                               graphQLSearchByName_key ::
+                                               Prelude.Maybe GraphQLSearchByName_key}
+                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON GraphQLSearchByName where
+  toJSON (GraphQLSearchByName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct GraphQLSearchByName where
+  buildStruct _proxy (GraphQLSearchByName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (GraphQLSearchByName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData GraphQLSearchByName where
+  rnf (GraphQLSearchByName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default GraphQLSearchByName where
+  def = GraphQLSearchByName Default.def Prelude.Nothing
+
+instance Hashable.Hashable GraphQLSearchByName where
+  hashWithSalt __salt (GraphQLSearchByName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type GraphQLSearchByLowerCaseName_id = Glean.Id
+
+data GraphQLSearchByLowerCaseName = GraphQLSearchByLowerCaseName{graphQLSearchByLowerCaseName_id
+                                                                 ::
+                                                                 {-# UNPACK #-} !GraphQLSearchByLowerCaseName_id,
+                                                                 graphQLSearchByLowerCaseName_key ::
+                                                                 Prelude.Maybe
+                                                                   GraphQLSearchByLowerCaseName_key}
+                                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON GraphQLSearchByLowerCaseName where
+  toJSON (GraphQLSearchByLowerCaseName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct GraphQLSearchByLowerCaseName where
+  buildStruct _proxy
+    (GraphQLSearchByLowerCaseName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (GraphQLSearchByLowerCaseName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData GraphQLSearchByLowerCaseName where
+  rnf (GraphQLSearchByLowerCaseName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default GraphQLSearchByLowerCaseName where
+  def = GraphQLSearchByLowerCaseName Default.def Prelude.Nothing
+
+instance Hashable.Hashable GraphQLSearchByLowerCaseName where
+  hashWithSalt __salt (GraphQLSearchByLowerCaseName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type FlowSearchByScopeAndKind_id = Glean.Id
+
+data FlowSearchByScopeAndKind = FlowSearchByScopeAndKind{flowSearchByScopeAndKind_id
+                                                         ::
+                                                         {-# UNPACK #-} !FlowSearchByScopeAndKind_id,
+                                                         flowSearchByScopeAndKind_key ::
+                                                         Prelude.Maybe FlowSearchByScopeAndKind_key}
+                                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FlowSearchByScopeAndKind where
+  toJSON (FlowSearchByScopeAndKind __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct FlowSearchByScopeAndKind where
+  buildStruct _proxy
+    (FlowSearchByScopeAndKind __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (FlowSearchByScopeAndKind __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData FlowSearchByScopeAndKind where
+  rnf (FlowSearchByScopeAndKind __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default FlowSearchByScopeAndKind where
+  def = FlowSearchByScopeAndKind Default.def Prelude.Nothing
+
+instance Hashable.Hashable FlowSearchByScopeAndKind where
+  hashWithSalt __salt (FlowSearchByScopeAndKind _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type FlowSearchByNameKindAndScopeFact_id = Glean.Id
+
+data FlowSearchByNameKindAndScopeFact = FlowSearchByNameKindAndScopeFact{flowSearchByNameKindAndScopeFact_id
+                                                                         ::
+                                                                         {-# UNPACK #-} !FlowSearchByNameKindAndScopeFact_id,
+                                                                         flowSearchByNameKindAndScopeFact_key
+                                                                         ::
+                                                                         Prelude.Maybe
+                                                                           FlowSearchByNameKindAndScopeFact_key}
+                                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FlowSearchByNameKindAndScopeFact where
+  toJSON (FlowSearchByNameKindAndScopeFact __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct FlowSearchByNameKindAndScopeFact where
+  buildStruct _proxy
+    (FlowSearchByNameKindAndScopeFact __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (FlowSearchByNameKindAndScopeFact __val__id
+                                                  __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData FlowSearchByNameKindAndScopeFact where
+  rnf (FlowSearchByNameKindAndScopeFact __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default FlowSearchByNameKindAndScopeFact where
+  def = FlowSearchByNameKindAndScopeFact Default.def Prelude.Nothing
+
+instance Hashable.Hashable FlowSearchByNameKindAndScopeFact where
+  hashWithSalt __salt (FlowSearchByNameKindAndScopeFact _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type FlowSearchByLowerCaseScopeAndKind_id = Glean.Id
+
+data FlowSearchByLowerCaseScopeAndKind = FlowSearchByLowerCaseScopeAndKind{flowSearchByLowerCaseScopeAndKind_id
+                                                                           ::
+                                                                           {-# UNPACK #-} !FlowSearchByLowerCaseScopeAndKind_id,
+                                                                           flowSearchByLowerCaseScopeAndKind_key
+                                                                           ::
+                                                                           Prelude.Maybe
+                                                                             FlowSearchByLowerCaseScopeAndKind_key}
+                                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FlowSearchByLowerCaseScopeAndKind where
+  toJSON (FlowSearchByLowerCaseScopeAndKind __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct FlowSearchByLowerCaseScopeAndKind
+         where
+  buildStruct _proxy
+    (FlowSearchByLowerCaseScopeAndKind __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (FlowSearchByLowerCaseScopeAndKind __val__id
+                                                  __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData FlowSearchByLowerCaseScopeAndKind where
+  rnf (FlowSearchByLowerCaseScopeAndKind __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default FlowSearchByLowerCaseScopeAndKind where
+  def = FlowSearchByLowerCaseScopeAndKind Default.def Prelude.Nothing
+
+instance Hashable.Hashable FlowSearchByLowerCaseScopeAndKind where
+  hashWithSalt __salt (FlowSearchByLowerCaseScopeAndKind _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type FlowSearchByLowerCaseNameKindAndScopeFact_id = Glean.Id
+
+data FlowSearchByLowerCaseNameKindAndScopeFact = FlowSearchByLowerCaseNameKindAndScopeFact{flowSearchByLowerCaseNameKindAndScopeFact_id
+                                                                                           ::
+                                                                                           {-# UNPACK #-} !FlowSearchByLowerCaseNameKindAndScopeFact_id,
+                                                                                           flowSearchByLowerCaseNameKindAndScopeFact_key
+                                                                                           ::
+                                                                                           Prelude.Maybe
+                                                                                             FlowSearchByLowerCaseNameKindAndScopeFact_key}
+                                                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FlowSearchByLowerCaseNameKindAndScopeFact
+         where
+  toJSON
+    (FlowSearchByLowerCaseNameKindAndScopeFact __field__id
+       __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct
+           FlowSearchByLowerCaseNameKindAndScopeFact
+         where
+  buildStruct _proxy
+    (FlowSearchByLowerCaseNameKindAndScopeFact __field__id
+       __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (FlowSearchByLowerCaseNameKindAndScopeFact __val__id
+                                                  __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData FlowSearchByLowerCaseNameKindAndScopeFact
+         where
+  rnf
+    (FlowSearchByLowerCaseNameKindAndScopeFact __field__id
+       __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default FlowSearchByLowerCaseNameKindAndScopeFact
+         where
+  def
+    = FlowSearchByLowerCaseNameKindAndScopeFact Default.def
+        Prelude.Nothing
+
+instance Hashable.Hashable
+           FlowSearchByLowerCaseNameKindAndScopeFact
+         where
+  hashWithSalt __salt
+    (FlowSearchByLowerCaseNameKindAndScopeFact _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type FlowNameLowerCase_id = Glean.Id
+
+data FlowNameLowerCase = FlowNameLowerCase{flowNameLowerCase_id ::
+                                           {-# UNPACK #-} !FlowNameLowerCase_id,
+                                           flowNameLowerCase_key ::
+                                           Prelude.Maybe FlowNameLowerCase_key}
+                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FlowNameLowerCase where
+  toJSON (FlowNameLowerCase __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct FlowNameLowerCase where
+  buildStruct _proxy (FlowNameLowerCase __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (FlowNameLowerCase __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData FlowNameLowerCase where
+  rnf (FlowNameLowerCase __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default FlowNameLowerCase where
+  def = FlowNameLowerCase Default.def Prelude.Nothing
+
+instance Hashable.Hashable FlowNameLowerCase where
+  hashWithSalt __salt (FlowNameLowerCase _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type FbthriftSearchByNameFact_id = Glean.Id
+
+data FbthriftSearchByNameFact = FbthriftSearchByNameFact{fbthriftSearchByNameFact_id
+                                                         ::
+                                                         {-# UNPACK #-} !FbthriftSearchByNameFact_id,
+                                                         fbthriftSearchByNameFact_key ::
+                                                         Prelude.Maybe FbthriftSearchByNameFact_key}
+                                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FbthriftSearchByNameFact where
+  toJSON (FbthriftSearchByNameFact __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct FbthriftSearchByNameFact where
+  buildStruct _proxy
+    (FbthriftSearchByNameFact __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (FbthriftSearchByNameFact __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData FbthriftSearchByNameFact where
+  rnf (FbthriftSearchByNameFact __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default FbthriftSearchByNameFact where
+  def = FbthriftSearchByNameFact Default.def Prelude.Nothing
+
+instance Hashable.Hashable FbthriftSearchByNameFact where
+  hashWithSalt __salt (FbthriftSearchByNameFact _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type ErlangSearchByName_id = Glean.Id
+
+data ErlangSearchByName = ErlangSearchByName{erlangSearchByName_id
+                                             :: {-# UNPACK #-} !ErlangSearchByName_id,
+                                             erlangSearchByName_key ::
+                                             Prelude.Maybe ErlangSearchByName_key}
+                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ErlangSearchByName where
+  toJSON (ErlangSearchByName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct ErlangSearchByName where
+  buildStruct _proxy (ErlangSearchByName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (ErlangSearchByName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ErlangSearchByName where
+  rnf (ErlangSearchByName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default ErlangSearchByName where
+  def = ErlangSearchByName Default.def Prelude.Nothing
+
+instance Hashable.Hashable ErlangSearchByName where
+  hashWithSalt __salt (ErlangSearchByName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type ErlangSearchByLowerCaseName_id = Glean.Id
+
+data ErlangSearchByLowerCaseName = ErlangSearchByLowerCaseName{erlangSearchByLowerCaseName_id
+                                                               ::
+                                                               {-# UNPACK #-} !ErlangSearchByLowerCaseName_id,
+                                                               erlangSearchByLowerCaseName_key ::
+                                                               Prelude.Maybe
+                                                                 ErlangSearchByLowerCaseName_key}
+                                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ErlangSearchByLowerCaseName where
+  toJSON (ErlangSearchByLowerCaseName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct ErlangSearchByLowerCaseName where
+  buildStruct _proxy
+    (ErlangSearchByLowerCaseName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (ErlangSearchByLowerCaseName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ErlangSearchByLowerCaseName where
+  rnf (ErlangSearchByLowerCaseName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default ErlangSearchByLowerCaseName where
+  def = ErlangSearchByLowerCaseName Default.def Prelude.Nothing
+
+instance Hashable.Hashable ErlangSearchByLowerCaseName where
+  hashWithSalt __salt (ErlangSearchByLowerCaseName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type CxxSearchByScopeAndKind_id = Glean.Id
+
+data CxxSearchByScopeAndKind = CxxSearchByScopeAndKind{cxxSearchByScopeAndKind_id
+                                                       ::
+                                                       {-# UNPACK #-} !CxxSearchByScopeAndKind_id,
+                                                       cxxSearchByScopeAndKind_key ::
+                                                       Prelude.Maybe CxxSearchByScopeAndKind_key}
+                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON CxxSearchByScopeAndKind where
+  toJSON (CxxSearchByScopeAndKind __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct CxxSearchByScopeAndKind where
+  buildStruct _proxy
+    (CxxSearchByScopeAndKind __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (CxxSearchByScopeAndKind __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData CxxSearchByScopeAndKind where
+  rnf (CxxSearchByScopeAndKind __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default CxxSearchByScopeAndKind where
+  def = CxxSearchByScopeAndKind Default.def Prelude.Nothing
+
+instance Hashable.Hashable CxxSearchByScopeAndKind where
+  hashWithSalt __salt (CxxSearchByScopeAndKind _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type CxxSearchByNameKindAndScopeFact_id = Glean.Id
+
+data CxxSearchByNameKindAndScopeFact = CxxSearchByNameKindAndScopeFact{cxxSearchByNameKindAndScopeFact_id
+                                                                       ::
+                                                                       {-# UNPACK #-} !CxxSearchByNameKindAndScopeFact_id,
+                                                                       cxxSearchByNameKindAndScopeFact_key
+                                                                       ::
+                                                                       Prelude.Maybe
+                                                                         CxxSearchByNameKindAndScopeFact_key}
+                                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON CxxSearchByNameKindAndScopeFact where
+  toJSON (CxxSearchByNameKindAndScopeFact __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct CxxSearchByNameKindAndScopeFact where
+  buildStruct _proxy
+    (CxxSearchByNameKindAndScopeFact __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (CxxSearchByNameKindAndScopeFact __val__id
+                                                  __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData CxxSearchByNameKindAndScopeFact where
+  rnf (CxxSearchByNameKindAndScopeFact __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default CxxSearchByNameKindAndScopeFact where
+  def = CxxSearchByNameKindAndScopeFact Default.def Prelude.Nothing
+
+instance Hashable.Hashable CxxSearchByNameKindAndScopeFact where
+  hashWithSalt __salt (CxxSearchByNameKindAndScopeFact _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type CxxSearchByLowerCaseScopeAndKind_id = Glean.Id
+
+data CxxSearchByLowerCaseScopeAndKind = CxxSearchByLowerCaseScopeAndKind{cxxSearchByLowerCaseScopeAndKind_id
+                                                                         ::
+                                                                         {-# UNPACK #-} !CxxSearchByLowerCaseScopeAndKind_id,
+                                                                         cxxSearchByLowerCaseScopeAndKind_key
+                                                                         ::
+                                                                         Prelude.Maybe
+                                                                           CxxSearchByLowerCaseScopeAndKind_key}
+                                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON CxxSearchByLowerCaseScopeAndKind where
+  toJSON (CxxSearchByLowerCaseScopeAndKind __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct CxxSearchByLowerCaseScopeAndKind where
+  buildStruct _proxy
+    (CxxSearchByLowerCaseScopeAndKind __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (CxxSearchByLowerCaseScopeAndKind __val__id
+                                                  __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData CxxSearchByLowerCaseScopeAndKind where
+  rnf (CxxSearchByLowerCaseScopeAndKind __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default CxxSearchByLowerCaseScopeAndKind where
+  def = CxxSearchByLowerCaseScopeAndKind Default.def Prelude.Nothing
+
+instance Hashable.Hashable CxxSearchByLowerCaseScopeAndKind where
+  hashWithSalt __salt (CxxSearchByLowerCaseScopeAndKind _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type CxxSearchByLowerCaseNameKindAndScopeFact_id = Glean.Id
+
+data CxxSearchByLowerCaseNameKindAndScopeFact = CxxSearchByLowerCaseNameKindAndScopeFact{cxxSearchByLowerCaseNameKindAndScopeFact_id
+                                                                                         ::
+                                                                                         {-# UNPACK #-} !CxxSearchByLowerCaseNameKindAndScopeFact_id,
+                                                                                         cxxSearchByLowerCaseNameKindAndScopeFact_key
+                                                                                         ::
+                                                                                         Prelude.Maybe
+                                                                                           CxxSearchByLowerCaseNameKindAndScopeFact_key}
+                                                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON CxxSearchByLowerCaseNameKindAndScopeFact
+         where
+  toJSON
+    (CxxSearchByLowerCaseNameKindAndScopeFact __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct
+           CxxSearchByLowerCaseNameKindAndScopeFact
+         where
+  buildStruct _proxy
+    (CxxSearchByLowerCaseNameKindAndScopeFact __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (CxxSearchByLowerCaseNameKindAndScopeFact __val__id
+                                                  __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData CxxSearchByLowerCaseNameKindAndScopeFact
+         where
+  rnf
+    (CxxSearchByLowerCaseNameKindAndScopeFact __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default CxxSearchByLowerCaseNameKindAndScopeFact
+         where
+  def
+    = CxxSearchByLowerCaseNameKindAndScopeFact Default.def
+        Prelude.Nothing
+
+instance Hashable.Hashable CxxSearchByLowerCaseNameKindAndScopeFact
+         where
+  hashWithSalt __salt
+    (CxxSearchByLowerCaseNameKindAndScopeFact _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type CxxPreferDefinitions_id = Glean.Id
+
+data CxxPreferDefinitions = CxxPreferDefinitions{cxxPreferDefinitions_id
+                                                 :: {-# UNPACK #-} !CxxPreferDefinitions_id,
+                                                 cxxPreferDefinitions_key ::
+                                                 Prelude.Maybe CxxPreferDefinitions_key}
+                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON CxxPreferDefinitions where
+  toJSON (CxxPreferDefinitions __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct CxxPreferDefinitions where
+  buildStruct _proxy (CxxPreferDefinitions __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (CxxPreferDefinitions __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData CxxPreferDefinitions where
+  rnf (CxxPreferDefinitions __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default CxxPreferDefinitions where
+  def = CxxPreferDefinitions Default.def Prelude.Nothing
+
+instance Hashable.Hashable CxxPreferDefinitions where
+  hashWithSalt __salt (CxxPreferDefinitions _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type CxxNameLowerCase_id = Glean.Id
+
+data CxxNameLowerCase = CxxNameLowerCase{cxxNameLowerCase_id ::
+                                         {-# UNPACK #-} !CxxNameLowerCase_id,
+                                         cxxNameLowerCase_key :: Prelude.Maybe CxxNameLowerCase_key}
+                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON CxxNameLowerCase where
+  toJSON (CxxNameLowerCase __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct CxxNameLowerCase where
+  buildStruct _proxy (CxxNameLowerCase __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (CxxNameLowerCase __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData CxxNameLowerCase where
+  rnf (CxxNameLowerCase __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default CxxNameLowerCase where
+  def = CxxNameLowerCase Default.def Prelude.Nothing
+
+instance Hashable.Hashable CxxNameLowerCase where
+  hashWithSalt __salt (CxxNameLowerCase _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type CSharpSearchByName_id = Glean.Id
+
+data CSharpSearchByName = CSharpSearchByName{cSharpSearchByName_id
+                                             :: {-# UNPACK #-} !CSharpSearchByName_id,
+                                             cSharpSearchByName_key ::
+                                             Prelude.Maybe CSharpSearchByName_key}
+                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON CSharpSearchByName where
+  toJSON (CSharpSearchByName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct CSharpSearchByName where
+  buildStruct _proxy (CSharpSearchByName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (CSharpSearchByName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData CSharpSearchByName where
+  rnf (CSharpSearchByName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default CSharpSearchByName where
+  def = CSharpSearchByName Default.def Prelude.Nothing
+
+instance Hashable.Hashable CSharpSearchByName where
+  hashWithSalt __salt (CSharpSearchByName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type CSharpSearchByLowerCaseName_id = Glean.Id
+
+data CSharpSearchByLowerCaseName = CSharpSearchByLowerCaseName{cSharpSearchByLowerCaseName_id
+                                                               ::
+                                                               {-# UNPACK #-} !CSharpSearchByLowerCaseName_id,
+                                                               cSharpSearchByLowerCaseName_key ::
+                                                               Prelude.Maybe
+                                                                 CSharpSearchByLowerCaseName_key}
+                                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON CSharpSearchByLowerCaseName where
+  toJSON (CSharpSearchByLowerCaseName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct CSharpSearchByLowerCaseName where
+  buildStruct _proxy
+    (CSharpSearchByLowerCaseName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (CSharpSearchByLowerCaseName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData CSharpSearchByLowerCaseName where
+  rnf (CSharpSearchByLowerCaseName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default CSharpSearchByLowerCaseName where
+  def = CSharpSearchByLowerCaseName Default.def Prelude.Nothing
+
+instance Hashable.Hashable CSharpSearchByLowerCaseName where
+  hashWithSalt __salt (CSharpSearchByLowerCaseName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type BuckSearchByName_id = Glean.Id
+
+data BuckSearchByName = BuckSearchByName{buckSearchByName_id ::
+                                         {-# UNPACK #-} !BuckSearchByName_id,
+                                         buckSearchByName_key :: Prelude.Maybe BuckSearchByName_key}
+                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON BuckSearchByName where
+  toJSON (BuckSearchByName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct BuckSearchByName where
+  buildStruct _proxy (BuckSearchByName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (BuckSearchByName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData BuckSearchByName where
+  rnf (BuckSearchByName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default BuckSearchByName where
+  def = BuckSearchByName Default.def Prelude.Nothing
+
+instance Hashable.Hashable BuckSearchByName where
+  hashWithSalt __salt (BuckSearchByName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type BuckSearchByLowerCaseName_id = Glean.Id
+
+data BuckSearchByLowerCaseName = BuckSearchByLowerCaseName{buckSearchByLowerCaseName_id
+                                                           ::
+                                                           {-# UNPACK #-} !BuckSearchByLowerCaseName_id,
+                                                           buckSearchByLowerCaseName_key ::
+                                                           Prelude.Maybe
+                                                             BuckSearchByLowerCaseName_key}
+                                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON BuckSearchByLowerCaseName where
+  toJSON (BuckSearchByLowerCaseName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct BuckSearchByLowerCaseName where
+  buildStruct _proxy
+    (BuckSearchByLowerCaseName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (BuckSearchByLowerCaseName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData BuckSearchByLowerCaseName where
+  rnf (BuckSearchByLowerCaseName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default BuckSearchByLowerCaseName where
+  def = BuckSearchByLowerCaseName Default.def Prelude.Nothing
+
+instance Hashable.Hashable BuckSearchByLowerCaseName where
+  hashWithSalt __salt (BuckSearchByLowerCaseName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type BuckSearchByLocalNameFact_id = Glean.Id
+
+data BuckSearchByLocalNameFact = BuckSearchByLocalNameFact{buckSearchByLocalNameFact_id
+                                                           ::
+                                                           {-# UNPACK #-} !BuckSearchByLocalNameFact_id,
+                                                           buckSearchByLocalNameFact_key ::
+                                                           Prelude.Maybe
+                                                             BuckSearchByLocalNameFact_key}
+                                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON BuckSearchByLocalNameFact where
+  toJSON (BuckSearchByLocalNameFact __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct BuckSearchByLocalNameFact where
+  buildStruct _proxy
+    (BuckSearchByLocalNameFact __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (BuckSearchByLocalNameFact __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData BuckSearchByLocalNameFact where
+  rnf (BuckSearchByLocalNameFact __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default BuckSearchByLocalNameFact where
+  def = BuckSearchByLocalNameFact Default.def Prelude.Nothing
+
+instance Hashable.Hashable BuckSearchByLocalNameFact where
+  hashWithSalt __salt (BuckSearchByLocalNameFact _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type AngleSearchByName_id = Glean.Id
+
+data AngleSearchByName = AngleSearchByName{angleSearchByName_id ::
+                                           {-# UNPACK #-} !AngleSearchByName_id,
+                                           angleSearchByName_key ::
+                                           Prelude.Maybe AngleSearchByName_key}
+                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON AngleSearchByName where
+  toJSON (AngleSearchByName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct AngleSearchByName where
+  buildStruct _proxy (AngleSearchByName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure (AngleSearchByName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData AngleSearchByName where
+  rnf (AngleSearchByName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default AngleSearchByName where
+  def = AngleSearchByName Default.def Prelude.Nothing
+
+instance Hashable.Hashable AngleSearchByName where
+  hashWithSalt __salt (AngleSearchByName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+type AngleSearchByLowerCaseName_id = Glean.Id
+
+data AngleSearchByLowerCaseName = AngleSearchByLowerCaseName{angleSearchByLowerCaseName_id
+                                                             ::
+                                                             {-# UNPACK #-} !AngleSearchByLowerCaseName_id,
+                                                             angleSearchByLowerCaseName_key ::
+                                                             Prelude.Maybe
+                                                               AngleSearchByLowerCaseName_key}
+                                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON AngleSearchByLowerCaseName where
+  toJSON (AngleSearchByLowerCaseName __field__id __field__key)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             Prelude.mempty)
+
+instance Thrift.ThriftStruct AngleSearchByLowerCaseName where
+  buildStruct _proxy
+    (AngleSearchByLowerCaseName __field__id __field__key)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           case __field__key of
+             Prelude.Just _val -> Thrift.genField _proxy "key"
+                                    (Thrift.getStructType _proxy)
+                                    2
+                                    1
+                                    (Thrift.buildStruct _proxy _val)
+                                    : []
+             Prelude.Nothing -> [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             Prelude.pure
+                                               (AngleSearchByLowerCaseName __val__id __val__key)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData AngleSearchByLowerCaseName where
+  rnf (AngleSearchByLowerCaseName __field__id __field__key)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq` ()
+
+instance Default.Default AngleSearchByLowerCaseName where
+  def = AngleSearchByLowerCaseName Default.def Prelude.Nothing
+
+instance Hashable.Hashable AngleSearchByLowerCaseName where
+  hashWithSalt __salt (AngleSearchByLowerCaseName _id _key)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key
+
+data ThriftSearchByName_key = ThriftSearchByName_key{thriftSearchByName_key_name
+                                                     :: Text.Text,
+                                                     thriftSearchByName_key_entity ::
+                                                     Glean.Schema.Code.Entity}
+                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ThriftSearchByName_key where
+  toJSON (ThriftSearchByName_key __field__name __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "entity" .= __field__entity : Prelude.mempty)
+
+instance Thrift.ThriftStruct ThriftSearchByName_key where
+  buildStruct _proxy
+    (ThriftSearchByName_key __field__name __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__entity)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (ThriftSearchByName_key __val__name __val__entity)
+              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ThriftSearchByName_key where
+  rnf (ThriftSearchByName_key __field__name __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default ThriftSearchByName_key where
+  def = ThriftSearchByName_key "" Default.def
+
+instance Hashable.Hashable ThriftSearchByName_key where
+  hashWithSalt __salt (ThriftSearchByName_key _name _entity)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+        _entity
+
+data ThriftSearchByLowerCaseName_key = ThriftSearchByLowerCaseName_key{thriftSearchByLowerCaseName_key_name
+                                                                       :: Text.Text,
+                                                                       thriftSearchByLowerCaseName_key_entity
+                                                                       :: Glean.Schema.Code.Entity}
+                                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ThriftSearchByLowerCaseName_key where
+  toJSON
+    (ThriftSearchByLowerCaseName_key __field__name __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "entity" .= __field__entity : Prelude.mempty)
+
+instance Thrift.ThriftStruct ThriftSearchByLowerCaseName_key where
+  buildStruct _proxy
+    (ThriftSearchByLowerCaseName_key __field__name __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__entity)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (ThriftSearchByLowerCaseName_key __val__name
+                                                  __val__entity)
+              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ThriftSearchByLowerCaseName_key where
+  rnf (ThriftSearchByLowerCaseName_key __field__name __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default ThriftSearchByLowerCaseName_key where
+  def = ThriftSearchByLowerCaseName_key "" Default.def
+
+instance Hashable.Hashable ThriftSearchByLowerCaseName_key where
+  hashWithSalt __salt (ThriftSearchByLowerCaseName_key _name _entity)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+        _entity
+
+data SwiftSearchByNameAndKind_key = SwiftSearchByNameAndKind_key{swiftSearchByNameAndKind_key_name
+                                                                 :: Text.Text,
+                                                                 swiftSearchByNameAndKind_key_kind
+                                                                 ::
+                                                                 Prelude.Maybe
+                                                                   Glean.Schema.CodemarkupTypes.SymbolKind,
+                                                                 swiftSearchByNameAndKind_key_entity
+                                                                 :: Glean.Schema.Code.Entity}
+                                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SwiftSearchByNameAndKind_key where
+  toJSON
+    (SwiftSearchByNameAndKind_key __field__name __field__kind
+       __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           Prelude.maybe Prelude.id ((:) . ("kind" .=)) __field__kind
+             ("entity" .= __field__entity : Prelude.mempty))
+
+instance Thrift.ThriftStruct SwiftSearchByNameAndKind_key where
+  buildStruct _proxy
+    (SwiftSearchByNameAndKind_key __field__name __field__kind
+       __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           let (__cereal__kind, __id__kind)
+                 = case __field__kind of
+                     Prelude.Just _val -> ((:)
+                                             (Thrift.genField _proxy "kind"
+                                                (Thrift.getI32Type _proxy)
+                                                2
+                                                1
+                                                ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                                                    Thrift.fromThriftEnum)
+                                                   _val)),
+                                           2)
+                     Prelude.Nothing -> (Prelude.id, 1)
+             in
+             __cereal__kind
+               (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 3
+                  __id__kind
+                  (Thrift.buildStruct _proxy __field__entity)
+                  : []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__kind <- ST.newSTRef Prelude.Nothing
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "SymbolKind")
+                                                                        ST.writeSTRef __field__kind
+                                                                          (Prelude.Just _val)
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__kind <- ST.readSTRef __field__kind
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (SwiftSearchByNameAndKind_key __val__name __val__kind
+                                                  __val__entity)
+              _idMap = HashMap.fromList [("name", 1), ("kind", 2), ("entity", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData SwiftSearchByNameAndKind_key where
+  rnf
+    (SwiftSearchByNameAndKind_key __field__name __field__kind
+       __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__kind `Prelude.seq`
+          DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default SwiftSearchByNameAndKind_key where
+  def = SwiftSearchByNameAndKind_key "" Prelude.Nothing Default.def
+
+instance Hashable.Hashable SwiftSearchByNameAndKind_key where
+  hashWithSalt __salt
+    (SwiftSearchByNameAndKind_key _name _kind _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _kind)
+        _entity
+
+data SwiftSearchByLowerCaseNameAndKind_key = SwiftSearchByLowerCaseNameAndKind_key{swiftSearchByLowerCaseNameAndKind_key_name
+                                                                                   :: Text.Text,
+                                                                                   swiftSearchByLowerCaseNameAndKind_key_kind
+                                                                                   ::
+                                                                                   Prelude.Maybe
+                                                                                     Glean.Schema.CodemarkupTypes.SymbolKind,
+                                                                                   swiftSearchByLowerCaseNameAndKind_key_entity
+                                                                                   ::
+                                                                                   Glean.Schema.Code.Entity}
+                                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SwiftSearchByLowerCaseNameAndKind_key where
+  toJSON
+    (SwiftSearchByLowerCaseNameAndKind_key __field__name __field__kind
+       __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           Prelude.maybe Prelude.id ((:) . ("kind" .=)) __field__kind
+             ("entity" .= __field__entity : Prelude.mempty))
+
+instance Thrift.ThriftStruct SwiftSearchByLowerCaseNameAndKind_key
+         where
+  buildStruct _proxy
+    (SwiftSearchByLowerCaseNameAndKind_key __field__name __field__kind
+       __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           let (__cereal__kind, __id__kind)
+                 = case __field__kind of
+                     Prelude.Just _val -> ((:)
+                                             (Thrift.genField _proxy "kind"
+                                                (Thrift.getI32Type _proxy)
+                                                2
+                                                1
+                                                ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                                                    Thrift.fromThriftEnum)
+                                                   _val)),
+                                           2)
+                     Prelude.Nothing -> (Prelude.id, 1)
+             in
+             __cereal__kind
+               (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 3
+                  __id__kind
+                  (Thrift.buildStruct _proxy __field__entity)
+                  : []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__kind <- ST.newSTRef Prelude.Nothing
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "SymbolKind")
+                                                                        ST.writeSTRef __field__kind
+                                                                          (Prelude.Just _val)
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__kind <- ST.readSTRef __field__kind
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (SwiftSearchByLowerCaseNameAndKind_key __val__name
+                                                  __val__kind
+                                                  __val__entity)
+              _idMap = HashMap.fromList [("name", 1), ("kind", 2), ("entity", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData SwiftSearchByLowerCaseNameAndKind_key where
+  rnf
+    (SwiftSearchByLowerCaseNameAndKind_key __field__name __field__kind
+       __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__kind `Prelude.seq`
+          DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default SwiftSearchByLowerCaseNameAndKind_key
+         where
+  def
+    = SwiftSearchByLowerCaseNameAndKind_key "" Prelude.Nothing
+        Default.def
+
+instance Hashable.Hashable SwiftSearchByLowerCaseNameAndKind_key
+         where
+  hashWithSalt __salt
+    (SwiftSearchByLowerCaseNameAndKind_key _name _kind _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _kind)
+        _entity
+
+data SearchByScopeAndKind_key = SearchByScopeAndKind_key{searchByScopeAndKind_key_name
+                                                         :: Text.Text,
+                                                         searchByScopeAndKind_key_scope ::
+                                                         [Text.Text],
+                                                         searchByScopeAndKind_key_language ::
+                                                         Glean.Schema.Code.Language,
+                                                         searchByScopeAndKind_key_kinds ::
+                                                         Prelude.Maybe
+                                                           Glean.Schema.CodemarkupTypes.SymbolKind,
+                                                         searchByScopeAndKind_key_entity ::
+                                                         Glean.Schema.Code.Entity}
+                                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchByScopeAndKind_key where
+  toJSON
+    (SearchByScopeAndKind_key __field__name __field__scope
+       __field__language __field__kinds __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "scope" .= __field__scope :
+             "language" .= __field__language :
+               Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
+                 ("entity" .= __field__entity : Prelude.mempty))
+
+instance Thrift.ThriftStruct SearchByScopeAndKind_key where
+  buildStruct _proxy
+    (SearchByScopeAndKind_key __field__name __field__scope
+       __field__language __field__kinds __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "scope" (Thrift.getListType _proxy) 2 1
+             (Thrift.genList _proxy (Thrift.getStringType _proxy)
+                (Thrift.genText _proxy)
+                __field__scope)
+             :
+             Thrift.genField _proxy "language" (Thrift.getI32Type _proxy) 3 2
+               ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                   Thrift.fromThriftEnum)
+                  __field__language)
+               :
+               let (__cereal__kinds, __id__kinds)
+                     = case __field__kinds of
+                         Prelude.Just _val -> ((:)
+                                                 (Thrift.genField _proxy "kinds"
+                                                    (Thrift.getI32Type _proxy)
+                                                    4
+                                                    3
+                                                    ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                                                        Thrift.fromThriftEnum)
+                                                       _val)),
+                                               4)
+                         Prelude.Nothing -> (Prelude.id, 3)
+                 in
+                 __cereal__kinds
+                   (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 5
+                      __id__kinds
+                      (Thrift.buildStruct _proxy __field__entity)
+                      : []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__scope <- ST.newSTRef Default.def
+            __field__language <- ST.newSTRef Default.def
+            __field__kinds <- ST.newSTRef Prelude.Nothing
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseText
+                                                                                           _proxy))
+                                                                        ST.writeSTRef __field__scope
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "Language")
+                                                                        ST.writeSTRef
+                                                                          __field__language
+                                                                          _val
+                                                                 4 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "SymbolKind")
+                                                                        ST.writeSTRef __field__kinds
+                                                                          (Prelude.Just _val)
+                                                                 5 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__scope <- ST.readSTRef __field__scope
+                                             !__val__language <- ST.readSTRef __field__language
+                                             !__val__kinds <- ST.readSTRef __field__kinds
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (SearchByScopeAndKind_key __val__name __val__scope
+                                                  __val__language
+                                                  __val__kinds
+                                                  __val__entity)
+              _idMap
+                = HashMap.fromList
+                    [("name", 1), ("scope", 2), ("language", 3), ("kinds", 4),
+                     ("entity", 5)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchByScopeAndKind_key where
+  rnf
+    (SearchByScopeAndKind_key __field__name __field__scope
+       __field__language __field__kinds __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__scope `Prelude.seq`
+          DeepSeq.rnf __field__language `Prelude.seq`
+            DeepSeq.rnf __field__kinds `Prelude.seq`
+              DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default SearchByScopeAndKind_key where
+  def
+    = SearchByScopeAndKind_key "" Default.def Default.def
+        Prelude.Nothing
+        Default.def
+
+instance Hashable.Hashable SearchByScopeAndKind_key where
+  hashWithSalt __salt
+    (SearchByScopeAndKind_key _name _scope _language _kinds _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt
+              (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
+              _language)
+           _kinds)
+        _entity
+
+data SearchByScope_key = SearchByScope_key{searchByScope_key_name
+                                           :: Text.Text,
+                                           searchByScope_key_scope :: [Text.Text],
+                                           searchByScope_key_language :: Glean.Schema.Code.Language,
+                                           searchByScope_key_entity :: Glean.Schema.Code.Entity}
+                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchByScope_key where
+  toJSON
+    (SearchByScope_key __field__name __field__scope __field__language
+       __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "scope" .= __field__scope :
+             "language" .= __field__language :
+               "entity" .= __field__entity : Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchByScope_key where
+  buildStruct _proxy
+    (SearchByScope_key __field__name __field__scope __field__language
+       __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "scope" (Thrift.getListType _proxy) 2 1
+             (Thrift.genList _proxy (Thrift.getStringType _proxy)
+                (Thrift.genText _proxy)
+                __field__scope)
+             :
+             Thrift.genField _proxy "language" (Thrift.getI32Type _proxy) 3 2
+               ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                   Thrift.fromThriftEnum)
+                  __field__language)
+               :
+               Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4 3
+                 (Thrift.buildStruct _proxy __field__entity)
+                 : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__scope <- ST.newSTRef Default.def
+            __field__language <- ST.newSTRef Default.def
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseText
+                                                                                           _proxy))
+                                                                        ST.writeSTRef __field__scope
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "Language")
+                                                                        ST.writeSTRef
+                                                                          __field__language
+                                                                          _val
+                                                                 4 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__scope <- ST.readSTRef __field__scope
+                                             !__val__language <- ST.readSTRef __field__language
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (SearchByScope_key __val__name __val__scope
+                                                  __val__language
+                                                  __val__entity)
+              _idMap
+                = HashMap.fromList
+                    [("name", 1), ("scope", 2), ("language", 3), ("entity", 4)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchByScope_key where
+  rnf
+    (SearchByScope_key __field__name __field__scope __field__language
+       __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__scope `Prelude.seq`
+          DeepSeq.rnf __field__language `Prelude.seq`
+            DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default SearchByScope_key where
+  def = SearchByScope_key "" Default.def Default.def Default.def
+
+instance Hashable.Hashable SearchByScope_key where
+  hashWithSalt __salt
+    (SearchByScope_key _name _scope _language _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
+           _language)
+        _entity
+
+data SearchByNameKindAndLanguage_key = SearchByNameKindAndLanguage_key{searchByNameKindAndLanguage_key_name
+                                                                       :: Text.Text,
+                                                                       searchByNameKindAndLanguage_key_language
+                                                                       ::
+                                                                       Glean.Schema.Code.Language,
+                                                                       searchByNameKindAndLanguage_key_kinds
+                                                                       ::
+                                                                       Prelude.Maybe
+                                                                         Glean.Schema.CodemarkupTypes.SymbolKind,
+                                                                       searchByNameKindAndLanguage_key_entity
+                                                                       :: Glean.Schema.Code.Entity}
+                                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchByNameKindAndLanguage_key where
+  toJSON
+    (SearchByNameKindAndLanguage_key __field__name __field__language
+       __field__kinds __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "language" .= __field__language :
+             Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
+               ("entity" .= __field__entity : Prelude.mempty))
+
+instance Thrift.ThriftStruct SearchByNameKindAndLanguage_key where
+  buildStruct _proxy
+    (SearchByNameKindAndLanguage_key __field__name __field__language
+       __field__kinds __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "language" (Thrift.getI32Type _proxy) 2 1
+             ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                 Thrift.fromThriftEnum)
+                __field__language)
+             :
+             let (__cereal__kinds, __id__kinds)
+                   = case __field__kinds of
+                       Prelude.Just _val -> ((:)
+                                               (Thrift.genField _proxy "kinds"
+                                                  (Thrift.getI32Type _proxy)
+                                                  3
+                                                  2
+                                                  ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                                                      Thrift.fromThriftEnum)
+                                                     _val)),
+                                             3)
+                       Prelude.Nothing -> (Prelude.id, 2)
+               in
+               __cereal__kinds
+                 (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4
+                    __id__kinds
+                    (Thrift.buildStruct _proxy __field__entity)
+                    : []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__language <- ST.newSTRef Default.def
+            __field__kinds <- ST.newSTRef Prelude.Nothing
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "Language")
+                                                                        ST.writeSTRef
+                                                                          __field__language
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "SymbolKind")
+                                                                        ST.writeSTRef __field__kinds
+                                                                          (Prelude.Just _val)
+                                                                 4 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__language <- ST.readSTRef __field__language
+                                             !__val__kinds <- ST.readSTRef __field__kinds
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (SearchByNameKindAndLanguage_key __val__name
+                                                  __val__language
+                                                  __val__kinds
+                                                  __val__entity)
+              _idMap
+                = HashMap.fromList
+                    [("name", 1), ("language", 2), ("kinds", 3), ("entity", 4)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchByNameKindAndLanguage_key where
+  rnf
+    (SearchByNameKindAndLanguage_key __field__name __field__language
+       __field__kinds __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__language `Prelude.seq`
+          DeepSeq.rnf __field__kinds `Prelude.seq`
+            DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default SearchByNameKindAndLanguage_key where
+  def
+    = SearchByNameKindAndLanguage_key "" Default.def Prelude.Nothing
+        Default.def
+
+instance Hashable.Hashable SearchByNameKindAndLanguage_key where
+  hashWithSalt __salt
+    (SearchByNameKindAndLanguage_key _name _language _kinds _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+              _language)
+           _kinds)
+        _entity
+
+data SearchByNameAndLanguage_key = SearchByNameAndLanguage_key{searchByNameAndLanguage_key_name
+                                                               :: Text.Text,
+                                                               searchByNameAndLanguage_key_language
+                                                               :: Glean.Schema.Code.Language,
+                                                               searchByNameAndLanguage_key_entity ::
+                                                               Glean.Schema.Code.Entity}
+                                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchByNameAndLanguage_key where
+  toJSON
+    (SearchByNameAndLanguage_key __field__name __field__language
+       __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "language" .= __field__language :
+             "entity" .= __field__entity : Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchByNameAndLanguage_key where
+  buildStruct _proxy
+    (SearchByNameAndLanguage_key __field__name __field__language
+       __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "language" (Thrift.getI32Type _proxy) 2 1
+             ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                 Thrift.fromThriftEnum)
+                __field__language)
+             :
+             Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 3 2
+               (Thrift.buildStruct _proxy __field__entity)
+               : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__language <- ST.newSTRef Default.def
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "Language")
+                                                                        ST.writeSTRef
+                                                                          __field__language
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__language <- ST.readSTRef __field__language
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (SearchByNameAndLanguage_key __val__name
+                                                  __val__language
+                                                  __val__entity)
+              _idMap
+                = HashMap.fromList [("name", 1), ("language", 2), ("entity", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchByNameAndLanguage_key where
+  rnf
+    (SearchByNameAndLanguage_key __field__name __field__language
+       __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__language `Prelude.seq`
+          DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default SearchByNameAndLanguage_key where
+  def = SearchByNameAndLanguage_key "" Default.def Default.def
+
+instance Hashable.Hashable SearchByNameAndLanguage_key where
+  hashWithSalt __salt
+    (SearchByNameAndLanguage_key _name _language _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+           _language)
+        _entity
+
+data SearchByLowerCaseScopeAndKind_key = SearchByLowerCaseScopeAndKind_key{searchByLowerCaseScopeAndKind_key_name
+                                                                           :: Text.Text,
+                                                                           searchByLowerCaseScopeAndKind_key_scope
+                                                                           :: [Text.Text],
+                                                                           searchByLowerCaseScopeAndKind_key_language
+                                                                           ::
+                                                                           Glean.Schema.Code.Language,
+                                                                           searchByLowerCaseScopeAndKind_key_kinds
+                                                                           ::
+                                                                           Prelude.Maybe
+                                                                             Glean.Schema.CodemarkupTypes.SymbolKind,
+                                                                           searchByLowerCaseScopeAndKind_key_entity
+                                                                           ::
+                                                                           Glean.Schema.Code.Entity}
+                                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchByLowerCaseScopeAndKind_key where
+  toJSON
+    (SearchByLowerCaseScopeAndKind_key __field__name __field__scope
+       __field__language __field__kinds __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "scope" .= __field__scope :
+             "language" .= __field__language :
+               Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
+                 ("entity" .= __field__entity : Prelude.mempty))
+
+instance Thrift.ThriftStruct SearchByLowerCaseScopeAndKind_key
+         where
+  buildStruct _proxy
+    (SearchByLowerCaseScopeAndKind_key __field__name __field__scope
+       __field__language __field__kinds __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "scope" (Thrift.getListType _proxy) 2 1
+             (Thrift.genList _proxy (Thrift.getStringType _proxy)
+                (Thrift.genText _proxy)
+                __field__scope)
+             :
+             Thrift.genField _proxy "language" (Thrift.getI32Type _proxy) 3 2
+               ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                   Thrift.fromThriftEnum)
+                  __field__language)
+               :
+               let (__cereal__kinds, __id__kinds)
+                     = case __field__kinds of
+                         Prelude.Just _val -> ((:)
+                                                 (Thrift.genField _proxy "kinds"
+                                                    (Thrift.getI32Type _proxy)
+                                                    4
+                                                    3
+                                                    ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                                                        Thrift.fromThriftEnum)
+                                                       _val)),
+                                               4)
+                         Prelude.Nothing -> (Prelude.id, 3)
+                 in
+                 __cereal__kinds
+                   (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 5
+                      __id__kinds
+                      (Thrift.buildStruct _proxy __field__entity)
+                      : []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__scope <- ST.newSTRef Default.def
+            __field__language <- ST.newSTRef Default.def
+            __field__kinds <- ST.newSTRef Prelude.Nothing
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseText
+                                                                                           _proxy))
+                                                                        ST.writeSTRef __field__scope
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "Language")
+                                                                        ST.writeSTRef
+                                                                          __field__language
+                                                                          _val
+                                                                 4 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "SymbolKind")
+                                                                        ST.writeSTRef __field__kinds
+                                                                          (Prelude.Just _val)
+                                                                 5 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__scope <- ST.readSTRef __field__scope
+                                             !__val__language <- ST.readSTRef __field__language
+                                             !__val__kinds <- ST.readSTRef __field__kinds
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (SearchByLowerCaseScopeAndKind_key __val__name
+                                                  __val__scope
+                                                  __val__language
+                                                  __val__kinds
+                                                  __val__entity)
+              _idMap
+                = HashMap.fromList
+                    [("name", 1), ("scope", 2), ("language", 3), ("kinds", 4),
+                     ("entity", 5)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchByLowerCaseScopeAndKind_key where
+  rnf
+    (SearchByLowerCaseScopeAndKind_key __field__name __field__scope
+       __field__language __field__kinds __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__scope `Prelude.seq`
+          DeepSeq.rnf __field__language `Prelude.seq`
+            DeepSeq.rnf __field__kinds `Prelude.seq`
+              DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default SearchByLowerCaseScopeAndKind_key where
+  def
+    = SearchByLowerCaseScopeAndKind_key "" Default.def Default.def
+        Prelude.Nothing
+        Default.def
+
+instance Hashable.Hashable SearchByLowerCaseScopeAndKind_key where
+  hashWithSalt __salt
+    (SearchByLowerCaseScopeAndKind_key _name _scope _language _kinds
+       _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt
+              (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
+              _language)
+           _kinds)
+        _entity
+
+data SearchByLowerCaseScope_key = SearchByLowerCaseScope_key{searchByLowerCaseScope_key_name
+                                                             :: Text.Text,
+                                                             searchByLowerCaseScope_key_scope ::
+                                                             [Text.Text],
+                                                             searchByLowerCaseScope_key_language ::
+                                                             Glean.Schema.Code.Language,
+                                                             searchByLowerCaseScope_key_entity ::
+                                                             Glean.Schema.Code.Entity}
+                                  deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchByLowerCaseScope_key where
+  toJSON
+    (SearchByLowerCaseScope_key __field__name __field__scope
+       __field__language __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "scope" .= __field__scope :
+             "language" .= __field__language :
+               "entity" .= __field__entity : Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchByLowerCaseScope_key where
+  buildStruct _proxy
+    (SearchByLowerCaseScope_key __field__name __field__scope
+       __field__language __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "scope" (Thrift.getListType _proxy) 2 1
+             (Thrift.genList _proxy (Thrift.getStringType _proxy)
+                (Thrift.genText _proxy)
+                __field__scope)
+             :
+             Thrift.genField _proxy "language" (Thrift.getI32Type _proxy) 3 2
+               ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                   Thrift.fromThriftEnum)
+                  __field__language)
+               :
+               Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4 3
+                 (Thrift.buildStruct _proxy __field__entity)
+                 : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__scope <- ST.newSTRef Default.def
+            __field__language <- ST.newSTRef Default.def
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseText
+                                                                                           _proxy))
+                                                                        ST.writeSTRef __field__scope
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "Language")
+                                                                        ST.writeSTRef
+                                                                          __field__language
+                                                                          _val
+                                                                 4 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__scope <- ST.readSTRef __field__scope
+                                             !__val__language <- ST.readSTRef __field__language
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (SearchByLowerCaseScope_key __val__name __val__scope
+                                                  __val__language
+                                                  __val__entity)
+              _idMap
+                = HashMap.fromList
+                    [("name", 1), ("scope", 2), ("language", 3), ("entity", 4)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchByLowerCaseScope_key where
+  rnf
+    (SearchByLowerCaseScope_key __field__name __field__scope
+       __field__language __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__scope `Prelude.seq`
+          DeepSeq.rnf __field__language `Prelude.seq`
+            DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default SearchByLowerCaseScope_key where
+  def
+    = SearchByLowerCaseScope_key "" Default.def Default.def Default.def
+
+instance Hashable.Hashable SearchByLowerCaseScope_key where
+  hashWithSalt __salt
+    (SearchByLowerCaseScope_key _name _scope _language _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
+           _language)
+        _entity
+
+data SearchByLowerCaseNameKindAndLanguage_key = SearchByLowerCaseNameKindAndLanguage_key{searchByLowerCaseNameKindAndLanguage_key_name
+                                                                                         ::
+                                                                                         Text.Text,
+                                                                                         searchByLowerCaseNameKindAndLanguage_key_language
+                                                                                         ::
+                                                                                         Glean.Schema.Code.Language,
+                                                                                         searchByLowerCaseNameKindAndLanguage_key_kinds
+                                                                                         ::
+                                                                                         Prelude.Maybe
+                                                                                           Glean.Schema.CodemarkupTypes.SymbolKind,
+                                                                                         searchByLowerCaseNameKindAndLanguage_key_entity
+                                                                                         ::
+                                                                                         Glean.Schema.Code.Entity}
+                                                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchByLowerCaseNameKindAndLanguage_key
+         where
+  toJSON
+    (SearchByLowerCaseNameKindAndLanguage_key __field__name
+       __field__language __field__kinds __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "language" .= __field__language :
+             Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
+               ("entity" .= __field__entity : Prelude.mempty))
+
+instance Thrift.ThriftStruct
+           SearchByLowerCaseNameKindAndLanguage_key
+         where
+  buildStruct _proxy
+    (SearchByLowerCaseNameKindAndLanguage_key __field__name
+       __field__language __field__kinds __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "language" (Thrift.getI32Type _proxy) 2 1
+             ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                 Thrift.fromThriftEnum)
+                __field__language)
+             :
+             let (__cereal__kinds, __id__kinds)
+                   = case __field__kinds of
+                       Prelude.Just _val -> ((:)
+                                               (Thrift.genField _proxy "kinds"
+                                                  (Thrift.getI32Type _proxy)
+                                                  3
+                                                  2
+                                                  ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                                                      Thrift.fromThriftEnum)
+                                                     _val)),
+                                             3)
+                       Prelude.Nothing -> (Prelude.id, 2)
+               in
+               __cereal__kinds
+                 (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4
+                    __id__kinds
+                    (Thrift.buildStruct _proxy __field__entity)
+                    : []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__language <- ST.newSTRef Default.def
+            __field__kinds <- ST.newSTRef Prelude.Nothing
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "Language")
+                                                                        ST.writeSTRef
+                                                                          __field__language
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "SymbolKind")
+                                                                        ST.writeSTRef __field__kinds
+                                                                          (Prelude.Just _val)
+                                                                 4 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__language <- ST.readSTRef __field__language
+                                             !__val__kinds <- ST.readSTRef __field__kinds
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (SearchByLowerCaseNameKindAndLanguage_key __val__name
+                                                  __val__language
+                                                  __val__kinds
+                                                  __val__entity)
+              _idMap
+                = HashMap.fromList
+                    [("name", 1), ("language", 2), ("kinds", 3), ("entity", 4)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchByLowerCaseNameKindAndLanguage_key
+         where
+  rnf
+    (SearchByLowerCaseNameKindAndLanguage_key __field__name
+       __field__language __field__kinds __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__language `Prelude.seq`
+          DeepSeq.rnf __field__kinds `Prelude.seq`
+            DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default SearchByLowerCaseNameKindAndLanguage_key
+         where
+  def
+    = SearchByLowerCaseNameKindAndLanguage_key "" Default.def
+        Prelude.Nothing
+        Default.def
+
+instance Hashable.Hashable SearchByLowerCaseNameKindAndLanguage_key
+         where
+  hashWithSalt __salt
+    (SearchByLowerCaseNameKindAndLanguage_key _name _language _kinds
+       _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+              _language)
+           _kinds)
+        _entity
+
+data SearchByLowerCaseNameAndLanguage_key = SearchByLowerCaseNameAndLanguage_key{searchByLowerCaseNameAndLanguage_key_name
+                                                                                 :: Text.Text,
+                                                                                 searchByLowerCaseNameAndLanguage_key_language
+                                                                                 ::
+                                                                                 Glean.Schema.Code.Language,
+                                                                                 searchByLowerCaseNameAndLanguage_key_entity
+                                                                                 ::
+                                                                                 Glean.Schema.Code.Entity}
+                                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON SearchByLowerCaseNameAndLanguage_key where
+  toJSON
+    (SearchByLowerCaseNameAndLanguage_key __field__name
+       __field__language __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "language" .= __field__language :
+             "entity" .= __field__entity : Prelude.mempty)
+
+instance Thrift.ThriftStruct SearchByLowerCaseNameAndLanguage_key
+         where
+  buildStruct _proxy
+    (SearchByLowerCaseNameAndLanguage_key __field__name
+       __field__language __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "language" (Thrift.getI32Type _proxy) 2 1
+             ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                 Thrift.fromThriftEnum)
+                __field__language)
+             :
+             Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 3 2
+               (Thrift.buildStruct _proxy __field__entity)
+               : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__language <- ST.newSTRef Default.def
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "Language")
+                                                                        ST.writeSTRef
+                                                                          __field__language
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__language <- ST.readSTRef __field__language
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (SearchByLowerCaseNameAndLanguage_key __val__name
+                                                  __val__language
+                                                  __val__entity)
+              _idMap
+                = HashMap.fromList [("name", 1), ("language", 2), ("entity", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData SearchByLowerCaseNameAndLanguage_key where
+  rnf
+    (SearchByLowerCaseNameAndLanguage_key __field__name
+       __field__language __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__language `Prelude.seq`
+          DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default SearchByLowerCaseNameAndLanguage_key where
+  def
+    = SearchByLowerCaseNameAndLanguage_key "" Default.def Default.def
+
+instance Hashable.Hashable SearchByLowerCaseNameAndLanguage_key
+         where
+  hashWithSalt __salt
+    (SearchByLowerCaseNameAndLanguage_key _name _language _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+           _language)
+        _entity
+
+data RustSearchByNameAndKind_key = RustSearchByNameAndKind_key{rustSearchByNameAndKind_key_name
+                                                               :: Text.Text,
+                                                               rustSearchByNameAndKind_key_kind ::
+                                                               Prelude.Maybe
+                                                                 Glean.Schema.CodemarkupTypes.SymbolKind,
+                                                               rustSearchByNameAndKind_key_entity ::
+                                                               Glean.Schema.Code.Entity}
+                                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON RustSearchByNameAndKind_key where
+  toJSON
+    (RustSearchByNameAndKind_key __field__name __field__kind
+       __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           Prelude.maybe Prelude.id ((:) . ("kind" .=)) __field__kind
+             ("entity" .= __field__entity : Prelude.mempty))
+
+instance Thrift.ThriftStruct RustSearchByNameAndKind_key where
+  buildStruct _proxy
+    (RustSearchByNameAndKind_key __field__name __field__kind
+       __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           let (__cereal__kind, __id__kind)
+                 = case __field__kind of
+                     Prelude.Just _val -> ((:)
+                                             (Thrift.genField _proxy "kind"
+                                                (Thrift.getI32Type _proxy)
+                                                2
+                                                1
+                                                ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                                                    Thrift.fromThriftEnum)
+                                                   _val)),
+                                           2)
+                     Prelude.Nothing -> (Prelude.id, 1)
+             in
+             __cereal__kind
+               (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 3
+                  __id__kind
+                  (Thrift.buildStruct _proxy __field__entity)
+                  : []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__kind <- ST.newSTRef Prelude.Nothing
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "SymbolKind")
+                                                                        ST.writeSTRef __field__kind
+                                                                          (Prelude.Just _val)
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__kind <- ST.readSTRef __field__kind
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (RustSearchByNameAndKind_key __val__name __val__kind
+                                                  __val__entity)
+              _idMap = HashMap.fromList [("name", 1), ("kind", 2), ("entity", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData RustSearchByNameAndKind_key where
+  rnf
+    (RustSearchByNameAndKind_key __field__name __field__kind
+       __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__kind `Prelude.seq`
+          DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default RustSearchByNameAndKind_key where
+  def = RustSearchByNameAndKind_key "" Prelude.Nothing Default.def
+
+instance Hashable.Hashable RustSearchByNameAndKind_key where
+  hashWithSalt __salt
+    (RustSearchByNameAndKind_key _name _kind _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _kind)
+        _entity
+
+data RustSearchByLowerCaseNameAndKind_key = RustSearchByLowerCaseNameAndKind_key{rustSearchByLowerCaseNameAndKind_key_name
+                                                                                 :: Text.Text,
+                                                                                 rustSearchByLowerCaseNameAndKind_key_kind
+                                                                                 ::
+                                                                                 Prelude.Maybe
+                                                                                   Glean.Schema.CodemarkupTypes.SymbolKind,
+                                                                                 rustSearchByLowerCaseNameAndKind_key_entity
+                                                                                 ::
+                                                                                 Glean.Schema.Code.Entity}
+                                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON RustSearchByLowerCaseNameAndKind_key where
+  toJSON
+    (RustSearchByLowerCaseNameAndKind_key __field__name __field__kind
+       __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           Prelude.maybe Prelude.id ((:) . ("kind" .=)) __field__kind
+             ("entity" .= __field__entity : Prelude.mempty))
+
+instance Thrift.ThriftStruct RustSearchByLowerCaseNameAndKind_key
+         where
+  buildStruct _proxy
+    (RustSearchByLowerCaseNameAndKind_key __field__name __field__kind
+       __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           let (__cereal__kind, __id__kind)
+                 = case __field__kind of
+                     Prelude.Just _val -> ((:)
+                                             (Thrift.genField _proxy "kind"
+                                                (Thrift.getI32Type _proxy)
+                                                2
+                                                1
+                                                ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                                                    Thrift.fromThriftEnum)
+                                                   _val)),
+                                           2)
+                     Prelude.Nothing -> (Prelude.id, 1)
+             in
+             __cereal__kind
+               (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 3
+                  __id__kind
+                  (Thrift.buildStruct _proxy __field__entity)
+                  : []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__kind <- ST.newSTRef Prelude.Nothing
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "SymbolKind")
+                                                                        ST.writeSTRef __field__kind
+                                                                          (Prelude.Just _val)
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__kind <- ST.readSTRef __field__kind
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (RustSearchByLowerCaseNameAndKind_key __val__name
+                                                  __val__kind
+                                                  __val__entity)
+              _idMap = HashMap.fromList [("name", 1), ("kind", 2), ("entity", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData RustSearchByLowerCaseNameAndKind_key where
+  rnf
+    (RustSearchByLowerCaseNameAndKind_key __field__name __field__kind
+       __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__kind `Prelude.seq`
+          DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default RustSearchByLowerCaseNameAndKind_key where
+  def
+    = RustSearchByLowerCaseNameAndKind_key "" Prelude.Nothing
+        Default.def
+
+instance Hashable.Hashable RustSearchByLowerCaseNameAndKind_key
+         where
+  hashWithSalt __salt
+    (RustSearchByLowerCaseNameAndKind_key _name _kind _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _kind)
+        _entity
+
+data PythonSearchByScopeAndKind_key = PythonSearchByScopeAndKind_key{pythonSearchByScopeAndKind_key_name
+                                                                     :: Text.Text,
+                                                                     pythonSearchByScopeAndKind_key_scope
+                                                                     :: [Text.Text],
+                                                                     pythonSearchByScopeAndKind_key_kinds
+                                                                     ::
+                                                                     Prelude.Maybe
+                                                                       Glean.Schema.CodemarkupTypes.SymbolKind,
+                                                                     pythonSearchByScopeAndKind_key_entity
+                                                                     :: Glean.Schema.Code.Entity}
+                                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON PythonSearchByScopeAndKind_key where
+  toJSON
+    (PythonSearchByScopeAndKind_key __field__name __field__scope
+       __field__kinds __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "scope" .= __field__scope :
+             Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
+               ("entity" .= __field__entity : Prelude.mempty))
+
+instance Thrift.ThriftStruct PythonSearchByScopeAndKind_key where
+  buildStruct _proxy
+    (PythonSearchByScopeAndKind_key __field__name __field__scope
+       __field__kinds __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "scope" (Thrift.getListType _proxy) 2 1
+             (Thrift.genList _proxy (Thrift.getStringType _proxy)
+                (Thrift.genText _proxy)
+                __field__scope)
+             :
+             let (__cereal__kinds, __id__kinds)
+                   = case __field__kinds of
+                       Prelude.Just _val -> ((:)
+                                               (Thrift.genField _proxy "kinds"
+                                                  (Thrift.getI32Type _proxy)
+                                                  3
+                                                  2
+                                                  ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                                                      Thrift.fromThriftEnum)
+                                                     _val)),
+                                             3)
+                       Prelude.Nothing -> (Prelude.id, 2)
+               in
+               __cereal__kinds
+                 (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4
+                    __id__kinds
+                    (Thrift.buildStruct _proxy __field__entity)
+                    : []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__scope <- ST.newSTRef Default.def
+            __field__kinds <- ST.newSTRef Prelude.Nothing
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseText
+                                                                                           _proxy))
+                                                                        ST.writeSTRef __field__scope
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "SymbolKind")
+                                                                        ST.writeSTRef __field__kinds
+                                                                          (Prelude.Just _val)
+                                                                 4 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__scope <- ST.readSTRef __field__scope
+                                             !__val__kinds <- ST.readSTRef __field__kinds
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (PythonSearchByScopeAndKind_key __val__name
+                                                  __val__scope
+                                                  __val__kinds
+                                                  __val__entity)
+              _idMap
+                = HashMap.fromList
+                    [("name", 1), ("scope", 2), ("kinds", 3), ("entity", 4)]
+            _parse 0)
+
+instance DeepSeq.NFData PythonSearchByScopeAndKind_key where
+  rnf
+    (PythonSearchByScopeAndKind_key __field__name __field__scope
+       __field__kinds __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__scope `Prelude.seq`
+          DeepSeq.rnf __field__kinds `Prelude.seq`
+            DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default PythonSearchByScopeAndKind_key where
+  def
+    = PythonSearchByScopeAndKind_key "" Default.def Prelude.Nothing
+        Default.def
+
+instance Hashable.Hashable PythonSearchByScopeAndKind_key where
+  hashWithSalt __salt
+    (PythonSearchByScopeAndKind_key _name _scope _kinds _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
+           _kinds)
+        _entity
+
+data PythonSearchByNameKindAndScopeFact_key = PythonSearchByNameKindAndScopeFact_key{pythonSearchByNameKindAndScopeFact_key_name
+                                                                                     :: Text.Text,
+                                                                                     pythonSearchByNameKindAndScopeFact_key_scope
+                                                                                     ::
+                                                                                     Prelude.Maybe
+                                                                                       Glean.Schema.Python.SName,
+                                                                                     pythonSearchByNameKindAndScopeFact_key_kinds
+                                                                                     ::
+                                                                                     Prelude.Maybe
+                                                                                       Glean.Schema.CodemarkupTypes.SymbolKind,
+                                                                                     pythonSearchByNameKindAndScopeFact_key_entity
+                                                                                     ::
+                                                                                     Glean.Schema.Code.Entity}
+                                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON PythonSearchByNameKindAndScopeFact_key where
+  toJSON
+    (PythonSearchByNameKindAndScopeFact_key __field__name
+       __field__scope __field__kinds __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           Prelude.maybe Prelude.id ((:) . ("scope" .=)) __field__scope
+             (Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
+                ("entity" .= __field__entity : Prelude.mempty)))
+
+instance Thrift.ThriftStruct PythonSearchByNameKindAndScopeFact_key
+         where
+  buildStruct _proxy
+    (PythonSearchByNameKindAndScopeFact_key __field__name
+       __field__scope __field__kinds __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           let (__cereal__scope, __id__scope)
+                 = case __field__scope of
+                     Prelude.Just _val -> ((:)
+                                             (Thrift.genField _proxy "scope"
+                                                (Thrift.getStructType _proxy)
+                                                2
+                                                1
+                                                (Thrift.buildStruct _proxy _val)),
+                                           2)
+                     Prelude.Nothing -> (Prelude.id, 1)
+             in
+             __cereal__scope
+               (let (__cereal__kinds, __id__kinds)
+                      = case __field__kinds of
+                          Prelude.Just _val -> ((:)
+                                                  (Thrift.genField _proxy "kinds"
+                                                     (Thrift.getI32Type _proxy)
+                                                     3
+                                                     __id__scope
+                                                     ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                                                         Thrift.fromThriftEnum)
+                                                        _val)),
+                                                3)
+                          Prelude.Nothing -> (Prelude.id, __id__scope)
+                  in
+                  __cereal__kinds
+                    (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4
+                       __id__kinds
+                       (Thrift.buildStruct _proxy __field__entity)
+                       : [])))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__scope <- ST.newSTRef Prelude.Nothing
+            __field__kinds <- ST.newSTRef Prelude.Nothing
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__scope
+                                                                          (Prelude.Just _val)
+                                                                 3 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "SymbolKind")
+                                                                        ST.writeSTRef __field__kinds
+                                                                          (Prelude.Just _val)
+                                                                 4 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__scope <- ST.readSTRef __field__scope
+                                             !__val__kinds <- ST.readSTRef __field__kinds
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (PythonSearchByNameKindAndScopeFact_key __val__name
+                                                  __val__scope
+                                                  __val__kinds
+                                                  __val__entity)
+              _idMap
+                = HashMap.fromList
+                    [("name", 1), ("scope", 2), ("kinds", 3), ("entity", 4)]
+            _parse 0)
+
+instance DeepSeq.NFData PythonSearchByNameKindAndScopeFact_key
+         where
+  rnf
+    (PythonSearchByNameKindAndScopeFact_key __field__name
+       __field__scope __field__kinds __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__scope `Prelude.seq`
+          DeepSeq.rnf __field__kinds `Prelude.seq`
+            DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default PythonSearchByNameKindAndScopeFact_key
+         where
+  def
+    = PythonSearchByNameKindAndScopeFact_key "" Prelude.Nothing
+        Prelude.Nothing
+        Default.def
+
+instance Hashable.Hashable PythonSearchByNameKindAndScopeFact_key
+         where
+  hashWithSalt __salt
+    (PythonSearchByNameKindAndScopeFact_key _name _scope _kinds
+       _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
+           _kinds)
+        _entity
+
+data PythonSearchByLowerCaseScopeAndKind_key = PythonSearchByLowerCaseScopeAndKind_key{pythonSearchByLowerCaseScopeAndKind_key_name
+                                                                                       :: Text.Text,
+                                                                                       pythonSearchByLowerCaseScopeAndKind_key_scope
+                                                                                       ::
+                                                                                       [Text.Text],
+                                                                                       pythonSearchByLowerCaseScopeAndKind_key_kinds
+                                                                                       ::
+                                                                                       Prelude.Maybe
+                                                                                         Glean.Schema.CodemarkupTypes.SymbolKind,
+                                                                                       pythonSearchByLowerCaseScopeAndKind_key_entity
+                                                                                       ::
+                                                                                       Glean.Schema.Code.Entity}
+                                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON PythonSearchByLowerCaseScopeAndKind_key where
+  toJSON
+    (PythonSearchByLowerCaseScopeAndKind_key __field__name
+       __field__scope __field__kinds __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "scope" .= __field__scope :
+             Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
+               ("entity" .= __field__entity : Prelude.mempty))
+
+instance Thrift.ThriftStruct
+           PythonSearchByLowerCaseScopeAndKind_key
+         where
+  buildStruct _proxy
+    (PythonSearchByLowerCaseScopeAndKind_key __field__name
+       __field__scope __field__kinds __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "scope" (Thrift.getListType _proxy) 2 1
+             (Thrift.genList _proxy (Thrift.getStringType _proxy)
+                (Thrift.genText _proxy)
+                __field__scope)
+             :
+             let (__cereal__kinds, __id__kinds)
+                   = case __field__kinds of
+                       Prelude.Just _val -> ((:)
+                                               (Thrift.genField _proxy "kinds"
+                                                  (Thrift.getI32Type _proxy)
+                                                  3
+                                                  2
+                                                  ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                                                      Thrift.fromThriftEnum)
+                                                     _val)),
+                                             3)
+                       Prelude.Nothing -> (Prelude.id, 2)
+               in
+               __cereal__kinds
+                 (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4
+                    __id__kinds
+                    (Thrift.buildStruct _proxy __field__entity)
+                    : []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__scope <- ST.newSTRef Default.def
+            __field__kinds <- ST.newSTRef Prelude.Nothing
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseText
+                                                                                           _proxy))
+                                                                        ST.writeSTRef __field__scope
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "SymbolKind")
+                                                                        ST.writeSTRef __field__kinds
+                                                                          (Prelude.Just _val)
+                                                                 4 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__scope <- ST.readSTRef __field__scope
+                                             !__val__kinds <- ST.readSTRef __field__kinds
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (PythonSearchByLowerCaseScopeAndKind_key __val__name
+                                                  __val__scope
+                                                  __val__kinds
+                                                  __val__entity)
+              _idMap
+                = HashMap.fromList
+                    [("name", 1), ("scope", 2), ("kinds", 3), ("entity", 4)]
+            _parse 0)
+
+instance DeepSeq.NFData PythonSearchByLowerCaseScopeAndKind_key
+         where
+  rnf
+    (PythonSearchByLowerCaseScopeAndKind_key __field__name
+       __field__scope __field__kinds __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__scope `Prelude.seq`
+          DeepSeq.rnf __field__kinds `Prelude.seq`
+            DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default PythonSearchByLowerCaseScopeAndKind_key
+         where
+  def
+    = PythonSearchByLowerCaseScopeAndKind_key "" Default.def
+        Prelude.Nothing
+        Default.def
+
+instance Hashable.Hashable PythonSearchByLowerCaseScopeAndKind_key
+         where
+  hashWithSalt __salt
+    (PythonSearchByLowerCaseScopeAndKind_key _name _scope _kinds
+       _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
+           _kinds)
+        _entity
+
+data PythonSearchByLowerCaseNameKindAndScopeFact_key = PythonSearchByLowerCaseNameKindAndScopeFact_key{pythonSearchByLowerCaseNameKindAndScopeFact_key_name
+                                                                                                       ::
+                                                                                                       Text.Text,
+                                                                                                       pythonSearchByLowerCaseNameKindAndScopeFact_key_scope
+                                                                                                       ::
+                                                                                                       Prelude.Maybe
+                                                                                                         Glean.Schema.Python.SName,
+                                                                                                       pythonSearchByLowerCaseNameKindAndScopeFact_key_kinds
+                                                                                                       ::
+                                                                                                       Prelude.Maybe
+                                                                                                         Glean.Schema.CodemarkupTypes.SymbolKind,
+                                                                                                       pythonSearchByLowerCaseNameKindAndScopeFact_key_entity
+                                                                                                       ::
+                                                                                                       Glean.Schema.Code.Entity}
+                                                       deriving (Prelude.Eq, Prelude.Show,
+                                                                 Prelude.Ord)
+
+instance Aeson.ToJSON
+           PythonSearchByLowerCaseNameKindAndScopeFact_key
+         where
+  toJSON
+    (PythonSearchByLowerCaseNameKindAndScopeFact_key __field__name
+       __field__scope __field__kinds __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           Prelude.maybe Prelude.id ((:) . ("scope" .=)) __field__scope
+             (Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
+                ("entity" .= __field__entity : Prelude.mempty)))
+
+instance Thrift.ThriftStruct
+           PythonSearchByLowerCaseNameKindAndScopeFact_key
+         where
+  buildStruct _proxy
+    (PythonSearchByLowerCaseNameKindAndScopeFact_key __field__name
+       __field__scope __field__kinds __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           let (__cereal__scope, __id__scope)
+                 = case __field__scope of
+                     Prelude.Just _val -> ((:)
+                                             (Thrift.genField _proxy "scope"
+                                                (Thrift.getStructType _proxy)
+                                                2
+                                                1
+                                                (Thrift.buildStruct _proxy _val)),
+                                           2)
+                     Prelude.Nothing -> (Prelude.id, 1)
+             in
+             __cereal__scope
+               (let (__cereal__kinds, __id__kinds)
+                      = case __field__kinds of
+                          Prelude.Just _val -> ((:)
+                                                  (Thrift.genField _proxy "kinds"
+                                                     (Thrift.getI32Type _proxy)
+                                                     3
+                                                     __id__scope
+                                                     ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                                                         Thrift.fromThriftEnum)
+                                                        _val)),
+                                                3)
+                          Prelude.Nothing -> (Prelude.id, __id__scope)
+                  in
+                  __cereal__kinds
+                    (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4
+                       __id__kinds
+                       (Thrift.buildStruct _proxy __field__entity)
+                       : [])))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__scope <- ST.newSTRef Prelude.Nothing
+            __field__kinds <- ST.newSTRef Prelude.Nothing
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__scope
+                                                                          (Prelude.Just _val)
+                                                                 3 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "SymbolKind")
+                                                                        ST.writeSTRef __field__kinds
+                                                                          (Prelude.Just _val)
+                                                                 4 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__scope <- ST.readSTRef __field__scope
+                                             !__val__kinds <- ST.readSTRef __field__kinds
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (PythonSearchByLowerCaseNameKindAndScopeFact_key
+                                                  __val__name
+                                                  __val__scope
+                                                  __val__kinds
+                                                  __val__entity)
+              _idMap
+                = HashMap.fromList
+                    [("name", 1), ("scope", 2), ("kinds", 3), ("entity", 4)]
+            _parse 0)
+
+instance DeepSeq.NFData
+           PythonSearchByLowerCaseNameKindAndScopeFact_key
+         where
+  rnf
+    (PythonSearchByLowerCaseNameKindAndScopeFact_key __field__name
+       __field__scope __field__kinds __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__scope `Prelude.seq`
+          DeepSeq.rnf __field__kinds `Prelude.seq`
+            DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default
+           PythonSearchByLowerCaseNameKindAndScopeFact_key
+         where
+  def
+    = PythonSearchByLowerCaseNameKindAndScopeFact_key ""
+        Prelude.Nothing
+        Prelude.Nothing
+        Default.def
+
+instance Hashable.Hashable
+           PythonSearchByLowerCaseNameKindAndScopeFact_key
+         where
+  hashWithSalt __salt
+    (PythonSearchByLowerCaseNameKindAndScopeFact_key _name _scope
+       _kinds _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
+           _kinds)
+        _entity
+
+data PythonNameLowerCase_key = PythonNameLowerCase_key{pythonNameLowerCase_key_nameLowercase
+                                                       :: Text.Text,
+                                                       pythonNameLowerCase_key_kinds ::
+                                                       Prelude.Maybe
+                                                         Glean.Schema.CodemarkupTypes.SymbolKind,
+                                                       pythonNameLowerCase_key_name :: Text.Text}
+                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON PythonNameLowerCase_key where
+  toJSON
+    (PythonNameLowerCase_key __field__nameLowercase __field__kinds
+       __field__name)
+    = Aeson.object
+        ("nameLowercase" .= __field__nameLowercase :
+           Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
+             ("name" .= __field__name : Prelude.mempty))
+
+instance Thrift.ThriftStruct PythonNameLowerCase_key where
+  buildStruct _proxy
+    (PythonNameLowerCase_key __field__nameLowercase __field__kinds
+       __field__name)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "nameLowercase"
+           (Thrift.getStringType _proxy)
+           1
+           0
+           (Thrift.genText _proxy __field__nameLowercase)
+           :
+           let (__cereal__kinds, __id__kinds)
+                 = case __field__kinds of
+                     Prelude.Just _val -> ((:)
+                                             (Thrift.genField _proxy "kinds"
+                                                (Thrift.getI32Type _proxy)
+                                                2
+                                                1
+                                                ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                                                    Thrift.fromThriftEnum)
+                                                   _val)),
+                                           2)
+                     Prelude.Nothing -> (Prelude.id, 1)
+             in
+             __cereal__kinds
+               (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 3
+                  __id__kinds
+                  (Thrift.genText _proxy __field__name)
+                  : []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__nameLowercase <- ST.newSTRef ""
+            __field__kinds <- ST.newSTRef Prelude.Nothing
+            __field__name <- ST.newSTRef ""
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__nameLowercase
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "SymbolKind")
+                                                                        ST.writeSTRef __field__kinds
+                                                                          (Prelude.Just _val)
+                                                                 3 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__nameLowercase <- ST.readSTRef
+                                                                        __field__nameLowercase
+                                             !__val__kinds <- ST.readSTRef __field__kinds
+                                             !__val__name <- ST.readSTRef __field__name
+                                             Prelude.pure
+                                               (PythonNameLowerCase_key __val__nameLowercase
+                                                  __val__kinds
+                                                  __val__name)
+              _idMap
+                = HashMap.fromList
+                    [("nameLowercase", 1), ("kinds", 2), ("name", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData PythonNameLowerCase_key where
+  rnf
+    (PythonNameLowerCase_key __field__nameLowercase __field__kinds
+       __field__name)
+    = DeepSeq.rnf __field__nameLowercase `Prelude.seq`
+        DeepSeq.rnf __field__kinds `Prelude.seq`
+          DeepSeq.rnf __field__name `Prelude.seq` ()
+
+instance Default.Default PythonNameLowerCase_key where
+  def = PythonNameLowerCase_key "" Prelude.Nothing ""
+
+instance Hashable.Hashable PythonNameLowerCase_key where
+  hashWithSalt __salt
+    (PythonNameLowerCase_key _nameLowercase _kinds _name)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt __salt _nameLowercase)
+           _kinds)
+        _name
+
+data PpSearchByNameKind_key = PpSearchByNameKind_key{ppSearchByNameKind_key_name
+                                                     :: Text.Text,
+                                                     ppSearchByNameKind_key_kinds ::
+                                                     Prelude.Maybe
+                                                       Glean.Schema.CodemarkupTypes.SymbolKind,
+                                                     ppSearchByNameKind_key_entity ::
+                                                     Glean.Schema.Code.Entity}
+                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON PpSearchByNameKind_key where
+  toJSON
+    (PpSearchByNameKind_key __field__name __field__kinds
+       __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
+             ("entity" .= __field__entity : Prelude.mempty))
+
+instance Thrift.ThriftStruct PpSearchByNameKind_key where
+  buildStruct _proxy
+    (PpSearchByNameKind_key __field__name __field__kinds
+       __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           let (__cereal__kinds, __id__kinds)
+                 = case __field__kinds of
+                     Prelude.Just _val -> ((:)
+                                             (Thrift.genField _proxy "kinds"
+                                                (Thrift.getI32Type _proxy)
+                                                2
+                                                1
+                                                ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                                                    Thrift.fromThriftEnum)
+                                                   _val)),
+                                           2)
+                     Prelude.Nothing -> (Prelude.id, 1)
+             in
+             __cereal__kinds
+               (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 3
+                  __id__kinds
+                  (Thrift.buildStruct _proxy __field__entity)
+                  : []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__kinds <- ST.newSTRef Prelude.Nothing
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "SymbolKind")
+                                                                        ST.writeSTRef __field__kinds
+                                                                          (Prelude.Just _val)
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__kinds <- ST.readSTRef __field__kinds
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (PpSearchByNameKind_key __val__name __val__kinds
+                                                  __val__entity)
+              _idMap
+                = HashMap.fromList [("name", 1), ("kinds", 2), ("entity", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData PpSearchByNameKind_key where
+  rnf
+    (PpSearchByNameKind_key __field__name __field__kinds
+       __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__kinds `Prelude.seq`
+          DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default PpSearchByNameKind_key where
+  def = PpSearchByNameKind_key "" Prelude.Nothing Default.def
+
+instance Hashable.Hashable PpSearchByNameKind_key where
+  hashWithSalt __salt (PpSearchByNameKind_key _name _kinds _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _kinds)
+        _entity
+
+data PpSearchByLowerCaseNameKind_key = PpSearchByLowerCaseNameKind_key{ppSearchByLowerCaseNameKind_key_name
+                                                                       :: Text.Text,
+                                                                       ppSearchByLowerCaseNameKind_key_kinds
+                                                                       ::
+                                                                       Prelude.Maybe
+                                                                         Glean.Schema.CodemarkupTypes.SymbolKind,
+                                                                       ppSearchByLowerCaseNameKind_key_entity
+                                                                       :: Glean.Schema.Code.Entity}
+                                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON PpSearchByLowerCaseNameKind_key where
+  toJSON
+    (PpSearchByLowerCaseNameKind_key __field__name __field__kinds
+       __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
+             ("entity" .= __field__entity : Prelude.mempty))
+
+instance Thrift.ThriftStruct PpSearchByLowerCaseNameKind_key where
+  buildStruct _proxy
+    (PpSearchByLowerCaseNameKind_key __field__name __field__kinds
+       __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           let (__cereal__kinds, __id__kinds)
+                 = case __field__kinds of
+                     Prelude.Just _val -> ((:)
+                                             (Thrift.genField _proxy "kinds"
+                                                (Thrift.getI32Type _proxy)
+                                                2
+                                                1
+                                                ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                                                    Thrift.fromThriftEnum)
+                                                   _val)),
+                                           2)
+                     Prelude.Nothing -> (Prelude.id, 1)
+             in
+             __cereal__kinds
+               (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 3
+                  __id__kinds
+                  (Thrift.buildStruct _proxy __field__entity)
+                  : []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__kinds <- ST.newSTRef Prelude.Nothing
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "SymbolKind")
+                                                                        ST.writeSTRef __field__kinds
+                                                                          (Prelude.Just _val)
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__kinds <- ST.readSTRef __field__kinds
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (PpSearchByLowerCaseNameKind_key __val__name
+                                                  __val__kinds
+                                                  __val__entity)
+              _idMap
+                = HashMap.fromList [("name", 1), ("kinds", 2), ("entity", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData PpSearchByLowerCaseNameKind_key where
+  rnf
+    (PpSearchByLowerCaseNameKind_key __field__name __field__kinds
+       __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__kinds `Prelude.seq`
+          DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default PpSearchByLowerCaseNameKind_key where
+  def
+    = PpSearchByLowerCaseNameKind_key "" Prelude.Nothing Default.def
+
+instance Hashable.Hashable PpSearchByLowerCaseNameKind_key where
+  hashWithSalt __salt
+    (PpSearchByLowerCaseNameKind_key _name _kinds _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _kinds)
+        _entity
+
+data LsifSearchByName_key = LsifSearchByName_key{lsifSearchByName_key_name
+                                                 :: Text.Text,
+                                                 lsifSearchByName_key_entity ::
+                                                 Glean.Schema.Code.Entity}
+                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON LsifSearchByName_key where
+  toJSON (LsifSearchByName_key __field__name __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "entity" .= __field__entity : Prelude.mempty)
+
+instance Thrift.ThriftStruct LsifSearchByName_key where
+  buildStruct _proxy
+    (LsifSearchByName_key __field__name __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__entity)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (LsifSearchByName_key __val__name __val__entity)
+              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData LsifSearchByName_key where
+  rnf (LsifSearchByName_key __field__name __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default LsifSearchByName_key where
+  def = LsifSearchByName_key "" Default.def
+
+instance Hashable.Hashable LsifSearchByName_key where
+  hashWithSalt __salt (LsifSearchByName_key _name _entity)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+        _entity
+
+data LsifSearchByLowerCaseName_key = LsifSearchByLowerCaseName_key{lsifSearchByLowerCaseName_key_name
+                                                                   :: Text.Text,
+                                                                   lsifSearchByLowerCaseName_key_entity
+                                                                   :: Glean.Schema.Code.Entity}
+                                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON LsifSearchByLowerCaseName_key where
+  toJSON
+    (LsifSearchByLowerCaseName_key __field__name __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "entity" .= __field__entity : Prelude.mempty)
+
+instance Thrift.ThriftStruct LsifSearchByLowerCaseName_key where
+  buildStruct _proxy
+    (LsifSearchByLowerCaseName_key __field__name __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__entity)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (LsifSearchByLowerCaseName_key __val__name
+                                                  __val__entity)
+              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData LsifSearchByLowerCaseName_key where
+  rnf (LsifSearchByLowerCaseName_key __field__name __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default LsifSearchByLowerCaseName_key where
+  def = LsifSearchByLowerCaseName_key "" Default.def
+
+instance Hashable.Hashable LsifSearchByLowerCaseName_key where
+  hashWithSalt __salt (LsifSearchByLowerCaseName_key _name _entity)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+        _entity
+
+data KotlinSearchByScopeWithName_key = KotlinSearchByScopeWithName_key{kotlinSearchByScopeWithName_key_name
+                                                                       ::
+                                                                       Glean.Schema.JavakotlinAlpha.Name,
+                                                                       kotlinSearchByScopeWithName_key_insensitive
+                                                                       :: Prelude.Bool,
+                                                                       kotlinSearchByScopeWithName_key_scope
+                                                                       :: [Text.Text],
+                                                                       kotlinSearchByScopeWithName_key_entity
+                                                                       :: Glean.Schema.Code.Entity}
+                                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON KotlinSearchByScopeWithName_key where
+  toJSON
+    (KotlinSearchByScopeWithName_key __field__name __field__insensitive
+       __field__scope __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "insensitive" .= __field__insensitive :
+             "scope" .= __field__scope :
+               "entity" .= __field__entity : Prelude.mempty)
+
+instance Thrift.ThriftStruct KotlinSearchByScopeWithName_key where
+  buildStruct _proxy
+    (KotlinSearchByScopeWithName_key __field__name __field__insensitive
+       __field__scope __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__name)
+           :
+           Thrift.genFieldBool _proxy "insensitive" 2 1 __field__insensitive :
+             Thrift.genField _proxy "scope" (Thrift.getListType _proxy) 3 2
+               (Thrift.genList _proxy (Thrift.getStringType _proxy)
+                  (Thrift.genText _proxy)
+                  __field__scope)
+               :
+               Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4 3
+                 (Thrift.buildStruct _proxy __field__entity)
+                 : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef Default.def
+            __field__insensitive <- ST.newSTRef Prelude.False
+            __field__scope <- ST.newSTRef Default.def
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getBoolType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseBoolF
+                                                                                      _proxy
+                                                                                      _bool)
+                                                                        ST.writeSTRef
+                                                                          __field__insensitive
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseText
+                                                                                           _proxy))
+                                                                        ST.writeSTRef __field__scope
+                                                                          _val
+                                                                 4 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__insensitive <- ST.readSTRef
+                                                                      __field__insensitive
+                                             !__val__scope <- ST.readSTRef __field__scope
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (KotlinSearchByScopeWithName_key __val__name
+                                                  __val__insensitive
+                                                  __val__scope
+                                                  __val__entity)
+              _idMap
+                = HashMap.fromList
+                    [("name", 1), ("insensitive", 2), ("scope", 3), ("entity", 4)]
+            _parse 0)
+
+instance DeepSeq.NFData KotlinSearchByScopeWithName_key where
+  rnf
+    (KotlinSearchByScopeWithName_key __field__name __field__insensitive
+       __field__scope __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__insensitive `Prelude.seq`
+          DeepSeq.rnf __field__scope `Prelude.seq`
+            DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default KotlinSearchByScopeWithName_key where
+  def
+    = KotlinSearchByScopeWithName_key Default.def Prelude.False
+        Default.def
+        Default.def
+
+instance Hashable.Hashable KotlinSearchByScopeWithName_key where
+  hashWithSalt __salt
+    (KotlinSearchByScopeWithName_key _name _insensitive _scope _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+              _insensitive)
+           _scope)
+        _entity
+
+data KotlinSearchByScope_key = KotlinSearchByScope_key{kotlinSearchByScope_key_name
+                                                       :: Text.Text,
+                                                       kotlinSearchByScope_key_scope :: [Text.Text],
+                                                       kotlinSearchByScope_key_entity ::
+                                                       Glean.Schema.Code.Entity}
+                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON KotlinSearchByScope_key where
+  toJSON
+    (KotlinSearchByScope_key __field__name __field__scope
+       __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "scope" .= __field__scope :
+             "entity" .= __field__entity : Prelude.mempty)
+
+instance Thrift.ThriftStruct KotlinSearchByScope_key where
+  buildStruct _proxy
+    (KotlinSearchByScope_key __field__name __field__scope
+       __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "scope" (Thrift.getListType _proxy) 2 1
+             (Thrift.genList _proxy (Thrift.getStringType _proxy)
+                (Thrift.genText _proxy)
+                __field__scope)
+             :
+             Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 3 2
+               (Thrift.buildStruct _proxy __field__entity)
+               : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__scope <- ST.newSTRef Default.def
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseText
+                                                                                           _proxy))
+                                                                        ST.writeSTRef __field__scope
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__scope <- ST.readSTRef __field__scope
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (KotlinSearchByScope_key __val__name __val__scope
+                                                  __val__entity)
+              _idMap
+                = HashMap.fromList [("name", 1), ("scope", 2), ("entity", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData KotlinSearchByScope_key where
+  rnf
+    (KotlinSearchByScope_key __field__name __field__scope
+       __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__scope `Prelude.seq`
+          DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default KotlinSearchByScope_key where
+  def = KotlinSearchByScope_key "" Default.def Default.def
+
+instance Hashable.Hashable KotlinSearchByScope_key where
+  hashWithSalt __salt (KotlinSearchByScope_key _name _scope _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
+        _entity
+
+data KotlinSearchByNameWithFact_key = KotlinSearchByNameWithFact_key{kotlinSearchByNameWithFact_key_name
+                                                                     ::
+                                                                     Glean.Schema.JavakotlinAlpha.QName,
+                                                                     kotlinSearchByNameWithFact_key_entity
+                                                                     :: Glean.Schema.Code.Entity}
+                                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON KotlinSearchByNameWithFact_key where
+  toJSON
+    (KotlinSearchByNameWithFact_key __field__name __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "entity" .= __field__entity : Prelude.mempty)
+
+instance Thrift.ThriftStruct KotlinSearchByNameWithFact_key where
+  buildStruct _proxy
+    (KotlinSearchByNameWithFact_key __field__name __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__name)
+           :
+           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__entity)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef Default.def
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (KotlinSearchByNameWithFact_key __val__name
+                                                  __val__entity)
+              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData KotlinSearchByNameWithFact_key where
+  rnf (KotlinSearchByNameWithFact_key __field__name __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default KotlinSearchByNameWithFact_key where
+  def = KotlinSearchByNameWithFact_key Default.def Default.def
+
+instance Hashable.Hashable KotlinSearchByNameWithFact_key where
+  hashWithSalt __salt (KotlinSearchByNameWithFact_key _name _entity)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+        _entity
+
+data KotlinSearchByName_key = KotlinSearchByName_key{kotlinSearchByName_key_name
+                                                     :: Text.Text,
+                                                     kotlinSearchByName_key_entity ::
+                                                     Glean.Schema.Code.Entity}
+                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON KotlinSearchByName_key where
+  toJSON (KotlinSearchByName_key __field__name __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "entity" .= __field__entity : Prelude.mempty)
+
+instance Thrift.ThriftStruct KotlinSearchByName_key where
+  buildStruct _proxy
+    (KotlinSearchByName_key __field__name __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__entity)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (KotlinSearchByName_key __val__name __val__entity)
+              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData KotlinSearchByName_key where
+  rnf (KotlinSearchByName_key __field__name __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default KotlinSearchByName_key where
+  def = KotlinSearchByName_key "" Default.def
+
+instance Hashable.Hashable KotlinSearchByName_key where
+  hashWithSalt __salt (KotlinSearchByName_key _name _entity)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+        _entity
+
+data KotlinSearchByLowerCaseScope_key = KotlinSearchByLowerCaseScope_key{kotlinSearchByLowerCaseScope_key_name
+                                                                         :: Text.Text,
+                                                                         kotlinSearchByLowerCaseScope_key_scope
+                                                                         :: [Text.Text],
+                                                                         kotlinSearchByLowerCaseScope_key_entity
+                                                                         ::
+                                                                         Glean.Schema.Code.Entity}
+                                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON KotlinSearchByLowerCaseScope_key where
+  toJSON
+    (KotlinSearchByLowerCaseScope_key __field__name __field__scope
+       __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "scope" .= __field__scope :
+             "entity" .= __field__entity : Prelude.mempty)
+
+instance Thrift.ThriftStruct KotlinSearchByLowerCaseScope_key where
+  buildStruct _proxy
+    (KotlinSearchByLowerCaseScope_key __field__name __field__scope
+       __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "scope" (Thrift.getListType _proxy) 2 1
+             (Thrift.genList _proxy (Thrift.getStringType _proxy)
+                (Thrift.genText _proxy)
+                __field__scope)
+             :
+             Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 3 2
+               (Thrift.buildStruct _proxy __field__entity)
+               : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__scope <- ST.newSTRef Default.def
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseText
+                                                                                           _proxy))
+                                                                        ST.writeSTRef __field__scope
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__scope <- ST.readSTRef __field__scope
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (KotlinSearchByLowerCaseScope_key __val__name
+                                                  __val__scope
+                                                  __val__entity)
+              _idMap
+                = HashMap.fromList [("name", 1), ("scope", 2), ("entity", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData KotlinSearchByLowerCaseScope_key where
+  rnf
+    (KotlinSearchByLowerCaseScope_key __field__name __field__scope
+       __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__scope `Prelude.seq`
+          DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default KotlinSearchByLowerCaseScope_key where
+  def = KotlinSearchByLowerCaseScope_key "" Default.def Default.def
+
+instance Hashable.Hashable KotlinSearchByLowerCaseScope_key where
+  hashWithSalt __salt
+    (KotlinSearchByLowerCaseScope_key _name _scope _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
+        _entity
+
+data KotlinSearchByLowerCaseName_key = KotlinSearchByLowerCaseName_key{kotlinSearchByLowerCaseName_key_name
+                                                                       :: Text.Text,
+                                                                       kotlinSearchByLowerCaseName_key_entity
+                                                                       :: Glean.Schema.Code.Entity}
+                                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON KotlinSearchByLowerCaseName_key where
+  toJSON
+    (KotlinSearchByLowerCaseName_key __field__name __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "entity" .= __field__entity : Prelude.mempty)
+
+instance Thrift.ThriftStruct KotlinSearchByLowerCaseName_key where
+  buildStruct _proxy
+    (KotlinSearchByLowerCaseName_key __field__name __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__entity)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (KotlinSearchByLowerCaseName_key __val__name
+                                                  __val__entity)
+              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData KotlinSearchByLowerCaseName_key where
+  rnf (KotlinSearchByLowerCaseName_key __field__name __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default KotlinSearchByLowerCaseName_key where
+  def = KotlinSearchByLowerCaseName_key "" Default.def
+
+instance Hashable.Hashable KotlinSearchByLowerCaseName_key where
+  hashWithSalt __salt (KotlinSearchByLowerCaseName_key _name _entity)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+        _entity
+
+data JavaSearchByScopeWithName_key = JavaSearchByScopeWithName_key{javaSearchByScopeWithName_key_name
+                                                                   ::
+                                                                   Glean.Schema.JavakotlinAlpha.Name,
+                                                                   javaSearchByScopeWithName_key_insensitive
+                                                                   :: Prelude.Bool,
+                                                                   javaSearchByScopeWithName_key_scope
+                                                                   :: [Text.Text],
+                                                                   javaSearchByScopeWithName_key_entity
+                                                                   :: Glean.Schema.Code.Entity}
+                                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON JavaSearchByScopeWithName_key where
+  toJSON
+    (JavaSearchByScopeWithName_key __field__name __field__insensitive
+       __field__scope __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "insensitive" .= __field__insensitive :
+             "scope" .= __field__scope :
+               "entity" .= __field__entity : Prelude.mempty)
+
+instance Thrift.ThriftStruct JavaSearchByScopeWithName_key where
+  buildStruct _proxy
+    (JavaSearchByScopeWithName_key __field__name __field__insensitive
+       __field__scope __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__name)
+           :
+           Thrift.genFieldBool _proxy "insensitive" 2 1 __field__insensitive :
+             Thrift.genField _proxy "scope" (Thrift.getListType _proxy) 3 2
+               (Thrift.genList _proxy (Thrift.getStringType _proxy)
+                  (Thrift.genText _proxy)
+                  __field__scope)
+               :
+               Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4 3
+                 (Thrift.buildStruct _proxy __field__entity)
+                 : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef Default.def
+            __field__insensitive <- ST.newSTRef Prelude.False
+            __field__scope <- ST.newSTRef Default.def
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getBoolType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseBoolF
+                                                                                      _proxy
+                                                                                      _bool)
+                                                                        ST.writeSTRef
+                                                                          __field__insensitive
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseText
+                                                                                           _proxy))
+                                                                        ST.writeSTRef __field__scope
+                                                                          _val
+                                                                 4 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__insensitive <- ST.readSTRef
+                                                                      __field__insensitive
+                                             !__val__scope <- ST.readSTRef __field__scope
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (JavaSearchByScopeWithName_key __val__name
+                                                  __val__insensitive
+                                                  __val__scope
+                                                  __val__entity)
+              _idMap
+                = HashMap.fromList
+                    [("name", 1), ("insensitive", 2), ("scope", 3), ("entity", 4)]
+            _parse 0)
+
+instance DeepSeq.NFData JavaSearchByScopeWithName_key where
+  rnf
+    (JavaSearchByScopeWithName_key __field__name __field__insensitive
+       __field__scope __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__insensitive `Prelude.seq`
+          DeepSeq.rnf __field__scope `Prelude.seq`
+            DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default JavaSearchByScopeWithName_key where
+  def
+    = JavaSearchByScopeWithName_key Default.def Prelude.False
+        Default.def
+        Default.def
+
+instance Hashable.Hashable JavaSearchByScopeWithName_key where
+  hashWithSalt __salt
+    (JavaSearchByScopeWithName_key _name _insensitive _scope _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+              _insensitive)
+           _scope)
+        _entity
+
+data JavaSearchByScope_key = JavaSearchByScope_key{javaSearchByScope_key_name
+                                                   :: Text.Text,
+                                                   javaSearchByScope_key_scope :: [Text.Text],
+                                                   javaSearchByScope_key_entity ::
+                                                   Glean.Schema.Code.Entity}
+                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON JavaSearchByScope_key where
+  toJSON
+    (JavaSearchByScope_key __field__name __field__scope
+       __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "scope" .= __field__scope :
+             "entity" .= __field__entity : Prelude.mempty)
+
+instance Thrift.ThriftStruct JavaSearchByScope_key where
+  buildStruct _proxy
+    (JavaSearchByScope_key __field__name __field__scope
+       __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "scope" (Thrift.getListType _proxy) 2 1
+             (Thrift.genList _proxy (Thrift.getStringType _proxy)
+                (Thrift.genText _proxy)
+                __field__scope)
+             :
+             Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 3 2
+               (Thrift.buildStruct _proxy __field__entity)
+               : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__scope <- ST.newSTRef Default.def
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseText
+                                                                                           _proxy))
+                                                                        ST.writeSTRef __field__scope
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__scope <- ST.readSTRef __field__scope
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (JavaSearchByScope_key __val__name __val__scope
+                                                  __val__entity)
+              _idMap
+                = HashMap.fromList [("name", 1), ("scope", 2), ("entity", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData JavaSearchByScope_key where
+  rnf
+    (JavaSearchByScope_key __field__name __field__scope
+       __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__scope `Prelude.seq`
+          DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default JavaSearchByScope_key where
+  def = JavaSearchByScope_key "" Default.def Default.def
+
+instance Hashable.Hashable JavaSearchByScope_key where
+  hashWithSalt __salt (JavaSearchByScope_key _name _scope _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
+        _entity
+
+data JavaSearchByNameWithFact_key = JavaSearchByNameWithFact_key{javaSearchByNameWithFact_key_name
+                                                                 ::
+                                                                 Glean.Schema.JavakotlinAlpha.QName,
+                                                                 javaSearchByNameWithFact_key_entity
+                                                                 :: Glean.Schema.Code.Entity}
+                                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON JavaSearchByNameWithFact_key where
+  toJSON (JavaSearchByNameWithFact_key __field__name __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "entity" .= __field__entity : Prelude.mempty)
+
+instance Thrift.ThriftStruct JavaSearchByNameWithFact_key where
+  buildStruct _proxy
+    (JavaSearchByNameWithFact_key __field__name __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__name)
+           :
+           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__entity)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef Default.def
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (JavaSearchByNameWithFact_key __val__name
+                                                  __val__entity)
+              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData JavaSearchByNameWithFact_key where
+  rnf (JavaSearchByNameWithFact_key __field__name __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default JavaSearchByNameWithFact_key where
+  def = JavaSearchByNameWithFact_key Default.def Default.def
+
+instance Hashable.Hashable JavaSearchByNameWithFact_key where
+  hashWithSalt __salt (JavaSearchByNameWithFact_key _name _entity)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+        _entity
+
+data JavaSearchByName_key = JavaSearchByName_key{javaSearchByName_key_name
+                                                 :: Text.Text,
+                                                 javaSearchByName_key_entity ::
+                                                 Glean.Schema.Code.Entity}
+                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON JavaSearchByName_key where
+  toJSON (JavaSearchByName_key __field__name __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "entity" .= __field__entity : Prelude.mempty)
+
+instance Thrift.ThriftStruct JavaSearchByName_key where
+  buildStruct _proxy
+    (JavaSearchByName_key __field__name __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__entity)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (JavaSearchByName_key __val__name __val__entity)
+              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData JavaSearchByName_key where
+  rnf (JavaSearchByName_key __field__name __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default JavaSearchByName_key where
+  def = JavaSearchByName_key "" Default.def
+
+instance Hashable.Hashable JavaSearchByName_key where
+  hashWithSalt __salt (JavaSearchByName_key _name _entity)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+        _entity
+
+data JavaSearchByLowerCaseScope_key = JavaSearchByLowerCaseScope_key{javaSearchByLowerCaseScope_key_name
+                                                                     :: Text.Text,
+                                                                     javaSearchByLowerCaseScope_key_scope
+                                                                     :: [Text.Text],
+                                                                     javaSearchByLowerCaseScope_key_entity
+                                                                     :: Glean.Schema.Code.Entity}
+                                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON JavaSearchByLowerCaseScope_key where
+  toJSON
+    (JavaSearchByLowerCaseScope_key __field__name __field__scope
+       __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "scope" .= __field__scope :
+             "entity" .= __field__entity : Prelude.mempty)
+
+instance Thrift.ThriftStruct JavaSearchByLowerCaseScope_key where
+  buildStruct _proxy
+    (JavaSearchByLowerCaseScope_key __field__name __field__scope
+       __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "scope" (Thrift.getListType _proxy) 2 1
+             (Thrift.genList _proxy (Thrift.getStringType _proxy)
+                (Thrift.genText _proxy)
+                __field__scope)
+             :
+             Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 3 2
+               (Thrift.buildStruct _proxy __field__entity)
+               : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__scope <- ST.newSTRef Default.def
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseText
+                                                                                           _proxy))
+                                                                        ST.writeSTRef __field__scope
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__scope <- ST.readSTRef __field__scope
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (JavaSearchByLowerCaseScope_key __val__name
+                                                  __val__scope
+                                                  __val__entity)
+              _idMap
+                = HashMap.fromList [("name", 1), ("scope", 2), ("entity", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData JavaSearchByLowerCaseScope_key where
+  rnf
+    (JavaSearchByLowerCaseScope_key __field__name __field__scope
+       __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__scope `Prelude.seq`
+          DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default JavaSearchByLowerCaseScope_key where
+  def = JavaSearchByLowerCaseScope_key "" Default.def Default.def
+
+instance Hashable.Hashable JavaSearchByLowerCaseScope_key where
+  hashWithSalt __salt
+    (JavaSearchByLowerCaseScope_key _name _scope _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
+        _entity
+
+data JavaSearchByLowerCaseName_key = JavaSearchByLowerCaseName_key{javaSearchByLowerCaseName_key_name
+                                                                   :: Text.Text,
+                                                                   javaSearchByLowerCaseName_key_entity
+                                                                   :: Glean.Schema.Code.Entity}
+                                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON JavaSearchByLowerCaseName_key where
+  toJSON
+    (JavaSearchByLowerCaseName_key __field__name __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "entity" .= __field__entity : Prelude.mempty)
+
+instance Thrift.ThriftStruct JavaSearchByLowerCaseName_key where
+  buildStruct _proxy
+    (JavaSearchByLowerCaseName_key __field__name __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__entity)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (JavaSearchByLowerCaseName_key __val__name
+                                                  __val__entity)
+              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData JavaSearchByLowerCaseName_key where
+  rnf (JavaSearchByLowerCaseName_key __field__name __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default JavaSearchByLowerCaseName_key where
+  def = JavaSearchByLowerCaseName_key "" Default.def
+
+instance Hashable.Hashable JavaSearchByLowerCaseName_key where
+  hashWithSalt __salt (JavaSearchByLowerCaseName_key _name _entity)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+        _entity
+
+data HsSearchByName_key = HsSearchByName_key{hsSearchByName_key_name
+                                             :: Text.Text,
+                                             hsSearchByName_key_entity :: Glean.Schema.Code.Entity}
+                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON HsSearchByName_key where
+  toJSON (HsSearchByName_key __field__name __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "entity" .= __field__entity : Prelude.mempty)
+
+instance Thrift.ThriftStruct HsSearchByName_key where
+  buildStruct _proxy
+    (HsSearchByName_key __field__name __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__entity)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (HsSearchByName_key __val__name __val__entity)
+              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData HsSearchByName_key where
+  rnf (HsSearchByName_key __field__name __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default HsSearchByName_key where
+  def = HsSearchByName_key "" Default.def
+
+instance Hashable.Hashable HsSearchByName_key where
+  hashWithSalt __salt (HsSearchByName_key _name _entity)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+        _entity
+
+data HsSearchByLowerCaseName_key = HsSearchByLowerCaseName_key{hsSearchByLowerCaseName_key_name
+                                                               :: Text.Text,
+                                                               hsSearchByLowerCaseName_key_entity ::
+                                                               Glean.Schema.Code.Entity}
+                                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON HsSearchByLowerCaseName_key where
+  toJSON (HsSearchByLowerCaseName_key __field__name __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "entity" .= __field__entity : Prelude.mempty)
+
+instance Thrift.ThriftStruct HsSearchByLowerCaseName_key where
+  buildStruct _proxy
+    (HsSearchByLowerCaseName_key __field__name __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__entity)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (HsSearchByLowerCaseName_key __val__name
+                                                  __val__entity)
+              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData HsSearchByLowerCaseName_key where
+  rnf (HsSearchByLowerCaseName_key __field__name __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default HsSearchByLowerCaseName_key where
+  def = HsSearchByLowerCaseName_key "" Default.def
+
+instance Hashable.Hashable HsSearchByLowerCaseName_key where
+  hashWithSalt __salt (HsSearchByLowerCaseName_key _name _entity)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+        _entity
+
+data HackSearchByScopeWithNameKinds_key = HackSearchByScopeWithNameKinds_key{hackSearchByScopeWithNameKinds_key_name
+                                                                             :: Text.Text,
+                                                                             hackSearchByScopeWithNameKinds_key_insensitive
+                                                                             :: Prelude.Bool,
+                                                                             hackSearchByScopeWithNameKinds_key_scope
+                                                                             :: [Text.Text],
+                                                                             hackSearchByScopeWithNameKinds_key_kinds
+                                                                             ::
+                                                                             Prelude.Maybe
+                                                                               Glean.Schema.CodemarkupTypes.SymbolKind,
+                                                                             hackSearchByScopeWithNameKinds_key_entity
+                                                                             ::
+                                                                             Glean.Schema.Code.Entity}
+                                          deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON HackSearchByScopeWithNameKinds_key where
+  toJSON
+    (HackSearchByScopeWithNameKinds_key __field__name
+       __field__insensitive __field__scope __field__kinds __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "insensitive" .= __field__insensitive :
+             "scope" .= __field__scope :
+               Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
+                 ("entity" .= __field__entity : Prelude.mempty))
+
+instance Thrift.ThriftStruct HackSearchByScopeWithNameKinds_key
+         where
+  buildStruct _proxy
+    (HackSearchByScopeWithNameKinds_key __field__name
+       __field__insensitive __field__scope __field__kinds __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genFieldBool _proxy "insensitive" 2 1 __field__insensitive :
+             Thrift.genField _proxy "scope" (Thrift.getListType _proxy) 3 2
+               (Thrift.genList _proxy (Thrift.getStringType _proxy)
+                  (Thrift.genText _proxy)
+                  __field__scope)
+               :
+               let (__cereal__kinds, __id__kinds)
+                     = case __field__kinds of
+                         Prelude.Just _val -> ((:)
+                                                 (Thrift.genField _proxy "kinds"
+                                                    (Thrift.getI32Type _proxy)
+                                                    4
+                                                    3
+                                                    ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                                                        Thrift.fromThriftEnum)
+                                                       _val)),
+                                               4)
+                         Prelude.Nothing -> (Prelude.id, 3)
+                 in
+                 __cereal__kinds
+                   (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 5
+                      __id__kinds
+                      (Thrift.buildStruct _proxy __field__entity)
+                      : []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__insensitive <- ST.newSTRef Prelude.False
+            __field__scope <- ST.newSTRef Default.def
+            __field__kinds <- ST.newSTRef Prelude.Nothing
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getBoolType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseBoolF
+                                                                                      _proxy
+                                                                                      _bool)
+                                                                        ST.writeSTRef
+                                                                          __field__insensitive
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseText
+                                                                                           _proxy))
+                                                                        ST.writeSTRef __field__scope
+                                                                          _val
+                                                                 4 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "SymbolKind")
+                                                                        ST.writeSTRef __field__kinds
+                                                                          (Prelude.Just _val)
+                                                                 5 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__insensitive <- ST.readSTRef
+                                                                      __field__insensitive
+                                             !__val__scope <- ST.readSTRef __field__scope
+                                             !__val__kinds <- ST.readSTRef __field__kinds
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (HackSearchByScopeWithNameKinds_key __val__name
+                                                  __val__insensitive
+                                                  __val__scope
+                                                  __val__kinds
+                                                  __val__entity)
+              _idMap
+                = HashMap.fromList
+                    [("name", 1), ("insensitive", 2), ("scope", 3), ("kinds", 4),
+                     ("entity", 5)]
+            _parse 0)
+
+instance DeepSeq.NFData HackSearchByScopeWithNameKinds_key where
+  rnf
+    (HackSearchByScopeWithNameKinds_key __field__name
+       __field__insensitive __field__scope __field__kinds __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__insensitive `Prelude.seq`
+          DeepSeq.rnf __field__scope `Prelude.seq`
+            DeepSeq.rnf __field__kinds `Prelude.seq`
+              DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default HackSearchByScopeWithNameKinds_key where
+  def
+    = HackSearchByScopeWithNameKinds_key "" Prelude.False Default.def
+        Prelude.Nothing
+        Default.def
+
+instance Hashable.Hashable HackSearchByScopeWithNameKinds_key where
+  hashWithSalt __salt
+    (HackSearchByScopeWithNameKinds_key _name _insensitive _scope
+       _kinds _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt
+              (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+                 _insensitive)
+              _scope)
+           _kinds)
+        _entity
+
+data HackSearchByScopeAndKind_key = HackSearchByScopeAndKind_key{hackSearchByScopeAndKind_key_name
+                                                                 :: Text.Text,
+                                                                 hackSearchByScopeAndKind_key_scope
+                                                                 :: [Text.Text],
+                                                                 hackSearchByScopeAndKind_key_kinds
+                                                                 ::
+                                                                 Prelude.Maybe
+                                                                   Glean.Schema.CodemarkupTypes.SymbolKind,
+                                                                 hackSearchByScopeAndKind_key_entity
+                                                                 :: Glean.Schema.Code.Entity}
+                                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON HackSearchByScopeAndKind_key where
+  toJSON
+    (HackSearchByScopeAndKind_key __field__name __field__scope
+       __field__kinds __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "scope" .= __field__scope :
+             Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
+               ("entity" .= __field__entity : Prelude.mempty))
+
+instance Thrift.ThriftStruct HackSearchByScopeAndKind_key where
+  buildStruct _proxy
+    (HackSearchByScopeAndKind_key __field__name __field__scope
+       __field__kinds __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "scope" (Thrift.getListType _proxy) 2 1
+             (Thrift.genList _proxy (Thrift.getStringType _proxy)
+                (Thrift.genText _proxy)
+                __field__scope)
+             :
+             let (__cereal__kinds, __id__kinds)
+                   = case __field__kinds of
+                       Prelude.Just _val -> ((:)
+                                               (Thrift.genField _proxy "kinds"
+                                                  (Thrift.getI32Type _proxy)
+                                                  3
+                                                  2
+                                                  ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                                                      Thrift.fromThriftEnum)
+                                                     _val)),
+                                             3)
+                       Prelude.Nothing -> (Prelude.id, 2)
+               in
+               __cereal__kinds
+                 (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4
+                    __id__kinds
+                    (Thrift.buildStruct _proxy __field__entity)
+                    : []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__scope <- ST.newSTRef Default.def
+            __field__kinds <- ST.newSTRef Prelude.Nothing
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseText
+                                                                                           _proxy))
+                                                                        ST.writeSTRef __field__scope
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "SymbolKind")
+                                                                        ST.writeSTRef __field__kinds
+                                                                          (Prelude.Just _val)
+                                                                 4 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__scope <- ST.readSTRef __field__scope
+                                             !__val__kinds <- ST.readSTRef __field__kinds
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (HackSearchByScopeAndKind_key __val__name
+                                                  __val__scope
+                                                  __val__kinds
+                                                  __val__entity)
+              _idMap
+                = HashMap.fromList
+                    [("name", 1), ("scope", 2), ("kinds", 3), ("entity", 4)]
+            _parse 0)
+
+instance DeepSeq.NFData HackSearchByScopeAndKind_key where
+  rnf
+    (HackSearchByScopeAndKind_key __field__name __field__scope
+       __field__kinds __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__scope `Prelude.seq`
+          DeepSeq.rnf __field__kinds `Prelude.seq`
+            DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default HackSearchByScopeAndKind_key where
+  def
+    = HackSearchByScopeAndKind_key "" Default.def Prelude.Nothing
+        Default.def
+
+instance Hashable.Hashable HackSearchByScopeAndKind_key where
+  hashWithSalt __salt
+    (HackSearchByScopeAndKind_key _name _scope _kinds _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
+           _kinds)
+        _entity
+
+data HackSearchByNameKindWithQName_key = HackSearchByNameKindWithQName_key{hackSearchByNameKindWithQName_key_name
+                                                                           :: Text.Text,
+                                                                           hackSearchByNameKindWithQName_key_scope
+                                                                           ::
+                                                                           Glean.Schema.Hack.Name,
+                                                                           hackSearchByNameKindWithQName_key_scopeNamespace
+                                                                           ::
+                                                                           Prelude.Maybe
+                                                                             Glean.Schema.Hack.NamespaceQName,
+                                                                           hackSearchByNameKindWithQName_key_kinds
+                                                                           ::
+                                                                           Prelude.Maybe
+                                                                             Glean.Schema.CodemarkupTypes.SymbolKind,
+                                                                           hackSearchByNameKindWithQName_key_entity
+                                                                           ::
+                                                                           Glean.Schema.Code.Entity}
+                                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON HackSearchByNameKindWithQName_key where
+  toJSON
+    (HackSearchByNameKindWithQName_key __field__name __field__scope
+       __field__scopeNamespace __field__kinds __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "scope" .= __field__scope :
+             Prelude.maybe Prelude.id ((:) . ("scopeNamespace" .=))
+               __field__scopeNamespace
+               (Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
+                  ("entity" .= __field__entity : Prelude.mempty)))
+
+instance Thrift.ThriftStruct HackSearchByNameKindWithQName_key
+         where
+  buildStruct _proxy
+    (HackSearchByNameKindWithQName_key __field__name __field__scope
+       __field__scopeNamespace __field__kinds __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "scope" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__scope)
+             :
+             let (__cereal__scopeNamespace, __id__scopeNamespace)
+                   = case __field__scopeNamespace of
+                       Prelude.Just _val -> ((:)
+                                               (Thrift.genField _proxy "scopeNamespace"
+                                                  (Thrift.getStructType _proxy)
+                                                  3
+                                                  2
+                                                  (Thrift.buildStruct _proxy _val)),
+                                             3)
+                       Prelude.Nothing -> (Prelude.id, 2)
+               in
+               __cereal__scopeNamespace
+                 (let (__cereal__kinds, __id__kinds)
+                        = case __field__kinds of
+                            Prelude.Just _val -> ((:)
+                                                    (Thrift.genField _proxy "kinds"
+                                                       (Thrift.getI32Type _proxy)
+                                                       4
+                                                       __id__scopeNamespace
+                                                       ((Thrift.genI32 _proxy . Prelude.fromIntegral
+                                                           . Thrift.fromThriftEnum)
+                                                          _val)),
+                                                  4)
+                            Prelude.Nothing -> (Prelude.id, __id__scopeNamespace)
+                    in
+                    __cereal__kinds
+                      (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 5
+                         __id__kinds
+                         (Thrift.buildStruct _proxy __field__entity)
+                         : [])))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__scope <- ST.newSTRef Default.def
+            __field__scopeNamespace <- ST.newSTRef Prelude.Nothing
+            __field__kinds <- ST.newSTRef Prelude.Nothing
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__scope
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__scopeNamespace
+                                                                          (Prelude.Just _val)
+                                                                 4 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "SymbolKind")
+                                                                        ST.writeSTRef __field__kinds
+                                                                          (Prelude.Just _val)
+                                                                 5 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__scope <- ST.readSTRef __field__scope
+                                             !__val__scopeNamespace <- ST.readSTRef
+                                                                         __field__scopeNamespace
+                                             !__val__kinds <- ST.readSTRef __field__kinds
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (HackSearchByNameKindWithQName_key __val__name
+                                                  __val__scope
+                                                  __val__scopeNamespace
+                                                  __val__kinds
+                                                  __val__entity)
+              _idMap
+                = HashMap.fromList
+                    [("name", 1), ("scope", 2), ("scopeNamespace", 3), ("kinds", 4),
+                     ("entity", 5)]
+            _parse 0)
+
+instance DeepSeq.NFData HackSearchByNameKindWithQName_key where
+  rnf
+    (HackSearchByNameKindWithQName_key __field__name __field__scope
+       __field__scopeNamespace __field__kinds __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__scope `Prelude.seq`
+          DeepSeq.rnf __field__scopeNamespace `Prelude.seq`
+            DeepSeq.rnf __field__kinds `Prelude.seq`
+              DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default HackSearchByNameKindWithQName_key where
+  def
+    = HackSearchByNameKindWithQName_key "" Default.def Prelude.Nothing
+        Prelude.Nothing
+        Default.def
+
+instance Hashable.Hashable HackSearchByNameKindWithQName_key where
+  hashWithSalt __salt
+    (HackSearchByNameKindWithQName_key _name _scope _scopeNamespace
+       _kinds _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt
+              (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
+              _scopeNamespace)
+           _kinds)
+        _entity
+
+data HackSearchByNameKindWithNamespace_key = HackSearchByNameKindWithNamespace_key{hackSearchByNameKindWithNamespace_key_name
+                                                                                   :: Text.Text,
+                                                                                   hackSearchByNameKindWithNamespace_key_scope
+                                                                                   ::
+                                                                                   Prelude.Maybe
+                                                                                     Glean.Schema.Hack.NamespaceQName,
+                                                                                   hackSearchByNameKindWithNamespace_key_kinds
+                                                                                   ::
+                                                                                   Prelude.Maybe
+                                                                                     Glean.Schema.CodemarkupTypes.SymbolKind,
+                                                                                   hackSearchByNameKindWithNamespace_key_entity
+                                                                                   ::
+                                                                                   Glean.Schema.Code.Entity}
+                                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON HackSearchByNameKindWithNamespace_key where
+  toJSON
+    (HackSearchByNameKindWithNamespace_key __field__name __field__scope
+       __field__kinds __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           Prelude.maybe Prelude.id ((:) . ("scope" .=)) __field__scope
+             (Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
+                ("entity" .= __field__entity : Prelude.mempty)))
+
+instance Thrift.ThriftStruct HackSearchByNameKindWithNamespace_key
+         where
+  buildStruct _proxy
+    (HackSearchByNameKindWithNamespace_key __field__name __field__scope
+       __field__kinds __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           let (__cereal__scope, __id__scope)
+                 = case __field__scope of
+                     Prelude.Just _val -> ((:)
+                                             (Thrift.genField _proxy "scope"
+                                                (Thrift.getStructType _proxy)
+                                                2
+                                                1
+                                                (Thrift.buildStruct _proxy _val)),
+                                           2)
+                     Prelude.Nothing -> (Prelude.id, 1)
+             in
+             __cereal__scope
+               (let (__cereal__kinds, __id__kinds)
+                      = case __field__kinds of
+                          Prelude.Just _val -> ((:)
+                                                  (Thrift.genField _proxy "kinds"
+                                                     (Thrift.getI32Type _proxy)
+                                                     3
+                                                     __id__scope
+                                                     ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                                                         Thrift.fromThriftEnum)
+                                                        _val)),
+                                                3)
+                          Prelude.Nothing -> (Prelude.id, __id__scope)
+                  in
+                  __cereal__kinds
+                    (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4
+                       __id__kinds
+                       (Thrift.buildStruct _proxy __field__entity)
+                       : [])))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__scope <- ST.newSTRef Prelude.Nothing
+            __field__kinds <- ST.newSTRef Prelude.Nothing
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__scope
+                                                                          (Prelude.Just _val)
+                                                                 3 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "SymbolKind")
+                                                                        ST.writeSTRef __field__kinds
+                                                                          (Prelude.Just _val)
+                                                                 4 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__scope <- ST.readSTRef __field__scope
+                                             !__val__kinds <- ST.readSTRef __field__kinds
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (HackSearchByNameKindWithNamespace_key __val__name
+                                                  __val__scope
+                                                  __val__kinds
+                                                  __val__entity)
+              _idMap
+                = HashMap.fromList
+                    [("name", 1), ("scope", 2), ("kinds", 3), ("entity", 4)]
+            _parse 0)
+
+instance DeepSeq.NFData HackSearchByNameKindWithNamespace_key where
+  rnf
+    (HackSearchByNameKindWithNamespace_key __field__name __field__scope
+       __field__kinds __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__scope `Prelude.seq`
+          DeepSeq.rnf __field__kinds `Prelude.seq`
+            DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default HackSearchByNameKindWithNamespace_key
+         where
+  def
+    = HackSearchByNameKindWithNamespace_key "" Prelude.Nothing
+        Prelude.Nothing
+        Default.def
+
+instance Hashable.Hashable HackSearchByNameKindWithNamespace_key
+         where
+  hashWithSalt __salt
+    (HackSearchByNameKindWithNamespace_key _name _scope _kinds _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
+           _kinds)
+        _entity
+
+data HackSearchByNameAndKind_key = HackSearchByNameAndKind_key{hackSearchByNameAndKind_key_name
+                                                               :: Text.Text,
+                                                               hackSearchByNameAndKind_key_kinds ::
+                                                               Prelude.Maybe
+                                                                 Glean.Schema.CodemarkupTypes.SymbolKind,
+                                                               hackSearchByNameAndKind_key_entity ::
+                                                               Glean.Schema.Code.Entity}
+                                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON HackSearchByNameAndKind_key where
+  toJSON
+    (HackSearchByNameAndKind_key __field__name __field__kinds
+       __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
+             ("entity" .= __field__entity : Prelude.mempty))
+
+instance Thrift.ThriftStruct HackSearchByNameAndKind_key where
+  buildStruct _proxy
+    (HackSearchByNameAndKind_key __field__name __field__kinds
+       __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           let (__cereal__kinds, __id__kinds)
+                 = case __field__kinds of
+                     Prelude.Just _val -> ((:)
+                                             (Thrift.genField _proxy "kinds"
+                                                (Thrift.getI32Type _proxy)
+                                                2
+                                                1
+                                                ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                                                    Thrift.fromThriftEnum)
+                                                   _val)),
+                                           2)
+                     Prelude.Nothing -> (Prelude.id, 1)
+             in
+             __cereal__kinds
+               (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 3
+                  __id__kinds
+                  (Thrift.buildStruct _proxy __field__entity)
+                  : []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__kinds <- ST.newSTRef Prelude.Nothing
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "SymbolKind")
+                                                                        ST.writeSTRef __field__kinds
+                                                                          (Prelude.Just _val)
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__kinds <- ST.readSTRef __field__kinds
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (HackSearchByNameAndKind_key __val__name __val__kinds
+                                                  __val__entity)
+              _idMap
+                = HashMap.fromList [("name", 1), ("kinds", 2), ("entity", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData HackSearchByNameAndKind_key where
+  rnf
+    (HackSearchByNameAndKind_key __field__name __field__kinds
+       __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__kinds `Prelude.seq`
+          DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default HackSearchByNameAndKind_key where
+  def = HackSearchByNameAndKind_key "" Prelude.Nothing Default.def
+
+instance Hashable.Hashable HackSearchByNameAndKind_key where
+  hashWithSalt __salt
+    (HackSearchByNameAndKind_key _name _kinds _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _kinds)
+        _entity
+
+data HackSearchByLowerCaseScopeAndKind_key = HackSearchByLowerCaseScopeAndKind_key{hackSearchByLowerCaseScopeAndKind_key_name
+                                                                                   :: Text.Text,
+                                                                                   hackSearchByLowerCaseScopeAndKind_key_scope
+                                                                                   :: [Text.Text],
+                                                                                   hackSearchByLowerCaseScopeAndKind_key_kinds
+                                                                                   ::
+                                                                                   Prelude.Maybe
+                                                                                     Glean.Schema.CodemarkupTypes.SymbolKind,
+                                                                                   hackSearchByLowerCaseScopeAndKind_key_entity
+                                                                                   ::
+                                                                                   Glean.Schema.Code.Entity}
+                                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON HackSearchByLowerCaseScopeAndKind_key where
+  toJSON
+    (HackSearchByLowerCaseScopeAndKind_key __field__name __field__scope
+       __field__kinds __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "scope" .= __field__scope :
+             Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
+               ("entity" .= __field__entity : Prelude.mempty))
+
+instance Thrift.ThriftStruct HackSearchByLowerCaseScopeAndKind_key
+         where
+  buildStruct _proxy
+    (HackSearchByLowerCaseScopeAndKind_key __field__name __field__scope
+       __field__kinds __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "scope" (Thrift.getListType _proxy) 2 1
+             (Thrift.genList _proxy (Thrift.getStringType _proxy)
+                (Thrift.genText _proxy)
+                __field__scope)
+             :
+             let (__cereal__kinds, __id__kinds)
+                   = case __field__kinds of
+                       Prelude.Just _val -> ((:)
+                                               (Thrift.genField _proxy "kinds"
+                                                  (Thrift.getI32Type _proxy)
+                                                  3
+                                                  2
+                                                  ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                                                      Thrift.fromThriftEnum)
+                                                     _val)),
+                                             3)
+                       Prelude.Nothing -> (Prelude.id, 2)
+               in
+               __cereal__kinds
+                 (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4
+                    __id__kinds
+                    (Thrift.buildStruct _proxy __field__entity)
+                    : []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__scope <- ST.newSTRef Default.def
+            __field__kinds <- ST.newSTRef Prelude.Nothing
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseText
+                                                                                           _proxy))
+                                                                        ST.writeSTRef __field__scope
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "SymbolKind")
+                                                                        ST.writeSTRef __field__kinds
+                                                                          (Prelude.Just _val)
+                                                                 4 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__scope <- ST.readSTRef __field__scope
+                                             !__val__kinds <- ST.readSTRef __field__kinds
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (HackSearchByLowerCaseScopeAndKind_key __val__name
+                                                  __val__scope
+                                                  __val__kinds
+                                                  __val__entity)
+              _idMap
+                = HashMap.fromList
+                    [("name", 1), ("scope", 2), ("kinds", 3), ("entity", 4)]
+            _parse 0)
+
+instance DeepSeq.NFData HackSearchByLowerCaseScopeAndKind_key where
+  rnf
+    (HackSearchByLowerCaseScopeAndKind_key __field__name __field__scope
+       __field__kinds __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__scope `Prelude.seq`
+          DeepSeq.rnf __field__kinds `Prelude.seq`
+            DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default HackSearchByLowerCaseScopeAndKind_key
+         where
+  def
+    = HackSearchByLowerCaseScopeAndKind_key "" Default.def
+        Prelude.Nothing
+        Default.def
+
+instance Hashable.Hashable HackSearchByLowerCaseScopeAndKind_key
+         where
+  hashWithSalt __salt
+    (HackSearchByLowerCaseScopeAndKind_key _name _scope _kinds _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
+           _kinds)
+        _entity
+
+data HackSearchByLowerCaseNameAndKind_key = HackSearchByLowerCaseNameAndKind_key{hackSearchByLowerCaseNameAndKind_key_name
+                                                                                 :: Text.Text,
+                                                                                 hackSearchByLowerCaseNameAndKind_key_kinds
+                                                                                 ::
+                                                                                 Prelude.Maybe
+                                                                                   Glean.Schema.CodemarkupTypes.SymbolKind,
+                                                                                 hackSearchByLowerCaseNameAndKind_key_entity
+                                                                                 ::
+                                                                                 Glean.Schema.Code.Entity}
+                                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON HackSearchByLowerCaseNameAndKind_key where
+  toJSON
+    (HackSearchByLowerCaseNameAndKind_key __field__name __field__kinds
+       __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
+             ("entity" .= __field__entity : Prelude.mempty))
+
+instance Thrift.ThriftStruct HackSearchByLowerCaseNameAndKind_key
+         where
+  buildStruct _proxy
+    (HackSearchByLowerCaseNameAndKind_key __field__name __field__kinds
+       __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           let (__cereal__kinds, __id__kinds)
+                 = case __field__kinds of
+                     Prelude.Just _val -> ((:)
+                                             (Thrift.genField _proxy "kinds"
+                                                (Thrift.getI32Type _proxy)
+                                                2
+                                                1
+                                                ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                                                    Thrift.fromThriftEnum)
+                                                   _val)),
+                                           2)
+                     Prelude.Nothing -> (Prelude.id, 1)
+             in
+             __cereal__kinds
+               (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 3
+                  __id__kinds
+                  (Thrift.buildStruct _proxy __field__entity)
+                  : []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__kinds <- ST.newSTRef Prelude.Nothing
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "SymbolKind")
+                                                                        ST.writeSTRef __field__kinds
+                                                                          (Prelude.Just _val)
+                                                                 3 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__kinds <- ST.readSTRef __field__kinds
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (HackSearchByLowerCaseNameAndKind_key __val__name
+                                                  __val__kinds
+                                                  __val__entity)
+              _idMap
+                = HashMap.fromList [("name", 1), ("kinds", 2), ("entity", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData HackSearchByLowerCaseNameAndKind_key where
+  rnf
+    (HackSearchByLowerCaseNameAndKind_key __field__name __field__kinds
+       __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__kinds `Prelude.seq`
+          DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default HackSearchByLowerCaseNameAndKind_key where
+  def
+    = HackSearchByLowerCaseNameAndKind_key "" Prelude.Nothing
+        Default.def
+
+instance Hashable.Hashable HackSearchByLowerCaseNameAndKind_key
+         where
+  hashWithSalt __salt
+    (HackSearchByLowerCaseNameAndKind_key _name _kinds _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _kinds)
+        _entity
+
+data HackNameLowerCase_key = HackNameLowerCase_key{hackNameLowerCase_key_nameLowercase
+                                                   :: Text.Text,
+                                                   hackNameLowerCase_key_kinds ::
+                                                   Prelude.Maybe
+                                                     Glean.Schema.CodemarkupTypes.SymbolKind,
+                                                   hackNameLowerCase_key_name :: Text.Text}
+                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON HackNameLowerCase_key where
+  toJSON
+    (HackNameLowerCase_key __field__nameLowercase __field__kinds
+       __field__name)
+    = Aeson.object
+        ("nameLowercase" .= __field__nameLowercase :
+           Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
+             ("name" .= __field__name : Prelude.mempty))
+
+instance Thrift.ThriftStruct HackNameLowerCase_key where
+  buildStruct _proxy
+    (HackNameLowerCase_key __field__nameLowercase __field__kinds
+       __field__name)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "nameLowercase"
+           (Thrift.getStringType _proxy)
+           1
+           0
+           (Thrift.genText _proxy __field__nameLowercase)
+           :
+           let (__cereal__kinds, __id__kinds)
+                 = case __field__kinds of
+                     Prelude.Just _val -> ((:)
+                                             (Thrift.genField _proxy "kinds"
+                                                (Thrift.getI32Type _proxy)
+                                                2
+                                                1
+                                                ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                                                    Thrift.fromThriftEnum)
+                                                   _val)),
+                                           2)
+                     Prelude.Nothing -> (Prelude.id, 1)
+             in
+             __cereal__kinds
+               (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 3
+                  __id__kinds
+                  (Thrift.genText _proxy __field__name)
+                  : []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__nameLowercase <- ST.newSTRef ""
+            __field__kinds <- ST.newSTRef Prelude.Nothing
+            __field__name <- ST.newSTRef ""
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__nameLowercase
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "SymbolKind")
+                                                                        ST.writeSTRef __field__kinds
+                                                                          (Prelude.Just _val)
+                                                                 3 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__nameLowercase <- ST.readSTRef
+                                                                        __field__nameLowercase
+                                             !__val__kinds <- ST.readSTRef __field__kinds
+                                             !__val__name <- ST.readSTRef __field__name
+                                             Prelude.pure
+                                               (HackNameLowerCase_key __val__nameLowercase
+                                                  __val__kinds
+                                                  __val__name)
+              _idMap
+                = HashMap.fromList
+                    [("nameLowercase", 1), ("kinds", 2), ("name", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData HackNameLowerCase_key where
+  rnf
+    (HackNameLowerCase_key __field__nameLowercase __field__kinds
+       __field__name)
+    = DeepSeq.rnf __field__nameLowercase `Prelude.seq`
+        DeepSeq.rnf __field__kinds `Prelude.seq`
+          DeepSeq.rnf __field__name `Prelude.seq` ()
+
+instance Default.Default HackNameLowerCase_key where
+  def = HackNameLowerCase_key "" Prelude.Nothing ""
+
+instance Hashable.Hashable HackNameLowerCase_key where
+  hashWithSalt __salt
+    (HackNameLowerCase_key _nameLowercase _kinds _name)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt __salt _nameLowercase)
+           _kinds)
+        _name
+
+data GraphQLSearchByName_key = GraphQLSearchByName_key{graphQLSearchByName_key_name
+                                                       :: Text.Text,
+                                                       graphQLSearchByName_key_entity ::
+                                                       Glean.Schema.Code.Entity}
+                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON GraphQLSearchByName_key where
+  toJSON (GraphQLSearchByName_key __field__name __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "entity" .= __field__entity : Prelude.mempty)
+
+instance Thrift.ThriftStruct GraphQLSearchByName_key where
+  buildStruct _proxy
+    (GraphQLSearchByName_key __field__name __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__entity)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (GraphQLSearchByName_key __val__name __val__entity)
+              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData GraphQLSearchByName_key where
+  rnf (GraphQLSearchByName_key __field__name __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default GraphQLSearchByName_key where
+  def = GraphQLSearchByName_key "" Default.def
+
+instance Hashable.Hashable GraphQLSearchByName_key where
+  hashWithSalt __salt (GraphQLSearchByName_key _name _entity)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+        _entity
+
+data GraphQLSearchByLowerCaseName_key = GraphQLSearchByLowerCaseName_key{graphQLSearchByLowerCaseName_key_name
+                                                                         :: Text.Text,
+                                                                         graphQLSearchByLowerCaseName_key_entity
+                                                                         ::
+                                                                         Glean.Schema.Code.Entity}
+                                        deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON GraphQLSearchByLowerCaseName_key where
+  toJSON
+    (GraphQLSearchByLowerCaseName_key __field__name __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "entity" .= __field__entity : Prelude.mempty)
+
+instance Thrift.ThriftStruct GraphQLSearchByLowerCaseName_key where
+  buildStruct _proxy
+    (GraphQLSearchByLowerCaseName_key __field__name __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__entity)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (GraphQLSearchByLowerCaseName_key __val__name
+                                                  __val__entity)
+              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData GraphQLSearchByLowerCaseName_key where
+  rnf
+    (GraphQLSearchByLowerCaseName_key __field__name __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default GraphQLSearchByLowerCaseName_key where
+  def = GraphQLSearchByLowerCaseName_key "" Default.def
+
+instance Hashable.Hashable GraphQLSearchByLowerCaseName_key where
+  hashWithSalt __salt
+    (GraphQLSearchByLowerCaseName_key _name _entity)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+        _entity
+
+data FlowSearchByScopeAndKind_key = FlowSearchByScopeAndKind_key{flowSearchByScopeAndKind_key_name
+                                                                 :: Text.Text,
+                                                                 flowSearchByScopeAndKind_key_scope
+                                                                 :: [Text.Text],
+                                                                 flowSearchByScopeAndKind_key_kinds
+                                                                 ::
+                                                                 Prelude.Maybe
+                                                                   Glean.Schema.CodemarkupTypes.SymbolKind,
+                                                                 flowSearchByScopeAndKind_key_entity
+                                                                 :: Glean.Schema.Code.Entity}
+                                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FlowSearchByScopeAndKind_key where
+  toJSON
+    (FlowSearchByScopeAndKind_key __field__name __field__scope
+       __field__kinds __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "scope" .= __field__scope :
+             Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
+               ("entity" .= __field__entity : Prelude.mempty))
+
+instance Thrift.ThriftStruct FlowSearchByScopeAndKind_key where
+  buildStruct _proxy
+    (FlowSearchByScopeAndKind_key __field__name __field__scope
+       __field__kinds __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "scope" (Thrift.getListType _proxy) 2 1
+             (Thrift.genList _proxy (Thrift.getStringType _proxy)
+                (Thrift.genText _proxy)
+                __field__scope)
+             :
+             let (__cereal__kinds, __id__kinds)
+                   = case __field__kinds of
+                       Prelude.Just _val -> ((:)
+                                               (Thrift.genField _proxy "kinds"
+                                                  (Thrift.getI32Type _proxy)
+                                                  3
+                                                  2
+                                                  ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                                                      Thrift.fromThriftEnum)
+                                                     _val)),
+                                             3)
+                       Prelude.Nothing -> (Prelude.id, 2)
+               in
+               __cereal__kinds
+                 (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4
+                    __id__kinds
+                    (Thrift.buildStruct _proxy __field__entity)
+                    : []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__scope <- ST.newSTRef Default.def
+            __field__kinds <- ST.newSTRef Prelude.Nothing
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseText
+                                                                                           _proxy))
+                                                                        ST.writeSTRef __field__scope
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "SymbolKind")
+                                                                        ST.writeSTRef __field__kinds
+                                                                          (Prelude.Just _val)
+                                                                 4 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__scope <- ST.readSTRef __field__scope
+                                             !__val__kinds <- ST.readSTRef __field__kinds
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (FlowSearchByScopeAndKind_key __val__name
+                                                  __val__scope
+                                                  __val__kinds
+                                                  __val__entity)
+              _idMap
+                = HashMap.fromList
+                    [("name", 1), ("scope", 2), ("kinds", 3), ("entity", 4)]
+            _parse 0)
+
+instance DeepSeq.NFData FlowSearchByScopeAndKind_key where
+  rnf
+    (FlowSearchByScopeAndKind_key __field__name __field__scope
+       __field__kinds __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__scope `Prelude.seq`
+          DeepSeq.rnf __field__kinds `Prelude.seq`
+            DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default FlowSearchByScopeAndKind_key where
+  def
+    = FlowSearchByScopeAndKind_key "" Default.def Prelude.Nothing
+        Default.def
+
+instance Hashable.Hashable FlowSearchByScopeAndKind_key where
+  hashWithSalt __salt
+    (FlowSearchByScopeAndKind_key _name _scope _kinds _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
+           _kinds)
+        _entity
+
+data FlowSearchByNameKindAndScopeFact_key = FlowSearchByNameKindAndScopeFact_key{flowSearchByNameKindAndScopeFact_key_name
+                                                                                 :: Text.Text,
+                                                                                 flowSearchByNameKindAndScopeFact_key_scope
+                                                                                 ::
+                                                                                 Prelude.Maybe
+                                                                                   Glean.Schema.Flow.Module,
+                                                                                 flowSearchByNameKindAndScopeFact_key_kinds
+                                                                                 ::
+                                                                                 Prelude.Maybe
+                                                                                   Glean.Schema.CodemarkupTypes.SymbolKind,
+                                                                                 flowSearchByNameKindAndScopeFact_key_entity
+                                                                                 ::
+                                                                                 Glean.Schema.Code.Entity}
+                                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FlowSearchByNameKindAndScopeFact_key where
+  toJSON
+    (FlowSearchByNameKindAndScopeFact_key __field__name __field__scope
+       __field__kinds __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           Prelude.maybe Prelude.id ((:) . ("scope" .=)) __field__scope
+             (Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
+                ("entity" .= __field__entity : Prelude.mempty)))
+
+instance Thrift.ThriftStruct FlowSearchByNameKindAndScopeFact_key
+         where
+  buildStruct _proxy
+    (FlowSearchByNameKindAndScopeFact_key __field__name __field__scope
+       __field__kinds __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           let (__cereal__scope, __id__scope)
+                 = case __field__scope of
+                     Prelude.Just _val -> ((:)
+                                             (Thrift.genField _proxy "scope"
+                                                (Thrift.getStructType _proxy)
+                                                2
+                                                1
+                                                (Thrift.buildStruct _proxy _val)),
+                                           2)
+                     Prelude.Nothing -> (Prelude.id, 1)
+             in
+             __cereal__scope
+               (let (__cereal__kinds, __id__kinds)
+                      = case __field__kinds of
+                          Prelude.Just _val -> ((:)
+                                                  (Thrift.genField _proxy "kinds"
+                                                     (Thrift.getI32Type _proxy)
+                                                     3
+                                                     __id__scope
+                                                     ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                                                         Thrift.fromThriftEnum)
+                                                        _val)),
+                                                3)
+                          Prelude.Nothing -> (Prelude.id, __id__scope)
+                  in
+                  __cereal__kinds
+                    (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4
+                       __id__kinds
+                       (Thrift.buildStruct _proxy __field__entity)
+                       : [])))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__scope <- ST.newSTRef Prelude.Nothing
+            __field__kinds <- ST.newSTRef Prelude.Nothing
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__scope
+                                                                          (Prelude.Just _val)
+                                                                 3 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "SymbolKind")
+                                                                        ST.writeSTRef __field__kinds
+                                                                          (Prelude.Just _val)
+                                                                 4 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__scope <- ST.readSTRef __field__scope
+                                             !__val__kinds <- ST.readSTRef __field__kinds
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (FlowSearchByNameKindAndScopeFact_key __val__name
+                                                  __val__scope
+                                                  __val__kinds
+                                                  __val__entity)
+              _idMap
+                = HashMap.fromList
+                    [("name", 1), ("scope", 2), ("kinds", 3), ("entity", 4)]
+            _parse 0)
+
+instance DeepSeq.NFData FlowSearchByNameKindAndScopeFact_key where
+  rnf
+    (FlowSearchByNameKindAndScopeFact_key __field__name __field__scope
+       __field__kinds __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__scope `Prelude.seq`
+          DeepSeq.rnf __field__kinds `Prelude.seq`
+            DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default FlowSearchByNameKindAndScopeFact_key where
+  def
+    = FlowSearchByNameKindAndScopeFact_key "" Prelude.Nothing
+        Prelude.Nothing
+        Default.def
+
+instance Hashable.Hashable FlowSearchByNameKindAndScopeFact_key
+         where
+  hashWithSalt __salt
+    (FlowSearchByNameKindAndScopeFact_key _name _scope _kinds _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
+           _kinds)
+        _entity
+
+data FlowSearchByLowerCaseScopeAndKind_key = FlowSearchByLowerCaseScopeAndKind_key{flowSearchByLowerCaseScopeAndKind_key_name
+                                                                                   :: Text.Text,
+                                                                                   flowSearchByLowerCaseScopeAndKind_key_scope
+                                                                                   :: [Text.Text],
+                                                                                   flowSearchByLowerCaseScopeAndKind_key_kinds
+                                                                                   ::
+                                                                                   Prelude.Maybe
+                                                                                     Glean.Schema.CodemarkupTypes.SymbolKind,
+                                                                                   flowSearchByLowerCaseScopeAndKind_key_entity
+                                                                                   ::
+                                                                                   Glean.Schema.Code.Entity}
+                                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FlowSearchByLowerCaseScopeAndKind_key where
+  toJSON
+    (FlowSearchByLowerCaseScopeAndKind_key __field__name __field__scope
+       __field__kinds __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "scope" .= __field__scope :
+             Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
+               ("entity" .= __field__entity : Prelude.mempty))
+
+instance Thrift.ThriftStruct FlowSearchByLowerCaseScopeAndKind_key
+         where
+  buildStruct _proxy
+    (FlowSearchByLowerCaseScopeAndKind_key __field__name __field__scope
+       __field__kinds __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "scope" (Thrift.getListType _proxy) 2 1
+             (Thrift.genList _proxy (Thrift.getStringType _proxy)
+                (Thrift.genText _proxy)
+                __field__scope)
+             :
+             let (__cereal__kinds, __id__kinds)
+                   = case __field__kinds of
+                       Prelude.Just _val -> ((:)
+                                               (Thrift.genField _proxy "kinds"
+                                                  (Thrift.getI32Type _proxy)
+                                                  3
+                                                  2
+                                                  ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                                                      Thrift.fromThriftEnum)
+                                                     _val)),
+                                             3)
+                       Prelude.Nothing -> (Prelude.id, 2)
+               in
+               __cereal__kinds
+                 (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4
+                    __id__kinds
+                    (Thrift.buildStruct _proxy __field__entity)
+                    : []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__scope <- ST.newSTRef Default.def
+            __field__kinds <- ST.newSTRef Prelude.Nothing
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseText
+                                                                                           _proxy))
+                                                                        ST.writeSTRef __field__scope
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "SymbolKind")
+                                                                        ST.writeSTRef __field__kinds
+                                                                          (Prelude.Just _val)
+                                                                 4 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__scope <- ST.readSTRef __field__scope
+                                             !__val__kinds <- ST.readSTRef __field__kinds
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (FlowSearchByLowerCaseScopeAndKind_key __val__name
+                                                  __val__scope
+                                                  __val__kinds
+                                                  __val__entity)
+              _idMap
+                = HashMap.fromList
+                    [("name", 1), ("scope", 2), ("kinds", 3), ("entity", 4)]
+            _parse 0)
+
+instance DeepSeq.NFData FlowSearchByLowerCaseScopeAndKind_key where
+  rnf
+    (FlowSearchByLowerCaseScopeAndKind_key __field__name __field__scope
+       __field__kinds __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__scope `Prelude.seq`
+          DeepSeq.rnf __field__kinds `Prelude.seq`
+            DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default FlowSearchByLowerCaseScopeAndKind_key
+         where
+  def
+    = FlowSearchByLowerCaseScopeAndKind_key "" Default.def
+        Prelude.Nothing
+        Default.def
+
+instance Hashable.Hashable FlowSearchByLowerCaseScopeAndKind_key
+         where
+  hashWithSalt __salt
+    (FlowSearchByLowerCaseScopeAndKind_key _name _scope _kinds _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
+           _kinds)
+        _entity
+
+data FlowSearchByLowerCaseNameKindAndScopeFact_key = FlowSearchByLowerCaseNameKindAndScopeFact_key{flowSearchByLowerCaseNameKindAndScopeFact_key_name
+                                                                                                   ::
+                                                                                                   Text.Text,
+                                                                                                   flowSearchByLowerCaseNameKindAndScopeFact_key_scope
+                                                                                                   ::
+                                                                                                   Prelude.Maybe
+                                                                                                     Glean.Schema.Flow.Module,
+                                                                                                   flowSearchByLowerCaseNameKindAndScopeFact_key_kinds
+                                                                                                   ::
+                                                                                                   Prelude.Maybe
+                                                                                                     Glean.Schema.CodemarkupTypes.SymbolKind,
+                                                                                                   flowSearchByLowerCaseNameKindAndScopeFact_key_entity
+                                                                                                   ::
+                                                                                                   Glean.Schema.Code.Entity}
+                                                     deriving (Prelude.Eq, Prelude.Show,
+                                                               Prelude.Ord)
+
+instance Aeson.ToJSON FlowSearchByLowerCaseNameKindAndScopeFact_key
+         where
+  toJSON
+    (FlowSearchByLowerCaseNameKindAndScopeFact_key __field__name
+       __field__scope __field__kinds __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           Prelude.maybe Prelude.id ((:) . ("scope" .=)) __field__scope
+             (Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
+                ("entity" .= __field__entity : Prelude.mempty)))
+
+instance Thrift.ThriftStruct
+           FlowSearchByLowerCaseNameKindAndScopeFact_key
+         where
+  buildStruct _proxy
+    (FlowSearchByLowerCaseNameKindAndScopeFact_key __field__name
+       __field__scope __field__kinds __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           let (__cereal__scope, __id__scope)
+                 = case __field__scope of
+                     Prelude.Just _val -> ((:)
+                                             (Thrift.genField _proxy "scope"
+                                                (Thrift.getStructType _proxy)
+                                                2
+                                                1
+                                                (Thrift.buildStruct _proxy _val)),
+                                           2)
+                     Prelude.Nothing -> (Prelude.id, 1)
+             in
+             __cereal__scope
+               (let (__cereal__kinds, __id__kinds)
+                      = case __field__kinds of
+                          Prelude.Just _val -> ((:)
+                                                  (Thrift.genField _proxy "kinds"
+                                                     (Thrift.getI32Type _proxy)
+                                                     3
+                                                     __id__scope
+                                                     ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                                                         Thrift.fromThriftEnum)
+                                                        _val)),
+                                                3)
+                          Prelude.Nothing -> (Prelude.id, __id__scope)
+                  in
+                  __cereal__kinds
+                    (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4
+                       __id__kinds
+                       (Thrift.buildStruct _proxy __field__entity)
+                       : [])))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__scope <- ST.newSTRef Prelude.Nothing
+            __field__kinds <- ST.newSTRef Prelude.Nothing
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__scope
+                                                                          (Prelude.Just _val)
+                                                                 3 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "SymbolKind")
+                                                                        ST.writeSTRef __field__kinds
+                                                                          (Prelude.Just _val)
+                                                                 4 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__scope <- ST.readSTRef __field__scope
+                                             !__val__kinds <- ST.readSTRef __field__kinds
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (FlowSearchByLowerCaseNameKindAndScopeFact_key
+                                                  __val__name
+                                                  __val__scope
+                                                  __val__kinds
+                                                  __val__entity)
+              _idMap
+                = HashMap.fromList
+                    [("name", 1), ("scope", 2), ("kinds", 3), ("entity", 4)]
+            _parse 0)
+
+instance DeepSeq.NFData
+           FlowSearchByLowerCaseNameKindAndScopeFact_key
+         where
+  rnf
+    (FlowSearchByLowerCaseNameKindAndScopeFact_key __field__name
+       __field__scope __field__kinds __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__scope `Prelude.seq`
+          DeepSeq.rnf __field__kinds `Prelude.seq`
+            DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default
+           FlowSearchByLowerCaseNameKindAndScopeFact_key
+         where
+  def
+    = FlowSearchByLowerCaseNameKindAndScopeFact_key "" Prelude.Nothing
+        Prelude.Nothing
+        Default.def
+
+instance Hashable.Hashable
+           FlowSearchByLowerCaseNameKindAndScopeFact_key
+         where
+  hashWithSalt __salt
+    (FlowSearchByLowerCaseNameKindAndScopeFact_key _name _scope _kinds
+       _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
+           _kinds)
+        _entity
+
+data FlowNameLowerCase_key = FlowNameLowerCase_key{flowNameLowerCase_key_nameLowercase
+                                                   :: Text.Text,
+                                                   flowNameLowerCase_key_kinds ::
+                                                   Prelude.Maybe
+                                                     Glean.Schema.CodemarkupTypes.SymbolKind,
+                                                   flowNameLowerCase_key_name :: Text.Text}
+                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FlowNameLowerCase_key where
+  toJSON
+    (FlowNameLowerCase_key __field__nameLowercase __field__kinds
+       __field__name)
+    = Aeson.object
+        ("nameLowercase" .= __field__nameLowercase :
+           Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
+             ("name" .= __field__name : Prelude.mempty))
+
+instance Thrift.ThriftStruct FlowNameLowerCase_key where
+  buildStruct _proxy
+    (FlowNameLowerCase_key __field__nameLowercase __field__kinds
+       __field__name)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "nameLowercase"
+           (Thrift.getStringType _proxy)
+           1
+           0
+           (Thrift.genText _proxy __field__nameLowercase)
+           :
+           let (__cereal__kinds, __id__kinds)
+                 = case __field__kinds of
+                     Prelude.Just _val -> ((:)
+                                             (Thrift.genField _proxy "kinds"
+                                                (Thrift.getI32Type _proxy)
+                                                2
+                                                1
+                                                ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                                                    Thrift.fromThriftEnum)
+                                                   _val)),
+                                           2)
+                     Prelude.Nothing -> (Prelude.id, 1)
+             in
+             __cereal__kinds
+               (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 3
+                  __id__kinds
+                  (Thrift.genText _proxy __field__name)
+                  : []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__nameLowercase <- ST.newSTRef ""
+            __field__kinds <- ST.newSTRef Prelude.Nothing
+            __field__name <- ST.newSTRef ""
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__nameLowercase
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "SymbolKind")
+                                                                        ST.writeSTRef __field__kinds
+                                                                          (Prelude.Just _val)
+                                                                 3 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__nameLowercase <- ST.readSTRef
+                                                                        __field__nameLowercase
+                                             !__val__kinds <- ST.readSTRef __field__kinds
+                                             !__val__name <- ST.readSTRef __field__name
+                                             Prelude.pure
+                                               (FlowNameLowerCase_key __val__nameLowercase
+                                                  __val__kinds
+                                                  __val__name)
+              _idMap
+                = HashMap.fromList
+                    [("nameLowercase", 1), ("kinds", 2), ("name", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData FlowNameLowerCase_key where
+  rnf
+    (FlowNameLowerCase_key __field__nameLowercase __field__kinds
+       __field__name)
+    = DeepSeq.rnf __field__nameLowercase `Prelude.seq`
+        DeepSeq.rnf __field__kinds `Prelude.seq`
+          DeepSeq.rnf __field__name `Prelude.seq` ()
+
+instance Default.Default FlowNameLowerCase_key where
+  def = FlowNameLowerCase_key "" Prelude.Nothing ""
+
+instance Hashable.Hashable FlowNameLowerCase_key where
+  hashWithSalt __salt
+    (FlowNameLowerCase_key _nameLowercase _kinds _name)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt __salt _nameLowercase)
+           _kinds)
+        _name
+
+data FbthriftSearchByNameFact_key = FbthriftSearchByNameFact_key{fbthriftSearchByNameFact_key_name
+                                                                 ::
+                                                                 Glean.Schema.Fbthrift.Identifier,
+                                                                 fbthriftSearchByNameFact_key_entity
+                                                                 :: Glean.Schema.Code.Entity}
+                                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FbthriftSearchByNameFact_key where
+  toJSON (FbthriftSearchByNameFact_key __field__name __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "entity" .= __field__entity : Prelude.mempty)
+
+instance Thrift.ThriftStruct FbthriftSearchByNameFact_key where
+  buildStruct _proxy
+    (FbthriftSearchByNameFact_key __field__name __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__name)
+           :
+           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__entity)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef Default.def
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (FbthriftSearchByNameFact_key __val__name
+                                                  __val__entity)
+              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData FbthriftSearchByNameFact_key where
+  rnf (FbthriftSearchByNameFact_key __field__name __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default FbthriftSearchByNameFact_key where
+  def = FbthriftSearchByNameFact_key Default.def Default.def
+
+instance Hashable.Hashable FbthriftSearchByNameFact_key where
+  hashWithSalt __salt (FbthriftSearchByNameFact_key _name _entity)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+        _entity
+
+data ErlangSearchByName_key = ErlangSearchByName_key{erlangSearchByName_key_name
+                                                     :: Text.Text,
+                                                     erlangSearchByName_key_entity ::
+                                                     Glean.Schema.Code.Entity}
+                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ErlangSearchByName_key where
+  toJSON (ErlangSearchByName_key __field__name __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "entity" .= __field__entity : Prelude.mempty)
+
+instance Thrift.ThriftStruct ErlangSearchByName_key where
+  buildStruct _proxy
+    (ErlangSearchByName_key __field__name __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__entity)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (ErlangSearchByName_key __val__name __val__entity)
+              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ErlangSearchByName_key where
+  rnf (ErlangSearchByName_key __field__name __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default ErlangSearchByName_key where
+  def = ErlangSearchByName_key "" Default.def
+
+instance Hashable.Hashable ErlangSearchByName_key where
+  hashWithSalt __salt (ErlangSearchByName_key _name _entity)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+        _entity
+
+data ErlangSearchByLowerCaseName_key = ErlangSearchByLowerCaseName_key{erlangSearchByLowerCaseName_key_name
+                                                                       :: Text.Text,
+                                                                       erlangSearchByLowerCaseName_key_entity
+                                                                       :: Glean.Schema.Code.Entity}
+                                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON ErlangSearchByLowerCaseName_key where
+  toJSON
+    (ErlangSearchByLowerCaseName_key __field__name __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "entity" .= __field__entity : Prelude.mempty)
+
+instance Thrift.ThriftStruct ErlangSearchByLowerCaseName_key where
+  buildStruct _proxy
+    (ErlangSearchByLowerCaseName_key __field__name __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__entity)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (ErlangSearchByLowerCaseName_key __val__name
+                                                  __val__entity)
+              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData ErlangSearchByLowerCaseName_key where
+  rnf (ErlangSearchByLowerCaseName_key __field__name __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default ErlangSearchByLowerCaseName_key where
+  def = ErlangSearchByLowerCaseName_key "" Default.def
+
+instance Hashable.Hashable ErlangSearchByLowerCaseName_key where
+  hashWithSalt __salt (ErlangSearchByLowerCaseName_key _name _entity)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+        _entity
+
+data CxxSearchByScopeAndKind_key = CxxSearchByScopeAndKind_key{cxxSearchByScopeAndKind_key_name
+                                                               :: Text.Text,
+                                                               cxxSearchByScopeAndKind_key_scope ::
+                                                               [Text.Text],
+                                                               cxxSearchByScopeAndKind_key_kinds ::
+                                                               Prelude.Maybe
+                                                                 Glean.Schema.CodemarkupTypes.SymbolKind,
+                                                               cxxSearchByScopeAndKind_key_entity ::
+                                                               Glean.Schema.Code.Entity}
+                                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON CxxSearchByScopeAndKind_key where
+  toJSON
+    (CxxSearchByScopeAndKind_key __field__name __field__scope
+       __field__kinds __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "scope" .= __field__scope :
+             Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
+               ("entity" .= __field__entity : Prelude.mempty))
+
+instance Thrift.ThriftStruct CxxSearchByScopeAndKind_key where
+  buildStruct _proxy
+    (CxxSearchByScopeAndKind_key __field__name __field__scope
+       __field__kinds __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "scope" (Thrift.getListType _proxy) 2 1
+             (Thrift.genList _proxy (Thrift.getStringType _proxy)
+                (Thrift.genText _proxy)
+                __field__scope)
+             :
+             let (__cereal__kinds, __id__kinds)
+                   = case __field__kinds of
+                       Prelude.Just _val -> ((:)
+                                               (Thrift.genField _proxy "kinds"
+                                                  (Thrift.getI32Type _proxy)
+                                                  3
+                                                  2
+                                                  ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                                                      Thrift.fromThriftEnum)
+                                                     _val)),
+                                             3)
+                       Prelude.Nothing -> (Prelude.id, 2)
+               in
+               __cereal__kinds
+                 (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4
+                    __id__kinds
+                    (Thrift.buildStruct _proxy __field__entity)
+                    : []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__scope <- ST.newSTRef Default.def
+            __field__kinds <- ST.newSTRef Prelude.Nothing
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseText
+                                                                                           _proxy))
+                                                                        ST.writeSTRef __field__scope
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "SymbolKind")
+                                                                        ST.writeSTRef __field__kinds
+                                                                          (Prelude.Just _val)
+                                                                 4 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__scope <- ST.readSTRef __field__scope
+                                             !__val__kinds <- ST.readSTRef __field__kinds
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (CxxSearchByScopeAndKind_key __val__name __val__scope
+                                                  __val__kinds
+                                                  __val__entity)
+              _idMap
+                = HashMap.fromList
+                    [("name", 1), ("scope", 2), ("kinds", 3), ("entity", 4)]
+            _parse 0)
+
+instance DeepSeq.NFData CxxSearchByScopeAndKind_key where
+  rnf
+    (CxxSearchByScopeAndKind_key __field__name __field__scope
+       __field__kinds __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__scope `Prelude.seq`
+          DeepSeq.rnf __field__kinds `Prelude.seq`
+            DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default CxxSearchByScopeAndKind_key where
+  def
+    = CxxSearchByScopeAndKind_key "" Default.def Prelude.Nothing
+        Default.def
+
+instance Hashable.Hashable CxxSearchByScopeAndKind_key where
+  hashWithSalt __salt
+    (CxxSearchByScopeAndKind_key _name _scope _kinds _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
+           _kinds)
+        _entity
+
+data CxxSearchByNameKindAndScopeFact_key = CxxSearchByNameKindAndScopeFact_key{cxxSearchByNameKindAndScopeFact_key_name
+                                                                               :: Text.Text,
+                                                                               cxxSearchByNameKindAndScopeFact_key_scope
+                                                                               ::
+                                                                               Glean.Schema.Cxx1.Scope,
+                                                                               cxxSearchByNameKindAndScopeFact_key_kinds
+                                                                               ::
+                                                                               Prelude.Maybe
+                                                                                 Glean.Schema.CodemarkupTypes.SymbolKind,
+                                                                               cxxSearchByNameKindAndScopeFact_key_entity
+                                                                               ::
+                                                                               Glean.Schema.Code.Entity}
+                                           deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON CxxSearchByNameKindAndScopeFact_key where
+  toJSON
+    (CxxSearchByNameKindAndScopeFact_key __field__name __field__scope
+       __field__kinds __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "scope" .= __field__scope :
+             Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
+               ("entity" .= __field__entity : Prelude.mempty))
+
+instance Thrift.ThriftStruct CxxSearchByNameKindAndScopeFact_key
+         where
+  buildStruct _proxy
+    (CxxSearchByNameKindAndScopeFact_key __field__name __field__scope
+       __field__kinds __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "scope" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__scope)
+             :
+             let (__cereal__kinds, __id__kinds)
+                   = case __field__kinds of
+                       Prelude.Just _val -> ((:)
+                                               (Thrift.genField _proxy "kinds"
+                                                  (Thrift.getI32Type _proxy)
+                                                  3
+                                                  2
+                                                  ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                                                      Thrift.fromThriftEnum)
+                                                     _val)),
+                                             3)
+                       Prelude.Nothing -> (Prelude.id, 2)
+               in
+               __cereal__kinds
+                 (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4
+                    __id__kinds
+                    (Thrift.buildStruct _proxy __field__entity)
+                    : []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__scope <- ST.newSTRef Default.def
+            __field__kinds <- ST.newSTRef Prelude.Nothing
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__scope
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "SymbolKind")
+                                                                        ST.writeSTRef __field__kinds
+                                                                          (Prelude.Just _val)
+                                                                 4 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__scope <- ST.readSTRef __field__scope
+                                             !__val__kinds <- ST.readSTRef __field__kinds
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (CxxSearchByNameKindAndScopeFact_key __val__name
+                                                  __val__scope
+                                                  __val__kinds
+                                                  __val__entity)
+              _idMap
+                = HashMap.fromList
+                    [("name", 1), ("scope", 2), ("kinds", 3), ("entity", 4)]
+            _parse 0)
+
+instance DeepSeq.NFData CxxSearchByNameKindAndScopeFact_key where
+  rnf
+    (CxxSearchByNameKindAndScopeFact_key __field__name __field__scope
+       __field__kinds __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__scope `Prelude.seq`
+          DeepSeq.rnf __field__kinds `Prelude.seq`
+            DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default CxxSearchByNameKindAndScopeFact_key where
+  def
+    = CxxSearchByNameKindAndScopeFact_key "" Default.def
+        Prelude.Nothing
+        Default.def
+
+instance Hashable.Hashable CxxSearchByNameKindAndScopeFact_key
+         where
+  hashWithSalt __salt
+    (CxxSearchByNameKindAndScopeFact_key _name _scope _kinds _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
+           _kinds)
+        _entity
+
+data CxxSearchByLowerCaseScopeAndKind_key = CxxSearchByLowerCaseScopeAndKind_key{cxxSearchByLowerCaseScopeAndKind_key_name
+                                                                                 :: Text.Text,
+                                                                                 cxxSearchByLowerCaseScopeAndKind_key_scope
+                                                                                 :: [Text.Text],
+                                                                                 cxxSearchByLowerCaseScopeAndKind_key_kinds
+                                                                                 ::
+                                                                                 Prelude.Maybe
+                                                                                   Glean.Schema.CodemarkupTypes.SymbolKind,
+                                                                                 cxxSearchByLowerCaseScopeAndKind_key_entity
+                                                                                 ::
+                                                                                 Glean.Schema.Code.Entity}
+                                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON CxxSearchByLowerCaseScopeAndKind_key where
+  toJSON
+    (CxxSearchByLowerCaseScopeAndKind_key __field__name __field__scope
+       __field__kinds __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "scope" .= __field__scope :
+             Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
+               ("entity" .= __field__entity : Prelude.mempty))
+
+instance Thrift.ThriftStruct CxxSearchByLowerCaseScopeAndKind_key
+         where
+  buildStruct _proxy
+    (CxxSearchByLowerCaseScopeAndKind_key __field__name __field__scope
+       __field__kinds __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "scope" (Thrift.getListType _proxy) 2 1
+             (Thrift.genList _proxy (Thrift.getStringType _proxy)
+                (Thrift.genText _proxy)
+                __field__scope)
+             :
+             let (__cereal__kinds, __id__kinds)
+                   = case __field__kinds of
+                       Prelude.Just _val -> ((:)
+                                               (Thrift.genField _proxy "kinds"
+                                                  (Thrift.getI32Type _proxy)
+                                                  3
+                                                  2
+                                                  ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                                                      Thrift.fromThriftEnum)
+                                                     _val)),
+                                             3)
+                       Prelude.Nothing -> (Prelude.id, 2)
+               in
+               __cereal__kinds
+                 (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4
+                    __id__kinds
+                    (Thrift.buildStruct _proxy __field__entity)
+                    : []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__scope <- ST.newSTRef Default.def
+            __field__kinds <- ST.newSTRef Prelude.Nothing
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getListType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Prelude.snd <$>
+                                                                                      Thrift.parseList
+                                                                                        _proxy
+                                                                                        (Thrift.parseText
+                                                                                           _proxy))
+                                                                        ST.writeSTRef __field__scope
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "SymbolKind")
+                                                                        ST.writeSTRef __field__kinds
+                                                                          (Prelude.Just _val)
+                                                                 4 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__scope <- ST.readSTRef __field__scope
+                                             !__val__kinds <- ST.readSTRef __field__kinds
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (CxxSearchByLowerCaseScopeAndKind_key __val__name
+                                                  __val__scope
+                                                  __val__kinds
+                                                  __val__entity)
+              _idMap
+                = HashMap.fromList
+                    [("name", 1), ("scope", 2), ("kinds", 3), ("entity", 4)]
+            _parse 0)
+
+instance DeepSeq.NFData CxxSearchByLowerCaseScopeAndKind_key where
+  rnf
+    (CxxSearchByLowerCaseScopeAndKind_key __field__name __field__scope
+       __field__kinds __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__scope `Prelude.seq`
+          DeepSeq.rnf __field__kinds `Prelude.seq`
+            DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default CxxSearchByLowerCaseScopeAndKind_key where
+  def
+    = CxxSearchByLowerCaseScopeAndKind_key "" Default.def
+        Prelude.Nothing
+        Default.def
+
+instance Hashable.Hashable CxxSearchByLowerCaseScopeAndKind_key
+         where
+  hashWithSalt __salt
+    (CxxSearchByLowerCaseScopeAndKind_key _name _scope _kinds _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
+           _kinds)
+        _entity
+
+data CxxSearchByLowerCaseNameKindAndScopeFact_key = CxxSearchByLowerCaseNameKindAndScopeFact_key{cxxSearchByLowerCaseNameKindAndScopeFact_key_name
+                                                                                                 ::
+                                                                                                 Text.Text,
+                                                                                                 cxxSearchByLowerCaseNameKindAndScopeFact_key_scope
+                                                                                                 ::
+                                                                                                 Glean.Schema.Cxx1.Scope,
+                                                                                                 cxxSearchByLowerCaseNameKindAndScopeFact_key_kinds
+                                                                                                 ::
+                                                                                                 Prelude.Maybe
+                                                                                                   Glean.Schema.CodemarkupTypes.SymbolKind,
+                                                                                                 cxxSearchByLowerCaseNameKindAndScopeFact_key_entity
+                                                                                                 ::
+                                                                                                 Glean.Schema.Code.Entity}
+                                                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON CxxSearchByLowerCaseNameKindAndScopeFact_key
+         where
+  toJSON
+    (CxxSearchByLowerCaseNameKindAndScopeFact_key __field__name
+       __field__scope __field__kinds __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "scope" .= __field__scope :
+             Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
+               ("entity" .= __field__entity : Prelude.mempty))
+
+instance Thrift.ThriftStruct
+           CxxSearchByLowerCaseNameKindAndScopeFact_key
+         where
+  buildStruct _proxy
+    (CxxSearchByLowerCaseNameKindAndScopeFact_key __field__name
+       __field__scope __field__kinds __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "scope" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__scope)
+             :
+             let (__cereal__kinds, __id__kinds)
+                   = case __field__kinds of
+                       Prelude.Just _val -> ((:)
+                                               (Thrift.genField _proxy "kinds"
+                                                  (Thrift.getI32Type _proxy)
+                                                  3
+                                                  2
+                                                  ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                                                      Thrift.fromThriftEnum)
+                                                     _val)),
+                                             3)
+                       Prelude.Nothing -> (Prelude.id, 2)
+               in
+               __cereal__kinds
+                 (Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 4
+                    __id__kinds
+                    (Thrift.buildStruct _proxy __field__entity)
+                    : []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__scope <- ST.newSTRef Default.def
+            __field__kinds <- ST.newSTRef Prelude.Nothing
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__scope
+                                                                          _val
+                                                                 3 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "SymbolKind")
+                                                                        ST.writeSTRef __field__kinds
+                                                                          (Prelude.Just _val)
+                                                                 4 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__scope <- ST.readSTRef __field__scope
+                                             !__val__kinds <- ST.readSTRef __field__kinds
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (CxxSearchByLowerCaseNameKindAndScopeFact_key
+                                                  __val__name
+                                                  __val__scope
+                                                  __val__kinds
+                                                  __val__entity)
+              _idMap
+                = HashMap.fromList
+                    [("name", 1), ("scope", 2), ("kinds", 3), ("entity", 4)]
+            _parse 0)
+
+instance DeepSeq.NFData
+           CxxSearchByLowerCaseNameKindAndScopeFact_key
+         where
+  rnf
+    (CxxSearchByLowerCaseNameKindAndScopeFact_key __field__name
+       __field__scope __field__kinds __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__scope `Prelude.seq`
+          DeepSeq.rnf __field__kinds `Prelude.seq`
+            DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default
+           CxxSearchByLowerCaseNameKindAndScopeFact_key
+         where
+  def
+    = CxxSearchByLowerCaseNameKindAndScopeFact_key "" Default.def
+        Prelude.Nothing
+        Default.def
+
+instance Hashable.Hashable
+           CxxSearchByLowerCaseNameKindAndScopeFact_key
+         where
+  hashWithSalt __salt
+    (CxxSearchByLowerCaseNameKindAndScopeFact_key _name _scope _kinds
+       _entity)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name) _scope)
+           _kinds)
+        _entity
+
+data CxxPreferDefinitions_key = CxxPreferDefinitions_key{cxxPreferDefinitions_key_from
+                                                         :: Glean.Schema.CodeCxx.Entity,
+                                                         cxxPreferDefinitions_key_to ::
+                                                         Glean.Schema.CodeCxx.Entity}
+                                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON CxxPreferDefinitions_key where
+  toJSON (CxxPreferDefinitions_key __field__from __field__to)
+    = Aeson.object
+        ("from" .= __field__from : "to" .= __field__to : Prelude.mempty)
+
+instance Thrift.ThriftStruct CxxPreferDefinitions_key where
+  buildStruct _proxy
+    (CxxPreferDefinitions_key __field__from __field__to)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "from" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__from)
+           :
+           Thrift.genField _proxy "to" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__to)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__from <- ST.newSTRef Default.def
+            __field__to <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__from
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__to
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__from <- ST.readSTRef __field__from
+                                             !__val__to <- ST.readSTRef __field__to
+                                             Prelude.pure
+                                               (CxxPreferDefinitions_key __val__from __val__to)
+              _idMap = HashMap.fromList [("from", 1), ("to", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData CxxPreferDefinitions_key where
+  rnf (CxxPreferDefinitions_key __field__from __field__to)
+    = DeepSeq.rnf __field__from `Prelude.seq`
+        DeepSeq.rnf __field__to `Prelude.seq` ()
+
+instance Default.Default CxxPreferDefinitions_key where
+  def = CxxPreferDefinitions_key Default.def Default.def
+
+instance Hashable.Hashable CxxPreferDefinitions_key where
+  hashWithSalt __salt (CxxPreferDefinitions_key _from _to)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _from) _to
+
+data CxxNameLowerCase_key = CxxNameLowerCase_key{cxxNameLowerCase_key_nameLowercase
+                                                 :: Text.Text,
+                                                 cxxNameLowerCase_key_kinds ::
+                                                 Prelude.Maybe
+                                                   Glean.Schema.CodemarkupTypes.SymbolKind,
+                                                 cxxNameLowerCase_key_name :: Text.Text}
+                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON CxxNameLowerCase_key where
+  toJSON
+    (CxxNameLowerCase_key __field__nameLowercase __field__kinds
+       __field__name)
+    = Aeson.object
+        ("nameLowercase" .= __field__nameLowercase :
+           Prelude.maybe Prelude.id ((:) . ("kinds" .=)) __field__kinds
+             ("name" .= __field__name : Prelude.mempty))
+
+instance Thrift.ThriftStruct CxxNameLowerCase_key where
+  buildStruct _proxy
+    (CxxNameLowerCase_key __field__nameLowercase __field__kinds
+       __field__name)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "nameLowercase"
+           (Thrift.getStringType _proxy)
+           1
+           0
+           (Thrift.genText _proxy __field__nameLowercase)
+           :
+           let (__cereal__kinds, __id__kinds)
+                 = case __field__kinds of
+                     Prelude.Just _val -> ((:)
+                                             (Thrift.genField _proxy "kinds"
+                                                (Thrift.getI32Type _proxy)
+                                                2
+                                                1
+                                                ((Thrift.genI32 _proxy . Prelude.fromIntegral .
+                                                    Thrift.fromThriftEnum)
+                                                   _val)),
+                                           2)
+                     Prelude.Nothing -> (Prelude.id, 1)
+             in
+             __cereal__kinds
+               (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 3
+                  __id__kinds
+                  (Thrift.genText _proxy __field__name)
+                  : []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__nameLowercase <- ST.newSTRef ""
+            __field__kinds <- ST.newSTRef Prelude.Nothing
+            __field__name <- ST.newSTRef ""
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__nameLowercase
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getI32Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseEnum
+                                                                                      _proxy
+                                                                                      "SymbolKind")
+                                                                        ST.writeSTRef __field__kinds
+                                                                          (Prelude.Just _val)
+                                                                 3 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__nameLowercase <- ST.readSTRef
+                                                                        __field__nameLowercase
+                                             !__val__kinds <- ST.readSTRef __field__kinds
+                                             !__val__name <- ST.readSTRef __field__name
+                                             Prelude.pure
+                                               (CxxNameLowerCase_key __val__nameLowercase
+                                                  __val__kinds
+                                                  __val__name)
+              _idMap
+                = HashMap.fromList
+                    [("nameLowercase", 1), ("kinds", 2), ("name", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData CxxNameLowerCase_key where
+  rnf
+    (CxxNameLowerCase_key __field__nameLowercase __field__kinds
+       __field__name)
+    = DeepSeq.rnf __field__nameLowercase `Prelude.seq`
+        DeepSeq.rnf __field__kinds `Prelude.seq`
+          DeepSeq.rnf __field__name `Prelude.seq` ()
+
+instance Default.Default CxxNameLowerCase_key where
+  def = CxxNameLowerCase_key "" Prelude.Nothing ""
+
+instance Hashable.Hashable CxxNameLowerCase_key where
+  hashWithSalt __salt
+    (CxxNameLowerCase_key _nameLowercase _kinds _name)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt
+           (Hashable.hashWithSalt __salt _nameLowercase)
+           _kinds)
+        _name
+
+data CSharpSearchByName_key = CSharpSearchByName_key{cSharpSearchByName_key_name
+                                                     :: Text.Text,
+                                                     cSharpSearchByName_key_entity ::
+                                                     Glean.Schema.Code.Entity}
+                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON CSharpSearchByName_key where
+  toJSON (CSharpSearchByName_key __field__name __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "entity" .= __field__entity : Prelude.mempty)
+
+instance Thrift.ThriftStruct CSharpSearchByName_key where
+  buildStruct _proxy
+    (CSharpSearchByName_key __field__name __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__entity)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (CSharpSearchByName_key __val__name __val__entity)
+              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData CSharpSearchByName_key where
+  rnf (CSharpSearchByName_key __field__name __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default CSharpSearchByName_key where
+  def = CSharpSearchByName_key "" Default.def
+
+instance Hashable.Hashable CSharpSearchByName_key where
+  hashWithSalt __salt (CSharpSearchByName_key _name _entity)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+        _entity
+
+data CSharpSearchByLowerCaseName_key = CSharpSearchByLowerCaseName_key{cSharpSearchByLowerCaseName_key_name
+                                                                       :: Text.Text,
+                                                                       cSharpSearchByLowerCaseName_key_entity
+                                                                       :: Glean.Schema.Code.Entity}
+                                       deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON CSharpSearchByLowerCaseName_key where
+  toJSON
+    (CSharpSearchByLowerCaseName_key __field__name __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "entity" .= __field__entity : Prelude.mempty)
+
+instance Thrift.ThriftStruct CSharpSearchByLowerCaseName_key where
+  buildStruct _proxy
+    (CSharpSearchByLowerCaseName_key __field__name __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__entity)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (CSharpSearchByLowerCaseName_key __val__name
+                                                  __val__entity)
+              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData CSharpSearchByLowerCaseName_key where
+  rnf (CSharpSearchByLowerCaseName_key __field__name __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default CSharpSearchByLowerCaseName_key where
+  def = CSharpSearchByLowerCaseName_key "" Default.def
+
+instance Hashable.Hashable CSharpSearchByLowerCaseName_key where
+  hashWithSalt __salt (CSharpSearchByLowerCaseName_key _name _entity)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+        _entity
+
+data BuckSearchByName_key = BuckSearchByName_key{buckSearchByName_key_name
+                                                 :: Text.Text,
+                                                 buckSearchByName_key_entity ::
+                                                 Glean.Schema.Code.Entity}
+                            deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON BuckSearchByName_key where
+  toJSON (BuckSearchByName_key __field__name __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "entity" .= __field__entity : Prelude.mempty)
+
+instance Thrift.ThriftStruct BuckSearchByName_key where
+  buildStruct _proxy
+    (BuckSearchByName_key __field__name __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__entity)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (BuckSearchByName_key __val__name __val__entity)
+              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData BuckSearchByName_key where
+  rnf (BuckSearchByName_key __field__name __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default BuckSearchByName_key where
+  def = BuckSearchByName_key "" Default.def
+
+instance Hashable.Hashable BuckSearchByName_key where
+  hashWithSalt __salt (BuckSearchByName_key _name _entity)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+        _entity
+
+data BuckSearchByLowerCaseName_key = BuckSearchByLowerCaseName_key{buckSearchByLowerCaseName_key_name
+                                                                   :: Text.Text,
+                                                                   buckSearchByLowerCaseName_key_entity
+                                                                   :: Glean.Schema.Code.Entity}
+                                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON BuckSearchByLowerCaseName_key where
+  toJSON
+    (BuckSearchByLowerCaseName_key __field__name __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "entity" .= __field__entity : Prelude.mempty)
+
+instance Thrift.ThriftStruct BuckSearchByLowerCaseName_key where
+  buildStruct _proxy
+    (BuckSearchByLowerCaseName_key __field__name __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__entity)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (BuckSearchByLowerCaseName_key __val__name
+                                                  __val__entity)
+              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData BuckSearchByLowerCaseName_key where
+  rnf (BuckSearchByLowerCaseName_key __field__name __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default BuckSearchByLowerCaseName_key where
+  def = BuckSearchByLowerCaseName_key "" Default.def
+
+instance Hashable.Hashable BuckSearchByLowerCaseName_key where
+  hashWithSalt __salt (BuckSearchByLowerCaseName_key _name _entity)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+        _entity
+
+data BuckSearchByLocalNameFact_key = BuckSearchByLocalNameFact_key{buckSearchByLocalNameFact_key_name
+                                                                   :: Glean.Schema.Buck.LocalName,
+                                                                   buckSearchByLocalNameFact_key_entity
+                                                                   :: Glean.Schema.Code.Entity}
+                                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON BuckSearchByLocalNameFact_key where
+  toJSON
+    (BuckSearchByLocalNameFact_key __field__name __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "entity" .= __field__entity : Prelude.mempty)
+
+instance Thrift.ThriftStruct BuckSearchByLocalNameFact_key where
+  buildStruct _proxy
+    (BuckSearchByLocalNameFact_key __field__name __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStructType _proxy) 1 0
+           (Thrift.buildStruct _proxy __field__name)
+           :
+           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__entity)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef Default.def
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (BuckSearchByLocalNameFact_key __val__name
+                                                  __val__entity)
+              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData BuckSearchByLocalNameFact_key where
+  rnf (BuckSearchByLocalNameFact_key __field__name __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default BuckSearchByLocalNameFact_key where
+  def = BuckSearchByLocalNameFact_key Default.def Default.def
+
+instance Hashable.Hashable BuckSearchByLocalNameFact_key where
+  hashWithSalt __salt (BuckSearchByLocalNameFact_key _name _entity)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+        _entity
+
+data AngleSearchByName_key = AngleSearchByName_key{angleSearchByName_key_name
+                                                   :: Text.Text,
+                                                   angleSearchByName_key_entity ::
+                                                   Glean.Schema.Code.Entity}
+                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON AngleSearchByName_key where
+  toJSON (AngleSearchByName_key __field__name __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "entity" .= __field__entity : Prelude.mempty)
+
+instance Thrift.ThriftStruct AngleSearchByName_key where
+  buildStruct _proxy
+    (AngleSearchByName_key __field__name __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__entity)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (AngleSearchByName_key __val__name __val__entity)
+              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData AngleSearchByName_key where
+  rnf (AngleSearchByName_key __field__name __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default AngleSearchByName_key where
+  def = AngleSearchByName_key "" Default.def
+
+instance Hashable.Hashable AngleSearchByName_key where
+  hashWithSalt __salt (AngleSearchByName_key _name _entity)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+        _entity
+
+data AngleSearchByLowerCaseName_key = AngleSearchByLowerCaseName_key{angleSearchByLowerCaseName_key_name
+                                                                     :: Text.Text,
+                                                                     angleSearchByLowerCaseName_key_entity
+                                                                     :: Glean.Schema.Code.Entity}
+                                      deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON AngleSearchByLowerCaseName_key where
+  toJSON
+    (AngleSearchByLowerCaseName_key __field__name __field__entity)
+    = Aeson.object
+        ("name" .= __field__name :
+           "entity" .= __field__entity : Prelude.mempty)
+
+instance Thrift.ThriftStruct AngleSearchByLowerCaseName_key where
+  buildStruct _proxy
+    (AngleSearchByLowerCaseName_key __field__name __field__entity)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "name" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__name)
+           :
+           Thrift.genField _proxy "entity" (Thrift.getStructType _proxy) 2 1
+             (Thrift.buildStruct _proxy __field__entity)
+             : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__name <- ST.newSTRef ""
+            __field__entity <- ST.newSTRef Default.def
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__name
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__entity
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__name <- ST.readSTRef __field__name
+                                             !__val__entity <- ST.readSTRef __field__entity
+                                             Prelude.pure
+                                               (AngleSearchByLowerCaseName_key __val__name
+                                                  __val__entity)
+              _idMap = HashMap.fromList [("name", 1), ("entity", 2)]
+            _parse 0)
+
+instance DeepSeq.NFData AngleSearchByLowerCaseName_key where
+  rnf (AngleSearchByLowerCaseName_key __field__name __field__entity)
+    = DeepSeq.rnf __field__name `Prelude.seq`
+        DeepSeq.rnf __field__entity `Prelude.seq` ()
+
+instance Default.Default AngleSearchByLowerCaseName_key where
+  def = AngleSearchByLowerCaseName_key "" Default.def
+
+instance Hashable.Hashable AngleSearchByLowerCaseName_key where
+  hashWithSalt __salt (AngleSearchByLowerCaseName_key _name _entity)
+    = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _name)
+        _entity
+{-# LINE 27 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.BuckSearchByName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.BuckSearchByName_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.BuckSearchByName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.BuckSearchByName_key"
+           (Prelude.Just 0))
+{-# LINE 36 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.BuckSearchByName_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+          ('Angle.TNoFields))
+{-# LINE 38 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.BuckSearchByName
+         where
+  type KeyType Glean.Schema.SearchCode.Types.BuckSearchByName =
+       Glean.Schema.SearchCode.Types.BuckSearchByName_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.BuckSearchByName" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.SearchCode.Types.buckSearchByName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.BuckSearchByName x k
+  getFactKey = Glean.Schema.SearchCode.Types.buckSearchByName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 47 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type Glean.Schema.SearchCode.Types.BuckSearchByName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 53 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.BuckSearchByLowerCaseName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.BuckSearchByLowerCaseName_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.BuckSearchByLowerCaseName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.BuckSearchByLowerCaseName_key"
+           (Prelude.Just 0))
+{-# LINE 62 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.BuckSearchByLowerCaseName_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+          ('Angle.TNoFields))
+{-# LINE 64 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.BuckSearchByLowerCaseName
+         where
+  type KeyType
+         Glean.Schema.SearchCode.Types.BuckSearchByLowerCaseName
+       = Glean.Schema.SearchCode.Types.BuckSearchByLowerCaseName_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.BuckSearchByLowerCaseName" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.buckSearchByLowerCaseName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.BuckSearchByLowerCaseName x k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.buckSearchByLowerCaseName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 74 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.BuckSearchByLowerCaseName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 80 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.HackSearchByNameKindWithNamespace_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.HackSearchByNameKindWithNamespace_key
+       x1 x2 x3 x4)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.HackSearchByNameKindWithNamespace_key
+        <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef
+           "search.code.HackSearchByNameKindWithNamespace_key"
+           (Prelude.Just 0))
+{-# LINE 93 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.HackSearchByNameKindWithNamespace_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "scope"
+          (Prelude.Maybe Glean.Schema.Hack.Types.NamespaceQName)
+          ('Angle.TField "kinds"
+             (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
+             ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+                ('Angle.TNoFields))))
+{-# LINE 95 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.HackSearchByNameKindWithNamespace
+         where
+  type KeyType
+         Glean.Schema.SearchCode.Types.HackSearchByNameKindWithNamespace
+       =
+       Glean.Schema.SearchCode.Types.HackSearchByNameKindWithNamespace_key
+  getName _proxy
+    = Glean.PredicateRef
+        "search.code.HackSearchByNameKindWithNamespace"
+        16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.hackSearchByNameKindWithNamespace_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.HackSearchByNameKindWithNamespace x
+        k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.hackSearchByNameKindWithNamespace_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 105 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.HackSearchByNameKindWithNamespace
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 111 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.CxxNameLowerCase_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.CxxNameLowerCase_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.CxxNameLowerCase_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.CxxNameLowerCase_key"
+           (Prelude.Just 0))
+{-# LINE 122 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.CxxNameLowerCase_key
+     =
+     'Angle.TField "nameLowercase" (Data.Text.Text)
+       ('Angle.TField "kinds"
+          (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
+          ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields)))
+{-# LINE 124 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.CxxNameLowerCase
+         where
+  type KeyType Glean.Schema.SearchCode.Types.CxxNameLowerCase =
+       Glean.Schema.SearchCode.Types.CxxNameLowerCase_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.CxxNameLowerCase" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.SearchCode.Types.cxxNameLowerCase_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.CxxNameLowerCase x k
+  getFactKey = Glean.Schema.SearchCode.Types.cxxNameLowerCase_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 133 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type Glean.Schema.SearchCode.Types.CxxNameLowerCase
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 139 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.JavaSearchByScope_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.JavaSearchByScope_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.JavaSearchByScope_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.JavaSearchByScope_key"
+           (Prelude.Just 0))
+{-# LINE 150 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.JavaSearchByScope_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "scope" ([Data.Text.Text])
+          ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+             ('Angle.TNoFields)))
+{-# LINE 152 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.JavaSearchByScope
+         where
+  type KeyType Glean.Schema.SearchCode.Types.JavaSearchByScope =
+       Glean.Schema.SearchCode.Types.JavaSearchByScope_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.JavaSearchByScope" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.SearchCode.Types.javaSearchByScope_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.JavaSearchByScope x k
+  getFactKey = Glean.Schema.SearchCode.Types.javaSearchByScope_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 161 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type Glean.Schema.SearchCode.Types.JavaSearchByScope
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 167 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.SwiftSearchByNameAndKind_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.SwiftSearchByNameAndKind_key x1 x2
+       x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.SwiftSearchByNameAndKind_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.SwiftSearchByNameAndKind_key"
+           (Prelude.Just 0))
+{-# LINE 178 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.SwiftSearchByNameAndKind_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "kind"
+          (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
+          ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+             ('Angle.TNoFields)))
+{-# LINE 180 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.SwiftSearchByNameAndKind
+         where
+  type KeyType Glean.Schema.SearchCode.Types.SwiftSearchByNameAndKind
+       = Glean.Schema.SearchCode.Types.SwiftSearchByNameAndKind_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.SwiftSearchByNameAndKind" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.swiftSearchByNameAndKind_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.SwiftSearchByNameAndKind x k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.swiftSearchByNameAndKind_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 190 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.SwiftSearchByNameAndKind
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 196 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.KotlinSearchByNameWithFact_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.KotlinSearchByNameWithFact_key x1
+       x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.KotlinSearchByNameWithFact_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.KotlinSearchByNameWithFact_key"
+           (Prelude.Just 0))
+{-# LINE 205 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.KotlinSearchByNameWithFact_key
+     =
+     'Angle.TField "name"
+       (Glean.KeyType Glean.Schema.JavakotlinAlpha.Types.QName)
+       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+          ('Angle.TNoFields))
+{-# LINE 207 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.KotlinSearchByNameWithFact
+         where
+  type KeyType
+         Glean.Schema.SearchCode.Types.KotlinSearchByNameWithFact
+       = Glean.Schema.SearchCode.Types.KotlinSearchByNameWithFact_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.KotlinSearchByNameWithFact" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.kotlinSearchByNameWithFact_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.KotlinSearchByNameWithFact x k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.kotlinSearchByNameWithFact_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 217 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.KotlinSearchByNameWithFact
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 223 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.KotlinSearchByLowerCaseName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.KotlinSearchByLowerCaseName_key x1
+       x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.KotlinSearchByLowerCaseName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.KotlinSearchByLowerCaseName_key"
+           (Prelude.Just 0))
+{-# LINE 232 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.KotlinSearchByLowerCaseName_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+          ('Angle.TNoFields))
+{-# LINE 234 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.KotlinSearchByLowerCaseName
+         where
+  type KeyType
+         Glean.Schema.SearchCode.Types.KotlinSearchByLowerCaseName
+       = Glean.Schema.SearchCode.Types.KotlinSearchByLowerCaseName_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.KotlinSearchByLowerCaseName" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.kotlinSearchByLowerCaseName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.KotlinSearchByLowerCaseName x k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.kotlinSearchByLowerCaseName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 244 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.KotlinSearchByLowerCaseName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 250 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.PythonSearchByLowerCaseScopeAndKind_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.PythonSearchByLowerCaseScopeAndKind_key
+       x1 x2 x3 x4)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.PythonSearchByLowerCaseScopeAndKind_key
+        <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef
+           "search.code.PythonSearchByLowerCaseScopeAndKind_key"
+           (Prelude.Just 0))
+{-# LINE 263 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.PythonSearchByLowerCaseScopeAndKind_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "scope" ([Data.Text.Text])
+          ('Angle.TField "kinds"
+             (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
+             ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+                ('Angle.TNoFields))))
+{-# LINE 265 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.PythonSearchByLowerCaseScopeAndKind
+         where
+  type KeyType
+         Glean.Schema.SearchCode.Types.PythonSearchByLowerCaseScopeAndKind
+       =
+       Glean.Schema.SearchCode.Types.PythonSearchByLowerCaseScopeAndKind_key
+  getName _proxy
+    = Glean.PredicateRef
+        "search.code.PythonSearchByLowerCaseScopeAndKind"
+        16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.pythonSearchByLowerCaseScopeAndKind_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.PythonSearchByLowerCaseScopeAndKind
+        x
+        k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.pythonSearchByLowerCaseScopeAndKind_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 275 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.PythonSearchByLowerCaseScopeAndKind
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 281 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.SwiftSearchByLowerCaseNameAndKind_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.SwiftSearchByLowerCaseNameAndKind_key
+       x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.SwiftSearchByLowerCaseNameAndKind_key
+        <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef
+           "search.code.SwiftSearchByLowerCaseNameAndKind_key"
+           (Prelude.Just 0))
+{-# LINE 292 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.SwiftSearchByLowerCaseNameAndKind_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "kind"
+          (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
+          ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+             ('Angle.TNoFields)))
+{-# LINE 294 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.SwiftSearchByLowerCaseNameAndKind
+         where
+  type KeyType
+         Glean.Schema.SearchCode.Types.SwiftSearchByLowerCaseNameAndKind
+       =
+       Glean.Schema.SearchCode.Types.SwiftSearchByLowerCaseNameAndKind_key
+  getName _proxy
+    = Glean.PredicateRef
+        "search.code.SwiftSearchByLowerCaseNameAndKind"
+        16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.swiftSearchByLowerCaseNameAndKind_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.SwiftSearchByLowerCaseNameAndKind x
+        k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.swiftSearchByLowerCaseNameAndKind_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 304 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.SwiftSearchByLowerCaseNameAndKind
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 310 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.KotlinSearchByScopeWithName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.KotlinSearchByScopeWithName_key x1
+       x2 x3 x4)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.KotlinSearchByScopeWithName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.KotlinSearchByScopeWithName_key"
+           (Prelude.Just 0))
+{-# LINE 323 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.KotlinSearchByScopeWithName_key
+     =
+     'Angle.TField "name"
+       (Glean.KeyType Glean.Schema.JavakotlinAlpha.Types.Name)
+       ('Angle.TField "insensitive" (Prelude.Bool)
+          ('Angle.TField "scope" ([Data.Text.Text])
+             ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+                ('Angle.TNoFields))))
+{-# LINE 325 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.KotlinSearchByScopeWithName
+         where
+  type KeyType
+         Glean.Schema.SearchCode.Types.KotlinSearchByScopeWithName
+       = Glean.Schema.SearchCode.Types.KotlinSearchByScopeWithName_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.KotlinSearchByScopeWithName" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.kotlinSearchByScopeWithName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.KotlinSearchByScopeWithName x k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.kotlinSearchByScopeWithName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 335 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.KotlinSearchByScopeWithName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 341 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.BuckSearchByLocalNameFact_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.BuckSearchByLocalNameFact_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.BuckSearchByLocalNameFact_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.BuckSearchByLocalNameFact_key"
+           (Prelude.Just 0))
+{-# LINE 350 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.BuckSearchByLocalNameFact_key
+     =
+     'Angle.TField "name"
+       (Glean.KeyType Glean.Schema.Buck.Types.LocalName)
+       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+          ('Angle.TNoFields))
+{-# LINE 352 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.BuckSearchByLocalNameFact
+         where
+  type KeyType
+         Glean.Schema.SearchCode.Types.BuckSearchByLocalNameFact
+       = Glean.Schema.SearchCode.Types.BuckSearchByLocalNameFact_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.BuckSearchByLocalNameFact" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.buckSearchByLocalNameFact_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.BuckSearchByLocalNameFact x k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.buckSearchByLocalNameFact_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 362 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.BuckSearchByLocalNameFact
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 368 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.SearchByLowerCaseScopeAndKind_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.SearchByLowerCaseScopeAndKind_key x1
+       x2 x3 x4 x5)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+         Glean.buildRtsValue b x5
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.SearchByLowerCaseScopeAndKind_key
+        <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.SearchByLowerCaseScopeAndKind_key"
+           (Prelude.Just 0))
+{-# LINE 383 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.SearchByLowerCaseScopeAndKind_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "scope" ([Data.Text.Text])
+          ('Angle.TField "language" (Glean.Schema.Code.Types.Language)
+             ('Angle.TField "kinds"
+                (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
+                ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+                   ('Angle.TNoFields)))))
+{-# LINE 385 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.SearchByLowerCaseScopeAndKind
+         where
+  type KeyType
+         Glean.Schema.SearchCode.Types.SearchByLowerCaseScopeAndKind
+       = Glean.Schema.SearchCode.Types.SearchByLowerCaseScopeAndKind_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.SearchByLowerCaseScopeAndKind" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.searchByLowerCaseScopeAndKind_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.SearchByLowerCaseScopeAndKind x k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.searchByLowerCaseScopeAndKind_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 395 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.SearchByLowerCaseScopeAndKind
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 401 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.HackSearchByNameKindWithQName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.HackSearchByNameKindWithQName_key x1
+       x2 x3 x4 x5)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+         Glean.buildRtsValue b x5
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.HackSearchByNameKindWithQName_key
+        <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.HackSearchByNameKindWithQName_key"
+           (Prelude.Just 0))
+{-# LINE 416 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.HackSearchByNameKindWithQName_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "scope" (Glean.KeyType Glean.Schema.Hack.Types.Name)
+          ('Angle.TField "scopeNamespace"
+             (Prelude.Maybe Glean.Schema.Hack.Types.NamespaceQName)
+             ('Angle.TField "kinds"
+                (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
+                ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+                   ('Angle.TNoFields)))))
+{-# LINE 418 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.HackSearchByNameKindWithQName
+         where
+  type KeyType
+         Glean.Schema.SearchCode.Types.HackSearchByNameKindWithQName
+       = Glean.Schema.SearchCode.Types.HackSearchByNameKindWithQName_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.HackSearchByNameKindWithQName" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.hackSearchByNameKindWithQName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.HackSearchByNameKindWithQName x k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.hackSearchByNameKindWithQName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 428 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.HackSearchByNameKindWithQName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 434 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.FlowSearchByLowerCaseScopeAndKind_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.FlowSearchByLowerCaseScopeAndKind_key
+       x1 x2 x3 x4)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.FlowSearchByLowerCaseScopeAndKind_key
+        <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef
+           "search.code.FlowSearchByLowerCaseScopeAndKind_key"
+           (Prelude.Just 0))
+{-# LINE 447 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.FlowSearchByLowerCaseScopeAndKind_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "scope" ([Data.Text.Text])
+          ('Angle.TField "kinds"
+             (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
+             ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+                ('Angle.TNoFields))))
+{-# LINE 449 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.FlowSearchByLowerCaseScopeAndKind
+         where
+  type KeyType
+         Glean.Schema.SearchCode.Types.FlowSearchByLowerCaseScopeAndKind
+       =
+       Glean.Schema.SearchCode.Types.FlowSearchByLowerCaseScopeAndKind_key
+  getName _proxy
+    = Glean.PredicateRef
+        "search.code.FlowSearchByLowerCaseScopeAndKind"
+        16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.flowSearchByLowerCaseScopeAndKind_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.FlowSearchByLowerCaseScopeAndKind x
+        k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.flowSearchByLowerCaseScopeAndKind_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 459 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.FlowSearchByLowerCaseScopeAndKind
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 465 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.PythonSearchByScopeAndKind_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.PythonSearchByScopeAndKind_key x1 x2
+       x3 x4)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.PythonSearchByScopeAndKind_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.PythonSearchByScopeAndKind_key"
+           (Prelude.Just 0))
+{-# LINE 478 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.PythonSearchByScopeAndKind_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "scope" ([Data.Text.Text])
+          ('Angle.TField "kinds"
+             (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
+             ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+                ('Angle.TNoFields))))
+{-# LINE 480 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.PythonSearchByScopeAndKind
+         where
+  type KeyType
+         Glean.Schema.SearchCode.Types.PythonSearchByScopeAndKind
+       = Glean.Schema.SearchCode.Types.PythonSearchByScopeAndKind_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.PythonSearchByScopeAndKind" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.pythonSearchByScopeAndKind_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.PythonSearchByScopeAndKind x k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.pythonSearchByScopeAndKind_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 490 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.PythonSearchByScopeAndKind
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 496 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.HsSearchByLowerCaseName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.HsSearchByLowerCaseName_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.HsSearchByLowerCaseName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.HsSearchByLowerCaseName_key"
+           (Prelude.Just 0))
+{-# LINE 505 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.HsSearchByLowerCaseName_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+          ('Angle.TNoFields))
+{-# LINE 507 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.HsSearchByLowerCaseName
+         where
+  type KeyType Glean.Schema.SearchCode.Types.HsSearchByLowerCaseName
+       = Glean.Schema.SearchCode.Types.HsSearchByLowerCaseName_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.HsSearchByLowerCaseName" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.hsSearchByLowerCaseName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.HsSearchByLowerCaseName x k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.hsSearchByLowerCaseName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 516 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.HsSearchByLowerCaseName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 522 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.CxxPreferDefinitions_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.CxxPreferDefinitions_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.CxxPreferDefinitions_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.CxxPreferDefinitions_key"
+           (Prelude.Just 0))
+{-# LINE 531 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.CxxPreferDefinitions_key
+     =
+     'Angle.TField "from" (Glean.Schema.CodeCxx.Types.Entity)
+       ('Angle.TField "to" (Glean.Schema.CodeCxx.Types.Entity)
+          ('Angle.TNoFields))
+{-# LINE 533 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.CxxPreferDefinitions
+         where
+  type KeyType Glean.Schema.SearchCode.Types.CxxPreferDefinitions =
+       Glean.Schema.SearchCode.Types.CxxPreferDefinitions_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.CxxPreferDefinitions" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.SearchCode.Types.cxxPreferDefinitions_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.CxxPreferDefinitions x k
+  getFactKey = Glean.Schema.SearchCode.Types.cxxPreferDefinitions_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 542 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.CxxPreferDefinitions
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 548 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.KotlinSearchByScope_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.KotlinSearchByScope_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.KotlinSearchByScope_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.KotlinSearchByScope_key"
+           (Prelude.Just 0))
+{-# LINE 559 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.KotlinSearchByScope_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "scope" ([Data.Text.Text])
+          ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+             ('Angle.TNoFields)))
+{-# LINE 561 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.KotlinSearchByScope
+         where
+  type KeyType Glean.Schema.SearchCode.Types.KotlinSearchByScope =
+       Glean.Schema.SearchCode.Types.KotlinSearchByScope_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.KotlinSearchByScope" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.SearchCode.Types.kotlinSearchByScope_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.KotlinSearchByScope x k
+  getFactKey = Glean.Schema.SearchCode.Types.kotlinSearchByScope_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 570 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.KotlinSearchByScope
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 576 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.AngleSearchByName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.AngleSearchByName_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.AngleSearchByName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.AngleSearchByName_key"
+           (Prelude.Just 0))
+{-# LINE 585 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.AngleSearchByName_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+          ('Angle.TNoFields))
+{-# LINE 587 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.AngleSearchByName
+         where
+  type KeyType Glean.Schema.SearchCode.Types.AngleSearchByName =
+       Glean.Schema.SearchCode.Types.AngleSearchByName_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.AngleSearchByName" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.SearchCode.Types.angleSearchByName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.AngleSearchByName x k
+  getFactKey = Glean.Schema.SearchCode.Types.angleSearchByName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 596 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type Glean.Schema.SearchCode.Types.AngleSearchByName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 602 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type Glean.Schema.SearchCode.Types.SearchByScope_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.SearchByScope_key x1 x2 x3 x4)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.SearchByScope_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.SearchByScope_key" (Prelude.Just 0))
+{-# LINE 615 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.SearchCode.Types.SearchByScope_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "scope" ([Data.Text.Text])
+          ('Angle.TField "language" (Glean.Schema.Code.Types.Language)
+             ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+                ('Angle.TNoFields))))
+{-# LINE 617 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.SearchByScope
+         where
+  type KeyType Glean.Schema.SearchCode.Types.SearchByScope =
+       Glean.Schema.SearchCode.Types.SearchByScope_key
+  getName _proxy = Glean.PredicateRef "search.code.SearchByScope" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.SearchCode.Types.searchByScope_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.SearchByScope x k
+  getFactKey = Glean.Schema.SearchCode.Types.searchByScope_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 626 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type Glean.Schema.SearchCode.Types.SearchByScope
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 632 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.CxxSearchByScopeAndKind_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.CxxSearchByScopeAndKind_key x1 x2 x3
+       x4)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.CxxSearchByScopeAndKind_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.CxxSearchByScopeAndKind_key"
+           (Prelude.Just 0))
+{-# LINE 645 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.CxxSearchByScopeAndKind_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "scope" ([Data.Text.Text])
+          ('Angle.TField "kinds"
+             (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
+             ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+                ('Angle.TNoFields))))
+{-# LINE 647 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.CxxSearchByScopeAndKind
+         where
+  type KeyType Glean.Schema.SearchCode.Types.CxxSearchByScopeAndKind
+       = Glean.Schema.SearchCode.Types.CxxSearchByScopeAndKind_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.CxxSearchByScopeAndKind" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.cxxSearchByScopeAndKind_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.CxxSearchByScopeAndKind x k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.cxxSearchByScopeAndKind_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 656 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.CxxSearchByScopeAndKind
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 662 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.CSharpSearchByLowerCaseName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.CSharpSearchByLowerCaseName_key x1
+       x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.CSharpSearchByLowerCaseName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.CSharpSearchByLowerCaseName_key"
+           (Prelude.Just 0))
+{-# LINE 671 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.CSharpSearchByLowerCaseName_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+          ('Angle.TNoFields))
+{-# LINE 673 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.CSharpSearchByLowerCaseName
+         where
+  type KeyType
+         Glean.Schema.SearchCode.Types.CSharpSearchByLowerCaseName
+       = Glean.Schema.SearchCode.Types.CSharpSearchByLowerCaseName_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.CSharpSearchByLowerCaseName" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.cSharpSearchByLowerCaseName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.CSharpSearchByLowerCaseName x k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.cSharpSearchByLowerCaseName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 683 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.CSharpSearchByLowerCaseName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 689 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.LsifSearchByName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.LsifSearchByName_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.LsifSearchByName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.LsifSearchByName_key"
+           (Prelude.Just 0))
+{-# LINE 698 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.LsifSearchByName_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+          ('Angle.TNoFields))
+{-# LINE 700 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.LsifSearchByName
+         where
+  type KeyType Glean.Schema.SearchCode.Types.LsifSearchByName =
+       Glean.Schema.SearchCode.Types.LsifSearchByName_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.LsifSearchByName" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.SearchCode.Types.lsifSearchByName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.LsifSearchByName x k
+  getFactKey = Glean.Schema.SearchCode.Types.lsifSearchByName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 709 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type Glean.Schema.SearchCode.Types.LsifSearchByName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 715 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.HackNameLowerCase_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.HackNameLowerCase_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.HackNameLowerCase_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.HackNameLowerCase_key"
+           (Prelude.Just 0))
+{-# LINE 726 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.HackNameLowerCase_key
+     =
+     'Angle.TField "nameLowercase" (Data.Text.Text)
+       ('Angle.TField "kinds"
+          (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
+          ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields)))
+{-# LINE 728 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.HackNameLowerCase
+         where
+  type KeyType Glean.Schema.SearchCode.Types.HackNameLowerCase =
+       Glean.Schema.SearchCode.Types.HackNameLowerCase_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.HackNameLowerCase" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.SearchCode.Types.hackNameLowerCase_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.HackNameLowerCase x k
+  getFactKey = Glean.Schema.SearchCode.Types.hackNameLowerCase_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 737 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type Glean.Schema.SearchCode.Types.HackNameLowerCase
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 743 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.RustSearchByLowerCaseNameAndKind_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.RustSearchByLowerCaseNameAndKind_key
+       x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.RustSearchByLowerCaseNameAndKind_key
+        <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.RustSearchByLowerCaseNameAndKind_key"
+           (Prelude.Just 0))
+{-# LINE 754 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.RustSearchByLowerCaseNameAndKind_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "kind"
+          (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
+          ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+             ('Angle.TNoFields)))
+{-# LINE 756 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.RustSearchByLowerCaseNameAndKind
+         where
+  type KeyType
+         Glean.Schema.SearchCode.Types.RustSearchByLowerCaseNameAndKind
+       =
+       Glean.Schema.SearchCode.Types.RustSearchByLowerCaseNameAndKind_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.RustSearchByLowerCaseNameAndKind"
+        16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.rustSearchByLowerCaseNameAndKind_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.RustSearchByLowerCaseNameAndKind x
+        k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.rustSearchByLowerCaseNameAndKind_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 766 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.RustSearchByLowerCaseNameAndKind
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 772 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.FlowSearchByScopeAndKind_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.FlowSearchByScopeAndKind_key x1 x2
+       x3 x4)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.FlowSearchByScopeAndKind_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.FlowSearchByScopeAndKind_key"
+           (Prelude.Just 0))
+{-# LINE 785 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.FlowSearchByScopeAndKind_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "scope" ([Data.Text.Text])
+          ('Angle.TField "kinds"
+             (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
+             ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+                ('Angle.TNoFields))))
+{-# LINE 787 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.FlowSearchByScopeAndKind
+         where
+  type KeyType Glean.Schema.SearchCode.Types.FlowSearchByScopeAndKind
+       = Glean.Schema.SearchCode.Types.FlowSearchByScopeAndKind_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.FlowSearchByScopeAndKind" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.flowSearchByScopeAndKind_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.FlowSearchByScopeAndKind x k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.flowSearchByScopeAndKind_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 797 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.FlowSearchByScopeAndKind
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 803 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.CSharpSearchByName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.CSharpSearchByName_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.CSharpSearchByName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.CSharpSearchByName_key"
+           (Prelude.Just 0))
+{-# LINE 812 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.CSharpSearchByName_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+          ('Angle.TNoFields))
+{-# LINE 814 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.CSharpSearchByName
+         where
+  type KeyType Glean.Schema.SearchCode.Types.CSharpSearchByName =
+       Glean.Schema.SearchCode.Types.CSharpSearchByName_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.CSharpSearchByName" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.SearchCode.Types.cSharpSearchByName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.CSharpSearchByName x k
+  getFactKey = Glean.Schema.SearchCode.Types.cSharpSearchByName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 823 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.CSharpSearchByName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 829 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.ThriftSearchByName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.ThriftSearchByName_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.ThriftSearchByName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.ThriftSearchByName_key"
+           (Prelude.Just 0))
+{-# LINE 838 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.ThriftSearchByName_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+          ('Angle.TNoFields))
+{-# LINE 840 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.ThriftSearchByName
+         where
+  type KeyType Glean.Schema.SearchCode.Types.ThriftSearchByName =
+       Glean.Schema.SearchCode.Types.ThriftSearchByName_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.ThriftSearchByName" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.SearchCode.Types.thriftSearchByName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.ThriftSearchByName x k
+  getFactKey = Glean.Schema.SearchCode.Types.thriftSearchByName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 849 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.ThriftSearchByName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 855 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.JavaSearchByScopeWithName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.JavaSearchByScopeWithName_key x1 x2
+       x3 x4)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.JavaSearchByScopeWithName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.JavaSearchByScopeWithName_key"
+           (Prelude.Just 0))
+{-# LINE 868 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.JavaSearchByScopeWithName_key
+     =
+     'Angle.TField "name"
+       (Glean.KeyType Glean.Schema.JavakotlinAlpha.Types.Name)
+       ('Angle.TField "insensitive" (Prelude.Bool)
+          ('Angle.TField "scope" ([Data.Text.Text])
+             ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+                ('Angle.TNoFields))))
+{-# LINE 870 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.JavaSearchByScopeWithName
+         where
+  type KeyType
+         Glean.Schema.SearchCode.Types.JavaSearchByScopeWithName
+       = Glean.Schema.SearchCode.Types.JavaSearchByScopeWithName_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.JavaSearchByScopeWithName" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.javaSearchByScopeWithName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.JavaSearchByScopeWithName x k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.javaSearchByScopeWithName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 880 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.JavaSearchByScopeWithName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 886 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.CxxSearchByLowerCaseNameKindAndScopeFact_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.CxxSearchByLowerCaseNameKindAndScopeFact_key
+       x1 x2 x3 x4)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.CxxSearchByLowerCaseNameKindAndScopeFact_key
+        <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef
+           "search.code.CxxSearchByLowerCaseNameKindAndScopeFact_key"
+           (Prelude.Just 0))
+{-# LINE 899 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.CxxSearchByLowerCaseNameKindAndScopeFact_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "scope" (Glean.Schema.Cxx1.Types.Scope)
+          ('Angle.TField "kinds"
+             (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
+             ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+                ('Angle.TNoFields))))
+{-# LINE 901 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.CxxSearchByLowerCaseNameKindAndScopeFact
+         where
+  type KeyType
+         Glean.Schema.SearchCode.Types.CxxSearchByLowerCaseNameKindAndScopeFact
+       =
+       Glean.Schema.SearchCode.Types.CxxSearchByLowerCaseNameKindAndScopeFact_key
+  getName _proxy
+    = Glean.PredicateRef
+        "search.code.CxxSearchByLowerCaseNameKindAndScopeFact"
+        16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.cxxSearchByLowerCaseNameKindAndScopeFact_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.CxxSearchByLowerCaseNameKindAndScopeFact
+        x
+        k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.cxxSearchByLowerCaseNameKindAndScopeFact_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 911 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.CxxSearchByLowerCaseNameKindAndScopeFact
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 917 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.HackSearchByNameAndKind_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.HackSearchByNameAndKind_key x1 x2
+       x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.HackSearchByNameAndKind_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.HackSearchByNameAndKind_key"
+           (Prelude.Just 0))
+{-# LINE 928 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.HackSearchByNameAndKind_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "kinds"
+          (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
+          ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+             ('Angle.TNoFields)))
+{-# LINE 930 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.HackSearchByNameAndKind
+         where
+  type KeyType Glean.Schema.SearchCode.Types.HackSearchByNameAndKind
+       = Glean.Schema.SearchCode.Types.HackSearchByNameAndKind_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.HackSearchByNameAndKind" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.hackSearchByNameAndKind_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.HackSearchByNameAndKind x k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.hackSearchByNameAndKind_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 939 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.HackSearchByNameAndKind
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 945 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.FbthriftSearchByNameFact_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.FbthriftSearchByNameFact_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.FbthriftSearchByNameFact_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.FbthriftSearchByNameFact_key"
+           (Prelude.Just 0))
+{-# LINE 954 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.FbthriftSearchByNameFact_key
+     =
+     'Angle.TField "name"
+       (Glean.KeyType Glean.Schema.Fbthrift.Types.Identifier)
+       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+          ('Angle.TNoFields))
+{-# LINE 956 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.FbthriftSearchByNameFact
+         where
+  type KeyType Glean.Schema.SearchCode.Types.FbthriftSearchByNameFact
+       = Glean.Schema.SearchCode.Types.FbthriftSearchByNameFact_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.FbthriftSearchByNameFact" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.fbthriftSearchByNameFact_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.FbthriftSearchByNameFact x k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.fbthriftSearchByNameFact_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 966 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.FbthriftSearchByNameFact
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 972 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.ErlangSearchByName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.ErlangSearchByName_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.ErlangSearchByName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.ErlangSearchByName_key"
+           (Prelude.Just 0))
+{-# LINE 981 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.ErlangSearchByName_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+          ('Angle.TNoFields))
+{-# LINE 983 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.ErlangSearchByName
+         where
+  type KeyType Glean.Schema.SearchCode.Types.ErlangSearchByName =
+       Glean.Schema.SearchCode.Types.ErlangSearchByName_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.ErlangSearchByName" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.SearchCode.Types.erlangSearchByName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.ErlangSearchByName x k
+  getFactKey = Glean.Schema.SearchCode.Types.erlangSearchByName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 992 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.ErlangSearchByName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 998 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.SearchByNameKindAndLanguage_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.SearchByNameKindAndLanguage_key x1
+       x2 x3 x4)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.SearchByNameKindAndLanguage_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.SearchByNameKindAndLanguage_key"
+           (Prelude.Just 0))
+{-# LINE 1011 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.SearchByNameKindAndLanguage_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "language" (Glean.Schema.Code.Types.Language)
+          ('Angle.TField "kinds"
+             (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
+             ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+                ('Angle.TNoFields))))
+{-# LINE 1013 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.SearchByNameKindAndLanguage
+         where
+  type KeyType
+         Glean.Schema.SearchCode.Types.SearchByNameKindAndLanguage
+       = Glean.Schema.SearchCode.Types.SearchByNameKindAndLanguage_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.SearchByNameKindAndLanguage" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.searchByNameKindAndLanguage_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.SearchByNameKindAndLanguage x k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.searchByNameKindAndLanguage_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1023 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.SearchByNameKindAndLanguage
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1029 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.HackSearchByScopeAndKind_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.HackSearchByScopeAndKind_key x1 x2
+       x3 x4)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.HackSearchByScopeAndKind_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.HackSearchByScopeAndKind_key"
+           (Prelude.Just 0))
+{-# LINE 1042 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.HackSearchByScopeAndKind_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "scope" ([Data.Text.Text])
+          ('Angle.TField "kinds"
+             (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
+             ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+                ('Angle.TNoFields))))
+{-# LINE 1044 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.HackSearchByScopeAndKind
+         where
+  type KeyType Glean.Schema.SearchCode.Types.HackSearchByScopeAndKind
+       = Glean.Schema.SearchCode.Types.HackSearchByScopeAndKind_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.HackSearchByScopeAndKind" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.hackSearchByScopeAndKind_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.HackSearchByScopeAndKind x k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.hackSearchByScopeAndKind_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1054 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.HackSearchByScopeAndKind
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1060 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.CxxSearchByLowerCaseScopeAndKind_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.CxxSearchByLowerCaseScopeAndKind_key
+       x1 x2 x3 x4)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.CxxSearchByLowerCaseScopeAndKind_key
+        <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.CxxSearchByLowerCaseScopeAndKind_key"
+           (Prelude.Just 0))
+{-# LINE 1073 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.CxxSearchByLowerCaseScopeAndKind_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "scope" ([Data.Text.Text])
+          ('Angle.TField "kinds"
+             (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
+             ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+                ('Angle.TNoFields))))
+{-# LINE 1075 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.CxxSearchByLowerCaseScopeAndKind
+         where
+  type KeyType
+         Glean.Schema.SearchCode.Types.CxxSearchByLowerCaseScopeAndKind
+       =
+       Glean.Schema.SearchCode.Types.CxxSearchByLowerCaseScopeAndKind_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.CxxSearchByLowerCaseScopeAndKind"
+        16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.cxxSearchByLowerCaseScopeAndKind_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.CxxSearchByLowerCaseScopeAndKind x
+        k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.cxxSearchByLowerCaseScopeAndKind_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1085 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.CxxSearchByLowerCaseScopeAndKind
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1091 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.PpSearchByLowerCaseNameKind_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.PpSearchByLowerCaseNameKind_key x1
+       x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.PpSearchByLowerCaseNameKind_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.PpSearchByLowerCaseNameKind_key"
+           (Prelude.Just 0))
+{-# LINE 1102 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.PpSearchByLowerCaseNameKind_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "kinds"
+          (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
+          ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+             ('Angle.TNoFields)))
+{-# LINE 1104 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.PpSearchByLowerCaseNameKind
+         where
+  type KeyType
+         Glean.Schema.SearchCode.Types.PpSearchByLowerCaseNameKind
+       = Glean.Schema.SearchCode.Types.PpSearchByLowerCaseNameKind_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.PpSearchByLowerCaseNameKind" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.ppSearchByLowerCaseNameKind_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.PpSearchByLowerCaseNameKind x k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.ppSearchByLowerCaseNameKind_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1114 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.PpSearchByLowerCaseNameKind
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1120 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.SearchByLowerCaseNameAndLanguage_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.SearchByLowerCaseNameAndLanguage_key
+       x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.SearchByLowerCaseNameAndLanguage_key
+        <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.SearchByLowerCaseNameAndLanguage_key"
+           (Prelude.Just 0))
+{-# LINE 1131 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.SearchByLowerCaseNameAndLanguage_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "language" (Glean.Schema.Code.Types.Language)
+          ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+             ('Angle.TNoFields)))
+{-# LINE 1133 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.SearchByLowerCaseNameAndLanguage
+         where
+  type KeyType
+         Glean.Schema.SearchCode.Types.SearchByLowerCaseNameAndLanguage
+       =
+       Glean.Schema.SearchCode.Types.SearchByLowerCaseNameAndLanguage_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.SearchByLowerCaseNameAndLanguage"
+        16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.searchByLowerCaseNameAndLanguage_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.SearchByLowerCaseNameAndLanguage x
+        k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.searchByLowerCaseNameAndLanguage_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1143 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.SearchByLowerCaseNameAndLanguage
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1149 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.KotlinSearchByName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.KotlinSearchByName_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.KotlinSearchByName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.KotlinSearchByName_key"
+           (Prelude.Just 0))
+{-# LINE 1158 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.KotlinSearchByName_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+          ('Angle.TNoFields))
+{-# LINE 1160 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.KotlinSearchByName
+         where
+  type KeyType Glean.Schema.SearchCode.Types.KotlinSearchByName =
+       Glean.Schema.SearchCode.Types.KotlinSearchByName_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.KotlinSearchByName" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.SearchCode.Types.kotlinSearchByName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.KotlinSearchByName x k
+  getFactKey = Glean.Schema.SearchCode.Types.kotlinSearchByName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1169 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.KotlinSearchByName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1175 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.AngleSearchByLowerCaseName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.AngleSearchByLowerCaseName_key x1
+       x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.AngleSearchByLowerCaseName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.AngleSearchByLowerCaseName_key"
+           (Prelude.Just 0))
+{-# LINE 1184 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.AngleSearchByLowerCaseName_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+          ('Angle.TNoFields))
+{-# LINE 1186 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.AngleSearchByLowerCaseName
+         where
+  type KeyType
+         Glean.Schema.SearchCode.Types.AngleSearchByLowerCaseName
+       = Glean.Schema.SearchCode.Types.AngleSearchByLowerCaseName_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.AngleSearchByLowerCaseName" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.angleSearchByLowerCaseName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.AngleSearchByLowerCaseName x k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.angleSearchByLowerCaseName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1196 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.AngleSearchByLowerCaseName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1202 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.KotlinSearchByLowerCaseScope_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.KotlinSearchByLowerCaseScope_key x1
+       x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.KotlinSearchByLowerCaseScope_key
+        <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.KotlinSearchByLowerCaseScope_key"
+           (Prelude.Just 0))
+{-# LINE 1213 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.KotlinSearchByLowerCaseScope_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "scope" ([Data.Text.Text])
+          ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+             ('Angle.TNoFields)))
+{-# LINE 1215 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.KotlinSearchByLowerCaseScope
+         where
+  type KeyType
+         Glean.Schema.SearchCode.Types.KotlinSearchByLowerCaseScope
+       = Glean.Schema.SearchCode.Types.KotlinSearchByLowerCaseScope_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.KotlinSearchByLowerCaseScope" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.kotlinSearchByLowerCaseScope_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.KotlinSearchByLowerCaseScope x k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.kotlinSearchByLowerCaseScope_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1225 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.KotlinSearchByLowerCaseScope
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1231 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.JavaSearchByLowerCaseName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.JavaSearchByLowerCaseName_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.JavaSearchByLowerCaseName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.JavaSearchByLowerCaseName_key"
+           (Prelude.Just 0))
+{-# LINE 1240 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.JavaSearchByLowerCaseName_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+          ('Angle.TNoFields))
+{-# LINE 1242 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.JavaSearchByLowerCaseName
+         where
+  type KeyType
+         Glean.Schema.SearchCode.Types.JavaSearchByLowerCaseName
+       = Glean.Schema.SearchCode.Types.JavaSearchByLowerCaseName_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.JavaSearchByLowerCaseName" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.javaSearchByLowerCaseName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.JavaSearchByLowerCaseName x k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.javaSearchByLowerCaseName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1252 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.JavaSearchByLowerCaseName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1258 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.LsifSearchByLowerCaseName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.LsifSearchByLowerCaseName_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.LsifSearchByLowerCaseName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.LsifSearchByLowerCaseName_key"
+           (Prelude.Just 0))
+{-# LINE 1267 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.LsifSearchByLowerCaseName_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+          ('Angle.TNoFields))
+{-# LINE 1269 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.LsifSearchByLowerCaseName
+         where
+  type KeyType
+         Glean.Schema.SearchCode.Types.LsifSearchByLowerCaseName
+       = Glean.Schema.SearchCode.Types.LsifSearchByLowerCaseName_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.LsifSearchByLowerCaseName" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.lsifSearchByLowerCaseName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.LsifSearchByLowerCaseName x k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.lsifSearchByLowerCaseName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1279 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.LsifSearchByLowerCaseName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1285 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.SearchByScopeAndKind_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.SearchByScopeAndKind_key x1 x2 x3 x4
+       x5)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+         Glean.buildRtsValue b x5
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.SearchByScopeAndKind_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.SearchByScopeAndKind_key"
+           (Prelude.Just 0))
+{-# LINE 1300 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.SearchByScopeAndKind_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "scope" ([Data.Text.Text])
+          ('Angle.TField "language" (Glean.Schema.Code.Types.Language)
+             ('Angle.TField "kinds"
+                (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
+                ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+                   ('Angle.TNoFields)))))
+{-# LINE 1302 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.SearchByScopeAndKind
+         where
+  type KeyType Glean.Schema.SearchCode.Types.SearchByScopeAndKind =
+       Glean.Schema.SearchCode.Types.SearchByScopeAndKind_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.SearchByScopeAndKind" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.SearchCode.Types.searchByScopeAndKind_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.SearchByScopeAndKind x k
+  getFactKey = Glean.Schema.SearchCode.Types.searchByScopeAndKind_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1311 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.SearchByScopeAndKind
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1317 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.SearchByLowerCaseNameKindAndLanguage_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.SearchByLowerCaseNameKindAndLanguage_key
+       x1 x2 x3 x4)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.SearchByLowerCaseNameKindAndLanguage_key
+        <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef
+           "search.code.SearchByLowerCaseNameKindAndLanguage_key"
+           (Prelude.Just 0))
+{-# LINE 1330 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.SearchByLowerCaseNameKindAndLanguage_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "language" (Glean.Schema.Code.Types.Language)
+          ('Angle.TField "kinds"
+             (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
+             ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+                ('Angle.TNoFields))))
+{-# LINE 1332 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.SearchByLowerCaseNameKindAndLanguage
+         where
+  type KeyType
+         Glean.Schema.SearchCode.Types.SearchByLowerCaseNameKindAndLanguage
+       =
+       Glean.Schema.SearchCode.Types.SearchByLowerCaseNameKindAndLanguage_key
+  getName _proxy
+    = Glean.PredicateRef
+        "search.code.SearchByLowerCaseNameKindAndLanguage"
+        16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.searchByLowerCaseNameKindAndLanguage_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.SearchByLowerCaseNameKindAndLanguage
+        x
+        k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.searchByLowerCaseNameKindAndLanguage_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1342 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.SearchByLowerCaseNameKindAndLanguage
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1348 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.FlowNameLowerCase_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.FlowNameLowerCase_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.FlowNameLowerCase_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.FlowNameLowerCase_key"
+           (Prelude.Just 0))
+{-# LINE 1359 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.FlowNameLowerCase_key
+     =
+     'Angle.TField "nameLowercase" (Data.Text.Text)
+       ('Angle.TField "kinds"
+          (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
+          ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields)))
+{-# LINE 1361 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.FlowNameLowerCase
+         where
+  type KeyType Glean.Schema.SearchCode.Types.FlowNameLowerCase =
+       Glean.Schema.SearchCode.Types.FlowNameLowerCase_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.FlowNameLowerCase" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.SearchCode.Types.flowNameLowerCase_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.FlowNameLowerCase x k
+  getFactKey = Glean.Schema.SearchCode.Types.flowNameLowerCase_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1370 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type Glean.Schema.SearchCode.Types.FlowNameLowerCase
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1376 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.HackSearchByScopeWithNameKinds_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.HackSearchByScopeWithNameKinds_key
+       x1 x2 x3 x4 x5)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+         Glean.buildRtsValue b x5
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.HackSearchByScopeWithNameKinds_key
+        <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.HackSearchByScopeWithNameKinds_key"
+           (Prelude.Just 0))
+{-# LINE 1391 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.HackSearchByScopeWithNameKinds_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "insensitive" (Prelude.Bool)
+          ('Angle.TField "scope" ([Data.Text.Text])
+             ('Angle.TField "kinds"
+                (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
+                ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+                   ('Angle.TNoFields)))))
+{-# LINE 1393 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.HackSearchByScopeWithNameKinds
+         where
+  type KeyType
+         Glean.Schema.SearchCode.Types.HackSearchByScopeWithNameKinds
+       = Glean.Schema.SearchCode.Types.HackSearchByScopeWithNameKinds_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.HackSearchByScopeWithNameKinds"
+        16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.hackSearchByScopeWithNameKinds_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.HackSearchByScopeWithNameKinds x k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.hackSearchByScopeWithNameKinds_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1403 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.HackSearchByScopeWithNameKinds
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1409 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.HsSearchByName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.HsSearchByName_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.HsSearchByName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.HsSearchByName_key" (Prelude.Just 0))
+{-# LINE 1418 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields Glean.Schema.SearchCode.Types.HsSearchByName_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+          ('Angle.TNoFields))
+{-# LINE 1420 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.HsSearchByName
+         where
+  type KeyType Glean.Schema.SearchCode.Types.HsSearchByName =
+       Glean.Schema.SearchCode.Types.HsSearchByName_key
+  getName _proxy = Glean.PredicateRef "search.code.HsSearchByName" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.SearchCode.Types.hsSearchByName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.HsSearchByName x k
+  getFactKey = Glean.Schema.SearchCode.Types.hsSearchByName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1429 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type Glean.Schema.SearchCode.Types.HsSearchByName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1435 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.HackSearchByLowerCaseScopeAndKind_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.HackSearchByLowerCaseScopeAndKind_key
+       x1 x2 x3 x4)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.HackSearchByLowerCaseScopeAndKind_key
+        <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef
+           "search.code.HackSearchByLowerCaseScopeAndKind_key"
+           (Prelude.Just 0))
+{-# LINE 1448 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.HackSearchByLowerCaseScopeAndKind_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "scope" ([Data.Text.Text])
+          ('Angle.TField "kinds"
+             (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
+             ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+                ('Angle.TNoFields))))
+{-# LINE 1450 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.HackSearchByLowerCaseScopeAndKind
+         where
+  type KeyType
+         Glean.Schema.SearchCode.Types.HackSearchByLowerCaseScopeAndKind
+       =
+       Glean.Schema.SearchCode.Types.HackSearchByLowerCaseScopeAndKind_key
+  getName _proxy
+    = Glean.PredicateRef
+        "search.code.HackSearchByLowerCaseScopeAndKind"
+        16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.hackSearchByLowerCaseScopeAndKind_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.HackSearchByLowerCaseScopeAndKind x
+        k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.hackSearchByLowerCaseScopeAndKind_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1460 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.HackSearchByLowerCaseScopeAndKind
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1466 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.SearchByNameAndLanguage_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.SearchByNameAndLanguage_key x1 x2
+       x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.SearchByNameAndLanguage_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.SearchByNameAndLanguage_key"
+           (Prelude.Just 0))
+{-# LINE 1477 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.SearchByNameAndLanguage_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "language" (Glean.Schema.Code.Types.Language)
+          ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+             ('Angle.TNoFields)))
+{-# LINE 1479 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.SearchByNameAndLanguage
+         where
+  type KeyType Glean.Schema.SearchCode.Types.SearchByNameAndLanguage
+       = Glean.Schema.SearchCode.Types.SearchByNameAndLanguage_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.SearchByNameAndLanguage" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.searchByNameAndLanguage_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.SearchByNameAndLanguage x k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.searchByNameAndLanguage_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1488 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.SearchByNameAndLanguage
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1494 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.FlowSearchByNameKindAndScopeFact_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.FlowSearchByNameKindAndScopeFact_key
+       x1 x2 x3 x4)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.FlowSearchByNameKindAndScopeFact_key
+        <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.FlowSearchByNameKindAndScopeFact_key"
+           (Prelude.Just 0))
+{-# LINE 1507 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.FlowSearchByNameKindAndScopeFact_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "scope"
+          (Prelude.Maybe Glean.Schema.Flow.Types.Module)
+          ('Angle.TField "kinds"
+             (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
+             ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+                ('Angle.TNoFields))))
+{-# LINE 1509 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.FlowSearchByNameKindAndScopeFact
+         where
+  type KeyType
+         Glean.Schema.SearchCode.Types.FlowSearchByNameKindAndScopeFact
+       =
+       Glean.Schema.SearchCode.Types.FlowSearchByNameKindAndScopeFact_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.FlowSearchByNameKindAndScopeFact"
+        16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.flowSearchByNameKindAndScopeFact_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.FlowSearchByNameKindAndScopeFact x
+        k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.flowSearchByNameKindAndScopeFact_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1519 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.FlowSearchByNameKindAndScopeFact
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1525 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.PythonSearchByLowerCaseNameKindAndScopeFact_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.PythonSearchByLowerCaseNameKindAndScopeFact_key
+       x1 x2 x3 x4)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.PythonSearchByLowerCaseNameKindAndScopeFact_key
+        <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef
+           "search.code.PythonSearchByLowerCaseNameKindAndScopeFact_key"
+           (Prelude.Just 0))
+{-# LINE 1538 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.PythonSearchByLowerCaseNameKindAndScopeFact_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "scope"
+          (Prelude.Maybe Glean.Schema.Python.Types.SName)
+          ('Angle.TField "kinds"
+             (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
+             ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+                ('Angle.TNoFields))))
+{-# LINE 1540 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.PythonSearchByLowerCaseNameKindAndScopeFact
+         where
+  type KeyType
+         Glean.Schema.SearchCode.Types.PythonSearchByLowerCaseNameKindAndScopeFact
+       =
+       Glean.Schema.SearchCode.Types.PythonSearchByLowerCaseNameKindAndScopeFact_key
+  getName _proxy
+    = Glean.PredicateRef
+        "search.code.PythonSearchByLowerCaseNameKindAndScopeFact"
+        16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.pythonSearchByLowerCaseNameKindAndScopeFact_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.PythonSearchByLowerCaseNameKindAndScopeFact
+        x
+        k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.pythonSearchByLowerCaseNameKindAndScopeFact_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1550 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.PythonSearchByLowerCaseNameKindAndScopeFact
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1556 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.CxxSearchByNameKindAndScopeFact_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.CxxSearchByNameKindAndScopeFact_key
+       x1 x2 x3 x4)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.CxxSearchByNameKindAndScopeFact_key
+        <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.CxxSearchByNameKindAndScopeFact_key"
+           (Prelude.Just 0))
+{-# LINE 1569 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.CxxSearchByNameKindAndScopeFact_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "scope" (Glean.Schema.Cxx1.Types.Scope)
+          ('Angle.TField "kinds"
+             (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
+             ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+                ('Angle.TNoFields))))
+{-# LINE 1571 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.CxxSearchByNameKindAndScopeFact
+         where
+  type KeyType
+         Glean.Schema.SearchCode.Types.CxxSearchByNameKindAndScopeFact
+       = Glean.Schema.SearchCode.Types.CxxSearchByNameKindAndScopeFact_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.CxxSearchByNameKindAndScopeFact"
+        16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.cxxSearchByNameKindAndScopeFact_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.CxxSearchByNameKindAndScopeFact x k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.cxxSearchByNameKindAndScopeFact_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1581 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.CxxSearchByNameKindAndScopeFact
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1587 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.FlowSearchByLowerCaseNameKindAndScopeFact_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.FlowSearchByLowerCaseNameKindAndScopeFact_key
+       x1 x2 x3 x4)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.FlowSearchByLowerCaseNameKindAndScopeFact_key
+        <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef
+           "search.code.FlowSearchByLowerCaseNameKindAndScopeFact_key"
+           (Prelude.Just 0))
+{-# LINE 1600 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.FlowSearchByLowerCaseNameKindAndScopeFact_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "scope"
+          (Prelude.Maybe Glean.Schema.Flow.Types.Module)
+          ('Angle.TField "kinds"
+             (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
+             ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+                ('Angle.TNoFields))))
+{-# LINE 1602 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.FlowSearchByLowerCaseNameKindAndScopeFact
+         where
+  type KeyType
+         Glean.Schema.SearchCode.Types.FlowSearchByLowerCaseNameKindAndScopeFact
+       =
+       Glean.Schema.SearchCode.Types.FlowSearchByLowerCaseNameKindAndScopeFact_key
+  getName _proxy
+    = Glean.PredicateRef
+        "search.code.FlowSearchByLowerCaseNameKindAndScopeFact"
+        16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.flowSearchByLowerCaseNameKindAndScopeFact_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.FlowSearchByLowerCaseNameKindAndScopeFact
+        x
+        k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.flowSearchByLowerCaseNameKindAndScopeFact_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1612 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.FlowSearchByLowerCaseNameKindAndScopeFact
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1618 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.RustSearchByNameAndKind_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.RustSearchByNameAndKind_key x1 x2
+       x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.RustSearchByNameAndKind_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.RustSearchByNameAndKind_key"
+           (Prelude.Just 0))
+{-# LINE 1629 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.RustSearchByNameAndKind_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "kind"
+          (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
+          ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+             ('Angle.TNoFields)))
+{-# LINE 1631 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.RustSearchByNameAndKind
+         where
+  type KeyType Glean.Schema.SearchCode.Types.RustSearchByNameAndKind
+       = Glean.Schema.SearchCode.Types.RustSearchByNameAndKind_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.RustSearchByNameAndKind" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.rustSearchByNameAndKind_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.RustSearchByNameAndKind x k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.rustSearchByNameAndKind_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1640 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.RustSearchByNameAndKind
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1646 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.PythonNameLowerCase_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.PythonNameLowerCase_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.PythonNameLowerCase_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.PythonNameLowerCase_key"
+           (Prelude.Just 0))
+{-# LINE 1657 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.PythonNameLowerCase_key
+     =
+     'Angle.TField "nameLowercase" (Data.Text.Text)
+       ('Angle.TField "kinds"
+          (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
+          ('Angle.TField "name" (Data.Text.Text) ('Angle.TNoFields)))
+{-# LINE 1659 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.PythonNameLowerCase
+         where
+  type KeyType Glean.Schema.SearchCode.Types.PythonNameLowerCase =
+       Glean.Schema.SearchCode.Types.PythonNameLowerCase_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.PythonNameLowerCase" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.SearchCode.Types.pythonNameLowerCase_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.PythonNameLowerCase x k
+  getFactKey = Glean.Schema.SearchCode.Types.pythonNameLowerCase_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1668 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.PythonNameLowerCase
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1674 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.JavaSearchByNameWithFact_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.JavaSearchByNameWithFact_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.JavaSearchByNameWithFact_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.JavaSearchByNameWithFact_key"
+           (Prelude.Just 0))
+{-# LINE 1683 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.JavaSearchByNameWithFact_key
+     =
+     'Angle.TField "name"
+       (Glean.KeyType Glean.Schema.JavakotlinAlpha.Types.QName)
+       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+          ('Angle.TNoFields))
+{-# LINE 1685 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.JavaSearchByNameWithFact
+         where
+  type KeyType Glean.Schema.SearchCode.Types.JavaSearchByNameWithFact
+       = Glean.Schema.SearchCode.Types.JavaSearchByNameWithFact_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.JavaSearchByNameWithFact" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.javaSearchByNameWithFact_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.JavaSearchByNameWithFact x k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.javaSearchByNameWithFact_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1695 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.JavaSearchByNameWithFact
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1701 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.JavaSearchByLowerCaseScope_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.JavaSearchByLowerCaseScope_key x1 x2
+       x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.JavaSearchByLowerCaseScope_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.JavaSearchByLowerCaseScope_key"
+           (Prelude.Just 0))
+{-# LINE 1712 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.JavaSearchByLowerCaseScope_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "scope" ([Data.Text.Text])
+          ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+             ('Angle.TNoFields)))
+{-# LINE 1714 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.JavaSearchByLowerCaseScope
+         where
+  type KeyType
+         Glean.Schema.SearchCode.Types.JavaSearchByLowerCaseScope
+       = Glean.Schema.SearchCode.Types.JavaSearchByLowerCaseScope_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.JavaSearchByLowerCaseScope" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.javaSearchByLowerCaseScope_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.JavaSearchByLowerCaseScope x k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.javaSearchByLowerCaseScope_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1724 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.JavaSearchByLowerCaseScope
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1730 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.SearchByLowerCaseScope_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.SearchByLowerCaseScope_key x1 x2 x3
+       x4)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.SearchByLowerCaseScope_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.SearchByLowerCaseScope_key"
+           (Prelude.Just 0))
+{-# LINE 1743 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.SearchByLowerCaseScope_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "scope" ([Data.Text.Text])
+          ('Angle.TField "language" (Glean.Schema.Code.Types.Language)
+             ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+                ('Angle.TNoFields))))
+{-# LINE 1745 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.SearchByLowerCaseScope
+         where
+  type KeyType Glean.Schema.SearchCode.Types.SearchByLowerCaseScope =
+       Glean.Schema.SearchCode.Types.SearchByLowerCaseScope_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.SearchByLowerCaseScope" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.SearchCode.Types.searchByLowerCaseScope_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.SearchByLowerCaseScope x k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.searchByLowerCaseScope_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1754 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.SearchByLowerCaseScope
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1760 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.HackSearchByLowerCaseNameAndKind_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.HackSearchByLowerCaseNameAndKind_key
+       x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.HackSearchByLowerCaseNameAndKind_key
+        <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.HackSearchByLowerCaseNameAndKind_key"
+           (Prelude.Just 0))
+{-# LINE 1771 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.HackSearchByLowerCaseNameAndKind_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "kinds"
+          (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
+          ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+             ('Angle.TNoFields)))
+{-# LINE 1773 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.HackSearchByLowerCaseNameAndKind
+         where
+  type KeyType
+         Glean.Schema.SearchCode.Types.HackSearchByLowerCaseNameAndKind
+       =
+       Glean.Schema.SearchCode.Types.HackSearchByLowerCaseNameAndKind_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.HackSearchByLowerCaseNameAndKind"
+        16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.hackSearchByLowerCaseNameAndKind_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.HackSearchByLowerCaseNameAndKind x
+        k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.hackSearchByLowerCaseNameAndKind_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1783 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.HackSearchByLowerCaseNameAndKind
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1789 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.PpSearchByNameKind_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.PpSearchByNameKind_key x1 x2 x3)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.PpSearchByNameKind_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.PpSearchByNameKind_key"
+           (Prelude.Just 0))
+{-# LINE 1800 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.PpSearchByNameKind_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "kinds"
+          (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
+          ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+             ('Angle.TNoFields)))
+{-# LINE 1802 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.PpSearchByNameKind
+         where
+  type KeyType Glean.Schema.SearchCode.Types.PpSearchByNameKind =
+       Glean.Schema.SearchCode.Types.PpSearchByNameKind_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.PpSearchByNameKind" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.SearchCode.Types.ppSearchByNameKind_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.PpSearchByNameKind x k
+  getFactKey = Glean.Schema.SearchCode.Types.ppSearchByNameKind_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1811 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.PpSearchByNameKind
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1817 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.JavaSearchByName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.JavaSearchByName_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.JavaSearchByName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.JavaSearchByName_key"
+           (Prelude.Just 0))
+{-# LINE 1826 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.JavaSearchByName_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+          ('Angle.TNoFields))
+{-# LINE 1828 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.JavaSearchByName
+         where
+  type KeyType Glean.Schema.SearchCode.Types.JavaSearchByName =
+       Glean.Schema.SearchCode.Types.JavaSearchByName_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.JavaSearchByName" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.SearchCode.Types.javaSearchByName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.JavaSearchByName x k
+  getFactKey = Glean.Schema.SearchCode.Types.javaSearchByName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1837 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type Glean.Schema.SearchCode.Types.JavaSearchByName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1843 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.ThriftSearchByLowerCaseName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.ThriftSearchByLowerCaseName_key x1
+       x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.ThriftSearchByLowerCaseName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.ThriftSearchByLowerCaseName_key"
+           (Prelude.Just 0))
+{-# LINE 1852 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.ThriftSearchByLowerCaseName_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+          ('Angle.TNoFields))
+{-# LINE 1854 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.ThriftSearchByLowerCaseName
+         where
+  type KeyType
+         Glean.Schema.SearchCode.Types.ThriftSearchByLowerCaseName
+       = Glean.Schema.SearchCode.Types.ThriftSearchByLowerCaseName_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.ThriftSearchByLowerCaseName" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.thriftSearchByLowerCaseName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.ThriftSearchByLowerCaseName x k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.thriftSearchByLowerCaseName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1864 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.ThriftSearchByLowerCaseName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1870 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.GraphQLSearchByLowerCaseName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.GraphQLSearchByLowerCaseName_key x1
+       x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.GraphQLSearchByLowerCaseName_key
+        <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.GraphQLSearchByLowerCaseName_key"
+           (Prelude.Just 0))
+{-# LINE 1879 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.GraphQLSearchByLowerCaseName_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+          ('Angle.TNoFields))
+{-# LINE 1881 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.GraphQLSearchByLowerCaseName
+         where
+  type KeyType
+         Glean.Schema.SearchCode.Types.GraphQLSearchByLowerCaseName
+       = Glean.Schema.SearchCode.Types.GraphQLSearchByLowerCaseName_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.GraphQLSearchByLowerCaseName" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.graphQLSearchByLowerCaseName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.GraphQLSearchByLowerCaseName x k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.graphQLSearchByLowerCaseName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1891 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.GraphQLSearchByLowerCaseName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1897 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.ErlangSearchByLowerCaseName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.ErlangSearchByLowerCaseName_key x1
+       x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.ErlangSearchByLowerCaseName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.ErlangSearchByLowerCaseName_key"
+           (Prelude.Just 0))
+{-# LINE 1906 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.ErlangSearchByLowerCaseName_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+          ('Angle.TNoFields))
+{-# LINE 1908 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.ErlangSearchByLowerCaseName
+         where
+  type KeyType
+         Glean.Schema.SearchCode.Types.ErlangSearchByLowerCaseName
+       = Glean.Schema.SearchCode.Types.ErlangSearchByLowerCaseName_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.ErlangSearchByLowerCaseName" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.erlangSearchByLowerCaseName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.ErlangSearchByLowerCaseName x k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.erlangSearchByLowerCaseName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1918 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.ErlangSearchByLowerCaseName
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1924 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.PythonSearchByNameKindAndScopeFact_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.PythonSearchByNameKindAndScopeFact_key
+       x1 x2 x3 x4)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+         Glean.buildRtsValue b x3
+         Glean.buildRtsValue b x4
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.PythonSearchByNameKindAndScopeFact_key
+        <$> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef
+           "search.code.PythonSearchByNameKindAndScopeFact_key"
+           (Prelude.Just 0))
+{-# LINE 1937 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.PythonSearchByNameKindAndScopeFact_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "scope"
+          (Prelude.Maybe Glean.Schema.Python.Types.SName)
+          ('Angle.TField "kinds"
+             (Prelude.Maybe Glean.Schema.CodemarkupTypes.Types.SymbolKind)
+             ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+                ('Angle.TNoFields))))
+{-# LINE 1939 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.PythonSearchByNameKindAndScopeFact
+         where
+  type KeyType
+         Glean.Schema.SearchCode.Types.PythonSearchByNameKindAndScopeFact
+       =
+       Glean.Schema.SearchCode.Types.PythonSearchByNameKindAndScopeFact_key
+  getName _proxy
+    = Glean.PredicateRef
+        "search.code.PythonSearchByNameKindAndScopeFact"
+        16
+  getId
+    = Glean.IdOf .
+        Glean.Fid .
+          Glean.Schema.SearchCode.Types.pythonSearchByNameKindAndScopeFact_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.PythonSearchByNameKindAndScopeFact
+        x
+        k
+  getFactKey
+    = Glean.Schema.SearchCode.Types.pythonSearchByNameKindAndScopeFact_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1949 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.PythonSearchByNameKindAndScopeFact
+         where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 1955 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Type
+           Glean.Schema.SearchCode.Types.GraphQLSearchByName_key
+         where
+  buildRtsValue b
+    (Glean.Schema.SearchCode.Types.GraphQLSearchByName_key x1 x2)
+    = do Glean.buildRtsValue b x1
+         Glean.buildRtsValue b x2
+  decodeRtsValue
+    = Glean.Schema.SearchCode.Types.GraphQLSearchByName_key <$>
+        Glean.decodeRtsValue
+        <*> Glean.decodeRtsValue
+  sourceType _
+    = Angle.NamedTy ()
+        (Angle.SourceRef "search.code.GraphQLSearchByName_key"
+           (Prelude.Just 0))
+{-# LINE 1964 "glean/schema/thrift/search_code_include.hs" #-}
+type instance
+     Angle.RecordFields
+       Glean.Schema.SearchCode.Types.GraphQLSearchByName_key
+     =
+     'Angle.TField "name" (Data.Text.Text)
+       ('Angle.TField "entity" (Glean.Schema.Code.Types.Entity)
+          ('Angle.TNoFields))
+{-# LINE 1966 "glean/schema/thrift/search_code_include.hs" #-}
+instance Glean.Predicate
+           Glean.Schema.SearchCode.Types.GraphQLSearchByName
+         where
+  type KeyType Glean.Schema.SearchCode.Types.GraphQLSearchByName =
+       Glean.Schema.SearchCode.Types.GraphQLSearchByName_key
+  getName _proxy
+    = Glean.PredicateRef "search.code.GraphQLSearchByName" 16
+  getId
+    = Glean.IdOf .
+        Glean.Fid . Glean.Schema.SearchCode.Types.graphQLSearchByName_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k _
+    = Glean.Schema.SearchCode.Types.GraphQLSearchByName x k
+  getFactKey = Glean.Schema.SearchCode.Types.graphQLSearchByName_key
+  getFactValue _ = Prelude.Just ()
+{-# LINE 1975 "glean/schema/thrift/search_code_include.hs" #-}
 instance Glean.Type
            Glean.Schema.SearchCode.Types.GraphQLSearchByName
          where
diff --git a/glean/schema/thrift/gen-hs2/Glean/Schema/Src/Types.hs b/glean/schema/thrift/gen-hs2/Glean/Schema/Src/Types.hs
--- a/glean/schema/thrift/gen-hs2/Glean/Schema/Src/Types.hs
+++ b/glean/schema/thrift/gen-hs2/Glean/Schema/Src/Types.hs
@@ -30,6 +30,9 @@
         FileDigest_id,
         FileDigest(FileDigest, fileDigest_id, fileDigest_key,
                    fileDigest_value),
+        FileContent_id,
+        FileContent(FileContent, fileContent_id, fileContent_key,
+                    fileContent_value),
         File_id, File(File, file_id, file_key), ByteSpanContains_id,
         ByteSpanContains(ByteSpanContains, byteSpanContains_id,
                          byteSpanContains_key),
@@ -56,7 +59,7 @@
                       fileLines_key_hasUnicodeOrTabs),
         FileLanguage_key(FileLanguage_key, fileLanguage_key_file,
                          fileLanguage_key_language),
-        FileDigest_value,
+        FileDigest_value, FileContent_value,
         ByteSpan(ByteSpan, byteSpan_start, byteSpan_length),
         ByteSpanContains_key(ByteSpanContains_key,
                              byteSpanContains_key_byteSpan, byteSpanContains_key_contains),
@@ -110,14 +113,14 @@
 import qualified Glean.Angle.Types as Angle
 {-# LINE 14 "glean/schema/thrift/src_include.hs" #-}
 import qualified Glean.Schema.Builtin.Types
-{-# LINE 114 ".build/def/codegen/thrift-schema-hs/glean/schema/thrift/gen-hs2/Glean/Schema/Src/Types.hs" #-}
+{-# LINE 117 ".build/def/codegen/thrift-schema-hs/glean/schema/thrift/gen-hs2/Glean/Schema/Src/Types.hs" #-}
 
 pREDICATE_VERSIONS :: Map.Map Text.Text Int.Int64
 pREDICATE_VERSIONS
   = Map.fromList
-      [("File", 1), ("FileDigest", 1), ("FileLines", 1),
-       ("IndexFailure", 1), ("RangeContains", 1), ("ByteSpanContains", 1),
-       ("FileLanguage", 1)]
+      [("FileContent", 1), ("File", 1), ("FileDigest", 1),
+       ("FileLines", 1), ("IndexFailure", 1), ("RangeContains", 1),
+       ("ByteSpanContains", 1), ("FileLanguage", 1)]
 
 type RangeContains_id = Glean.Id
 
@@ -538,6 +541,113 @@
         (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key)
         _value
 
+type FileContent_id = Glean.Id
+
+data FileContent = FileContent{fileContent_id ::
+                               {-# UNPACK #-} !FileContent_id,
+                               fileContent_key :: Prelude.Maybe File,
+                               fileContent_value :: Prelude.Maybe FileContent_value}
+                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON FileContent where
+  toJSON (FileContent __field__id __field__key __field__value)
+    = Aeson.object
+        ("id" .= __field__id :
+           Prelude.maybe Prelude.id ((:) . ("key" .=)) __field__key
+             (Prelude.maybe Prelude.id ((:) . ("value" .=)) __field__value
+                Prelude.mempty))
+
+instance Thrift.ThriftStruct FileContent where
+  buildStruct _proxy
+    (FileContent __field__id __field__key __field__value)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 1 0
+           (Thrift.genI64 _proxy __field__id)
+           :
+           let (__cereal__key, __id__key)
+                 = case __field__key of
+                     Prelude.Just _val -> ((:)
+                                             (Thrift.genField _proxy "key"
+                                                (Thrift.getStructType _proxy)
+                                                2
+                                                1
+                                                (Thrift.buildStruct _proxy _val)),
+                                           2)
+                     Prelude.Nothing -> (Prelude.id, 1)
+             in
+             __cereal__key
+               (case __field__value of
+                  Prelude.Just _val -> Thrift.genField _proxy "value"
+                                         (Thrift.getStringType _proxy)
+                                         3
+                                         __id__key
+                                         (Thrift.genText _proxy _val)
+                                         : []
+                  Prelude.Nothing -> []))
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__id <- ST.newSTRef Default.def
+            __field__key <- ST.newSTRef Prelude.Nothing
+            __field__value <- ST.newSTRef Prelude.Nothing
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getI64Type _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseI64
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__id
+                                                                          _val
+                                                                 2 | _type ==
+                                                                       Thrift.getStructType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseStruct
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__key
+                                                                          (Prelude.Just _val)
+                                                                 3 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef __field__value
+                                                                          (Prelude.Just _val)
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__id <- ST.readSTRef __field__id
+                                             !__val__key <- ST.readSTRef __field__key
+                                             !__val__value <- ST.readSTRef __field__value
+                                             Prelude.pure
+                                               (FileContent __val__id __val__key __val__value)
+              _idMap = HashMap.fromList [("id", 1), ("key", 2), ("value", 3)]
+            _parse 0)
+
+instance DeepSeq.NFData FileContent where
+  rnf (FileContent __field__id __field__key __field__value)
+    = DeepSeq.rnf __field__id `Prelude.seq`
+        DeepSeq.rnf __field__key `Prelude.seq`
+          DeepSeq.rnf __field__value `Prelude.seq` ()
+
+instance Default.Default FileContent where
+  def = FileContent Default.def Prelude.Nothing Prelude.Nothing
+
+instance Hashable.Hashable FileContent where
+  hashWithSalt __salt (FileContent _id _key _value)
+    = Hashable.hashWithSalt
+        (Hashable.hashWithSalt (Hashable.hashWithSalt __salt _id) _key)
+        _value
+
 type File_id = Glean.Id
 
 data File = File{file_id :: {-# UNPACK #-} !File_id,
@@ -1614,6 +1724,8 @@
 
 type FileDigest_value = Text.Text
 
+type FileContent_value = Text.Text
+
 data ByteSpan = ByteSpan{byteSpan_start :: Glean.Nat,
                          byteSpan_length :: Glean.Nat}
                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
@@ -1909,6 +2021,25 @@
   hashWithSalt __salt (ByteRange _begin _end)
     = Hashable.hashWithSalt (Hashable.hashWithSalt __salt _begin) _end
 {-# LINE 17 "glean/schema/thrift/src_include.hs" #-}
+instance Glean.Predicate Glean.Schema.Src.Types.FileContent where
+  type KeyType Glean.Schema.Src.Types.FileContent =
+       Glean.Schema.Src.Types.File
+  type ValueType Glean.Schema.Src.Types.FileContent =
+       Glean.Schema.Src.Types.FileContent_value
+  getName _proxy = Glean.PredicateRef "src.FileContent" 1
+  getId
+    = Glean.IdOf . Glean.Fid . Glean.Schema.Src.Types.fileContent_id
+  mkFact (Glean.IdOf (Glean.Fid x)) k v
+    = Glean.Schema.Src.Types.FileContent x k v
+  getFactKey = Glean.Schema.Src.Types.fileContent_key
+  getFactValue = Glean.Schema.Src.Types.fileContent_value
+{-# LINE 28 "glean/schema/thrift/src_include.hs" #-}
+instance Glean.Type Glean.Schema.Src.Types.FileContent where
+  buildRtsValue b = Glean.buildRtsValue b . Glean.getId
+  decodeRtsValue = Glean.decodeRef
+  decodeAsFact = Glean.decodeFact
+  sourceType = Glean.predicateSourceType
+{-# LINE 34 "glean/schema/thrift/src_include.hs" #-}
 instance Glean.Predicate Glean.Schema.Src.Types.File where
   type KeyType Glean.Schema.Src.Types.File = Data.Text.Text
   getName _proxy = Glean.PredicateRef "src.File" 1
@@ -1917,13 +2048,13 @@
     = Glean.Schema.Src.Types.File x k
   getFactKey = Glean.Schema.Src.Types.file_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 25 "glean/schema/thrift/src_include.hs" #-}
+{-# LINE 42 "glean/schema/thrift/src_include.hs" #-}
 instance Glean.Type Glean.Schema.Src.Types.File where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 31 "glean/schema/thrift/src_include.hs" #-}
+{-# LINE 48 "glean/schema/thrift/src_include.hs" #-}
 instance Glean.Predicate Glean.Schema.Src.Types.FileDigest where
   type KeyType Glean.Schema.Src.Types.FileDigest =
        Glean.Schema.Src.Types.File
@@ -1936,13 +2067,13 @@
     = Glean.Schema.Src.Types.FileDigest x k v
   getFactKey = Glean.Schema.Src.Types.fileDigest_key
   getFactValue = Glean.Schema.Src.Types.fileDigest_value
-{-# LINE 41 "glean/schema/thrift/src_include.hs" #-}
+{-# LINE 58 "glean/schema/thrift/src_include.hs" #-}
 instance Glean.Type Glean.Schema.Src.Types.FileDigest where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 47 "glean/schema/thrift/src_include.hs" #-}
+{-# LINE 64 "glean/schema/thrift/src_include.hs" #-}
 instance Glean.Type Glean.Schema.Src.Types.FileLines_key where
   buildRtsValue b (Glean.Schema.Src.Types.FileLines_key x1 x2 x3 x4)
     = do Glean.buildRtsValue b x1
@@ -1957,7 +2088,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "src.FileLines_key" (Prelude.Just 0))
-{-# LINE 60 "glean/schema/thrift/src_include.hs" #-}
+{-# LINE 77 "glean/schema/thrift/src_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Src.Types.FileLines_key =
      'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
@@ -1965,7 +2096,7 @@
           ('Angle.TField "endsInNewline" (Prelude.Bool)
              ('Angle.TField "hasUnicodeOrTabs" (Prelude.Bool)
                 ('Angle.TNoFields))))
-{-# LINE 62 "glean/schema/thrift/src_include.hs" #-}
+{-# LINE 79 "glean/schema/thrift/src_include.hs" #-}
 instance Glean.Predicate Glean.Schema.Src.Types.FileLines where
   type KeyType Glean.Schema.Src.Types.FileLines =
        Glean.Schema.Src.Types.FileLines_key
@@ -1976,13 +2107,13 @@
     = Glean.Schema.Src.Types.FileLines x k
   getFactKey = Glean.Schema.Src.Types.fileLines_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 71 "glean/schema/thrift/src_include.hs" #-}
+{-# LINE 88 "glean/schema/thrift/src_include.hs" #-}
 instance Glean.Type Glean.Schema.Src.Types.FileLines where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 77 "glean/schema/thrift/src_include.hs" #-}
+{-# LINE 94 "glean/schema/thrift/src_include.hs" #-}
 instance Glean.Type Glean.Schema.Src.Types.IndexFailure_key where
   buildRtsValue b (Glean.Schema.Src.Types.IndexFailure_key x1 x2 x3)
     = do Glean.buildRtsValue b x1
@@ -1995,13 +2126,13 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "src.IndexFailure_key" (Prelude.Just 0))
-{-# LINE 88 "glean/schema/thrift/src_include.hs" #-}
+{-# LINE 105 "glean/schema/thrift/src_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Src.Types.IndexFailure_key =
      'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
        ('Angle.TField "reason" (Glean.Schema.Src.Types.IndexFailureReason)
           ('Angle.TField "details" (Data.Text.Text) ('Angle.TNoFields)))
-{-# LINE 90 "glean/schema/thrift/src_include.hs" #-}
+{-# LINE 107 "glean/schema/thrift/src_include.hs" #-}
 instance Glean.Predicate Glean.Schema.Src.Types.IndexFailure where
   type KeyType Glean.Schema.Src.Types.IndexFailure =
        Glean.Schema.Src.Types.IndexFailure_key
@@ -2012,13 +2143,13 @@
     = Glean.Schema.Src.Types.IndexFailure x k
   getFactKey = Glean.Schema.Src.Types.indexFailure_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 99 "glean/schema/thrift/src_include.hs" #-}
+{-# LINE 116 "glean/schema/thrift/src_include.hs" #-}
 instance Glean.Type Glean.Schema.Src.Types.IndexFailure where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 105 "glean/schema/thrift/src_include.hs" #-}
+{-# LINE 122 "glean/schema/thrift/src_include.hs" #-}
 instance Glean.Type Glean.Schema.Src.Types.RangeContains_key where
   buildRtsValue b (Glean.Schema.Src.Types.RangeContains_key x1 x2)
     = do Glean.buildRtsValue b x1
@@ -2029,13 +2160,13 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "src.RangeContains_key" (Prelude.Just 0))
-{-# LINE 114 "glean/schema/thrift/src_include.hs" #-}
+{-# LINE 131 "glean/schema/thrift/src_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Src.Types.RangeContains_key =
      'Angle.TField "fileLines" (Glean.Schema.Src.Types.Range)
        ('Angle.TField "contains" (Glean.Schema.Src.Types.Range)
           ('Angle.TNoFields))
-{-# LINE 116 "glean/schema/thrift/src_include.hs" #-}
+{-# LINE 133 "glean/schema/thrift/src_include.hs" #-}
 instance Glean.Predicate Glean.Schema.Src.Types.RangeContains where
   type KeyType Glean.Schema.Src.Types.RangeContains =
        Glean.Schema.Src.Types.RangeContains_key
@@ -2046,13 +2177,13 @@
     = Glean.Schema.Src.Types.RangeContains x k
   getFactKey = Glean.Schema.Src.Types.rangeContains_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 125 "glean/schema/thrift/src_include.hs" #-}
+{-# LINE 142 "glean/schema/thrift/src_include.hs" #-}
 instance Glean.Type Glean.Schema.Src.Types.RangeContains where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 131 "glean/schema/thrift/src_include.hs" #-}
+{-# LINE 148 "glean/schema/thrift/src_include.hs" #-}
 instance Glean.Type Glean.Schema.Src.Types.ByteSpanContains_key
          where
   buildRtsValue b (Glean.Schema.Src.Types.ByteSpanContains_key x1 x2)
@@ -2065,13 +2196,13 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "src.ByteSpanContains_key" (Prelude.Just 0))
-{-# LINE 140 "glean/schema/thrift/src_include.hs" #-}
+{-# LINE 157 "glean/schema/thrift/src_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Src.Types.ByteSpanContains_key =
      'Angle.TField "byteSpan" (Glean.Schema.Src.Types.ByteSpan)
        ('Angle.TField "contains" (Glean.Schema.Src.Types.ByteSpan)
           ('Angle.TNoFields))
-{-# LINE 142 "glean/schema/thrift/src_include.hs" #-}
+{-# LINE 159 "glean/schema/thrift/src_include.hs" #-}
 instance Glean.Predicate Glean.Schema.Src.Types.ByteSpanContains
          where
   type KeyType Glean.Schema.Src.Types.ByteSpanContains =
@@ -2084,13 +2215,13 @@
     = Glean.Schema.Src.Types.ByteSpanContains x k
   getFactKey = Glean.Schema.Src.Types.byteSpanContains_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 151 "glean/schema/thrift/src_include.hs" #-}
+{-# LINE 168 "glean/schema/thrift/src_include.hs" #-}
 instance Glean.Type Glean.Schema.Src.Types.ByteSpanContains where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 157 "glean/schema/thrift/src_include.hs" #-}
+{-# LINE 174 "glean/schema/thrift/src_include.hs" #-}
 instance Glean.Type Glean.Schema.Src.Types.FileLanguage_key where
   buildRtsValue b (Glean.Schema.Src.Types.FileLanguage_key x1 x2)
     = do Glean.buildRtsValue b x1
@@ -2101,13 +2232,13 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "src.FileLanguage_key" (Prelude.Just 0))
-{-# LINE 166 "glean/schema/thrift/src_include.hs" #-}
+{-# LINE 183 "glean/schema/thrift/src_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Src.Types.FileLanguage_key =
      'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
        ('Angle.TField "language" (Glean.Schema.Src.Types.Language)
           ('Angle.TNoFields))
-{-# LINE 168 "glean/schema/thrift/src_include.hs" #-}
+{-# LINE 185 "glean/schema/thrift/src_include.hs" #-}
 instance Glean.Predicate Glean.Schema.Src.Types.FileLanguage where
   type KeyType Glean.Schema.Src.Types.FileLanguage =
        Glean.Schema.Src.Types.FileLanguage_key
@@ -2118,20 +2249,20 @@
     = Glean.Schema.Src.Types.FileLanguage x k
   getFactKey = Glean.Schema.Src.Types.fileLanguage_key
   getFactValue _ = Prelude.Just ()
-{-# LINE 177 "glean/schema/thrift/src_include.hs" #-}
+{-# LINE 194 "glean/schema/thrift/src_include.hs" #-}
 instance Glean.Type Glean.Schema.Src.Types.FileLanguage where
   buildRtsValue b = Glean.buildRtsValue b . Glean.getId
   decodeRtsValue = Glean.decodeRef
   decodeAsFact = Glean.decodeFact
   sourceType = Glean.predicateSourceType
-{-# LINE 183 "glean/schema/thrift/src_include.hs" #-}
+{-# LINE 200 "glean/schema/thrift/src_include.hs" #-}
 instance Glean.Type Glean.Schema.Src.Types.IndexFailureReason where
   buildRtsValue = Glean.thriftEnum_buildRtsValue
   decodeRtsValue = Glean.thriftEnumD
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "src.IndexFailureReason" (Prelude.Just 1))
-{-# LINE 188 "glean/schema/thrift/src_include.hs" #-}
+{-# LINE 205 "glean/schema/thrift/src_include.hs" #-}
 type instance
      Angle.SumFields Glean.Schema.Src.Types.IndexFailureReason =
      'Angle.TField "CompileError" (Glean.Schema.Builtin.Types.Unit)
@@ -2139,13 +2270,13 @@
           ('Angle.TField "Unclassified" (Glean.Schema.Builtin.Types.Unit)
              ('Angle.TField "DiscoveryError" (Glean.Schema.Builtin.Types.Unit)
                 ('Angle.TNoFields))))
-{-# LINE 190 "glean/schema/thrift/src_include.hs" #-}
+{-# LINE 207 "glean/schema/thrift/src_include.hs" #-}
 instance Angle.AngleEnum Glean.Schema.Src.Types.IndexFailureReason
          where
   type AngleEnumTy Glean.Schema.Src.Types.IndexFailureReason =
        Glean.Schema.Src.Types.IndexFailureReason
   enumName v = Text.pack (Prelude.drop 19 (Prelude.show v))
-{-# LINE 194 "glean/schema/thrift/src_include.hs" #-}
+{-# LINE 211 "glean/schema/thrift/src_include.hs" #-}
 instance Glean.Type Glean.Schema.Src.Types.Range where
   buildRtsValue b (Glean.Schema.Src.Types.Range x1 x2 x3 x4 x5)
     = do Glean.buildRtsValue b x1
@@ -2161,21 +2292,21 @@
         <*> Glean.decodeRtsValue
   sourceType _
     = Angle.NamedTy () (Angle.SourceRef "src.Range" (Prelude.Just 1))
-{-# LINE 209 "glean/schema/thrift/src_include.hs" #-}
+{-# LINE 226 "glean/schema/thrift/src_include.hs" #-}
 type instance Angle.RecordFields Glean.Schema.Src.Types.Range =
      'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
        ('Angle.TField "lineBegin" (Glean.Nat)
           ('Angle.TField "columnBegin" (Glean.Nat)
              ('Angle.TField "lineEnd" (Glean.Nat)
                 ('Angle.TField "columnEnd" (Glean.Nat) ('Angle.TNoFields)))))
-{-# LINE 211 "glean/schema/thrift/src_include.hs" #-}
+{-# LINE 228 "glean/schema/thrift/src_include.hs" #-}
 instance Glean.Type Glean.Schema.Src.Types.Language where
   buildRtsValue = Glean.thriftEnum_buildRtsValue
   decodeRtsValue = Glean.thriftEnumD
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "src.Language" (Prelude.Just 1))
-{-# LINE 216 "glean/schema/thrift/src_include.hs" #-}
+{-# LINE 233 "glean/schema/thrift/src_include.hs" #-}
 type instance Angle.SumFields Glean.Schema.Src.Types.Language =
      'Angle.TField "Buck" (Glean.Schema.Builtin.Types.Unit)
        ('Angle.TField "C" (Glean.Schema.Builtin.Types.Unit)
@@ -2189,12 +2320,12 @@
                                ('Angle.TField "Java" (Glean.Schema.Builtin.Types.Unit)
                                   ('Angle.TField "GraphQL" (Glean.Schema.Builtin.Types.Unit)
                                      ('Angle.TNoFields)))))))))))
-{-# LINE 218 "glean/schema/thrift/src_include.hs" #-}
+{-# LINE 235 "glean/schema/thrift/src_include.hs" #-}
 instance Angle.AngleEnum Glean.Schema.Src.Types.Language where
   type AngleEnumTy Glean.Schema.Src.Types.Language =
        Glean.Schema.Src.Types.Language
   enumName v = Text.pack (Prelude.drop 9 (Prelude.show v))
-{-# LINE 222 "glean/schema/thrift/src_include.hs" #-}
+{-# LINE 239 "glean/schema/thrift/src_include.hs" #-}
 instance Glean.Type Glean.Schema.Src.Types.RelByteSpan where
   buildRtsValue b (Glean.Schema.Src.Types.RelByteSpan x1 x2)
     = do Glean.buildRtsValue b x1
@@ -2205,12 +2336,12 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "src.RelByteSpan" (Prelude.Just 1))
-{-# LINE 231 "glean/schema/thrift/src_include.hs" #-}
+{-# LINE 248 "glean/schema/thrift/src_include.hs" #-}
 type instance Angle.RecordFields Glean.Schema.Src.Types.RelByteSpan
      =
      'Angle.TField "offset" (Glean.Nat)
        ('Angle.TField "length" (Glean.Nat) ('Angle.TNoFields))
-{-# LINE 233 "glean/schema/thrift/src_include.hs" #-}
+{-# LINE 250 "glean/schema/thrift/src_include.hs" #-}
 instance Glean.Type Glean.Schema.Src.Types.ByteRange where
   buildRtsValue b (Glean.Schema.Src.Types.ByteRange x1 x2)
     = do Glean.buildRtsValue b x1
@@ -2221,11 +2352,11 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "src.ByteRange" (Prelude.Just 1))
-{-# LINE 242 "glean/schema/thrift/src_include.hs" #-}
+{-# LINE 259 "glean/schema/thrift/src_include.hs" #-}
 type instance Angle.RecordFields Glean.Schema.Src.Types.ByteRange =
      'Angle.TField "begin" (Glean.Nat)
        ('Angle.TField "end" (Glean.Nat) ('Angle.TNoFields))
-{-# LINE 244 "glean/schema/thrift/src_include.hs" #-}
+{-# LINE 261 "glean/schema/thrift/src_include.hs" #-}
 instance Glean.Type Glean.Schema.Src.Types.ByteSpan where
   buildRtsValue b (Glean.Schema.Src.Types.ByteSpan x1 x2)
     = do Glean.buildRtsValue b x1
@@ -2236,11 +2367,11 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "src.ByteSpan" (Prelude.Just 1))
-{-# LINE 253 "glean/schema/thrift/src_include.hs" #-}
+{-# LINE 270 "glean/schema/thrift/src_include.hs" #-}
 type instance Angle.RecordFields Glean.Schema.Src.Types.ByteSpan =
      'Angle.TField "start" (Glean.Nat)
        ('Angle.TField "length" (Glean.Nat) ('Angle.TNoFields))
-{-# LINE 255 "glean/schema/thrift/src_include.hs" #-}
+{-# LINE 272 "glean/schema/thrift/src_include.hs" #-}
 instance Glean.Type Glean.Schema.Src.Types.PackedByteSpansGroup
          where
   buildRtsValue b (Glean.Schema.Src.Types.PackedByteSpansGroup x1 x2)
@@ -2253,12 +2384,12 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "src.PackedByteSpansGroup" (Prelude.Just 1))
-{-# LINE 264 "glean/schema/thrift/src_include.hs" #-}
+{-# LINE 281 "glean/schema/thrift/src_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Src.Types.PackedByteSpansGroup =
      'Angle.TField "length" (Glean.Nat)
        ('Angle.TField "offsets" ([Glean.Nat]) ('Angle.TNoFields))
-{-# LINE 266 "glean/schema/thrift/src_include.hs" #-}
+{-# LINE 283 "glean/schema/thrift/src_include.hs" #-}
 instance Glean.Type Glean.Schema.Src.Types.Loc where
   buildRtsValue b (Glean.Schema.Src.Types.Loc x1 x2 x3)
     = do Glean.buildRtsValue b x1
@@ -2270,12 +2401,12 @@
         <*> Glean.decodeRtsValue
   sourceType _
     = Angle.NamedTy () (Angle.SourceRef "src.Loc" (Prelude.Just 1))
-{-# LINE 277 "glean/schema/thrift/src_include.hs" #-}
+{-# LINE 294 "glean/schema/thrift/src_include.hs" #-}
 type instance Angle.RecordFields Glean.Schema.Src.Types.Loc =
      'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
        ('Angle.TField "line" (Glean.Nat)
           ('Angle.TField "column" (Glean.Nat) ('Angle.TNoFields)))
-{-# LINE 279 "glean/schema/thrift/src_include.hs" #-}
+{-# LINE 296 "glean/schema/thrift/src_include.hs" #-}
 instance Glean.Type Glean.Schema.Src.Types.FileLocation where
   buildRtsValue b (Glean.Schema.Src.Types.FileLocation x1 x2)
     = do Glean.buildRtsValue b x1
@@ -2286,7 +2417,7 @@
   sourceType _
     = Angle.NamedTy ()
         (Angle.SourceRef "src.FileLocation" (Prelude.Just 1))
-{-# LINE 288 "glean/schema/thrift/src_include.hs" #-}
+{-# LINE 305 "glean/schema/thrift/src_include.hs" #-}
 type instance
      Angle.RecordFields Glean.Schema.Src.Types.FileLocation =
      'Angle.TField "file" (Glean.KeyType Glean.Schema.Src.Types.File)
diff --git a/glean/shell/Glean/Shell.hs b/glean/shell/Glean/Shell.hs
--- a/glean/shell/Glean/Shell.hs
+++ b/glean/shell/Glean/Shell.hs
@@ -1296,12 +1296,17 @@
 reportService :: LocalOrRemote backend => backend -> Eval ()
 reportService backend = case backendKind backend of
   BackendEnv Env{..} -> do
-    output $  "Using local DBs from " <> pretty (describe envStorage)
+    output $  "Using local DBs from " <>
+      case HashMap.elems envStorage of
+        Some s : _ -> pretty (describe s)
+        _ -> "???"
   BackendThrift thrift -> do
     case Glean.clientConfig_serv (thriftBackendClientConfig thrift) of
       Tier tier -> output $ "Using service " <> pretty tier
       HostPort host port ->
         output $ "Using service at " <> pretty host <> ":" <> pretty port
+      Uri uri ->
+        output $ "Using service at " <> pretty uri
       _ -> error "shouldn't happen"
 
 evalMain :: Config -> Maybe String -> Eval ()
diff --git a/glean/shell/Glean/Shell/Index.hs b/glean/shell/Glean/Shell/Index.hs
--- a/glean/shell/Glean/Shell/Index.hs
+++ b/glean/shell/Glean/Shell/Index.hs
@@ -102,7 +102,7 @@
   Glean.fillDatabase be repo Nothing onExisting $
     forM_ parsedFiles $ \(batches, schema_id) -> do
       let opts = schemaIdToOpts schema_id
-      Glean.sendJsonBatch be repo batches opts
+      Glean.sendJsonBatchAndWait be repo batches opts
 
 create :: Glean.Repo -> Eval ()
 create repo = withBackend $ \be ->  liftIO $ do
diff --git a/glean/storage/common.h b/glean/storage/common.h
new file mode 100644
--- /dev/null
+++ b/glean/storage/common.h
@@ -0,0 +1,1081 @@
+/*
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+#pragma once
+
+#include <glean/rts/ownership/uset.h>
+#include "glean/rts/binary.h"
+#include "glean/rts/timer.h"
+
+#include "glean/storage/db.h"
+
+namespace facebook {
+namespace glean {
+namespace db {
+
+using namespace rts;
+
+enum class AdminId : uint32_t {
+  NEXT_ID,
+  VERSION,
+  STARTING_ID,
+  FIRST_UNIT_ID,
+  NEXT_UNIT_ID,
+  ORPHAN_FACTS,
+};
+
+template <typename T>
+inline folly::ByteRange bytesOf(const T& x) {
+  return folly::ByteRange(
+      reinterpret_cast<const unsigned char*>(&x), sizeof(x));
+}
+
+template <typename T>
+inline T fromBytes(const folly::ByteRange slice) {
+  assert(slice.size() == sizeof(T));
+  T x;
+  std::memcpy(&x, slice.data(), slice.size());
+  return x;
+}
+
+///
+/// Common operations for DB implementations abstracted over
+/// the ContainerImpl class, which must provide:
+///
+///   C::Family::<name>  - column families
+///   C::Iterator read() - start reading
+///   C::Writer write()  - start writing
+///
+///   typename C::Iterator (various operations)
+///   typename C::Writer (various operations)
+///
+template <typename C>
+struct DatabaseCommon : Database {
+  DatabaseCommon(C c) : container_(std::move(c)) {};
+  C container_;
+
+  rts::UnitId first_unit_id;
+  rts::UsetId next_uset_id; // also next UnitId, since they share a namespace
+  std::vector<size_t> ownership_unit_counters;
+  folly::F14FastMap<uint64_t, size_t> ownership_derived_counters;
+
+  // Cached ownership sets, only used when writing.
+  // Note: must only be accessed under the write lock
+  std::unique_ptr<rts::Usets> usets_;
+
+  std::vector<size_t> loadOwnershipUnitCounters();
+  folly::F14FastMap<uint64_t, size_t> loadOwnershipDerivedCounters();
+
+  std::unique_ptr<rts::OwnershipSetIterator> getSetIterator(
+      DatabaseCommon<C>& db);
+
+  std::unique_ptr<Usets> loadOwnershipSets();
+
+  folly::Optional<uint32_t> getUnitId(folly::ByteRange unit) override;
+  folly::Optional<std::string> getUnit(uint32_t unit_id) override;
+  uint32_t nextUnitId();
+
+  void addOwnership(const std::vector<OwnershipSet>& ownership) override;
+
+  std::unique_ptr<rts::DerivedFactOwnershipIterator>
+  getDerivedFactOwnershipIterator(Pid pid) override;
+
+  std::unique_ptr<rts::OwnershipUnitIterator> getOwnershipUnitIterator()
+      override;
+
+  void storeOwnership(ComputedOwnership& ownership) override;
+
+  void addDefineOwnership(DefineOwnership& def) override;
+
+  rts::UsetId getOwner(Id id) override;
+
+  std::unique_ptr<rts::Ownership> getOwnership() override;
+
+  // Cache for getOwner(Id)
+  //
+  // We start with an interval map stored in the factOwners column family. This
+  // is translated into a more efficient representation in factOwnerPages when
+  // the DB is finalized,
+  //
+  // The cache is split into pages each covering 2^PAGE_BITS Ids.
+  // The prefix of a page is Id >> PAGE_BITS.
+  //
+  // We're trying to trade-off:
+  //    - space overhead in the DB: group data into pages, and don't create
+  //      DB entries for empty pages.
+  //    - time to open a DB: the cache is populated lazily from the DB
+  //    - latency when the cache is cold: just one Get() to fetch a page
+  //    - as few DB lookups as possible: each lookup populates a whole page
+  //
+  // PageIndex
+  //    - stored as one blob in the DB, factOwnerPages["INDEX"]
+  //    - maps prefix -> maybe UsetId
+  //      - UsetId => all Ids in this page map to the same UsetId, which might
+  //      be INVALID_USET
+  //      - nothing => fetch the page
+  //    - the purpose of the index is to support the sparse interval maps we
+  //    will have in
+  //      stacked DBs. Otherwise we would need 250k entries in the PageStore for
+  //      a stacked DB where the base has 1B facts. With the index we just need
+  //      a 1MB index blob where a few of the pages will be populated.
+  //
+  // PageStore
+  //    - stored as prefix -> Page in the DB
+  //    - Each page is a table of intervals [(id1,set1), (id2,set2), ...],
+  //      split into two arrays because the IDs are 16 bits and we want that
+  //      array to be as compact as possible. See "struct Page" below.
+  //
+  // To find the UsetId for a given Id:
+  //    - look up the prefix in the index
+  //    - if the index contains a UsetId, that's the result
+  //    - otherwise fetch the Page for this prefix
+  //    - binary-search in the Page to find the correct interval
+
+  /// Enable the fact owner cache. This should only be called when the
+  // DB is read-only, and only after prepareFactOwnerCache().
+  void cacheOwnership() override;
+
+  /// Translate the data in factOwners into factOwnerPages. Do not call
+  // prepareFactOwnerCache() until the DB is complete.
+  void prepareFactOwnerCache() override;
+
+  struct FactOwnerCache {
+    static void prepare(C& container);
+    void enable(C& container);
+
+    // Lookup in the cache. Returns none if the cache is not enabled
+    std::optional<rts::UsetId> getOwner(C& container, Id id);
+
+   private:
+    struct Page {
+      std::vector<uint16_t> factIds;
+      std::vector<rts::UsetId> setIds;
+    };
+    static rts::UsetId lookup(const Page& page, Id id);
+    static std::unique_ptr<Page> readPage(C& container, uint64_t prefix);
+
+    struct Cache {
+      std::vector<rts::UsetId> index;
+      std::vector<std::unique_ptr<Page>> pages;
+
+      // tracks the memory usage of the cache
+      size_t size_;
+    };
+
+    // nullptr means the cache is disabled (while the DB is writable)
+    folly::Synchronized<std::unique_ptr<Cache>> cache_;
+  };
+
+  FactOwnerCache factOwnerCache_;
+
+  virtual OwnershipStats getOwnershipStats() = 0;
+};
+
+template <typename C>
+std::vector<size_t> DatabaseCommon<C>::loadOwnershipUnitCounters() {
+  container_.requireOpen();
+  std::vector<size_t> result;
+
+  auto iter = container_.read(C::Family::ownershipRaw);
+
+  for (iter.seek_first(); iter.valid(); iter.next()) {
+    binary::Input key(iter.key());
+    auto id = key.trustedNat();
+    if (id == first_unit_id + result.size()) {
+      result.push_back(1);
+    } else if (id + 1 == first_unit_id + result.size()) {
+      ++result.back();
+    } else {
+      rts::error("rocksdb: invalid ownershipUnits {} {}", id, result.size());
+    }
+  }
+
+  return result;
+}
+
+template <typename C>
+folly::F14FastMap<uint64_t, size_t>
+DatabaseCommon<C>::loadOwnershipDerivedCounters() {
+  container_.requireOpen();
+  folly::F14FastMap<uint64_t, size_t> result;
+
+  auto iter = container_.read(C::Family::ownershipDerivedRaw);
+
+  for (iter.seek_first(); iter.valid(); iter.next()) {
+    binary::Input key(iter.key());
+    auto pid = key.trustedNat();
+    const auto [i, _] = result.insert({pid, 0});
+    ++i->second;
+  }
+
+  VLOG(1) << "derived fact owners for " << result.size() << " pids";
+  return result;
+}
+
+template <typename C>
+std::unique_ptr<rts::OwnershipSetIterator> DatabaseCommon<C>::getSetIterator(
+    DatabaseCommon<C>& db) {
+  struct SetIterator : rts::OwnershipSetIterator {
+    explicit SetIterator(DatabaseCommon<C>& db)
+        : iter(db.container_.read(C::Family::ownershipSets)) {
+      size_t last;
+
+      iter.seek_last();
+      if (!iter.valid()) {
+        last = 0;
+      } else {
+        binary::Input key(iter.key());
+        last = key.trustedNat();
+      }
+
+      iter.seek_first();
+      if (!iter.valid()) {
+        first_ = db.next_uset_id;
+        size_ = 0;
+      } else {
+        binary::Input key(iter.key());
+        first_ = key.trustedNat();
+        size_ = last - first_ + 1;
+      }
+    }
+
+    folly::Optional<std::pair<UsetId, SetExpr<const OwnerSet*>>> get()
+        override {
+      if (!initial) {
+        iter.next();
+      } else {
+        initial = false;
+      }
+      if (iter.valid()) {
+        binary::Input key(iter.key());
+        auto usetid = key.trustedNat();
+        // EliasFano needs to be able to read 8 bytes past the end of
+        // the data, so we have to copy the bytes to add padding.
+        const size_t pad = 8;
+        bytes = hs::ffi::clone_array<uint8_t>(
+            reinterpret_cast<const uint8_t*>(iter.value().data()),
+            iter.value().size(),
+            pad);
+        binary::Input val(bytes.get(), iter.value().size());
+        exp.op = static_cast<SetOp>(val.trustedNat());
+        exp.set = deserializeEliasFano(val);
+        return std::pair<uint32_t, SetExpr<const OwnerSet*>>(
+            usetid, {exp.op, &exp.set});
+      } else {
+        return folly::none;
+      }
+    }
+
+    std::pair<size_t, size_t> sizes() const override {
+      return {first_, size_};
+    }
+
+    hs::ffi::malloced_array<uint8_t> bytes;
+    bool initial = true;
+    SetExpr<OwnerSet> exp;
+    size_t first_, size_;
+    typename C::Iterator iter;
+  };
+
+  return std::make_unique<SetIterator>(db);
+}
+
+template <typename C>
+std::unique_ptr<Usets> DatabaseCommon<C>::loadOwnershipSets() {
+  auto t = makeAutoTimer("loadOwnershipSets");
+
+  auto iter = getSetIterator(*this);
+  auto pair = iter->sizes();
+  auto first = pair.first;
+  auto size = pair.second;
+
+  auto usets = std::make_unique<Usets>(first + size);
+
+  while (const auto iterPair = iter->get()) {
+    auto set = SetU32::fromEliasFano(*iterPair->second.set);
+    // paranoia: check the set contents make sense
+    set.foreach([first, size](UsetId id) {
+      if (id >= first + size) {
+        rts::error(
+            "invalid ownershipSets: id out of range: {} {} {}",
+            id,
+            first,
+            size);
+      }
+    });
+    auto p = usets->add(std::move(set), 0);
+    p->id = iterPair->first;
+  }
+  auto stats = usets->statistics();
+
+  LOG(INFO) << "loadOwnershipSets loaded " << stats.adds << " sets, "
+            << stats.bytes << " bytes";
+
+  return usets;
+}
+
+template <typename C>
+folly::Optional<uint32_t> DatabaseCommon<C>::getUnitId(folly::ByteRange unit) {
+  uint32_t r;
+  if (container_.get(C::Family::ownershipUnits, unit, [&](auto val) {
+        assert(val.size() == sizeof(uint32_t));
+        r = folly::loadUnaligned<uint32_t>(val.data());
+      })) {
+    return r;
+  } else {
+    return folly::none;
+  }
+}
+
+template <typename C>
+uint32_t DatabaseCommon<C>::nextUnitId() {
+  auto iter = container_.read(C::Family::ownershipUnitIds);
+
+  size_t max_unit_id;
+
+  iter.seek_last();
+  if (!iter.valid()) {
+    max_unit_id = first_unit_id;
+  } else {
+    binary::Input key(iter.key());
+    max_unit_id = key.trustedNat();
+  }
+
+  return max_unit_id;
+}
+
+template <typename C>
+folly::Optional<std::string> DatabaseCommon<C>::getUnit(uint32_t unit_id) {
+  std::string r;
+  EncodedNat key(unit_id);
+  if (container_.get(
+          C::Family::ownershipUnitIds, key.byteRange(), [&](auto val) {
+            r = binary::mkString(val);
+          })) {
+    return r;
+  } else {
+    return folly::none;
+  }
+}
+
+// Called once per batch inside Store.commit.
+// Only function that can add new UnitIds to the DB.
+// Adds to
+//   - Family::ownershipUnits
+//   - Family::ownershipUnitIds
+//   - Family::ownershipRaw
+//   - Family::admin
+template <typename C>
+void DatabaseCommon<C>::addOwnership(
+    const std::vector<OwnershipSet>& ownership) {
+  container_.requireOpen();
+
+  if (ownership.empty()) {
+    return;
+  }
+
+  size_t new_count = 0;
+  std::vector<size_t> touched;
+
+  auto writer = container_.write();
+
+  for (const auto& set : ownership) {
+    uint32_t unit_id;
+    auto res = getUnitId(set.unit);
+    if (res.hasValue()) {
+      unit_id = *res;
+      if (unit_id >= first_unit_id + ownership_unit_counters.size()) {
+        rts::error("inconsistent unit id {}", unit_id);
+      }
+      touched.push_back(unit_id);
+    } else {
+      unit_id = first_unit_id + ownership_unit_counters.size() + new_count;
+      writer.put(C::Family::ownershipUnits, set.unit, bytesOf(unit_id));
+      EncodedNat key(unit_id);
+      writer.put(C::Family::ownershipUnitIds, key.byteRange(), set.unit);
+      ++new_count;
+    }
+
+    binary::Output key;
+    key.nat(unit_id);
+    key.nat(
+        unit_id < first_unit_id + ownership_unit_counters.size()
+            ? ownership_unit_counters[unit_id - first_unit_id]
+            : 0);
+    folly::ByteRange val(
+        reinterpret_cast<const unsigned char*>(set.ids.data()),
+        set.ids.size() * sizeof(int64_t));
+    writer.put(C::Family::ownershipRaw, key.bytes(), val);
+  }
+
+  if (new_count > 0) {
+    next_uset_id += new_count;
+
+    writer.put(
+        C::Family::admin,
+        bytesOf(AdminId::NEXT_UNIT_ID),
+        bytesOf(next_uset_id));
+  }
+
+  writer.commit();
+
+  for (auto i : touched) {
+    CHECK_LT(i, first_unit_id + ownership_unit_counters.size());
+    ++ownership_unit_counters[i - first_unit_id];
+  }
+  ownership_unit_counters.insert(ownership_unit_counters.end(), new_count, 1);
+  CHECK_EQ(next_uset_id, ownership_unit_counters.size() + first_unit_id);
+}
+
+template <typename C>
+std::unique_ptr<rts::DerivedFactOwnershipIterator>
+DatabaseCommon<C>::getDerivedFactOwnershipIterator(Pid pid) {
+  struct DerivedFactIterator : rts::DerivedFactOwnershipIterator {
+    explicit DerivedFactIterator(Pid pid, C& container_)
+        : pid_(pid), iter(container_.read(C::Family::ownershipDerivedRaw)) {
+      EncodedNat key(pid.toWord());
+      iter.seek_key(key.byteRange());
+    }
+
+    folly::Optional<DerivedFactOwnership> get() override {
+      if (iter.valid()) {
+        binary::Input key(iter.key());
+        auto pid = key.trustedNat();
+        if (pid != pid_.toWord()) {
+          return {};
+        }
+        const auto val = iter.value();
+        const size_t elts = val.size() / (sizeof(uint32_t) + sizeof(uint64_t));
+        const Id* ids = reinterpret_cast<const Id*>(val.data());
+        const UsetId* owners = reinterpret_cast<const UsetId*>(
+            val.data() + elts * sizeof(uint64_t));
+        iter.next();
+        return rts::DerivedFactOwnership{{ids, elts}, {owners, elts}};
+      } else {
+        return folly::none;
+      }
+    }
+
+    Pid pid_;
+    typename C::Iterator iter;
+  };
+
+  return std::make_unique<DerivedFactIterator>(pid, container_);
+}
+
+template <typename C>
+std::unique_ptr<rts::OwnershipUnitIterator>
+DatabaseCommon<C>::getOwnershipUnitIterator() {
+  struct UnitIterator : rts::OwnershipUnitIterator {
+    explicit UnitIterator(C& container_)
+        : iter(container_.read(C::Family::ownershipRaw)) {
+      iter.seek_first();
+    }
+
+    folly::Optional<rts::OwnershipUnit> get() override {
+      if (iter.valid()) {
+        binary::Input key(iter.key());
+        auto unit = key.trustedNat();
+        const auto val = iter.value();
+        iter.next();
+        return rts::OwnershipUnit{
+            static_cast<uint32_t>(unit),
+            {reinterpret_cast<const OwnershipUnit::Ids*>(val.data()),
+             val.size() / sizeof(OwnershipUnit::Ids)}};
+      } else {
+        return {};
+      }
+    }
+
+    typename C::Iterator iter;
+  };
+
+  return std::make_unique<UnitIterator>(container_);
+}
+
+namespace {
+
+template <typename C>
+void putOwnerSet(
+    C& container,
+    typename C::Writer& writer,
+    UsetId id,
+    SetOp op,
+    const OwnerSet& set) {
+  binary::Output key;
+  key.nat(id);
+  binary::Output value;
+  value.nat(op);
+  serializeEliasFano(value, set);
+  writer.put(C::Family::ownershipSets, key.bytes(), value.bytes());
+}
+
+} // namespace
+
+template <typename C>
+void DatabaseCommon<C>::storeOwnership(ComputedOwnership& ownership) {
+  container_.requireOpen();
+
+  if (ownership.sets_.size() > 0) {
+    auto t = makeAutoTimer("storeOwnership(sets)");
+    typename C::Writer writer = container_.write();
+
+    auto upper = ownership.sets_.getFirstId() + ownership.sets_.size();
+
+    auto serialized = ownership.sets_.toEliasFano(upper);
+    uint32_t id = ownership.sets_.getFirstId();
+    CHECK_GE(id, next_uset_id);
+
+    for (auto& exp : serialized) {
+      if ((id % 1000000) == 0) {
+        VLOG(1) << "storeOwnership: " << id;
+      }
+      putOwnerSet(container_, writer, id, exp.op, exp.set);
+      exp.set.free();
+      id++;
+    }
+
+    next_uset_id = upper;
+    writer.put(
+        C::Family::admin,
+        bytesOf(AdminId::NEXT_UNIT_ID),
+        bytesOf(next_uset_id));
+
+    VLOG(1) << "storeOwnership: writing sets (" << ownership.sets_.size()
+            << ")";
+    writer.commit();
+
+    if (usets_->size() == 0) {
+      // If usets_ is empty, then it will not have the correct firstId yet
+      usets_ = std::make_unique<Usets>(ownership.sets_.getFirstId());
+    }
+    usets_->append(std::move(ownership.sets_));
+  }
+
+  CHECK(usets_->size() == 0 || usets_->getNextId() == next_uset_id);
+  // TODO: better not add new units after storing sets, we should fail if that
+  // happens
+
+  if (ownership.facts_.size() > 0) {
+    auto t = makeAutoTimer("storeOwnership(facts)");
+
+    auto hasOwner = [&](EncodedNat& key) -> bool {
+      bool r = false;
+      container_.get(
+          C::Family::factOwners, key.byteRange(), [&](auto) { r = true; });
+      return r;
+    };
+
+    typename C::Writer writer = container_.write();
+    for (uint64_t i = 0; i < ownership.facts_.size(); i++) {
+      auto id = ownership.facts_[i].first;
+      auto usetid = ownership.facts_[i].second;
+      EncodedNat key(id.toWord());
+      if (usetid != INVALID_USET || !hasOwner(key)) {
+        if (usetid != INVALID_USET) {
+          CHECK_LT(usetid, next_uset_id);
+        }
+        // This is an interval map, and we might be writing multiple sparse sets
+        // of intervals where the gaps are indicated by INVALID_USET. Therefore
+        // don't overwrite an existing owner with INVALID_USET.
+        EncodedNat val(usetid);
+        writer.put(C::Family::factOwners, key.byteRange(), val.byteRange());
+      }
+    }
+    VLOG(1) << "storeOwnership: writing facts: " << ownership.facts_.size()
+            << " intervals";
+    writer.commit();
+  }
+}
+
+// Called once per batch. Can't be run in parallel.
+// Will add data into:
+// - Family::ownershipSets
+// - Family::ownershipDerivedRaw
+// - Family::admin
+template <typename C>
+void DatabaseCommon<C>::addDefineOwnership(DefineOwnership& def) {
+  auto t = makeAutoTimer("addDefineOwnership");
+  container_.requireOpen();
+
+  VLOG(1) << "addDefineOwnership: " << def.usets_.size() << " sets";
+
+  // add new owner sets
+  if (def.newSets_.size() > 0) {
+    folly::F14FastMap<UsetId, UsetId> substitution;
+    auto subst = [&](uint32_t old) -> uint32_t {
+      auto n = substitution.find(old);
+      if (n == substitution.end()) {
+        return old;
+      } else {
+        return n->second;
+      }
+    };
+
+    typename C::Writer writer = container_.write();
+    size_t numNewSets = 0;
+
+    for (auto uset : def.newSets_) {
+      std::set<UsetId> s;
+      uset->exp.set.foreach([&](uint32_t elt) {
+        UsetId newelt = subst(elt);
+        if (newelt >= next_uset_id) {
+          rts::error(
+              "set id out of range: {} {} {}", newelt, next_uset_id, elt);
+        }
+        s.insert(newelt);
+      });
+      SetU32 set = SetU32::from(s);
+
+      auto newUset = std::make_unique<Uset>(std::move(set), uset->exp.op, 0);
+      auto p = newUset.get();
+      auto oldId = uset->id;
+      auto q = usets_->add(std::move(newUset));
+      if (p == q) {
+        usets_->promote(p);
+        assert(next_uset_id == p->id);
+        next_uset_id++;
+        auto ownerset = p->toEliasFano(next_uset_id);
+        putOwnerSet(container_, writer, p->id, ownerset.op, ownerset.set);
+        ownerset.set.free();
+        numNewSets++;
+      }
+      VLOG(2) << "rebased set " << oldId << " -> " << q->id;
+      substitution[oldId] = q->id;
+    }
+
+    if (numNewSets > 0) {
+      writer.put(
+          C::Family::admin,
+          bytesOf(AdminId::NEXT_UNIT_ID),
+          bytesOf(next_uset_id));
+    }
+
+    VLOG(1) << "addDefineOwnership: writing sets (" << numNewSets << ")";
+    writer.commit();
+
+    for (auto& [_, pred] : def.defines_) {
+      for (auto& owner : pred.owners_) {
+        owner = subst(owner);
+      }
+
+      for (auto& owner : pred.new_owners_) {
+        owner = subst(owner);
+      }
+    }
+  }
+
+  typename C::Writer writer = container_.write();
+
+  for (const auto& [pid, pred] : def) {
+    VLOG(1) << "addDefineOwnership: "
+            << pred.owners_.size() + pred.new_owners_.size()
+            << " owners, for pid " << pid.toWord();
+
+    // ownershipDerivedRaw :: (Pid,nat) -> vector<int64_t>
+    //
+    // Similarly to ownershipRaw, this is basically just an
+    // append-only log. The nat in the key is a per-Pid counter that
+    // we bump by one each time we add another batch of data for a
+    // Pid.
+
+    binary::Output key;
+    key.nat(pid.toWord());
+    const auto [it, _] = ownership_derived_counters.insert({pid.toWord(), 0});
+    key.nat(it->second++);
+
+    binary::Output val;
+
+    val.bytes(
+        pred.ids_.data(),
+        pred.ids_.size() *
+            sizeof(typename std::remove_reference<
+                   decltype(pred.ids_)>::type::value_type));
+    val.bytes(
+        pred.new_ids_.data(),
+        pred.new_ids_.size() *
+            sizeof(typename std::remove_reference<
+                   decltype(pred.new_ids_)>::type::value_type));
+    val.bytes(
+        pred.owners_.data(),
+        pred.owners_.size() *
+            sizeof(typename std::remove_reference<
+                   decltype(pred.owners_)>::type::value_type));
+    val.bytes(
+        pred.new_owners_.data(),
+        pred.new_owners_.size() *
+            sizeof(typename std::remove_reference<
+                   decltype(pred.new_owners_)>::type::value_type));
+
+    writer.put(C::Family::ownershipDerivedRaw, key.bytes(), val.bytes());
+
+    VLOG(1) << "addDefineOwnership wrote "
+            << pred.ids_.size() + pred.new_ids_.size() << " entries for pid "
+            << pid.toWord();
+  }
+
+  writer.commit();
+}
+
+template <typename C>
+void DatabaseCommon<C>::cacheOwnership() {
+  factOwnerCache_.enable(container_);
+}
+
+template <typename C>
+void DatabaseCommon<C>::prepareFactOwnerCache() {
+  FactOwnerCache::prepare(container_);
+}
+
+template <typename C>
+UsetId DatabaseCommon<C>::getOwner(Id id) {
+  auto cached = factOwnerCache_.getOwner(container_, id);
+
+  if (cached) {
+    return cached.value();
+  } else {
+    // cache is not enabled; fall back to reading from the DB.
+    auto iter = container_.read(C::Family::factOwners);
+
+    EncodedNat key(id.toWord());
+    iter.seek_key_lower(key.byteRange());
+    if (iter.valid()) {
+      binary::Input val(iter.value());
+      return val.trustedNat();
+    } else {
+      return INVALID_USET;
+    }
+  }
+}
+
+namespace {
+// key in factOwnerPages where we store the index
+static const std::string INDEX_KEY = "INDEX";
+
+// sentinel value in the index indicating that this prefix has a page in
+// factOwnerPages
+static const UsetId HAS_PAGE = SPECIAL_USET;
+
+// Note: this constant affects the data in the DB, so it can't be changed.
+static const size_t PAGE_BITS = 12;
+static const uint64_t PAGE_MASK = (1 << PAGE_BITS) - 1;
+} // namespace
+
+template <typename C>
+void DatabaseCommon<C>::FactOwnerCache::enable(C& container) {
+  auto cache = cache_.ulock();
+  if (*cache) {
+    return;
+  }
+
+  std::vector<UsetId> index;
+
+  if (!container.get(
+          C::Family::factOwnerPages,
+          binary::byteRange(INDEX_KEY),
+          [&](auto val) {
+            CHECK_EQ(val.size() % sizeof(UsetId), 0);
+            size_t num = val.size() / sizeof(UsetId);
+            index.resize(num);
+            const UsetId* start = reinterpret_cast<const UsetId*>(val.data());
+            std::copy(start, start + num, index.data());
+            VLOG(1) << folly::sformat("owner cache index: {} entries", num);
+          })) {
+    LOG(WARNING) << "cannot enable cache; missing INDEX";
+    // assume this is an old DB without factOwnerPages, we'll fall back
+    // to using factOwners.
+    return;
+  }
+
+  size_t size = index.size() * sizeof(UsetId);
+  Cache content{
+      .index = std::move(index),
+      .pages = {},
+      .size_ = size,
+  };
+
+  auto wcache = cache.moveFromUpgradeToWrite();
+  *wcache = std::make_unique<Cache>(std::move(content));
+}
+
+template <typename C>
+std::unique_ptr<typename DatabaseCommon<C>::FactOwnerCache::Page>
+DatabaseCommon<C>::FactOwnerCache::readPage(C& container, uint64_t prefix) {
+  auto p = std::make_unique<FactOwnerCache::Page>();
+
+  if (!container.get(C::Family::factOwnerPages, bytesOf(prefix), [&](auto val) {
+        size_t num = val.size() / (sizeof(int16_t) + sizeof(UsetId));
+        p->factIds.resize(num);
+        p->setIds.resize(num);
+        const uint16_t* ids = reinterpret_cast<const uint16_t*>(val.data());
+        const UsetId* sets = reinterpret_cast<const UsetId*>(
+            reinterpret_cast<const uint8_t*>(val.data()) +
+            num * sizeof(uint16_t));
+        std::copy(ids, ids + num, p->factIds.data());
+        std::copy(sets, sets + num, p->setIds.data());
+      })) {
+    rts::error("missing page: {}", prefix);
+  }
+
+  return p;
+}
+
+template <typename C>
+UsetId DatabaseCommon<C>::FactOwnerCache::lookup(
+    const DatabaseCommon<C>::FactOwnerCache::Page& page,
+    Id id) {
+  // next binary-search on the content of the page to find the
+  // interval containing the desired fact ID.
+  uint32_t low, high, mid;
+  uint16_t ix = id.toWord() & PAGE_MASK;
+
+  low = 0;
+  high = page.factIds.size();
+
+  if (high == 0) {
+    rts::error("empty page");
+  }
+
+  // low is inclusive, high is exclusive
+  // low..high always contains an element that is <= id, if there is one
+  while (high - low > 1) {
+    mid = (high + low) / 2;
+    auto x = page.factIds[mid];
+    if (x == ix) {
+      return page.setIds[mid];
+    }
+    if (x < ix) {
+      low = mid;
+    } else {
+      high = mid;
+    }
+  }
+
+  if (page.factIds[low] <= ix) {
+    return page.setIds[low];
+  } else {
+    rts::error(
+        "missing lower bound, ix={} low={} prefix={}",
+        ix,
+        low,
+        id.toWord() >> PAGE_BITS);
+  }
+}
+
+template <typename C>
+std::optional<UsetId> DatabaseCommon<C>::FactOwnerCache::getOwner(
+    C& container,
+    Id id) {
+  auto cachePtr = cache_.rlock();
+  auto cache = cachePtr->get();
+
+  if (!cache) {
+    return {};
+  }
+
+  // first find the right page
+  auto prefix = id.toWord() >> PAGE_BITS;
+
+  if (prefix >= cache->index.size()) {
+    // The DB may have no or partial ownership information, leading to a
+    // smaller than expected index, in which case the missing entries
+    // are facts with no ownership.
+    return INVALID_USET;
+  }
+  UsetId pageval = cache->index[prefix];
+  if (pageval != HAS_PAGE) {
+    return pageval;
+  }
+
+  const FactOwnerCache::Page* page;
+
+  // grab the Page from the cache, or read it from the DB
+  if (prefix < cache->pages.size() && cache->pages[prefix]) {
+    page = cache->pages[prefix].get();
+    cachePtr.unlock();
+  } else {
+    cachePtr.unlock();
+
+    auto p = FactOwnerCache::readPage(container, prefix);
+    auto wlock = cache_.wlock();
+    auto wcache = wlock->get();
+    auto size = wcache->size_;
+
+    if (prefix >= wcache->pages.size()) {
+      wcache->pages.resize(prefix + 1);
+    }
+    if (!wcache->pages[prefix]) {
+      wcache->size_ += p->factIds.size() * sizeof(uint16_t) +
+          p->setIds.size() * sizeof(UsetId) + sizeof(*p);
+      wcache->pages[prefix] = std::move(p);
+    }
+
+    VLOG(2) << "new page(" << prefix
+            << ") size = " << folly::prettyPrint(size, folly::PRETTY_BYTES_IEC);
+    page = wcache->pages[prefix].get();
+  }
+
+  return FactOwnerCache::lookup(*page, id);
+}
+
+template <typename C>
+void DatabaseCommon<C>::FactOwnerCache::prepare(C& container) {
+  auto t = makeAutoTimer("prepareFactOwnerCache");
+
+  auto writer = container.write();
+  auto iter = container.read(C::Family::factOwners);
+
+  iter.seek_first();
+
+  std::vector<UsetId> index; // indexed by prefix
+  uint64_t prefix = 0; // prefix of the current page
+  UsetId set = INVALID_USET; // always the last set we saw
+  std::vector<uint16_t> ids; // in the current page
+  std::vector<UsetId> sets; // in the current page
+  size_t populated = 0; // for stats
+  int64_t orphaned = 0; // counts the orphan facts
+
+  auto writePage = [&]() {
+    if (ids.size() == 0) {
+      index.push_back(set);
+    } else {
+      index.push_back(HAS_PAGE);
+      binary::Output out;
+      out.bytes(ids.data(), ids.size() * sizeof(uint16_t));
+      out.bytes(sets.data(), sets.size() * sizeof(UsetId));
+      writer.put(C::Family::factOwnerPages, bytesOf(prefix), out.bytes());
+      ids.clear();
+      sets.clear();
+      populated++;
+    };
+  };
+
+  uint64_t prev = Id::lowest().toWord();
+  for (; iter.valid(); iter.next()) {
+    binary::Input key(iter.key());
+    uint64_t id = key.trustedNat();
+
+    uint64_t this_prefix = id >> PAGE_BITS;
+    uint16_t this_offset = id & PAGE_MASK;
+
+    if (this_prefix != prefix) {
+      for (; prefix < this_prefix; prefix++) {
+        writePage();
+      }
+    }
+    if (this_offset != 0 && ids.size() == 0) {
+      // fill in the lower bound with the previous set
+      ids.push_back(0);
+      sets.push_back(set);
+    }
+    if (set == INVALID_USET && id > prev) {
+      // track the number of orphaned facts
+      orphaned += id - prev;
+      VLOG(2) << folly::sformat("orphaned fact(s) {}-{}", prev, id - 1);
+    }
+
+    binary::Input val(iter.value());
+    set = val.trustedNat();
+    ids.push_back(this_offset);
+    sets.push_back(set);
+
+    prev = id;
+  }
+
+  // write the last page
+  writePage();
+
+  writer.put(
+      C::Family::factOwnerPages,
+      binary::byteRange(INDEX_KEY),
+      folly::ByteRange(
+          reinterpret_cast<const uint8_t*>(index.data()),
+          index.size() * sizeof(UsetId)));
+
+  t.logFormat(
+      "{} index entries, {} populated, {} orphans",
+      index.size(),
+      populated,
+      orphaned);
+
+  // record the number of orphaned facts, this will be fetched by ownershipStats
+  writer.put(
+      C::Family::admin, bytesOf(AdminId::ORPHAN_FACTS), bytesOf(orphaned));
+
+  writer.commit();
+}
+
+namespace {
+
+//
+// Wrapper around DatabaseImpl. Doesn't hold any extra data of its own.
+//
+template <typename C>
+struct StoredOwnership : Ownership {
+  explicit StoredOwnership(DatabaseCommon<C>* db) : db_(db) {}
+
+  UsetId nextSetId() override {
+    return db_->next_uset_id;
+  }
+
+  UsetId lookupSet(Uset* uset) override {
+    if (!db_->usets_) {
+      rts::error("rocksdb: lookupSet on read-only DB");
+    } else {
+      auto existing = db_->usets_->lookup(uset);
+      if (existing) {
+        return existing->id;
+      } else {
+        return INVALID_USET;
+      }
+    }
+  }
+
+  folly::Optional<SetExpr<SetU32>> getUset(UsetId id) override {
+    EncodedNat key(id);
+    folly::Optional<SetExpr<SetU32>> r;
+    if (db_->container_.get(
+            C::Family::ownershipSets, key.byteRange(), [&](auto val) {
+              binary::Input inp(val);
+              SetExpr<SetU32> exp;
+              exp.op = static_cast<SetOp>(inp.trustedNat());
+              exp.set = SetU32::fromEliasFano(deserializeEliasFano(inp));
+              r = exp;
+            })) {
+      return r;
+    } else {
+      return folly::none;
+    }
+  }
+
+  std::unique_ptr<rts::OwnershipSetIterator> getSetIterator() override {
+    return db_->getSetIterator(*db_);
+  }
+
+  folly::Optional<UnitId> getUnitId(folly::ByteRange unit) override {
+    return db_->getUnitId(unit);
+  }
+
+  OwnershipStats getStats() override {
+    return db_->getOwnershipStats();
+  }
+
+ private:
+  DatabaseCommon<C>* db_;
+};
+
+} // namespace
+
+template <typename C>
+std::unique_ptr<rts::Ownership> DatabaseCommon<C>::getOwnership() {
+  container_.requireOpen();
+  return std::make_unique<StoredOwnership<C>>(this);
+}
+} // namespace db
+} // namespace glean
+} // namespace facebook
diff --git a/glean/storage/db.h b/glean/storage/db.h
new file mode 100644
--- /dev/null
+++ b/glean/storage/db.h
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+#pragma once
+
+#include "glean/rts/densemap.h"
+#include "glean/rts/factset.h"
+#include "glean/rts/lookup.h"
+#include "glean/rts/ownership.h"
+#include "glean/rts/ownership/derived.h"
+#include "glean/rts/stats.h"
+#include "glean/rts/store.h"
+
+namespace facebook {
+namespace glean {
+namespace db {
+
+using rts::Id;
+using rts::Pid;
+
+struct Database;
+
+/// A rocksdb container for storing facts
+struct Container {
+  virtual ~Container() {}
+
+  /// Close the 'Container' - accessing it afterwards isn't allowed.
+  virtual void close() noexcept = 0;
+
+  /// Write a key/value pair to the Container metadata.
+  virtual void writeData(folly::ByteRange key, folly::ByteRange value) = 0;
+
+  /// Lookup a key in the Container metadata.
+  virtual bool readData(
+      folly::ByteRange key,
+      std::function<void(folly::ByteRange)> f) = 0;
+
+  /// Optimise the container for reading
+  virtual void optimize(bool compact) = 0;
+
+  /// Backup the Container to the specified directory.
+  virtual void backup(const std::string& path) = 0;
+
+  /// Convert the Container to a full fact Database with the given
+  /// representation version - accessing the original Container afterwards isn't
+  /// allowed. If the database is being created, start is the starting fact id.
+  ///
+  /// The base Ownership passed in (if any) must not be destructed before the
+  /// Database.
+  virtual std::unique_ptr<Database>
+  openDatabase(Id start, rts::UsetId first_unit_id, int32_t version) && = 0;
+};
+
+enum class Mode { ReadOnly = 0, ReadWrite = 1, Create = 2 };
+
+/// A fact database
+struct Database : rts::Lookup {
+  virtual Container& container() noexcept = 0;
+
+  virtual rts::PredicateStats predicateStats() const = 0;
+
+  struct OwnershipSet {
+    folly::ByteRange unit;
+    folly::Range<const int64_t*> ids;
+    // This is a list of intervals [x1,x2, y1,y2, ...]
+    // representing the inclusive ranges x1..x2, y1..y2, ...
+  };
+
+  virtual void commit(rts::FactSet& facts) = 0;
+
+  virtual void addOwnership(const std::vector<OwnershipSet>& ownership) = 0;
+  virtual std::unique_ptr<rts::OwnershipUnitIterator>
+  getOwnershipUnitIterator() = 0;
+
+  virtual void addDefineOwnership(rts::DefineOwnership& def) = 0;
+  virtual std::unique_ptr<rts::DerivedFactOwnershipIterator>
+  getDerivedFactOwnershipIterator(Pid pid) = 0;
+
+  virtual folly::Optional<uint32_t> getUnitId(folly::ByteRange) = 0;
+  virtual folly::Optional<std::string> getUnit(uint32_t) = 0;
+
+  virtual void storeOwnership(rts::ComputedOwnership& ownership) = 0;
+  virtual std::unique_ptr<rts::Ownership> getOwnership() = 0;
+
+  virtual void cacheOwnership() = 0;
+  virtual void prepareFactOwnerCache() = 0;
+};
+
+void restore(const std::string& target, const std::string& source);
+
+} // namespace db
+} // namespace glean
+} // namespace facebook
diff --git a/glean/storage/ffi.cpp b/glean/storage/ffi.cpp
new file mode 100644
--- /dev/null
+++ b/glean/storage/ffi.cpp
@@ -0,0 +1,201 @@
+/*
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+#ifdef OSS
+#include <cpp/memory.h> // @manual
+#include <cpp/wrap.h> // @manual
+#else
+#include <common/hs/util/cpp/memory.h>
+#include <common/hs/util/cpp/wrap.h>
+#endif
+
+#include "glean/storage/db.h"
+#include "glean/storage/ffi.h"
+
+using namespace facebook::hs;
+
+namespace facebook {
+namespace glean {
+namespace db {
+namespace c {
+extern "C" {
+
+void glean_rocksdb_container_close(Container* container) {
+  container->close();
+}
+
+const char* glean_rocksdb_container_write_data(
+    Container* container,
+    const void* key,
+    size_t key_size,
+    const void* value,
+    size_t value_size) {
+  return ffi::wrap([=] {
+    container->writeData(
+        {static_cast<const unsigned char*>(key), key_size},
+        {static_cast<const unsigned char*>(value), value_size});
+  });
+}
+
+const char* glean_rocksdb_container_read_data(
+    Container* container,
+    const void* key,
+    size_t key_size,
+    void** value,
+    size_t* value_size,
+    unsigned char* found) {
+  return ffi::wrap([=] {
+    *found = container->readData(
+                 {static_cast<const unsigned char*>(key), key_size},
+                 [=](folly::ByteRange val) {
+                   auto bytes = ffi::clone_bytes(val);
+                   *value_size = bytes.size();
+                   *value = bytes.release();
+                 })
+        ? 1
+        : 0;
+  });
+}
+
+const char* glean_rocksdb_container_optimize(
+    Container* container,
+    bool compact) {
+  return ffi::wrap([=] { container->optimize(compact); });
+}
+
+const char* glean_rocksdb_container_backup(
+    Container* container,
+    const char* path) {
+  return ffi::wrap([=] { container->backup(path); });
+}
+
+void glean_rocksdb_container_free(Container* container) {
+  ffi::free_(container);
+}
+
+void glean_rocksdb_database_free(Database* db) {
+  ffi::free_(db);
+}
+
+Container* glean_rocksdb_database_container(Database* db) {
+  return &(db->container());
+}
+
+Lookup* glean_rocksdb_database_lookup(Database* db) {
+  return db;
+}
+
+const char* glean_rocksdb_commit(Database* db, FactSet* facts) {
+  return ffi::wrap([=] { db->commit(*facts); });
+}
+
+const char* glean_rocksdb_add_ownership(
+    Database* db,
+    size_t count,
+    const void** units,
+    const size_t* unit_sizes,
+    const int64_t** ids,
+    const size_t* id_sizes) {
+  return ffi::wrap([=] {
+    std::vector<Database::OwnershipSet> v;
+    v.reserve(count);
+    for (size_t i = 0; i < count; ++i) {
+      v.push_back(
+          {{static_cast<const unsigned char*>(units[i]), unit_sizes[i]},
+           {ids[i], id_sizes[i]}});
+    }
+    db->addOwnership(v);
+  });
+}
+
+const char* glean_rocksdb_get_ownership_unit_iterator(
+    Database* db,
+    OwnershipUnitIterator** iter) {
+  return ffi::wrap([=] { *iter = db->getOwnershipUnitIterator().release(); });
+}
+
+const char* glean_rocksdb_get_unit_id(
+    Database* db,
+    void* unit,
+    size_t unit_size,
+    uint64_t* unit_id) {
+  return ffi::wrap([=] {
+    auto res = db->getUnitId(
+        folly::ByteRange(
+            reinterpret_cast<const unsigned char*>(unit), unit_size));
+    if (res.hasValue()) {
+      *unit_id = *res;
+    } else {
+      *unit_id = UINT64_MAX;
+    }
+  });
+}
+
+const char* glean_rocksdb_get_unit(
+    Database* db,
+    uint32_t unit_id,
+    void** unit,
+    size_t* unit_size) {
+  return ffi::wrap([=] {
+    auto res = db->getUnit(unit_id);
+    if (res.hasValue()) {
+      ffi::clone_bytes(*res).release_to(unit, unit_size);
+    } else {
+      *unit = nullptr;
+      *unit_size = 0;
+    }
+  });
+}
+
+const char* glean_rocksdb_database_predicateStats(
+    Database* db,
+    size_t* count,
+    int64_t** ids,
+    uint64_t** counts,
+    uint64_t** sizes) {
+  return ffi::wrap(
+      [=] { rts::marshal(db->predicateStats(), count, ids, counts, sizes); });
+}
+
+const char* glean_rocksdb_store_ownership(
+    Database* db,
+    ComputedOwnership* ownership) {
+  return ffi::wrap([=] { db->storeOwnership(*ownership); });
+}
+
+const char* glean_rocksdb_get_ownership(Database* db, Ownership** ownership) {
+  return ffi::wrap([=] { *ownership = db->getOwnership().release(); });
+}
+
+const char* glean_rocksdb_add_define_ownership(
+    Database* db,
+    DefineOwnership* define) {
+  return ffi::wrap([=] { db->addDefineOwnership(*define); });
+}
+
+const char* glean_rocksdb_get_derived_fact_ownership_iterator(
+    Database* db,
+    uint64_t pid,
+    DerivedFactOwnershipIterator** iter) {
+  return ffi::wrap([=] {
+    *iter = db->getDerivedFactOwnershipIterator(Pid::fromWord(pid)).release();
+  });
+}
+
+const char* glean_rocksdb_cache_ownership(Database* db) {
+  return ffi::wrap([=] { db->cacheOwnership(); });
+}
+
+const char* glean_rocksdb_prepare_fact_owner_cache(Database* db) {
+  return ffi::wrap([=] { db->prepareFactOwnerCache(); });
+}
+}
+} // namespace c
+} // namespace db
+} // namespace glean
+} // namespace facebook
diff --git a/glean/storage/ffi.h b/glean/storage/ffi.h
new file mode 100644
--- /dev/null
+++ b/glean/storage/ffi.h
@@ -0,0 +1,126 @@
+/*
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+#pragma once
+
+#include "glean/rts/ffi.h"
+
+#ifdef __cplusplus
+namespace facebook {
+namespace glean {
+namespace db {
+#endif
+
+using Container = struct Container;
+using Database = struct Database;
+
+#ifdef __cplusplus
+}
+}
+}
+#endif
+
+#ifdef __cplusplus
+namespace facebook {
+namespace glean {
+namespace db {
+namespace c {
+using namespace facebook::glean::rts;
+using namespace facebook::glean::rts::c;
+
+extern "C" {
+#endif
+
+void glean_rocksdb_container_close(Container* container);
+
+const char* glean_rocksdb_container_write_data(
+    Container* container,
+    const void* key,
+    size_t key_size,
+    const void* value,
+    size_t value_size);
+
+const char* glean_rocksdb_container_read_data(
+    Container* container,
+    const void* key,
+    size_t key_size,
+    void** value,
+    size_t* value_size,
+    unsigned char* found);
+
+const char* glean_rocksdb_container_optimize(Container* db, bool compact);
+
+const char* glean_rocksdb_container_backup(Container* db, const char* path);
+
+void glean_rocksdb_container_free(Container* container);
+
+void glean_rocksdb_database_free(Database* db);
+
+Container* glean_rocksdb_database_container(Database* db);
+
+Lookup* glean_rocksdb_database_lookup(Database* db);
+
+const char* glean_rocksdb_commit(Database* db, FactSet* facts);
+
+const char* glean_rocksdb_add_ownership(
+    Database* db,
+    size_t count,
+    const void** units,
+    const size_t* unit_sizes,
+    const int64_t** ids,
+    const size_t* id_sizes);
+
+const char* glean_rocksdb_get_ownership_unit_iterator(
+    Database* db,
+    OwnershipUnitIterator** iter);
+
+const char* glean_rocksdb_get_unit_id(
+    Database* db,
+    void* unit,
+    size_t unit_size,
+    uint64_t* unit_id);
+
+const char* glean_rocksdb_get_unit(
+    Database* db,
+    uint32_t unit_id,
+    void** unit,
+    size_t* unit_size);
+
+const char* glean_rocksdb_database_predicateStats(
+    Database* db,
+    size_t* count,
+    int64_t** ids,
+    uint64_t** counts,
+    uint64_t** sizes);
+
+const char* glean_rocksdb_store_ownership(
+    Database* db,
+    ComputedOwnership* ownership);
+
+const char* glean_rocksdb_get_ownership(Database* db, Ownership** ownership);
+
+const char* glean_rocksdb_add_define_ownership(
+    Database* db,
+    DefineOwnership* define);
+
+const char* glean_rocksdb_get_derived_fact_ownership_iterator(
+    Database* db,
+    uint64_t pid,
+    DerivedFactOwnershipIterator** iter);
+
+const char* glean_rocksdb_database_cache_ownership(Database* db);
+
+const char* glean_rocksdb_prepare_fact_owner_cache(Database* db);
+
+#ifdef __cplusplus
+}
+}
+}
+}
+}
+#endif
diff --git a/glean/storage/stats.cpp b/glean/storage/stats.cpp
new file mode 100644
--- /dev/null
+++ b/glean/storage/stats.cpp
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+#include "glean/storage/stats.h"
+
+#include <folly/synchronization/Hazptr.h>
+
+namespace facebook {
+namespace glean {
+namespace db {
+
+struct AtomicPredicateStats::Impl {
+  // This needs to be protected by a hazard poiter for access. We support reads
+  // concurrent to a write but not concurrent writes and a write replaces the
+  // entire object so a hazptr is sufficient.
+  struct Holder : folly::hazptr_obj_base<Holder> {
+    PredicateStats stats;
+
+    explicit Holder(PredicateStats s) : stats(std::move(s)) {}
+  };
+
+  std::atomic<Holder*> holder = new Holder({});
+
+  // We have a separate cohort for each DB - the stats objects we create
+  // are local to the DB so they should be destroyed when the DB object is
+  // destroyed at the latest.
+  folly::hazptr_obj_cohort<> cohort;
+};
+
+AtomicPredicateStats::AtomicPredicateStats() : impl(std::make_unique<Impl>()) {}
+
+AtomicPredicateStats::~AtomicPredicateStats() {
+  delete impl->holder.load();
+}
+
+void AtomicPredicateStats::set(PredicateStats stats) {
+  auto p = new Impl::Holder(std::move(stats));
+  p->set_cohort_tag(&impl->cohort);
+  p = impl->holder.exchange(p);
+  if (p) {
+    p->retire();
+  }
+}
+
+const PredicateStats& AtomicPredicateStats::unprotected() const {
+  return impl->holder.load()->stats;
+}
+
+PredicateStats AtomicPredicateStats::get() const {
+  folly::hazptr_local<1> hptr;
+  return hptr[0].protect(impl->holder)->stats;
+}
+
+size_t AtomicPredicateStats::count(rts::Pid pid) const {
+  folly::hazptr_local<1> hptr;
+  if (auto stat = hptr[0].protect(impl->holder)->stats.get(pid)) {
+    return stat->count;
+  } else {
+    return {};
+  }
+}
+
+} // namespace db
+} // namespace glean
+} // namespace facebook
diff --git a/glean/storage/stats.h b/glean/storage/stats.h
new file mode 100644
--- /dev/null
+++ b/glean/storage/stats.h
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+#pragma once
+
+#include "glean/rts/densemap.h"
+#include "glean/rts/id.h"
+#include "glean/rts/stats.h"
+
+namespace facebook {
+namespace glean {
+namespace db {
+
+using PredicateStats = rts::DenseMap<rts::Pid, rts::MemoryStats>;
+
+/// Atomic access to predicate stats. This is completely encapsulated here
+/// mostly because including Hazptr.h needs RTTI, but we have to compile the
+/// rest of rocksdb.cpp with -fno-rtti because some pre-compiled RocksDB
+/// packages are compiled with -fno-rtti and otherwise we get linker errors.
+class AtomicPredicateStats {
+ public:
+  AtomicPredicateStats();
+  ~AtomicPredicateStats();
+  AtomicPredicateStats(const AtomicPredicateStats&) = delete;
+  AtomicPredicateStats& operator=(const AtomicPredicateStats&) = delete;
+  AtomicPredicateStats(AtomicPredicateStats&&) = delete;
+  AtomicPredicateStats& operator=(AtomicPredicateStats&&) = delete;
+
+  void set(PredicateStats stats);
+  PredicateStats get() const;
+  size_t count(rts::Pid pid) const;
+
+  const PredicateStats& unprotected() const;
+
+ private:
+  struct Impl;
+  std::unique_ptr<Impl> impl;
+};
+
+} // namespace db
+} // namespace glean
+} // namespace facebook
diff --git a/glean/test/lib/Glean/Database/Test.hs b/glean/test/lib/Glean/Database/Test.hs
--- a/glean/test/lib/Glean/Database/Test.hs
+++ b/glean/test/lib/Glean/Database/Test.hs
@@ -15,11 +15,15 @@
   , setSchemaId
   , disableStrictSchemaId
   , setMemoryStorage
+  , setLMDBStorage
+  , allStorage
   , setDBVersion
   , setCompactOnCompletion
   , setMaxSetSize
+  , setLMDBNoUnpack
   , enableTcDebug
   , enableQueryDebug
+  , enableRocksDBCache
   , withTestEnv
   , kickOffTestDB
   , waitUntilComplete
@@ -43,6 +47,8 @@
 import Glean.Database.Config
 import Glean.Database.Env
 import Glean.Database.Write.Batch
+import Glean.Database.Storage (DBVersion(..), currentVersion, writableVersions)
+import Glean.Database.Storage.RocksDB
 import Glean.Database.Types
 import qualified Glean.Internal.Types as Thrift
 import qualified Glean.ServerConfig.Types as ServerConfig
@@ -79,6 +85,22 @@
 setMemoryStorage :: Setting
 setMemoryStorage cfg = cfg{ cfgDataStore = memoryDataStore }
 
+setLMDBStorage :: Setting
+setLMDBStorage cfg =
+  cfg{ cfgDataStore = tmpDataStore { defaultStorage = (lmdbName, True) }}
+
+allStorage :: [(String, [Setting])]
+allStorage =
+  [
+    ("rocksdb", []),
+    ("lmdb", [setLMDBStorage]),
+    ("memory", [setMemoryStorage])
+  ]
+  ++
+  [ ("rocksdb-" ++ show (unDBVersion v), [setDBVersion v])
+    | v <- writableVersions (undefined :: RocksDB)
+    , v /= currentVersion (undefined :: RocksDB) ]
+
 setDBVersion :: ServerConfig.DBVersion -> Setting
 setDBVersion ver cfg = cfg
   { cfgServerConfig = cfgServerConfig cfg <&> \scfg -> scfg
@@ -94,6 +116,11 @@
   { cfgServerConfig = cfgServerConfig cfg <&> \scfg -> scfg
       { ServerConfig.config_max_set_size_bytes = Just i } }
 
+setLMDBNoUnpack :: Setting
+setLMDBNoUnpack cfg = cfg
+  { cfgServerConfig = cfgServerConfig cfg <&> \scfg -> scfg
+      { ServerConfig.config_db_lmdb_restore_unpack = False } }
+
 enableTcDebug :: Setting
 enableTcDebug cfg = cfg
   { cfgDebug = (cfgDebug cfg) { tcDebug = True } }
@@ -101,6 +128,13 @@
 enableQueryDebug :: Setting
 enableQueryDebug cfg = cfg
   { cfgDebug = (cfgDebug cfg) { queryDebug = True } }
+
+enableRocksDBCache :: Setting
+enableRocksDBCache cfg = cfg
+  { cfgServerConfig = (cfgServerConfig cfg) <&> \scfg -> scfg
+      { ServerConfig.config_db_rocksdb_cache_mb =
+        ServerConfig.config_db_rocksdb_cache_mb def }
+  }
 
 withTestEnv
   :: [Setting]
diff --git a/glean/test/lib/TestDB.hs b/glean/test/lib/TestDB.hs
--- a/glean/test/lib/TestDB.hs
+++ b/glean/test/lib/TestDB.hs
@@ -20,7 +20,6 @@
 
 import Util.IO
 
-import Glean.Database.Storage (DBVersion(..), currentVersion, writableVersions)
 import Glean.Database.Test
 import Glean.Database.Types
 import Glean.Backend.Types as Backend
@@ -81,13 +80,7 @@
 dbFlavours :: [Setting] -> [(String, RunTest)]
 dbFlavours testCaseSettings =
   [ (label1 ++ label2, run)
-    | (label2, settings) <-
-        [ ("memory", [setMemoryStorage])
-        , ("rocksdb", [])
-        ]
-        ++
-        [ ("rocksdb-" ++ show (unDBVersion v), [setDBVersion v])
-          | v <- writableVersions, v /= currentVersion ]
+    | (label2, settings) <- allStorage
     , let allSettings = settings <> testCaseSettings
     , (label1, run) <-
         [ ("", RunTest (withWritableTestDB allSettings))
diff --git a/glean/test/lib/TestData.hs b/glean/test/lib/TestData.hs
--- a/glean/test/lib/TestData.hs
+++ b/glean/test/lib/TestData.hs
@@ -15,6 +15,7 @@
   ) where
 
 import Data.Default
+import qualified Data.Text as Text
 
 import Glean.Typed
 import Glean.Types
@@ -188,6 +189,10 @@
   bar2 <- makeFactV @Glean.Test.Bar "bar2" qux2
   foo2 <- makeFactV @Glean.Test.Foo "foo2" bar2
   first $ makeFactV_ @Glean.Test.FooToFoo foo1 foo2
+
+  -- Testing large keys. LMDB indexes the first ~2kB of the key
+  let strings = [ Text.replicate n "x" | n <- [1000..2500] ]
+  mapM_ (makeFact @Glean.Test.LargeKey) strings
 
 testFacts :: NewFact m => m ()
 testFacts = mkTestFacts id id
diff --git a/glean/test/regression/Glean/Regression/Test.hs b/glean/test/regression/Glean/Regression/Test.hs
--- a/glean/test/regression/Glean/Regression/Test.hs
+++ b/glean/test/regression/Glean/Regression/Test.hs
@@ -126,15 +126,19 @@
   :: (Driver driverOpts, Text.Text) -- ^ Driver and name of db to be created
   -> (Indexer opts, Text.Text) -- ^ Indexer and name of db to be created
   -> String -- ^ just a string to identify this test
-  -> TestIndex
+  -> Parser extraOpts -- ^ parser for extra options to recognise
+  -> (extraOpts -> Config -> TestIndex)
   -> IO ()
 mainTestIndexXlang
-  (driver, repoName) (indexer', repoName') dir testIndex = do
+  (driver, repoName) (indexer', repoName') dir extraOptParser testIndex = do
   let
     indexer = driverIndexer driver
-    parse = (,) <$> indexerOptParser indexer <*> indexerOptParser indexer'
+    parse = (,,)
+      <$> indexerOptParser indexer
+      <*> indexerOptParser indexer'
+      <*> extraOptParser
   withUnitTestOptions (optionsWith parse) $
-          \ action (mkcfg, (driverOpts, driverOpts')) -> do
+          \ action (mkcfg, (driverOpts, driverOpts', extraOpts)) -> do
     -- TODO: we're using the options for snapshot tests which have a
     -- couple of flags that don't make sense here: --replace for
     -- example.
@@ -163,7 +167,7 @@
                   f (backend, testRepo testConfig')
 
           withLazy withSetup $ \get ->
-            fn $ TestLabel (mkLabel platform) $ testIndex get
+            fn $ TestLabel (mkLabel platform) $ testIndex extraOpts cfg get
 
       withMany withPlatformTest platforms $ \tests ->
         testRunnerAction action (TestList tests)
diff --git a/glean/test/tests/Angle/MiscTest.hs b/glean/test/tests/Angle/MiscTest.hs
--- a/glean/test/tests/Angle/MiscTest.hs
+++ b/glean/test/tests/Angle/MiscTest.hs
@@ -52,13 +52,13 @@
 
 newOldTest :: (forall a . Query a -> Query a) -> Test
 newOldTest modify = TestCase $ withStackedTestDB [] $ \env repo -> do
-  results <- runQuery_ env repo $ modify $ keys $ Angle.query $
+  results <- runQuery_ env repo $ modify $ keys $ query $
     new $ predicate @Cxx.Name wild
   assertEqual "angle - new facts"
     [ "abcd", "allin", "anywhere", "barbie", "blob" ]
     results
 
-  results <- runQuery_ env repo $ modify $ keys $ Angle.query $
+  results <- runQuery_ env repo $ modify $ keys $ query $
     old $ predicate @Cxx.Name wild
   assertEqual "angle - old facts"
     [ "abba", "anonymous", "azimuth", "blubber", "book", "foo" ]
@@ -66,9 +66,9 @@
 
 warnDiagTest :: (WithDB () -> Test) -> Test
 warnDiagTest dbTestCase = dbTestCase $ \env repo -> do
-  let (Query q1) = dbgPredHasFacts $ Angle.query $
+  let (Query q1) = dbgPredHasFacts $ query $
         predicate @Glean.Test.EmptyPred wild
-      (Query q2) = Angle.query $ predicate @Cxx.Name wild
+      (Query q2) = query $ predicate @Cxx.Name wild
 
   r <- userQuery env repo q1
   assertEqual "predicate has no facts" 1 $ length $ getWarns r
@@ -137,7 +137,7 @@
     Left e@BadQuery{} -> "type error" `isInfixOf` show e
     _ -> False
 
-  r <- runQuery_ env repo $ Angle.query $
+  r <- runQuery_ env repo $ query $
       predicate @Glean.Test.NothingTest wild
   print (r :: [Glean.Test.NothingTest])
   assertEqual "angle - nothingTest" 1 (length r)
@@ -424,7 +424,7 @@
 limitTest :: (WithDB () -> Test) -> Test
 limitTest dbTestCase = dbTestCase $ \env repo -> do
   (results, truncated) <- runQuery env repo $ limitBytes 30 $ recursive $
-    Angle.query $ predicate @Glean.Test.Edge wild
+    query $ predicate @Glean.Test.Edge wild
   -- each Edge will be
   --   about 12 bytes for the Edge (8 byte Id + 2 refs @ 2 bytes each)
   --   about 11 bytes for each Node (8 byte Id + 3 byte string)
@@ -434,12 +434,12 @@
   assertBool "limitBytes" (length results == 1 && truncated)
 
   (results, truncated) <- runQuery env repo $ limitBytes 40 $ recursive $
-    Angle.query $ predicate @Glean.Test.Edge wild
+    query $ predicate @Glean.Test.Edge wild
   assertBool "limitBytes" (length results == 2 && truncated)
 
 justCheckTest :: (WithDB () -> Test) -> Test
 justCheckTest dbTestCase = dbTestCase $ \env repo -> do
-  results <- runQuery_ env repo $ justCheck $ Angle.query $
+  results <- runQuery_ env repo $ justCheck $ query $
     predicate @Cxx.Name wild
   assertEqual "just check" 0 (length results)
 
diff --git a/glean/test/tests/Angle/OptTest.hs b/glean/test/tests/Angle/OptTest.hs
--- a/glean/test/tests/Angle/OptTest.hs
+++ b/glean/test/tests/Angle/OptTest.hs
@@ -145,7 +145,7 @@
   -- Test that unification works properly with literal fact IDs
   result : _ <- runQuery_ env repo (allFacts :: Query Glean.Test.StringPair)
   let fid = factId (getId result)
-  results <- runQuery_ env repo $ Angle.query $ fid `where_` [ fid .= fid ]
+  results <- runQuery_ env repo $ query $ fid `where_` [ fid .= fid ]
   assertEqual "unify fact Id" 1 (length results)
 
   -- Test that trivially false negations fail the entire query
diff --git a/glean/test/tests/BackupTest.hs b/glean/test/tests/BackupTest.hs
--- a/glean/test/tests/BackupTest.hs
+++ b/glean/test/tests/BackupTest.hs
@@ -34,6 +34,7 @@
 import Glean.Database.Env
 import Glean.Database.Janitor
 import Glean.Database.Meta
+import Glean.Database.Test hiding (withTestEnv)
 import Glean.Database.Types
 import Glean.Database.Finish (finalizeWait)
 import Glean.Init
@@ -86,14 +87,15 @@
   TestDbSpec (Repo name hash) age (Just deps)
 
 withTestEnv
-  :: [TestDbSpec]
+  :: [Setting]
+  -> [TestDbSpec]
   -> (ServerTypes.Config -> ServerTypes.Config)
   -> (TestEnv -> IO ())
   -> EventBaseDataplane
   -> NullConfigProvider
   -> FilePath
   -> IO ()
-withTestEnv dbs init_server_cfg action evb cfgAPI backupdir = do
+withTestEnv settings dbs init_server_cfg action evb cfgAPI backupdir = do
   (server_cfg, update_server_cfg) <- ThriftSource.mutable $ init_server_cfg def
     { config_backup = def
       { databaseBackupPolicy_allowed = mempty
@@ -106,7 +108,7 @@
     , config_db_rocksdb_cache_mb = 0
     }
   (l, events) <- recorder
-  let config = def
+  let config = foldl' (\acc f -> f acc) def
         { cfgDataStore = tmpDataStore
         , cfgSchemaLocation = Just schemaLocationFiles
         , cfgServerConfig = server_cfg
@@ -114,6 +116,7 @@
         , cfgMockWrites = False
         , cfgListener = l
         }
+        settings
 
   withDatabases evb config cfgAPI $ \env -> do
     now <- getCurrentTime
@@ -155,13 +158,13 @@
   void $ finishDatabase env repo
   finalizeWait env repo
 
-makeDB TestEnv{testBackup} now CloudTestDbSpec{..} =
+makeDB TestEnv{testBackup,testEnv} now CloudTestDbSpec{..} =
   withTempFileContents ("" :: String) $ \path ->
-  void $ Backup.backup testBackup testDbRepo props Nothing path
-  where
-    dbtime = utcTimeToPosixEpochTime (created testDbAge now)
-    props = Meta
-        { metaVersion = Storage.currentVersion
+  withDefaultStorage testEnv $ \storageName storage -> do
+    let
+      dbtime = utcTimeToPosixEpochTime (created testDbAge now)
+      props = Meta
+        { metaVersion = Storage.currentVersion storage
         , metaCreated = dbtime
         , metaRepoHashTime = Nothing
         , metaCompleteness =
@@ -171,10 +174,12 @@
         , metaDependencies = testDbDeps
         , metaCompletePredicates = mempty
         , metaAxiomComplete = False
+        , metaStorage = storageName
         }
+    void $ Backup.backup testBackup testDbRepo props Nothing path
 
-basicBackupTest :: Test
-basicBackupTest = TestCase $ withTest $ withTestEnv
+basicBackupTest :: [Setting] -> Test
+basicBackupTest settings = TestCase $ withTest $ withTestEnv settings
   repos
   id
   $ \TestEnv{..} -> do
@@ -198,8 +203,8 @@
       , goodDb "test" "2"
       , goodDb "test" "3" ]
 
-allowedTest :: Test
-allowedTest = TestCase $ withTest $ withTestEnv
+allowedTest :: [Setting] -> Test
+allowedTest settings = TestCase $ withTest $ withTestEnv settings
   repos
   id
   $ \TestEnv{..} -> do
@@ -221,8 +226,8 @@
       , goodDb "baz" "4"
       , goodDb "bar" "5" ]
 
-restoreOrderTest :: Test
-restoreOrderTest = TestCase $ withTest $ withTestEnv
+restoreOrderTest :: [Setting] -> Test
+restoreOrderTest settings = TestCase $ withTest $ withTestEnv settings
   repos
   id
   $ \TestEnv{..} -> do
@@ -288,9 +293,9 @@
       , goodDbAge "baz" "4" 3
       ]
 
-restoreNoDiskSpaceTest :: Test
-restoreNoDiskSpaceTest =
-  TestCase $ withTest $ withTestEnv repos id $ \TestEnv{..} -> do
+restoreNoDiskSpaceTest :: [Setting] -> Test
+restoreNoDiskSpaceTest settings =
+  TestCase $ withTest $ withTestEnv settings repos id $ \TestEnv{..} -> do
     testUpdConfig $ \scfg -> scfg
       { config_restore = def { databaseRestorePolicy_enabled = True }
       }
@@ -304,10 +309,19 @@
     tb :: Int64
     tb = 1000000000000
 
+backends :: ([Setting] -> Test) -> Test
+backends fn =
+  TestList [
+    TestLabel lbl (fn settings)
+    | (lbl, settings) <- allStorage <>
+        [("lmdb.squashfs", [setLMDBStorage, setLMDBNoUnpack])]
+    , lbl /= "memory" -- doesn't support ownership yet
+  ]
+
 main :: IO ()
 main = withUnitTest $ testRunner $ TestList
-  [ TestLabel "basicBackup" basicBackupTest
-  , TestLabel "allowedTest" allowedTest
-  , TestLabel "restoreOrderTest" restoreOrderTest
-  , TestLabel "restoreNoDiskSpace" restoreNoDiskSpaceTest
+  [ TestLabel "basicBackup" $ backends basicBackupTest
+  , TestLabel "allowedTest" $ backends allowedTest
+  , TestLabel "restoreOrderTest" $ backends restoreOrderTest
+  , TestLabel "restoreNoDiskSpace" $ backends restoreNoDiskSpaceTest
   ]
diff --git a/glean/test/tests/DatabaseJanitorTest.hs b/glean/test/tests/DatabaseJanitorTest.hs
--- a/glean/test/tests/DatabaseJanitorTest.hs
+++ b/glean/test/tests/DatabaseJanitorTest.hs
@@ -180,9 +180,10 @@
   -> (Meta -> Meta)
   -> IO ()
 makeFakeDB schema root repo dbtime completeness opts = do
+  storage <- RocksDB.newStorage root def
   let
     meta = opts $ Meta
-      { metaVersion = Storage.currentVersion
+      { metaVersion = Storage.currentVersion storage
       , metaCreated = utcTimeToPosixEpochTime dbtime
       , metaRepoHashTime = Nothing
       , metaCompleteness = completeness dbtime
@@ -191,16 +192,16 @@
       , metaDependencies = Nothing
       , metaCompletePredicates = mempty
       , metaAxiomComplete = False
+      , metaStorage = rocksdbName
       }
   let repoPath = databasePath root repo
   createDirectoryIfMissing True repoPath
-  storage <- RocksDB.newStorage root def
   bracket
     (Storage.open
       storage
       repo
       (Storage.Create lowestFid Nothing Storage.UseDefaultSchema)
-      Storage.currentVersion)
+      (Storage.currentVersion storage))
     Storage.close
     (\hdl -> storeSchema hdl $ toStoredSchema schema)
   LB.writeFile (repoPath </> "meta") (encode meta)
@@ -222,18 +223,18 @@
       storage
       repo
       (Storage.Create lowestFid Nothing Storage.UseDefaultSchema)
-      Storage.currentVersion)
+      (Storage.currentVersion storage))
     Storage.close
     (\hdl -> do
       storeSchema hdl $ toStoredSchema schema
       tmpDir <- getCanonicalTemporaryDirectory
       withTempDirectory tmpDir "scratch" $ \scratch ->
-        Storage.backup hdl scratch $ \file _data ->
-          void $ backup (mockSite backupDir) repo props Nothing file
+        Storage.backup hdl def scratch $ \file _data ->
+          void $ backup (mockSite backupDir) repo (props storage) Nothing file
     )
   where
-    props = opts $ Meta
-        { metaVersion = Storage.currentVersion
+    props storage = opts $ Meta
+        { metaVersion = Storage.currentVersion storage
         , metaCreated = utcTimeToPosixEpochTime dbtime
         , metaRepoHashTime = Nothing
         , metaCompleteness = completeness dbtime
@@ -242,6 +243,7 @@
         , metaDependencies = Nothing
         , metaCompletePredicates = mempty
         , metaAxiomComplete = False
+        , metaStorage = rocksdbName
         }
 
 dbConfig :: FilePath -> ServerTypes.Config -> Glean.Database.Config.Config
@@ -317,7 +319,7 @@
   dbdirs2 <- listDirectory (dbdir </> "test2")
   assertEqual "directories deleted"
     [ "0001", "0004", "0005", "0006" ]
-    (dbdirs1 ++ dbdirs2)
+    (sort (dbdirs1 ++ dbdirs2))
 
   runDatabaseJanitor env
   waitDel env
@@ -944,7 +946,7 @@
       --- 0014 is the newest test2 db
       --- 0016 is the newest test db, but it's missing dependency
       --- so restoring next available test db 0015 and it's dependency 0013
-      assertEqual "after" [ "0013", "0014","0015"] (map repo_hash repos)
+      assertEqual "after" [ "0013", "0014","0015"] (sort (map repo_hash repos))
 
 main :: IO ()
 main = withUnitTest $ testRunner $ TestList
diff --git a/glean/test/tests/IncrementalTest.hs b/glean/test/tests/IncrementalTest.hs
--- a/glean/test/tests/IncrementalTest.hs
+++ b/glean/test/tests/IncrementalTest.hs
@@ -82,11 +82,11 @@
       } }
   return inc
 
-incrementalTest :: Test
-incrementalTest = TestCase $
+incrementalTest :: [Setting] -> Test
+incrementalTest settings = TestCase $
 
   -- build a DB with some units and a non-trivial fact graph
-  withTestEnv [] $ \env -> do
+  withTestEnv settings $ \env -> do
     let base = Repo "base" "0"
     kickOffTestDB env base id
     mkGraph env base
@@ -192,9 +192,9 @@
     r <- edgesFrom "b"
     assertEqual "inc 6" ["a"] r
 
-stackedIncrementalTest :: Test
-stackedIncrementalTest = TestCase $
-  withTestEnv [] $ \env -> do
+stackedIncrementalTest :: [Setting] -> Test
+stackedIncrementalTest settings = TestCase $
+  withTestEnv settings $ \env -> do
     let
       deriveAndFinish :: Env -> Repo -> IO ()
       deriveAndFinish env repo = do
@@ -425,9 +425,9 @@
       _ -> assertFailure "query failed"
 
 
-stackedIncrementalTest2 :: Test
-stackedIncrementalTest2 = TestCase $
-  withTestEnv [] $ \env -> do
+stackedIncrementalTest2 :: [Setting] -> Test
+stackedIncrementalTest2 settings = TestCase $
+  withTestEnv settings $ \env -> do
     let
       deriveAndFinish :: Env -> Repo -> IO ()
       deriveAndFinish env repo = do
@@ -534,9 +534,9 @@
     pairsAre "1p" inc3 [("c","d"),("d","c")]
 
 -- tickled a bug in the storage of ownership information
-dupSetTest :: Test
-dupSetTest = TestCase $
-  withTestEnv [] $ \env -> do
+dupSetTest :: [Setting] -> Test
+dupSetTest settings = TestCase $
+  withTestEnv settings $ \env -> do
     let base = Repo "base" "0"
     kickOffTestDB env base id
     writeFactsIntoDB env base [ Glean.Test.allPredicates ] $ do
@@ -557,9 +557,9 @@
       predicate @Glean.Test.Node wild
     assertEqual "dupSetTest" 2 (length results)
 
-orphanTest :: Test
-orphanTest = TestCase $
-  withTestEnv [] $ \env -> do
+orphanTest :: [Setting] -> Test
+orphanTest settings = TestCase $
+  withTestEnv settings $ \env -> do
     let base = Repo "base" "0"
     kickOffTestDB env base id
     writeFactsIntoDB env base [ Glean.Test.allPredicates ] $ do
@@ -607,8 +607,8 @@
         (rec $ field @"child" (rec $ field @"label" (string "d") end) end)
     assertEqual "orphan 3" 1 (length results)
 
-externalDerivationTest :: Test
-externalDerivationTest = TestList
+externalDerivationTest :: [Setting] -> Test
+externalDerivationTest settings = TestList
   [ TestLabel "add fact with dependencies" $ TestCase $
     withDB $ \env repo -> do
       writeFactsIntoDB env repo [ Glean.Test.allPredicates ] $ do
@@ -669,7 +669,7 @@
     traverse (factOwnership env repo) fids
 
   withDB act =
-    withTestEnv [setCompactOnCompletion] $ \env -> do
+    withTestEnv (settings <> [setCompactOnCompletion]) $ \env -> do
       let repo = Repo "base" "0"
       kickOffTestDB env repo id
       writeFactsIntoDB env repo [ Glean.Test.allPredicates ] $ do
@@ -680,9 +680,9 @@
       void $ completePredicates env repo $ CompletePredicates_axiom def
       act env repo
 
-deriveTest :: Test
-deriveTest = TestCase $
-  withTestEnv [setCompactOnCompletion] $ \env -> do
+deriveTest :: [Setting] -> Test
+deriveTest settings = TestCase $
+  withTestEnv (settings <> [setCompactOnCompletion]) $ \env -> do
     let base = Repo "base" "0"
     kickOffTestDB env base id
     mkGraph env base
@@ -756,9 +756,9 @@
       predicate @Glean.Test.SkipRevEdge wild
     assertEqual "derived 6" 1 (length results)
 
-restartIndexing :: Test
-restartIndexing = TestCase $
-  withTestEnv [] $ \env -> do
+restartIndexing :: [Setting] -> Test
+restartIndexing settings = TestCase $
+  withTestEnv settings $ \env -> do
     let repo = Repo "base" "0"
     kickOffTestDB env repo id
     writeFactsIntoDB env repo [ Glean.Test.allPredicates ] $ do
@@ -790,14 +790,22 @@
       putStrLn "Incremental Glean not supported on non-x86_64 (see ownership.{h/cpp})"
       exitWith (ExitFailure 1)
 
+backends :: ([Setting] -> Test) -> Test
+backends fn =
+  TestList [
+    TestLabel lbl (fn settings)
+    | (lbl, settings) <- allStorage
+    , lbl /= "memory" -- doesn't support ownership yet
+  ]
+
 main_ :: IO ()
 main_ = withUnitTest $ testRunner $ TestList
-  [ TestLabel "incrementalTest" incrementalTest
-  , TestLabel "dupSetTest" dupSetTest
-  , TestLabel "orphanTest" orphanTest
-  , TestLabel "deriveTest" deriveTest
-  , TestLabel "externalDerivationTest" externalDerivationTest
-  , TestLabel "stackedIncrementalTest" stackedIncrementalTest
-  , TestLabel "stackedIncrementalTest2" stackedIncrementalTest2
-  , TestLabel "restartIndexing" restartIndexing
+  [ TestLabel "incrementalTest" $ backends incrementalTest
+  , TestLabel "dupSetTest" $ backends dupSetTest
+  , TestLabel "orphanTest" $ backends orphanTest
+  , TestLabel "deriveTest" $ backends deriveTest
+  , TestLabel "externalDerivationTest" $ backends externalDerivationTest
+  , TestLabel "stackedIncrementalTest" $ backends stackedIncrementalTest
+  , TestLabel "stackedIncrementalTest2" $ backends stackedIncrementalTest2
+  , TestLabel "restartIndexing" $ backends restartIndexing
   ]
diff --git a/glean/test/tests/LifecycleTest.hs b/glean/test/tests/LifecycleTest.hs
--- a/glean/test/tests/LifecycleTest.hs
+++ b/glean/test/tests/LifecycleTest.hs
@@ -41,6 +41,7 @@
 import Glean.Test.HUnit
 import Glean.Test.Mock
 import Glean.Types hiding (Exception)
+import Glean.Util.Some
 
 data TEnv = TEnv
   { tEnv :: Env
@@ -51,10 +52,13 @@
 withTEnv f = do
   catalog <- memStore
   storage <- newStorage
+  let name = StorageName "memory"
   withTestEnv
     [\cfg -> cfg
         { cfgDataStore = DataStore
-            { withDataStore = \_ f -> f catalog storage
+            { withStorage = \_ f ->
+                f (HashMap.fromList [(name, Some storage)], Some catalog)
+            , defaultStorage = (StorageName "memory", True)
             , dataStoreTag = "test"
             }
         }]
@@ -80,7 +84,9 @@
 
 checkActive :: HasCallStack => Env -> Bool -> IO ()
 checkActive Env{..} allow_deleting = do
-  checkConsistency envCatalog
+  when (not allow_deleting) $ checkConsistency envCatalog
+    -- checkConsistency modifies the Meta which confuses a
+    -- concurrent deletion operation
   atomically $ do
     active <- readTVar envActive
     forM_ (HashMap.toList active) $ \(repo, DB{..}) -> do
diff --git a/glean/test/tests/Schema/Multi.hs b/glean/test/tests/Schema/Multi.hs
--- a/glean/test/tests/Schema/Multi.hs
+++ b/glean/test/tests/Schema/Multi.hs
@@ -620,7 +620,7 @@
                 [ [s| { "key" : { "a" : "abc" }} |] ]
             ]
         -- don't use syncWriteJsonBatch, it doesn't check the schema ID
-        r <- try $ sendJsonBatch env repo facts (Just def {
+        r <- try $ sendJsonBatchAndWait env repo facts (Just def {
           sendJsonBatchOptions_schema_id = Just (SchemaId "v0") })
         assertBool "schema mismatch" $ case r of
           Left (e :: SomeException) ->
diff --git a/glean/test/tests/StorageRocksDBTest.hs b/glean/test/tests/StorageRocksDBTest.hs
new file mode 100644
--- /dev/null
+++ b/glean/test/tests/StorageRocksDBTest.hs
@@ -0,0 +1,140 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module StorageRocksDBTest where
+
+import Data.Default
+import Data.Maybe (isJust, isNothing)
+import System.IO.Temp (withSystemTempDirectory)
+import Test.HUnit
+
+import Glean.Database.Storage (Storage(..))
+import qualified Glean.Database.Storage.RocksDB as RocksDB
+import qualified Glean.ServerConfig.Types as ServerConfig
+import TestRunner
+import Glean.Impl.MemoryReader
+import Glean.Init
+import Glean.Util.Disk (getDiskSize)
+
+--------------------- Disk Capacity tests ------------------------------
+
+testNoDiskLimit :: Test
+testNoDiskLimit =
+  TestCase $ withSystemTempDirectory "rocksdb-test" $ \tmpDir -> do
+    storage <- RocksDB.newStorage tmpDir def
+    assertEqual "No disk limit is set" Nothing
+      (RocksDB.rocksMaxDiskSize storage)
+
+    fullDiskCapacity <- getDiskSize tmpDir
+    Just rocksTotalCapacity <- getTotalCapacity storage
+    assertEqual "rocks has full disk capacity" fullDiskCapacity
+      rocksTotalCapacity
+
+testDiskLimitWithRatio :: Test
+testDiskLimitWithRatio =
+  TestCase $ withSystemTempDirectory "rocksdb-test" $ \tmpDir -> do
+    let config = def
+          { ServerConfig.config_db_rocksdb_disk_mem_capacity_ratio_limit =
+              Just 20
+          }
+    storage <- RocksDB.newStorage tmpDir config
+    mem <- totalMemCapacityKB -- Nothing if unsupported
+    assertBool "Disk limit exist" $
+      isNothing mem || isJust (RocksDB.rocksMaxDiskSize storage)
+
+testGetTotalCapacity :: Test
+testGetTotalCapacity =
+  TestCase $ withSystemTempDirectory "rocksdb-test" $ \tmpDir -> do
+    storage <- RocksDB.newStorage tmpDir def
+
+    -- limit is definitely smaller than the actual disk size
+    -- limit will be applied
+    let maxDiskSmall = 2 * 1024 * 1024 * 1024 -- 2 GB
+        storageMocked = storage
+          { RocksDB.rocksMaxDiskSize = Just maxDiskSmall }
+    totalCapacity <- getTotalCapacity storageMocked
+    assertEqual
+      "RocksDB disk is limited"
+      (Just maxDiskSmall)
+      totalCapacity
+
+    -- limit is definitely bigger than actual disk size
+    -- actual disk capacity should be used
+    let maxDiskBig = maxBound :: Int -- ~8000 Petabytes
+        storageMocked = storage
+          { RocksDB.rocksMaxDiskSize = Just maxDiskBig }
+    fullDiskCapacity <- getDiskSize tmpDir
+    totalCapacity <- getTotalCapacity storageMocked
+    assertEqual
+      "RocksDB ignores too big disk limit"
+      (Just fullDiskCapacity)
+      totalCapacity
+
+    -- If totalCapacity is Nothing, Meta's internal load balacing will be
+    -- at risk since it depends on this value
+    assertBool "totalCapacity is not empty" (isJust totalCapacity)
+
+--------------------- Cache tests ------------------------------
+
+testCacheWithRatioAndCacheMb :: Test
+testCacheWithRatioAndCacheMb =
+  TestCase $ withSystemTempDirectory "rocksdb-test" $ \tmpDir -> do
+    -- When both cache_to_mem_ratio and cache_mb are provided,
+    -- cache should be created using memCapacity * ratio
+    let config = def
+          { ServerConfig.config_db_rocksdb_cache_to_mem_ratio = Just 0.1
+          , ServerConfig.config_db_rocksdb_cache_mb = 100
+          }
+    storage <- RocksDB.newStorage tmpDir config
+    capacity <- RocksDB.getCacheCapacity storage
+    mem <- totalMemCapacityKB -- Nothing if unsupported
+    assertBool
+      "Cache capacity should be greater than 100MB (cache_mb is ignored)" $
+        case mem of
+          Nothing -> capacity == 100 * 1024 * 1024
+          Just{} -> capacity > 100 * 1024 * 1024
+
+testCacheWithOnlyCacheMb :: Test
+testCacheWithOnlyCacheMb =
+  TestCase $ withSystemTempDirectory "rocksdb-test" $ \tmpDir -> do
+    -- When cache_to_mem_ratio is Nothing, should use cache_mb
+    let config = def
+          { ServerConfig.config_db_rocksdb_cache_to_mem_ratio = Nothing
+          , ServerConfig.config_db_rocksdb_cache_mb = 100
+          }
+    storage <- RocksDB.newStorage tmpDir config
+    let cache = RocksDB.rocksCache storage
+    assertBool "has cache" $ isJust cache
+    cache_capacity <- RocksDB.getCacheCapacity storage
+    assertEqual "Cache size equals config_db_rocksdb_cache_mb"
+      cache_capacity (100 * 1024 * 1024)
+
+testCacheIsNothingWhenCacheMbIsZero :: Test
+testCacheIsNothingWhenCacheMbIsZero =
+  TestCase $ withSystemTempDirectory "rocksdb-test" $ \tmpDir -> do
+    -- When cache_mb is 0 and no ratio, cache should be Nothing
+    let config = def
+          { ServerConfig.config_db_rocksdb_cache_to_mem_ratio = Nothing
+          , ServerConfig.config_db_rocksdb_cache_mb = 0
+          }
+    storage <- RocksDB.newStorage tmpDir config
+    assertBool "Cache should be Nothing when cache_mb is 0" $
+      isNothing (RocksDB.rocksCache storage)
+
+
+-- TODO: implment last 3 tests, devmate drafted them, might be incorrect
+main :: IO ()
+main = withUnitTest $ testRunner $ TestList
+  [ TestLabel "Test no disk limit" testNoDiskLimit
+  , TestLabel "Test disk limit with ratio" testDiskLimitWithRatio
+  , TestLabel "Test getTotalCapacity" testGetTotalCapacity
+  , TestLabel "Test cache with ratio and cache_mb" testCacheWithRatioAndCacheMb
+  , TestLabel "Test cache with only cache_mb" testCacheWithOnlyCacheMb
+  , TestLabel "Test cache is Nothing when cache_mb is 0 and no ratio"
+      testCacheIsNothingWhenCacheMbIsZero
+  ]
diff --git a/glean/test/tests/TimeoutTest.hs b/glean/test/tests/TimeoutTest.hs
--- a/glean/test/tests/TimeoutTest.hs
+++ b/glean/test/tests/TimeoutTest.hs
@@ -9,6 +9,7 @@
 {-# LANGUAGE QuasiQuotes #-}
 module TimeoutTest (main) where
 
+import Data.Default
 import Test.HUnit
 
 import TestRunner
@@ -21,7 +22,7 @@
 import BenchDB
 
 timeoutTest :: Test
-timeoutTest = TestCase $ withBenchDB 10000 $ \env repo -> do
+timeoutTest = TestCase $ withBenchDB def 10000 $ \env repo -> do
   -- The test spends most of its time building the DB (withBenchDB above),
   -- so to keep things reasonable in debug mode we limit the number of
   -- facts to 10K and set the time limit to 1ms which is as low as we
diff --git a/glean/tools/gleancli/GleanCLI/Create.hs b/glean/tools/gleancli/GleanCLI/Create.hs
new file mode 100644
--- /dev/null
+++ b/glean/tools/gleancli/GleanCLI/Create.hs
@@ -0,0 +1,191 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+{-# LANGUAGE ApplicativeDo, OverloadedRecordDot #-}
+module GleanCLI.Create (
+  CreateOpts(..),
+  parseCreateOpts,
+  createDb,
+) where
+
+import Data.ByteString (ByteString)
+import Data.Default
+import qualified Data.HashMap.Strict as HashMap
+import Data.Text (Text)
+import qualified Data.Text as Text
+import qualified Data.Text.IO as Text
+import qualified Data.Text.Encoding as Encode
+import Data.Time.Clock (UTCTime)
+import Options.Applicative
+
+import Glean
+import Glean.Database.Meta (utcTimeToPosixEpochTime)
+import Glean.Types as Thrift
+import Util.Time
+
+
+data CreateOpts = CreateOpts
+  { dependencies :: Maybe DependencyOpts
+  , writeRepoTime :: Maybe UTCTime
+  , properties :: [(Text,Text)]
+  , updateSchemaForStacked :: Bool
+  }
+
+parseCreateOpts :: Parser CreateOpts
+parseCreateOpts = do
+  writeRepoTime <- optional repoTimeOpt
+  dependencies <- optional dependencyOpts
+  properties <- dbPropertiesOpt
+  updateSchemaForStacked <- updateSchemaForStackedOpt
+  return CreateOpts {
+    writeRepoTime,
+    dependencies,
+    properties,
+    updateSchemaForStacked
+  }
+
+repoTimeOpt :: Parser UTCTime
+repoTimeOpt = option readTime
+  (  long "repo-hash-time"
+  <> metavar "yyyy-mm-ddThh:mm:ssZ"
+  <> help "Timestamp of the source data to be indexed."
+  )
+  where
+    readTime :: ReadM UTCTime
+    readTime = eitherReader $ \str ->
+      case readUTC $ Text.pack str of
+        Just value -> Right value
+        Nothing ->
+          Left "expecting UTC time e.g. 2021-01-01T12:30:00Z"
+
+data DependencyOpts = DependencyOpts Repo (Maybe PruneOpts)
+
+data PruneOpts = PruneOpts ExcludeOpt UnitsOpt
+
+data ExcludeOpt = Exclude | Include
+  deriving Eq
+
+data UnitsOpt
+  = Units [ByteString]
+  | UnitsFromFile FilePath
+
+readUnits :: UnitsOpt -> IO [ByteString]
+readUnits (Units these) = return these
+readUnits (UnitsFromFile file) = extractLines file
+
+getDependencies :: DependencyOpts -> IO Dependencies
+getDependencies (DependencyOpts Repo{..} Nothing) =
+  return $ Thrift.Dependencies_stacked $
+    Thrift.Stacked repo_name repo_hash Nothing
+getDependencies (DependencyOpts repo (Just (PruneOpts exclude unitsOpt))) = do
+  units <- readUnits unitsOpt
+  return $ Thrift.Dependencies_pruned $
+    Thrift.Pruned repo units (exclude == Exclude) Nothing
+
+dependencyOpts :: Parser DependencyOpts
+dependencyOpts = stackedOpt <|> updateOptions
+
+updateOptions :: Parser DependencyOpts
+updateOptions = do
+  repo <- incrementalOpt
+  prune <- includeOpt <|> excludeOpt
+  return $ DependencyOpts repo (Just prune)
+
+stackedOpt :: Parser DependencyOpts
+stackedOpt =
+  (\repo -> DependencyOpts repo Nothing) <$>
+     option (maybeReader Glean.parseRepo)
+  (  long "stacked"
+  <> metavar "DB"
+  <> help ("Created DB will be stacked on top of this DB. "
+  <> "For more details about its schema, see --update-schema-for-stacked.")
+  )
+
+incrementalOpt :: Parser Repo
+incrementalOpt = option (maybeReader Glean.parseRepo)
+  (  long "incremental"
+  <> metavar "DB"
+  <> help "Create an incremental DB on top of this DB."
+  )
+
+splitUnits :: Text -> [ByteString]
+splitUnits = map Encode.encodeUtf8 . Text.splitOn ","
+
+extractLines :: FilePath -> IO [ByteString]
+extractLines file = map Encode.encodeUtf8 . Text.lines <$> Text.readFile file
+
+includeOptString :: Parser UnitsOpt
+includeOptString = Units . splitUnits <$> strOption
+  (  long "include"
+  <> metavar "unit,unit,.."
+  <> help "For incremental DBs only. Include these units."
+  )
+
+includeOptFile :: Parser UnitsOpt
+includeOptFile = UnitsFromFile <$> strOption
+  (  long "include-file"
+  <> metavar "FILE"
+  <> help ("For incremental DBs only. Include units in FILE "
+  <> "(one per line).")
+  )
+
+includeOpt :: Parser PruneOpts
+includeOpt = PruneOpts Include <$> (includeOptFile <|> includeOptString)
+
+excludeOptString :: Parser UnitsOpt
+excludeOptString =  Units . splitUnits <$> strOption
+  (  long "exclude"
+  <> metavar "unit,unit,.."
+  <> help "For incremental DBs only. Exclude these units."
+  )
+
+excludeOptFile :: Parser UnitsOpt
+excludeOptFile =  UnitsFromFile <$> strOption
+  (  long "exclude-file"
+  <> metavar "FILE"
+  <> help ("For incremental DBs only. Exclude units in FILE "
+  <> "(one per line).")
+  )
+
+excludeOpt :: Parser PruneOpts
+excludeOpt = PruneOpts Exclude <$> (excludeOptFile <|> excludeOptString)
+
+dbPropertiesOpt :: Parser [(Text, Text)]
+dbPropertiesOpt = many $ option readProperty
+  (  long "property"
+  <> metavar "NAME=VALUE"
+  <> help "Set DB's properties when creating a DB."
+  )
+  where
+    readProperty :: ReadM (Text,Text)
+    readProperty = eitherReader $ \str ->
+      case break (=='=') str of
+        (name, '=':value) -> Right (Text.pack name, Text.pack value)
+        _other -> Left "--property: expecting NAME=VALUE"
+
+updateSchemaForStackedOpt :: Parser Bool
+updateSchemaForStackedOpt = switch
+  (  long "update-schema-for-stacked"
+  <> help (
+    "When creating a stacked DB, use the current schema instead " <>
+    "of the schema from the base DB.")
+  )
+
+createDb :: Backend b => b -> Repo -> CreateOpts -> IO Bool
+createDb backend repo opts = do
+  deps <- mapM getDependencies opts.dependencies
+  Thrift.KickOffResponse alreadyExists <-
+    Glean.kickOffDatabase backend def
+      { kickOff_repo = repo
+      , kickOff_properties = HashMap.fromList opts.properties
+      , kickOff_dependencies = deps
+      , kickOff_repo_hash_time =
+          utcTimeToPosixEpochTime <$> opts.writeRepoTime
+      , kickOff_update_schema_for_stacked = opts.updateSchemaForStacked
+      }
+  return alreadyExists
diff --git a/glean/tools/gleancli/GleanCLI/Index.hs b/glean/tools/gleancli/GleanCLI/Index.hs
--- a/glean/tools/gleancli/GleanCLI/Index.hs
+++ b/glean/tools/gleancli/GleanCLI/Index.hs
@@ -9,10 +9,13 @@
 {-# LANGUAGE ApplicativeDo #-}
 module GleanCLI.Index (IndexCommand) where
 
+import Control.Monad
+import Data.Either
 import Options.Applicative
 import System.Directory
 import System.IO.Temp
 
+import Util.Control.Exception
 import Util.IO
 import Util.OptParse
 
@@ -22,12 +25,14 @@
 import Glean.Util.Some
 
 import GleanCLI.Common
+import GleanCLI.Create
 import GleanCLI.Types
 
 data IndexCommand
   = Index
       { indexCmdRepo :: Repo
       , indexCmdRoot :: FilePath
+      , indexCmdCreate :: CreateOpts
       , indexCmdRun :: RunIndexer
       }
 
@@ -35,6 +40,7 @@
   parseCommand =
     commandParser "index" (progDesc "Index some source code") $ do
       indexCmdRepo <- dbOpts
+      indexCmdCreate <- parseCreateOpts
       indexCmdRun <- cmdLineParser
       indexCmdRoot <- strArgument (metavar "ROOT")
       return Index{..}
@@ -42,8 +48,13 @@
   runCommand _evb _cfg backend Index{..} = do
     projectRoot <- getCurrentDirectory
     withSystemTempDirectory "glean-index" $ \tmpdir -> do
-    fillDatabase backend indexCmdRepo Nothing (die 1 "DB already exists") $
-      indexCmdRun (Some backend) indexCmdRepo
+    tryBracket
+      (do
+        exists <- createDb backend indexCmdRepo indexCmdCreate
+        when exists $ die 1 "DB already exists"
+      )
+      (\_ ex -> when (isRight ex) $ finish backend indexCmdRepo) $
+      \_ -> indexCmdRun (Some backend) indexCmdRepo
         IndexerParams {
           indexerRoot = indexCmdRoot,
           indexerProjectRoot = projectRoot,
diff --git a/glean/tools/gleancli/GleanCLI/Write.hs b/glean/tools/gleancli/GleanCLI/Write.hs
--- a/glean/tools/gleancli/GleanCLI/Write.hs
+++ b/glean/tools/gleancli/GleanCLI/Write.hs
@@ -6,18 +6,14 @@
   LICENSE file in the root directory of this source tree.
 -}
 
-{-# LANGUAGE ApplicativeDo #-}
+{-# LANGUAGE ApplicativeDo, OverloadedRecordDot #-}
 module GleanCLI.Write (WriteCommand, FinishCommand) where
 
 import Control.Monad
 import qualified Data.ByteString as B
-import Data.Default
 import Data.Proxy
-import qualified Data.HashMap.Strict as HashMap
 import Data.Text (Text)
 import qualified Data.Text as Text
-import qualified Data.Text.IO as Text
-import qualified Data.Text.Encoding as Encode
 import Options.Applicative
 
 import Control.Concurrent.Stream (stream)
@@ -34,38 +30,59 @@
 import Glean.Database.Schema
 import Glean.Database.Write.Batch (syncWriteDatabase)
 import Glean.Types as Thrift
-import Util.Time
+import Glean.Util.ThriftService (queueTimeout)
 import Glean.Write
 import Glean.Write.JSON ( buildJsonBatch, syncWriteJsonBatch )
 
 import GleanCLI.Common
+import GleanCLI.Create
 import GleanCLI.Finish
 import GleanCLI.Types
-import Data.Time.Clock (UTCTime)
-import Glean.Database.Meta (utcTimeToPosixEpochTime)
-import Data.ByteString (ByteString)
-import Glean.Util.ThriftService (queueTimeout)
 
 data WriteCommand
   = Write
-      { writeRepo :: Repo
-      , writeRepoTime :: Maybe UTCTime
-      , create :: Bool
-      , dependencies :: Maybe (IO Thrift.Dependencies)
-      , finish :: Bool
-      , properties :: [(Text,Text)]
-      , writeMaxConcurrency :: Int
-      , useLocalCache :: Bool
-      , sendQueueSettings :: Glean.SendAndRebaseQueueSettings
-      , writeFileFormat :: FileFormat
-      , updateSchemaForStacked :: Bool
-      , factsSource :: FactsSource
+      { maybeCreate :: Maybe CreateOpts
+      , writeRepo :: Repo
+      , writeOpts :: WriteOpts
       }
 
-data FactsSource = Locations [Text] | Files [FilePath]
+data WriteOpts = WriteOpts
+  { finish :: Bool
+  , writeMaxConcurrency :: Int
+  , useLocalCache :: Bool
+  , sendQueueSettings :: Glean.SendAndRebaseQueueSettings
+  , writeFileFormat :: FileFormat
+  , factsSource :: FactsSource
+  }
 
+parseWriteOpts :: Parser WriteOpts
+parseWriteOpts = do
+  finish <- finishOpt
+  writeMaxConcurrency <- maxConcurrencyOpt
+  useLocalCache <- useLocalSwitchOpt
+  sendQueueSettings <- Glean.sendAndRebaseQueueOptions
+  writeFileFormat <- fileFormatOpt JsonFormat
+  factsSource <- factsSourceOpts
+  return WriteOpts {
+    finish,
+    writeMaxConcurrency,
+    useLocalCache,
+    sendQueueSettings,
+    writeFileFormat,
+    factsSource
+  }
+
+data FactsSource
+  = Locations [Text] Bool
+  -- ^ remote locations, async
+  | Files [FilePath]
+  -- ^ local files
+
 factsSourceOpts :: Parser FactsSource
-factsSourceOpts = Files <$> fileArg <|> Locations <$> locationOpt
+factsSourceOpts = locations <|> files
+  where
+    locations = Locations <$> locationOpt <*> asyncOpt
+    files = Files <$> fileArg
 
 fileArg :: Parser [FilePath]
 fileArg = many $ strArgument
@@ -81,33 +98,14 @@
   <> help "Location(s) of facts to be downloaded and written to the db"
   )
 
-repoTimeOpt :: Parser UTCTime
-repoTimeOpt = option readTime
-  (  long "repo-hash-time"
-  <> metavar "yyyy-mm-ddThh:mm:ssZ"
-  <> help "Timestamp of the source data to be indexed."
+asyncOpt :: Parser Bool
+asyncOpt = switch
+  (  long "async"
+  <> help ("Don't wait till write is complete. "
+  <> "Can be used only with --location. "
+  <> "All writes are guaranteed to finish before db completes")
   )
-  where
-    readTime :: ReadM UTCTime
-    readTime = eitherReader $ \str ->
-      case readUTC $ Text.pack str of
-        Just value -> Right value
-        Nothing ->
-          Left "expecting UTC time e.g. 2021-01-01T12:30:00Z"
 
-dbPropertiesOpt :: Parser [(Text, Text)]
-dbPropertiesOpt = many $ option readProperty
-  (  long "property"
-  <> metavar "NAME=VALUE"
-  <> help "Set DB's properties when creating a DB."
-  )
-  where
-    readProperty :: ReadM (Text,Text)
-    readProperty = eitherReader $ \str ->
-      case break (=='=') str of
-        (name, '=':value) -> Right (Text.pack name, Text.pack value)
-        _other -> Left "--property: expecting NAME=VALUE"
-
 finishOpt :: Parser Bool
 finishOpt = switch
   (  long "finish"
@@ -115,14 +113,6 @@
   <> "it is not possible to add any more facts to it.")
   )
 
-stackedOpt :: Parser Repo
-stackedOpt = option (maybeReader Glean.parseRepo)
-  (  long "stacked"
-  <> metavar "DB"
-  <> help ("Created DB will be stacked on top of this DB. "
-  <> "For more details about its schema, see --update-schema-for-stacked.")
-  )
-
 useLocalSwitchOpt :: Parser Bool
 useLocalSwitchOpt = switch
   (  long "use-local-cache"
@@ -130,63 +120,6 @@
   <> "write performance.")
   )
 
-incrementalOpt :: Parser Repo
-incrementalOpt = option (maybeReader Glean.parseRepo)
-  (  long "incremental"
-  <> metavar "DB"
-  <> help "Create an incremental DB on top of this DB."
-  )
-
-splitUnits :: Text -> [ByteString]
-splitUnits = map Encode.encodeUtf8 . Text.splitOn ","
-
-extractLines :: FilePath -> IO [ByteString]
-extractLines file = map Encode.encodeUtf8 . Text.lines <$> Text.readFile file
-
-includeOptString :: Parser (IO [ByteString])
-includeOptString = return . splitUnits <$> strOption
-  (  long "include"
-  <> metavar "unit,unit,.."
-  <> help "For incremental DBs only. Include these units."
-  )
-
-includeOptFile :: Parser (IO [ByteString])
-includeOptFile = extractLines <$> strOption
-  (  long "include-file"
-  <> metavar "FILE"
-  <> help ("For incremental DBs only. Include units in FILE "
-  <> "(one per line).")
-  )
-
-includeOpt :: Parser (IO [ByteString])
-includeOpt = includeOptFile <|> includeOptString
-
-excludeOptString :: Parser (IO [ByteString])
-excludeOptString =  return . splitUnits <$> strOption
-  (  long "exclude"
-  <> metavar "unit,unit,.."
-  <> help "For incremental DBs only. Exclude these units."
-  )
-
-excludeOptFile :: Parser (IO [ByteString])
-excludeOptFile =  extractLines <$> strOption
-  (  long "exclude-file"
-  <> metavar "FILE"
-  <> help ("For incremental DBs only. Exclude units in FILE "
-  <> "(one per line).")
-  )
-
-excludeOpt :: Parser (IO [ByteString])
-excludeOpt = excludeOptFile <|> excludeOptString
-
-updateSchemaForStackedOpt :: Parser Bool
-updateSchemaForStackedOpt = switch
-  (  long "update-schema-for-stacked"
-  <> help (
-    "When creating a stacked DB, use the current schema instead " <>
-    "of the schema from the base DB.")
-  )
-
 instance Plugin WriteCommand where
   parseCommand = createCmd <|> writeCmd
     where
@@ -195,21 +128,10 @@
           "Create a new standalone|stacked|incremental DB. "
           <> "Please carefully read help above to understand how various "
           <> "options are related to each other.")) $ do
+        createOpts <- parseCreateOpts
+        writeOpts <- parseWriteOpts
         writeRepo <- dbOpts
-        writeRepoTime <- optional repoTimeOpt
-        finish <- finishOpt
-        dependencies <- optional (stackedOptions <|> updateOptions)
-        properties <- dbPropertiesOpt
-        writeMaxConcurrency <- maxConcurrencyOpt
-        useLocalCache <- useLocalSwitchOpt
-        sendQueueSettings <- Glean.sendAndRebaseQueueOptions
-        writeFileFormat <- fileFormatOpt JsonFormat
-        updateSchemaForStacked <- updateSchemaForStackedOpt
-        factsSource <- factsSourceOpts
-        return Write
-          { create=True
-          , ..
-          }
+        return Write { writeRepo, maybeCreate = Just createOpts, writeOpts }
 
     writeCmd =
       commandParser "write" (progDesc (
@@ -217,66 +139,28 @@
           <> "Please carefully read help above to understand how various "
           <> "options are related to each other.")) $ do
         writeRepo <- dbOpts
-        finish <- finishOpt
-        writeMaxConcurrency <- maxConcurrencyOpt
-        useLocalCache <- useLocalSwitchOpt
-        sendQueueSettings <- Glean.sendAndRebaseQueueOptions
-        writeFileFormat <- fileFormatOpt JsonFormat
-        factsSource <- factsSourceOpts
-        return Write
-          { create=False, writeRepoTime=Nothing
-          , properties=[], dependencies=Nothing
-          , updateSchemaForStacked = False
-          , ..
-          }
-
-    stackedOptions :: Parser (IO Dependencies)
-    stackedOptions = f <$> stackedOpt
-      where
-        f Repo{..} =
-          return $ Thrift.Dependencies_stacked $
-            Thrift.Stacked repo_name repo_hash Nothing
-
-    updateOptions :: Parser (IO Dependencies)
-    updateOptions = do
-      repo <- incrementalOpt
-      let
-        include = (,False) <$> includeOpt
-        exclude = (,True) <$> excludeOpt
-      ~(units, exclude) <- include <|> exclude
-      return $ fmap (prune repo exclude) units
-      where
-        prune :: Repo -> Bool -> [ByteString] -> Dependencies
-        prune repo exclude units = Thrift.Dependencies_pruned $
-          Thrift.Pruned repo units exclude Nothing
+        writeOpts <- parseWriteOpts
+        return Write { writeRepo, maybeCreate = Nothing, writeOpts }
 
   runCommand _ _ backend Write{..} =
     tryBracket
-       (when create $ do
-            putStrLn $ "Creating DB " <> showRepo writeRepo
-            deps <- maybe (return Nothing) (fmap Just) dependencies
-            Thrift.KickOffResponse alreadyExists <-
-              Glean.kickOffDatabase backend def
-                { kickOff_repo = writeRepo
-                , kickOff_properties = HashMap.fromList properties
-                , kickOff_dependencies = deps
-                , kickOff_repo_hash_time =
-                    utcTimeToPosixEpochTime <$> writeRepoTime
-                , kickOff_update_schema_for_stacked = updateSchemaForStacked
-                }
-            when alreadyExists $ die 3 "DB create failure: already exists"
+       (forM maybeCreate $ \createOpts -> do
+          putStrLn $ "Creating DB " <> showRepo writeRepo
+          alreadyExists <- createDb backend writeRepo createOpts
+          when alreadyExists $ die 3 "DB create failure: already exists"
        )
        (\_ result -> case resultToFailure result of
           Just err -> die 3 $ "DB create failure: " ++ err
-          Nothing -> when finish $ finished backend writeRepo)
+          Nothing -> when writeOpts.finish $ finished backend writeRepo)
        (\_ ->
-          write Write{..})
+          write writeOpts)
     where
-    write Write{..} = do
+    write WriteOpts{..} = do
       case factsSource of
-        Files writeFiles -> writeBatches writeFiles Write{..}
-        Locations locations -> writeBatchDescriptors locations Write{..}
-    writeBatches writeFiles Write{useLocalCache = True, ..} = do
+        Files writeFiles -> writeBatches writeFiles WriteOpts{..}
+        Locations locations async
+          -> writeBatchDescriptors locations async WriteOpts{..}
+    writeBatches writeFiles WriteOpts{useLocalCache = True, ..} = do
       dbSchema <- loadDbSchema backend writeRepo
       logMessages <- newTQueueIO
       let inventory = schemaInventory dbSchema
@@ -305,7 +189,7 @@
             return ()
       atomically (flushTQueue logMessages) >>= mapM_ putStrLn
 
-    writeBatches writeFiles Write{useLocalCache = False, ..}
+    writeBatches writeFiles WriteOpts{useLocalCache = False, ..}
       | LocalOrRemote.BackendEnv env <- LocalOrRemote.backendKind backend = do
         logMessages <- newTQueueIO
         case writeFileFormat of
@@ -326,7 +210,7 @@
               atomically $ writeTQueue logMessages $ "Wrote " <> file
               atomically (flushTQueue logMessages) >>= mapM_ putStrLn
 
-    writeBatches writeFiles Write{useLocalCache = False, ..} = do
+    writeBatches writeFiles WriteOpts{useLocalCache = False, ..} = do
       logMessages <- newTQueueIO
       let settings = sendAndRebaseQueueSendQueueSettings sendQueueSettings
       Glean.withSendQueue backend writeRepo settings $ \queue ->
@@ -346,24 +230,33 @@
           atomically (flushTQueue logMessages) >>= mapM_ putStrLn
           return ()
       atomically (flushTQueue logMessages) >>= mapM_ putStrLn
-    writeBatchDescriptors locations Write{..} = do
+
+    writeBatchDescriptors locations False WriteOpts{..} = do
       logMessages <- newTQueueIO
       let settings = sendAndRebaseQueueSendQueueSettings sendQueueSettings
       Glean.withSendQueue backend writeRepo settings $ \queue ->
         stream writeMaxConcurrency (forM_ locations) $ \location -> do
-          let batchDescriptor = Thrift.BatchDescriptor {
-            Thrift.batchDescriptor_location = location,
-            Thrift.batchDescriptor_format = batchFormat writeFileFormat}
+          let descriptor = batchDescriptor location writeFileFormat
           atomically
-            $ Glean.writeSendQueueDescriptor queue batchDescriptor $ \_ ->
+            $ Glean.writeSendQueueDescriptor queue descriptor $ \_ ->
               writeTQueue logMessages $ "Wrote " <> Text.unpack location
           atomically (flushTQueue logMessages) >>= mapM_ putStrLn
           return ()
       atomically (flushTQueue logMessages) >>= mapM_ putStrLn
 
+    -- Send directly without the client queue as we're writing asynchronously.
+    writeBatchDescriptors locations True WriteOpts{..} = do
+      stream writeMaxConcurrency (forM_ locations) $ \location -> do
+        let descriptor = batchDescriptor location writeFileFormat
+        Glean.sendBatchDescriptor backend writeRepo descriptor False
+        return ()
     batchFormat writeFileFormat = case writeFileFormat of
       BinaryFormat -> Thrift.BatchFormat_Binary
       JsonFormat -> Thrift.BatchFormat_JSON
+    batchDescriptor location fileFormat = Thrift.BatchDescriptor
+      { Thrift.batchDescriptor_location = location
+      , Thrift.batchDescriptor_format = batchFormat fileFormat
+      }
     resultToFailure Right{} = Nothing
     resultToFailure (Left err) = Just (show err)
 
diff --git a/glean/typed/Glean/Query/Angle.hs b/glean/typed/Glean/Query/Angle.hs
new file mode 100644
--- /dev/null
+++ b/glean/typed/Glean/Query/Angle.hs
@@ -0,0 +1,541 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+-- |
+-- Small domain-specific language for building Angle queries
+-- programmatically.
+--
+{-# LANGUAGE TypeApplications, TypeOperators, AllowAmbiguousTypes #-}
+{-# OPTIONS_GHC -Wno-star-is-type #-}
+module Glean.Query.Angle
+  ( Angle
+  , AngleStatement
+  , var
+  , Type
+  , vars
+  , predicate
+  , where_
+  , not_
+  , (.=)
+  , stmt
+  , (.|)
+  , or_
+  , (.->)
+  , nat
+  , byte
+  , enum
+  , string
+  , stringPrefix
+  , byteArray
+  , array
+  , tuple
+  , wild
+  , never
+  , field
+  , end
+  , rec
+  , alt
+  , asPredicate
+  , sig
+  , factId
+  , factIds
+  , factIdsArray
+  , elementsOf
+  , arrayPrefix
+  , unit
+  , if_
+  , true
+  , false
+  , bool
+  , just
+  , nothing
+  , (.+)
+  , zipp
+  , conc
+  , display
+  , RecordFields
+  , SumFields
+  , TFields(..)
+  , HasFields
+  , HasField
+  , AngleEnum(..)
+  , AngleVars
+  , new
+  , old
+  ) where
+
+import Control.Monad.State.Strict
+import Data.ByteString (ByteString)
+import Data.Proxy
+import Data.String
+import qualified Data.List.Extra as List (nubOrd)
+import Data.List.NonEmpty (NonEmpty(..))
+import qualified Data.List.NonEmpty as NonEmpty (fromList, toList)
+import Data.Text (Text)
+import Compat.Prettyprinter hiding ((<>))
+import Compat.Prettyprinter.Render.Text
+import qualified Data.Text as Text
+import qualified Data.Text.Encoding as Text
+import Data.Word
+import GHC.TypeLits hiding (Nat)
+import TextShow
+
+import Glean.Angle.Types hiding
+  (SourcePat, SourceStatement, SourceQuery, Field, Type)
+import qualified Glean.Angle.Types as Angle
+import qualified Glean.Display as Display
+import Glean.Typed hiding (end)
+import Glean.Types (Nat, Byte)
+
+data SpanAngleDSL = DSL
+  deriving (Show, Eq)
+
+instance IsSrcSpan SpanAngleDSL where
+  type Loc SpanAngleDSL = SpanAngleDSL
+  startLoc _ = DSL
+  endLoc _ = DSL
+  mkSpan _ _ = DSL
+
+instance Pretty SpanAngleDSL where
+  pretty DSL = "angle DSL"
+
+type SourcePat = SourcePat' SpanAngleDSL ()
+type SourceStatement = SourceStatement' SpanAngleDSL ()
+type SourceQuery = SourceQuery' SpanAngleDSL ()
+
+newtype Angle t = Angle { gen :: State Int SourcePat }
+
+newtype AngleStatement =
+  AngleStatement { genStmt :: State Int SourceStatement }
+
+-- | Render to angle text, to aid logging and debugging
+display :: Angle t -> Text
+display = render . build
+
+render :: SourceQuery -> Text
+render q = renderStrict (layoutCompact (Display.displayDefault q))
+
+build :: Angle t -> SourceQuery
+build (Angle m) =
+  case evalState m 0 of
+    NestedQuery _ q -> q
+    t -> Angle.SourceQuery (Just t) [] Unordered
+
+class AngleVars f r where
+  -- | Use `vars` to batch up a series of nested `var` calls:
+  --
+  -- > let foo :: Angle a -> Angle b -> Angle c -> Angle d -> Angle e
+  -- > vars foo == var $ \a -> var $ \b -> var $ \c -> var $ \d -> foo a b c d
+  vars :: f -> Angle r
+
+instance (a ~ b) => AngleVars (Angle a) b where
+  vars = id
+
+instance (Type a, AngleVars s r) => AngleVars (Angle a -> s) r where
+  vars f = var $ \ a -> vars (f a)
+
+-- | Introduce an Angle variable
+var :: forall a b . Type a => (Angle a -> Angle b) -> Angle b
+var f = Angle $ do
+  x <- get
+  modify (+1)
+  let v = Angle (pure (Variable DSL ("X" <> showt x)))
+  ty <- gen (sig v)
+  r <- gen (f v)
+  let stmt = Angle.SourceStatement (Wildcard DSL) ty
+  case r of
+    Angle.NestedQuery DSL (Angle.SourceQuery q stmts ord) ->
+      return (Angle.NestedQuery DSL (Angle.SourceQuery q (stmt : stmts) ord))
+    _ ->
+      return (Angle.NestedQuery DSL (Angle.SourceQuery (Just r) [stmt] Ordered))
+
+predicate :: forall p . Predicate p => Angle (KeyType p) -> Angle p
+predicate (Angle pat) = Angle $ do
+  p <- pat
+  return $ App DSL (Variable DSL (predicateRef (Proxy @p))) [p]
+
+-- | Build a query of the form `X where statements`
+where_ :: Angle t -> [AngleStatement] -> Angle t
+where_ t stmts = Angle $
+  nest <$> gen t <*> mapM genStmt stmts
+  where
+  -- merge adjacent where-clauses
+  nest (Angle.NestedQuery DSL (Angle.SourceQuery (Just q) stmts1 ord)) stmts2 =
+    Angle.NestedQuery DSL $
+      Angle.SourceQuery (Just q) (stmts1 <> stmts2) ord
+  nest q stmts =
+    Angle.NestedQuery DSL (Angle.SourceQuery (Just q) stmts Ordered)
+
+not_ :: [AngleStatement] -> AngleStatement
+not_ stmts = unit' .= Angle (Negation DSL <$> gen t)
+  where
+    t = unit' `where_` stmts
+    unit' = sig unit
+
+-- | Build a statement, `A = B`
+(.=) :: Angle t -> Angle t -> AngleStatement
+l .= r = AngleStatement $ Angle.SourceStatement <$> gen l <*> gen r
+
+-- | Build a statement from a plain Angle expression, ignoring the result.
+-- `stmt A` is equivalent in Angle to the statement `_ = A`. For example
+--
+-- > var $ \x ->
+-- >   x `where_` [
+-- >      stmt $ predicate @Src.File x
+-- >   ]
+--
+stmt :: Angle t -> AngleStatement
+stmt = (wild .=)
+
+infix 1 .=
+infixr 2 `or_`
+infixr 3 .|
+
+class ToExpr a where
+  type Result a
+  toExpr :: a -> Angle (Result a)
+
+instance ToExpr (Angle a) where
+  type Result (Angle a) = a
+  toExpr = id
+
+instance ToExpr AngleStatement where
+  type Result AngleStatement = ()
+  toExpr stmt = sig unit `where_` [stmt]
+
+instance ToExpr [AngleStatement] where
+  type Result [AngleStatement] = ()
+  toExpr stmts = sig unit `where_` stmts
+
+-- | Build an or-pattern, `A | B`
+(.|) :: (Result a ~ Result b, ToExpr a, ToExpr b) => a -> b -> Angle (Result a)
+a .| b = Angle $ OrPattern DSL <$> gen (toExpr a) <*> gen (toExpr b)
+
+-- | Build an or-pattern between statements (deprecated: just use '.|' instead)
+or_ :: [AngleStatement] -> [AngleStatement] -> Angle ()
+or_ = (.|)
+
+-- | Build a key-value pattern, `A -> B`
+(.->) :: Angle a -> Angle b -> Angle c
+a .-> b = Angle $ KeyValue DSL <$> gen a <*> gen b
+
+instance IsString (Angle Text) where
+  fromString s = Angle (pure (String DSL (Text.pack s)))
+
+-- | A string expression. Note that literal strings may be used as Angle
+-- expressions directly if the @OverloadedStrings@ extension is
+-- enabled.
+string :: Text -> Angle Text
+string t = Angle (pure (String DSL t))
+
+nat :: Word64 -> Angle Nat
+nat w = Angle (pure (Nat DSL w))
+
+byte :: Word8 -> Angle Byte
+byte w = Angle (pure (Nat DSL (fromIntegral w)))
+
+-- | HACK: A typeclass to represent enums generated from Angle. This is used
+-- to splice values of these Angle-generated Thrift enum values back into Angle
+-- queries.
+--
+-- Ideally implementations of these should be codegenerated or we should come
+-- up with a better way of embedding enum values in this DSL.
+class AngleEnum a where
+  type AngleEnumTy a
+  enumName :: a -> Text
+
+enum :: AngleEnum a => a -> Angle (AngleEnumTy a)
+enum e = Angle (pure (Enum DSL (enumName e)))
+
+stringPrefix :: Text -> Angle Text
+stringPrefix t = Angle (pure (StringPrefix DSL t))
+
+-- | A query for a literal value of type [byte]
+byteArray :: ByteString -> Angle ByteString
+byteArray b = Angle (pure (String DSL (Text.decodeUtf8 b)))
+
+-- | Build an array expression
+array :: [Angle t] -> Angle [t]
+array xs = Angle $ Array DSL <$> mapM gen xs
+
+-- | Build a tuple
+tuple :: AngleTuple a => a -> Angle (AngleTupleTy a)
+tuple = fromTuple
+
+type SourceField = Angle.Field SpanAngleDSL () SourceRef SourceRef
+
+-- | Match a record. Zero or more of the fields may be matched.
+--
+-- >   rec $
+-- >     field @"abc" x $
+-- >     field @"def" y $
+-- >   end
+--
+rec :: HasFields f (RecordFields t) => Fields f -> Angle t
+rec fs = Angle $ Struct DSL <$> go fs []
+  where
+  go :: forall f . Fields f -> [SourceField] -> State Int [SourceField]
+  go f acc = case f of
+    NoFields -> return acc
+    Field l v rest  -> do
+      v' <- gen v
+      go rest (Angle.Field l v' : acc)
+
+-- ToDo: we will also probably want a way to cast a record to a
+-- subtype, and to emit a type signature.
+
+-- | Match an alternative of a sum type
+--
+-- >   alt @"abc" value .| alt @"def" value
+--
+alt
+  :: forall (l :: Symbol) v r .
+     (KnownSymbol l, HasField l v (SumFields r)) =>
+     Angle v
+  -> Angle r
+alt val = Angle $ do
+  v <- gen val
+  return $ Struct DSL
+    [Angle.Field (Text.pack (symbolVal (Proxy @l))) v]
+
+data Fields :: TFields -> * where
+  NoFields :: Fields 'TNoFields
+  Field :: Text -> Angle v -> Fields fs -> Fields ('TField l v fs)
+
+field
+  :: forall (l :: Symbol) v fs . KnownSymbol l =>
+     Angle v
+  -> Fields fs
+  -> Fields ('TField l v fs)
+field val rest = Field (Text.pack (symbolVal (Proxy @l))) val rest
+
+end :: Fields 'TNoFields
+end = NoFields
+
+wild :: Angle t
+wild = Angle $ pure $ Wildcard DSL
+
+never :: Angle t
+never = Angle $ pure (Variable DSL "never")
+
+-- | Use this when you want a variable to match a nested predicate
+-- rather than its key.
+--
+-- >  var $ \(n :: Angle Hack.Name) ->
+-- >    n `where_` [
+-- >      stmt $ predicate @Hack.MethodDeclaration $
+-- >        rec $
+-- >          field @"name" (asPredicate n) $
+-- >          field @"container"
+-- >             (rec $
+-- >                field @"class_"
+-- >                   (rec (field @"name" "MyClass" end))
+-- >              end) $
+-- >         end
+-- >    ]
+--
+asPredicate :: Angle p -> Angle (KeyType p)
+asPredicate (Angle a) = Angle a
+
+-- | Sometimes the Angle typechecker needs a type signature.
+-- This adds a type signature for any Angle type.
+sig :: forall p. Type p => Angle p -> Angle p
+sig a = Angle $ do
+  ta <- gen a
+  return $ TypeSignature DSL ta $ sourceType (Proxy @p)
+
+class AngleTuple a where
+  type AngleTupleTy a
+  fromTuple :: a -> Angle (AngleTupleTy a)
+
+instance AngleTuple (Angle a, Angle b) where
+  type AngleTupleTy (Angle a, Angle b) = (a,b)
+  fromTuple (a, b) = Angle $ do
+    ta <- gen a
+    tb <- gen b
+    return $ Tuple DSL [ta,tb]
+
+instance AngleTuple (Angle a, Angle b, Angle c) where
+  type AngleTupleTy (Angle a, Angle b, Angle c) = (a,b,c)
+  fromTuple (a,b,c) = Angle $ do
+    ta <- gen a
+    tb <- gen b
+    tc <- gen c
+    return $ Tuple DSL [ta,tb,tc]
+
+instance AngleTuple (Angle a, Angle b, Angle c, Angle d) where
+  type AngleTupleTy (Angle a, Angle b, Angle c, Angle d) = (a,b,c,d)
+  fromTuple (a,b,c,d) = Angle $ do
+    ta <- gen a
+    tb <- gen b
+    tc <- gen c
+    td <- gen d
+    return $ Tuple DSL [ta,tb,tc,td]
+
+instance AngleTuple (Angle a, Angle b, Angle c, Angle d, Angle e) where
+  type AngleTupleTy (Angle a, Angle b, Angle c, Angle d, Angle e) = (a,b,c,d,e)
+  fromTuple (a,b,c,d,e) = Angle $ do
+    ta <- gen a
+    tb <- gen b
+    tc <- gen c
+    td <- gen d
+    te <- gen e
+    return $ Tuple DSL [ta,tb,tc,td,te]
+
+instance AngleTuple (Angle a, Angle b, Angle c, Angle d, Angle e, Angle f) where
+  type AngleTupleTy (Angle a, Angle b, Angle c, Angle d, Angle e, Angle f) =
+    (a,b,c,d,e,f)
+  fromTuple (a,b,c,d,e,f) = Angle $ do
+    ta <- gen a
+    tb <- gen b
+    tc <- gen c
+    td <- gen d
+    te <- gen e
+    tf <- gen f
+    return $ Tuple DSL [ta,tb,tc,td,te,tf]
+
+-- | Build a fact id with an explicit type @$123 : Type.2@
+factId :: forall p. Predicate p => IdOf p -> Angle p
+factId = sig . factId_
+
+-- | Build a fact id without an explicit type, @$ 123@
+factId_ :: forall p. IdOf p -> Angle p
+factId_ = Angle
+  . return
+  . FactId DSL Nothing
+  . fromIntegral
+  . fromFid
+  . idOf
+
+-- | Convert @factIds (1 :| [2,3]) :: NonEmpty (IdOf p)@ into
+-- @($1 : p.v) ++ $2 ++ $3@ for building angle
+-- queries, where @v@ is the version of predicate @p@.
+-- Uses disjuction, and nubOrds the input list
+factIds :: forall p. Predicate p => NonEmpty (IdOf p) -> Angle p
+factIds xs = sig $ foldr1 (.|) (fmap factId_ (nubOrd' xs))
+  where
+    -- Our version of package extra lacks Data.List.NonEmpty.Extra
+    nubOrd' :: Ord a => NonEmpty a -> NonEmpty a
+    nubOrd' = NonEmpty.fromList . List.nubOrd . NonEmpty.toList
+
+-- | Similar to `factIds` but generate an array of ids with the signature of the
+-- first element only. This doesn't nubOrd the input set
+factIdsArray :: forall p. Predicate p => [IdOf p] -> Angle [p]
+factIdsArray [] = array []
+factIdsArray (x:xs) = array (sig (factId_ x) : map factId_ xs)
+
+elementsOf :: Angle [x] -> Angle x
+elementsOf listOfX = Angle $ do
+  xs <- gen listOfX
+  return (ElementsOfArray DSL xs)
+
+arrayPrefix :: NonEmpty (Angle x) -> Angle x
+arrayPrefix pats = Angle $ do
+  pats <- traverse gen pats
+  return (ArrayPrefix DSL pats)
+
+unit :: Angle ()
+unit = Angle $ pure (Struct DSL  [])
+
+if_ :: Angle cond -> Angle a -> Angle a -> Angle a
+if_ cond t e = Angle $ IfPattern DSL <$> gen cond <*> gen t <*> gen e
+
+true :: Angle Bool
+true = Angle $ pure (Variable DSL "true")
+
+false :: Angle Bool
+false = Angle $ pure (Variable DSL "false")
+
+-- | Lift a boolean literal into Angle
+bool :: Bool -> Angle Bool
+bool True = true
+bool False = false
+
+just :: Angle a -> Angle (Maybe a)
+just x = Angle $ do
+  tx <- gen x
+  pure (Struct DSL [Angle.Field "just" tx])
+
+nothing :: Angle (Maybe a)
+nothing = Angle $ pure (Variable DSL "nothing")
+
+{-
+  TODO:
+  | KeyValue (SourcePat_ v t) (SourcePat_ v t)
+-}
+
+-- Primitives
+
+(.+) :: (ToExpr a, ToExpr b, Result a ~ Nat, Result b ~ Nat)
+     => a -> b -> Angle Nat
+a .+ b =
+  Angle $ App DSL (Variable DSL "prim.addNat") <$>
+  sequence [gen $ toExpr a, gen $ toExpr b]
+
+zipp :: Angle [a] -> Angle [b] -> Angle [(a,b)]
+zipp a b =
+  Angle $ App DSL (Variable DSL "prim.zip") <$>
+  sequence [gen a, gen b]
+
+conc :: Angle [a] -> Angle [a] -> Angle [a]
+conc a b =
+  Angle $ App DSL (Variable DSL "prim.concat") <$>
+  sequence [gen a, gen b]
+
+-- -----------------------------------------------------------------------------
+-- Special queries
+
+-- | Query only new facts of the given predicate, i.e. facts in the
+-- topmost DB in the stack.
+--
+-- (This is a special-purpose query tool for building incremental fact
+-- derivers)
+new :: Predicate p => Angle p -> Angle p
+new = specialPredicateQuery "new"
+
+-- | Query only old facts of the given predicate, i.e. facts from all
+-- but the topmost DB in the stack.
+--
+-- (This is a special-purpose query tool for building incremental fact
+-- derivers)
+old :: Predicate p => Angle p -> Angle p
+old = specialPredicateQuery "old"
+
+specialPredicateQuery :: Predicate p => Text -> Angle p -> Angle p
+specialPredicateQuery suffix (Angle pat) = Angle $ do
+  p <- pat
+  case p of
+    App DSL (Variable DSL p) args ->
+      return $ App DSL (Variable DSL (p <> "#" <> suffix)) args
+    _ -> error ": not a predicate"
+
+-- -----------------------------------------------------------------------------
+-- Type checking for records and sum types
+
+-- | Maps a Thrift-generated record type to its fields
+type family RecordFields t :: TFields
+
+-- | Maps a Thrift-generated union type to its fields
+type family SumFields t :: TFields
+
+-- | @HasFields f t@ asserts that all the fields @f@ are present in
+-- @t@, in any order.
+class HasFields (f :: TFields) (t :: TFields)
+
+instance HasFields 'TNoFields f
+instance (HasField l v f, HasFields r f) => HasFields ('TField l v r) f
+
+-- | @HasField l v f@ asserts that field @l@ is present in @f@ with type @v@
+class HasField (l :: Symbol) v (f :: TFields)
+
+instance {-# OVERLAPPING #-} (v ~ v') => HasField l v ('TField l v' f)
+instance HasField l v f => HasField l v ('TField l' v' f)
+
+data TFields where
+  TNoFields :: TFields
+  TField :: Symbol -> v -> TFields -> TFields
diff --git a/glean/typed/Glean/Typed.hs b/glean/typed/Glean/Typed.hs
new file mode 100644
--- /dev/null
+++ b/glean/typed/Glean/Typed.hs
@@ -0,0 +1,28 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+-- |
+-- Support for working with strongly-typed Glean data.
+--
+module Glean.Typed
+  ( module Glean.Typed.Binary
+  , module Glean.Typed.Build
+  , module Glean.Typed.BuildFact
+  , module Glean.Typed.Fact
+  , module Glean.Typed.Id
+  , module Glean.Typed.Predicate
+  , module Glean.Typed.Prim
+  ) where
+
+import Glean.Typed.Binary
+import Glean.Typed.Build
+import Glean.Typed.BuildFact
+import Glean.Typed.Fact
+import Glean.Typed.Id
+import Glean.Typed.Predicate
+import Glean.Typed.Prim
diff --git a/glean/typed/Glean/Typed/Binary.hs b/glean/typed/Glean/Typed/Binary.hs
new file mode 100644
--- /dev/null
+++ b/glean/typed/Glean/Typed/Binary.hs
@@ -0,0 +1,330 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+{-# LANGUAGE AllowAmbiguousTypes, TypeApplications #-}
+
+-- |
+-- Support for converting between Haskell types and Glean's binary
+-- format.
+--
+module Glean.Typed.Binary
+  ( -- * 'Type' encoder / decoder
+    Type(..)
+    -- ** helper
+  , decodeRts
+    -- * Used in generated Haskell code
+  , mapD, buildRtsSelector, thriftEnum_buildRtsValue
+  ) where
+
+import Control.Monad
+import Control.Monad.IO.Class
+import Data.ByteString ( ByteString )
+import qualified Data.ByteString.Unsafe as BS
+import Data.Dynamic
+import Data.IORef
+import Data.IntMap (IntMap)
+import Data.Proxy (Proxy(..))
+import Data.Set
+import Data.Text ( Text )
+import Data.Word ( Word64 )
+import Foreign.Ptr
+
+import Thrift.Protocol (ThriftEnum, fromThriftEnum)
+import qualified Util.FFI as FFI
+
+import qualified Glean.Angle.Types as Angle
+import qualified Glean.Schema.Util as Angle
+import qualified Glean.FFI as FFI
+import qualified Glean.RTS as RTS
+import qualified Glean.RTS.Builder as RTS
+import Glean.RTS.Set
+import Glean.Typed.Build
+import Glean.Typed.Id
+import Glean.Types as Thrift
+
+-- -----------------------------------------------------------------------------
+
+-- | Types that can be converted to/from Glean's binary representation
+class Type a where
+  -- | Convert to a Glean value
+  buildRtsValue :: RTS.Builder -> a -> IO ()
+
+  -- | Convert from a Glean value
+  decodeRtsValue :: Decoder a
+
+  -- | If this type only has one possible value and hence doesn't have a
+  -- run-time representation (i.e., is effectively ()), yield that value
+  constantRtsValue :: Maybe a
+
+  constantRtsValue = Nothing
+
+  -- | Decode this type when it is the result of a query. Queries for
+  -- a predicate type return the facts of the predicate directly,
+  -- whereas queries for non-predicate types return facts of a
+  -- pseudo-predicate whose keys are the query results.  The
+  -- 'decodeAsFact' method abstracts the difference in representation
+  -- between predicate and non-predicate query results, so we can just
+  -- use 'decodeAsFact' to decode query results.
+  --
+  -- The default implementation works for all non-predicate types;
+  -- predicate types override it with 'decodeFact'.
+  decodeAsFact
+    :: (MonadIO m)
+    => IntMap Thrift.Fact               -- ^ serialized nested facts
+    -> IORef (IntMap Dynamic)           -- ^ cached deserialized facts
+    -> IdOf a                           -- ^ Id of fact to decode
+    -> Thrift.Fact                      -- ^ fact to decode
+    -> m a
+
+  decodeAsFact nested cache _fid (Thrift.Fact _ k _) =
+    decodeWithCache nested cache decodeRtsValue k
+
+  -- | Get the representation of the type
+  sourceType :: Proxy a -> Angle.SourceType' ()
+
+-- -----------------------------------------------------------------------------
+
+-- | Convenient combination, buiding on the 'decode' from
+-- "Glean.RTS.Types.Build"
+decodeRts :: forall m a. (MonadIO m, Type a) => ByteString -> m a
+decodeRts = decode decodeRtsValue
+
+-- | Nicer and shorter name, very handy to implement custom types by
+-- using the tuple instances defined in this module.
+mapD :: Type a => (a -> b) -> Decoder b
+mapD f = f <$> decodeRtsValue
+
+-- | Helper for SUM types
+buildRtsSelector :: RTS.Builder -> Int -> IO ()
+buildRtsSelector b = FFI.call . RTS.glean_push_value_selector b . fromIntegral
+
+thriftEnum_buildRtsValue :: forall a. ThriftEnum a => RTS.Builder -> a -> IO ()
+thriftEnum_buildRtsValue b x = buildRtsSelector b $ fromThriftEnum x
+
+-- -----------------------------------------------------------------------------
+-- Basic Type instances
+
+instance Type Word64 where
+  buildRtsValue b x = FFI.call $ RTS.glean_push_value_nat b x
+  decodeRtsValue = Decoder $ \DecoderEnv{..} ->
+    FFI.ffiBuf buf $ RTS.glean_pop_value_nat begin end
+  sourceType _ = Angle.NatTy
+
+instance Type ByteString where
+  buildRtsValue b xs = BS.unsafeUseAsCStringLen xs $ \(p,n) -> do
+    FFI.call $ RTS.glean_push_value_array b (fromIntegral n)
+    FFI.call $ RTS.glean_push_value_bytes b (castPtr p) (fromIntegral n)
+  decodeRtsValue = Decoder $ \DecoderEnv{..} -> do
+    size <- FFI.ffiBuf buf $ RTS.glean_pop_value_array begin end
+    ptr <- FFI.ffiBuf buf $ RTS.glean_pop_value_bytes begin end size
+    BS.unsafePackMallocCStringLen (castPtr ptr, fromIntegral size)
+  sourceType _ = Angle.ArrayTy Angle.ByteTy
+
+instance Type Text where
+  buildRtsValue b s = FFI.withUTF8Text s $ \p n ->
+    FFI.call $ RTS.glean_push_value_string b (castPtr p) n
+  decodeRtsValue = Decoder $ \DecoderEnv{..} -> do
+    (p,n) <- FFI.invoke $ RTS.glean_pop_value_string begin end
+    FFI.unsafeMallocedUTF8 (castPtr p) n
+  sourceType _ = Angle.StringTy
+
+-- | The instance for () does not encode or decode bytes, it is vacuous
+instance Type () where
+  buildRtsValue _ () = return ()
+  decodeRtsValue = pure ()
+  constantRtsValue = Just ()
+  sourceType _ = Angle.unit
+
+
+-- | Bool is alias for sum of two ()
+instance Type Bool where
+  buildRtsValue b False = buildRtsSelector b 0
+  buildRtsValue b True = buildRtsSelector b 1
+  decodeRtsValue = enumD fail
+    where fail = Decoder $ \_ -> decodeFail "bool selector out of range"
+  sourceType _ = Angle.BooleanTy
+
+
+instance Type Nat where
+  buildRtsValue b nat = FFI.call $
+    RTS.glean_push_value_nat b ((fromIntegral . unNat) nat)
+  decodeRtsValue = Decoder $ \DecoderEnv{..} ->
+    fmap (Nat . fromIntegral)
+         (FFI.ffiBuf buf (RTS.glean_pop_value_nat begin end))
+  sourceType _ = Angle.NatTy
+
+instance Type Byte where
+  buildRtsValue b byt = FFI.call $
+    RTS.glean_push_value_byte b ((fromIntegral . unByte) byt)
+  decodeRtsValue = Decoder $ \DecoderEnv{..} ->
+    fmap (Byte . fromIntegral)
+         (FFI.ffiBuf buf (RTS.glean_pop_value_byte begin end))
+  sourceType _ = Angle.ByteTy
+
+-- -----------------------------------------------------------------------------
+-- Containers
+
+-- | Lists are preceded with their length
+instance Type a => Type [a] where
+  buildRtsValue b xs = liftIO $ do
+    FFI.call $ RTS.glean_push_value_array b $ fromIntegral $ length xs
+    mapM_ (buildRtsValue b) xs
+  decodeRtsValue = Decoder $ \env@DecoderEnv{..} -> do
+    size <- FFI.ffiBuf buf $ RTS.glean_pop_value_array begin end
+    replicateM (fromIntegral size) (runDecoder decodeRtsValue env)
+
+  sourceType _ = Angle.ArrayTy (sourceType (Proxy @a))
+
+-- | 'Maybe' is alias pattern for sum of () | 'a' (in this order)
+instance Type a => Type (Maybe a) where
+  buildRtsValue b Nothing = buildRtsSelector b 0
+  buildRtsValue b (Just x) = do
+    buildRtsSelector b 1
+    buildRtsValue b x
+  decodeRtsValue = sumD
+    (Decoder $ \_ -> decodeFail "maybe selector out of range")
+    [pure Nothing, Just <$> decodeRtsValue]
+  sourceType _ = Angle.MaybeTy (sourceType (Proxy @a))
+
+instance {-# OVERLAPPING #-} Type (Set Byte) where
+  buildRtsValue b xs =
+    withWordRtsSet $ \set -> do
+      forM_ xs $ \x ->
+        insertWordRtsSet set (unByte x)
+      buildWordSetBytes set b
+  decodeRtsValue = Decoder $ \env@DecoderEnv{..} -> do
+    size <- FFI.ffiBuf buf $ RTS.glean_pop_value_set begin end
+    fromList <$> replicateM (fromIntegral size) (runDecoder decodeRtsValue env)
+  sourceType _ = Angle.SetTy Angle.ByteTy
+
+instance {-# OVERLAPPING #-} Type (Set Nat) where
+  buildRtsValue b xs =
+    withWordRtsSet $ \set -> do
+      forM_ xs $ \x -> do
+        insertWordRtsSet set (unNat x)
+      buildWordSet set b
+  decodeRtsValue = Decoder $ \env@DecoderEnv{..} -> do
+    size <- FFI.ffiBuf buf $ RTS.glean_pop_value_set begin end
+    fromList <$> replicateM (fromIntegral size) (runDecoder decodeRtsValue env)
+  sourceType _ = Angle.SetTy Angle.NatTy
+
+instance {-# OVERLAPPABLE #-} (Type a, Ord a) => Type (Set a) where
+  buildRtsValue b xs = liftIO $
+    withRtsSet $ \set -> do
+      RTS.withBuilder $ \tb ->
+        forM_ xs $ \x -> do
+          buildRtsValue tb x
+          insertBuilder set tb
+          RTS.resetBuilder tb
+      buildSet set b
+  decodeRtsValue = Decoder $ \env@DecoderEnv{..} -> do
+    size <- FFI.ffiBuf buf $ RTS.glean_pop_value_set begin end
+    fromList <$> replicateM (fromIntegral size) (runDecoder decodeRtsValue env)
+  sourceType _ = Angle.SetTy (sourceType (Proxy @a))
+
+-- -----------------------------------------------------------------------------
+
+-- | 'IdOf' as a Glean primitive
+instance (Type p) => Type (IdOf p) where
+  buildRtsValue b (IdOf fid) = FFI.call $ RTS.glean_push_value_fact b fid
+  decodeRtsValue = Decoder $ \DecoderEnv{..} ->
+    IdOf <$> FFI.ffiBuf buf (RTS.glean_pop_value_fact begin end)
+  sourceType _ = sourceType (Proxy @p)
+
+-- -----------------------------------------------------------------------------
+-- All the tuples, using the wonderful Applicative instance of Decoder
+
+instance (Type a, Type b) => Type (a,b) where
+  buildRtsValue builder (a,b) = do
+    buildRtsValue builder a
+    buildRtsValue builder b
+  decodeRtsValue = (,)
+    <$> decodeRtsValue
+    <*> decodeRtsValue
+  sourceType _ = Angle.tupleSchema
+      [ sourceType (Proxy @a)
+      , sourceType (Proxy @b)
+      ]
+
+instance (Type a, Type b, Type c) => Type (a,b,c) where
+  buildRtsValue builder (a,b,c) = do
+    buildRtsValue builder a
+    buildRtsValue builder b
+    buildRtsValue builder c
+  decodeRtsValue = (,,)
+    <$> decodeRtsValue
+    <*> decodeRtsValue
+    <*> decodeRtsValue
+  sourceType _ = Angle.tupleSchema
+      [ sourceType (Proxy @a)
+      , sourceType (Proxy @b)
+      , sourceType (Proxy @c)
+      ]
+
+instance (Type a, Type b, Type c, Type d) => Type (a,b,c,d) where
+  buildRtsValue builder (a,b,c,d) = do
+    buildRtsValue builder a
+    buildRtsValue builder b
+    buildRtsValue builder c
+    buildRtsValue builder d
+  decodeRtsValue = (,,,)
+    <$> decodeRtsValue
+    <*> decodeRtsValue
+    <*> decodeRtsValue
+    <*> decodeRtsValue
+  sourceType _ = Angle.tupleSchema
+      [ sourceType (Proxy @a)
+      , sourceType (Proxy @b)
+      , sourceType (Proxy @c)
+      , sourceType (Proxy @d)
+      ]
+
+instance (Type a, Type b, Type c, Type d, Type e) => Type (a,b,c,d,e) where
+  buildRtsValue builder (a,b,c,d,e) = do
+    buildRtsValue builder a
+    buildRtsValue builder b
+    buildRtsValue builder c
+    buildRtsValue builder d
+    buildRtsValue builder e
+  decodeRtsValue = (,,,,)
+    <$> decodeRtsValue
+    <*> decodeRtsValue
+    <*> decodeRtsValue
+    <*> decodeRtsValue
+    <*> decodeRtsValue
+  sourceType _ = Angle.tupleSchema
+      [ sourceType (Proxy @a)
+      , sourceType (Proxy @b)
+      , sourceType (Proxy @c)
+      , sourceType (Proxy @d)
+      , sourceType (Proxy @e)
+      ]
+
+instance (Type a, Type b, Type c, Type d, Type e, Type f) => Type (a,b,c,d,e,f) where
+  buildRtsValue builder (a,b,c,d,e,f) = do
+    buildRtsValue builder a
+    buildRtsValue builder b
+    buildRtsValue builder c
+    buildRtsValue builder d
+    buildRtsValue builder e
+    buildRtsValue builder f
+  decodeRtsValue = (,,,,,)
+    <$> decodeRtsValue
+    <*> decodeRtsValue
+    <*> decodeRtsValue
+    <*> decodeRtsValue
+    <*> decodeRtsValue
+    <*> decodeRtsValue
+  sourceType _ = Angle.tupleSchema
+      [ sourceType (Proxy @a)
+      , sourceType (Proxy @b)
+      , sourceType (Proxy @c)
+      , sourceType (Proxy @d)
+      , sourceType (Proxy @e)
+      , sourceType (Proxy @f)
+      ]
diff --git a/glean/typed/Glean/Typed/Build.hs b/glean/typed/Glean/Typed/Build.hs
new file mode 100644
--- /dev/null
+++ b/glean/typed/Glean/Typed/Build.hs
@@ -0,0 +1,139 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+{-# LANGUAGE OverloadedStrings #-}
+-- | This splits out the RTSType encoding and decoding from Typed.hs
+module Glean.Typed.Build
+  ( Decoder(..)
+  , DecoderEnv(..)
+  , DecodingException(..), decodeFail
+  , decode
+  , decodeWithCache
+  , sumD, enumD, thriftEnumD
+  ) where
+
+import Control.Exception ( Exception, throwIO )
+import Control.Monad
+import Control.Monad.IO.Class ( MonadIO, liftIO )
+import Data.ByteString (ByteString)
+import qualified Data.ByteString.Unsafe as BS
+import Data.Dynamic
+import Data.IntMap (IntMap)
+import qualified Data.IntMap as IntMap
+import Data.IORef
+import Data.Text (Text)
+import qualified Data.Text as Text
+import qualified Foreign.Marshal.Utils as Marshal ( with )
+import Foreign
+import Thrift.Protocol (ThriftEnum, toThriftEnum)
+
+import qualified Glean.FFI as FFI
+import qualified Glean.RTS as RTS
+import qualified Glean.Types as Thrift
+
+-- -----------------------------------------------------------------------------
+
+data DecoderEnv = DecoderEnv
+  { begin :: {-# UNPACK #-} !(Ptr (Ptr ()))
+  , end :: {-# UNPACK #-} !(Ptr ())
+  , buf :: {-# UNPACK #-} !FFI.FFIResultBuf
+  , serialized :: IntMap Thrift.Fact
+  , cacheRef :: {-# UNPACK #-}!(IORef (IntMap Dynamic))
+  }
+
+-- | runDecoder takes 'begin' and 'end' and advances the 'begin' position.
+-- Can usually throw 'GleanFFIError' or 'DecodingException'
+newtype Decoder a = Decoder
+ { runDecoder :: DecoderEnv -> IO a
+ }
+
+instance Functor Decoder where
+  fmap f (Decoder g) = Decoder $ \env -> fmap f (g env)
+
+instance Applicative Decoder where
+  pure x = Decoder $ \_ -> pure x
+  {-# INLINE (<*>) #-}
+  (<*>) = ap
+
+instance Monad Decoder where
+  return = pure
+  {-# INLINE (>>=) #-}
+  Decoder m >>= k = Decoder $ \env -> do
+    a <- m env
+    runDecoder (k a) env
+
+-- -----------------------------------------------------------------------------
+
+newtype DecodingException = DecodingException { decodingException :: Text }
+
+instance Show DecodingException where show = Text.unpack . decodingException
+
+instance Exception DecodingException
+
+-- | Throw 'DecodingException'
+decodeFail :: Text -> IO a
+decodeFail = throwIO . DecodingException
+
+-- -----------------------------------------------------------------------------
+
+-- | Can throw 'DecodingException'-. The 'Decoder' must consume the entire
+-- 'ByteString' leaving no extra bytes.
+decode :: forall m a. (MonadIO m) => Decoder a -> ByteString -> m a
+decode decoder v = do
+  cache <- liftIO $ newIORef IntMap.empty
+  decodeWithCache IntMap.empty cache decoder v
+
+decodeWithCache
+  :: forall m a. (MonadIO m)
+  => IntMap Thrift.Fact
+  -> IORef (IntMap Dynamic)
+  -> Decoder a
+  -> ByteString
+  -> m a
+decodeWithCache serialized cache decoder v =
+  liftIO $ BS.unsafeUseAsCStringLen v $ \(p,n) -> do
+    let begin = castPtr p :: Ptr ()
+        end   = castPtr (p `plusPtr` n) :: Ptr ()
+    Marshal.with begin $ \ (pbegin :: Ptr (Ptr ())) -> do
+      FFI.withFFIResultBuf $ \buf -> do
+        x <- runDecoder decoder (DecoderEnv pbegin end buf serialized cache)
+        pos <- peek pbegin
+        when (pos /= end) $ do
+          let extra = Text.pack (show (end `minusPtr` pos))
+          decodeFail ("extra " <> extra <> " bytes at end of value")
+        return x
+
+
+-- | A generic decoder for sum types. Can throw 'GleanFFIError'
+sumD :: Decoder b -> [Decoder b] -> Decoder b
+sumD empty alts = Decoder $ \env@DecoderEnv{..} -> do
+  sel <- FFI.ffiBuf buf $ RTS.glean_pop_value_selector begin end
+  let Decoder f = index sel alts
+  f env
+  where
+    index 0 (x:_) = x
+    index i (_:xs) = index (i-1) xs
+    index _ [] = empty
+
+-- | A generic decoder, used for Bool. Can throw 'GleanFFIError'
+enumD :: forall a. (Enum a, Bounded a) => Decoder a -> Decoder a
+enumD unknown = Decoder $ \env@DecoderEnv{..} -> do
+  sel <- FFI.ffiBuf buf $ RTS.glean_pop_value_selector begin end
+  let Decoder f = if sel <= ord maxBound - ord minBound
+        then return $ toEnum $ fromIntegral $ sel + ord minBound
+        else unknown
+  f env
+  where
+    ord x = fromIntegral $ fromEnum (x :: a)
+
+-- | A generic decoder for thrift enum types.
+thriftEnumD :: ThriftEnum a => Decoder a
+thriftEnumD = Decoder $ \DecoderEnv{..} ->
+  fmap (toThriftEnum . fromIntegral)
+    $ FFI.ffiBuf buf
+    $ RTS.glean_pop_value_selector begin end
diff --git a/glean/typed/Glean/Typed/BuildFact.hs b/glean/typed/Glean/Typed/BuildFact.hs
new file mode 100644
--- /dev/null
+++ b/glean/typed/Glean/Typed/BuildFact.hs
@@ -0,0 +1,213 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+{-# LANGUAGE AllowAmbiguousTypes, TypeApplications, CPP, InstanceSigs #-}
+module Glean.Typed.BuildFact
+  ( NewFact(newFact,withUnit, derivedFrom)
+  , makeFact
+  , makeFact_
+  , makeFactV
+  , makeFactV_
+  , Facts
+  , newFacts
+  , serializeFacts
+  , factsMemory
+  , FactBuilder
+  , buildFacts
+  , extendFacts
+  , buildBatch
+  ) where
+
+import Data.Coerce
+import Data.HashMap.Strict (HashMap)
+import qualified Data.HashMap.Strict as HashMap
+import Data.Int
+import Data.IORef
+import Data.Maybe
+import qualified Data.Vector.Storable as Vector
+import Control.Monad
+import Control.Monad.IO.Class
+#if !MIN_VERSION_base(4,13,0)
+import Control.Monad.Fail (MonadFail)
+#endif
+import Control.Monad.Trans.Class
+import Control.Monad.Trans.Reader
+
+import Glean.RTS.Builder (sizeOfBuilder, withBuilder)
+import Glean.RTS.Foreign.Define (defineFact)
+import Glean.RTS.Foreign.FactSet (FactSet)
+import qualified Glean.RTS.Foreign.FactSet as FactSet
+import Glean.RTS.Foreign.Lookup
+import Glean.RTS.Types (lowestFid)
+import Glean.Typed.Binary
+import Glean.Typed.Id
+import Glean.Typed.Predicate
+import qualified Glean.Types as Thrift
+
+-- -----------------------------------------------------------------------------
+
+-- | Class of monads which support creation of new typed facts
+--
+-- Include 'MonadFail' constraint to avoid needing 'error'
+class (MonadFail m, Monad m) => NewFact m where
+  -- | Create a new fact with a the given key and value
+  newFact :: Predicate p => KeyType p -> ValueType p -> m (IdOf p)
+
+  -- | Create some facts owned by the given UnitName
+  withUnit ::Thrift.UnitName -> m a -> m a
+
+  -- | Set dependencies of an externally derived fact
+  derivedFrom :: Predicate p => [Fid] -> [p] -> m ()
+
+-- | Create a new fact in a 'NewFact' monad and return the corresponding Thrift
+-- structure which will have 'Just' the passed key and value.
+makeFactV
+  :: forall p m. (Predicate p, NewFact m)
+  => KeyType p -> ValueType p -> m p
+makeFactV key value =
+  (\i -> mkFact i (Just key) (Just value)) <$> newFact key value
+
+-- | Create a new fact in a 'NewFact' monad.
+makeFactV_
+  :: forall p m. (Predicate p, NewFact m)
+  => KeyType p -> ValueType p -> m ()
+makeFactV_ key value = void $ newFact @m @p key value
+
+-- | Create a new key-only fact in a 'NewFact' monad and return the
+-- corresponding Thrift structure which will have 'Just' the passed key.
+makeFact
+  :: forall p m. (Predicate p, ValueType p ~ (), NewFact m)
+  => KeyType p -> m p
+makeFact key = makeFactV key ()
+
+-- | Create a new key-only fact in a 'NewFact' monad.
+makeFact_
+  :: forall p m. (Predicate p, ValueType p ~ (), NewFact m)
+  => KeyType p -> m ()
+makeFact_ key = makeFactV_ @p key ()
+
+-- | A collection of facts which can be written to and then serialized.
+data Facts = Facts
+  { factsPredicates :: Predicates
+  , factsData :: FactSet
+  , factsOwnership :: IORef (HashMap Thrift.UnitName [Int64])
+  , factsDerivations :: IORef (HashMap Pid [([Fid],[Fid])])
+  }
+
+-- | Create a new empty collection of facts. New facts will be assigned
+-- ids >= start id if a start id is supplied; otherwise, they will be
+-- assigned ids which are guaranteed not to clash with any pids in the
+-- 'Predicates' map.
+newFacts
+  :: Predicates -- ^ pid map
+  -> Maybe Fid -- ^ start id
+  -> IO Facts
+newFacts ps start =
+  Facts ps
+    <$> FactSet.new (fromMaybe lowestFid start)
+    <*> newIORef HashMap.empty
+    <*> newIORef HashMap.empty
+
+-- | Serialize the facts into a batch which can be sent via Thrift.
+serializeFacts :: Facts -> IO Thrift.Batch
+serializeFacts Facts{..} = do
+  batch <- FactSet.serialize factsData
+  ownership <- readIORef factsOwnership
+  derivations <- readIORef factsDerivations
+  return batch
+    { Thrift.batch_owned = fmap Vector.fromList ownership
+    , Thrift.batch_dependencies = HashMap.fromList
+        [ (fromPid pid, map toFactDependencies deps)
+        | (pid, deps) <- HashMap.toList derivations ]
+    }
+  where
+    toFactDependencies :: ([Fid],[Fid]) -> Thrift.FactDependencies
+    toFactDependencies (deps, facts) =
+      Thrift.FactDependencies
+        (Vector.fromList (coerce facts))
+        (Vector.fromList (coerce deps))
+
+-- | Return a rough estimate of how much memory is used by the facts.
+factsMemory :: Facts -> IO Int
+factsMemory = FactSet.factMemory . factsData
+
+-- | A monad for creating fact batches.
+--
+-- We expose 'MonadFail' to avoid needing 'error'.
+--
+-- NOTE: This is very specifically not an instance of MonadIO or
+-- MonadTrans as we want to restrict side effects just to fact creation.
+newtype FactsM a = FactsM { runFactsM :: ReaderT Facts IO a }
+  deriving(Functor,Applicative,Monad,MonadFail)
+
+instance NewFact FactsM where
+  newFact key value = FactsM $ do
+    facts <- ask
+    lift $ withBuilder $ \builder -> do
+      buildRtsValue builder key
+      key_size <- sizeOfBuilder builder
+      buildRtsValue builder value
+      mk facts $ \pid -> IdOf <$> defineFact
+        (factsData facts)
+        (pidOf pid)
+        builder
+        key_size
+      where
+        mk :: Predicate p => Facts -> (PidOf p -> f (IdOf p)) -> f (IdOf p)
+        mk facts f = f $ getPid $ factsPredicates facts
+
+  withUnit unit build = FactsM $ do
+    Facts{..} <- ask
+    firstId <- liftIO $ firstFreeId factsData
+    a <- runFactsM build
+    lastId <- liftIO $ firstFreeId factsData
+    when (lastId > firstId) $ liftIO $
+      modifyIORef' factsOwnership $
+        HashMap.insertWith (++) unit
+          [fromFid firstId, fromFid lastId - 1]
+    return a
+
+  derivedFrom :: forall p. Predicate p => [Fid] -> [p] -> FactsM ()
+  derivedFrom deps facts = FactsM $ do
+    Facts{..} <- ask
+    let pid = pidOf (getPid factsPredicates :: PidOf p)
+    liftIO $ modifyIORef' factsDerivations $
+        HashMap.insertWith (<>) pid [(deps, map (idOf . getId) facts)]
+
+-- | A fact builder
+type FactBuilder = forall m. NewFact m => m ()
+
+-- | Run a fact builder to produce facts based on the supplied
+-- 'Predicates' map. The facts will be assigned ids >= start id if a
+-- start id is supplied; otherwise, they will be assigned ids which are
+-- guaranteed not to clash with any pids in the 'Predicates' map.
+buildFacts
+  :: Predicates -- ^ pid map
+  -> Maybe Fid -- ^ start id
+  -> FactBuilder -- ^ builder
+  -> IO Facts
+buildFacts ps start builder = do
+  facts <- newFacts ps start
+  runReaderT (runFactsM builder) facts
+  return facts
+
+extendFacts :: Facts -> FactBuilder -> IO ()
+extendFacts facts builder = runReaderT (runFactsM builder) facts
+
+-- | Run a fact builder and produce a batch of facts based on
+-- the supplied 'Predicates' map. The facts will be assigned
+-- ids >= start id if a start id is supplied; otherwise, they will be
+-- assigned ids which are guaranteed not to clash with any pids in the
+-- 'Predicates' map.
+buildBatch
+  :: Predicates -- ^ pid map
+  -> Maybe Fid -- ^ start id
+  -> FactBuilder -- ^ builder
+  -> IO Thrift.Batch
+buildBatch ps start builder =
+  serializeFacts =<< buildFacts ps start builder
diff --git a/glean/typed/Glean/Typed/Fact.hs b/glean/typed/Glean/Typed/Fact.hs
new file mode 100644
--- /dev/null
+++ b/glean/typed/Glean/Typed/Fact.hs
@@ -0,0 +1,66 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module Glean.Typed.Fact
+  ( decodeFact
+  , decodeRef
+  ) where
+
+import Control.Exception
+import Control.Monad.IO.Class
+import Data.Dynamic
+import qualified Data.IntMap as IntMap
+import Data.IORef
+import Data.IntMap (IntMap)
+
+import Glean.Typed.Build
+import Glean.Typed.Binary
+import Glean.Typed.Id
+import Glean.Typed.Predicate
+import Glean.Types as Thrift
+
+-- | Decode a serialized fact, possibly with nested facts
+decodeFact
+  :: (Predicate p, MonadIO m)
+  => IntMap Thrift.Fact               -- ^ serialized nested facts
+  -> IORef (IntMap Dynamic)           -- ^ cached deserialized facts
+  -> IdOf p                           -- ^ Id of fact to decode
+  -> Thrift.Fact                      -- ^ fact to decode
+  -> m p
+{-# INLINE decodeFact #-}
+decodeFact serialized cache fid (Thrift.Fact _pid k v) = mkFact fid
+  <$> (Just <$> decodeWithCache serialized cache decodeRtsValue k)
+  <*> (Just <$> case constantRtsValue of
+    Just val -> return val
+    Nothing -> decodeWithCache serialized cache decodeRtsValue v)
+
+-- | Decode a fact reference inside a fact.
+--
+-- * If the nested fact is in the cache, then return it
+-- * If the serialized fact is available, we decode it and add it to the cache
+-- * Otherwise, we simply construct the empty fact with 'justId'.
+--
+decodeRef
+  :: forall p. (Predicate p, Typeable p)
+  => Decoder p
+decodeRef = Decoder $ \env@DecoderEnv{..} -> do
+  (fid :: IdOf p) <- runDecoder decodeRtsValue env
+  cache <- liftIO $ readIORef cacheRef
+  let id = fromIntegral (fromFid (idOf fid))
+  case IntMap.lookup id cache of
+    Just dyn
+      | Just p <- fromDynamic dyn -> return p
+      | otherwise -> liftIO $ throwIO $ ErrorCall "decodeRef: wrong type"
+    Nothing -> do
+      case IntMap.lookup id serialized of
+        Nothing -> return (justId fid)
+        Just fact -> do
+          f <- decodeFact serialized cacheRef fid fact
+          liftIO $ modifyIORef' cacheRef $ \cache ->
+            IntMap.insert id (toDyn f) cache
+          return f
diff --git a/glean/typed/Glean/Typed/Id.hs b/glean/typed/Glean/Typed/Id.hs
new file mode 100644
--- /dev/null
+++ b/glean/typed/Glean/Typed/Id.hs
@@ -0,0 +1,41 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+-- Note: UnboxedTuples needed for deriving Prim
+{-# LANGUAGE GeneralizedNewtypeDeriving, UnboxedTuples #-}
+  -- | This does not import Glean modules at all
+module Glean.Typed.Id
+  ( -- * Id-like
+    Pid(..), Fid(..)
+  , PidOf(..), IdOf(..)
+) where
+
+import Control.DeepSeq
+import Data.Hashable (Hashable)
+import Compat.Prettyprinter (Pretty(..))
+import Data.Vector.Primitive (Prim)
+import Foreign.Storable (Storable)
+
+import Glean.RTS.Types
+
+-- -----------------------------------------------------------------------------
+
+-- | Tie the Pid to a predicate phantom type 'p'.
+newtype PidOf p = PidOf { pidOf :: Pid }
+  deriving(Eq, Ord, Show)
+
+instance Pretty (PidOf p) where
+  pretty (PidOf p) = pretty p
+
+-- | Id of a fact of a given predicate type 'p' (phantom type parameter).
+-- Note: This is not the Id/Fid/Pid of the definition of predicate 'p'.
+newtype IdOf p = IdOf { idOf :: Fid }
+  deriving(Eq, Ord, Show, Hashable, NFData, Storable, Prim)
+
+instance Pretty (IdOf p) where
+  pretty (IdOf f) = pretty f
diff --git a/glean/typed/Glean/Typed/Predicate.hs b/glean/typed/Glean/Typed/Predicate.hs
new file mode 100644
--- /dev/null
+++ b/glean/typed/Glean/Typed/Predicate.hs
@@ -0,0 +1,156 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+{-# LANGUAGE TypeApplications #-}
+
+-- | Support for working with Thrift-generated predicate types
+module Glean.Typed.Predicate
+  ( -- * class Predicate
+    Predicate(..)
+  , justId
+  , predicateRef
+  , predicateSourceType
+    -- * Lookup PidOf
+  , HasPredicates(..)
+    -- ** exception
+  , MissingPredicate(..), throwMissingPredicate
+    -- * Vector Predicates
+  , Predicates, SchemaPredicates, makePredicates
+  ) where
+
+import Control.Concurrent
+import Control.Exception
+import Data.HashMap.Strict (HashMap)
+import qualified Data.HashMap.Strict as HashMap
+import Data.IORef
+import qualified Data.Map as Map
+import Data.Proxy
+import Data.Text (Text)
+import Data.Vector.Primitive (Vector)
+import qualified Data.Vector.Primitive as Vector
+import System.IO.Unsafe
+import TextShow
+
+import Glean.RTS.Types (invalidPid)
+import qualified Glean.Schema.Util as Angle
+import Glean.Types (PredicateRef(..), SchemaInfo(..))
+import Glean.Typed.Binary
+import Glean.Typed.Id
+import qualified Glean.Angle.Types as Angle
+
+-- -----------------------------------------------------------------------------
+
+-- | 'Predicate' provides information about the schema's data structures,
+-- and convenience functions.
+--
+-- * Types
+--     * @'KeyType' Foo@ : the generated type (often @Foo_key*) that
+--       stores the predicate's fields.
+--     * @'ValueType' Foo@ : the generated values type, defaults to @()@.
+-- * Methods
+--     * @'getName' Foo@ : the @glean.thrift@ derived 'PredicateRef' holding
+--       the Text name and Int version of the predicate.
+--     * @'getIndex' Foo@ : internal use, index into all schema predicate list.
+--       Used to efficiently lookup @'T.PidOf' p@ for a particular repo.
+--
+-- Superclass constraint of 'BT.Type' ensures this can be serialized into
+-- the underlying binary format.
+
+class (Type p, Type (KeyType p), Type (ValueType p)) => Predicate p where
+  type KeyType p
+  type ValueType p
+  type ValueType p = ()
+  getName :: proxy p -> PredicateRef
+  mkFact :: IdOf p -> Maybe (KeyType p) -> Maybe (ValueType p) -> p
+  getId :: p -> IdOf p
+  getFactKey :: p -> Maybe (KeyType p)
+  getFactValue :: p -> Maybe (ValueType p)
+
+  -- A unique integer per predicate, used for fast lookup of Pids when
+  -- writing facts.
+  getIndex :: proxy p -> PredicateIndex
+  getIndex = const (predicateIndex (getName (Proxy :: Proxy p)))
+    -- this should be computed once and cached per predicate type
+
+-- | Retrieve the Angle representation of the type
+predicateSourceType :: Predicate p => Proxy p -> Angle.SourceType' ()
+predicateSourceType proxy =
+  Angle.PredicateTy () (Angle.convertRef (getName proxy))
+
+justId :: Predicate p => IdOf p -> p
+justId x = mkFact x Nothing Nothing
+
+newtype MissingPredicate = MissingPredicate PredicateRef deriving(Show)
+instance Exception MissingPredicate
+
+-- | Useful error for 'getPid' in 'HasPredicates'
+throwMissingPredicate :: forall p. Predicate p => PidOf p
+throwMissingPredicate = throw $ MissingPredicate $ getName (Proxy :: Proxy p)
+
+-- | An index into the Predicates vector. Used when writing facts only.
+type PredicateIndex = Int
+
+newtype Predicates = Predicates (Vector Pid)
+  -- invalidPid for predicates missing from the schema
+
+-- | Class of values 'a' that have definitions for any predicate 'p'
+class HasPredicates a where
+  getPid :: Predicate p => a -> PidOf p
+
+instance HasPredicates Predicates where
+  getPid = get
+    where
+      get :: forall p. Predicate p => Predicates -> PidOf p
+      get (Predicates pids)
+        | pid /= invalidPid = PidOf pid
+        | otherwise = throw $ MissingPredicate $ getName (Proxy :: Proxy p)
+        where
+          index = getIndex (Proxy :: Proxy p)
+          pid = if index < Vector.length pids
+            then pids Vector.! index
+            else invalidPid
+
+-- | The type of @allPredicates@ generated for each schema. To get this,
+-- import the generated module for the schema, e.g. @Glean.Schema.Src@.
+type SchemaPredicates = [PredicateRef]
+
+predicateIndex :: PredicateRef -> Int
+predicateIndex ref =
+  unsafeDupablePerformIO $ do
+    modifyMVar predicateIndices $ \hm ->
+      case HashMap.lookup ref hm of
+        Nothing -> do
+          n <- atomicModifyIORef' predicateNextIndex (\x -> (x+1, x+1))
+          return (HashMap.insert ref n hm, n)
+        Just n -> return (hm, n)
+
+{-# NOINLINE predicateIndices #-}
+predicateIndices :: MVar (HashMap PredicateRef Int)
+predicateIndices = unsafePerformIO $ newMVar HashMap.empty
+
+{-# NOINLINE predicateNextIndex #-}
+predicateNextIndex :: IORef Int
+predicateNextIndex = unsafePerformIO $ newIORef 0
+
+makePredicates :: [SchemaPredicates] -> SchemaInfo -> Predicates
+makePredicates schemas info = Predicates $
+  (Vector.//) (Vector.replicate (maxIx+1) invalidPid) assocs
+  where
+    maxIx = maximum $ map fst assocs
+    assocs =
+      [ (predicateIndex ref, HashMap.lookupDefault invalidPid ref ref_ids)
+      | ref <- concat schemas
+      ]
+    ref_ids = HashMap.fromList
+      [(ref, Pid id) | (id,ref) <- Map.toList $ schemaInfo_predicateIds info]
+
+-- | Convert a predicate type to a versioned predicate name. This is
+-- useful for building Angle queries that refer to specific versions.
+predicateRef :: forall p proxy . Predicate p => proxy p -> Text
+predicateRef _ = name <> "." <> showt version
+  where !(PredicateRef name version) = getName (Proxy @p)
diff --git a/glean/typed/Glean/Typed/Prim.hs b/glean/typed/Glean/Typed/Prim.hs
new file mode 100644
--- /dev/null
+++ b/glean/typed/Glean/Typed/Prim.hs
@@ -0,0 +1,24 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+
+-- | Support for base types
+module Glean.Typed.Prim
+  ( fromNat, toNat,
+  ) where
+
+import Data.Word
+
+import Glean.Types
+
+
+fromNat :: Nat -> Word64
+fromNat = fromIntegral . unNat
+
+toNat :: Word64 -> Nat
+toNat = Nat . fromIntegral
diff --git a/glean/util/Glean/Impl/MemoryReader.hs b/glean/util/Glean/Impl/MemoryReader.hs
new file mode 100644
--- /dev/null
+++ b/glean/util/Glean/Impl/MemoryReader.hs
@@ -0,0 +1,16 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module Glean.Impl.MemoryReader
+  (totalMemCapacityKB
+  ) where
+
+-- template for open source build
+-- not implemented yet
+totalMemCapacityKB :: IO (Maybe Int)
+totalMemCapacityKB = return Nothing
diff --git a/glean/util/Glean/Impl/ThriftService.hs b/glean/util/Glean/Impl/ThriftService.hs
--- a/glean/util/Glean/Impl/ThriftService.hs
+++ b/glean/util/Glean/Impl/ThriftService.hs
@@ -33,7 +33,7 @@
 deriving instance Show (ThriftService p)
 
 instance IsThriftService ThriftService where
-  mkThriftService (HostPort h p) ThriftServiceOptions{..} = ThriftService
+  mkThriftService (HostPort h p) ThriftServiceOptions{..} = Just $ ThriftService
     { headerConfig = headerConfig
     }
     where
@@ -46,7 +46,7 @@
       , headerSendTimeout = timeout
       , headerRecvTimeout = timeout
       }
-  mkThriftService _ _ = error "basic-thriftservice does not support Tier"
+  mkThriftService _ _ = Nothing
 
   thriftServiceWithDbShard t _ = t  -- shards are irrelevant if we have host/port
 
@@ -73,6 +73,11 @@
 
 #else /* !FBTHRIFT */
 
+import Data.Text (Text)
+import qualified Data.Text as Text
+import Network.URI (URI(..), URIAuth(..), parseURI)
+import Text.Read (readMaybe)
+
 import Thrift.Channel.HTTP
 import Thrift.Protocol.Id
 
@@ -83,19 +88,37 @@
 
 deriving instance Show (ThriftService p)
 
+baseHttpConfig :: Text -> Int -> ThriftServiceOptions -> HTTPConfig p
+baseHttpConfig host port ThriftServiceOptions{..} = HTTPConfig
+  { httpHost = Text.encodeUtf8 host
+  , httpPort = port
+  , httpProtocolId = compactProtocolId
+  , httpUseHttps = False
+  , httpResponseTimeout =
+      Just $ round (fromMaybe 30 processingTimeout * 1000000)
+  }
+
 instance IsThriftService ThriftService where
-  mkThriftService (HostPort h p) ThriftServiceOptions{..} = ThriftService
-    { httpConfig = httpConfig
+  mkThriftService (HostPort h p) serviceOpts = Just $ ThriftService
+    { httpConfig = baseHttpConfig h (fromIntegral p) serviceOpts
     }
-    where
-    httpConfig = HTTPConfig
-      { httpHost = Text.encodeUtf8 h
-      , httpPort = fromIntegral p
-      , httpProtocolId = compactProtocolId
-      , httpResponseTimeout =
-          Just $ round (fromMaybe 30 processingTimeout * 1000000)
+  mkThriftService (Uri u_) serviceOpts
+    | Just u <- parseURI (Text.unpack u_)
+    , Just auth <- uriAuthority u
+    , uriScheme u `elem` ["http:", "https:"]
+    , Just port <- parsePort (uriScheme u) (uriPort auth)
+    = Just $ ThriftService
+      { httpConfig = (baseHttpConfig (Text.pack $ uriRegName auth) port serviceOpts)
+        { httpUseHttps = uriScheme u == "https:"
+        }
       }
-  mkThriftService _ _ = error "basic-thriftservice does not support Tier"
+    where
+    parsePort :: String -> String -> Maybe Int
+    parsePort scheme port
+      | null port = Just $ if scheme == "https:" then 443 else 80
+      | otherwise = readMaybe (drop 1 port) -- port has an initial ':'
+
+  mkThriftService _ _ = Nothing
 
   thriftServiceWithDbShard t _ = t
     -- shards are irrelevant if we have host/port
diff --git a/glean/util/Glean/Util/Service.hs b/glean/util/Glean/Util/Service.hs
--- a/glean/util/Glean/Util/Service.hs
+++ b/glean/util/Glean/Util/Service.hs
@@ -11,7 +11,7 @@
 
 module Glean.Util.Service
   ( -- * Service specification
-    Service(Tier, HostPort)
+    Service(Tier, HostPort, Uri)
   , serviceToString, serviceTier
     -- ** Aliases
   , HostName, PortNumber
@@ -24,6 +24,7 @@
 import Data.String (IsString(..))
 import Data.Text (Text)
 import qualified Data.Text as Text
+import Network.URI (parseURI)
 
 type HostName = Text
 type PortNumber = Int
@@ -35,20 +36,26 @@
 pattern HostPort :: Text -> Int32 -> Service
 pattern HostPort h p = Service_hostPort (Service.HostPort h p)
 
+pattern Uri :: Text -> Service
+pattern Uri x = Service_uri x
+
 -- could move this to be attached to the Thrift file to avoid the orphan
 instance IsString Service where
   fromString s
     | (rev_port, ':':rev_host) <- break (==':') $ reverse s
     , [(port,"")] <- reads $ reverse rev_port =
       HostPort (Text.pack (reverse rev_host)) port
+    | Just _uri <- parseURI s = Uri (Text.pack s)
     | otherwise = Tier (Text.pack s)
 
 serviceToString :: Service -> String
 serviceToString (HostPort h p) = Text.unpack h ++ ":" ++ show p
 serviceToString (Tier s) = Text.unpack s
+serviceToString (Uri s) = Text.unpack s
 serviceToString _ = error "serviceToString" -- pattern synonyms :(
 
 serviceTier :: Service -> Text
 serviceTier HostPort{} = ""
 serviceTier (Tier s) = s
-serviceTier _ = error "serviceToString" -- pattern synonyms :(
+serviceTier (Uri _s) = ""
+serviceTier _ = error "serviceTier" -- pattern synonyms :(
diff --git a/glean/util/Glean/Util/ThriftService.hs b/glean/util/Glean/Util/ThriftService.hs
--- a/glean/util/Glean/Util/ThriftService.hs
+++ b/glean/util/Glean/Util/ThriftService.hs
@@ -37,13 +37,14 @@
 
 -- | A Thrift service that can be called
 class IsThriftService t where
-  mkThriftService :: Service -> ThriftServiceOptions -> t s
+  -- | Nothing means this Service is not supported.
+  mkThriftService :: Service -> ThriftServiceOptions -> Maybe (t s)
   -- | Request a node with a specific Db
   thriftServiceWithDbShard :: t s -> Maybe DbShard -> t s
   runThrift :: EventBaseDataplane -> t s -> Thrift s a -> IO a
   getSelection :: EventBaseDataplane -> t s -> Int -> IO [(HostName,PortNumber)]
 
-thriftService :: IsThriftService t => Service -> t s
+thriftService :: IsThriftService t => Service -> Maybe (t s)
 thriftService svc = mkThriftService svc def
 
 runThriftInefficiently :: IsThriftService t => t s -> Thrift s a -> IO a
diff --git a/glean/write/Glean/Write/Async.hs b/glean/write/Glean/Write/Async.hs
new file mode 100644
--- /dev/null
+++ b/glean/write/Glean/Write/Async.hs
@@ -0,0 +1,271 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module Glean.Write.Async (
+  Sender, SendQueueSettings(..), SendQueueEvent(..), withSender,
+  senderQueue,
+  Writer, WriterSettings(..), WriterEvent(..),
+  withWriter, withWriters, writeFacts,
+  withBatchWriter,
+  basicWriter
+) where
+
+import Control.Applicative
+import Control.Concurrent.Async
+import Control.Concurrent.MVar
+import Control.Exception
+import Control.Monad
+import Data.Default
+import Data.Maybe
+
+import Util.STM
+import Util.Time
+
+import Glean.Backend.Types (Backend)
+import qualified Glean.Backend.Types as Backend
+import Glean.RTS as RTS
+import Glean.Typed.BuildFact
+import Glean.Typed.Predicate
+import qualified Glean.Types as Thrift
+import Glean.Write.SendQueue
+import Glean.Util.Some
+
+
+-- | An asynchronous batch sender. Can be interacted with via a 'Writer'.
+data Sender = Sender
+  { senderQueue :: SendQueue
+  , senderPredicates :: Predicates
+  , senderBackend :: Some Backend
+  , senderRepo :: Thrift.Repo
+  }
+
+instance HasPredicates Sender where
+  getPid = getPid . senderPredicates
+
+-- | Create an asynchronous 'Sender', run an action and wait until the sender
+-- finished sending all batches. The 'Sender' is only usable within the action
+-- but is thread safe. Any communication errors will be raised as exceptions.
+--
+-- A 'Sender' wraps a 'SendQueue', so 'withSender' takes
+-- 'SendQueueSettings' to manage its behaviour.
+withSender
+  :: (Backend be)
+  => be
+  -> Thrift.Repo
+  -> [SchemaPredicates]
+  -> SendQueueSettings
+  -> (Sender -> IO a)
+  -> IO a
+withSender backend repo proxy settings action = do
+  predicates <- Backend.loadPredicates backend repo proxy
+  withSendQueue backend repo settings $ \q ->
+    action Sender
+      { senderQueue = q
+      , senderPredicates = predicates
+      , senderBackend = Some backend
+      , senderRepo = repo
+      }
+
+-- | An event that happens in a 'Writer' and can be logged
+data WriterEvent
+  =
+    -- | Writer is pushing a patch to the sender
+    WriterPushing Thrift.Batch
+
+    -- | Writer is stalling due to the send queue being full
+  | WriterStalling
+
+    -- | Writer is resuming after having stalled previously
+  | WriterResuming
+      DiffTimePoints -- time spent stalled
+
+-- | 'Writer' settings
+data WriterSettings = WriterSettings
+  { -- | Maximum size of a batch the write can accumulate before pushing it
+    -- to the 'Sender' (soft limit)
+    writerMaxSize :: !Int
+
+    -- | Function called whenever a 'WriterEvent' occurs
+  , writerLog :: WriterEvent -> IO ()
+  }
+
+instance Show WriterSettings where
+  show _ = "WriterSettings{}"
+
+instance Default WriterSettings where
+  def = WriterSettings
+    { writerMaxSize = 30000000
+    , writerLog = const $ return ()
+    }
+
+-- | An asynchronous writer. It accumulates facts (via 'writeFacts') into
+-- batches and pushes those batches to the underlying 'Sender' when they reach
+-- a certain size.  Alternatively, the 'WriterContext' holds the 'Predicates'
+-- and 'withBatchWriter' produces a single 'Batch' for regression testing.
+--
+-- NOTE: Writers serialise all writes - if you want to produce facts in
+-- parallel, use multiple writers.
+data Writer = Writer
+  { writerPredicates :: !Predicates
+  , writerSender :: Maybe Sender
+  , writerFirstId :: !Fid
+  , writerFacts :: !(MVar Facts)
+  , writerSettings :: WriterSettings
+  }
+
+instance HasPredicates Writer where
+  getPid = getPid . writerPredicates
+
+newWriter :: Sender -> WriterSettings -> IO Writer
+newWriter s settings = do
+  Thrift.FactIdRange { factIdRange_finish = finish } <-
+    Backend.factIdRange (senderBackend s) (senderRepo s)
+  let first_id = Fid finish
+  v <- newMVar =<< newFacts (senderPredicates s) (Just first_id)
+  return Writer
+    { writerPredicates = senderPredicates s
+    , writerSender = Just s
+    , writerFirstId = first_id
+    , writerFacts = v
+    , writerSettings = settings
+    }
+
+newWriterFromPredicates :: Predicates -> Fid -> WriterSettings -> IO Writer
+newWriterFromPredicates ps firstId settings = do
+  v <- newMVar =<< newFacts ps (Just firstId)
+  return Writer
+    { writerPredicates = ps
+    , writerSender = Nothing
+    , writerFirstId = firstId
+    , writerFacts = v
+    , writerSettings = settings
+    }
+
+-- Helper type for the @action@ passed to 'maybeFlush'
+data MaybeFlush = DoNotFlushFacts | FlushFacts
+  deriving (Eq)
+
+flushWriter :: Writer -> Callback -> IO ()
+flushWriter w callback = maybeFlush w callback $ const $ return FlushFacts
+
+-- | Create a new 'Writer' based on the given 'Sender'. The facts created
+-- by the 'Writer' will have fact ids which are guaranteed not to clash with
+-- any facts already in the database at the point the 'Writer' is created. At
+-- the end, the function will wait until all batches have been delivered to
+-- and acknowledged by the server. This means that any subsequent queries will
+-- return the facts produced by the 'Writer'.
+withWriter :: Sender -> WriterSettings -> (Writer -> IO a) -> IO a
+withWriter s settings action = do
+  w <- newWriter s settings
+  result <- action w
+  done <- newEmptyTMVarIO
+  flushWriter w (void . tryPutTMVar done)
+  r <- atomically $ readTMVar done
+  case r of
+    Right _subst -> return result
+    Left exc -> throwIO exc
+
+-- | Create many Writers for writing to a sender in parallel. Use this
+-- instead of `withMany withWriter`, because it will flush the writers
+-- in parallel rather than sequentially at the end.
+withWriters :: Sender -> WriterSettings -> Int -> ([Writer] -> IO a) -> IO a
+withWriters  s settings n action = do
+  ws <- replicateM n $ newWriter s settings
+  result <- action ws
+  forConcurrently_ ws $ \w -> do
+    done <- newEmptyTMVarIO
+    flushWriter w (void . tryPutTMVar done)
+    r <- atomically $ readTMVar done
+    case r of
+      Right _subst -> return ()
+      Left exc -> throwIO exc
+  return result
+
+-- | Create a new 'Writer' for regression testing.  This accumulates into
+-- a single 'Facts' and produces a single 'Batch' without sending to a backend.
+withBatchWriter
+  :: (Backend be)
+  => be
+  -> Thrift.SchemaId
+  -> Maybe Fid
+    --  ^ starting fact ID to create. If the batch will be added to an
+    -- existing DB and the indexer will be creating facts that refer
+    -- to facts from the DB, this should be obtained by calling
+    -- 'firstFreeId' on the DB; otherwise it can be 'Nothing'.
+  -> WriterSettings
+  -> (Writer -> IO a)
+  -> IO (a, Thrift.Batch)
+withBatchWriter backend schemaId firstId settings action = do
+  ps <- Backend.loadPredicatesForSchema backend schemaId
+  w <- newWriterFromPredicates ps (fromMaybe lowestFid firstId) settings
+  result <- action w
+  facts <- takeMVar (writerFacts w)
+  batch <- serializeFacts facts
+  return (result, batch { Thrift.batch_schema_id = Just schemaId })
+
+-- | Write a bunch of facts to a 'Writer'. If the accumulated batch goes over
+-- the threshold (cf. 'writerMaxSize') the batch will be pushed to the 'Sender'.
+--
+-- Because 'FactBuilder' uses a forall so as not to expose 'IO' (or similar),
+-- fact ids created while running 'FactBuilder' are local to one call of
+-- 'writeFacts' and cannot be saved or reused later.
+writeFacts :: Writer -> FactBuilder -> IO ()
+writeFacts w builder = maybeFlush w (const $ return ()) $ \facts -> do
+  extendFacts facts builder
+  mem <- factsMemory facts
+  return $ if mem > writerMaxSize (writerSettings w)
+    then FlushFacts
+    else DoNotFlushFacts
+
+-- @'maybeFlush' w calback action@ without a 'Sender' is used merely
+-- runs the @action@ and @callback is ignored.
+--
+-- With a 'Sender' this checks 'MaybeFlush' and if the result is 'FlushFacts'
+-- will write to the 'Sender' queue and execute the @callback@ , and if the
+-- result is 'DoNotFlushFacts' the @callback@ is ignored.
+maybeFlush :: Writer -> Callback -> (Facts -> IO MaybeFlush) -> IO ()
+maybeFlush w callback action = modifyMVar_ (writerFacts w) $ \facts -> do
+  flush <- action facts
+  case writerSender w of
+    Just sender | flush == FlushFacts -> do
+      new_facts <- newFacts (writerPredicates w) (Just $ writerFirstId w)
+      batch <- addSchemaId sender <$> serializeFacts facts
+      writerLog (writerSettings w) $ WriterPushing batch
+      let write = writeSendQueue (senderQueue sender) batch callback
+      -- NOTE: Yes, we're intentionally blocking inside modifyMVar_
+      ok <- atomically $ (write >> return True) <|> return False
+      when (not ok) $ do
+        writerLog (writerSettings w) WriterStalling
+        start <- getTimePoint
+        atomically write
+        elapsed <- getElapsedTime start
+        writerLog (writerSettings w) $ WriterResuming elapsed
+      return new_facts
+
+    _ -> return facts
+
+-- If we add our schema ID to the batch, the server will check that it
+-- matches the DB's schema, so we can catch schema mismatches before
+-- we get (de)serialization errors.
+addSchemaId :: Sender -> Thrift.Batch -> Thrift.Batch
+addSchemaId Sender{..} batch =
+  batch { Thrift.batch_schema_id = Backend.schemaId senderBackend }
+
+-- | Write facts to a Repo using an asynchronous sender, with all the
+-- default settings.
+basicWriter
+  :: (Backend be)
+  => be
+  -> Thrift.Repo
+  -> [SchemaPredicates]
+  -> FactBuilder
+  -> IO ()
+basicWriter backend repo proxy builder =
+  withSender backend repo proxy def $ \sender ->
+  withWriter sender def $ \writer ->
+  writeFacts writer builder
diff --git a/glean/write/Glean/Write/Options.hs b/glean/write/Glean/Write/Options.hs
new file mode 100644
--- /dev/null
+++ b/glean/write/Glean/Write/Options.hs
@@ -0,0 +1,123 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+{-# LANGUAGE ApplicativeDo #-}
+
+module Glean.Write.Options
+  ( sendQueueOptions
+  , sendAndRebaseQueueOptions
+  , writerOptions
+  ) where
+
+import Control.Exception
+import qualified Data.ByteString as B
+import Data.Default (def)
+import qualified Options.Applicative as O
+import System.IO
+import Text.Printf
+
+import Thrift.Protocol.Compact
+import Util.Log
+
+import Glean.Write.Async (WriterSettings(..), WriterEvent(..))
+import Glean.Write.SendQueue (SendQueueSettings(..))
+import Glean.Write.SendAndRebaseQueue (SendAndRebaseQueueSettings(..))
+import Glean.Util.RetryChannelException
+
+
+sendQueueOptions :: O.Parser SendQueueSettings
+sendQueueOptions = do
+  sendQueueThreads <- O.option O.auto $
+    O.long "sender-threads"
+    <> O.metavar "N"
+    <> O.value 1
+    <> O.showDefault
+    <> O.help "number of concurrent sender threads"
+  sendQueueMaxMemory <- O.option O.auto $
+    O.long "max-send-queue-size"
+    <> O.metavar "N"
+    <> O.value 2000000000
+    <> O.showDefault
+    <> O.help "maximum size of send queue (in bytes)"
+  sendQueueMaxBatches <- O.option O.auto $
+    O.long "max-send-queue-batches"
+    <> O.metavar "N"
+    <> O.value 1024
+    <> O.showDefault
+    <> O.help "maximum number of batches in send queue"
+  sendQueueRetry <- fmap toRetryPolicy $ O.option O.auto $
+    O.long "send-retries"
+    <> O.metavar "N"
+    <> O.value 20
+    <> O.showDefault
+    <> O.help "number of retries"
+  return def
+    { sendQueueThreads
+    , sendQueueMaxMemory
+    , sendQueueMaxBatches
+    , sendQueueRetry
+    }
+  where
+  toRetryPolicy n = defaultRetryPolicy { maxRetries = n }
+
+
+sendAndRebaseQueueOptions :: O.Parser SendAndRebaseQueueSettings
+sendAndRebaseQueueOptions = do
+  sendAndRebaseQueueSendQueueSettings <- sendQueueOptions
+  sendAndRebaseQueueFactCacheSize <- O.option O.auto $
+    O.long "fact-cache-size"
+    <> O.metavar "N"
+    <> O.value 2000000000
+    <> O.showDefault
+    <> O.help "size of the cache for sent facts"
+  sendAndRebaseQueueFactBufferSize <- O.option O.auto $
+    O.long "fact-buffer-size"
+    <> O.metavar "N"
+    <> O.value (200*1000*1000)
+    <> O.showDefault
+    <> O.help "size of the buffer for unsent facts per sender"
+  return SendAndRebaseQueueSettings
+    { sendAndRebaseQueueSendQueueSettings
+    , sendAndRebaseQueueFactCacheSize
+    , sendAndRebaseQueueFactBufferSize
+    , sendAndRebaseQueueSenders =
+        sendQueueThreads sendAndRebaseQueueSendQueueSettings
+    , sendAndRebaseQueueAllowRemoteReferences = False
+    , sendAndRebaseQueueStats = Nothing
+    }
+
+
+writerOptions :: O.Parser WriterSettings
+writerOptions = do
+  writerMaxSize <- O.option O.auto $
+    O.long "max-batch-size"
+    <> O.metavar "N"
+    <> O.value 30000000
+    <> O.showDefault
+    <> O.help "maximum size of Thrift batch (in bytes)"
+  writerDump <- O.optional $ O.strOption $
+    O.long "dump-batches"
+    <> O.metavar "DIR"
+    <> O.help ("also dump all batches in binary format to DIR. " <>
+      "The files can be used with 'glean write --file-format=binary'")
+  return def
+    { writerMaxSize = writerMaxSize
+    , writerLog = logBatch writerDump
+    }
+  where
+    logBatch dump (WriterPushing batch)
+      | Just dir <- dump = do
+        let serialized = serializeCompact batch
+        bracket
+          (openTempFile dir "batch.bin")
+          (hClose . snd)
+          $ \(f,h) -> do
+            logInfo $ printf "dumping batch (%d bytes) to %s"
+              (B.length serialized) f
+            B.hPut h serialized
+    logBatch _ _ = return ()
diff --git a/glean/write/Glean/Write/SendAndRebaseQueue.hs b/glean/write/Glean/Write/SendAndRebaseQueue.hs
new file mode 100644
--- /dev/null
+++ b/glean/write/Glean/Write/SendAndRebaseQueue.hs
@@ -0,0 +1,442 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module Glean.Write.SendAndRebaseQueue
+  ( SendAndRebaseQueueSettings(..)
+  , SendAndRebaseQueue
+  , withSendAndRebaseQueue
+  , writeSendAndRebaseQueue
+  ) where
+
+import Control.Concurrent
+import Control.Exception
+import Control.Monad
+import qualified Data.ByteString as BS
+import Data.Word
+
+import Util.Log
+import Util.STM
+
+import Glean.Backend.Types (Backend)
+import Glean.FFI (release)
+import qualified Glean.Write.SendQueue as SendQueue
+import Glean.Write.SendQueue (SendQueue)
+import Glean.RTS.Constants (firstAnonId)
+import Glean.Write.Stats as Stats
+import Glean.RTS.Foreign.Define
+import Glean.RTS.Foreign.Ownership
+import Glean.RTS.Foreign.Stacked
+import qualified Glean.RTS.Foreign.Lookup as Lookup
+import qualified Glean.RTS.Foreign.LookupCache as LookupCache
+import Glean.RTS.Foreign.LookupCache (LookupCache, countFailuresAsMisses)
+import qualified Glean.RTS.Foreign.FactSet as FactSet
+import Glean.RTS.Foreign.FactSet (FactSet)
+import Glean.RTS.Foreign.Inventory (Inventory)
+import Glean.RTS.Foreign.Subst
+import Glean.RTS.Types (Fid(..))
+import Glean.Util.Metric
+import qualified Glean.Types as Thrift
+
+{-
+SendAndRebaseQueue
+------------------
+
+This is a queue for sending facts to a Glean server. It has a couple
+of advantages over using a raw SendQueue:
+
+* The queue avoids sending duplicate facts to the server by performing
+  some de-duplication before sending the data.
+
+* When the input is JSON, the facts are serialized as binary before
+  being sent to the server.
+
+De-duplication
+--------------
+
+De-duplication happens in two ways:
+
+1. Each batch is added to the current fact buffer, and de-duplicatd
+against the facts already in the buffer.
+
+2. The contents of the buffer are sent to the server asynchronously,
+and when the server responds with a substitution (mapping facts in the
+buffer to their real fact IDs) the queue places the renamed facts in a
+cache, which is used to de-duplicate new batches.
+
+Details
+-------
+
+The queue looks like this:
+
+  +-------+     +-------------+
+  | cache |     | fact buffer |
+  +-------+     +-------------+
+
+when a new batch is added (via writeSendAndRebaseQueue), it is added
+to the fact buffer:
+
+                              +---------------+
+                              |   new facts   |
+                              +---------------+
+                              |              /
+                              |   rebase    /
+                              |            /
+  +-------+     +-------------+-----------+
+  | cache |     | fact buffer | new facts |
+  +-------+     +-------------+-----------+
+
+when this happens, any facts in the new batch that duplicate facts in
+the cache or the existing fact buffer are removed.
+
+The fact buffer is sent to the server as a single batch:
+
+  +-------+     +-------------+
+  | cache |     | fact buffer |
+  +-------+     +------+------+
+                       |
+                       v
+                    server
+
+which will later respond with a substitution. When the server
+responds, we will have added more facts to the buffer, so the
+situation is now:
+
+  +-------+     +-------------+-----------+
+  | cache |     | fact buffer | new facts |
+  +-------+     +------+------+-----------+
+                       |
+                       v
+                    server
+
+The server's substitution maps facts in the buffer to their real fact
+IDs. At this point we rename the fact buffer using the substitution,
+and move those facts into the cache, leaving the fact buffer
+containing just the new facts:
+
+  +-------+-------------+    +-----------+
+  | cache | fact buffer |    | new facts |
+  +-------+-------------+    +-----------+
+
+The new facts are then sent to the server:
+
+  +-------+-------------+    +-----------+
+  | cache | fact buffer |    | new facts |
+  +-------+-------------+    +-----+-----+
+                                   |
+                                   v
+                                server
+
+so over time we build up a cache of facts from the server:
+essentially a cache of part of the DB, and use it to avoid sending
+facts that are already in the DB, thereby reducing the amount of data
+we send to the server.
+
+All of this is subject to limits:
+
+- sendAndRebaseQueueFactCacheSize: a limit on the size of the cache
+  (we drop old entries according to an eviction policy)
+
+- sendAndRebaseQueueFactBufferSize: A limit on the size of the fact
+  buffer (writers will wait for the server to respond if the buffer is
+  full)
+
+Threads and SendQueue
+---------------------
+
+The fact buffer is a bottleneck if multiple threads are writing
+simultaneously. To avoid that, we can have multiple fact buffers that
+share a cache: this is done by setting sendAndRebaseQueueThreads to a
+value higher than 1.
+
+SendAndRebaseQueue is built on top of SendQueue, which manages sending
+the individual batches to the server, retrying and resending as
+necessary. SendQueue is automatically configured to use the same
+number of sender threads as SendAndRebaseQueue, to parallelise the
+sending.
+-}
+
+
+-- | When the send operation fails or is completed this is called once.
+type Callback = Either SomeException () -> STM ()
+
+data WaitSubst
+  = WaitSubstNone
+  | WaitSubstError SomeException
+  | WaitSubstSuccess Thrift.Subst
+
+data Sender = Sender
+  { sId :: Integer
+  , sSubstVar :: TMVar WaitSubst
+  , sSent :: TVar Point
+    -- ^ Records the size and time the last batch was sent, for stats
+  , sFacts :: MVar (FactSet, [FactOwnership])
+    -- ^ [Ownership] is the ownership assignments for facts in the FactSet
+  , sCallbacks :: TQueue Callback
+  }
+
+data SendAndRebaseQueue = SendAndRebaseQueue
+  { srqSendQueue :: !SendQueue
+    -- ^ Underlying send queue
+
+  , srqSenders :: TQueue Sender
+    -- ^ Senders accumulate facts while waiting for a substitution
+
+  , srqInventory :: !Inventory
+    -- ^ Schema inventory (used for rebasing)
+
+  , srqFacts :: !LookupCache
+    -- ^ Cache the ids of facts stored on the server
+
+  , srqCacheStats :: !LookupCache.Stats
+    -- ^ Stats for the Lookup cache
+
+  , srqStats :: Maybe Stats
+    -- ^ How to report stats.
+
+  , srqFactBufferSize :: !Int
+    -- ^ Max size of fact buffer
+  }
+
+-- | Settings for a 'SendAndRebase'
+data SendAndRebaseQueueSettings = SendAndRebaseQueueSettings
+  { -- | Settings for the underlying send queue
+    sendAndRebaseQueueSendQueueSettings :: !SendQueue.SendQueueSettings
+
+    -- | Max memory that the fact cache should use
+  , sendAndRebaseQueueFactCacheSize :: !Int
+
+    -- | Max memory that the fact buffer should use (per sender). The
+    -- purpose of this limit is to prevent the buffer from growing
+    -- without bound if the server's write queue is full. When the
+    -- buffer exceeds this limit, writers will start waiting for the
+    -- server. Note that the limit is per sender.
+  , sendAndRebaseQueueFactBufferSize :: !Int
+
+    -- | Number of senders
+  , sendAndRebaseQueueSenders :: !Int
+
+    -- | Allow facts in the batch to make reference to facts in the remote
+    -- server that may not be in the local cache.
+  , sendAndRebaseQueueAllowRemoteReferences :: Bool
+
+    -- | How to log stats. Obatin this with 'Glean.Write.Stats.new'.
+  , sendAndRebaseQueueStats :: Maybe Stats
+  }
+
+-- | Add a new batch to the fact buffer, de-duplicating against the
+-- buffer and the cache.
+rebase
+  :: Inventory
+  -> Thrift.Batch
+  -> LookupCache
+  -> FactSet.FactSet
+  -> IO (FactSet.FactSet, FactOwnership)
+rebase inventory batch cache base = do
+  LookupCache.withCache Lookup.EmptyLookup cache LookupCache.FIFO $ \cache -> do
+    -- when there are multiple senders, the cache may have new facts since
+    -- we previously rebased, and it may contain fact IDs that overlap with
+    -- the current base. So we have to use a snapshot of the cache, restricted
+    -- to fact IDs less than the current base startingId.
+    first_id <- Lookup.startingId base
+    Lookup.withSnapshot cache first_id $ \snapshot -> do
+      factSet <- Lookup.firstFreeId base >>= FactSet.new
+      let define = snapshot `stacked` base `stacked` factSet
+      subst <- defineBatch define inventory batch DefineFlags
+        { trustRefs = True
+        , ignoreRedef = True  -- see Note [redefinition]
+        }
+      owned <- substOwnership subst $
+        FactOwnership $ Thrift.batch_owned batch
+      return (factSet, owned)
+
+{- Note [redefinition]
+
+Redefinition is when we have two facts A->B, C->D where A == C but B /= D.
+
+Normally this would be an error, and defineBatch rejects it with an
+error. But it can arise naturally here because when
+typechecking/rebasing A->B we may have used a different cache from
+when we typechecked/rebased C->D. So even though B and D may be
+semantically identical, they are literally different.
+
+It doesn't seem possible to ensure that we always use a consistent
+cache, so it's inevitable that benign fact redefinitions may
+occur. Therefore we ignore redefinitions in `defineBatch`.
+
+Note: this might mean that we are ignoring actual errors and silently
+picking one of the two facts if they really did differ. That's bad,
+but I don't see an alternative.
+
+-}
+
+-- | Send the current fact buffer to the server
+senderFlush :: SendAndRebaseQueue -> Sender -> IO ()
+senderFlush srq sender = modifyMVar_ (sFacts sender) $ \(facts, owned) -> do
+  factOnlyBatch <- FactSet.serialize facts
+  let batch = factOnlyBatch {
+        Thrift.batch_owned = ownershipUnits (unionOwnership owned) }
+  !size <- FactSet.factMemory facts
+  start <- beginTick (fromIntegral size)
+  atomically $ do
+    callbacks <- flushTQueue (sCallbacks sender)
+    SendQueue.writeSendQueue (srqSendQueue srq) batch $ \result -> do
+      case result of
+        Right subst -> putTMVar (sSubstVar sender) (WaitSubstSuccess subst)
+        Left e -> putTMVar (sSubstVar sender) (WaitSubstError e)
+      forM_ callbacks ($ void result)
+    writeTVar (sSent sender) start
+  return (facts, [])
+
+-- | If the server has returned a substutition, rebase the current
+-- fact buffer against it. Send the current fact buffer to the server,
+-- unless we're already waiting for a substitution.
+senderRebaseAndFlush :: Bool -> SendAndRebaseQueue -> Sender -> IO ()
+senderRebaseAndFlush wait srq sender = do
+  maybeSubst <- atomically $
+    if wait then
+      Just <$> takeTMVar (sSubstVar sender)
+    else
+      tryTakeTMVar (sSubstVar sender)
+  case maybeSubst of
+    Nothing -> do -- waiting on subst
+      log "Waiting on substitution from server"
+      return ()
+    Just (WaitSubstError e) -> do
+      log "Send failure"
+      atomically $ putTMVar (sSubstVar sender) (WaitSubstError e)
+      throwIO e
+    Just WaitSubstNone -> do -- first send
+      log "Sending first batch"
+      senderFlush srq sender
+    Just (WaitSubstSuccess thriftSubst) -> do -- got subst
+      log "Sending next batch"
+      handle (\(e :: SomeException) -> do
+          logError (show e)
+          atomically $ putTMVar (sSubstVar sender) (WaitSubstError e)
+          throwIO e) $
+        modifyMVar_ (sFacts sender) $ \(base,owned) ->
+          -- eagerly release the subst when we're done
+          bracket (deserialize thriftSubst) release $ \subst -> do
+            (newBase, newSubst) <-
+              FactSet.rebase (srqInventory srq) subst (srqFacts srq) base
+            newOwned <- mapM (substOwnership newSubst) owned
+            return (newBase, newOwned)
+      -- "Commit throughput" will be write throughput to the server
+      start <- readTVarIO (sSent sender)
+      statBump srq Stats.commitThroughput =<< endTick start
+      senderFlush srq sender
+    where log msg = vlog 1 $ "Sender " <> show (sId sender) <> ": " <> msg
+
+updateLookupCacheStats :: SendAndRebaseQueue -> IO ()
+updateLookupCacheStats SendAndRebaseQueue{..} =
+  forM_ srqStats $ \stats -> do
+    statValues <- LookupCache.readStatsAndResetCounters srqCacheStats
+    Stats.bump stats Stats.lookupCacheStats (countFailuresAsMisses statValues)
+
+statTick :: SendAndRebaseQueue -> Bump Tick -> Word64 -> IO a -> IO a
+statTick SendAndRebaseQueue{..} bump val act =
+  case srqStats of
+    Nothing -> act
+    Just stats -> Stats.tick stats bump val act
+
+statBump :: SendAndRebaseQueue -> Bump Tick -> Tick -> IO ()
+statBump SendAndRebaseQueue{..} bump val =
+  case srqStats of
+    Nothing -> return ()
+    Just stats -> Stats.bump stats bump val
+
+senderSendOrAppend
+  :: SendAndRebaseQueue
+  -> Sender
+  -> Thrift.Batch
+  -> Callback
+  -> Point
+  -> IO ()
+senderSendOrAppend srq sender batch callback latency = do
+  -- "Mutator latency" is the latency between calling writeSendAndRebaseQueue
+  -- and having a free Sender to write the batch.
+  statBump srq Stats.mutatorLatency =<< endTick latency
+  let !size = BS.length $ Thrift.batch_facts batch
+  newSize <-
+    -- "Mutator throughput" is how fast we are appending new facts
+    -- to the FactSet.
+    statTick srq Stats.mutatorThroughput (fromIntegral size) $ do
+      modifyMVar (sFacts sender) $ \(base, ownership) -> do
+        (facts, owned) <- rebase (srqInventory srq) batch (srqFacts srq) base
+        FactSet.append base facts
+        atomically $ writeTQueue (sCallbacks sender) callback
+        newSize <- FactSet.factMemory base
+        return ((base, owned : ownership), newSize)
+  updateLookupCacheStats srq
+  let !wait = newSize >= srqFactBufferSize srq
+  senderRebaseAndFlush wait srq sender
+
+withSendAndRebaseQueue
+  :: Backend e
+  => e
+  -> Thrift.Repo
+  -> Inventory
+  -> SendAndRebaseQueueSettings
+  -> (SendAndRebaseQueue -> IO a)
+  -> IO a
+withSendAndRebaseQueue backend repo inventory settings action = do
+  vlog 1 $ "Allow remote refs: " <> show sendAndRebaseQueueAllowRemoteReferences
+  SendQueue.withSendQueue backend repo sendAndRebaseQueueSendQueueSettings $
+    \sendQueue -> do
+      cacheStats <- LookupCache.newStats
+      let cacheSize = fromIntegral sendAndRebaseQueueFactCacheSize
+      srq <- SendAndRebaseQueue
+        <$> pure sendQueue
+        <*> newTQueueIO
+        <*> pure inventory
+        <*> LookupCache.new cacheSize 1 cacheStats
+        <*> pure cacheStats
+        <*> pure sendAndRebaseQueueStats
+        <*> pure sendAndRebaseQueueFactBufferSize
+      bracket_ (createSenderPool srq) (deleteSenderPool srq) $
+        action srq
+    where
+      SendAndRebaseQueueSettings{..} = settings
+      createSenderPool srq =
+        forM_ senderIds $ \i -> do
+          factset <- FactSet.new baseId
+          worker <- Sender i
+            <$> newTMVarIO WaitSubstNone
+            <*> newTVarIO (error "missing sSent")
+            <*> newMVar (factset, [])
+            <*> newTQueueIO
+          atomically $ writeTQueue (srqSenders srq) worker
+      deleteSenderPool srq =
+        forM_ senderIds $ \_i -> do
+          -- don't deadlock here in case we died leaving the queue empty
+          sender <- atomically $ tryReadTQueue (srqSenders srq)
+          forM_ sender $ senderRebaseAndFlush True srq
+      senderIds = take sendAndRebaseQueueSenders [1..]
+
+      baseId = if sendAndRebaseQueueAllowRemoteReferences
+        then firstLocalId
+        else Fid Thrift.fIRST_FREE_ID
+
+      -- Higher than Ids in the remote db to avoid remote fact references
+      -- from being mistaken for local fact references.
+      -- Lower than Ids in JSON batches to avoid references within the
+      -- batch from being mistaken for references to the local db.
+      firstLocalId = Fid (firstAnonId `div` 2)
+
+
+writeSendAndRebaseQueue
+  :: SendAndRebaseQueue
+  -> Thrift.Batch
+  -> Callback
+  -> IO ()
+writeSendAndRebaseQueue srq batch callback = do
+  point <- beginTick 1
+  bracket
+    (atomically $ readTQueue $ srqSenders srq)
+    (\sender -> atomically $ writeTQueue (srqSenders srq) sender)
+    (\sender -> senderSendOrAppend srq sender batch callback point)
diff --git a/glean/write/Glean/Write/SendQueue.hs b/glean/write/Glean/Write/SendQueue.hs
new file mode 100644
--- /dev/null
+++ b/glean/write/Glean/Write/SendQueue.hs
@@ -0,0 +1,365 @@
+{-
+  Copyright (c) Meta Platforms, Inc. and affiliates.
+  All rights reserved.
+
+  This source code is licensed under the BSD-style license found in the
+  LICENSE file in the root directory of this source tree.
+-}
+
+module Glean.Write.SendQueue
+  ( SendQueueSettings(..)
+  , SendQueueEvent(..)
+  , SendQueue
+  , Callback
+  , withSendQueue
+  , writeSendQueue
+  , writeSendQueueJson
+  , writeSendQueueDescriptor
+  ) where
+
+import qualified Control.Concurrent.Async as Async
+import Control.Exception
+import Control.Monad
+import qualified Data.ByteString as BS
+import Data.Default
+import System.Time.Extra (sleep)
+import Text.Printf (printf)
+
+import Util.Control.Exception (tryBracket)
+import Util.Log.String
+import Util.STM
+import Util.Time
+
+import Glean.Backend.Types (Backend)
+import Glean.Backend.Retry
+import qualified Glean.Backend.Types as Backend
+import qualified Glean.Types as Thrift
+import Glean.Write.SendBatch
+import Glean.Util.RetryChannelException
+
+
+-- | An event that happens in a 'SendQueue' and can be logged
+data SendQueueEvent
+  = -- | Started sending a batch
+    SendQueueSending Thrift.Batch
+
+    -- | Started sending a JSON batch
+  | SendQueueSendingJson [Thrift.JsonFactBatch]
+
+    -- | Started sending a batch descriptor
+  | SendQueueSendingDescriptor Thrift.BatchDescriptor
+
+    -- | Finished sending a batch
+  | SendQueueSent
+      Int -- batch size
+      DiffTimePoints -- time taken
+
+    -- | Finished sending all batches and shutting down
+  | SendQueueFinished
+
+    -- | Sending failed
+  | SendQueueFailed SomeException
+
+
+data QueueStatus
+  = Open
+  | Closed
+  | Failed SomeException
+
+-- | When the send operation fails or is completed this is called once.
+type Callback = Either SomeException Thrift.Subst -> STM ()
+
+-- | The GleanService can return a Handle for an async operation, and the
+-- client can later poll to determine the actual result/retry/error.
+data Wait = Wait
+  { waitHandle :: !Thrift.Handle  -- ^ handle from GleanService
+  , waitStart :: !TimePoint  -- ^ When this 'Wait' was constructed
+  , waitCallback :: !Callback  -- ^ use-once callback with result.
+  , waitOriginalBatch :: !Batch  -- ^ the batch, so we can resend it
+  }
+
+data Batch
+  = BinaryBatch Thrift.Batch
+  | JsonBatch !Int {- size -} [Thrift.JsonFactBatch]
+  | BatchDescriptor Thrift.BatchDescriptor
+
+batchSize :: Batch -> Int
+batchSize (BinaryBatch bin) = BS.length $ Thrift.batch_facts bin
+batchSize (JsonBatch sz _) = sz
+batchSize (BatchDescriptor _) = 0
+
+data SendQueue = SendQueue
+  { -- | Batches we haven't sent yet
+    sqOutQueue :: TQueue (Batch, Callback)
+
+    -- | Batches we've sent and are now waiting for the server to commit
+  , sqWaitQueue :: TQueue Wait
+
+    -- | Memory used by batches in sqOutQueue and sqWaitQueue
+  , sqMemory :: TVar Int
+
+    -- | Number of batches in flight (in sqOutQueue and sqWaitQueue)
+  , sqCount :: TVar Int
+
+    -- | Limit on sqMemory
+  , sqMaxMemory :: Int
+
+    -- | Limit on sqCount
+  , sqMaxCount :: Int
+
+    -- | Queue status
+  , sqStatus :: TVar QueueStatus
+  }
+
+data WriteQueueClosed = WriteQueueClosed deriving(Show)
+instance Exception WriteQueueClosed
+
+newSendQueue :: Int -> Int -> IO SendQueue
+newSendQueue max_mem max_count = SendQueue
+  <$> newTQueueIO
+  <*> newTQueueIO
+  <*> newTVarIO 0
+  <*> newTVarIO 0
+  <*> pure max_mem
+  <*> pure max_count
+  <*> newTVarIO Open
+
+releaseBatch :: SendQueue -> Int -> STM ()
+releaseBatch sq size = do
+  modifyTVar' (sqCount sq) $ \n -> n - 1
+  modifyTVar' (sqMemory sq) $ \n -> n - size
+
+acquireBatch :: SendQueue -> Int -> STM ()
+acquireBatch sq size = do
+  mem <- readTVar $ sqMemory sq
+  count <- readTVar $ sqCount sq
+  when (mem > sqMaxMemory sq || count > sqMaxCount sq) retry
+  writeTVar (sqMemory sq) $! mem + size
+  writeTVar (sqCount sq) $! count + 1
+
+writeSendQueue :: SendQueue -> Thrift.Batch -> Callback -> STM ()
+writeSendQueue sq batch callback =
+  writeSendQueue_ sq (BinaryBatch batch) callback
+
+writeSendQueueJson :: SendQueue -> [Thrift.JsonFactBatch] -> Callback -> STM ()
+writeSendQueueJson sq json callback =
+  writeSendQueue_ sq (JsonBatch size json) callback
+  where
+  -- size is approximate for JSON
+  size = sum (map jsonFactBatchSize json)
+  jsonFactBatchSize Thrift.JsonFactBatch{..} =
+    sum (map BS.length jsonFactBatch_facts) +
+    maybe 0 BS.length jsonFactBatch_unit
+
+writeSendQueueDescriptor
+  :: SendQueue
+  -> Thrift.BatchDescriptor
+  -> Callback
+  -> STM ()
+writeSendQueueDescriptor sq descriptor callback =
+  writeSendQueue_ sq (BatchDescriptor descriptor) callback
+
+writeSendQueue_ :: SendQueue -> Batch -> Callback -> STM ()
+writeSendQueue_ sq batch callback = do
+  status <- readTVar $ sqStatus sq
+  case status of
+    Open -> return ()
+    Closed -> throwSTM WriteQueueClosed
+    Failed exc -> throwSTM exc
+  let !size = batchSize batch
+  acquireBatch sq size
+  writeTQueue (sqOutQueue sq) (batch, callback)
+
+closeSendQueue :: SendQueue -> STM ()
+closeSendQueue sq = do
+  status <- readTVar $ sqStatus sq
+  case status of
+    Open -> writeTVar (sqStatus sq) Closed
+    Closed -> return ()
+    Failed exc -> throwSTM exc
+
+failSendQueue :: SendQueue -> SomeException -> STM ()
+failSendQueue sq exc = do
+  writeTVar (sqStatus sq) $ Failed exc
+  xs <- map waitCallback <$> flushTQueue (sqWaitQueue sq)
+  ys <- map snd <$> flushTQueue (sqOutQueue sq)
+  mapM_ ($ Left exc) (xs ++ ys)
+
+readSendQueue :: SendQueue -> STM (Maybe (Batch, Callback))
+readSendQueue sq = do
+  status <- readTVar $ sqStatus sq
+  case status of
+    Open -> get
+    Closed -> do
+      -- Don't exit the sendFromQueue until all batches are safely
+      -- written. We might have to resend batches if the server
+      -- forgets them.
+      count <- readTVar $ sqCount sq
+      if count /= 0 then get else return Nothing
+    Failed exc -> throwSTM exc
+  where
+    get = do
+      (batch, callback) <- readTQueue $ sqOutQueue sq
+      return $ Just (batch, callback)
+
+readWaitQueue :: SendQueue -> STM (Maybe Wait)
+readWaitQueue sq = do
+  status <- readTVar $ sqStatus sq
+  case status of
+    Open -> get
+    Closed -> do
+      -- NOTE: There can still be outstanding batches even if both queues are
+      -- empty - sendFromQueue might be writing one.
+      count <- readTVar $ sqCount sq
+      if count /= 0 then get else return Nothing
+    Failed exc -> throwSTM exc
+  where
+    get = Just <$> readTQueue (sqWaitQueue sq)
+
+pollFromWaitQueue
+  :: Backend.Backend e => e -> SendQueueSettings -> SendQueue -> IO ()
+pollFromWaitQueue backend settings sq = do
+  cont <- tryBracket
+    (atomically $ readWaitQueue sq)
+    (\r ex -> case (ex,r) of
+      (Left exc, Just wait) -> do
+        logWarning $ "Thread killed: " <> show exc
+        atomically $ do
+          waitCallback wait $ Left exc
+          failSendQueue sq exc
+        sendQueueLog settings $ SendQueueFailed exc
+      _ -> return ())
+    $ \r ->
+    case r of
+      Just Wait{..} -> do
+        result <- try $ waitBatch backend waitHandle
+        let !size = batchSize waitOriginalBatch
+        case result of
+          Left e@Thrift.UnknownBatchHandle{} -> do
+            logWarning $ "Server forgot batch; resending (" <> show e <> ")"
+            atomically $ do
+              -- don't writeSendQueue; retries should work even if the
+              -- queue is in the Closed state and shutting down
+              writeTQueue (sqOutQueue sq) (waitOriginalBatch, waitCallback)
+              return True
+          Right subst -> do
+            atomically $ do
+              waitCallback $ Right subst
+              releaseBatch sq size
+            elapsed <- getElapsedTime waitStart
+            sendQueueLog settings $ SendQueueSent size elapsed
+            return True
+
+      Nothing -> return False
+
+  when cont $ pollFromWaitQueue backend settings sq
+
+sendFromQueue
+  :: Backend.Backend e
+  => e
+  -> Thrift.Repo
+  -> SendQueueSettings
+  -> SendQueue
+  -> IO ()
+sendFromQueue backend repo settings sq = do
+  cont <- tryBracket
+    (atomically $ readSendQueue sq)
+    (\r ex -> case (ex,r) of
+      (Left exc, Just (_, callback)) -> do
+        logWarning $ "Thread killed: " <> show exc
+        atomically $ do
+          callback $ Left exc
+          failSendQueue sq exc
+        sendQueueLog settings $ SendQueueFailed exc
+      _ -> return ())
+    $ \r ->
+    case r of
+      Just (batch, callback) -> do
+        sendQueueLog settings $ case batch of
+          BinaryBatch bin -> SendQueueSending bin
+          JsonBatch _ json -> SendQueueSendingJson json
+          BatchDescriptor descriptor -> SendQueueSendingDescriptor descriptor
+        start <- getTimePoint
+        handle <- case batch of
+          BinaryBatch bin -> sendBatch backend repo bin True
+          JsonBatch _ json -> sendJsonBatch backend repo json Nothing True
+          BatchDescriptor descriptor
+            -> sendBatchDescriptor backend repo descriptor True
+        atomically $ writeTQueue (sqWaitQueue sq) Wait
+          { waitHandle = handle
+          , waitStart = start
+          , waitCallback = callback
+          , waitOriginalBatch = batch
+          }
+        return True
+
+      Nothing -> return False
+  when cont $ sendFromQueue backend repo settings sq
+
+-- | Settings for a 'SendQueue'
+data SendQueueSettings = SendQueueSettings
+  { -- | Max memory that the send queue should occupy (soft limit)
+    sendQueueMaxMemory :: !Int
+
+    -- | Max number of batches that the queue should hold
+  , sendQueueMaxBatches :: !Int
+
+    -- | Number of threads to use for sending
+  , sendQueueThreads :: !Int
+
+    -- | A function called whenever a 'SendQueueEvent' occurs
+  , sendQueueLog :: SendQueueEvent -> IO ()
+
+    -- | How to retry failures
+  , sendQueueRetry :: RetryPolicy
+
+    -- | Optionally log stats every 10s
+  , sendQueueLogStats :: Bool
+  }
+
+instance Show SendQueueSettings where
+  show _ = "SendQueueSettings{}"
+
+instance Default SendQueueSettings where
+  def = SendQueueSettings
+    { sendQueueMaxMemory = 1000000000
+    , sendQueueMaxBatches = 10000
+    , sendQueueThreads = 1
+    , sendQueueLog = const $ return ()
+    , sendQueueRetry = defaultRetryPolicy
+    , sendQueueLogStats = False
+    }
+
+withSendQueue
+  :: Backend e
+  => e
+  -> Thrift.Repo
+  -> SendQueueSettings
+  -> (SendQueue -> IO a)
+  -> IO a
+withSendQueue backend repo settings@SendQueueSettings{..} action =
+  mask $ \restore -> do
+    q <- newSendQueue sendQueueMaxMemory sendQueueMaxBatches
+    let retryBackend = backendRetryWrites backend sendQueueRetry
+    withStats sendQueueLogStats q $ do
+      snd <$> Async.concurrently
+        (Async.mapConcurrently_ id
+          $ restore (pollFromWaitQueue retryBackend settings q)
+          : replicate
+              sendQueueThreads
+              (restore (sendFromQueue retryBackend repo settings q)))
+        (restore (action q)
+          `finally` atomically (closeSendQueue q))
+
+withStats :: Bool -> SendQueue -> IO a -> IO a
+withStats on SendQueue{..} act = do
+  verbose <- vlogIsOn 1
+  if on || verbose
+    then Async.withAsync (forever $ logQueueStats >> sleep 10) $ \_ -> act
+    else act
+  where
+  logQueueStats = do
+    count <- readTVarIO sqCount
+    memory <- readTVarIO sqMemory
+    logInfo $ printf "count:%d/%d memory:%d/%d"
+      count sqMaxCount memory sqMaxMemory
diff --git a/thrift/annotation/gen-hs2/Facebook/Thrift/Annotation/Cpp/Cpp/Types.hs b/thrift/annotation/gen-hs2/Facebook/Thrift/Annotation/Cpp/Cpp/Types.hs
--- a/thrift/annotation/gen-hs2/Facebook/Thrift/Annotation/Cpp/Cpp/Types.hs
+++ b/thrift/annotation/gen-hs2/Facebook/Thrift/Annotation/Cpp/Cpp/Types.hs
@@ -32,14 +32,16 @@
         EnumType(EnumType, enumType_type), Frozen2Exclude(Frozen2Exclude),
         Frozen2RequiresCompleteContainerParams(Frozen2RequiresCompleteContainerParams),
         ProcessInEbThreadUnsafe(ProcessInEbThreadUnsafe),
-        RuntimeAnnotation(RuntimeAnnotation),
         UseCursorSerialization(UseCursorSerialization),
         GenerateDeprecatedHeaderClientMethods(GenerateDeprecatedHeaderClientMethods),
         AllowLegacyNonOptionalRef(AllowLegacyNonOptionalRef),
         DeprecatedTerseWrite(DeprecatedTerseWrite),
         AllowLegacyDeprecatedTerseWritesRef(AllowLegacyDeprecatedTerseWritesRef),
         EnableCustomTypeOrdering(EnableCustomTypeOrdering),
-        GenerateServiceMethodDecorator(GenerateServiceMethodDecorator))
+        GenerateServiceMethodDecorator(GenerateServiceMethodDecorator),
+        NonOrderable(NonOrderable),
+        DeclareHashSpecialization(DeclareHashSpecialization),
+        DeclareEqualToSpecialization(DeclareEqualToSpecialization))
        where
 import qualified Control.DeepSeq as DeepSeq
 import qualified Control.Exception as Exception
@@ -969,41 +971,6 @@
 instance Hashable.Hashable ProcessInEbThreadUnsafe where
   hashWithSalt __salt ProcessInEbThreadUnsafe = __salt
 
-data RuntimeAnnotation = RuntimeAnnotation{}
-                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
-
-instance Aeson.ToJSON RuntimeAnnotation where
-  toJSON RuntimeAnnotation = Aeson.object Prelude.mempty
-
-instance Thrift.ThriftStruct RuntimeAnnotation where
-  buildStruct _proxy RuntimeAnnotation = Thrift.genStruct _proxy []
-  parseStruct _proxy
-    = ST.runSTT
-        (do Prelude.return ()
-            let
-              _parse _lastId
-                = do _fieldBegin <- Trans.lift
-                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
-                     case _fieldBegin of
-                       Thrift.FieldBegin _type _id _bool -> do case _id of
-                                                                 _ -> Trans.lift
-                                                                        (Thrift.parseSkip _proxy
-                                                                           _type
-                                                                           (Prelude.Just _bool))
-                                                               _parse _id
-                       Thrift.FieldEnd -> do Prelude.pure (RuntimeAnnotation)
-              _idMap = HashMap.fromList []
-            _parse 0)
-
-instance DeepSeq.NFData RuntimeAnnotation where
-  rnf RuntimeAnnotation = ()
-
-instance Default.Default RuntimeAnnotation where
-  def = RuntimeAnnotation
-
-instance Hashable.Hashable RuntimeAnnotation where
-  hashWithSalt __salt RuntimeAnnotation = __salt
-
 data UseCursorSerialization = UseCursorSerialization{}
                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
 
@@ -1264,3 +1231,110 @@
 
 instance Hashable.Hashable GenerateServiceMethodDecorator where
   hashWithSalt __salt GenerateServiceMethodDecorator = __salt
+
+data NonOrderable = NonOrderable{}
+                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON NonOrderable where
+  toJSON NonOrderable = Aeson.object Prelude.mempty
+
+instance Thrift.ThriftStruct NonOrderable where
+  buildStruct _proxy NonOrderable = Thrift.genStruct _proxy []
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do Prelude.pure (NonOrderable)
+              _idMap = HashMap.fromList []
+            _parse 0)
+
+instance DeepSeq.NFData NonOrderable where
+  rnf NonOrderable = ()
+
+instance Default.Default NonOrderable where
+  def = NonOrderable
+
+instance Hashable.Hashable NonOrderable where
+  hashWithSalt __salt NonOrderable = __salt
+
+data DeclareHashSpecialization = DeclareHashSpecialization{}
+                                 deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON DeclareHashSpecialization where
+  toJSON DeclareHashSpecialization = Aeson.object Prelude.mempty
+
+instance Thrift.ThriftStruct DeclareHashSpecialization where
+  buildStruct _proxy DeclareHashSpecialization
+    = Thrift.genStruct _proxy []
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do Prelude.pure (DeclareHashSpecialization)
+              _idMap = HashMap.fromList []
+            _parse 0)
+
+instance DeepSeq.NFData DeclareHashSpecialization where
+  rnf DeclareHashSpecialization = ()
+
+instance Default.Default DeclareHashSpecialization where
+  def = DeclareHashSpecialization
+
+instance Hashable.Hashable DeclareHashSpecialization where
+  hashWithSalt __salt DeclareHashSpecialization = __salt
+
+data DeclareEqualToSpecialization = DeclareEqualToSpecialization{}
+                                    deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON DeclareEqualToSpecialization where
+  toJSON DeclareEqualToSpecialization = Aeson.object Prelude.mempty
+
+instance Thrift.ThriftStruct DeclareEqualToSpecialization where
+  buildStruct _proxy DeclareEqualToSpecialization
+    = Thrift.genStruct _proxy []
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do Prelude.pure (DeclareEqualToSpecialization)
+              _idMap = HashMap.fromList []
+            _parse 0)
+
+instance DeepSeq.NFData DeclareEqualToSpecialization where
+  rnf DeclareEqualToSpecialization = ()
+
+instance Default.Default DeclareEqualToSpecialization where
+  def = DeclareEqualToSpecialization
+
+instance Hashable.Hashable DeclareEqualToSpecialization where
+  hashWithSalt __salt DeclareEqualToSpecialization = __salt
diff --git a/thrift/annotation/gen-hs2/Facebook/Thrift/Annotation/Thrift/Thrift/Types.hs b/thrift/annotation/gen-hs2/Facebook/Thrift/Annotation/Thrift/Thrift/Types.hs
--- a/thrift/annotation/gen-hs2/Facebook/Thrift/Annotation/Thrift/Thrift/Types.hs
+++ b/thrift/annotation/gen-hs2/Facebook/Thrift/Annotation/Thrift/Thrift/Types.hs
@@ -25,11 +25,19 @@
         RpcPriority(RpcPriority_HIGH_IMPORTANT, RpcPriority_HIGH,
                     RpcPriority_IMPORTANT, RpcPriority_NORMAL, RpcPriority_BEST_EFFORT,
                     RpcPriority__UNKNOWN),
+        Sealed(Sealed),
         DeprecatedUnvalidatedAnnotations(DeprecatedUnvalidatedAnnotations,
                                          deprecatedUnvalidatedAnnotations_items),
         AllowReservedIdentifier(AllowReservedIdentifier),
         AllowReservedFilename(AllowReservedFilename),
-        RuntimeAnnotation(RuntimeAnnotation))
+        RuntimeAnnotation(RuntimeAnnotation),
+        AllowLegacyTypedefUri(AllowLegacyTypedefUri),
+        AllowUnsafeOptionalCustomDefaultValue(AllowUnsafeOptionalCustomDefaultValue),
+        AllowUnsafeUnionFieldCustomDefaultValue(AllowUnsafeUnionFieldCustomDefaultValue),
+        AllowUnsafeRequiredFieldQualifier(AllowUnsafeRequiredFieldQualifier),
+        AllowLegacyMissingUris(AllowLegacyMissingUris),
+        AllowUnsafeNonSealedKeyType(AllowUnsafeNonSealedKeyType),
+        Deprecated(Deprecated, deprecated_message))
        where
 import qualified Control.DeepSeq as DeepSeq
 import qualified Control.Exception as Exception
@@ -676,6 +684,41 @@
         ("toThriftEnumEither: not a valid identifier for enum RpcPriority: "
            ++ Prelude.show val)
 
+data Sealed = Sealed{}
+              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Sealed where
+  toJSON Sealed = Aeson.object Prelude.mempty
+
+instance Thrift.ThriftStruct Sealed where
+  buildStruct _proxy Sealed = Thrift.genStruct _proxy []
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do Prelude.pure (Sealed)
+              _idMap = HashMap.fromList []
+            _parse 0)
+
+instance DeepSeq.NFData Sealed where
+  rnf Sealed = ()
+
+instance Default.Default Sealed where
+  def = Sealed
+
+instance Hashable.Hashable Sealed where
+  hashWithSalt __salt Sealed = __salt
+
 newtype DeprecatedUnvalidatedAnnotations = DeprecatedUnvalidatedAnnotations{deprecatedUnvalidatedAnnotations_items
                                                                             ::
                                                                             Map.Map Text.Text
@@ -852,3 +895,289 @@
 
 instance Hashable.Hashable RuntimeAnnotation where
   hashWithSalt __salt RuntimeAnnotation = __salt
+
+data AllowLegacyTypedefUri = AllowLegacyTypedefUri{}
+                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON AllowLegacyTypedefUri where
+  toJSON AllowLegacyTypedefUri = Aeson.object Prelude.mempty
+
+instance Thrift.ThriftStruct AllowLegacyTypedefUri where
+  buildStruct _proxy AllowLegacyTypedefUri
+    = Thrift.genStruct _proxy []
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do Prelude.pure (AllowLegacyTypedefUri)
+              _idMap = HashMap.fromList []
+            _parse 0)
+
+instance DeepSeq.NFData AllowLegacyTypedefUri where
+  rnf AllowLegacyTypedefUri = ()
+
+instance Default.Default AllowLegacyTypedefUri where
+  def = AllowLegacyTypedefUri
+
+instance Hashable.Hashable AllowLegacyTypedefUri where
+  hashWithSalt __salt AllowLegacyTypedefUri = __salt
+
+data AllowUnsafeOptionalCustomDefaultValue = AllowUnsafeOptionalCustomDefaultValue{}
+                                             deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON AllowUnsafeOptionalCustomDefaultValue where
+  toJSON AllowUnsafeOptionalCustomDefaultValue
+    = Aeson.object Prelude.mempty
+
+instance Thrift.ThriftStruct AllowUnsafeOptionalCustomDefaultValue
+         where
+  buildStruct _proxy AllowUnsafeOptionalCustomDefaultValue
+    = Thrift.genStruct _proxy []
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do Prelude.pure
+                                               (AllowUnsafeOptionalCustomDefaultValue)
+              _idMap = HashMap.fromList []
+            _parse 0)
+
+instance DeepSeq.NFData AllowUnsafeOptionalCustomDefaultValue where
+  rnf AllowUnsafeOptionalCustomDefaultValue = ()
+
+instance Default.Default AllowUnsafeOptionalCustomDefaultValue
+         where
+  def = AllowUnsafeOptionalCustomDefaultValue
+
+instance Hashable.Hashable AllowUnsafeOptionalCustomDefaultValue
+         where
+  hashWithSalt __salt AllowUnsafeOptionalCustomDefaultValue = __salt
+
+data AllowUnsafeUnionFieldCustomDefaultValue = AllowUnsafeUnionFieldCustomDefaultValue{}
+                                               deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON AllowUnsafeUnionFieldCustomDefaultValue where
+  toJSON AllowUnsafeUnionFieldCustomDefaultValue
+    = Aeson.object Prelude.mempty
+
+instance Thrift.ThriftStruct
+           AllowUnsafeUnionFieldCustomDefaultValue
+         where
+  buildStruct _proxy AllowUnsafeUnionFieldCustomDefaultValue
+    = Thrift.genStruct _proxy []
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do Prelude.pure
+                                               (AllowUnsafeUnionFieldCustomDefaultValue)
+              _idMap = HashMap.fromList []
+            _parse 0)
+
+instance DeepSeq.NFData AllowUnsafeUnionFieldCustomDefaultValue
+         where
+  rnf AllowUnsafeUnionFieldCustomDefaultValue = ()
+
+instance Default.Default AllowUnsafeUnionFieldCustomDefaultValue
+         where
+  def = AllowUnsafeUnionFieldCustomDefaultValue
+
+instance Hashable.Hashable AllowUnsafeUnionFieldCustomDefaultValue
+         where
+  hashWithSalt __salt AllowUnsafeUnionFieldCustomDefaultValue
+    = __salt
+
+data AllowUnsafeRequiredFieldQualifier = AllowUnsafeRequiredFieldQualifier{}
+                                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON AllowUnsafeRequiredFieldQualifier where
+  toJSON AllowUnsafeRequiredFieldQualifier
+    = Aeson.object Prelude.mempty
+
+instance Thrift.ThriftStruct AllowUnsafeRequiredFieldQualifier
+         where
+  buildStruct _proxy AllowUnsafeRequiredFieldQualifier
+    = Thrift.genStruct _proxy []
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do Prelude.pure
+                                               (AllowUnsafeRequiredFieldQualifier)
+              _idMap = HashMap.fromList []
+            _parse 0)
+
+instance DeepSeq.NFData AllowUnsafeRequiredFieldQualifier where
+  rnf AllowUnsafeRequiredFieldQualifier = ()
+
+instance Default.Default AllowUnsafeRequiredFieldQualifier where
+  def = AllowUnsafeRequiredFieldQualifier
+
+instance Hashable.Hashable AllowUnsafeRequiredFieldQualifier where
+  hashWithSalt __salt AllowUnsafeRequiredFieldQualifier = __salt
+
+data AllowLegacyMissingUris = AllowLegacyMissingUris{}
+                              deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON AllowLegacyMissingUris where
+  toJSON AllowLegacyMissingUris = Aeson.object Prelude.mempty
+
+instance Thrift.ThriftStruct AllowLegacyMissingUris where
+  buildStruct _proxy AllowLegacyMissingUris
+    = Thrift.genStruct _proxy []
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do Prelude.pure (AllowLegacyMissingUris)
+              _idMap = HashMap.fromList []
+            _parse 0)
+
+instance DeepSeq.NFData AllowLegacyMissingUris where
+  rnf AllowLegacyMissingUris = ()
+
+instance Default.Default AllowLegacyMissingUris where
+  def = AllowLegacyMissingUris
+
+instance Hashable.Hashable AllowLegacyMissingUris where
+  hashWithSalt __salt AllowLegacyMissingUris = __salt
+
+data AllowUnsafeNonSealedKeyType = AllowUnsafeNonSealedKeyType{}
+                                   deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON AllowUnsafeNonSealedKeyType where
+  toJSON AllowUnsafeNonSealedKeyType = Aeson.object Prelude.mempty
+
+instance Thrift.ThriftStruct AllowUnsafeNonSealedKeyType where
+  buildStruct _proxy AllowUnsafeNonSealedKeyType
+    = Thrift.genStruct _proxy []
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do Prelude.pure (AllowUnsafeNonSealedKeyType)
+              _idMap = HashMap.fromList []
+            _parse 0)
+
+instance DeepSeq.NFData AllowUnsafeNonSealedKeyType where
+  rnf AllowUnsafeNonSealedKeyType = ()
+
+instance Default.Default AllowUnsafeNonSealedKeyType where
+  def = AllowUnsafeNonSealedKeyType
+
+instance Hashable.Hashable AllowUnsafeNonSealedKeyType where
+  hashWithSalt __salt AllowUnsafeNonSealedKeyType = __salt
+
+newtype Deprecated = Deprecated{deprecated_message :: Text.Text}
+                     deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON Deprecated where
+  toJSON (Deprecated __field__message)
+    = Aeson.object ("message" .= __field__message : Prelude.mempty)
+
+instance Thrift.ThriftStruct Deprecated where
+  buildStruct _proxy (Deprecated __field__message)
+    = Thrift.genStruct _proxy
+        (Thrift.genField _proxy "message" (Thrift.getStringType _proxy) 1 0
+           (Thrift.genText _proxy __field__message)
+           : [])
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            __field__message <- ST.newSTRef ""
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 1 | _type ==
+                                                                       Thrift.getStringType _proxy
+                                                                     ->
+                                                                     do !_val <- Trans.lift
+                                                                                   (Thrift.parseText
+                                                                                      _proxy)
+                                                                        ST.writeSTRef
+                                                                          __field__message
+                                                                          _val
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do !__val__message <- ST.readSTRef
+                                                                  __field__message
+                                             Prelude.pure (Deprecated __val__message)
+              _idMap = HashMap.fromList [("message", 1)]
+            _parse 0)
+
+instance DeepSeq.NFData Deprecated where
+  rnf (Deprecated __field__message)
+    = DeepSeq.rnf __field__message `Prelude.seq` ()
+
+instance Default.Default Deprecated where
+  def = Deprecated ""
+
+instance Hashable.Hashable Deprecated where
+  hashWithSalt __salt (Deprecated _message)
+    = Hashable.hashWithSalt __salt _message
diff --git a/thrift/annotation/gen-hs2/Hack/Types.hs b/thrift/annotation/gen-hs2/Hack/Types.hs
--- a/thrift/annotation/gen-hs2/Hack/Types.hs
+++ b/thrift/annotation/gen-hs2/Hack/Types.hs
@@ -24,7 +24,9 @@
         StructTrait(StructTrait, structTrait_name),
         Attributes(Attributes, attributes_attributes),
         StructAsTrait(StructAsTrait), ModuleInternal(ModuleInternal),
-        GenerateClientMethodsWithHeaders(GenerateClientMethodsWithHeaders))
+        GenerateClientMethodsWithHeaders(GenerateClientMethodsWithHeaders),
+        MigrationBlockingAllowInheritance(MigrationBlockingAllowInheritance),
+        MigrationBlockingLegacyJSONSerialization(MigrationBlockingLegacyJSONSerialization))
        where
 import qualified Control.DeepSeq as DeepSeq
 import qualified Control.Monad as Monad
@@ -667,3 +669,87 @@
 
 instance Hashable.Hashable GenerateClientMethodsWithHeaders where
   hashWithSalt __salt GenerateClientMethodsWithHeaders = __salt
+
+data MigrationBlockingAllowInheritance = MigrationBlockingAllowInheritance{}
+                                         deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON MigrationBlockingAllowInheritance where
+  toJSON MigrationBlockingAllowInheritance
+    = Aeson.object Prelude.mempty
+
+instance Thrift.ThriftStruct MigrationBlockingAllowInheritance
+         where
+  buildStruct _proxy MigrationBlockingAllowInheritance
+    = Thrift.genStruct _proxy []
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do Prelude.pure
+                                               (MigrationBlockingAllowInheritance)
+              _idMap = HashMap.fromList []
+            _parse 0)
+
+instance DeepSeq.NFData MigrationBlockingAllowInheritance where
+  rnf MigrationBlockingAllowInheritance = ()
+
+instance Default.Default MigrationBlockingAllowInheritance where
+  def = MigrationBlockingAllowInheritance
+
+instance Hashable.Hashable MigrationBlockingAllowInheritance where
+  hashWithSalt __salt MigrationBlockingAllowInheritance = __salt
+
+data MigrationBlockingLegacyJSONSerialization = MigrationBlockingLegacyJSONSerialization{}
+                                                deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
+
+instance Aeson.ToJSON MigrationBlockingLegacyJSONSerialization
+         where
+  toJSON MigrationBlockingLegacyJSONSerialization
+    = Aeson.object Prelude.mempty
+
+instance Thrift.ThriftStruct
+           MigrationBlockingLegacyJSONSerialization
+         where
+  buildStruct _proxy MigrationBlockingLegacyJSONSerialization
+    = Thrift.genStruct _proxy []
+  parseStruct _proxy
+    = ST.runSTT
+        (do Prelude.return ()
+            let
+              _parse _lastId
+                = do _fieldBegin <- Trans.lift
+                                      (Thrift.parseFieldBegin _proxy _lastId _idMap)
+                     case _fieldBegin of
+                       Thrift.FieldBegin _type _id _bool -> do case _id of
+                                                                 _ -> Trans.lift
+                                                                        (Thrift.parseSkip _proxy
+                                                                           _type
+                                                                           (Prelude.Just _bool))
+                                                               _parse _id
+                       Thrift.FieldEnd -> do Prelude.pure
+                                               (MigrationBlockingLegacyJSONSerialization)
+              _idMap = HashMap.fromList []
+            _parse 0)
+
+instance DeepSeq.NFData MigrationBlockingLegacyJSONSerialization
+         where
+  rnf MigrationBlockingLegacyJSONSerialization = ()
+
+instance Default.Default MigrationBlockingLegacyJSONSerialization
+         where
+  def = MigrationBlockingLegacyJSONSerialization
+
+instance Hashable.Hashable MigrationBlockingLegacyJSONSerialization
+         where
+  hashWithSalt __salt MigrationBlockingLegacyJSONSerialization
+    = __salt
